pax_global_header00006660000000000000000000000064130235225730014514gustar00rootroot0000000000000052 comment=14163962c8d42e0fd28d3cdf3548de0b01530c76 Gyoto-1.2.0/000077500000000000000000000000001302352257300126155ustar00rootroot00000000000000Gyoto-1.2.0/.gitignore000066400000000000000000000010031302352257300145770ustar00rootroot00000000000000*.fits ./gyoto bin/gyoto *.lo *.o ywrap.c Makefile autom4te.cache .libs config.log config.status doc/html/ doc/latex *.la .deps *.pc *.so *~ libtool config.h include/GyotoConfig.h include/stamp-h2 stamp-h1 yorick/stdplug/polishfit.i yorick/yorick yorick/setpaths.i yorick/gyoto.info yorick/yorick1 doc/user_guide/GyotoManual.aux doc/user_guide/GyotoManual.bbl doc/user_guide/GyotoManual.blg doc/user_guide/GyotoManual.log doc/user_guide/GyotoManual.out doc/user_guide/GyotoManual.pdf doc/user_guide/GyotoManual.toc Gyoto-1.2.0/AUTHORS000066400000000000000000000012201302352257300136600ustar00rootroot00000000000000Gyoto has been written starting in 2008 primarily by: Frédéric Vincent [1, 2] Thibaut Paumard [1] Additional contributors: Odele Straub [1] The development team at Observatoire de Paris also includes: Éric Gourgoulhon [2] Guy Perrin [1] Affiliations: [1] Laboratoire d'études spatiales et d'instrumentation en astrophysique (LESIA), Observatoire de Paris, CNRS, Université Pierre et Maris Curie, Université Paris Diderot 5 place Jules Janssen, F-92190 MEUDON, FRANCE [2] Laboratoire Univers et théories (LUTH), Observatoire de Paris, CNRS, Université Paris Diderot 5 place Jules Janssen, F-92190 MEUDON, FRANCE Gyoto-1.2.0/BUGS.md000066400000000000000000000041121302352257300136750ustar00rootroot00000000000000# Known bugs affecting This file is to list known bugs in Gyoto or its dependencies that significantly affect Gyoto but are not easy to fix or workaround in Gyoto. ## Boost.multiprecision 1.62.0 (other nearby versions presumably affected): A bug makes multiprecision acos() never return in some circumstances. This has caused gyoto hanging. As of writing, this is fixed in the Boost development tree and worked around in the Debian package for Gyoto. For further details and workarounds, see: - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844490 - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844495 - https://svn.boost.org/trac/boost/ticket/12625 -- Thibaut Paumard, Thu Dec 08 2016. ## Clang/LLVM compiler (all versions), possibly other compilers: Gyoto relies on proper delivery of SIGFPE when arithmetic errors occur (division by zero, floating point overflows...). It does so by enabling the right exceptions using feenableexcept from GNU fenv.h. However, some compilers (clang/llvm, in particular) do not support setting the floating-point environment and will happily optimize code assuming that it is safe to divide by zero. We recommend staying away from these compilers until this issue is fixed: - https://llvm.org/bugs/show_bug.cgi?id=23707 - https://llvm.org/bugs/show_bug.cgi?id=8100 Alternatively, you may try to reconfigure Gyoto to not use fenv.h and/or to not use any optimization: make clean ./configure --without-fenv CFLAGS="-g -O0" CXXFLAGS="-g -O0" make and see whether it works better for you. If you experience such spurious SIGFPE inside the Yorick plug-in, an ugly workaround is to call gyoto.fedisableexcept() right before the offending Gyoto call. If at all possible, consider recompiling Gyoto as explained above. Note that loading some plug-ins (e.g. the lorene plug-in) may change or reset the default floating-point environment. This is the case if the plug-in, or one of the libraries it links with, has been compiled with optimizations such as -ffast-math or gfortran. -- Thibaut Paumard, Thu Dec 08 2016. Gyoto-1.2.0/COPYING000066400000000000000000001045131302352257300136540ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 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 state 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 3 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 . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU 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. But first, please read . Gyoto-1.2.0/ChangeLog000066400000000000000000006234751302352257300144100ustar00rootroot00000000000000commit unknown Author: Thibaut Paumard Date: Mon, 12 Dec 2016 13:49:58 +0100 Releasing 1.2.0 commit b3052c5f8663e4b6c49256b5041bcd67a91c2d85 Author: Thibaut Paumard Date: Mon Dec 12 12:57:47 2016 +0100 Add --version option to gyoto command-line tool commit 6ca591a2660e1293b559af6c1e86015d7be0bd48 Author: Thibaut Paumard Date: Mon Dec 12 10:45:37 2016 +0100 Support enroling MPI_COMM_WORLD in python/example-mpi.py Apply the same heuristics and algorithm as in bin/gyoto.C to support mpirun starting the worker process itself. commit 87e8567f6c9bcd263a874bc1f11811556770c276 Author: Thibaut Paumard Date: Sun Dec 11 20:46:35 2016 +0100 Correctly handle empty stry case in OscilTorus::emittingArea() commit 09a179b9d5d070c949d0969221cc4efc0bdcc989 Author: Thibaut Paumard Date: Sun Dec 11 20:08:45 2016 +0100 Remove spurious cerr commit 63632ea68aee0e6ff3d2e58d13991ce2148ece06 Author: Thibaut Paumard Date: Sun Dec 11 19:33:11 2016 +0100 Implement thread-safety declaration Thread-unsafe classes declare themselves as such, so that NThreads is ignored when multi-threading would cause erroneous results. commit b524fef7147c66ec16190b4c8f7e31adbaa1e64c Author: Thibaut Paumard Date: Sat Dec 10 20:44:57 2016 +0100 NumericalMetricalLorene is mature: not WIP anymore Stop inheriting from WIP commit 22d3e7f974b8f52dbe40b3776bdb2c90d7e9261c Author: Thibaut Paumard Date: Sat Dec 10 18:11:35 2016 +0100 Releasing 1.1.2 commit 039f3b98a6ddfa3a99470f2a9b50b9bfcabc97e3 Author: Thibaut Paumard Date: Sat Dec 10 15:53:19 2016 +0100 Change subcontractor APIs to use a vector It is now possible to specify several plugins for loading an object. Useful when a plug-in depends on another one. In XML: Plugins are loaded in order and looked into in reverse order for the class. commit 78608e5a49a349166d15b570ffcec5c9a2754571 Author: Thibaut Paumard Date: Sat Dec 10 13:15:06 2016 +0100 Store plug-in name as given by user When plu-gin name is actually a file name, loadPlugin() determines the actual plug-in name to find out the intilialization function. Nevertherless we prefer to store the file name in that case so users can load several versions of the same plug-in e.g. for testing purposes. commit 5f35070ab4371ab0829de38585b635bd3d0cf51f Author: Thibaut Paumard Date: Sat Dec 10 12:34:15 2016 +0100 Merging branch master into track-plugin commit b0413450c29b5a2fca5af1ac30c30954e23f4da8 Author: Thibaut Paumard Date: Fri Dec 9 19:18:24 2016 +0100 Rename the breathing modes in OscilTorus BreathingMinus -> Plus BreathingPlus -> Breathing commit eb117650ade102b30eae37f62f6669c366c12776 Author: Thibaut Paumard Date: Fri Dec 9 18:47:52 2016 +0100 Correct style in Deformed Torus Use an enum and strin property for perturb_kind_, rename r_center_ to c_ and Rcenter to LargeRadius like the other torii, rename Param* properties to just *. commit 9d68e18c39fb952b932390f35445ecf6d1f53d9c Author: Thibaut Paumard Date: Fri Dec 9 16:43:25 2016 +0100 New Astrobj: OscilTorus commit 4811d8dc0bcba755415ebdf03040177c2b2b36cf Author: Thibaut Paumard Date: Fri Dec 9 16:39:51 2016 +0100 New convenience macros in GyotoProperty.h GYOTO_PROPERTY_ACCESSORS_SPECIAL GYOTO_PROPERTY_ACCESSORS_GEOMETRICAL_SPECIAL GYOTO_PROPERTY_ACCESSORS_UNIT commit a187bcf6aa168acfcd1bf9c965726624668f79f6 Author: Thibaut Paumard Date: Thu Dec 8 16:59:25 2016 +0100 New Astrobj: InflateStar commit e349992c3d98a2b04563a655195760b3a55eca06 Author: Thibaut Paumard Date: Thu Dec 8 15:28:06 2016 +0100 New Astrobj: EquatorialHotSpot commit 031d97346f3e53780b59d0d3e442096749e6a1f2 Author: Thibaut Paumard Date: Thu Dec 8 15:17:17 2016 +0100 Fix memory management in DynamicalDisk Actually free all memory in the destructor and before reading new files; initialize pointers to NULL and only delete them when they are not NULL. commit ed3f2912cb667043bce77208b0d2e5d12053a04d Author: Thibaut Paumard Date: Thu Dec 8 13:05:33 2016 +0100 New Astrobj: DynamicalDiskBolometric commit b350fd5f5551aef5262e05c2ba1eab3f8d81505a Author: Thibaut Paumard Date: Thu Dec 8 12:10:35 2016 +0100 Rename property ModifCS to DzetaCS in Metric::ChernSimons commit 65af14b090e3f639a70bd8749894f1a25068856f Author: Thibaut Paumard Date: Thu Dec 8 12:05:55 2016 +0100 New Astrobj: DeformedTorus commit 925fe15b6d6c2ab0e5d4bf66d91a31b60c9a01d3 Author: Thibaut Paumard Date: Thu Dec 8 11:34:37 2016 +0100 Use AM_INIT_AUTOMAKE([foreign]) in configure.ac This way the fact that README is called README.md does not trigger an error. commit ee0010f3a53d1b7d51a49ba1f4d6f3d618fa79ea Author: Thibaut Paumard Date: Thu Dec 8 11:19:35 2016 +0100 Add link to homepage in README.md commit f4b30574e12948917f8cab75b3804f2fd8eb79fb Author: Thibaut Paumard Date: Thu Dec 8 11:16:28 2016 +0100 fixup README.md commit ca95a5d3a4c96c4033b621cb18ade42d74faee99 Author: Thibaut Paumard Date: Thu Dec 8 11:12:24 2016 +0100 Update README and rename it README.md Also fix broken links to BUGS.md in INSTALL.Gyoto.md commit 59f31b293055bef1716a4867f91daf32106e698a Author: Thibaut Paumard Date: Thu Dec 8 09:51:54 2016 +0100 Enhance user documentation about known bugs and to-do list commit 78818a4c1101a65f18a9a596823442501216e09e Author: Thibaut Paumard Date: Thu Dec 8 08:54:32 2016 +0100 NumericalMetricLorene is mature Use WIP("") in constructor to not issue the warning. With the next ABI change, we should stop inherinting from WIP entirely. commit 561872afd56cfd5bd84bd3f7f5552193649bbd25 Author: Thibaut Paumard Date: Wed Dec 7 22:27:05 2016 +0100 Allow loading plug-in from path e.g. gyoto -p./libgyoto-foo.so -l commit 5c9fdfdeca8cfcd804a85e9199cbe2a595024361 Author: Thibaut Paumard Date: Wed Dec 7 21:49:36 2016 +0100 Issue a useful message when a plug-in cannot be loaded Gyoto tries to load plug-ins from several places. When a plug-in could not be loaded, Gyoto used to issue the error message of only the last attempt, which was often "no such file or directory". With the patch, the error messages of all the attempts are displayed. commit 0c18e20e0a5978f3a9468d106b34172206d7c8d0 Author: Thibaut Paumard Date: Wed Dec 7 21:29:31 2016 +0100 New Metric: RezzollaZhidenko commit fe84646be29f65cdca27a1bf808df3935b8f527f Author: Thibaut Paumard Date: Wed Dec 7 18:39:25 2016 +0100 New Metric: ChernSimons commit 9c37464e7c317a0edd685e8bd80588a910516be0 Author: Thibaut Paumard Date: Tue Dec 6 22:43:19 2016 +0100 Support colon syntax for mpirun Support spawning gyoto-mpi-worker directly from mpirun on any MPI implementation (that supports the MIMD model), for any Gyoto interface (gyoto, Python, Yorick...). Just start the processes with something like: mpirun -np 1 : -np 8 gyoto-mpi-worker. In the process, use Scenery::mpiSpawn(-1) to use the processes available in the WORLD communicator instead of spawning new ones. 'gyoto' still needs to know that it has to use MPI parallelisation, so use of the -P option is still mandatory (except under Open MPI): mpirun -np 1 gyoto -P1 : -np 8 gyoto-mpi-worker. commit e46518508a1ffbd62f5d7bf4a16025b3929c32fd Author: Thibaut Paumard Date: Tue Dec 6 18:01:57 2016 +0100 gyoto: Support -np option in Open MPI MPI support in Gyoto has been implemented using the singleton approach, where a single processess exists at start-up and spawns its worker as needed using MPI_Comm_spawn(). With this commit, the gyoto command line tool also supports the more traditional approach where N processes are started directly by mpirun. This is only for the gyoto command-line tool (so, not for the Python or Yorick interfaces), and only for Open MPI (not e.g. MPICH). commit eeaf74670926be5a2e2e2e4db1b10745fb5caf85 Author: Thibaut Paumard Date: Fri Nov 4 11:24:04 2016 +0100 Update documentation commit 5ec7cc1587c00c1eaf0d50e96683387e04824f70 Author: Thibaut Paumard Date: Fri Nov 4 11:09:13 2016 +0100 Update INSTALL.Gyoto.md commit ea49cda36b6d6de133546fc298c80c36f2143c1b Author: Thibaut Paumard Date: Fri Nov 4 11:08:22 2016 +0100 Update INSTAL.Gyoto.md commit 153aaf51016fd471ff540dd31cdb497bfd207b3a Author: Thibaut Paumard Date: Fri Nov 4 11:04:28 2016 +0100 Update INSTALL.Gyoto and move is to INSTALL.Gyoto.md commit debdbe925d59a5c4be43d71e40200f7fd224a940 Author: Thibaut Paumard Date: Mon Oct 31 11:08:12 2016 +0100 Releasing 1.1.1 commit f4af3a5198d87ce4113a90fb7cf753b3731044ae Author: Thibaut Paumard Date: Mon Oct 31 10:02:08 2016 +0100 Update copyright years and other cosmetic changes for next release commit c28648aff060bbda5c9dce2588c8666d181fa98e Author: Thibaut Paumard Date: Sun Oct 30 10:03:30 2016 +0100 Use only major library version in GYOTO_PLUGDIR Up to know, the versioned directory for plug-ins used the full libtool versinfo, changing with each new library soname revision. From know onwards, it is only the major number, which is kept for backward-compatible changes. Users will not need to recompile their plug-ins when upgrading to a backwarsd-compatible version of Gyoto. commit 00d66f0a3279b336280240bb19a2b3b0a86c2a76 Author: Thibaut Paumard Date: Sat Oct 29 16:42:01 2016 +0200 Introduce localpkglibdir to install plug-ins - lib/Register.C: look for plug-ins in localpkglibdir; - configure.ac: determine a sensible value for localpkglibdir; - lib/gyoto.pc.in: store this information; - plugins/null: examplify how to install there safely; - doc/user_guide: document this change. commit ebb0ef13dced5c31984f166d99aa6c26390824b2 Author: Thibaut Paumard Date: Fri Oct 28 22:12:28 2016 +0200 plugins/null/configure: check for MPICXX and CXX from gyoto.pc commit aa6594aab69059bf72d38c79ee77c0a1e722d91c Author: Thibaut Paumard Date: Sat Oct 29 16:42:01 2016 +0200 Introduce localpkglibdir to install plug-ins - lib/Register.C: look for plug-ins in localpkglibdir; - configure.ac: determine a sensible value for localpkglibdir; - lib/gyoto.pc.in: store this information; - plugins/null: examplify how to install there safely; - doc/user_guide: document this change. commit 1a903a7440a529639bba80d10e9407ff40ad711c Author: Thibaut Paumard Date: Fri Oct 28 22:12:28 2016 +0200 plugins/null/configure: check for MPICXX and CXX from gyoto.pc commit 6e1c6aa8104cd11ef11982868bac63e785c3cf12 Author: Thibaut Paumard Date: Fri Oct 28 19:43:48 2016 +0200 Commit autoreconf products and update git-post-merge script (cherry picked from commit 63b5bf61f21d0e1b425795737ec1d2bd3cf570c8) Conflicts: plugins/null/aclocal.m4 commit 988ebdb08d4ba4c2d6caaf39ff5719731c3519ec Author: Thibaut Paumard Date: Fri Oct 28 19:06:49 2016 +0200 Add CXX variable to gyoto*.pc commit d6bb1a07f5f4edc01ef3696e19bb0fcf4d59e52d Author: Thibaut Paumard Date: Fri Oct 28 17:14:02 2016 +0200 plugins/null: don't use mpic++; don't use LORENE. commit 72ad9b06b6be7cbfc725ceaed04a26f551d0ed65 Author: Frédéric Vincent Date: Thu Oct 27 18:00:44 2016 +0200 Fix copy constructor of Page-Thorne disk commit a7ffea424d32afc247465c33900fe8a64f2ad93c Author: Frédéric Vincent Date: Thu Oct 27 18:00:44 2016 +0200 Fix copy constructor of Page-Thorne disk commit 63b5bf61f21d0e1b425795737ec1d2bd3cf570c8 Author: Thibaut Paumard Date: Thu Oct 27 16:21:03 2016 +0200 Commit autoreconf products and update git-post-merge script commit 4dde0a63601316839d433d4560ce15fb23c5f0c5 Author: Thibaut Paumard Date: Thu Oct 13 22:45:34 2016 +0200 Improve plug-in example in plugins/null and document it in the user manual. commit 6bbadeaa2af76014d83c99090af1271148adf49e Author: Thibaut Paumard Date: Thu Oct 13 18:15:26 2016 +0200 Add null plug-in as an example commit ece3df86a402d1c0d02d31706a344b32c32d5f88 Author: Thibaut Paumard Date: Mon Oct 3 11:27:05 2016 +0200 NEXT 2016/10/03 BUG * Yorick: actually implement `picture' painter for the matte_paint framework. Allow using any two or three-dimensional image or stack of images in the `picture' and `panorama' painters. commit 649d76dce7a90a15d55ec444a9d7b50f5868a6f8 Author: Thibaut Paumard Date: Wed Sep 28 12:21:32 2016 +0200 NEXT 2016/09/28 API * New functionality: the plug-in from which each subcontractor is registered is now tracked, so that it becomes possible to look for a subcontractor matching a specific kind and plug-in. We introduce the function Gyoto::requirePlugin() in addition to Gyoto::loadPlugin(). The subcontractor signature is changed to accept a second parameter, which breaks the API. commit 22c8c78b2388b987ee5afca27706e2d54c4a3c0a Author: Thibaut Paumard Date: Thu Sep 15 22:22:29 2016 +0200 * configure --enable-hardening now also activates -fPIE and -pie for executables commit 633157529a837b21ee38373928f6c32a75554769 Author: Thibaut Paumard Date: Thu Sep 15 18:32:01 2016 +0200 * Use setuptools also in setup_lorene.py commit acbcd37ef3a83d609d36008029c6d50e2b9e02df Author: Thibaut Paumard Date: Thu Sep 15 18:27:42 2016 +0200 * Fix typos detected by lintian commit d53a546a2bea1799cf129405e8657dfb66c20e4b Author: Thibaut Paumard Date: Mon Sep 12 19:20:28 2016 +0200 Releasing 1.1.0 commit 5f9eb5090a5734847f89fb86510aa0324ae14b85 Author: Thibaut Paumard Date: Mon Sep 12 19:10:50 2016 +0200 python: fix make check commit 18b2c623da3c8abe7c808ef6eeb850eba58f2dd5 Author: Thibaut Paumard Date: Wed Sep 7 15:10:54 2016 +0200 Make sure make check works even when built out-of-tree; Remove more files generated by "make install" in "make clean". commit f066d3f67b77fcf898e7632f71c853f7749b28b0 Author: Thibaut Paumard Date: Wed Sep 7 11:14:46 2016 +0200 Fix bug in bin/Makefile.am so that make check-*mpi works again commit 1fff8875649cfe652a88c3206e0395e7ec2ffa01 Author: Thibaut Paumard Date: Wed Sep 7 10:56:45 2016 +0200 python: use setuptools' mechanism for specifying libraries as passing them in LDFLAGS sometimes fails (LDFLAGS being before gyoto_wrap.o on the linker command line) commit 8c6328b0a5aa9cc4742b7cae6dfea1ff62a6dd2e Author: Thibaut Paumard Date: Fri Sep 2 16:20:34 2016 +0200 Add git-post-merge script commit a13256722b9354bd88cf8c373e1d1d604fb37c67 Author: Frederic Date: Thu Mar 24 18:39:51 2016 +0100 Photon.C: adding a flag to highligh the shadow region in a strong-field image commit 6d8ee111650d52a03bb341a0e195610c63153ffb Author: Frederic Date: Thu Mar 17 18:15:55 2016 +0100 PowerLawSpectrum: Adding cut-offs commit 67dc38bcaba46606f51fc62ecda177093d643603 Author: Thibaut Paumard Date: Wed Feb 10 23:08:28 2016 +0100 Hardcode last change date in the user manual and recall in README.Developpers to update it before releasing. commit 9006be3211f0daeaf32f1ff49a4b8accb1e7eb48 Author: Thibaut Paumard Date: Wed Feb 10 23:06:42 2016 +0100 Add lib/.libs to LD_LIBRARY_PATH of CHECK_CMD in bin/Makefile.am to let the test suite run through even when the libtool wrapper does not do it already. commit 4441de41ede5e6260c8fa4f0fbcf4e5702a24d74 Author: Frederic Date: Tue Jan 26 17:40:54 2016 +0100 DirectionalDisk: adding cutoff in lamp/disk frames commit 6eba7e9ab94e1d54f36403a3e68a1b0b00f86bc7 Author: Frederic Date: Mon Oct 19 12:20:56 2015 +0200 NumericalMetricLorene::setMetricSource: restoring the change of dzpuis, finally needed... commit f2a85f66db21f2269dcb063172c444c9443e4926 Author: Frederic Date: Fri Oct 16 14:44:58 2015 +0200 NumericalMetricLorene::setMetricSource: removing the change of dzpuis on Kij, needed in outdated version of astrobjs, not needed now commit 7eb378ab45c5983ee4f2282bc2275702cade212c Author: Frederic Date: Wed Sep 16 15:47:23 2015 +0200 KerrKS.C: changing condition in stopcondition commit 492b350e36cdb680323c3c5d5d59e753e2db4e36 Author: Frederic Date: Wed Sep 16 15:05:53 2015 +0200 Worldline::xFill: adding a test on the metric stop condition commit 877a717a85eb53b9a5f52d2a96443b397ea47983 Author: Thibaut Paumard Date: Fri Jul 31 14:19:37 2015 +0200 Fix memory leak in Worldline::setInitCoord Previously, setInitCoord would always reset i0_ to 0 for massive particles. This lead to memory leak when using a Star instance repeatedly for integrating backward in time. The fix consists in not changing i0_ if the Worldline is effectively reset. commit 12e57fffdc93163197c985cefe0db30ed7610cab Author: Thibaut Paumard Date: Fri Jul 31 14:12:25 2015 +0200 Fix StarTrace, broken by recent changes in Worldline Changes in constness of array parameters in virtual Worldline methods were not propagated to their StarTrace implementation. commit 392a409e057437c9434df749c59ced6bee095c78 Author: Thibaut Paumard Date: Wed Jul 29 18:21:54 2015 +0200 Fix exception support in Python 3 commit f99b60e1ba31ff873207f554e5a0076cb1a9c91c Author: Thibaut Paumard Date: Wed Jul 29 18:20:47 2015 +0200 Mostly fix out-of-tree build of Python extension 'make check' requires making a symling to the test directory commit d452384477957d84c5b61181597ad1083ef29ee2 Author: Thibaut Paumard Date: Wed Jul 29 15:06:07 2015 +0200 Add debug output in Worldline::xExpand() commit 1a5aea72fbe2f53f85b09443d9d7385e221daefe Author: Thibaut Paumard Date: Wed Jul 29 15:00:55 2015 +0200 House-keeping + Fix const-ness of input arrays in Metric classes to get a nicer default Python interface + Make a virtual destructor in Functors + Fix a couple of typos and doc formatting in NulmericalMetricLorene + Add nicer Python interfaces for some Metric APIs that return an array commit 0e457b87f68d2bf565fd17ee5292d37687cf9951 Author: Thibaut Paumard Date: Wed Jul 8 21:22:28 2015 +0200 Support ARGOUT_ARRAY1 arguments for Worldline in Python commit 734fee255b3d96eebade444dd0a379d979c21471 Author: Thibaut Paumard Date: Wed Jul 8 20:47:36 2015 +0200 Worldline::setInitCoord and friends take const arguments commit cb7a7eb50abf40ac0fe0ce989072e7f9fd3fc68e Author: Thibaut Paumard Date: Tue Jul 7 13:12:24 2015 +0200 Fix retrieveing PALN, Argument and Inclination with unit Setting has always been correct. Retrieving was applying conversion from unit to radians instead of the reverse. commit 3979b28c8286998ba5ba6ba0c09e8a7a0c33a52f Author: Thibaut Paumard Date: Mon Jul 6 14:58:54 2015 +0200 Fix FTBFS when NumPy headers are in odd directories commit 1fe99f451a04f70824d0a58bb0cc0cc5ed0bfaaf Author: Thibaut Paumard Date: Mon Jul 6 14:57:35 2015 +0200 Fix FTBFS with some compilers due to implicit narrowing conversion commit 65de725cf92b249483a5b298a9f238ea38a344ce Author: Thibaut Paumard Date: Mon Jul 6 14:56:26 2015 +0200 Start unit testing of Metric un Python and fix Python example commit cbc00e903baf43e5e3c17258b7f343caf9bdeeb9 Author: Thibaut Paumard Date: Mon Jul 6 14:55:06 2015 +0200 Fix compiler warning concerning ambiguous alse statement in KerrKS.C commit 0032899bc30066d753dc63dacfcefd47c59c8cb3 Author: Thibaut Paumard Date: Fri Jul 3 15:22:34 2015 +0200 Add Python unit tests around Property commit 16ebb312912352ec2456c6486442773be8f7e4ed Author: Thibaut Paumard Date: Fri Jul 3 15:19:36 2015 +0200 Improve documentation Fix typo in include/GyotoSpectrometer.h; add or improve Property doc strings in Worldline, Astrobj, FixedStar, KerrBL, KerrKS, Metric, Minkowski, Screen, Spectrometer, StarTrace, ThinDisk, Torus, UniformSpectrometer and UniformSphere. commit c530a42a9f6495a0013882c3e15a9893367f76bc Author: Thibaut Paumard Date: Fri Jul 3 15:17:15 2015 +0200 Add stringification macro in GyotoDefs.h commit 4b01b1d34523c7c31b4250d3cc115044beb66cf5 Author: Thibaut Paumard Date: Thu Jul 2 19:28:53 2015 +0200 Test Gyoto::Value in Python extension. Add toScreen and toSizeT, fix toVULong. commit 7ab5bd943f7d93cf8b46056aa1c6033a190e685e Author: Thibaut Paumard Date: Thu Jul 2 14:25:20 2015 +0200 Python extension: add conversion Unit -> str, add test suite commit 0200284c1bfb66ff24a248e5dd854d3af99d878f Author: Thibaut Paumard Date: Thu Jul 2 11:12:55 2015 +0200 Add test_getErrcode(self) in python/tests/test_error.py commit 190ea276ea63a974800a65d573d2eeb387cc4787 Author: Frederic Date: Thu Jul 2 11:16:42 2015 +0200 PolishDoughnut: adding computation of r_torus_outer in angmomrinner() commit e3b9013d46d5505bb31fe2380124caf041b135bb Author: Thibaut Paumard Date: Thu Jul 2 08:55:24 2015 +0200 Introduce python/gyoto_swig.h and gyoto_std_swig.h This simplifies the maintenance of Python extensions for external plug-ins: instead of hardcoding the #includes and function prototpes needed to import gyoto.i and gyoto_std.i, one can just #include the corresponding header. At some point it would be great to find how to preprocess the information directly from the .i files, if that is possible. commit 89a093351b54c6f33c69badb75eae4c3912affc1 Author: Thibaut Paumard Date: Wed Jul 1 17:14:27 2015 +0200 In Python extension, actually raise gyoto.Error exceptions throwError() in C++ code will result in gyoto.Error being raised in a catchable fashion in Python code. Test this functionality in the test suite. commit 3466428d85eac95beb6788d7cd8e3d5b33094c5c Author: Thibaut Paumard Date: Tue Jun 30 12:02:36 2015 +0200 Fix check-* targets In bin, fix check-lorene* which where recently broken. In yorick/, fix check-mpi which worked only with gyoto installed. commit 08a94afcbe14b82370c8d0c194359cdc0c3399db Author: Thibaut Paumard Date: Tue Jun 30 12:00:53 2015 +0200 Implement test suite in Python extension Use setuptools instead of distutils and start implementing a test suite using it. commit f9fda308079dcde793225c75b5c000f2c23300ba Author: Thibaut Paumard Date: Tue Jun 30 11:59:13 2015 +0200 Remove declaration of PolishDoughnut::operator=() It was never implemented and we don't intend on implementing it. commit de1cf5da65aaf7e6ceb44ca30cbcf2fd218bbb55 Author: Thibaut Paumard Date: Tue Jun 30 11:57:58 2015 +0200 Remove macro GYOTO_USE_LORENE It is useless: the base code should not behave differently depending on whether or not the lorene plug-in is compiled, as it can be compiled separately. commit 703ed2e369a10f22cd84bdf71affda90fc0e70f0 Author: Thibaut Paumard Date: Mon Jun 29 16:00:11 2015 +0200 Copy GNU INSTALL file instead of using symlink commit 5d09f067d7c00c5c6bd7a954533c2fc968088996 Author: Thibaut Paumard Date: Fri Jun 26 09:29:10 2015 +0200 Releasing 1.0.2 commit a7d75d39b03b42d195dbc5b5bc44ad4813cfe827 Author: Thibaut Paumard Date: Fri Jun 26 08:13:05 2015 +0200 Few more lines in python/example.py commit daaa062477347a09855a3e493e212e7e9fd6ffc9 Author: Thibaut Paumard Date: Thu Jun 25 22:13:24 2015 +0200 Allows passing NULL to Scenery::Subcontractor(fmp) commit 73d30a082991cfb3f515dce3116ee1988c4c6a0e Author: Thibaut Paumard Date: Thu Jun 25 19:07:42 2015 +0200 Use NumpY arrays as much as possible in Python extension: checked Worldline and Screen commit 713bba4ae0e3c4c8c15ecf0e79663897dcddbc60 Author: Thibaut Paumard Date: Wed Jun 24 20:50:38 2015 +0200 Add flared disk Python example commit 3f4224fef02464f1406cc7af1ba4ad7764bb5428 Author: Thibaut Paumard Date: Wed Jun 24 18:10:19 2015 +0200 Always check whether a link is necessary in python plugin Follow symlinks recursively. Use canonical name as plug-in nam, make symlink if differenct from basename $PYTHON. commit e08b3090bfcb4a732304c73878897d1086a3e41f Author: Thibaut Paumard Date: Wed Jun 24 17:39:22 2015 +0200 If Python module contains only one class, use it by default. commit 08b32d2a25fae966f9faad047fbdf64187ebe038 Author: Thibaut Paumard Date: Wed Jun 24 16:18:24 2015 +0200 Make InlineModule more elegant and effective for Python 3.4 commit 867dd7151c10362c43eab739e39c083fc0133171 Author: Thibaut Paumard Date: Wed Jun 24 13:56:58 2015 +0200 Support InlineModule in python2.7 plug-in commit f676e0e83a673e1df1f3ce2e22a715dc89a6ff63 Author: Thibaut Paumard Date: Tue Jun 23 15:03:43 2015 +0200 Fix make uninstall to remove the python extension commit 877c1e6becc6356cf9c616d9fc975952d777647f Author: Thibaut Paumard Date: Tue Jun 23 14:04:00 2015 +0200 Do not use versionned sonames for delopend plug-ins commit 06d6c425df78028ab32388baaefdbd4d98a4c396 Author: Thibaut Paumard Date: Mon Jun 22 18:09:01 2015 +0200 Fix CPPFLAGS for GCC 5 (add -P flag) commit 4d482e24db6b8d26f74b13b1bfd5320f2db0fb68 Author: Thibaut Paumard Date: Mon Jun 22 14:32:11 2015 +0200 Improve doxygen documentation commit 68336a864d1f8a14f70df3f7900a4baef2ab2966 Author: Thibaut Paumard Date: Mon Jun 22 11:40:42 2015 +0200 Document the python plug-in in the Gyoto manual commit ab8d0dae9e93a2057939e266034d53bf55e3b1cc Author: Thibaut Paumard Date: Mon Jun 22 10:30:28 2015 +0200 Include GyotoPython.h in the doxygen documentation commit e99cdb8496b2846ba5ab45a515aef95e33550423 Author: Thibaut Paumard Date: Sun Jun 21 21:47:35 2015 +0200 Link python plugin to default, numbered version commit 7b09d1189fa847f4c9ad2c9f036dbfc2c1d8e118 Author: Thibaut Paumard Date: Sun Jun 21 18:25:20 2015 +0200 Fix import_array call in plugin/python to compile fine with Python < 3 commit 29946aaa3317f67145545cf57b255a5e0a91e115 Author: Thibaut Paumard Date: Sun Jun 21 12:41:09 2015 +0200 Configure and build Python extension automatically commit eea0b6365b9b0ef6ac9861e5de138df22436e414 Author: Thibaut Paumard Date: Sun Jun 21 11:45:34 2015 +0200 Configure and build plugins/python automatically Pass --without-python to disable. commit 9952138c789f85308aae4b777539ded41be6f22a Author: Thibaut Paumard Date: Sat Jun 20 19:43:19 2015 +0200 Enhance documentation in GyotoPython.h commit 4e45039dfba85fdbdc136a40e0f39426bacd3dee Author: Thibaut Paumard Date: Sat Jun 20 14:40:12 2015 +0200 In python plug-in, store spherical and mass as attributes rather than items commit 154407301f45d4e7fb0345ac648cd3978ead08ba Author: Thibaut Paumard Date: Sat Jun 20 02:08:34 2015 +0200 Set `this' in Python classes (python plug-in) commit 18af369b2153ab8c975f9976e01af1d5327b2918 Author: Thibaut Paumard Date: Sat Jun 20 02:06:52 2015 +0200 Move Astrobj::Standard to the main library commit 22d6e99794f4ee8874ef8e42dd1fee517d582b9c Author: Thibaut Paumard Date: Fri Jun 19 03:04:05 2015 +0200 Add examples for Astrobj::Python::* And remove blanck characters in plugins/python/lib/ThinDisk.C commit ac832c7c053934bf60e4417bf1d85835b021d47f Author: Thibaut Paumard Date: Fri Jun 19 02:57:55 2015 +0200 Add Astrobj::Python::ThinDisk commit 6d879c0dbca7a347f2f3aa1ee46b1b5cfabc2e24 Author: Thibaut Paumard Date: Fri Jun 19 02:50:18 2015 +0200 Remove Astrobj::ThinDisk::emission, which was never called It had the wrong signature and the implementation in Generic was used. commit a69ee5e49256c2b05d8cbad9cad2a79d97e1461a Author: Thibaut Paumard Date: Fri Jun 19 02:01:56 2015 +0200 Fixup: add plugins/python/lib/Standard.C commit 8c3310b2c15ef0f8dba9ba803deb32136dd47523 Author: Thibaut Paumard Date: Fri Jun 19 01:50:20 2015 +0200 Use helper functions consistently in python plug-in commit 52fa25bb2a46f6a81a7f45bcc5af29165d318d10 Author: Thibaut Paumard Date: Fri Jun 19 01:37:49 2015 +0200 Implement Astrobj::Python::Standard commit 1915083cb82cf79b12177d48903de5267fcaf04c Author: Thibaut Paumard Date: Thu Jun 18 17:41:23 2015 +0200 Add "." to python path in libgyoto-python commit 23e74e39575bd99ce4cf216a61ed9c46fcba6aa7 Author: Thibaut Paumard Date: Thu Jun 18 17:18:40 2015 +0200 Implement Gyoto::Metric::Python, document the Python plug-in commit d9ac54ea9cc17a149bb6d5ca7dddda39b4d472b7 Author: Thibaut Paumard Date: Wed Jun 17 22:41:45 2015 +0200 Allow overloading Spectrum::operator() in python plug-in By checking whether __call__ accepts the vararg *args. commit 3d9babaf98453fab0c528d3e87e8ed44ff437f3e Author: Thibaut Paumard Date: Wed Jun 17 21:36:28 2015 +0200 Replace setParameters by __setitem__ in python plug-in Also adapt the examples to show a minimal example (BlackBody6000) and a maximal example (PowerLaw). commit 2011feb60b77ab5adecd498cece6d2d434c3b721 Author: Thibaut Paumard Date: Wed Jun 17 19:38:20 2015 +0200 In python plug-in, store __call__ reference In order to not look for it at each iteraction. Ought to be slightly faster. commit 068387ab15457ca9d36633d2a39fb8c5dd373120 Author: Thibaut Paumard Date: Wed Jun 17 18:28:04 2015 +0200 Add optional integrate method to Spectrum::Python, add examples commit b154942ce6a81d18fc29c6c20c410ccc2abbe1af Author: Thibaut Paumard Date: Wed Jun 17 12:53:38 2015 +0200 Allow versionned name for the Python plug-in E.g. if $PYTHON is python3.4, then the plug-in will also be called python3.4 (as in libgyoto-python3.4.so). This way we can build and install several versions of the plug-in, that will run in the various interpreters. Note that the plug will not run in python2.7 if compiled with python3.4. commit 0fb7f3003deafdc728609b88802bb906ed077873 Author: Thibaut Paumard Date: Wed Jun 17 12:49:31 2015 +0200 Look for second, symbol constant name for plugin initialization Look for __GyotoPluginInit in addition to __GyotoInit. This allows to contain characters not acceptables in function names, e.g. 'python3.4'. commit a6f21548c3dfa027a40b2a76a79f56334365fc0a Author: Thibaut Paumard Date: Wed Jun 17 12:25:00 2015 +0200 Make the python plug-in work with both python2.7 and 3.4 commit cf6a087e6e1e346354ddc6c37b766b843484699e Author: Thibaut Paumard Date: Wed Jun 17 04:17:29 2015 +0200 Add online documentation for Spectrum::Python commit 90a7174cb624e0704cc89a74b423b264c7448555 Author: Thibaut Paumard Date: Wed Jun 17 04:13:03 2015 +0200 Implement thread-safety in the Python plugin commit 5129d29bcf602053cd4ed8d14ad07dad5f7b8bb5 Author: Thibaut Paumard Date: Wed Jun 17 03:38:28 2015 +0200 Use a class instead of a function in Spectrum::Python commit afdea0e15f660c3e007511eeca25052fdfe7cd7d Author: Thibaut Paumard Date: Wed Jun 17 02:06:14 2015 +0200 Initial work on Python plug-in Already allows to write spectra in Python. commit 265339a2c67dfc90bbd2c167f0f9bcce944cb17f Author: Thibaut Paumard Date: Tue Jun 16 14:56:18 2015 +0200 Split INSTALL into specific INSTALL.Gyoto and generic INSTALL commit 597b22bc66564cd6c118d305290cbb2744857db5 Author: Thibaut Paumard Date: Tue Jun 16 13:01:49 2015 +0200 Fix GYOTO_PROPERTY_LONG macro and includes in Utils.C commit f0282ed61db0442d1c16c33b40b2c7b3fccce525 Author: Thibaut Paumard Date: Tue Jun 16 12:48:38 2015 +0200 Simplify setting arbitrary parameters from the command line Object::setParameter(name, content, unit) is made recursive: if name contains "::" (e.g. Astrobj::Spectrum::Temperature), the component before the first occurence of "::" (here, "Astrobj") is interpreted as a path. A property by that name in the curent object is sought. If it is found, setParameter is called on this child object with the remainder of the string (here "Spectrum::Temperature") and the other parameters unchanged (content and unit). On the command-line, replace the bunch of --TYPE-parameter options with a single --parameter option, which applies to the root (Scenery) level and uses this facility to access members in the Astrobj, Screen etc. commit b8766a3a4549e409b42663db881638b66a833223 Author: Thibaut Paumard Date: Mon Jun 15 22:20:04 2015 +0200 Do not interpret empty Mask as current directory in Screen commit 00d3c9a48696f9b63f1dc4550c6d4f4461ad73b0 Author: Thibaut Paumard Date: Mon Jun 15 22:20:04 2015 +0200 Do not interpret empty Mask as current directory in Screen commit 2675d0e1018f976b2c2d2775bfc1a4c5e5017872 Author: Thibaut Paumard Date: Mon Jun 15 22:14:24 2015 +0200 Differentiate as much as possible size_t from unsigned int commit 33c4e6440fa8bdcf580ea95e70da5c9672789a52 Author: Thibaut Paumard Date: Mon Jun 15 20:47:58 2015 +0200 Fix Screen::Subcontractor to parse Mask as a filename commit 98c978d52dc0c9f80a42b9fa5470f6001c2f7c37 Author: Thibaut Paumard Date: Mon Jun 15 20:47:58 2015 +0200 Fix Screen::Subcontractor to parse Mask as a filename commit ce80b25cb2e4683fc9baf6dd6ac9ecb1539f2b1e Author: Thibaut Paumard Date: Mon Jun 15 20:11:42 2015 +0200 Access object help from command line Add Gyoto::help() in Utils.C, expose it from gyoto.C. Document it in manpage. Also document in Yorick. commit 91e3e249a8dd888921f936f85d201f05548f8644 Author: Thibaut Paumard Date: Mon Jun 15 16:36:41 2015 +0200 Accept doc strings for all types of Properties And add help method to all objects in Yorick. commit 7d11c2ed576b3920ae3a86c445ea9dddf91d3376 Author: Thibaut Paumard Date: Mon Jun 15 09:25:12 2015 +0200 Support autodocumentation of properties Add describeProperty and help methods to Object. commit eca21878cacf3dbcb18eedba0ccf22c3d47579a3 Author: Thibaut Paumard Date: Fri Jun 12 17:03:06 2015 +0200 Issue a more usefull progress status (j = n/N) Ratonale: it was weird to have the progress indicate e.g. "128/3... 129/3... 1000/3". Now the count always progess by increment of one over the actual number of columns that will be integrated. Add Screen::Coord1dSet::index() method, display this index instead of raw "j" value. commit 33322681880e01d04449b1e3e0cb8d2070ab310c Author: Thibaut Paumard Date: Fri Jun 12 13:51:20 2015 +0200 Remove KerrKS specific integrator It has never been proven to work, contrary to the generic integrator which behaves very well with either the Legacy or Boost integrators. Remove: * SpecificIntegrator/GenericIntegrator property; * generic_integrator_ data member; * genericIntegrator accessors; * nullifyCoord, MakeCst, myrk4, mrk4_adaptive, diff, setParticleProperties methods. Add: * setParameter method, to filter out SpecificIntegrator/GenericIntegrator and warn when they are used. commit a2288b60a34c86cd97f5d09ddc0837fc45c48d70 Author: Thibaut Paumard Date: Thu Jun 11 16:25:49 2015 +0200 fenv.h functions in the Yorick plug-in * Add more functions to control the floating-point environment from Yorick. * Note in README.SIGFPE to loading a plug-in can change the floating-point environment. * More debugging in Register::init(). commit 02e025b33efdc3c908feb3eedeb40647c2989448 Author: Thibaut Paumard Date: Fri Jun 12 10:56:39 2015 +0200 Fix copyright years for KerrKS commit 32722870c929dc888d1b796fb7f37ee3a1e9774d Author: Thibaut Paumard Date: Fri Jun 12 10:56:39 2015 +0200 Fix copyright years for KerrKS commit 0f60e1b78582c05307dc6a394425b4a6e571c7df Author: Thibaut Paumard Date: Fri Jun 12 10:47:27 2015 +0200 KerrKS is mature Stop inheriting from WIP. This is an ABI-breaking change, only for master for now. commit 33dc967ffbaf0bb5c33e96731ab8ce924f976f77 Author: Thibaut Paumard Date: Fri Jun 12 10:33:36 2015 +0200 KerrKS is not WIP anymore Modify the WIP (work in progress) class constructor to not issue a warning if passed the empty string instead of a class name. Use this facility to stop issuing the warning for KerrKS, which has grown in maturity. This is an ABI-safe change. Next step is to stop inheriting from WIP, but this will break the ABI and is not for the stable branch. The warning when using the specific integrator is now severe. This is the part that really is still buggy in KerrKS. commit 238b83d61030c2f2509039cb59513e89b8c05925 Author: Thibaut Paumard Date: Fri Jun 12 10:33:36 2015 +0200 KerrKS is not WIP anymore Modify the WIP (work in progress) class constructor to not issue a warning if passed the empty string instead of a class name. Use this facility to stop issuing the warning for KerrKS, which has grown in maturity. This is an ABI-safe change. Next step is to stop inheriting from WIP, but this will break the ABI and is not for the stable branch. The warning when using the specific integrator is now severe. This is the part that really is still buggy in KerrKS. commit c5c30a9edc6234c25f3472bb6980c37ca42aaed9 Author: Thibaut Paumard Date: Thu Jun 11 16:25:49 2015 +0200 fenv.h functions in the Yorick plug-in * Add more functions to control the floating-point environment from Yorick. * Note in README.SIGFPE to loading a plug-in can change the floating-point environment. * More debugging in Register::init(). commit 0e2ef8c237ff80574e9631326f2f80f42f7709ca Author: Frederic Date: Wed Jun 10 16:08:57 2015 +0200 PolishDoughnut: Adding central_temperature_ parameter commit 17cc24485252ccef252fd6eefa9b6e5fce89d6d1 Author: Thibaut Paumard Date: Wed Jun 10 13:50:35 2015 +0200 Fix build failure when not using fenv.h commit 6cdf9242e25263e9232d7bba8680980372e17597 Author: Thibaut Paumard Date: Wed Jun 10 12:07:18 2015 +0200 Fix warnings (incl. undefined behavior) and some optimization * pass 'make CPPFLAGS="-Wall -Werror -DGYOTO_NO_DEPRECATED \ -Wno-error=literal-suffix -Wno-error=unknown-pragmas"' * some code optimization in NumericalMetricLorene commit 3fd7a08f6d2a22f996317ef14399ed4b989216fc Author: Thibaut Paumard Date: Tue Jun 9 17:32:06 2015 +0200 Update documentation and test suite + update manpage and gyoto -h + update test suite to use short options and mpirun + update copyright statement in binary commit c62b5619bc7693123ccb87c2032ec7855174bd87 Author: Thibaut Paumard Date: Tue Jun 9 12:15:54 2015 +0200 Add and/or document parameters to gyoto utility --ispec, --jspec, --astrobj|metric|scenery|screen|spectrometer-parameter, --unit, --xmlwrite commit e5dae98b13fae0b1b71ecdfbd792a5fc6713759d Author: Thibaut Paumard Date: Tue Jun 9 12:15:54 2015 +0200 Add and/or document parameters to gyoto utility --ispec, --jspec, --astrobj|metric|scenery|screen|spectrometer-parameter, --unit, --xmlwrite commit 08ca7552f739f28a4460b710661b34ca20763eb6 Author: Thibaut Paumard Date: Tue Jun 9 01:57:12 2015 +0200 Rewrite gyoto.C option parsing using optionparser.h. commit 913c7ddc07097712fbb15e7e78cf2dbcfce15518 Author: Thibaut Paumard Date: Mon Jun 8 16:34:28 2015 +0200 Document --no-sigfpe in manpage; update synopsys in usage() in bin/gyoto.C commit e188a2624a2444d796d01214686c10a70c0286a6 Author: Thibaut Paumard Date: Tue Jun 9 01:57:12 2015 +0200 Rewrite gyoto.C option parsing using optionparser.h. commit 5097acfeeec1282cf07de1211c0dcfddc988915c Author: Thibaut Paumard Date: Mon Jun 8 16:34:28 2015 +0200 Document --no-sigfpe in manpage; update synopsys in usage() in bin/gyoto.C commit 62b4bb62aa0b94b92d31841839d6c6a0cc736605 Author: Frederic Date: Mon Jun 8 16:26:32 2015 +0200 NML.C: changed computation of Keplerian angular momentum. Doughnut: adding definition of rcusp and rintorus for all cases. commit efc0f53daf24b88c8c76c1690aaefeb7ed6c2dac Author: Thibaut Paumard Date: Mon Jun 8 14:57:50 2015 +0200 Fix spurious SIGFPE + initialize all members of Value instances do avoid bad (NAN) random values; + hold FP exceptions when makeing boost stepper as make_controlled can raise. commit 7ce95331587e2951d202fa2cb1baf6ae1a3d735a Author: Thibaut Paumard Date: Mon Jun 8 14:57:50 2015 +0200 Fix spurious SIGFPE + initialize all members of Value instances do avoid bad (NAN) random values; + hold FP exceptions when makeing boost stepper as make_controlled can raise. commit d069bb5d5ab279608a5a646568c7200fe4330937 Author: Thibaut Paumard Date: Fri Jun 5 16:04:58 2015 +0200 Fix GYOTO_PROPERTY_SIZE_T to work on 32-bit architectures. On 32 bit system, size_t and unsigned double are identical but distinct types. commit 4015547ad848caa33dfbf60fa1781e485a811902 Author: Thibaut Paumard Date: Fri Jun 5 16:04:58 2015 +0200 Fix GYOTO_PROPERTY_SIZE_T to work on 32-bit architectures. On 32 bit system, size_t and unsigned double are identical but distinct types. commit a5a1ae7165e010e7cec820f974f739706d977ecc Author: Thibaut Paumard Date: Tue Jun 2 15:03:56 2015 +0200 fenv.h support: by default, enable SIGFPE exceptions. Provide mechanisms to disable it. See README.SIGFPE. commit af37c64da82edf5c43c356728372eed9b14e16b2 Author: Thibaut Paumard Date: Tue Jun 2 15:03:56 2015 +0200 fenv.h support: by default, enable SIGFPE exceptions. Provide mechanisms to disable it. See README.SIGFPE. commit cad7c2040d5d80d9fd98d1011c8fb614c6a8881f Author: Thibaut Paumard Date: Mon Jun 1 12:06:21 2015 +0200 Discourage compiling with clang in INSTALL. commit cbcdffb2048ce9a2f78718c7c9b2d69c1ef096df Author: Thibaut Paumard Date: Fri May 29 13:01:43 2015 +0200 Small improvements triggered by clang warnings commit 3cb08ede61007eeacaa057dca76589dadc7dc8da Author: Thibaut Paumard Date: Wed May 27 16:19:00 2015 +0200 Remove unconditional throwError from GyotoScreen.h commit faae244af48a65782123b0034389aca1ec79f439 Author: Thibaut Paumard Date: Wed May 27 11:34:02 2015 +0200 Releasing 1.0.1 (1984 release) + add Odele to AUTHORS + update NEWS, ChangeLog and configure*. commit 2292f1d74eaa9968ea9ec64bd00fdc150d8fe8b1 Author: Thibaut Paumard Date: Wed May 27 11:17:14 2015 +0200 Simplify python detection and add --without-python to make it possible to build Gyoto when python is installed but with wrong version. commit 041c5fc40ee736afb183d693d93bca3b5fcdc1d5 Author: Thibaut Paumard Date: Wed May 27 10:06:52 2015 +0200 python/doxy2swig.py: add 3rd clause of BSD license per request of original author commit 21dba0161760650512abd8507cfcfa7be27b5e22 Author: Thibaut Paumard Date: Wed May 27 08:45:11 2015 +0200 Fix (bin|lib)/Makefile.am to use BOOST_*_LIBS instead of hardcoding the library name. This allows compiling with MPI support under at least macports. commit 27fc03fe981bbcd3e6f919120a6b43bc6fc62a62 Author: Thibaut Paumard Date: Mon May 25 17:06:24 2015 +0200 Releasing 1.0.0 (Youhou!) + add a note about --enable-release in README + add README.Developers to remember how to make a release... + update NEWS, ChangeLog and configure.ac. commit aa035f96465a0a45dd910de47281e7652dffb44e Author: Thibaut Paumard Date: Mon May 25 15:46:10 2015 +0200 * Update python/numpy.i * Put BSD license in python/doxyfile.py * Update copyright notice in every file edited in 2015 commit ca1979527bb018d77ad40cc9749b27e8d9bd4148 Author: Thibaut Paumard Date: Sun May 24 10:23:25 2015 +0200 Clean *CFLAGS and *LDFLAGS and link always with CFITSIO which is now needed by Screen commit 603f961fba9a796cf57bd7427cdd7b504db93e3e Author: Thibaut Paumard Date: Sat May 23 13:56:25 2015 +0200 Don't .gitignore all gyoto files commit 1f40e4053f01633839dbdb6b74b3e806663fbded Author: Thibaut Paumard Date: Sat May 23 13:50:16 2015 +0200 fix spelling errors commit 752026d3bc4d4bd5c4fdf3e74c2e6c6d8170d887 Author: Thibaut Paumard Date: Sat May 23 09:31:29 2015 +0200 * clean leftover files from doxygen * use pkglibdir instead of asuming it is prefix/lib/yorick commit 11c4faa047b9eb172281c62ff366e9bf741d0831 Author: Thibaut Paumard Date: Fri May 22 12:07:06 2015 +0200 Fix Disk3D::repeatPhi() to avoid SIGFPE when nphi_ is 0 commit d50df30e31cf0c89eb51744564f145859f6b280e Author: Thibaut Paumard Date: Fri May 22 11:50:34 2015 +0200 fixup polishdoughnut warnings commit 3339bf7115e2b9769fa05bd18fd0be6b702c7d8e Author: Thibaut Paumard Date: Fri May 22 11:42:48 2015 +0200 Fix PolishDoughnut to export either Lambda or AngMomRinner to XML, but not both. commit 56a4548398a87c01e34893ed38426a8b13ff7bf9 Author: Frederic Date: Thu May 7 15:06:56 2015 +0200 PolishDOughnut: few couts forgotten commit e8ddcf706e7f80481bcf017ca356940ab86dd5b2 Author: Frederic Date: Thu May 7 15:05:09 2015 +0200 NML: adding the rico() Property read by Polish Doughnut commit 4c47e67456caafb80fff8489f639c563d352cbfa Author: Frederic Date: Thu May 7 11:53:49 2015 +0200 PolishDoughnut: adding a test such that lamnda and angmomrinner can't be defined together commit 9127af4e64a6f9296c437621a14a130d3cfd29cc Author: Frederic Date: Thu May 7 10:42:26 2015 +0200 NML: hopefully correct expression for 4D christoffels from 3+1 quantities commit 3d2021646a177981e737c8b1777ae52633f30423 Author: Frederic Date: Thu May 7 10:35:00 2015 +0200 PolishDoughnut: adding the possibility to define a doughnut by specifying the angular momentum and inner radius, so no longer limited to Roche-lobe-filling tori. commit 8efb25243c99776ed1cd49777385d20b69cf69e9 Author: Thibaut Paumard Date: Wed Apr 8 08:00:08 2015 +0200 yorick: fix bug bug in dimension calculation of impactcoords when addressing sceneray with angles commit 70b36cea4a91b1bed1f582f28312fb096d7c6112 Author: Thibaut Paumard Date: Fri Mar 27 16:53:24 2015 +0100 fixup commit c764b58ed8e4b55c4172d03080e8a3fbac43b647 Author: Thibaut Paumard Date: Fri Mar 27 16:49:37 2015 +0100 Be more specific about which part of Boost is needed in each file (we use boost::array, Boost.multiprecision, Boost.odeint, Boost.mpi) commit 17aca8b349c38a4e5ef2355422feadd781414c63 Author: Thibaut Paumard Date: Fri Mar 27 12:45:42 2015 +0100 Improve Boost.mpi detection. Slightly tuned to ObsPM cluster... commit b7511de0edd86a6c6596465673a757d1df6e253d Author: Thibaut Paumard Date: Thu Mar 26 18:16:10 2015 +0100 Fix Boost.mpi detection commit 26c95ca9f32dfb5c4627203e470c571a17000fa8 Author: Thibaut Paumard Date: Thu Mar 26 12:39:30 2015 +0100 Change impactcoords to always return the first (backwards) encounter with the object commit cba8e4e56314432dee6e0ea1a6fbc1a4fccb9dd4 Author: Thibaut Paumard Date: Wed Mar 18 13:17:12 2015 +0100 Scenery: add updatePhoton and clonePhoton(i, j) APIs to get Photon with all tuning parameters from the Scenery Photon: fix findMin to work also when time is too large commit a3b908914d273f7effb527e0f71c5d0a83fda0e3 Author: Thibaut Paumard Date: Wed Feb 18 10:28:58 2015 +0100 Fix sunradius unit, which was set to 1 meter commit 6d80547e5b7f145afddfae05bd3df3bc5b238735 Author: Thibaut Paumard Date: Tue Feb 17 16:40:10 2015 +0100 * Expose MinimumTime as a property in Worldline; * yorick: + support setting Properties in the generic way for Photon; + support setting Properties of object kind (Astrobj, Metric)... to 0. * gyotoy: make gyotoy_warning an alias to error (it was undefined). commit b79baab9367f5951d3e433bc4304cc095a3a940a Author: Frederic Date: Thu Jan 29 11:51:11 2015 +0100 NML.C: adding boson star circular velocity commit 3e45810d24fc4b3f9212d9e34b51c0bc500286b2 Author: Frederic Date: Wed Jan 21 16:44:18 2015 +0100 Adding the Disk3D to yorick test suit commit 650fe87d89e4a14a745c413683b84fe31e403d9f Author: Frederic Date: Wed Jan 21 16:24:27 2015 +0100 DynaDisk3D: adding File Property commit be07f7f26c39a452120103924f5a17f976c324c5 Author: Frederic Date: Mon Jan 19 18:12:47 2015 +0100 NumericalMetricLorene: adding 4D Christoffels commit 4783d49d394efad393ee3ffe75c2dea7e70c8384 Author: Frederic Date: Mon Jan 19 18:11:13 2015 +0100 ThinDisk: adding a trivial constant emission for simple visualization commit 5ea26ab877df2421529b5a571c4eb06fa1a99d48 Author: Thibaut Paumard Date: Thu Jan 15 11:47:20 2015 +0100 configure: look for swig3.0 as alternative for SWIG commit b3d3a31520cd9dc00d7638384ce15377c261b635 Author: Thibaut Paumard Date: Wed Jan 14 19:31:14 2015 +0100 Puthon: small adjustments (incl. ignore Photon::Refined) to compile with Swig 3.0 commit ca3d163e0780d3ad171d51ed37d07fa770fbf230 Author: Thibaut Paumard Date: Wed Jan 14 16:05:13 2015 +0100 Python: make Swig interface file language agnostic (by including NumPy lines only conditionaly) commit 42c4e894b6e7ba2d0c5f0f5a97651edab62eae69 Author: Thibaut Paumard Date: Wed Jan 14 15:52:58 2015 +0100 + Gyoto::Value: make operator bool deal with long_t and unsigned_long_t + Python: make %typemap(in) Gyoto::Value target-language-agnostic commit da505ec0da17ad3dc8507dca3261819ed1d6c74d Author: Thibaut Paumard Date: Wed Jan 14 12:52:05 2015 +0100 + Add Gyoto::Object::get/set(std::string const &property_name ...) + Gyoto::Value::operator [unsigned] long() work also if the other type of long was set + Python: * bugfix: avoid segfault when outputting a NULL SmartPointer; * new typemaps around Gyoto::Value commit 8f8a3aa5a61663848e19b8067b574a222fba52f0 Author: Thibaut Paumard Date: Tue Jan 13 13:16:44 2015 +0100 Python: make swig file a little less dependent on python commit 9832ccbf6af0d53a050ff0b9cac8cdcce458c2cd Author: Thibaut Paumard Date: Mon Jan 12 15:05:57 2015 +0100 Python: support building without boost commit e8642a125992918c08ed1569eb6fc83a16b65bc2 Author: Thibaut Paumard Date: Mon Jan 12 13:44:16 2015 +0100 Python: support out-of-tree builds commit 1cf513c3acb4a2df3b83644f08f5e3079295a186 Author: Thibaut Paumard Date: Mon Jan 12 10:59:15 2015 +0100 Python: patch gyoto_doc.i doc accomodate for renamed nested classed in Screen commit b75734f061eed2241b952e0708e0715b3b33ff6a Author: Thibaut Paumard Date: Sat Jan 10 22:42:26 2015 +0100 Python: expose GYOTO_ARRAY::operator[]() commit ad176cbeb4fea6d6079c879c6eebbaa58264955c Author: Thibaut Paumard Date: Sat Jan 10 15:20:00 2015 +0100 Python: support NumPy arrays *in addition* to low level C arrays in Coord1dSets Indices and Angles commit edeec3e193af94c5b948ce93d878022d7d01992b Author: Thibaut Paumard Date: Fri Jan 9 15:19:35 2015 +0100 Provide casting from NumPy ndarray to gyoto.array_double. All Gyoto methods take the latter as argument. commit 608982f15f0bbb2aecb91be51259c143ed6c6778 Author: Thibaut Paumard Date: Fri Jan 9 11:17:02 2015 +0100 Add typemaps for Worldline::IntegState, Astrobj::Properties and SmartPointee commit 1f85f55834b543671e4f8bb6ef41d26385951ac5 Author: Thibaut Paumard Date: Fri Jan 9 10:44:02 2015 +0100 Python: correctly support Gyoto::Quantity_t as a integer type commit aa91388eef6c4f7b0d6d77bb9f85232fec356ba8 Author: Thibaut Paumard Date: Thu Jan 8 14:43:48 2015 +0100 Add python/example-mpi.py showing how to use MPI commit 66a26bb1cf3c26f836ca98b940e7cf2bedb21dfe Author: Thibaut Paumard Date: Thu Jan 8 13:53:38 2015 +0100 Document Python extension in the user guide commit 30f655752a852dfeb6a92c4f4d3a7c98635bc535 Author: Thibaut Paumard Date: Wed Jan 7 19:58:07 2015 +0100 Python: Expose Gyoto::Property (ignore constructors) commit 3dcf970c10046d2302b90af217f8f3d0ffd4e939 Author: Thibaut Paumard Date: Wed Jan 7 17:40:19 2015 +0100 Python: + don't ignore any class (only constructors for abstract classes and some other methods) + work around a swig bug that makes "help()" fail + expose the Unit and Converters system commit 1c495fdf30f3cd973b86d8bf58c8c36feb520a88 Author: Thibaut Paumard Date: Wed Jan 7 14:47:54 2015 +0100 small tweaks in Python build-system commit e8ba9a5ebfdd7b2987213d5c468dd8e024135d2d Author: Thibaut Paumard Date: Wed Jan 7 14:01:05 2015 +0100 Python: expose normal pointers (with reference counting) rather than SmartPointers. commit afcfaef4bd1ac997186522cacbda5766d0981e7c Author: Thibaut Paumard Date: Mon Jan 5 18:07:00 2015 +0100 Check for Swig in configure, fix glitches so python extension compiles under MacOS (w/ macports) commit c84d32b4eab3d3c1a721218cd5a8329cfcd3400a Author: Thibaut Paumard Date: Mon Jan 5 15:51:45 2015 +0100 Minor fixes in Python docstring generation commit 46e73509da11e0f0ac1b52970689773ce186b4ed Author: Thibaut Paumard Date: Mon Jan 5 15:26:56 2015 +0100 Use doxygen to provide docstrings in the python bindings (based on doxy2swig) commit 78b9c99ea2c79f54a3bd045c2d9c77845ba7a959 Author: Thibaut Paumard Date: Mon Jan 5 09:56:46 2015 +0100 Install enough material to build python extensions around 3rd party Gyoto plugins commit 97601b0c1e2be46355a41c1e49fad0a7ae4bd4d7 Author: Thibaut Paumard Date: Tue Dec 30 09:18:22 2014 +0100 Add python/setup_lorene.py.in commit 8557a8fa22832152f0e70629bfada1945f38d440 Author: Thibaut Paumard Date: Mon Dec 29 12:39:44 2014 +0100 * Value: make sure only the member that was set can be retrieved. * Python: rename Properties to AstrobjProperties commit 333a61c9fc961ddf5888c701bbcda585b9f71c69 Author: Thibaut Paumard Date: Sun Dec 28 17:26:14 2014 +0100 Screen::Coord1D/2DSet destructor is now public virtual commit 4d8dd3151d84c5ee8def7c6fdc7703bf7d8f891e Author: Thibaut Paumard Date: Sun Dec 28 16:14:28 2014 +0100 + include/GyotoWorldline.h: remove prototypes for operators that were never implemented + python/: fix warnings about unkown base classes and cast operators commit 6c31bc7424062db02573da7b0f4273f95ccb9eaa Author: Thibaut Paumard Date: Sun Dec 21 20:37:50 2014 +0100 Fix operator[] to return reference in (Astrobj|Spectrometer)::Complex, use it to implemet r/w item access in Python commit e45e108aa696ba959b02af937c660437a179d5b0 Author: Thibaut Paumard Date: Sun Dec 21 16:23:39 2014 +0100 Support getting/setting element in Astrobj::Complex, including in python commit 80974d03b5a251bdb6730ce28b38469fec484f30 Author: Thibaut Paumard Date: Sun Dec 21 10:21:36 2014 +0100 Python: ignore SmartPointer::operator() to give access to T::operator() commit 1b064a9fcd21e588ead7e4f7860c72695bdab375 Author: Thibaut Paumard Date: Sat Dec 20 22:39:04 2014 +0100 Remove NumericalMetricLorene::getFileName(); complete gyoto_lorene Python extension. commit fe94dbfb9fdc278eeabed0f2e978216c55302cfd Author: Thibaut Paumard Date: Fri Dec 19 20:20:19 2014 +0100 Oups, commit gyoto_lorene.i commit 618076c72c47251ca62c2735c6ab9021e3aec754 Author: Thibaut Paumard Date: Fri Dec 19 20:18:10 2014 +0100 Python: new extension gyoto_loren (wraps only RotStar3_1 so far) commit b9f6e31e39057fcf175b112e19f79f7676b70001 Author: Thibaut Paumard Date: Fri Dec 19 16:18:37 2014 +0100 Python: add second python extension, gyoto_std, wrapping libgyoto-stdplug commit f104a3bf96f73c4ee1fb8fa15f24a931b0962b67 Author: Thibaut Paumard Date: Fri Dec 19 13:18:19 2014 +0100 Fix Screen::Bucket::Bucket to work with pixel-type Coord2dSets; more Python examples commit 478041e13458fa968d0cb964ce071dce44052c81 Author: Thibaut Paumard Date: Thu Dec 18 22:04:30 2014 +0100 Python: add some doc; examplify ray-tracing with Spectrum commit 0f27551c51a02fffebc3a4dfa3d4030bde9941f6 Author: Thibaut Paumard Date: Thu Dec 18 17:34:55 2014 +0100 Add Python example, revert spurious changes in Screen (some unconditional debug output) commit ca66c51021487fd1e7ccf39a0f09ec1a3451dd18 Author: Thibaut Paumard Date: Thu Dec 18 17:31:35 2014 +0100 Document Python interface in INSTALL commit aa5b211a11b3729bee63f39512757faa69a16108 Author: Thibaut Paumard Date: Thu Dec 18 17:20:37 2014 +0100 Python: catch Gyoto exceptions correctly commit 417b5c3e64dea8afac0ff0188b51377b0feec897 Author: Thibaut Paumard Date: Thu Dec 18 16:58:58 2014 +0100 Python: hide base classes, make "Class" a sucontractor for that class commit e35255bf64a9fa8f30838826cca3419105c8b2d5 Author: Thibaut Paumard Date: Thu Dec 18 13:15:22 2014 +0100 Python: basic (but sufficient) support for tracing intidivual geodesics commit 506d66f6aa45e3c129cc9893f700d08cec9408af Author: Thibaut Paumard Date: Wed Dec 17 19:45:08 2014 +0100 Python: set flags for dlopen in gyoto.py; wrap all Astrobj::Properties members. commit 455b96296e7974e0879c69fda662dd1c870dad8c Author: Thibaut Paumard Date: Wed Dec 17 17:10:51 2014 +0100 Build system for the Python extension commit fdde55aebd59b2011082e9ecbd36a3b1c63901ca Author: Thibaut Paumard Date: Wed Dec 17 12:52:13 2014 +0100 Python: fix Scenery interface so ray-tracing is possible. Implement a way to connect a buffer to Astrobj::intensity. commit 3f2426ba0cb206a36d2c030e46215653986cd993 Author: Thibaut Paumard Date: Tue Dec 16 18:08:23 2014 +0100 Initial attempt at Python interface commit 24a436d4ed82043a588489aab75da41416df1041 Author: Thibaut Paumard Date: Mon Dec 15 15:22:25 2014 +0100 + Bugfix: fix Star::rMax() to not SIGFPE and to compute the right thing. + Bugfix: v=Worldine::initCoord(): make sure v[4] is 0 if initial coordinate was not set. commit 6a9859c7668a51a0cf8714dbdc46888a6659b665 Author: Thibaut Paumard Date: Mon Dec 15 11:54:34 2014 +0100 Fix Scenery to ccompile correctly with --without-udunits commit 57e2d588adc6dfc0f44be8d28edacd14a2a00be2 Author: Thibaut Paumard Date: Fri Dec 12 14:48:03 2014 +0100 Yorick: support setting/getting Properties with the eval operator in all object types. commit cc2c3fdfae3cbc6ecf8d0e08b4ec43d15710c5e6 Author: Thibaut Paumard Date: Fri Dec 12 14:23:38 2014 +0100 Yorick: parse Properties in eval, only for Scenery. commit c82d2af0a41698357c4579d618560d3efb51363d Author: Thibaut Paumard Date: Thu Dec 11 22:13:34 2014 +0100 UniformSphere::deltaMax(pos): don't use operator() if pos is outside rmax_, as this can lead to extremely lon integration in case of moving Star commit 5be938b22ea54e0c8405a0ce98e110cde922ca5b Author: Frederic Date: Thu Dec 11 19:25:00 2014 +0100 Adding 3+1 metric functions necessary for PolishDoughnut commit 0f553cc2e466d78a7b2cfcb9753ef8003848b38c Author: Thibaut Paumard Date: Thu Dec 11 12:59:05 2014 +0100 More macros in Object a, Property to easily declare and define accessors. commit 4900995e52f403f006a1b88fb386e233e330ca61 Author: Thibaut Paumard Date: Wed Dec 10 16:49:42 2014 +0100 ThinDiskIronLine: don't assume coordinate system is spherical commit fb57a49ada9b85019e08a18623d76d237e28b276 Author: Thibaut Paumard Date: Wed Dec 10 16:43:18 2014 +0100 ThinDiskIronLine: Fix bug in LineFreq conversion, support unit in LineFreq and CutRadius commit 478139baf50b295eeb6265673b2c3496c82ef725 Author: Thibaut Paumard Date: Wed Dec 10 15:33:10 2014 +0100 New Property type: vector Documentation in Worldline commit fb5078b9c3c295ac72c0b1e5c76962cb269489ec Author: Thibaut Paumard Date: Tue Dec 9 17:43:19 2014 +0100 document Property and Value commit bca056121fdfa7d741fa2ef84fc8a61c1c63dda8 Author: Thibaut Paumard Date: Tue Dec 9 14:27:56 2014 +0100 Document Object class commit 4cd3a4069075c18cc440b50617c946487feadd68 Author: Thibaut Paumard Date: Tue Dec 9 11:04:16 2014 +0100 Finish converting Scenery to Object/Property commit 59c4103f87cb6e920b90ada84fa4047c9f1b8a9b Author: Thibaut Paumard Date: Mon Dec 8 10:28:18 2014 +0100 Start converting Scenery to Object/Property commit 20149de74409aa429cf07f4ba9090224ad796f43 Author: Thibaut Paumard Date: Mon Dec 8 10:13:39 2014 +0100 Object and Factory: don't create SmartPointer sections if NULL commit 8d94ccd9491ad00037c3353045675a9f704d856d Author: Thibaut Paumard Date: Sun Dec 7 18:21:06 2014 +0100 Implement Astrobj, Spectrometer and Screen as possible Value and Property. Finish converting Screen. commit 932197f354913c2b0dd27dc5208c09adbd8ec5d9 Author: Thibaut Paumard Date: Fri Dec 5 22:30:52 2014 +0100 Convert Screen to Object/Property (spectrometer remains to be done) commit 4876907c001532a7a6a2685800fc47de8d94f42e Author: Thibaut Paumard Date: Fri Dec 5 17:01:34 2014 +0100 Convert Spectrommeter::Generic and ::Uniform to Object/Property; rename Spectrometer::Generic::kind_ to kindid_; remove kind_ from Spectrum::Generic commit 6de673c39658f27fa04f75aaf53d3e185b600119 Author: Frederic Date: Fri Dec 5 15:02:40 2014 +0100 Typos in user guide commit 6abd4422798979f5474faa5524ceb4fbb800d9ee Author: Thibaut Paumard Date: Thu Dec 4 18:09:44 2014 +0100 Convert all Spectra to Object/Property commit 7a3e7857c06a6532e02895c49559016c20dfa0a7 Author: Thibaut Paumard Date: Wed Dec 3 17:04:33 2014 +0100 Convert all the remaining Astrobj classes to Object/Property mechanism commit 116d62889340f0a067f7479ce82b524b9f501aa1 Author: Thibaut Paumard Date: Tue Dec 2 15:29:50 2014 +0100 Fix bug in WorldLineIntegState, which failed to update gg_ in init() commit f3e9aef11264e4c141a05aba8acc9fb4284ccc75 Author: Thibaut Paumard Date: Tue Dec 2 15:19:23 2014 +0100 Use strtoul and strtol instead of atoi when parsing longs/unsigned longs from XML commit 020d8486c265ef169bee8d0ddaf836d22a367141 Author: Thibaut Paumard Date: Tue Dec 2 12:20:16 2014 +0100 Change Object/Property API to use arrays (with "links") rather than chained lists. Much easier to understand and to read. commit 9e0d71b4eea1926d72573245caff6999ca5d5d75 Author: Thibaut Paumard Date: Mon Dec 1 11:29:46 2014 +0100 Move Object API out of Worldline and into Star and Photon commit 3dfa0fd17208be7f95947062271ac9148763b3d1 Author: Thibaut Paumard Date: Fri Nov 28 14:57:14 2014 +0100 * Make SmartPointee not and Object, but most of its descendents. * New Value/Property type: unsigned long * Convert Worldline to Object/Property commit a3c32d0cff9cadcadf4adf97cc972dd1664a13ba Author: Thibaut Paumard Date: Thu Nov 27 21:09:12 2014 +0100 Convert Torus to Object/Property commit e843260a99b0863c828064383bb451a1836cb057 Author: Thibaut Paumard Date: Thu Nov 27 19:50:28 2014 +0100 Convert FixedStar to Object/Property commit f5659d915d3f4b462b286dbe4b24cfe2109a517c Author: Thibaut Paumard Date: Thu Nov 27 18:42:00 2014 +0100 * New Value/Property type: spectrum; * Converted UniformSphere to Object/Property metaphor commit d7912a1152d7d265381829e78a8f996f62912631 Author: Thibaut Paumard Date: Thu Nov 27 17:21:39 2014 +0100 Split GyotoObject.h and Object.C in Object, Property and Value; Move Gyoto::Property::Value to Gyoto::Value; Add Metric member to Gyoto::Value; Make metric a Property in Astrobj::Generic. commit 30a2278267e2130611faee81126582a0a3eaef1a Author: Thibaut Paumard Date: Thu Nov 27 12:05:00 2014 +0100 Simplify introspection code by using new class Property::Value commit c307c5caea29a9d21575157020ce6967fa0d0016 Author: Thibaut Paumard Date: Thu Nov 27 09:33:41 2014 +0100 Convert Astrobj::Standard to Object/Property (safetyValue) commit a6130803e3155ea5e6f28db86a0b14d84f96063c Author: Thibaut Paumard Date: Thu Nov 27 09:19:37 2014 +0100 Rename GYOTO_PROPERTY to GYOTO_OBJECT, change GYOTO_PROPERTY_FINALIZE to accept a Property* rather than a Property commit a8b849a195f85546a6179d891de7d55de7e580a6 Author: Thibaut Paumard Date: Wed Nov 26 23:09:50 2014 +0100 Bug fix in Photon::hit(), where Astrobj::Generic::Impact() was called with bogus indices commit 714d24bb9bbb90be2e875be2c9b3579654564ce0 Author: Thibaut Paumard Date: Wed Nov 26 23:02:51 2014 +0100 Convert Astrobj::Generic to Object/Property paradigm commit f4996d72f9cc03a1ab27fa6b4d6108ad246348de Author: Thibaut Paumard Date: Wed Nov 26 16:11:34 2014 +0100 New Property type: std::vector (used in NumericalMetricLorene) commit 3ab767866961fcbd5f54f304bfa057da4f26422e Author: Thibaut Paumard Date: Wed Nov 26 14:58:49 2014 +0100 Convert most of NumericalMetricLorene to the Object/Property paradigm. commit 8b7cb7e5c7b290e999abf67cbb3299ad7dd976ec Author: Thibaut Paumard Date: Wed Nov 26 09:21:40 2014 +0100 yorick: don't use a wrpper called "yorick", this confuses the build system (use yorick1 instead) commit d42c33c4bb514ecffa7816f9de62bf0fec5f94a6 Author: Thibaut Paumard Date: Tue Nov 25 17:59:43 2014 +0100 support string and filename Property types in Yorick commit e5ed94416615058394c582c560f426c611c3a688 Author: Thibaut Paumard Date: Tue Nov 25 17:44:50 2014 +0100 Add new Property types string_t and filename_t, convert KerrKS, Minkowski and RotStar3_1 to Property-based objects commit b1f25ac8408bd7c7e4acfa8b038f13c9b96fffb8 Author: Thibaut Paumard Date: Tue Nov 25 15:13:05 2014 +0100 Implmented Properties in KerrBL and Yorick commit ea26db033dfbf301f11d217ba0fb8fd62bb91d6a Author: Thibaut Paumard Date: Tue Nov 25 09:16:54 2014 +0100 Start working on introspection framework: new classes 'Object' and 'Property', properties can be set and retrieved by name. Metric::Generic converted to this framework. commit 6f7f809a06a58b304d99decacd62d5c2570949c3 Author: Thibaut Paumard Date: Fri Nov 21 14:50:11 2014 +0100 Use the integrator set in state_ when refining geodesic in Worldline::getCoord() commit ea6cb0c53cd95fed2d0421d4fdd4a83b12c7a98e Author: Thibaut Paumard Date: Fri Nov 21 11:49:41 2014 +0100 make fullPath able to interpret `pwd`/ commit 2b88bd410a3cde049512099854c270123675e2bd Author: Thibaut Paumard Date: Thu Nov 20 21:36:31 2014 +0100 remove KerrBL gg_ from PolishDoughnut commit 72e87b0e4d6c64eef8ff2826237f6c6aa7490ddf Author: Frederic Date: Thu Nov 20 17:44:07 2014 +0100 PolishDoughnut is no longer KerrBL-dependent (1) commit 0f1fc51888fbc968d5fa270224fec8ac12af840f Author: Thibaut Paumard Date: Thu Nov 20 17:19:50 2014 +0100 Distribute our own yorick/Makepkg. Out-of-tree builds uninstall is buggy in the Yorick-distributed version. commit 232eab11b9f82f29503fd548540124160bc0f155 Author: Thibaut Paumard Date: Thu Nov 20 12:55:08 2014 +0100 out-of-tree builds: 'make', 'make check', 'make check-mpi' and 'make install' all work. commit e0b58d5f40e97ee6eee1e4d6708dd232c3561a0c Author: Thibaut Paumard Date: Wed Nov 19 17:26:34 2014 +0100 implement 'make check-lorene' and 'make check-lorene-mpi' commit af0810339362462079fd66339aaca2509692b2ba Author: Thibaut Paumard Date: Wed Nov 19 16:04:47 2014 +0100 First step into checking lorene in make check commit ad1ba1329fc6174c3d5584613afa635783e3b6ad Author: Thibaut Paumard Date: Wed Nov 19 15:07:36 2014 +0100 yorick/gyoto.i: fix gyoto_painters_panorama_eval() for partial panoramas commit 9fd5a3941bd862652f93642809e9dba2dbe9a5f8 Author: Thibaut Paumard Date: Wed Nov 19 14:53:19 2014 +0100 Screen::fitsReadMask(): if file can't be openned, just issue a warning. commit bc4190910c8c2f8e6222a06c9672580d2e1da5ce Author: Thibaut Paumard Date: Wed Nov 19 14:43:31 2014 +0100 Separate MPI tests in 'make check-mpi' to avoid hanging the computer when not plugged to the network commit 2dbcf363aa2ea2487e1ca538ffeacad4a9d1a2db Author: Thibaut Paumard Date: Tue Nov 18 18:14:42 2014 +0100 Remove spurious cerr introduced in development; streamline debug output commit ead9bccc7b5b1bcd21ef8741b94295c801927be3 Author: Thibaut Paumard Date: Tue Nov 18 17:49:44 2014 +0100 Write up NumericalMetricLorene::fillElement() commit 6946b14a1c645ec324efd2276c8df1769e72feb5 Author: Thibaut Paumard Date: Tue Nov 18 16:25:15 2014 +0100 Put MPICXX in gyoto.pc, only if HAVE_MPI. Also update autoconf-generated stuff. commit 40cf1c2b9b65942fafa02259209aa92d29c2791b Author: Thibaut Paumard Date: Tue Nov 18 15:38:23 2014 +0100 New API: FactoryMessenger::parseArray(). Use it instead of direct calls to strtod everywhere. commit 12ac38e0093a24e14728883dc9a5f40bae11f03d Author: Frederic Date: Fri Nov 7 17:48:14 2014 +0100 Small error in ThermalBrems commit f1d40ddc477ee70270914e442475a34711b16882 Author: Frederic Date: Fri Nov 7 17:33:04 2014 +0100 Updating ThermalBrems commit 579960ae455c568a1678325a02198b7c8f478ebb Author: Frederic Date: Fri Nov 7 13:32:32 2014 +0100 Adding Thermal Bremsstrahlung spectrum commit 409df1d00db643a9b9c0bd9aa7bad3ef33c313f3 Author: Thibaut Paumard Date: Thu Nov 6 17:17:01 2014 +0100 Changed the anglekind API and "Rectilinear" option, better suited for photo-realistic ray-tracing. commit b708cf11be0d6bcf76d356ac824a90bb3e87a7d9 Author: Thibaut Paumard Date: Tue Nov 4 19:32:01 2014 +0100 exchange pitch and roll in gyoto_matte_paint commit 185edcb99782a5ed0138a3ca4a53966245403a8f Author: Thibaut Paumard Date: Tue Nov 4 18:35:04 2014 +0100 put most of the matte_painting machinery in gyoto.i commit d0d9f0540ffe7af9ff98d415e83d206169e04543 Author: Thibaut Paumard Date: Sat Nov 1 18:14:52 2014 +0100 yorick: new example script "matte-painting.i" commit eb6b70cec3421fdb47bafcc6ddd83f7a3027070e Author: Thibaut Paumard Date: Sat Nov 1 17:56:55 2014 +0100 yorick: expose Metric::coordKind() commit 72464f30fe3113a3f187e675e7a71bfa30113e5b Author: Thibaut Paumard Date: Sat Nov 1 17:51:46 2014 +0100 Only call setParameters in template subcontractors if fmp in not NULL commit c355db11137993d482295cec1838f05f530296b1 Author: Thibaut Paumard Date: Fri Oct 31 19:34:43 2014 +0100 Photon::metric() also sets the metric in the astrobj. Works also for Scenery::metric(). commit f6f711ff8201bea086fa36f4fbc1e2dd2ed39ef4 Author: Thibaut Paumard Date: Fri Oct 31 19:06:01 2014 +0100 Store coordinates of escaping photons in impactcoords commit 5835d8497e5dcf28f82cfc419e79d6577d515e0a Author: Thibaut Paumard Date: Fri Oct 31 09:44:34 2014 +0100 fix trick yo yorick/Makefile.in that's sometimes needed for linking under OSX (with clang?) commit 2a2fe9dda180ddd79392e36161ea9c417303979d Author: Thibaut Paumard Date: Thu Oct 30 12:27:11 2014 +0100 Bug fix: build yorick plug-in successfully also without MPI support commit 69522f0aad85d65531c3d30131a4af12b70c99b9 Author: Thibaut Paumard Date: Thu Oct 30 12:12:30 2014 +0100 Change SONAME depending on built-in features and by default add "-unreleased" to the SONAME. commit 9ac7d4aeaf91ff1ded73de320699bfb73da60e37 Author: Thibaut Paumard Date: Wed Oct 22 16:36:53 2014 +0200 Set an MPI error handler in Yorick (only attached to MPI_COMM_WORLD atm.) commit 9dbb7c5c9d97ef3918dbb6b565ca0ef33ceb615d Author: Thibaut Paumard Date: Wed Oct 22 16:06:39 2014 +0200 Scenery::mpiSpawn(): issue warnings when MPI is not available/not initialized/finalized commit b83fc4f4052b4fb8fc976ae01c224f9c7e7abca2 Author: Thibaut Paumard Date: Wed Oct 22 15:17:05 2014 +0200 Change GYOTO_ARRAY if Boost is not available to compile fine with C++98 (e.g. gcc-4.4) commit b52fbedb1d0973e7d75dc24fb1b10a957eb9fb09 Author: Thibaut Paumard Date: Wed Oct 22 13:17:10 2014 +0200 lib/Utils.C: #include commit 5a357b4860d007163f0c38dd17e2b20741863088 Author: Thibaut Paumard Date: Wed Oct 22 12:17:14 2014 +0200 yorick: rename gyoto.mpi* to gyoto.MPI_*, matching the normal C language name of the API. commit 6f076286911da439a75bb3bd843854464d1a10d6 Author: Frederic Date: Tue Oct 21 18:35:47 2014 +0200 NumericalMetricLorene: correcting gmunu_up_dr commit 705cd88d901a4de50d348da020082d3d1b577732 Author: Thibaut Paumard Date: Tue Oct 21 15:24:41 2014 +0200 fix format of NEWS file commit c582a2e37be6059c9cf9c90ad4428573aaadfdee Author: Thibaut Paumard Date: Tue Oct 21 15:06:52 2014 +0200 update NEWS, which was left behind when releasing 0.2.3 commit a2ddb8efe5733c8fc371b2063fef4d7a39e6de63 Author: Thibaut Paumard Date: Tue Oct 21 14:15:34 2014 +0200 Release 0.2.3 * Fix minor memory-management bug in yorick-gyoto_Scenery.C Signed-off-by: Thibaut Paumard commit 97a0e08cea0bb46c408f6d956d875fe4b2c3723d Author: Thibaut Paumard Date: Tue Oct 21 13:03:36 2014 +0200 yorick: when raytracing, support using arbitraty size arrays as indices. commit ec667993caf716fb285e7a6e427ca8ab8b9ec43e Author: Thibaut Paumard Date: Mon Oct 20 16:11:38 2014 +0200 clean gyoto-mpi-worker.*.1 (manpage copy), hide more files in .gitignore commit fb035b8ec215a6e14bd87231645c70b9bd0729ed Author: Thibaut Paumard Date: Thu Oct 16 16:15:01 2014 +0200 * New API: Screen::Coord1dSet & Coord2dSet * Change Scenery::rayTrace() API tu use a Coord2dSet instead of i/jmin/max * Make Astrobj::Properties::alloc a simple bool * Fix PATH in yorick/yorick1.in * Got rid of yorick-specific multi-thread code. * Support ray-tracing of a bunch of angle-specified directions, including in wYorick, and in parallel commit d0374b75093a82f6dfa419fac880a99ee70217cf Author: Frederic Date: Wed Oct 15 19:04:09 2014 +0200 Implementing specific moving observers for KerrBL/Minkowski. Screen: getRayCoord calls Metric::observerTetrad; new keywords in XML Metric: Metric::observerTetrad checks the normalization KerrBL and Minkowski: observerTetrad implements Keplerian observer KerrBL: obserTetrad implements ZAMO observer commit e790df753b30ef038308ada1170e8e5ed6121272 Author: Thibaut Paumard Date: Wed Oct 15 17:53:01 2014 +0200 * install gyoto-mpi-worker as ${bindir}/gyoto-mpi-worker.SOVERS * change dots in SOVERS to underscores * make sure MPI support build and works --without-cfitsio * add manpage for gyoto-mpi-worker.SOVERS commit 25a54daaaeb49d8ab96f972e7a8921424f44ae64 Author: Thibaut Paumard Date: Wed Oct 15 16:23:17 2014 +0200 Add yorick/check-mpi.i commit efce82c20bd798296cc4b08499b582a3ac860bcd Author: Thibaut Paumard Date: Wed Oct 15 15:03:45 2014 +0200 document MPI functionality in the user guide. commit 8d1fa3df6b40b55f236ae0d0b865b6e575c53632 Author: Thibaut Paumard Date: Wed Oct 15 14:26:37 2014 +0200 PolishDoughnut: turn cout message into debug message commit b7cb430940d7961fbb69ffcf3c749ed90de5bfc2 Author: Thibaut Paumard Date: Wed Oct 15 14:25:49 2014 +0200 MPI: give work to the workers before copying data commit feee6118168ba2ac1a4c8766dd30745909247c02 Author: Thibaut Paumard Date: Wed Oct 15 13:50:04 2014 +0200 also check that mpi was not terminated when chacking that is has been initialized commit b59317d408f3e08a5c834d64533b1890d6f01c7e Author: Thibaut Paumard Date: Wed Oct 15 13:06:05 2014 +0200 Do not run MPI_Init automatically, instead check that it has been done and fall-back to non-MPI behaviour if it has not. commit 1556512862b395ddbef9d1da056db22fbda0b1b2 Author: Frederic Date: Wed Oct 15 12:04:11 2014 +0200 Screen: add the x -> -x transformation for SphericalAngles commit 6d902aa3ff440f9543e1133bbacfb4543644707a Author: Thibaut Paumard Date: Tue Oct 14 17:59:41 2014 +0200 Better control of when MPI_Initialize() and MPI_Finalize() are called. commit 8c1a676e776387e3617c7468f17f7c361d244dfe Author: Thibaut Paumard Date: Tue Oct 14 16:19:52 2014 +0200 Support di and dj arguments, route yorick Scenery ray-tracing through Scenery::rayTrace when possible. The case that remains is when i_idx or j_idx is a list. commit 3745ef35f95051d4f52089eb7706afd8c37a9eb9 Author: Thibaut Paumard Date: Tue Oct 14 11:01:25 2014 +0200 Basic support for MPI functionality in the yorick plug-in: * mpispawn=, mpiclone=; * gyoto.Scenery_rayTrace() support was automatic; * new functions haveMPI(), havePTHREAD(). commit ec9accf5215558b315f5a7fb05773cc6d9217056 Author: Thibaut Paumard Date: Mon Oct 13 21:53:38 2014 +0200 Port to current Lorene (with namespace), remove linking against liblorenef77 commit f34c98c482c836d36fce9635b4ab276eb9732824 Author: Thibaut Paumard Date: Mon Oct 13 17:45:15 2014 +0200 add example slurm batch file (extremely basic) commit 52f654bab80cf092c318b3e1de597153abcd5371 Author: Thibaut Paumard Date: Mon Oct 13 17:09:25 2014 +0200 fix bug in MPI rayTrace (invalid write) commit f7d82e73926d276504576a8bd3114ec2d6e3a071 Author: Thibaut Paumard Date: Mon Oct 13 14:01:23 2014 +0200 add gyoto.in, needed to generate local wrapper commit 7b1e3a433b633ae92823a9b8fe11cdbbf10dc453 Author: Thibaut Paumard Date: Mon Oct 13 09:12:08 2014 +0200 * rename Scenery::is_worker to am_worker * give raytrace task earlier in Scenery::raytrace() * merge workers and manager into a team, use broadcast instead of P2P whenever appropriate commit bb16b57f3f3175c267fd2378a3ed78603d644bac Author: Thibaut Paumard Date: Mon Oct 13 09:06:59 2014 +0200 MPI: broadcast XML data instead of sequential send commit 4ebc4d5eed25ad1f9e52368a61e54dd77dd69557 Author: Thibaut Paumard Date: Sun Oct 12 20:19:07 2014 +0200 * provide wrapper script directly in the root of the source directory (sets $PATH) * update man page * accept (but ignore) --nprocesses when gyoto was built without MPI commit 92b56464dfba00e5c025d752a9f18c65db5e928c Author: Thibaut Paumard Date: Sun Oct 12 16:27:08 2014 +0200 gyoto executable supports --nprocesses option; fill PolishDoughnut::fillElement commit d935adb36db5ac409692f0b5585ae6c97d35a15a Author: Thibaut Paumard Date: Sun Oct 12 12:18:34 2014 +0200 Better detection and error handling of MPI prerequisites commit 5c5313403eb2bd214c934c2f7defa753395b3f31 Author: Thibaut Paumard Date: Sat Oct 11 23:25:52 2014 +0200 Document MPI dependencies in INSTALL commit b27967a8590b6bf15f0dd53f7d753aaaf83571a3 Author: Thibaut Paumard Date: Sat Oct 11 18:20:20 2014 +0200 MPI: install gyoto-mpi-worker in ${soversdir} commit 5865d2bc68ac6f5992be80b1737a208763a8c1b1 Author: Thibaut Paumard Date: Sat Oct 11 16:37:06 2014 +0200 MPI: compile (and run) fine with and without MPI commit 924eaad2df7b5e9a5e6039e69ec3a255253fa66e Author: Thibaut Paumard Date: Sat Oct 11 13:20:49 2014 +0200 MPI: support computing impactcoords commit 82a24f08b062eac91741703d1bda199c681788e9 Author: Thibaut Paumard Date: Sat Oct 11 12:53:11 2014 +0200 MPI: Get requested quantities from data pointer instead of Scenery. commit ab278de34b78e5f80db2b0fa4a6567a9fe122e15 Author: Thibaut Paumard Date: Sat Oct 11 12:39:25 2014 +0200 Add typecast from Astrobj::Properties to Quantity_t commit 4fe110b735e93d6dee4afc4020b2613f04f1903e Author: Thibaut Paumard Date: Fri Oct 10 20:54:52 2014 +0200 MPI: support using provided impactcoords commit 405957cad35d8adc662b01862c0c90b8e364381e Author: Thibaut Paumard Date: Fri Oct 10 17:21:38 2014 +0200 MPI: support all the quantities except impactcoords commit 2e4f125ce57e1e746c79ae78687ba1b0e3bb76dc Author: Thibaut Paumard Date: Fri Oct 10 17:02:17 2014 +0200 MPI: works as long as gyoto-mpi-worker is in the PATH, which is the case by default. commit 9020a896378525685268cb77691a390233fdfb5f Author: Thibaut Paumard Date: Fri Oct 10 16:38:34 2014 +0200 MPI: use a buffer instead of a temporary file when cloning remotely commit 5f99e28e9df677b5097233e6a924777623750c72 Author: Thibaut Paumard Date: Fri Oct 10 16:35:38 2014 +0200 Factory: allow constructing an object from in-memory XML data. commit 2232e31bac6a76f729ff0ebe8c1207c5fd9157dc Author: Thibaut Paumard Date: Fri Oct 10 15:45:16 2014 +0200 MPI: move all the raytrace logic into Scenery::rayTrace commit 64d65a086a1238557e68b8fff0b595d5062ed538 Author: Thibaut Paumard Date: Thu Oct 9 21:20:37 2014 +0200 Allow fixed star to be "rotating", i.e. velocity is given by Metric::circularVelocity() commit 87e22922c0b79bad3ba4163476824b237a9d7e03 Author: Thibaut Paumard Date: Wed Oct 8 18:17:28 2014 +0200 MPI actually working, at least for quantity "intensity". commit bb1816d21691d2c3c5fb0f570ed5cb458ab50662 Author: Thibaut Paumard Date: Wed Oct 8 15:11:37 2014 +0200 Initial MPI version. Dummy implementation: calls are made to parallelize Scenery::rayTrace, but no raytracing actually occurs. commit f1d58b489da853785c2f75f5ec0fd5070f3116f3 Author: Frederic Date: Fri Sep 26 14:20:40 2014 +0200 Migrating omegaPattern_ and tPattern_ from DynaDisk3D to Disk3D where they belong commit 95e32fc78f9ce8018ba63164708dab89beb8696f Author: Thibaut Paumard Date: Tue Sep 23 11:05:04 2014 +0200 fix lib/gyoto-uninstalled.pc.in top hopfully support C++11 commit 8ec7314dcc217a3e56f0b312f390694daf7f1333 Author: Frederic Date: Mon Sep 22 15:04:15 2014 +0200 Astrobj: adding noredshift_ keyword commit 224c254a314a346940f61986e766c44548cb7778 Author: Frederic Date: Mon Sep 22 12:20:08 2014 +0200 DynaDisk3D: adding rotation velocity keyword and Minkowski integration commit fa5c38593c5d49d35ad6744522beb011477c57ea Author: Thibaut Paumard Date: Fri Sep 19 14:47:33 2014 +0200 Release 0.2.2 Signed-off-by: Thibaut Paumard commit 4925c06002b51049873f8a7b2581d514579931f1 Author: Frederic Date: Fri Sep 12 12:26:17 2014 +0200 PolishDoughnut: still cleaning commit c9aaafa1e7b8934ed8c7cc0bd745a9c28de1f256 Author: Frederic Date: Wed Sep 10 16:01:20 2014 +0200 PolishDoughnut: still code cleaning... commit 5c0dc7a5e9e4ecda0c780433b20055f3fcf14f45 Author: Frederic Date: Wed Sep 10 14:45:44 2014 +0200 PolishDoughnut: again code cleaning commit a82ce262e2cf389c88f21eb1441ef4a8702e89e4 Author: Frederic Date: Wed Sep 10 11:57:31 2014 +0200 PolishDoughnut: again some code cleaning commit 44a8a2536af0e51e50831c8f151432d9f83fe24f Author: Thibaut Paumard Date: Tue Sep 9 11:22:24 2014 +0200 Correct also the generic implementation of circularVelocity() Conflicts: lib/PolishDoughnut.C commit ecedb397dde61cf787c4bc2e86eea9c61e2a660e Author: Thibaut Paumard Date: Tue Sep 9 11:38:18 2014 +0200 Correct KerrBL::circularVelocity() commit f9f33402a22908cd25d1d0b71ac6a40f2317489d Author: Thibaut Paumard Date: Tue Sep 9 11:22:24 2014 +0200 Correct also the generic implementation of circularVelocity() commit 4b184b1a2332530ac51014bf3a368efd86214088 Author: Frederic Date: Tue Sep 9 10:36:50 2014 +0200 KerrBL: correct Keplerian velocity PolishDoughnut: few changes to ADAF commit f3f9823316668dabe55c21ebb4b4e781494c3dae Author: Frederic Date: Mon Sep 8 14:20:17 2014 +0200 PolishDoughnut: Adding ADAF Yuan+03 model for comparison commit 8815ed58a4ceeacf5e2ca53c6563351bcccd5f07 Author: Frederic Date: Wed Sep 3 16:22:27 2014 +0200 Code cleaning commit 65e3700fa71ad2510fb42149db7e9fb3cc630cf8 Author: Frederic Date: Wed Sep 3 16:07:55 2014 +0200 Removing DS_Store file commit cc6269f9e3c98577f6c0cad545ba1112cc872c2d Author: Frederic Date: Wed Sep 3 15:11:12 2014 +0200 Photon.C: coming back to transmission limit of 1e-6 to stop integration commit 98ddf275b8bd0e2b66952215e700f77624f21d7e Author: Frederic Date: Wed Sep 3 15:08:01 2014 +0200 Updating DirectionalDisk, adding angle averaging keyword commit cf161aee564f25a7fc193c5245d4d93ff64b773a Author: Frederic Date: Wed Jul 23 20:05:32 2014 +0200 PolishDoughnut: a bit more updates commit ed286e1ef49258408e0d6d5e3c3c7b5d4666446f Author: Frederic Date: Wed Jul 23 18:36:09 2014 +0200 Astrobj: introducing radiativeq for radiative transfer Doughnut: major update commit 2658641fbcad32179df074f80ee59671b57e914c Author: Frederic Date: Wed Jul 23 17:58:12 2014 +0200 Updating DynamicalDisk3D commit b57d70da05b3348dcaa9898851ee04bbb16eb660 Author: Thibaut Paumard Date: Tue Jul 22 13:41:16 2014 +0200 Released 0.2.1: - update version info; - New function Gyoto::atof() which supports the special values DBL_MAX, DBL_MIN, -DBL_MAX and -DBL_MIN; - Factory also outputs those special strings when needed; - increase buffer size in Factory to avoid overflow; - remove obsolete and useless files (yorick/config*, .deps...). commit 09b1de055eedadad328531a267e70ce29edee9a5 Author: Thibaut Paumard Date: Tue Jul 22 13:41:16 2014 +0200 Released 0.2.1: - update version info; - New function Gyoto::atof() which supports the special values DBL_MAX, DBL_MIN, -DBL_MAX and -DBL_MIN; - Factory also outputs those special strings when needed; - increase buffer size in Factory to avoid overflow; - remove obsolete files (yorick/config*). commit d4ea8da5e4ab740a50627c86e7c982695ba99e1b Author: Thibaut Paumard Date: Mon Jul 21 11:39:27 2014 +0200 Released 0.2.0 commit 9377e247c866095da355060bbd6d10cd79c8c28f Author: Thibaut Paumard Date: Fri Jul 18 17:38:30 2014 +0200 Prepare for releasing 0.2.0: - update build system - move ChangeLog to NEWS - output git changelog into ChangeLog - remove obsolete files (VERSION, Makefile.old, local_settings) commit e9cb96aae0fd402903a8f7b45aecdf7c68447802 Author: Thibaut Paumard Date: Fri Jul 18 15:53:40 2014 +0200 yorick/gyotoy.i: fix SAVE button label in export dialog, reorder buttons in import dialg commit fa24dd06f48dd63f00d7afcf2df45297958b224c Author: Frederic Date: Wed Jul 16 19:15:38 2014 +0200 Adding risco_ and rmb_ in NumericalMetricLorene commit bf81397b3623882047d6d38cbc57093bbdb9582b Author: Thibaut Paumard Date: Sat Jun 21 18:50:07 2014 +0200 use boost::multiprecision in Screen::getRayCoord() to avoid loosing information due to the trigonometric functions commit de3a2b3cb763e097c0170547cfeeced0bab5805f Author: Thibaut Paumard Date: Sat Jun 21 12:22:32 2014 +0200 Don't hide parameters with default values in fillElement, this way the user have almost a complete view of the parameters they might want to set when printing an object. commit 4d1829e391e02257c0fb62b3421bce17ec0572d8 Author: Thibaut Paumard Date: Sat Jun 21 11:51:48 2014 +0200 fix minor bugs in yorick check files commit f4093019883f1bccdca8e69842753875db44b34a Author: Thibaut Paumard Date: Sat Jun 21 09:48:25 2014 +0200 yorick: rename "accessor" to "closure", improve on_print method commit 840a4c5ed222a9aa8f87d3ab4c9c1567ea40943e Author: Thibaut Paumard Date: Fri Jun 20 22:43:45 2014 +0200 * remove const spcifier from Astrobj::rMax() * improve doxygen doc commit 12b0002d89043608eff93bb4b36a692869b7275e Author: Thibaut Paumard Date: Fri Jun 20 22:27:14 2014 +0200 document Worldline and Worldline::IntegState commit 924773995e2ac4504d163a484ce333ce0a04c087 Author: Thibaut Paumard Date: Fri Jun 20 15:42:44 2014 +0200 split ygyoto_private.h out of ygyoto.h commit d690b09d60f29ee3b6c9bb761f3832e809c9f246 Author: Thibaut Paumard Date: Fri Jun 20 15:25:31 2014 +0200 remove doc/user_guide/.gitignore commit 493650058308da935411d040ad65745598e82770 Author: Thibaut Paumard Date: Fri Jun 20 15:21:15 2014 +0200 yorick: improve dot operator to support everything the () operator supports; improve doc commit 0981ff0c73420c42e239a7c780bf78390abd5fc1 Author: Thibaut Paumard Date: Fri Jun 20 15:20:10 2014 +0200 fix lib/BlackBodySpectrum.C to compile with the minimal feature-set (--disable-xerces etc) commit c9a87c06ea0da00a9bb777e418847f7ac8e2ff1a Author: Thibaut Paumard Date: Thu Jun 19 16:03:08 2014 +0200 Change dot operator syntax in Yorick plug-in. Warning: this may break existing code. commit e118820888b4822fad88ab727de594e8c5ed1a9f Author: Thibaut Paumard Date: Thu Jun 19 09:21:22 2014 +0200 doc build system: * build ref only if DOXYGEN is available; * build user guide only if all the necessary LaTeX bits are found commit 7d4f236c4bf6b304b4a5a822dcfe7da646d6b711 Author: Thibaut Paumard Date: Wed Jun 18 17:13:07 2014 +0200 Document how to extend Gyoto in the user guide. commit af3dafa2069750343d4610f8ac5cd4612fcfe3d4 Author: Thibaut Paumard Date: Wed Jun 18 11:10:57 2014 +0200 Update manual: * some documentation on Yorick and gyotoy; * provide build system; * change aa.bst to kluwer.bst, which is free and available in texlive-bibtex-extra commit f19633ff8149b09c9ea0cd9e24f5c9d4c368419f Author: Thibaut Paumard Date: Tue Jun 17 22:17:47 2014 +0200 reorder configure script commit 8bf325f08d67d92f5c0ea8c92e872b26e87e8af0 Author: Thibaut Paumard Date: Tue Jun 17 22:07:05 2014 +0200 add configure option --disable-c++11 commit df35b4773c7e6823ff4ee5d53dbfbb001dbe72ca Author: Thibaut Paumard Date: Tue Jun 17 21:43:32 2014 +0200 fix more warnings commit 5b7a834364631a370c84401ba59b4d0af740beb6 Author: Thibaut Paumard Date: Tue Jun 17 17:45:38 2014 +0200 more pedantic warnings commit 3349ed36907b54cffc4a098c35fe1c8f97b44f6f Author: Thibaut Paumard Date: Tue Jun 17 17:41:21 2014 +0200 fix many pedantic warnings (--enable-hardening) commit 0c275dd0e840f6719244ff707e5faf0496128deb Author: Thibaut Paumard Date: Tue Jun 17 14:11:02 2014 +0200 repair building *with* cfitsio (!) commit 34730f710625606dd48e4798ff997594fb528102 Author: Thibaut Paumard Date: Tue Jun 17 14:00:38 2014 +0200 repair support building and checking without cfitsio commit d33bc82240b0de477cac0b353b13eced87a2b4e1 Author: Frederic Date: Tue Jun 17 13:52:52 2014 +0200 Debug check-directionaldisk commit 87dafa1d0cb126c7c2579718f149d4ed22e63520 Author: Thibaut Paumard Date: Tue Jun 17 13:02:28 2014 +0200 ensure Gyoto builds and make check works even without xerces. commit b338cb057f7e424ab28bb312a4a545ebfb4d2b92 Author: Thibaut Paumard Date: Tue Jun 17 10:52:50 2014 +0200 * yorick: add haveUDUNITS() * make sure the check suite passes even without UDUNITS commit f298d400995c1dc5939991bb99ac94d136e10c47 Author: Thibaut Paumard Date: Mon Jun 16 18:24:21 2014 +0200 fix bug in getRayCoord commit b60a37c080aab4789e8feeef0feeb9f7321870b6 Author: Thibaut Paumard Date: Mon Jun 16 18:11:57 2014 +0200 fix getRayCoord to work better for very small angle increments commit 34f7f763f330605fd3002928bddb91cc64047877 Author: Thibaut Paumard Date: Mon Jun 16 16:29:50 2014 +0200 Document and compare the integrators in the user guide commit 728ab77261498a0f0c44e777210e7ffe1f885503 Author: Frederic Date: Mon Jun 16 12:21:08 2014 +0200 Biblio manual added commit 7f056100051aad17d6169156155070c19f72669c Author: Thibaut Paumard Date: Mon Jun 16 10:07:11 2014 +0200 * Fix bug that would break adaptive integration for the Legacy integrator in multi-threaded operation * yorick: add gyoto_haveBoost() * make check now works even without boost support commit df6d2c8eced475ae850f888e9a02be30f5de1932 Author: Thibaut Paumard Date: Sat Jun 14 15:43:57 2014 +0200 improve configure to error out if boost was requested but C++11 or Boost not found commit 36fdd3a700085dc104d13e8e3b59e6e3779d88b4 Author: Thibaut Paumard Date: Sat Jun 14 10:27:00 2014 +0200 ensure the right compiler is used with compiling the yorick plug-in, and document how to select a compiler in INSTALL commit 9f5b70986d6654f22506063327aa7299debb3e9e Author: Frederic Date: Fri Jun 13 17:57:35 2014 +0200 DirectionalDisk: implemented trilinear interpolation in emission() commit 08e91914060ce90a9e9bd6f5d3eff9a6989365c0 Author: Frederic Date: Thu Jun 12 17:00:30 2014 +0200 Add new astrobj: DirectionalDisk commit fbf69f4563942725acce1b80f1b7651f87298fa2 Author: Thibaut Paumard Date: Wed Jun 11 21:35:00 2014 +0200 Fix bug in Photon that would initialize the coordinate when it's supposed to remain uninitialized. Give access to Scenery::clonePhoton() commit cc7f8f00f1441119155909a9c70356319379c017 Author: Thibaut Paumard Date: Wed Jun 11 14:57:31 2014 +0200 update configure to test for more flags to enable C++11, and to chicken out if none work. commit 37fc1c2e887d30add8ef6a9b598ae19d6364af39 Author: Thibaut Paumard Date: Wed Jun 11 11:40:35 2014 +0200 include in GyotoWorldline.h commit 38b7b7c9cd48141eaf577008113e83fb77cf2168 Author: Thibaut Paumard Date: Wed Jun 11 11:01:28 2014 +0200 Don't store Photon parameters in the Scenery object, but directly in the Photon template it holds. This avoids getting out-of-sync. commit 579311b32b91b11c1cdf6bd969579d77e3595eeb Author: Thibaut Paumard Date: Tue Jun 10 23:05:18 2014 +0200 clone Scenery internal photon when ray-tracing in Yorick commit 768d6780f669dd617d0a4a0005e2b08feaaf4e3a Author: Thibaut Paumard Date: Tue Jun 10 20:42:13 2014 +0200 abide by delta_max_over_r_ in generic myrk4_adaptive, fix bug in Metric::Generic::deltaMax(pos, h) in case of Cartesian coordinates commit aaa1fc1d4d537411dc212b25bb2be4062a7f4610 Author: Thibaut Paumard Date: Tue Jun 10 14:26:33 2014 +0200 Few fixes for compilation under MacOS: - default value for DeltaMaxOverR is now 1. to avoid overflow which triggers SIGFPE on MacOS - make the "install" target phony - check for the availability of -rdynamic in configure commit a412ba0b2b912ce069e8b62f5468065ccf083e2f Author: Thibaut Paumard Date: Mon Jun 9 19:21:42 2014 +0200 give access to the new integrator tuning parameters in yorick/Photon and Star commit 44296bc1ee7be5749d6db5a5d08c42fe911e102d Author: Thibaut Paumard Date: Sat Jun 7 19:38:11 2014 +0200 put CXXFLAGS in gyoto.pc to convey -std=c++11 commit 6d11ab03a8323014c9d1f5c452648894507d1106 Author: Thibaut Paumard Date: Sat Jun 7 19:31:33 2014 +0200 put BOOST_CPPFLAGS in pkg-config file commit 933e1e7a5077be5b1a08672f3e2e3b68faf00b80 Author: Thibaut Paumard Date: Sat Jun 7 19:27:33 2014 +0200 support compiling without boost commit 267f69c3354b89886a4f07fd9c51141a5e150ffb Author: Thibaut Paumard Date: Sat Jun 7 16:16:08 2014 +0200 store boost integrator kind in an enum instead of a string commit f042b3b68fe258e9a2f6f9d117fe731883bc8772 Author: Thibaut Paumard Date: Sat Jun 7 15:48:26 2014 +0200 implement non-adaptive boost steppers commit 296521a1cad702139fb8e1772b480ecc46064213 Author: Thibaut Paumard Date: Sat Jun 7 14:37:29 2014 +0200 fix Worldline constructors and initializers to clone/init the IntegState when appropriate commit 00af1d197d18c76351755c43f7da74a1fc36f8bc Author: Thibaut Paumard Date: Sat Jun 7 11:56:15 2014 +0200 allow setting abstol and reltol in new integrators commit 54664768985636cf00922dda98eedf495cd2f8c8 Author: Thibaut Paumard Date: Sat Jun 7 11:29:57 2014 +0200 improve new integrators (initialize minimally) commit 99fa623fc61788791b28f911070c9a78a3efe82c Author: Thibaut Paumard Date: Fri Jun 6 22:14:48 2014 +0200 access new integrator in Scenery from yorick commit 1b276a0e6e94805930c809338dfec5ea7a2d77a1 Author: Thibaut Paumard Date: Fri Jun 6 21:31:07 2014 +0200 provide deltaMax, deltaMin and deltaMaxOverR interface directly in Worldline and Scenery for the new integrators. change default values of deltaMin (DBL_MIN) and deltaMaxOverR (DBL_MAX). fix bug in Torus::deltaMax(). commit 7a18bef6c48efbe70eb8e11e75bb31e78dd81d68 Author: Thibaut Paumard Date: Fri Jun 6 17:17:17 2014 +0200 Support the 4 Boost Runge-Kutta integrators commit 6a41ecb5fa71254630905c6db8cd888e1190aeea Author: Thibaut Paumard Date: Fri Jun 6 16:34:43 2014 +0200 Add support for Boost ODEint integrators. Adds new build dependency on Boost. commit b0f9d62d26d9ce2256714986b4d97d2a1759f9df Author: Frederic Date: Fri May 30 12:01:29 2014 +0200 ThinDiskPL: just remove Rmin and Rmax, they shadow InnerRadius and OuterRadius! commit e1c870d8ef55397d70f86f4a618595ca67b7e6ba Author: Frederic Date: Fri May 30 11:23:20 2014 +0200 Astrobj: add "const" keyword to rMax() ThinDiskPL: rename Rmin, Rmax to Rinner, Router PolishDoughnut: redefine r_cusp_ to solve high spin problem ; new correct version of p_mag implemented in Komissarov commit 9faae660da6f547d89af76cc273e6cf0f5a9a96f Author: Thibaut Paumard Date: Tue May 20 17:19:33 2014 +0200 ensure gyoto.so is compiled before gyoto_std.so, which needs it on MacOS X commit 95fe4c951593469a132eeb1f20a79ac1407af7ad Author: Thibaut Paumard Date: Wed May 14 16:24:08 2014 +0200 avoid div by zero in yorick/check-helpers.i commit 54642a5ab6a8fd1c48110d35125feec97a607cb4 Author: Thibaut Paumard Date: Wed May 7 18:27:35 2014 +0200 Allow setting FixedStar spectrum and opacity in the yorick plug-in commit baf94b96a940e40de28fcc9382c0a3382b3f4a4f Author: Thibaut Paumard Date: Wed May 7 17:25:23 2014 +0200 KerrBL: allow using the generic integrator. commit 038d036a513becca89bb2010433a9dcc04347a87 Author: Thibaut Paumard Date: Wed May 7 15:27:58 2014 +0200 Implement KerrBL::christoffel(dst, pos) commit 35c1e1bae837abe22ad48f26710f43f8accc4b7c Author: Thibaut Paumard Date: Wed May 7 12:10:28 2014 +0200 add some eye-candy in test suite commit d836302bf9d2f99e5c679fc60c9ddc23f3de9385 Author: Thibaut Paumard Date: Wed May 7 10:22:26 2014 +0200 Provide a proper system for running the yorick plug-in from the built source tree. Just use the script yorick/yorick which is generated at configure time. commit a84b8dc68cb01271d65f7fa90df36063b655939d Author: Thibaut Paumard Date: Tue May 6 15:52:22 2014 +0200 Include new metric (WIP): NumericalMetricLorene commit 1e3ff63fafb7797445f4f042a1981eb7fc8c3779 Author: Thibaut Paumard Date: Tue May 6 15:39:53 2014 +0200 + KerrKS: make it actually work, with the generic integrator. Using the specific integrator is an option, but it is currently broken. + The christoffel method may now set a stop condition. + myrk4_adaptive does not ignore the stop condition set by myrk4 anymore. + Conversions To/From seconds may now be done from/to distances using GYOTO_C as a conversion factor + Fix Torus, which was completely broken in Cartesian coordinates. commit 3a0e3e7a200be6c840cf24141cb1acc46453154c Author: Thibaut Paumard Date: Wed Apr 30 13:30:56 2014 +0200 Add Keplerian keyword in order to get circulartVelocity to return the Keplerian velocity commit 03b79c344c7b3cc88dcf39f277aa0aa29f348b39 Author: Thibaut Paumard Date: Tue Apr 29 17:11:37 2014 +0200 code cleanup: remove useless constructors and destructors (in Metrics), protect kind(string) and coordKind(int) which should generally not be used. commit 6e3e17a69ad368178b0a86243ed710ca78752332 Author: Thibaut Paumard Date: Tue Apr 29 11:03:23 2014 +0200 move delta_max_over_r_ machinery to Metric::Generic commit c6c149455ddd56ab2c5c22722706368a90c75dbc Author: Thibaut Paumard Date: Tue Apr 29 01:07:15 2014 +0200 add WIP, use single call gmunu() in Metric::Generic and KerrBL (10% speed gain) commit 02f034e8d9c029b635b76ac22ab16c5a531938b7 Author: Frederic Date: Tue Apr 22 16:55:00 2014 +0200 Add doc/user_guide commit 483b941a54c1902ee459e44a0f926c5774cd25ec Author: Thibaut Paumard Date: Tue Apr 22 13:29:55 2014 +0200 Add work-in-progress (WIP) class Add Minkowski metric class commit cfe128aab7efe99fc9bf91da141a410ee1c36f45 Author: Thibaut Paumard Date: Thu Apr 17 14:16:32 2014 +0200 Update configure script. Add "--enable-deprecated" option. The code should never be pushed when enabling this option is required to build the code. commit 4e3abda54a6d31d484b4dcdc978cba28562d1c9b Author: Thibaut Paumard Date: Thu Apr 17 14:05:51 2014 +0200 update autotools scripts, include new "compile" script. commit bb0c4990b396b835c2e3f2b385310f4464bce462 Author: Thibaut Paumard Date: Thu Apr 17 13:25:45 2014 +0200 rename set intensity/spectrum/binSpectrumConverter in Astrobj and Scenery commit 21dea0f9e97279702b47fa7fbd0cd2eb605033a3 Author: Thibaut Paumard Date: Sat Mar 29 21:00:41 2014 +0100 add alpha0, delta0 in the doc of gyoto.Screen in the Yorick plug-in commit 36ad61d232fc960c33351546368b327ea06f48cf Author: Thibaut Paumard Date: Sat Mar 29 20:45:49 2014 +0100 get/set alpha0 and delta0 in Screen support in Yorick, support unit commit df78a088bde6ed4bc02b5dc471854b17f9a99b08 Author: Thibaut Paumard Date: Sat Mar 29 18:02:55 2014 +0100 rename get/SetFlag_radtransf -> opticallyThin, nThreads, resolution, nSamples, spectralOversampling commit 23daf50d49497d41b27474bb07cc9c2ec2d86977 Author: Thibaut Paumard Date: Sat Mar 29 17:45:10 2014 +0100 rename get/set lambda, centralTempOverVirial, beta, constant, exponent commit 852ef12998deab0ae2c7a7135e19ad2f84ed13df Author: Thibaut Paumard Date: Sat Mar 29 17:11:03 2014 +0100 rename get/setRadius/SmallRadius/LargeRadius/CentralDensity -> radius/smallRadius/largeRadius/centralDensity commit 457bef5c21a594bf81b30d3d8600ec07b8c53b80 Author: Thibaut Paumard Date: Sat Mar 29 16:31:01 2014 +0100 rename get/setDelta/Delta0/Alpha0 -> delta/delta0/alpha0 commit 0564a4fa0625edc915eae835ae1894b3400517b5 Author: Thibaut Paumard Date: Sat Mar 29 16:18:42 2014 +0100 rename get/setSpectrum -> spectrum and get/setOpacity -> opacity commit 6a5776c5d36aa35ccad87df33afb2e02238ae2e8 Author: Thibaut Paumard Date: Sat Mar 29 15:52:43 2014 +0100 rename get/setSpectrometer -> spectrometer commit 2682d2c581dd472e998df1719c06dc38e7908b96 Author: Thibaut Paumard Date: Sat Mar 29 14:02:24 2014 +0100 rename set/getAstrobj -> astrobj commit 9b1a7ab89b0d088303f99b0fab10a953ea6133ce Author: Thibaut Paumard Date: Sat Mar 29 08:44:31 2014 +0100 rename set/getKind -> kind everywhere, make sure Gyoto compiles with and withoug GYOTO_NO_DEPRECATED commit 8a1accc56a2c4a32bbba632980537eee841a3a43 Author: Thibaut Paumard Date: Sat Mar 29 08:27:41 2014 +0100 Add some API compatibility deprecation code commit 54beda5617f259a540e339de4e962d3b73a43944 Author: Thibaut Paumard Date: Sat Mar 29 08:07:55 2014 +0100 rename methods set/getScreen -> screen, fix last remaining warning commit 8cbef78a57040fc4855564631e8395ebee2a55cc Author: Thibaut Paumard Date: Fri Mar 28 22:33:08 2014 +0100 get/setMetric->metric, get/setRmax->rMax commit fcd7f6bea42d258a6175b58ba9046ad983538f20 Author: Frederic Date: Fri Mar 28 16:48:02 2014 +0100 PolishDoughnut: erased Impact_ ; directional and angle-averaged synchrotron in Komissarov commit 8a8e16e126fcb27bf384ea7575bb33550d438946 Author: Frederic Date: Wed Mar 26 17:20:08 2014 +0100 Code cleaning in PolishDoughnut/Komissarov commit 62853366512a56bd0e5305e1f12f088e081aa9ea Author: Thibaut Paumard Date: Wed Mar 26 17:03:42 2014 +0100 fix "../include/GyotoPolishDoughnut.h:251: error: a class-key must be used when declaring a friend " commit 61681551ab7faa42568cc68c80e48fa4f7ca7072 Author: Thibaut Paumard Date: Tue Mar 25 17:59:22 2014 +0100 Simplify interaction between PolishDoughnut and PolishDoughnut::intesection and commit 2253c42c813220ea646a39b0ea7b2da47c6f3296 Author: Thibaut Paumard Date: Fri Mar 14 21:56:49 2014 +0100 change method names in Screen: inclination, PALN, argument, distance commit c4e1bffa50cc51a29454836ae7db3b01c7f071b7 Author: Thibaut Paumard Date: Wed Mar 12 15:35:26 2014 +0100 rename RotStar3_1::integKind, RotStar3_1::fileName. Make sure compilation goes fine with HOME_LORENE set. commit 968b109cfe50da2bb14c7cbd717773624c04253b Author: Thibaut Paumard Date: Wed Mar 12 15:26:34 2014 +0100 * rename functions from setMass/getMass style to mass()/mass() style. Are concerned the following (new names): Metric::mass, Metric::coordKind, Metric::kind, Screen::coordKind, KerrBL::spin, KerrKS::spin commit d6ab1f233265dabe15a02075dedaa50b80021ecb Author: Thibaut Paumard Date: Mon Mar 10 17:01:36 2014 +0100 add DiffTol and DeltaMaxOverR attributes to some of KerrBL, KerrKS and RotStar31 commit 1f929ddad2d933489f9c2e3b40d4c8f4a003d4fe Author: Thibaut Paumard Date: Mon Mar 10 14:45:04 2014 +0100 Add DeltaMin and DeltaMax attributes to Metric::Generic, support it in KerrBL commit 67f56565152b3a4cf0ed43354a0cd6fe205bb011 Author: Frederic Date: Wed Mar 5 12:03:55 2014 +0100 Code cleaning in KerrBL. In KerrBL::myrk4_adaptive, redefined difftol depending on metric kind commit 7b80e9cbf2ddd203ec084e85259ae7bc1928e0a0 Author: Frederic Date: Thu Feb 13 11:04:16 2014 +0100 PolishDoughnut::emission: temperature calculation changed, previous was buggy PolishDoughnut::emission_komissarov: added Komissarov model for doughnuts commit 4bdf87445d39fd570f2845825cb5d0c5a6b962b0 Author: Thibaut Paumard Date: Sat Feb 8 18:58:11 2014 +0100 Make Gyoto work for large distances: * use mathematical approximation for small angles in Screen::getRayCoord which numerically more accurate than the exact trigonometry, this makes Gyoto work for the Galactic Center case without using the dmax rescaling trick; * make dmax and h1max default to DBL_MAX; * in KerrBL::myrk4_adaptive(), set difftol to 1e-6 (this makes Gyoto more reliable for an object far behind the BH). commit ea573ac4c1efb3864b5ce0e7822087ffe8c689ee Author: Thibaut Paumard Date: Fri Feb 7 16:13:28 2014 +0100 use "approximate" formula in getRayCoord for small angles, this is numerically more accurate than the mathematically exact expression. Set h1max to 1e10, but it could be even bigger. commit cb1672c1b9dca9b49677e564b7a82e98f1a13d01 Author: Frederic Date: Fri Jan 17 12:20:10 2014 +0100 Still updating website commit 9740df78064f45c6430132f2d49eab522b4a10cc Author: Frederic Date: Fri Jan 17 12:18:17 2014 +0100 Still updating website commit eb7c9ca31b5a82d55484fe67f7201c564af1c65b Author: Frederic Date: Fri Jan 17 12:14:04 2014 +0100 Website update commit bfd6777dcc785daba59eb8bc90f9fe3a8cb01c18 Author: Frederic Date: Thu Jan 16 12:36:26 2014 +0100 Website changing commit a0dce5a9b1fb7d2657393abd811d411b166a5086 Author: Frederic Date: Thu Jan 16 12:32:34 2014 +0100 Website change commit 0a55959d78a2daeacf1dd4af8f18e7b514e869d5 Author: Frederic Date: Fri Dec 20 13:10:04 2013 +0100 RotStar3_1: updated myrk4_ada to follow the change in WlIntegState commit 6f19033b72fda5d4321d87f04e37e3a696332399 Author: Frederic Date: Thu Dec 19 15:44:06 2013 +0100 UniformSphere: added spectral dependence (photon index) commit a9ade35e59be97f802631ebeb42dd3977e004136 Author: Frederic Date: Thu Dec 19 11:22:45 2013 +0100 UniformSphere.C: add optically thin case for isotropic_=1 in emission commit 57f4dfb92913b7a4d407d4b556bf2a415e8c76ac Author: Thibaut Paumard Date: Thu Dec 12 14:19:51 2013 +0100 yorick/mk-movie*.i: precompute mask, set aspect ratio to 4:3 commit 9458329ae80b99c6d2606d90c8832d845255a391 Author: Frederic Date: Wed Dec 11 17:55:58 2013 +0100 WorldlineIntegState: still updating warning message commit aa9b92e6590b43977f3837741d54783ea5698b94 Author: Frederic Date: Wed Dec 11 17:53:31 2013 +0100 WorldlineIntegState: update in warning message commit 4dd0875012fd862cead1e3909491fe719bf48118 Author: Thibaut Paumard Date: Wed Nov 27 14:56:24 2013 +0100 KerrBL::CheckCons: make limarg relative to KK commit a4002f53533abc4865d6c82f015b87b084efd341 Author: Thibaut Paumard Date: Wed Nov 27 14:55:28 2013 +0100 yorick/gyoto_Scenery.C: bugfix in maxiter keyword commit d618ef47079ef759b73ec67629c6681eee9e2b82 Author: Thibaut Paumard Date: Sun Nov 24 21:10:36 2013 +0100 document StarTrace in Yorick plug-in commit 2e9080f5a97909d3f9060905d31eadb3c2819831 Author: Thibaut Paumard Date: Sun Nov 24 20:48:54 2013 +0100 Make sure an Intensity FITS file can bre readiy used as a mask. Warning: run configure after pulling this commit. commit 316e34022311ca93145d33db7ab46c3d0b950da0 Author: Thibaut Paumard Date: Sat Nov 23 23:03:11 2013 +0100 some doc in include/GyotoStarTrace.h commit 6193560ddb63baf58c23fda80859206f0ce7491f Author: Thibaut Paumard Date: Sat Nov 23 22:01:18 2013 +0100 make star from startrace in yorick commit dbad2ee8a7ab4365c312fba059e0dcf7e15e147a Author: Thibaut Paumard Date: Sat Nov 23 21:51:48 2013 +0100 make startrace from star check-startrace.i commit bade5b68b272c9c52dd292790c4aa1aacfa675ad Author: Thibaut Paumard Date: Sat Nov 23 20:22:09 2013 +0100 yorick interface for StarTrace commit 8479f542e19e5456cb6dfa57bc34feaf44bc21a0 Author: Thibaut Paumard Date: Sat Nov 23 19:39:59 2013 +0100 optimize StarTrace commit 20bd44161e6b938988ae859367b9ba829c0211f5 Author: Thibaut Paumard Date: Fri Nov 22 18:10:01 2013 +0100 automatically check startrace. set resolution to 32 and nthreads to 8 in Makefiel for make check commit 6b0661f84eeef4fcf43db6d0476d7f63e3815466 Author: Thibaut Paumard Date: Fri Nov 22 18:00:52 2013 +0100 New astrobj StarTrace, currently too slow. commit a2b2856cec0e3a11f868a07687d7c0eb9a51a66b Author: Thibaut Paumard Date: Fri Nov 22 08:56:12 2013 +0100 add members and accessors to UniformSphere to fine tune getDelta from XML or Yorick code commit 863c2fd857a1e89ca34ade8ac42030f486a5f419 Author: Thibaut Paumard Date: Thu Nov 21 17:16:12 2013 +0100 implement deltaMAx for UniformSphere and Torus commit bfc90f5c920fe7e3470205eefbc008b311c76651 Author: Thibaut Paumard Date: Thu Nov 21 17:03:22 2013 +0100 make sure h1max >= h1min commit d40a0007b700b4a81deda1b6fbad5ce72c9ef9a8 Author: Thibaut Paumard Date: Thu Nov 21 15:55:56 2013 +0100 implement Astrobj::Complex::deltaMax() commit 7cb526b968b7cb0aa056cd9e511ddc8b3ecf7eeb Author: Thibaut Paumard Date: Thu Nov 21 15:38:16 2013 +0100 * change Worldline::Integstate::nextStep() and Metric::*::myrk4_adaptive() to accept h1max parameter * add Astrobj::*::deltaMax() to ask astrobj how to not miss it, provide Generic and FixedStar implementation commit 638a3f739dd004a31c2b2f0355c4a19155487748 Author: Frederic Date: Wed Nov 20 17:19:43 2013 +0100 In KerrBL::diff changed derlim_hor from 1e5 to 1e4. Previous value leads to error due to bad z-axis pb treatment close to horizon. commit 9740b41455c04dbdf896b6ca32e07aa2d1b8ce12 Author: Frederic Date: Tue Nov 12 11:31:19 2013 +0100 DynamicalDisk3D: added novel_ flag to ignore velocity when emitter velocity is not provided. commit 22887c725dc45b0d02aa1e907823188bfd64790e Author: Thibaut Paumard Date: Sat Nov 9 09:58:17 2013 +0100 update data pointer correctly to make tracing a subset of the field correct commit 202a5be4d8743df3fcd8fe70ec56b33c12ee86d9 Author: Frederic Date: Fri Nov 8 19:20:19 2013 +0100 Disk3D: changing value of deltat inside object to constant value commit 09ee9813c619e0a574d3f4af45e57d14b2ffb0e0 Author: Thibaut Paumard Date: Fri Nov 8 15:05:28 2013 +0100 implement mask in screen to compute only parts of an image commit 50b108e91e1da87e444fcfe26a0905ff20c42678 Author: Thibaut Paumard Date: Wed Nov 6 18:04:58 2013 +0100 errmode should be 0 by default in Spectrometer as well commit e8299ba1ca56ede7180ebc0c41bf7be1ad165b7b Author: Thibaut Paumard Date: Wed Nov 6 18:00:26 2013 +0100 Fix Astrobj::getSubcontractor to throw error by default when kind is not found commit 2299fc943410d56165c3065e082fabee414d6343 Author: Frederic Date: Wed Nov 6 17:14:17 2013 +0100 DynamicalDisk3D: code cleaning, proper implementation of radiative transfer for the non-blackbody case. commit 7cf9d8ac6cf8132eef8b3c7fb188eab8ba4fd63f Author: Frederic Date: Wed Nov 6 15:34:07 2013 +0100 Added Makefile.in commit e79aded502727313414d4fff14785bac06e3e4cb Author: Frederic Date: Wed Nov 6 15:28:40 2013 +0100 Disk3D_BB -> DynamicalDisk3D This is only a change of name. commit e8b7aec3f98198c74ac259bcd8d65cd4beac77c1 Author: Frederic Date: Wed Nov 6 13:03:39 2013 +0100 Disk3D: Adding default value of opacity_ in constructor. commit 93176a0c30abf645c6cc85e75d16497424063f2e Author: Thibaut Paumard Date: Tue Nov 5 16:39:25 2013 +0100 add copyopacity= keyword to yorick/stdplug/gyoto_Disk3D.C commit d56536cdcd8a4b5636c50b95f91ec77be5187f13 Author: Thibaut Paumard Date: Tue Nov 5 15:01:28 2013 +0100 Implement reading opacity extension in Disk3D. Beware: read, but not use. commit 241d24a05fdbc621e279d3217faa6926c43fe77e Author: Frederic Date: Wed Oct 30 17:35:42 2013 +0100 In Disk3D_BB: Updated radiative transfer treatment commit 2392f0fc1093be46f068a5019a24e3836843999b Author: Frederic Date: Thu Oct 24 12:17:14 2013 +0200 UniformSphere: added possibility to emit isotropic constant emission commit a5b80a131a5245eda51cfa4ef224556516cfb3ca Author: Frederic Date: Tue Oct 22 18:19:16 2013 +0200 Disk3D, Disk3D_BB: code cleaning + added flags to allow raytracing on a grid where intensity is provided, not temperature commit 441a7c6c356aed8018a502f0f3b2986d00c9e0df Author: Frederic Date: Tue Oct 22 16:17:35 2013 +0200 ThinDiskIronLine: changed default velocity when emission=0 commit 85f54bbf4ab217794933e902b28daeca026d4a24 Author: Frederic Date: Wed Oct 9 11:49:40 2013 +0200 Added the possibility to raytrace only primary image of astrobj. Put in Scenery environment. commit 05a1a19db7320212793cf6c95d1e676087941171 Author: Frederic Date: Fri Sep 20 15:12:26 2013 +0200 KerrBL: Modified z-axis tretment in myrk4, necessary for high spin. Added display of r value when Warnings are launched. commit 29448ece43f5eb2229b6a8533eeeb774a67e78c1 Author: Frederic Date: Wed Aug 21 19:56:52 2013 +0200 PatternDisk: implemented bilinear interpol for getVelocity() and emission() PatternDiskBB: code cleaning commit 0cdea91b781daf264ef637497638c663c36620f6 Author: Frederic Date: Mon Aug 19 12:59:18 2013 +0200 Added ThinDiskIronLine astrobj to compute iron line profiles of thin disk commit e3ef7aa0c3fc431e2415e1d6d89a9fb139c230be Author: Frederic Date: Tue Jul 30 11:10:17 2013 +0200 PageThorne: added the possibility to compute observed blackbody spectrum; [removed rednoise_ option, now useless] commit 7dadb8c5be20b02861eab63b04b78a9f7c49210a Author: Thibaut Paumard Date: Sat Jul 27 11:14:20 2013 +0200 Prepare for releasing 0.1.0 commit a99c3e47c06370f9a6211c73db15bf68c2dae76e Author: Frederic Date: Mon Jul 22 17:29:01 2013 +0200 Worldline: bug corrected in getCoord PageThorneDisk: added possibility to use with CS metric commit 458ef15bc83edefbdad4d5cef8441ab20370af43 Author: Frederic Date: Mon Jul 15 16:42:48 2013 +0200 In KerrBL: removed all references to Chern-Simons, virtualized some functions to allow ChernSimons to be a KerrBK subclass commit 65fa9b9ab2f3d6b93fbef5e4a4cb89f6822f7002 Author: Frederic Date: Fri Jul 5 11:56:48 2013 +0200 Removed PatternDiskBB::rmax_ that shadows Astrobj::rmax_..... commit 2a79baa386cc2be2fffbfaa0a985a46528f5156b Author: Frederic Date: Fri Jun 28 18:34:03 2013 +0200 Changed spherical angle limit in Screen commit 1ff9c36de34e221983173d26269dc9e378040ea6 Author: Frederic Date: Wed Jun 26 12:18:33 2013 +0200 gyoto.C: added test on indices value KerrBL.C: added condition on z-axis problem solving, to be fine tuned commit f02f8e9e5b93f9f615b756bae9fb028f1d539051 Author: Frederic Date: Tue Jun 25 10:41:07 2013 +0200 Removed modification of z-axis problem treatment in KerrBL, leads to bad behavior. commit 96cc334d0825cf65987b2b1de6a3c18027b0880c Author: Frederic Date: Wed Jun 19 16:46:40 2013 +0200 Few comments on orientation stuff in Screen.C commit 07621118f38781f5a96c6938309109d6b15f9844 Author: Frederic Date: Mon Jun 17 17:39:01 2013 +0200 In KerrBL added test in z-axis problem loop of myrk4_ada. Integration is stopped is modified step gets > than 2 times initial step. commit bc678dffa500e97b8d4279fdb8e22a949f5d7073 Author: Frederic Date: Fri Jun 14 12:11:28 2013 +0200 Update PatternDiskBB.C commit d2341117f5960ac2eb445e0a860ab856b2b447c2 Author: Frederic Date: Thu Jun 13 16:50:58 2013 +0200 One more line of comment in Disk3D.h commit c471ec1085bd12fcca2f2d1e94c10dde3cbdc63a Author: Thibaut Paumard Date: Wed Jun 12 15:36:29 2013 +0200 make gyotoy compatible with both gy stable and gy git. commit a1a20baf792f3b66889aba9d04741bb2c037102a Author: Thibaut Paumard Date: Tue Jun 11 16:41:17 2013 +0200 gyotoy: sync wihth gy development commit 04cd6eca266edd6a42bfdc21be29477179a3b29c Author: Thibaut Paumard Date: Fri Jun 7 12:47:31 2013 +0200 SysPrimeToTdot: return 0 if v>c instead of error commit fd3533ed317d39c0dcd9501fc89c776fc30128f0 Author: Thibaut Paumard Date: Fri Jun 7 00:12:14 2013 +0200 update relative to gy commit 2ca253ab36e720fb2cb693669bee63272db76253 Author: Thibaut Paumard Date: Thu Jun 6 17:45:34 2013 +0200 minor bug fixes in gyotoy commit f852c841de77b5390e7fc608722f21cb3790d5f7 Author: Thibaut Paumard Date: Wed Jun 5 17:06:03 2013 +0200 Port gyotoy to yorick-gy, getting rid of Python. commit cae2bf0b0f169c65b296e6fc75767ced20a6d304 Author: Thibaut Paumard Date: Wed May 29 14:42:13 2013 +0200 increase max mass to 1e20 sunmass in gyotoy commit 43f1316219c9a590cbf9d8fe20cd6a1c9eb669f8 Author: Thibaut Paumard Date: Tue May 28 15:30:43 2013 +0200 Document required yorick version commit e55ccd9fce21fb71a1790e2cfe382720a58cf763 Author: Frederic Date: Mon Apr 29 17:59:14 2013 +0200 Added UniFlux flag to PageThorne.C Impose flux=1, useful when only interest is silhouette commit 80c716739f06b1cf7cad0ead5cae4b4b21dc9516 Author: Frederic Date: Mon Apr 29 15:58:45 2013 +0200 Added Chern-Simons modification at first order to KerrBL commit a08841edc6daad29f637435942711ac2c5bde836 Author: Frederic Date: Wed Apr 24 10:48:09 2013 +0200 Correct flux in PageThirne.C + rednoised emission commit ec3874b59b18545d3a6ce259d1ed724873dfed81 Author: Thibaut Paumard Date: Fri Apr 19 22:27:43 2013 +0200 yorick: use dot notation in che*.i files and document it commit 3e89b6d68e3cc3a0a6574dbd3f17b5ca3692f2a3 Author: Thibaut Paumard Date: Fri Apr 19 18:26:34 2013 +0200 yorick: make object.member wrap around object(member=) commit 8fffe94a1a910dbd98c1dc76ce06886c688caecd Author: Thibaut Paumard Date: Thu Apr 11 19:19:42 2013 +0200 increase number of digits in gyotoy commit 2eaf338ef09a0f4e3063cdfbedefcec83fd9b82e Author: Thibaut Paumard Date: Mon Apr 8 15:28:28 2013 +0200 Bug fix: WorldlineIntegState::nextStep made no evolution in case of non-adaptive step commit b5918923e9fa19edbf8093b89e2afd4fc4cd65fa Author: Thibaut Paumard Date: Sat Apr 6 01:14:36 2013 +0200 Finish doc review commit 290562c9adacd42da9298f5408274eff10f2713f Author: Thibaut Paumard Date: Fri Apr 5 11:58:25 2013 +0200 Rework Worldline::IntegState and Gyoto::Error Improve doc commit 225cd70b19272953b7d4b659528504240b388849 Author: Thibaut Paumard Date: Thu Apr 4 21:15:16 2013 +0200 fix FTBFS introduced in last commit improve doc commit 134640f1f7381e64179f8529b8a16ee0f6377ab5 Author: Thibaut Paumard Date: Thu Apr 4 16:23:06 2013 +0200 Improve doc commit 7a4eef96f9c54226a15591fcfc36b271d063613f Author: Thibaut Paumard Date: Wed Apr 3 19:48:13 2013 +0200 Remove FocalPlane, it's not used anywhere. commit 03d1aefbf75a82fa52656910b0f516fcc3f650c4 Author: Thibaut Paumard Date: Wed Apr 3 19:40:04 2013 +0200 Improve doc commit 6a229b22b0cc1ed1329b8d0fce911f5f2b9721a8 Author: Thibaut Paumard Date: Wed Apr 3 01:03:18 2013 +0200 imrove doc rename ScenerySubcontractor -> Scenery::Subcontractor, likewise Photon implement PageThorneDisk::getDefautQuantities() to return User4 commit e15250cc0c8d8932cdd02bf01d2699b884d7b293 Author: Thibaut Paumard Date: Tue Apr 2 22:33:20 2013 +0200 Improve doc commit 08767ea24f6186bff8d9978de8cb9ba174e7cad3 Author: Thibaut Paumard Date: Tue Apr 2 17:33:26 2013 +0200 Improve doc commit c15947781f7dcd56036e5f47f0b915f6bb3513c7 Author: Thibaut Paumard Date: Tue Apr 2 14:21:38 2013 +0200 Add icon to gyotoy commit 64110ee96f2bc2dc95afa6004c48627ab8ee2a14 Author: Thibaut Paumard Date: Tue Apr 2 00:17:16 2013 +0200 improve tooltips in gyotoy commit 286d97b34eec57b3a70e14dd6471731f5cc65b55 Author: Thibaut Paumard Date: Mon Apr 1 23:38:19 2013 +0200 update gyotoy screenshot commit aa0d245f9c573786db17b2b07f47760135296f49 Author: Thibaut Paumard Date: Mon Apr 1 22:15:42 2013 +0200 improve doc commit b4d499cba4f4b7a20987dd54aad0a415ce75f989 Author: Thibaut Paumard Date: Mon Apr 1 18:59:44 2013 +0200 yorick: small bug fix in Star commit b8ef1545389e702a38d429e63130254e1a2a1c48 Author: Thibaut Paumard Date: Mon Apr 1 18:02:34 2013 +0200 improve doc commit a7db416a2a6a09ba2c66d1b7bf503b47707609b2 Author: Thibaut Paumard Date: Mon Apr 1 12:49:04 2013 +0200 improve doc commit 7f0bc5602a677cf2bd098613ae84d71d513ba08e Author: Thibaut Paumard Date: Mon Apr 1 12:04:28 2013 +0200 Add MaxIter parameter to Worldline (Photon, Star) and Scenery commit d4abd288deaa8d8e7689c8c877caad0bd841ea27 Author: Thibaut Paumard Date: Mon Apr 1 11:05:15 2013 +0200 fix gyotoy bug in dat output commit af655d31a2dda90d950c635da0a443b27f1c68c9 Author: Thibaut Paumard Date: Sun Mar 31 22:57:27 2013 +0200 avoid percentage > 100% in gyotoy commit 0971b5474b7448a819cb77664aefe208a741c6d2 Author: Thibaut Paumard Date: Sun Mar 31 22:14:08 2013 +0200 gyotoy: display pecentage with many digit in progressbar commit cc1106d3a783ec6cb2d2bfccddf96692c76a35c5 Author: Thibaut Paumard Date: Sun Mar 31 21:05:29 2013 +0200 Implement non-adaptive step for ray-tracing, fix bug with non-adaptive integration in the past commit 3567e23d2eb743a97d14ed212df99c449303a92a Author: Thibaut Paumard Date: Sun Mar 31 00:54:19 2013 +0100 Improve rewind button behaviour in gyotoy commit 2dd31722afe059dcbd1d63176208f7f6192442ef Author: Thibaut Paumard Date: Sat Mar 30 20:26:54 2013 +0100 Worldline (Star, Photon): use in XML to disable adaptive step Improve doc commit 0476d394c1e70889498948c5fa8dc209e8e78a74 Author: Thibaut Paumard Date: Fri Mar 29 18:36:37 2013 +0100 Re-add --tmin option to gyoto tool, install gyoto manpage, fix Spectrum doc. commit 4e5e1c715bea0997d56c69365c69db1d57504a83 Author: Thibaut Paumard Date: Fri Mar 29 09:37:01 2013 +0100 update .gitignore to ignore ./configure output commit d6f7fcf0e6e013f6db0f37707af659d2895a0d49 Author: Thibaut Paumard Date: Mon Jan 1 03:07:33 2001 +0100 bug fixes in gyotoy commit 753427147a72f976006b3b1d12124d6abab9f429 Author: Thibaut Paumard Date: Thu Jan 1 18:59:59 1981 +0100 gyotoy: add play/pause/stop buttons, fix minor bugs commit ef2da581fbedb4b28bbdd9fb3de6427542067624 Author: Thibaut Paumard Date: Wed Mar 27 11:11:08 2013 +0100 Enhance gyotoy: divide integration in nsteps commit 75a29a4253bd2617e7a102af869247e423d858ae Author: Thibaut Paumard Date: Tue Mar 26 09:57:24 2013 +0100 add scalaprod metrod to Metric in yorick plug-in commit 94e0ea1ad1e5bf81db678e2d72da318526fe25d6 Author: Thibaut Paumard Date: Tue Mar 26 08:10:43 2013 +0100 small gyotoy fixes commit f183cecdc01bf24e641d1d7ab3832665d52f8213 Author: Thibaut Paumard Date: Tue Mar 26 08:00:32 2013 +0100 yorick plug-in: clean more remove obsolete Star functions introduce namespace object commit 54ff7864eb569150727aadf9e61113b1b5f0e10c Author: Thibaut Paumard Date: Mon Mar 25 16:48:42 2013 +0100 finish (?) streamlining main yorick plug-in commit 9ea6ad2a75918898254876e0b2f5628bdad8fef6 Author: Thibaut Paumard Date: Mon Mar 25 14:52:25 2013 +0100 Work on gyotoy bugs when loading star from XML file commit 8275749c7e75ded99bc2fb3acd8f556849f068e1 Author: Thibaut Paumard Date: Mon Mar 25 11:39:13 2013 +0100 Fix recent bug in yorick constructors Streamline yorick/Scenery commit 7e3b05e52e596db57c628c0e516d124ecb01e6c3 Author: Thibaut Paumard Date: Sun Mar 24 17:18:59 2013 +0100 more yorick simplification and uniformization commit fe8f888b413843fd6ff12ae6e7dbad4d9067ae74 Author: Thibaut Paumard Date: Fri Mar 22 21:30:45 2013 +0100 clean yotick/Photon code commit 31fb658bac3412393657f7c6187bfc5d90d8a99b Author: Thibaut Paumard Date: Fri Mar 22 16:18:08 2013 +0100 Clean spectrum in yorick commit 1b7e6f000c96e20c71a011685db29877140f21e7 Author: Thibaut Paumard Date: Fri Mar 22 15:52:52 2013 +0100 clean yorick spectro commit 9ec305fb709fc04d24fda6de2a6d74cb3fd4b776 Author: Thibaut Paumard Date: Mon Jan 1 01:25:28 2001 +0100 Try harder finding python3 in gyotoy. commit 1e8c70a58ca3200b950b502292b671cbfd3ee71c Author: Thibaut Paumard Date: Fri Mar 22 11:28:57 2013 +0100 clean yorick code (Astrobj, Metric) commit 29758060763dbe231b0e6064232cbd898cb4122f Author: Thibaut Paumard Date: Fri Mar 22 10:50:18 2013 +0100 Still clarify yorick Astrobj workers based on macros commit 94e5d9d3f5085d635247feebe595b61e68ef90c2 Author: Thibaut Paumard Date: Thu Mar 21 21:29:00 2013 +0100 clarify yorick/gyoto_Astrobj.C commit 1506e7bb42464f1252c027fc6c2e2e21243599f0 Author: Thibaut Paumard Date: Thu Mar 21 13:56:03 2013 +0100 clarify yorick plug-in with preprocessor macros commit 7c143252cf9f104753899baffc8b00593140f605 Author: Thibaut Paumard Date: Thu Mar 21 10:40:27 2013 +0100 expose Screen fourvel, screen# in yorick plug-in commit 3a264e2fa242bf1fb3f9c35b6004fb2f99adece7 Author: Thibaut Paumard Date: Wed Mar 20 21:35:46 2013 +0100 fix gyotoy bugs commit 41bdbe7c68a9827a24a8dd8aecc5f1f29abe67da Author: Thibaut Paumard Date: Wed Mar 20 16:42:51 2013 +0100 suppress extraneous output in gyotoy commit ba57d52364a1b4d4dcb54feeda00955d0c388af9 Author: Thibaut Paumard Date: Wed Mar 20 16:26:33 2013 +0100 More documentation about gyotoy commit 98fafbbb7bc363e7b5fe5cc8fafa85c58bb46845 Author: Thibaut Paumard Date: Wed Mar 20 13:54:03 2013 +0100 fix documentation on python 3 and PyGObject commit 718979621af0a47beca5ccc655f42f62f9635646 Author: Thibaut Paumard Date: Wed Mar 20 13:40:52 2013 +0100 Gyotoy: port to python3 commit 26da5715240feabafc52e43a3754c7aa23ff58f8 Author: Thibaut Paumard Date: Wed Mar 20 12:59:17 2013 +0100 Gyotoy: * Port to Gtk3 (a.k.a. PyGObject) * Add possibiility to load metric from XML * Various bug fixes commit ff478ad9bc5f6103c98f5f2a61bafa5cc06067f9 Author: Thibaut Paumard Date: Tue Mar 19 16:16:26 2013 +0100 implement possibility to change delta in Star and Photon from the yorick plug-in commit aaf8e5ae0fadbfa06f8dba9012a95f8db10262b2 Author: Thibaut Paumard Date: Tue Mar 19 15:49:07 2013 +0100 implement setParameter for Spectrometers, export ABI in Yorick Supplier commit 42d56b527809580752474cf88409319294392e46 Author: Thibaut Paumard Date: Tue Mar 19 15:04:28 2013 +0100 fix freqObs usage in PageThorneDisk::processHitQuantities commit 89308d3d0fb58f389e591c3e63b51764693fbb2b Author: Thibaut Paumard Date: Tue Mar 19 14:49:26 2013 +0100 Enable changing freqObs commit 1b619a75a758eeb91e4e431bad653bae2b64f358 Author: Thibaut Paumard Date: Tue Mar 19 11:02:17 2013 +0100 PageThorneDisk: bolometricEmission doesn't need a freq, remove from Yorick plug-in as it can be instanciated with gyoto_Astrobj and updatespin is now useless thanks to the Teller/Listener system. commit 3649da1e7097614ba73818ecb0f0aec057669591 Author: Thibaut Paumard Date: Mon Mar 18 17:17:15 2013 +0100 remove bolometric case from Astrobj. PAgeThorneDisk implements that as User4 commit 6dbdab9f84937cf8252251c86ac355ea1f3f623e Author: Thibaut Paumard Date: Thu Mar 14 22:01:48 2013 +0100 Fix "error: 'Gyoto::Register' is not a function," namespace conflict in Spectrometer.C commit 3be921ec5fa74463bbced2b0bc8dfb22006d2e12 Author: Thibaut Paumard Date: Thu Mar 14 13:26:14 2013 +0100 imporve polishdoughnut doc in yorick commit 5a360e2236cd466a231fa54c1a39294d34d2a9b8 Author: Thibaut Paumard Date: Thu Mar 14 12:39:20 2013 +0100 * Split yorick/gyoto_SpectroUniform.C out of gyoto_Spectrometer.C * Document Spectrometers in gyoto.i * Support units in Spectrometer::getWidths(), getMidpoints(), getChannelBoundaries() * Support reading spectrometer from file commit c73613777e37c8f5ba3a0aa215b4a8edf1f548d4 Author: Thibaut Paumard Date: Wed Mar 13 17:52:31 2013 +0100 Split Spectrometer.C and .h into two files, clean API, update doc commit fd40012fed4d11c1b021c5dfdbaa019ace79a85f Author: Thibaut Paumard Date: Tue Mar 12 18:07:16 2013 +0100 support creating empty Spectrometer::Complex in Yorick commit 7e2480dbad67ad0c733cc6e4c68196856345a081 Author: Thibaut Paumard Date: Tue Mar 12 18:04:32 2013 +0100 implement SpectroComplex in Yorick commit 057d16fb8f5f3d8366ba95fbb03ca7c27c025aad Author: Thibaut Paumard Date: Tue Mar 12 17:04:23 2013 +0100 separate Spectrometer and SpectroUniform in Yorick plug-in commit 90d6e082dc3eb8ebc2f48f373e2b0e9699d26d8c Author: Thibaut Paumard Date: Tue Mar 12 14:34:52 2013 +0100 add missing files commit 784e7adc01ae60cf6f6b22d45582f891b9e1188f Author: Thibaut Paumard Date: Tue Mar 12 14:32:08 2013 +0100 fix yorick plug-in commit d4fb64d8fcf54892466b0c081314a046c94f4ea4 Author: Thibaut Paumard Date: Tue Mar 12 14:10:07 2013 +0100 New Spectrometer Kind: Complex commit 6ca5b14840be29b990063013a9a7313ad33476bd Author: Thibaut Paumard Date: Tue Mar 12 10:27:04 2013 +0100 use a register for spectrometer kinds commit 59a8966cd991e0a3bc5f5e5c01a613a0d04ae5e4 Author: Thibaut Paumard Date: Mon Mar 11 22:12:18 2013 +0100 split Spectrometer into a Generic base and a Uniform subclass commit a8d9ae7ab7df5781544d1a1b1401c6b99c8c17bf Author: Thibaut Paumard Date: Mon Mar 11 11:33:39 2013 +0100 Spectrometer channels may or may not be contiguous. commit 4573ce1ee64af76a594f4fffac6a8b666883a03a Author: Frederic Date: Thu Feb 28 10:50:05 2013 +0100 - Added the Bolometric keyword for Astrobj when bolometric (and not specific) intensity is returned by emission - Astrobj::process deals with boloemtric or specific intensity - Corrected all PageThorne examples that should be bolometric commit 7311719c49bce27058551d543fcb10d42c546891 Author: Frederic Date: Thu Feb 28 10:00:30 2013 +0100 Typo in Scenery commit 61a46b82e211b3e671b4672d75f2e937b7ffac93 Author: Frederic Date: Tue Feb 26 14:32:39 2013 +0100 Updated Photon.C to always store 1 in freq_obs_ This quantity is useless and will be deleted in the future commit 4ffc983cbe9aabb65e15e5da23caab84bfc3ffc2 Author: Frederic Date: Tue Feb 26 13:06:39 2013 +0100 Come back to pre-doppler commit commit a85b3b16d7c4f2171900764c62d71c4f3b487406 Author: Thibaut Paumard Date: Thu Feb 21 18:02:39 2013 +0100 Fix buggy Doppler factor when observer moves commit 691f44db5879ba91f2a78de8f77dc619ae3341b9 Author: Thibaut Paumard Date: Thu Feb 21 11:59:29 2013 +0100 Listeners must unhook from all Tellers in their destructor commit 220cbd7c80bb9103a32fd470b37a981040b9378b Author: Frederic Date: Fri Feb 15 15:08:30 2013 +0100 Typo in Screen. commit cd4019015ab2468e72f6cf04fdaaacc9f7601121 Author: Frederic Date: Fri Feb 15 14:29:15 2013 +0100 Implemented Screen with spherical angles commit 11a82d9f934acf610e9186cb4d3122b984a6236d Author: Frederic Date: Mon Feb 4 18:23:42 2013 +0100 Corrected checkPhiTheta in Worldline.C with modifs in Photon.C accordingly commit c9fe23a0e80574217dc9c1cfd5e79030501553db Author: Frederic Date: Wed Jan 30 17:16:04 2013 +0100 Typo in example file. commit 1b5a5012cc4788c892bf11a041ea62bc9b7265df Author: Frederic Date: Wed Jan 30 16:34:59 2013 +0100 Example file for integration with a given local frame for observer commit 413c242e342c999c454e57c90e1db9a498c00d67 Author: Frederic Date: Wed Jan 30 16:32:59 2013 +0100 Implemented definition of observer's local frame given in XML input file --> allows to properly account for any kind of observer's motion commit 749abccd4378a5eaecb509dfc2cf6ede35a33a14 Author: Frederic Date: Thu Jan 17 17:51:47 2013 +0100 Screen::getRayCoord updated to allow screen orientation through Screen::alpha0_ and Screen::delta0_ Corrected computation of spherical_angle_2 to be OK for not small alpha, delta commit cfb4855f3ce04cb0f5ca910d0e270e515196d529 Author: Frederic Date: Wed Dec 19 16:29:21 2012 +0100 Updated test for norm conservation, passed to norm/tdot conservation commit 6b67e12aa272510530a2734f61be8a2cc1add54b Author: Frederic Vincent Date: Thu Dec 6 16:03:12 2012 +0100 Moved checkPhiTheta from Astrobj to Worldline Added call to checkPhiTheta in Worldline::getCoord commit 47a6cd46cbbca22b1a657211405d8b0f24eb99a4 Author: Frederic Vincent Date: Wed Dec 5 16:59:55 2012 +0100 In KerrBL.C contravariant metric in a more readable form commit 294d3335fdbdee7ae230e330170cb6f3d4ac019f Author: Frederic Vincent Date: Wed Nov 28 15:57:36 2012 +0100 Add contravariant Kerr metric commit 78d30c895db0ca362ac249852e73cf89e23a4b67 Author: Thibaut Paumard Date: Tue Nov 20 21:57:08 2012 +0100 Document Hooks commit 2acab338da5598f280f2a7ec3c156f79cc1356c6 Author: Thibaut Paumard Date: Tue Nov 20 20:55:37 2012 +0100 Fix in Worldline::tell(): must reset particle properties (Metric::Generic::setParticleProperties()) commit 7c0215c075416a599a2f0865295162405da87355 Author: Thibaut Paumard Date: Tue Nov 20 18:33:42 2012 +0100 Hook worldline to metric (using Hook::Teller/Listener) commit 8573cb991072749fc27e60c0c909afaec288749c Author: Thibaut Paumard Date: Tue Nov 20 16:36:17 2012 +0100 Move Hook::ListenerItem to Hook::Teller::ListenerItem and hide it. It's an implementation detail. commit fc0fad546a9513b5c3b0d33280de9e0452fad668 Author: Thibaut Paumard Date: Tue Nov 20 09:19:38 2012 +0100 Photon::clone(): reattach Metric to Astrobj commit 8c9db127d5314e018c9ee30d15eae278978cce51 Author: Thibaut Paumard Date: Mon Nov 19 11:36:07 2012 +0100 Fix RotStar3_1 copy constructor to get example-fixedstar-rotstar3_1.xml working commit 815112c00ccb398cf5ff8de3c87bb1c0e10c7259 Author: Thibaut Paumard Date: Mon Nov 19 10:41:31 2012 +0100 Implement hook system so that a Metric can warn objects when it changes commit 14a1447878cdff5f93ea46129f3f5626332d3976 Author: Thibaut Paumard Date: Mon Nov 12 18:05:04 2012 +0100 Use the setParameter(s) paradigm for Metrics as well. Ability to instanciate any Metric from the Yorick plug-in. Fixes in RotStar3_1. commit 0ec6dad93d122e2f0d0db1504f75f62f0398998f Author: Thibaut Paumard Date: Mon Nov 12 15:52:37 2012 +0100 Ability to instanciate any Astrobj of Spectrum in Yorick commit 4c3593e417c01146f92a5106e8a89197e66df4c9 Author: Thibaut Paumard Date: Mon Nov 12 11:43:55 2012 +0100 * Spectrum: + use a templated subcontractor + accept unit in seParameter(not used yet) + ability to instanciate arbitrary Spectrum in yorick: sp = gyoto_Spectrum(kind) sp, setparameter=name, content commit f463d49635774ac0264fc4692ade84c8a7caf395 Author: Thibaut Paumard Date: Mon Nov 5 15:51:37 2012 +0100 PolishDoughnut: allow setting the spectral oversampling used in integrateEmission() commit 75d8d882ec877fa8eeb40d608f7d9c125be5688a Author: Thibaut Paumard Date: Sun Nov 4 21:27:29 2012 +0100 * Astrobj: integrateEmission takes arrays as input/output * PolishDoughnut: integrateEmission() uses emission() and oversampling commit dc0a065da77ac8ab094a7f09e498e9b61cef90cf Author: Thibaut Paumard Date: Sat Nov 3 16:51:59 2012 +0100 PoishDoughnut: Try secant method for finding root of transcendental functor. Use Ritter's method as a fallback. Clean PolishDoughnut from now unused code. Make math functions static members. commit 8af3691bed67f7ddbea8ea8a6e175e5ad0967537 Author: Thibaut Paumard Date: Sat Nov 3 16:51:04 2012 +0100 Implement Gyoto::Functor::Double_Double_const::secant() root-finding method commit dd54ef81e3e485a205b26b3006b3b4977c2443a8 Author: Thibaut Paumard Date: Sat Nov 3 12:37:33 2012 +0100 Use Ridders' root-finding method instead of bisection*(). Implement intersection() as a Functor. commit 5d04756735cfcc67054cab10de1c08967798aa68 Author: Thibaut Paumard Date: Sat Nov 3 12:35:24 2012 +0100 * New source: lib/Functors.C * Implement Ridders' root-finding method for Functors::Double_Double_const commit 2fad938cb9005f6b4a96d6e87c9ea2bf167c38f6 Author: Thibaut Paumard Date: Fri Oct 26 20:57:35 2012 +0200 support for im=sc(,,"Intensity[unit]") in yorick plug-in commit 1b10cf4f583723bc529bda14bebcf8b02e5c42ab Author: Thibaut Paumard Date: Fri Oct 26 15:30:14 2012 +0200 fix grave bug in Spectrometer::setBand(band, unit): only band[0] was converted commit ad7e980fa13cdf7cc967f4a9c950077a9520aa0a Author: Thibaut Paumard Date: Fri Oct 26 15:17:27 2012 +0200 * implement multithreading in Yorick plug-in's gyoto_Scenery operator () * fix PolishDoughnut's copy operator which prevented the PolishDoughnut from working in a multi-threaded environment commit 2f05e3368958919bb717181860c2ceeb10f6e3a8 Author: Thibaut Paumard Date: Thu Oct 25 21:38:16 2012 +0200 * improve configure tricks to read Lorene's local_settings * protect make check from GYOTO_PLUGINS environment variable commit dc0b79b4fcf54de431f2d4535e255284fa370f34 Author: Thibaut Paumard Date: Thu Oct 25 21:14:52 2012 +0200 * make configure more resilient on make behavior variations commit 4f7e08a39bb3e4fdf210a58dfad80a623626f1b7 Author: Frederic Vincent Date: Thu Oct 25 18:09:32 2012 +0200 Warnings in Disk3D_BB commit d9a86c165635fdd4733f81f53a6d9d83d87ffb6d Author: Thibaut Paumard Date: Thu Oct 25 12:59:27 2012 +0200 * minor optimizations * many warning fixes (--enable-hardening) commit 2cff2879a0a9975b6dd121586b4b9e474eec36da Author: Thibaut Paumard Date: Thu Oct 25 10:01:09 2012 +0200 * implement Units::Converter::reset() * implement default Converter constructor (trivial converter) * fix warnings in Screen commit 960430153b1ddd65b47fa4d9a97dcf91ce489f17 Author: Thibaut Paumard Date: Wed Oct 24 22:18:17 2012 +0200 clean Converter API commit e1b15d0146cde835a7ebd0dcdc841995de9b41ab Author: Thibaut Paumard Date: Wed Oct 24 19:52:27 2012 +0200 use "make -s" instead of "make" to retrieve Lorene configuration commit ded0931e8bbbaa4ca17210d6028a21b296b35857 Author: Thibaut Paumard Date: Wed Oct 24 17:59:55 2012 +0200 * add unit support to Spactometer::setBand() * implement Units::To/FromHerz * To/FromHerz and To/FromMeters can convert between length, duration and frequency commit b656125cb3b2b735aed8d6178cd7ce37761df5b9 Author: Thibaut Paumard Date: Wed Oct 24 11:27:32 2012 +0200 * interpret units as UTF-8 instead of ASCII * (re)introduce units: as, mas, µas, °, kyr * implement To/FromGeometricalTime() * re-work PolishDoughnut example to be closer to observation commit 6a163a70902942343fc3bbca45bcaf32594ae29e Author: Thibaut Paumard Date: Tue Oct 23 21:37:51 2012 +0200 fix Scenery constructor commit 330cc0cc367cc943fa7a2540d56ffc54930872fe Author: Thibaut Paumard Date: Tue Oct 23 21:18:02 2012 +0200 (double) linking yorick plug-in with xerces-c is actually needed (under Darwin) commit d0da753a5007372643f3d0788944b3f98e56e175 Author: Thibaut Paumard Date: Tue Oct 23 20:42:06 2012 +0200 Don't link the yorick plug-in with xerces-c, cfitsio or udunits2: this is unnecessary double linking which sometimes prevents the plug-in from running with strange behavior (seen under Mac OS X). commit 0d1faa78acbda296c0a66e8960f5bf54db6991be Author: Thibaut Paumard Date: Tue Oct 23 14:37:11 2012 +0200 Document include/GyotoConverters.h commit dd78b821d2113df93aa5f6dea6fc81412dfda2ae Author: Thibaut Paumard Date: Tue Oct 23 11:46:36 2012 +0200 support for units in Metric::set/getMass and unitLength() commit f21b60f26b426ce903fcd4621649ba4ce1d5c1cb Author: Thibaut Paumard Date: Tue Oct 23 11:00:31 2012 +0200 * support for "pix" unit in Quantities: pix is the angle covered by a Screen pixel * support for units in Scenery::set/getDelta() and set/getTmin() commit 10a25cce8d868270d63039fb52d02018a47f4f96 Author: Thibaut Paumard Date: Mon Oct 22 19:17:56 2012 +0200 fix syntax error in yorick/check.i commit b1e0d4d99821f76ab1a0cd84947bb40e55bb60ed Author: Thibaut Paumard Date: Mon Oct 22 17:48:50 2012 +0200 fix missing -ludunits2 in some cases in configure commit 1eba0ab051cb1ef782f22877669b63085792974d Author: Thibaut Paumard Date: Mon Oct 22 17:38:06 2012 +0200 * Support for units in Screen properties * new APIs: To/FromSeconds and others commit a4441eb1a5c6f5d0cb1dd97d33771af4242f4ab1 Author: Thibaut Paumard Date: Mon Oct 22 14:11:12 2012 +0200 udunits support in Screen::fov_ commit f39df39152ce2f118acfaf7e1fb22ba2927c2cc9 Author: Thibaut Paumard Date: Mon Oct 22 13:22:15 2012 +0200 Add unit support for many Astrobj properties commit 2e5eddd4cb048d5c78c864fcc260c4787cb86a19 Author: Thibaut Paumard Date: Mon Oct 22 11:33:40 2012 +0200 * start supporting units from Astrobj objects in Yorick plug-in * fix Astrobj::Standard::fillElement to call Astrobj::Generic::fillElement commit fb23f29eb9a6f8a22e833a4d38aa6a934a407659 Author: Thibaut Paumard Date: Mon Oct 22 09:04:23 2012 +0200 add --with-udunits-inc and --with-udunits-lib configure options commit e2b4fd7f7aef7d080c9a8656524d2e9486e50d1f Author: Thibaut Paumard Date: Fri Oct 19 20:22:58 2012 +0200 Generic support for units in XML files, in particular for Astrobj commit b742b53e8555bc989131139a420d429518f1d7ba Author: Thibaut Paumard Date: Fri Oct 19 11:43:11 2012 +0200 * Add copyright to polishdoughnut * PolishDoughnut::emission() returns SI * Use udunits par défaut commit 5a99a140418ba894347a9842fb8c65382a061de8 Author: Thibaut Paumard Date: Thu Oct 18 19:23:23 2012 +0200 Import PolishDoughnut commit 3f8a034141ab89586837c1f73c79528dfd37aa4e Author: Thibaut Paumard Date: Thu Oct 18 16:45:45 2012 +0200 Support converter for Intensity and Spectrum (--with-udunits) commit b2d1323067831e75d2d1c09777c3fd7a851a2ab8 Author: Thibaut Paumard Date: Thu Oct 18 11:27:49 2012 +0200 work towards unit converters: introduce lib/Converters.C and include/GyotoConverters.h commit 96bcae6a43a48db80372b3232f7369e26686e88d Author: Frederic Vincent Date: Thu Oct 18 16:47:04 2012 +0200 Updated include/GyotoDisk3D_BB.h and lib/Disk3D_BB.C to take into account Bremsstrahlung emission + absorption. commit 4930726d6ca2996d94e6bf56010a4598de96a5d4 Author: Thibaut Paumard Date: Wed Oct 17 17:27:51 2012 +0200 Implement Photon::getTransmissionMax() commit 9ec6d52c3dec0cf41773be3ae83b45c3f7add7d5 Author: Thibaut Paumard Date: Wed Oct 17 16:31:51 2012 +0200 experimental support for units using libudunits (enable with --with-udunits) commit d3423fcdabeab2818e87c7bbc31f0985fbca5799 Author: Thibaut Paumard Date: Wed Oct 17 09:41:05 2012 +0200 fixup! AC_SUBST SYS and plugin_sfx, used under Darwin for yorick/stdplug commit c23c8ec52d12bf97eaba6ad5e2a11ca91b39db57 Author: Thibaut Paumard Date: Tue Oct 16 21:53:05 2012 +0200 AC_SUBST SYS and plugin_sfx, used under Darwin for yorick/stdplug commit 95194fcddd800924fb28d28564f3764c8b457aff Author: Thibaut Paumard Date: Tue Oct 16 21:36:47 2012 +0200 yorick/check-scenery.i: #include "util_fr.i" commit 78308f00b4a2e867af3f218720319720edc9a8c5 Author: Thibaut Paumard Date: Tue Oct 16 17:34:45 2012 +0200 make --enable-pthreads the default commit f02fa3606ea1e0a34397d190c03a682124f4c978 Author: Thibaut Paumard Date: Tue Oct 16 16:45:49 2012 +0200 improve thread-safety (add SmartPointee::mutex_) commit f27966ee32aeeff1efa0c5f07de0b6115d2d32c1 Author: Thibaut Paumard Date: Tue Oct 16 11:35:43 2012 +0200 include GyotoConfig.h in ygyoto.h commit 9f1e83ede206dde39ad2e6703cc0ca762a63b88e Author: Thibaut Paumard Date: Tue Oct 16 11:09:55 2012 +0200 Store configuration in include/GyotoConfig.h commit 01c60fb2ddd55440ba58558f1485bc92b916c7aa Author: Thibaut Paumard Date: Mon Oct 15 18:02:11 2012 +0200 add @DEFS@ to *.pc so gyoto-obspm knows about HAVE_SINCOS commit 136afeeb0161daeb77821c297d66797ef1bf1edf Author: Thibaut Paumard Date: Mon Oct 15 17:38:49 2012 +0200 (Re-)enable building without xerces but warn about the consequences commit b61ea79247a62f33f1255edbf78987fe790c102f Author: Thibaut Paumard Date: Mon Oct 15 11:26:35 2012 +0200 improve HOME_LORENE checking commit 840da4c2a279e4feeb98e29c4b046337e6dc3520 Author: Thibaut Paumard Date: Mon Oct 15 10:44:05 2012 +0200 * Simplify configure.ac by using m4/ macros for --enable-(native|hardening) * Make --enable-(native|hardening) also add there flags when CXXFLAGS and/or CPPFLAGS where set * Clean configure help strings commit 35ae196a80b42af37e94dc108be9700fad7333ff Author: Thibaut Paumard Date: Mon Oct 15 09:11:51 2012 +0200 Make sure configure fails if --with-(xerces-cfitsio)* is set but the corresponding library is not found. commit 6a2f8acf1bbe341efe6de00fd11e4b4c2b5a3fae Author: Thibaut Paumard Date: Sun Oct 14 21:22:42 2012 +0200 test hardening flags before before adding them commit b404b5e771f1ee7a38e2dd54f09e7211f243cb2f Author: Thibaut Paumard Date: Sun Oct 14 11:25:12 2012 +0200 Check whether compiler supports -march=native before adding it to CXXFLAGS commit d25ef5acb39cb91e6ad2e6b7e8ce3847618d4669 Author: Thibaut Paumard Date: Sat Oct 13 15:44:09 2012 +0200 Revert --disable-native -> --enable static and --disable-hardening -> --enable-hardening commit 19650c84c6234658029c6b8fd003c35bc55ea8c4 Author: Thibaut Paumard Date: Sat Oct 13 15:26:37 2012 +0200 Test for sincos in configure. Implement it as a macro in GyotoDefs.h if missing. Remove other unused configure tests. commit 2f2663d2b983d184fd31391ad198d5737ab55e6d Author: Thibaut Paumard Date: Fri Oct 12 16:28:38 2012 +0200 typo fix in configure.ac: -I -> -L in cfitsio_lib=-L$with_cfitsio_libs commit 72f9ef70fdc7688affb49a5e8e04c6463ff658b5 Author: Thibaut Paumard Date: Thu Oct 11 10:17:02 2012 +0200 Optimize KerrBL::diff() (and others) to avoid multiple divisions and pow() calls. commit 737c15138375d5fa86bdb32e7cd1f0bcff6c7bf4 Author: Thibaut Paumard Date: Wed Oct 10 16:40:57 2012 +0200 Add pedantic warnings and hardening flags to default CPP/CXXFLAGS. Use --disable-hardening to disable. commit c3bddf272bc8445d17abbdabe770d67d4b95ec68 Author: Thibaut Paumard Date: Wed Oct 10 14:00:35 2012 +0200 Don't build static libraries by default commit c17041083a06f26ff968b710e8b557354c8fc918 Author: Thibaut Paumard Date: Wed Oct 10 11:37:07 2012 +0200 add -march=native to the default CXXFLAGS commit 7317458529bb3a0c5d7338b5df3f77b7b248a537 Author: Thibaut Paumard Date: Tue Oct 9 16:56:09 2012 +0200 10-fold speed gain by not calling tan()! commit 5d5376f69b35e355f5d4c8367705afb1bf763415 Author: Thibaut Paumard Date: Tue Oct 9 16:08:05 2012 +0200 add GYOTO_*DEBUG* macros; add --disable-debugging configure flag which save a marginal amount of computing time commit fc528a3f1e7d3e7359d114860ac439849b9bab6c Author: Thibaut Paumard Date: Mon Oct 8 14:24:37 2012 +0200 store pthread flags in gyoto*.pc commit 50bbc6618fe7983b20df9cf9664bb132948eaa2e Author: Thibaut Paumard Date: Fri Oct 5 23:04:03 2012 +0200 build with -pthread again commit 9800f962b37537ef1173d50bc2b5e5e150fc6291 Author: Thibaut Paumard Date: Thu Oct 4 22:23:58 2012 +0200 add --enable-pthreads configure option commit e8fd135e2aa4efdd0adea066d461255ee673bce8 Author: Thibaut Paumard Date: Wed Oct 3 10:49:12 2012 +0200 add --disable-doc option to configure commit a3ceec86062d16591bf150f8613e1e48c9a29410 Author: Thibaut Paumard Date: Wed Oct 3 09:55:58 2012 +0200 disable yorick in lib/gyoto-uninstalled.pc.in commit 23aaaf5aca44c6159e2da5123572c8ab65589cd7 Author: Thibaut Paumard Date: Mon Oct 1 21:57:11 2012 +0200 throwError in Screen::getRayCoord() when on z-axis in spherical coordinates commit 54f0a0bc412c41b639bb3da4cec936b44d618792 Author: Thibaut Paumard Date: Mon Oct 1 14:34:33 2012 +0200 rename tlim->tmin in Worldline, Photon and Scenery. Default value is -DBL_MAX commit f15de6b70c52455749edae83b6802a7b4c2db251 Author: Thibaut Paumard Date: Sat Sep 29 08:53:02 2012 +0200 add .gitignore commit e19e026afc04fbcd0abaf82bc2b53c730578c92a Author: Thibaut Paumard Date: Sat Sep 29 08:43:02 2012 +0200 update ChangeLog commit 5b80bbfa6e864e90cfb26254fe9dcdb44a54e410 Author: Thibaut Paumard Date: Sat Sep 29 08:22:53 2012 +0200 fixup! * add --plugins parameter to gyoto executable; * add plugin attribute to Metric, Astrobj and Spectrum XML entities commit 250fa2dfbe3a759673114ec96c035afba6c28eba Author: Thibaut Paumard Date: Sat Sep 29 08:13:42 2012 +0200 * add --plugins parameter to gyoto executable; * add plugin attribute to Metric, Astrobj and Spectrum XML entities commit 88cab19bf71bc204053c5c0ab4c38793a1d8cf9c Author: Thibaut Paumard Date: Fri Sep 28 19:49:33 2012 +0200 * add nofail keyword to gyoto_loadPlugin * load stdplug plug-in in gyoto_std.i commit c32e7b43c3d61593c4c6a3e1131a65eb7393d81c Author: Thibaut Paumard Date: Fri Sep 28 17:52:50 2012 +0200 expose Gyoto::loadPlugin() to Yorick commit 87f87ab03fdfd7ab60ff63ef1a3211a865566173 Author: Thibaut Paumard Date: Fri Sep 28 14:32:36 2012 +0200 add GYOTO variable to lib/*.pc commit 67ace2662805e061e13be804d7c5fdaf0a43d0f8 Author: Thibaut Paumard Date: Thu Sep 27 22:04:08 2012 +0200 actually link lorene module with lorene! commit 48ac3463a89f9933b8b9a600a1075309c1649a6b Author: Thibaut Paumard Date: Thu Sep 27 16:47:13 2012 +0200 add -DGYOTO_USE_LORENE to LORENECPPFLAGS when appropriate commit 07439a5fcbd0f369adacf2ecd4189a0c013fc44d Author: Thibaut Paumard Date: Thu Sep 27 16:28:06 2012 +0200 add lib/gyoto-uninstalled.pc.in to ease building plug-ins from uninstalled gyoto commit 6fb54ab79bdb882411433035b065230723e02ce6 Author: Thibaut Paumard Date: Thu Sep 27 15:50:14 2012 +0200 add m4/pkg.m4 (pkg-config) commit 977db71169513c319ede6cbaba23e49c1165de06 Author: Thibaut Paumard Date: Thu Sep 27 15:49:45 2012 +0200 Better integrate lorene build commit 1ac339c17c8698f8ec3ce25f394765ad97a41c32 Author: Thibaut Paumard Date: Thu Sep 27 14:31:33 2012 +0200 implement Astrobj::emission(double Inu[], double nuem[], nbnu,...) commit ffa38dc40ee1c34a922e1df028f337d269d26f1e Author: Thibaut Paumard Date: Thu Sep 27 14:30:19 2012 +0200 Use pkg-config if available for xerces-c and cfitsio and process gyoto.pc accordingly commit 35330aa7cde02ff2f19264adb08cdda758b97872 Author: Thibaut Paumard Date: Tue Sep 25 15:08:32 2012 +0200 add -lfftw3 to lorene ldflags commit 7373839eb94c3b617d2f50ce4165777ec5f52587 Author: Thibaut Paumard Date: Tue Sep 25 15:02:51 2012 +0200 By default, install yorick plug-in under ${prefix} even if Yorick is not there. commit 797c88873ce50cb2dfd519d77c4e26b084dc291e Author: Thibaut Paumard Date: Mon Sep 24 15:56:01 2012 +0200 PatternDisk: minor edit in debug output lib/automakefile*: link libgyoto-stdplug with cfitsio commit f336bd0990c7307caa916ee38ef8b81ac8b7cfe5 Author: Thibaut Paumard Date: Wed Sep 19 10:54:36 2012 +0200 * INSTALL: document additional Yorick packages * gyoto.pc: use GYOTO_ prefix in variables commit ece1730f89f9b8df1e1a2991e7f75d089dd4fdcb Author: Thibaut Paumard Date: Tue Sep 18 13:51:18 2012 +0200 Specify $(XEERCESLDFLAGS) in bin/Makefile* instead of (or rather in addition to) relying on libtool to keep its promises commit 9ca8955bd796f96ed11a40bc47903ea55871b1d6 Author: Thibaut Paumard Date: Tue Sep 18 10:47:50 2012 +0200 * ship m4/* files instead of symlinks * don't use "VERSION" file in configure * includes are in srcdir, not builddir commit 33a25f7a05f5741589d0dde5fcf3b86861830610 Author: Thibaut Paumard Date: Thu Sep 13 00:19:26 2012 +0200 Revamp the build system based on the autotools commit 101db9603c1b18d43ab922ba666cfb63c32e4f1f Author: Eric Gourgoulhon Date: Tue Sep 11 23:41:42 2012 +0200 Suppressed the reference to local_settings_ubuntu in the file INSTALL.ubuntu commit 31d27b9676a5f278c0b1a1667cad00e4a549c837 Author: Eric Gourgoulhon Date: Tue Sep 11 23:36:58 2012 +0200 Suppressed the newly added local_settings_ubuntu commit 692dad1ec8d3d5ae1849ab6c80b5ba9dfcea912c Author: Eric Gourgoulhon Date: Tue Sep 11 21:43:15 2012 +0200 Re-added the template file local_settings_ubuntu commit a97de6ca50664160c2fe459ca56b75571bcdc5ec Author: Thibaut Paumard Date: Mon Sep 10 21:11:21 2012 +0200 make mk-movie*.i scripts executable commit 7b5c5313948b07bc7ee289d803b9fed021b0d64e Author: Thibaut Paumard Date: Mon Sep 10 20:52:08 2012 +0200 bin/Makefile: put gyoto.o in front of the libraries when linking (matters for some linkers) commit 63f2e6a5860ace1b5f3d8d650dce003f5d76180f Author: Thibaut Paumard Date: Tue Jul 3 15:07:46 2012 +0200 Mention prepackaged binaries in INSTALL commit f83341793968069e0ca68aadc80699b448f3886b Author: Thibaut Paumard Date: Sun Jun 24 11:13:07 2012 +0200 * fix buffer overflow in lib/Factory.C * update paper ref in bin/gyoto.C * take environment (CXX|CPP|LD)FLAGS into account in local_settings * harden CXXFLAGS by default, may not work for all arches commit 6db2175d4955247ea307a96eaaaaee0b26740cdd Author: Thibaut Paumard Date: Sun Jun 24 08:44:12 2012 +0200 Add Spectrum::Generic::~Generic() virtual destructor commit 58db9308dcfff681fa850f113c0d4ed82088edb6 Author: Thibaut Paumard Date: Thu May 10 17:55:46 2012 +0200 yorick: put -L../lib and -I../include in front of COPTS commit dab4e175a691990be136aefd9984a5155eb50c39 Author: Frederic Vincent Date: Wed Jun 20 13:22:05 2012 +0200 In Disk3D_BB.C: computation of Sem, Vem updated commit 1dbb3a3ef4517cc861a8093b03c3825575b68b89 Author: Frederic Vincent Date: Wed Jun 13 11:57:29 2012 +0200 Disk3D_BB.C: updated computation of Sem, Vem commit 9f7ba8d9f6517986f0b0b36c9b49b077144ad1b2 Author: Thibaut Paumard Date: Thu May 10 17:55:46 2012 +0200 yorick: put -L../lib and -I../include in front of COPTS commit be59e67e53c1c741b4dd10ab5870111feac3e979 Author: Thibaut Paumard Date: Thu May 10 17:24:26 2012 +0200 bin: clean bin/Makefile, rm gyoto.o in make clean, add includes for getpid() in gyoto.C commit 3bd00b018b0b35d632df060ca1240284be6e69bd Author: Thibaut Paumard Date: Tue May 1 18:08:09 2012 +0200 fixup (s/CFITSIO_PATH/CFITSIO_LDFLAGS/ local_settings) commit e78c12fd42456df8f852dbef8df1852f23479f22 Author: Thibaut Paumard Date: Tue May 1 13:41:58 2012 +0200 0.0.3 release commit 26c93688c912bf6397298b39cdbbc16fa4eba12d Author: Thibaut Paumard Date: Tue May 1 12:59:08 2012 +0200 + initialize PatternDisk's phimin_/phimax_ to 0 and 2*pi + use standard flags CXXFLAGS/LDFLAGS/LDLIBS commit f8e9303ecb43db03c1e0e7083f61f0765ea595dd Author: Thibaut Paumard Date: Thu Apr 26 11:22:11 2012 +0200 add github URLs in mk-movie-fork-raytracing.i commit 6fa5d65349fd6df471a6ba7b37f6da013ab76003 Author: Thibaut Paumard Date: Thu Apr 26 11:04:12 2012 +0200 document mk-movie-fork-raytracing.i commit b1a612f121d01e89453485a46eb2402a02eff7d1 Author: Thibaut Paumard Date: Wed Apr 25 21:18:24 2012 +0200 * use gettimeofday() for profiling * clone Photon in _each_ thread, including the parent (when nthreads_ > 1) * include mk-movie*.i commit 26a32b02b49a77a5a3b38229a09c99470d92aebc Author: Thibaut Paumard Date: Mon Apr 23 20:17:42 2012 +0200 implement explicit KerrBL copy constructor SceneryThreadWorker returns NULL commit 8fd8ed3ad732e914d81da36e782a8edea756606a Author: Thibaut Paumard Date: Sat Apr 21 23:16:10 2012 +0200 + bugfix: initialize xnthreads in bin/gyoto.C + add gyoto_verbose() in yorick/gyoto_utils.C + improve informative output in Scnery::rayTrace() commit 565a9b031f2d1dc2985f6e967bb17ab1f457c35b Author: Thibaut Paumard Date: Sat Apr 21 00:47:47 2012 +0200 provide an actual API for Scnery::nthreads_ rework yorick/gyoto_Scenery to render gyoto_Scenery_rayTace usable, it is the only way use nthreads from within yorick commit a9728a0136cc4bbf0e36f9277a2e3ca009ad8921 Author: Thibaut Paumard Date: Fri Apr 20 15:20:42 2012 +0200 initial attempt at a multi-threaded Scenery::rayTrace commit c69f75261bbc942adcbd9b9d46fddef62af29ba6 Author: Thibaut Paumard Date: Thu Apr 19 10:00:47 2012 +0200 add ChangLog, update copyright commit f8472f174108cb6cae554f89da3fab7cc7557d33 Author: Thibaut Paumard Date: Thu Apr 19 09:34:56 2012 +0200 install include files in include/Gyoto/ commit 41485117bcb304cdc6633c9b8efc1be539ae5e7f Author: Thibaut Paumard Date: Mon Apr 16 14:09:47 2012 +0200 remove NULL default argument to Spectrum::Subcontractor_t, which is useless and makes build fail with icc. commit e62b6e834e5007b8f34e50aac6d96df502ba29bc Author: Thibaut Paumard Date: Sun Apr 15 15:33:50 2012 +0200 add GYOTO_INC to PKG_CFLAGS in yorick Makefiles commit 5138519bc68382105637ecbaec2094532704c31a Author: Frederic Vincent Date: Fri Apr 13 12:16:05 2012 +0200 Code cleaning in WorllineIntegState. commit 29a2d7436ea852cb744ee45305c8bd7b722edab9 Author: Frederic Vincent Date: Tue Apr 3 17:25:19 2012 +0200 Corrected typo in local_settings: INC->GYOTO_INC in section "Path for the include files" commit 56c32b3195281cdb03d4281e23fb90e77a1b7e60 Author: Frederic Vincent Date: Tue Mar 13 12:38:16 2012 +0100 Simplifying expression of Vem in Disk3D_BB.C commit eb59bb0da7a84da7510d0a8b5298e3e85d68fa68 Author: Frederic Vincent Date: Tue Mar 13 11:48:49 2012 +0100 Modified jnu computation in Disk3D_BB.C commit b276815f865231983c117dad76693d8fb255dd94 Author: Frederic Vincent Date: Wed Feb 29 11:54:17 2012 +0100 * Added test on val in StandardAstrobj::Impact before going to process commit c4ba43a80101b5c11e8f937cd76b35a388b9631d Author: Frederic Vincent Date: Tue Feb 28 18:19:25 2012 +0100 * Modified computation of jnu in Disk3D_BB commit 68d60d856e3c932d1dce73c4a84ad4aa0be586c2 Author: Frederic Vincent Date: Fri Feb 24 09:10:57 2012 +0100 * Changed computation of jnu in Disk3D_BB * Changed computation of T in PatternDiskBB and ThinDiskPL commit d70f6d45dda64e513687fd620e675e968ec87546 Author: Frederic Vincent Date: Wed Feb 22 19:02:40 2012 +0100 * Changed i[1] computation in getIndices in Disk3D and PatternDisk * Error message for jnu computation in Disk3D_BB commit fddb718998a6210d1b083bcf4ef5f43f24be3e32 Author: Frederic Vincent Date: Wed Feb 22 17:55:03 2012 +0100 * Added impact time for data in Disk3D * Changed computation of jnu in Disk3D_BB * Changed definition of rmax_ in PatternDiskBB commit a8e4ac4360d9164c7fc2a47ef1f81590d171d861 Author: Frederic Vincent Date: Wed Feb 22 10:34:44 2012 +0100 * Computation of nr_, nphi_, nz_ in PatternDisk, Disk3D is updated * Added phimin_ and phimax_ in PatternDisk, Disk3D * Added ThinDiskPL class for powerlaw thin disk commit 35617c762a1039471796e6f05e11863c4fb5c833 Author: Frederic Vincent Date: Thu Feb 16 18:02:40 2012 +0100 + Add call to checkPhiTheta in ThinDisk.C commit b1d851c6712ddef01a3819023a31ca90e2086659 Author: Frederic Vincent Date: Thu Feb 16 13:10:50 2012 +0100 + Added null tests in PatternDisk and Disk3D commit 4700b0e6918dfd2dfcf993bbe94f5e86abefdae4 Author: Frederic Vincent Date: Mon Feb 13 19:22:08 2012 +0100 * Changed treatment for power law part of disk commit 43e5cc37efee709f4f86368d4328a4b06f4182aa Author: Frederic Vincent Date: Tue Feb 7 18:32:32 2012 +0100 * Moved giveDelta() to StandardAstrobj * Implemented non-adaptive integration inside optically thin object in Standard::Impact() + Added many csts in GyotoDefs.h for PolishDoughnut physics commit 84de159c9ce52e279cb48f319b20859b4fd851a1 Author: Frederic Vincent Date: Mon Feb 6 17:19:53 2012 +0100 + Add Generic::giveDelta to implement integration inside optically thin object + Modified Photon::hit to take giveDelta into account + Add call to checkPhiTheta in StdAstrobj::Impact commit 5d05cb0a06e93ceea9d701b28c122c64a37b698a Author: Eric Gourgoulhon Date: Sun Feb 5 16:38:51 2012 +0100 Installation instructions for Linux Ubuntu. commit 77b0f6177eae0570db9fbefd3917457740e6ba42 Author: Eric Gourgoulhon Date: Sat Feb 4 18:45:19 2012 +0100 -- Added template local_settings file for Linux/Ubuntu systems -- Change in lib/Makefile to fix a link issue on Ubuntu 11.10 commit dc078a643ef14ccf014fb6279bcce9375d17279d Author: Frederic Vincent Date: Fri Feb 3 17:00:58 2012 +0100 * Added {} in switch calls in Disk3D.C commit 96519bb02c9adb70f0a03648b411c2a4845ba698 Author: Frederic Vincent Date: Fri Feb 3 08:03:09 2012 +0100 * Put some {...} in Astrobj::checkPhiTheta commit 98d19668e3d62ae6f6c5cd200e1de1fc88661d63 Author: Frederic Vincent Date: Thu Feb 2 19:31:47 2012 +0100 + Add Disk3D_BB subclass with implementation of black body emission for 3D disk and dynamical evolution taken into account + Add function checkPhiTheta in Astrobj to insure theta and phi are in the correct range commit 6c91c6c772ef873c5241266965b037ffbe67e412 Author: Frederic Vincent Date: Wed Feb 1 20:37:16 2012 +0100 + Add Disk3D class, also in yorick plug-in First version, compiles, runs, but not to be used for physics yet... commit 955536e5cd9217aea01ec7a97a8820bc1ca73832 Author: Frederic Vincent Date: Fri Jan 27 12:08:16 2012 +0100 + Add special treatment when impact point is below ISCO in PatternDiskBB + Add setprecision in WorldlinIntegState for display of current position in nextStep() commit 3745d3bb2a2659fbe9b4fbd5041e983b9be35a36 Author: Frederic Vincent Date: Fri Jan 20 16:48:26 2012 +0100 * Typo in DynamicalDisk::setParameter commit d58f6c5b4b7da7886cba11884f9156871d28f800 Author: Frederic Vincent Date: Fri Jan 20 16:44:57 2012 +0100 * Bug fixed in DynamicalDisk::setParameter commit ab712dc4d004fb9cac80f971adb6cf7c43288ea2 Author: Frederic Vincent Date: Thu Jan 19 16:53:46 2012 +0100 + Added class DynamicalDisk that deals with evolving disk commit b4d73ca14b2d05333de91d09912a553c9e6b3aa8 Author: Frederic Vincent Date: Thu Jan 19 16:50:01 2012 +0100 * Functions getEmission, getRadius, getVelocity in PatterDisk * Added one forgotten line with rmax_ condition in PatterDiskBB * User1 quantity added in ThinDisk to compute t_impact if needed commit c97a3e724475c0667474e16fd99e583b8598e8af Author: Frederic Vincent Date: Tue Jan 17 11:19:39 2012 +0100 PatternDiskBB update. Added setMetric and call to getRms; some code cleaning; seems to work ok commit f1c037e47ae802453e097b602858f5705ad72aed Author: Thibaut Paumard Date: Tue Jan 17 10:23:14 2012 +0100 lib/PatternDisk.C: bugfix: brackets around {delete [] array; array = NULL;} pairs. commit bc7fc63a284704e5d46774964d08b94134a6bfe7 Author: Eric Gourgoulhon Date: Mon Jan 16 16:28:33 2012 +0100 Added some include () commit 58b3935726808cf6885f131ccbb7c5274a25e37e Author: Frederic Vincent Date: Mon Jan 16 12:23:55 2012 +0100 New sub-class PatternDiskBB, heir of PatternDisk, with black body emission spectrum. The quantity PatternDisk::emission_ now bears temperature of emission. commit f3444c51537e11d0268dfacd6d453697b4270cb9 Author: Thibaut Paumard Date: Wed Dec 21 09:42:09 2011 +0100 Add ThinDisk::thickness_ commit 2620371c1d7747d5ccb9f2d0e4043e327fca8bc5 Author: Thibaut Paumard Date: Wed Dec 21 08:45:00 2011 +0100 TinDisk::Impact(): fix bug which would extend disk to 2*rout_ commit 7841fad57e8368bebece90e2b587ace7e2087331 Author: Thibaut Paumard Date: Tue Dec 20 13:43:42 2011 +0100 fixup commit d86eda83a2c69ff2a70e9e199d13d2a2ff9c13c5 Author: Frederic Vincent Date: Tue Dec 20 13:08:09 2011 +0100 Modified Worldline::getCoord to insure theta and phi are in the correct range commit 45337cff4f381a18ab4d7a6a3678abebebd7e595 Author: Thibaut Paumard Date: Mon Dec 19 10:44:38 2011 +0100 PatternDisk: add opacity commit 9bf35b2e2e2b9787e429430cc5387753cfec96bb Author: Thibaut Paumard Date: Fri Dec 16 23:28:30 2011 +0100 add circularvelocity= to yorick/gyoto_Metric.C remove old syntax for gyoto_Metric (only the bject-oriented syntax remains) commit 77b437cab6f01762806a4b93ac6dc7f963c59df2 Author: Thibaut Paumard Date: Fri Dec 16 16:48:59 2011 +0100 support impactcoords precomputation directly in yorick commit 927f352f0208a7c9e9414daffc3362103033b461 Author: Thibaut Paumard Date: Fri Dec 16 13:44:20 2011 +0100 PatternDisk: + document gyoto_PatternDisk + add nu0() and dnu() methods, expose them in yorick commit a0cca2fb04b37137a1e1df31cc3ef4546d1d33f1 Author: Thibaut Paumard Date: Fri Dec 16 12:15:25 2011 +0100 + PatternDisk: * readFile() -> fitsRead() * add fitsWrite(), copyIntensity(), copyVelocity, copyGridRadius, getIntensity(), getVelocity(), getGridRadius(), repeatPhi() * expose all of this in yorick + GYOTO_DEBUG( << more) ; -> GYOTO_DEBUG << more << endl; + add GYOTO_QUIET, GYOTO_SEVERE, GYOTO_WARNING, GYOTO_MSG, GYOTO_INFO commit ac9537e1bb0904b3a9459a0c2810737c788c452c Author: Thibaut Paumard Date: Thu Dec 15 16:36:50 2011 +0100 + yorick/: add gyoto_ThinDisk, gyoto_PageThorneDisk, gyoto_PatternDisk + utils: add GYOTO_DEBUG(more) macro + add PatternDisk::getPatternVelocity() + fix bug in ThinDisk::setElement() which would blow up on DBL_MAX commit dfaff07a2890aff610a4d2ed406abdd8d7b80377 Author: Thibaut Paumard Date: Wed Dec 14 17:58:02 2011 +0100 API incompatible + bin/gyoto.C: fixed ug impacting --impact-coords + Astrobj: change philosophy concerning the Subcontractors: * add template Astrobj::Subcontractor(); * add Generic::setParameters() (used in the above); * setGenericParameter() -> setParameter; * implement setParameter() for all Astrobjs, setParameters() for some of them; * remove the Subcontractor and Init static member functions for all Astrobjs * setParameter() now returns an int; + Spectrum: setGenericParameter -> setParameter + Star: some new features to adapt to the above + yorick/gyoto_Astrobj.C: new keyword "setparameter" to set ANY parameter covered by setParameter()! commit 448f24b651776768b373081dc8893b03cc667414 Author: Thibaut Paumard Date: Tue Dec 13 16:08:01 2011 +0100 This is an API incompatible commit (should be seamless). + gyoto.C: remove --save option, add --impact-coords option, remove all the GYOTO_QUANTITY_IMPACT_* quantity and introduce the one-stop GYOTO_QUANTITY_IMPACTCOORDS (affects many classes) + Scenery: * Scenery::rayTrace(), Scenery::operator()(): accept argument impactcoords and skip ray-tracing in that case; reome "save" argument; * reintroduce tlim_ member; * add a Photon member to avoid reallocating memory each time operator()() (or rayTrace()) is called; + Make Worldline::getTlim() const; + yorick/: also accept impactcoords as input, remove adaptive raytracing (broken, unmaintainable, never really worked) commit 5786a225d86dd25b56a773fca5fba6f847048a46 Author: Eric Gourgoulhon Date: Mon Dec 12 16:21:02 2011 +0100 Added reference to the published paper for the html documentation. commit 92b91d465129a705931e1eddcfe6077aa7527dd0 Author: Eric Gourgoulhon Date: Mon Dec 12 14:15:03 2011 +0100 Changed to in the include commit e771ec0d895bf28a14ecb6522503f83dafc3830c Author: Thibaut Paumard Date: Sun Dec 11 00:24:00 2011 +0100 + Add Astrobj::PatternDisk class + Add ThinDisk::projectedRadius() method + Add GYOTO_USE_CFITSIO macro commit 78c15ef47d1812d89f86720da75c3a51d75bbc6c Author: Thibaut Paumard Date: Wed Dec 7 22:12:47 2011 +0100 + Add ThinDisk * replace ThinInfiniteDisk* with PageThorneDisk + Metric: * circularVelocity() works outside the equatorial plane * add KerrKS::circularVelocity() * fix bug in KerrBL::circularVelocity() * add Metric::Generic::cartesianVelocity() + add GyotoFunctors.h commit ed8537709f0c62d22d7d4e038fe020b8688fd42d Author: Thibaut Paumard Date: Tue Dec 6 15:09:02 2011 +0100 Introduce Astrobj::Standard. Geometrically thick objects which use the operator() paradigm should inherit from Standard instead of Generic. commit b8347aff4f30e8d9c2f0c59d4811a8d81ea19028 Author: Thibaut Paumard Date: Fri Dec 2 11:47:20 2011 +0100 Improve documentation Make Astrobj::Generic::clone() pure virtual, it's trivial to implement it for each object. commit 5b4f41a3c159de2505edc57351b69f4fcfc6ad8a Author: Thibaut Paumard Date: Thu Dec 1 23:26:19 2011 +0100 Document UniformSphere Make Astrobj::kind_ const Modify example-fixed-star.xml to lower opacity commit b3b679c42b37163ef106341dd1fbc6ae08da7194 Author: Thibaut Paumard Date: Thu Dec 1 18:11:39 2011 +0100 Add Gyoto::Photon::Refined class, which makes Gyoto:ComplexAstrobj::Impact() more robust. commit dc0a2fff5930294fa9482afa5246beab16bdfd7c Author: Thibaut Paumard Date: Thu Dec 1 11:37:00 2011 +0100 Base Star and FixedStar on a common UniformSphere abstract Astrobj Bugfix in Star shape commit f58886a9a878147692810d1a078b388b9085ba01 Author: Thibaut Paumard Date: Thu Dec 1 00:08:09 2011 +0100 Add ComplexAstrobj commit 0ba165c4e1753331904440f6e1abb42f0bf3e815 Author: Thibaut Paumard Date: Fri Sep 23 08:57:34 2011 +0200 improve Metrics documentation add arXiv ref, change "submitted" to "accepted" commit 2874a408c49e65e16606f8d291dd6c8f42b2c258 Author: Thibaut Paumard Date: Wed Sep 21 15:50:25 2011 +0200 Document FactoryMessenger and generally improve documentation commit ecdfc837dab8ac9a71e640c3d392182f906ede0b Author: Thibaut Paumard Date: Tue Sep 20 17:59:01 2011 +0200 improve documentation commit d2a03dfadefeec01c3141231a207e0a514a533b0 Author: Thibaut Paumard Date: Mon Sep 19 16:26:04 2011 +0200 Add comment not to remove a line which should be useless but is not... commit a8ab52390945cea9438b71fb6a600ba722872690 Author: Thibaut Paumard Date: Mon Sep 19 15:06:01 2011 +0200 Fixup: apply namespace changes also to RotStar3_1 commit c4396dd3d3cf40a95d0feec7f99ee929fc4c5b24 Author: Thibaut Paumard Date: Mon Sep 19 14:59:31 2011 +0200 Create Astrobj namespace commit f9c5a321f5db470c27e29309e7c59e0db756cf70 Author: Thibaut Paumard Date: Mon Sep 19 11:42:49 2011 +0200 Introduce Gyoto::Metric namespace commit 61b7df2cee16aab3a70a0c0966f74981f84ac081 Author: Thibaut Paumard Date: Mon Sep 19 10:31:05 2011 +0200 fixup: RotStar commit 3fe5ece1f975277663e75235518d6dceb2a0fb0c Author: Thibaut Paumard Date: Mon Sep 19 10:07:45 2011 +0200 Rename factoryMessenger -# FactoryMessenger, provide a separate GyotoFactoryMessenger header file commit a1ddb199fda080f02561ceb3b91cba08d6d91227 Author: Thibaut Paumard Date: Sat Sep 17 17:49:25 2011 +0200 setSelfAttribute: size_t -> unsigned int commit 61236e51084e5f71950e94b873f2660a37d37c97 Author: Eric Gourgoulhon Date: Sat Sep 17 14:24:03 2011 +0200 Corrected HTML anchors commit ce3903f74098117c00eb9979bc4919b45ea2db05 Author: Thibaut Paumard Date: Sat Sep 17 10:14:14 2011 +0200 cast to SartPointee::Subcontractor_t* instead of void* commit 04c62d6b6b7a7ba10b01249b9ab0c57e79d6e848 Author: Thibaut Paumard Date: Fri Sep 16 22:44:01 2011 +0200 * fix many warnings commit d3a7ec0c9b63a6d5f4b557bcb2066469ab9a2d09 Author: Thibaut Paumard Date: Fri Sep 16 16:09:52 2011 +0200 Fix FTBFS: add factoryMessenger::setSelfAttribute(std::string, size_t) commit 3ebbad7c456e89270508400f249833f6cde192e9 Author: Thibaut Paumard Date: Fri Sep 16 14:41:18 2011 +0200 add Y_HOME_PKG in yorick commit f20bb153950055baf678097e16dab6c9024aafa1 Author: Thibaut Paumard Date: Fri Sep 16 11:41:44 2011 +0200 * add factoryMessenger::setSelfAttribute(,double) * change char* to char const * in Register::Init() * fix compilation warnings commit 0c180f4564e59a3fe7441bac592b8d6764aacfbf Author: Thibaut Paumard Date: Thu Sep 15 14:06:54 2011 +0200 Improve documentation and build system commit 63c7c42420cbcff45ea1174444857ba370e667ac Author: Frederic Vincent Date: Thu Sep 15 12:31:08 2011 +0200 Small change in KerrBL/RK4_adaptive cst check commit 731221ccaa11dde37d01ef3d9812ce9eef413846 Author: Frederic Vincent Date: Thu Sep 15 12:16:09 2011 +0200 Updated cst check in KerrBL/RK4_adaptive commit 6687a996c378e282c6634f1023f9305419930104 Author: Frederic Vincent Date: Thu Sep 15 09:35:51 2011 +0200 Compilation Warnings cleaning commit 50c0d2bf1775a601a447bfc74e26b6a8fb273ab6 Author: Frederic Vincent Date: Wed Sep 14 16:26:19 2011 +0200 In KerrBL.C/myrk4_adaptive changed cstest[4]->cstest[5] commit 20ad795f75d9d315236d37b38883c41ac7fa1050 Author: Thibaut Paumard Date: Tue Sep 13 23:55:31 2011 +0200 KerrBL: * cst has 5 elements: cst[4] == (Q==0. ? 1. : 1./Q ) * cst[0] is not norm but mu. Happens to be -norm. commit f3bd33ac33527a503a9bb627d472d2f2af38b7e9 Author: Thibaut Paumard Date: Tue Sep 13 21:47:06 2011 +0200 print QCarter with the warning commit 9d98673e5dcc2a26f652e06c0d8c28db199ac404 Author: Thibaut Paumard Date: Mon Sep 12 09:11:40 2011 +0200 add yorick .info file commit 146854c9d54fbf31f15812d1949c27ac837c9663 Author: Thibaut Paumard Date: Fri Sep 9 10:01:27 2011 +0200 fix spelling errors commit c0802b44531e1aa034b73589dbf21c32026e2cc5 Author: Thibaut Paumard Date: Fri Sep 9 09:26:53 2011 +0200 fixup commit 3d5416e9812cafebcf9992d2716ad1f336918fd5 Author: Thibaut Paumard Date: Fri Sep 9 08:52:43 2011 +0200 add files to generate yorick documentation commit 47ed49bd48f8ea9145c7a5b4c35a687f76754b90 Author: Thibaut Paumard Date: Thu Sep 8 08:39:35 2011 +0200 * Initialize Photon::freq_obs_ * KerrBL.C: special case Q==0. in tests * Screen::Screen(const Screen& o): fix copy constructor * Worldline::setMetric(): call setParticleProperties only if initcond set * Worldline::setInitialCondition(): avoid z axis in sperical coords * create libgyoto.so links (underlinux) during build and install * add gyotoy manpage * spell-checking * implement no display for check-yorick * fix SIGFPE when printing Star * check-yorick exits yorick (batch mode) commit aca6e3b562b0ed7b8121ed530604066ef7a81845 Author: Thibaut Paumard Date: Wed Sep 7 09:56:36 2011 +0200 fix: uninstall manpage from the right directory commit a668765731a9af5aaf195591a8279d42f58f2996 Author: Thibaut Paumard Date: Tue Sep 6 17:40:18 2011 +0200 Create directory $(DESTDIR)$(PREFIX)/lib/gyoto/$(SOVERS) commit a928a7533cec2476cb6a12aff4678f1392546ab6 Author: Thibaut Paumard Date: Tue Sep 6 16:13:04 2011 +0200 * Fix yorick/Makefile to look for ../lib/libgyoto.so.SOVERS * Search for plugins (and install them) in $(PREFIX)/lib/gyoto/$(SOVERS) commit bc0956337764c9311c6bc508bb1725716a4fae66 Author: Thibaut Paumard Date: Wed Aug 31 15:10:33 2011 +0200 * support DESTIDR in Makefiles * move man under share * fix gcc error in gyoto_Photon.C (address to temporary) * implement SONAME under Linux * improve lorene not loaded message * add run-time copyright statement commit 1d0bdcd27b9126911bb9d700776414308a3ff4b1 Author: Frederic Vincent Date: Wed Aug 31 14:46:57 2011 +0200 Bug in KerrKS.C corrected commit c27d01a1d43c019901f157de9104a7a1c2f158de Author: Frederic Vincent Date: Wed Aug 31 11:55:23 2011 +0200 Cosmetic changes in KerrBL, Photon, Scenery, Screen, Star, WlIntegState.C Changed stop condition in KerrKS.C commit ec3ccfc31f9dabbb1def411e07b738557f7e3602 Author: Thibaut Paumard Date: Tue Aug 30 17:33:50 2011 +0200 Initial import from private svn rev. 335 Gyoto-1.2.0/INSTALL000066400000000000000000000366101302352257300136540ustar00rootroot00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2013 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 command `./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 limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/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. Gyoto-1.2.0/INSTALL.Gyoto.md000066400000000000000000000222351302352257300153510ustar00rootroot00000000000000# INSTALLING GYOTO ## 0- Installing precompiled packages Gyoto comes prepackaged for some systems. Although the development version may be much more advanced at a given time, using pre-compiled binaries is the recommended way of using Gyoto for most users. ### Debian GNU/Linux Gyoto is part of Debian since Wheezy (Debian 7.0). Updated packages are made available through the official [backports infrastructure] (https://backports.debian.org/). Occasionally, even more advanced packages may be available at https://people.debian.org/~thibaut/. You can get a list of available packages with apt-cache search gyoto The most recent packages will install about everything in Gyoto with sudo apt-get install gyoto ### Ubuntu Gyoto is also part of Ubuntu at least since Raring (13.04). Updated versions are provided on our [personal package archive (PPA)] (https://launchpad.net/~paumard/+archive/ubuntu/gyoto/). Follow instructions on that page to add this PPA to your system. You can get a list of available packages with apt-cache search gyoto The most recent packages will install about everything in Gyoto with sudo apt-get install gyoto ### Mac OS X Precompiled binaries (or at least automatic compilation) is provided through [MacPorts] (http://www.macports.org/). With MacPorts installed, run: sudo port sync sudo port install Gyoto To get MPI parallelization, you must first install Boost with one of its MPI variant, then Gyoto with the same variant: sudo port install Boost +openmpi sudo port install Gyoto +openmpi ## 1- Downloading the source code If Gyoto is not packaged for your system or if you prefer to build from source, read on. The source code is available from [Github](https://github.com/gyoto/Gyoto): git clone git://github.com/gyoto/Gyoto.git Then the build process is, in a nutshell, after having installed the dependencies: ./git-post-merge ./configure make sudo make install sudo ldconfig The rest of this file details each step. ## 2- Installing the dependencies Please refer to [BUGS.md](BUGS.md) for known bugs in some versions of the following dependencies. Gyoto requires: - a C++ compiler. GCC 4.9 and above work very well. Several features require the C++11 standard. Clang/LLVM is discouraged, see [BUGS.md](BUGS.md). - xercesc-3 (recommended, required for the executable): http://xerces.apache.org/xerces-c/ - cfitsio (required for the executable and some of the Astrobj): http://heasarc.gsfc.nasa.gov/fitsio/ - libudunits2 (recommended, support for unit conversions): http://www.unidata.ucar.edu/software/udunits/ - boost >= 1.53 (required, contains the integrators). See [BUGS.md](BUGS.md). http://www.boost.org/ - an MPI implementation (tested with openmpi, optional). MPI uses boost features from boost.mpi, you must use the same version as boost.mpi is linked to. - Yorick (optional, provides an interface to the Yorick interpreted language, allowing to write Gyoto scripts): http://yorick.sourceforge.net/ Yorick users will also need the yorick-yutils add-on (https://github.com/frigaut/yorick-yutils) and may need to install the yorick-dev package (in particulat Debian/Ubuntu users). - Python (optional, provides an interface to the Python interpreted language, allowing to write Gyoto scripts). Python 2.7 and 3.4 have been tested. For building the Python bindings, the Python development files are naturally required (sometimes found in the python-dev or python3-dev package), as well as NumPy and Swig-2.0: https://www.python.org/ http://www.numpy.org/ http://www.swig.org/ Note that although fairly complete, the Python interface is likely to change in future releases. Be ready to adapt your scripts, or contact us is stability of the API is important for you. - LORENE (optional, the libgyoto-lorene plug-in can be built later): http://www.lorene.obspm.fr/ On some systems, LORENE must be built with -fPIC (GYOTO as well, but this is the default). - developers may need the GNU autotools: autoconf, automake, libtool. ## 3- Fixing the timestamps Unfortunately git does not preserve the timestamps of files, which confuses the the build system. The easiest way to do that is running a provided script each time you pull from our repository: ./git-post-merge This script contains instructions to automate this step if you plan of pulling again from github in the future. Alternatively, you could recreate the autotools-generated files using `autoreconf`. This requires the development tools autoconf, automake, libtool, and is really necessary only for developpers who modfied the the build system (configure.ac, */Makefile.am...) ## 4- Configuring Gyoto If all the dependencies are installed in standard places (/usr or /usr/local) and if the default prefix (/usr/local) is OK for you, this should do: ./configure You may need to pass some options or configuration variables. To list the available options: ./configure --help The standard GNU INSTALL file is provided next to this file and documents the most standard and obscure features. The --enable-release option is reserved for pre-compiled package maintainers. In short, don't use it, it is for us alone. Without this option, the library name will contain "-unreleased". This is to allow users to compile new versions without overriding the system-provided library by default. Binaries distributed e.g. by package managers should be compiled with --enable-release, but only when compiling code in the `stable` branch. Also, the configure script will append flags to the SONAME when features are not available, e.g. libgyoto-nompi.*. This limits the probability of linking with the wrong version of the library at run time. Note that there is no guarantee that two -unreleased builds are ABI compatible, even if they share the same SONAME, because the version information is incremented only immediately before making and official release. To select a different compiler than the default on your system, set the CC and CXX environment variables accordingly during the configure step: CC=gcc-4.8 CXX=g++-4.8 ./configure Example: assume you want to install in `${HOME}/mysoft`, that LORENE is in `${HOME}/mysoft/Lorene` (but `HOME_LORENE` is not set), and Xerces and CFITIO are in `/opt/local`: ./configure --prefix=${HOME}/mysoft \ --with-lorene=${HOME}/mysoft/Lorene \ CPPFLAGS=-I/opt/local/include \ LDFLAGS=-L/opt/local/lib ## 5- Building Gyoto make ## 6- Testing Gyoto includes a detailed check suite, including atomic tests writen in Yorick and Python as well as full ray-tracing tests. MPI tests and LORENE tests are run using separate Makefile targets. To run all the tests (which assumes that both Gyoto was configures with both MPI and LORENE): make check check-lorene check-mpi check-lorene-mpi Don't worry too much for the "severe" warnings. You can now open the resulting FITS files with ds9 (http://hea-www.harvard.edu/RD/ds9/) or spydr (http://www.maumae.net/yorick/doc/spydr_intro.php) or any other FITS-aware image viewer: spydr example-*.fits ## 7- Installing If installing to a system location (i.e. if you don't have right access to PREFIX), you need to gain root privileges using, for instance, su or sudo: Using su: su - # (type root password) make install make -C python install Using sudo: sudo make install (type your password) Under Linux, if installing to a system location, you may need to also run ldconfig -v as root (so most likely `sudo ldconfig -v`). ## 8- Setting your environment If installing in a non-standard place (e.g. under your home directory), you do not need to run ldconfig, but you need to adapt your environment for instance by adding the following lines to `${HOME}/.profile` (replace `` by the actual Gyoto prefix!). One Gyoto file installed in each directory is listed as a comment: export PREFIX= export PATH=${PREFIX}/bin:${PATH} # gyoto export LD_LIBRARY_PATH=${PREFIX}/lib:${LD_LIBRARY_PATH} # libgyoto*.so.* export MANPATH=${PREFIX}/share/man:${MANPATH} # gyoto.1 export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig # gyoto.pc Under Mac OS X, `LD_LIBRARY_PATH` is replaced by `DYLD_LIBRARY_PATH`. It goes beyond the scope of this manual to teach you how to set environment variables; if in doubt ask the local guru or google... By default, the Yorick plug-in is also installed under `${prefix}`. If Yorick itself is in `${prefix}`, then the plug-in will be installed directly with the rest of Yorick and hence will be found by Yorick. On the other hand, if Yorick is not under `${prefix}`, the plug-in may not be found immediately by Yorick. Assuming you used the default prefix (`/usr/local`), it should be sufficient to create a file named `${HOME}/Yorick/custom.i` containing the three following lines: require, "pathfun.i"; add_y_home,"/usr/local/lib/yorick/"; command_line= process_argv(); Under Debian and Ubuntu GNU/Linux, `/usr/local/lib/yorick/` is by default in Yorick search paths. Gyoto-1.2.0/Makefile.am000066400000000000000000000007461302352257300146600ustar00rootroot00000000000000ACLOCAL_AMFLAGS = -I m4 SUBDIRS=@mySUBDIRS@ @VERBATIM@ifneq ($(wildcard plugins/python/Makefile),) @VERBATIM@ SUBDIRS += plugins/python @VERBATIM@endif list-dirs: echo $(SUBDIRS) $(SUBDIRS): cd $@ ; $(MAKE) ChangeLog: git log --no-merges > ChangeLog check-mpi check-mpi-clean check-lorene check-lorene-clean check-lorene-mpi check-lorene-mpi-clean: if BUILD_GYOTO cd bin ; $(MAKE) $@ endif if HAVE_YORICK cd yorick ; $(MAKE) $@ endif .PHONY: $(SUBDIRS) install ChangeLog Gyoto-1.2.0/Makefile.in000066400000000000000000000745451302352257300147010ustar00rootroot00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = . DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.h.in $(top_srcdir)/include/GyotoConfig.h.in \ $(top_srcdir)/doc/Makefile.in $(top_srcdir)/doc/doxyfile.in \ $(top_srcdir)/doc/user_guide/Makefile.in \ $(top_srcdir)/yorick/Makefile.in \ $(top_srcdir)/yorick/stdplug/Makefile.in \ $(top_srcdir)/yorick/gyoto.info.in \ $(top_srcdir)/yorick/yorick1.in \ $(top_srcdir)/yorick/setpaths.i.in $(srcdir)/gyoto.in \ $(top_srcdir)/python/Makefile.in \ $(top_srcdir)/python/setup.py.in \ $(top_srcdir)/python/setup_std.py.in \ $(top_srcdir)/python/setup_lorene.py.in AUTHORS COPYING \ ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \ install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_append_compile_flags.m4 \ $(top_srcdir)/m4/ax_append_flag.m4 \ $(top_srcdir)/m4/ax_append_link_flags.m4 \ $(top_srcdir)/m4/ax_check_compile_flag.m4 \ $(top_srcdir)/m4/ax_check_link_flag.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ $(top_srcdir)/m4/ax_pkg_swig.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/ax_require_defined.m4 \ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/python.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 $(top_builddir)/include/GyotoConfig.h CONFIG_CLEAN_FILES = doc/Makefile doc/doxyfile doc/user_guide/Makefile \ yorick/Makefile yorick/stdplug/Makefile yorick/gyoto.info \ yorick/yorick1 yorick/setpaths.i gyoto python/Makefile \ python/setup.py python/setup_std.py python/setup_lorene.py CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-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 \ tags-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_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope 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__post_remove_distdir = $(am__remove_distdir) 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 DIST_TARGETS = dist-gzip 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@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BIBTEX = @BIBTEX@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_MPI_LDFLAGS = @BOOST_MPI_LDFLAGS@ BOOST_MPI_LDPATH = @BOOST_MPI_LDPATH@ BOOST_MPI_LIBS = @BOOST_MPI_LIBS@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SERIALIZATION_LDFLAGS = @BOOST_SERIALIZATION_LDFLAGS@ BOOST_SERIALIZATION_LDPATH = @BOOST_SERIALIZATION_LDPATH@ BOOST_SERIALIZATION_LIBS = @BOOST_SERIALIZATION_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXFLAGS_EXEC = @CXXFLAGS_EXEC@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYLIB_VAR = @DYLIB_VAR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FEATURES = @FEATURES@ FGREP = @FGREP@ GREP = @GREP@ GYOTO_PLUGIN_SFX = @GYOTO_PLUGIN_SFX@ HAVE_CXX11 = @HAVE_CXX11@ HOME_LORENE = @HOME_LORENE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEWHICH = @KPSEWHICH@ LD = @LD@ LDFLAGS = @LDFLAGS@ LDFLAGS_EXEC = @LDFLAGS_EXEC@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LORENECPPFLAGS = @LORENECPPFLAGS@ LORENELDFLAGS = @LORENELDFLAGS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAKE_S = @MAKE_S@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MPICXX = @MPICXX@ NM = @NM@ NMEDIT = @NMEDIT@ 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@ PDFLATEX = @PDFLATEX@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POW_LIB = @POW_LIB@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTENSION_SUFFIX = @PYTHON_EXTENSION_SUFFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ SYS = @SYS@ UDUNITS_CFLAGS = @UDUNITS_CFLAGS@ UDUNITS_LIBS = @UDUNITS_LIBS@ VERBATIM = @VERBATIM@ VERSINFO = @VERSINFO@ VERSION = @VERSION@ VIRTUALENV = @VIRTUALENV@ VIRTUALENV_FLAGS = @VIRTUALENV_FLAGS@ XERCES_CFLAGS = @XERCES_CFLAGS@ XERCES_LIBS = @XERCES_LIBS@ YORICK = @YORICK@ Y_INST_HOME = @Y_INST_HOME@ Y_INST_SITE = @Y_INST_SITE@ 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__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ 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@ localpkglibdir = @localpkglibdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ mySUBDIRS = @mySUBDIRS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkg_cflags = @pkg_cflags@ pkg_libs = @pkg_libs@ pkg_requires = @pkg_requires@ pkgpythondir = @pkgpythondir@ plugin_sfx = @plugin_sfx@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sovers = @sovers@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = @mySUBDIRS@ all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ include/GyotoConfig.h: include/stamp-h2 @test -f $@ || rm -f include/stamp-h2 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) include/stamp-h2 include/stamp-h2: $(top_srcdir)/include/GyotoConfig.h.in $(top_builddir)/config.status @rm -f include/stamp-h2 cd $(top_builddir) && $(SHELL) ./config.status include/GyotoConfig.h distclean-hdr: -rm -f config.h stamp-h1 include/GyotoConfig.h include/stamp-h2 doc/Makefile: $(top_builddir)/config.status $(top_srcdir)/doc/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ doc/doxyfile: $(top_builddir)/config.status $(top_srcdir)/doc/doxyfile.in cd $(top_builddir) && $(SHELL) ./config.status $@ doc/user_guide/Makefile: $(top_builddir)/config.status $(top_srcdir)/doc/user_guide/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ yorick/Makefile: $(top_builddir)/config.status $(top_srcdir)/yorick/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ yorick/stdplug/Makefile: $(top_builddir)/config.status $(top_srcdir)/yorick/stdplug/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ yorick/gyoto.info: $(top_builddir)/config.status $(top_srcdir)/yorick/gyoto.info.in cd $(top_builddir) && $(SHELL) ./config.status $@ yorick/yorick1: $(top_builddir)/config.status $(top_srcdir)/yorick/yorick1.in cd $(top_builddir) && $(SHELL) ./config.status $@ yorick/setpaths.i: $(top_builddir)/config.status $(top_srcdir)/yorick/setpaths.i.in cd $(top_builddir) && $(SHELL) ./config.status $@ gyoto: $(top_builddir)/config.status $(srcdir)/gyoto.in cd $(top_builddir) && $(SHELL) ./config.status $@ python/Makefile: $(top_builddir)/config.status $(top_srcdir)/python/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ python/setup.py: $(top_builddir)/config.status $(top_srcdir)/python/setup.py.in cd $(top_builddir) && $(SHELL) ./config.status $@ python/setup_std.py: $(top_builddir)/config.status $(top_srcdir)/python/setup_std.py.in cd $(top_builddir) && $(SHELL) ./config.status $@ python/setup_lorene.py: $(top_builddir)/config.status $(top_srcdir)/python/setup_lorene.py.in cd $(top_builddir) && $(SHELL) ./config.status $@ 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. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ 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" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 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__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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.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 u+w $(distdir) mkdir $(distdir)/_build $(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 \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=.. --prefix="$$dc_install_base" \ && $(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__post_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 config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: 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-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: .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip 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-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-am uninstall \ uninstall-am @VERBATIM@ifneq ($(wildcard plugins/python/Makefile),) @VERBATIM@ SUBDIRS += plugins/python @VERBATIM@endif list-dirs: echo $(SUBDIRS) $(SUBDIRS): cd $@ ; $(MAKE) ChangeLog: git log --no-merges > ChangeLog check-mpi check-mpi-clean check-lorene check-lorene-clean check-lorene-mpi check-lorene-mpi-clean: @BUILD_GYOTO_TRUE@ cd bin ; $(MAKE) $@ @HAVE_YORICK_TRUE@ cd yorick ; $(MAKE) $@ .PHONY: $(SUBDIRS) install ChangeLog # 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: Gyoto-1.2.0/NEWS000066400000000000000000000170531302352257300133220ustar00rootroot000000000000001.2.0 2016/12/12 ABI 6:0:0 * New functionality: the plug-in from which each subcontractor is registered is now tracked, so that it becomes possible to look for a subcontractor matching a specific kind and plug-in. We introduce the function Gyoto::requirePlugin() in addition to Gyoto::loadPlugin(). The subcontractor signature is changed to accept a second parameter, which breaks the API. * New functionality: thread-unsafe classes declare themselves as such, so that NThreads is ignored when multi-threading would cause erroneous results. 1.1.2 2016/12/10 FTR * New Metrics in stdplug: ChernSimons, RezzollaZhidenko. * New Astrobjs in stdplug: DeformedTorus, DynamicalDiskBolometric, EquatorialHotSpot, InflateStar, OscilTorus. * Allow specifying plug-in by file name. * Support colon syntax of mpirun (bypassing MPI_Comm_spawn()). * Support mpirun -np option for Open MPI (bypassing MPI_Comm_spawn()). 1.1.1 2016/10/30 BUG * When Gyoto is configured to be installed in another prefix than /usr/local/, look into two additional directories when loading plug-ins: /usr/local/lib/gyoto// and /usr/local/lib/gyoto/. * The name of the versioned directories for plug-ins ( above) is now the major version of the library, so users don't need to reinstall there plug-ins when ugrading Gyoto to a binary-compatible release. * --enable-hardening now also enables -fPIE. * Yorick: actually implement `picture' painter for the matte_paint framework. Allow using any two or three-dimensional image or stack of images in the `picture' and `panorama' painters. * Include minimal plug-in example in plugins/null/. 1.1.0 2016/09/12 ABI 4 (5:0:0) * New functionality: provide a plug-in for writing new Metrics, Astrobjs and Spectra in Python. * New functionality: objects can describe there own properties. This feature is accessible through the help() method in the Python and Yorick interfaces and through -h on the command-line: "gyoto -hMetric::KerrBL" * New functionality: adding a flag to highligh the shadow region in a strong-field image * Various improvements and bug fixes in the Python extension. * Yorick: Add more functions to control the floating-point environment from Yorick. * Screen: properly parse "Mask" as a filename * KerrKS: remove specific integrator, which has never worked well. * PowerLawSpectrum: add cut-offs. * DirectionalDisk: add cutoff in lamp/disk frames. * PolishDoughnut: add central_temperature_ parameter. 1.0.2 2015/06/26 BUG * Fix FTBFS with gcc 5.0; * Improve fenv support and lack thereof with some compilers; * Distinguish size_t from unsigned long in Gyoto::Value; * Rewrite option parsing in `gyoto' command line utility, add many options: short options, -i/-j, -E, -X... see manpage and $ gyoto --help * Fix many compile-time warnings, including potentially harmfull undefined behavior; * KerrKS is not work-in-progress anymore, but it's specific integrator is known to be buggy (and issues a severe warning when used). * Several small bug-fixes, see ChangeLog for details. 1.0.1 2015/05/27 PKG * Add 3rd clause of BSD license to python/doxy2swig.py; * Add Odele to AUTHORS; * Bugfixes in configure.ac: use BOOST_*_LIBS variables instead of hardcoding one possible value, make it possible to build when python is installed but with an unsupported version. 1.0.0 2015/05/25 ABI 3 * New functionality: MPI-based parallelisation. * New functionality: Python extension. * New functionality: most classes now derive from Gyoto::Object and have "Properties" (instances of Gyoto::Property). This provides for some introspection which is used notably in the Yorick plug-in and simplifies writing new derived classes. * Change Scenery::rayTrace() API, replacing i/jmin and max with a new concept Screen::Coord2dSet. This allows using the same code-path for both the gyoto utility and all the yorick use cases. * Update PolishDoughnut to support numerical (non-Kerr) metrics. * New spectrum: Gyoto::Spectrum::ThermalBremsstrahlung. * The usual lot of bug fixes and enhancements. 0.2.3 2014/10/21 BUG * Fix minor memory management bug in yotck/gyoto_Scenery.C 0.2.2 2014/09/19 BUG * Correct Metric:: and KerrBL::circularVelocity(). 0.2.1 2014/07/22 ABI 2.1 * ABI is backward compatible with 0.2.0. * Support for the special values DBL_MAX, DBL_MIN, -DBL_MAX and -DBL_MIN is any scalar floating-point value in XML i/o. This avoids loss of precission or SGFPE when saving/restoring certain default value in XML files. * Bug fix: avoid buffer overflow in Factory. 0.2.0 2014/07/21 ABI 2 * New integrators, require Boost >= 1.93 and C++11. The new integrators live in Worldline::IntegState, not in the Metric. Read the user guide for more details, as well as the doxygen documentation for the Scenery class. * New Metrics: Minkowski, NumericalMetricLorene * New Astrobjs: DirectionalDisk, StarTrace, ThinDiskIronLine * Give access to some numerical parameters of the RK4 integrator * Include LaTeX user guide * Yorick plug-in API change: the dot operator has changed its meaning. Codes that used it may require updating. Examples: m = gg.mass -> m =gg.mass() obj=gg.clone -> obj=gg.clone() scenery.screen(resolution=128) -> screnery.screen.resolution(128) scenery.astrobj(initcoord=x,v) -> scenery.astrobj()(initcoord=x,v) * Rename methods from from setMass()/getMass() style to mass()/mass() style. Macro with the old names are provided in GyotoDefs.h, triggering a deprecation warning. Code may break nevertheless, typically in two cases: + if the new name was used as a variable name in your code: please change the variable name; + if your derived class overloaded only one of the two accessors (e.g. only setMetric, not getMetric): in this example add using Generic::metric; in your derived class definition. To get rid of the deprecation warning, define the GYOTO_NO_DEPRECATED macro, for instance "make CPPFLAGS=-DGYOTO_NO_DEPRECATED" * Serious bug fixes and improvements in PolishDoughnut * Replaced Disk3D_BB with DynamicalDisk3D * Disk3D now has an opacity * Make KerrKS work (using the generic integrator only) * New interface: work in progress (WIP), to mark classes that are known to be broken. Instanciating such a class yields a warning. * Update build systems to current autotools * Implement mask in screen to compute only parts of an image * Improve behaviour for emitter or observer far from massive object 0.1.0 2013/07/27 ABI 1 * add units system * add PolishDoughnut astrobj * use pkg-config * gyotoy ported to yorick-gy instead of python * in Worldline, Photon and Scenery: rename tlim to tmin, default value is -DBL_MAX. * add a mutli-wavelength flavour of Astrobj::emission() * install yorick plug-in under ${prefix}, not necessarily in Y_HOME * add plugin attribute to the Metric, Astrobj and Spectrum entities * reform build system to use the autotools * add --plugins command-line option * add virtual destrcuctor to Spectrum::Generic * fix buffer overflow in lib/Factory.C * update paper ref in bin/gyoto.C 0.0.3 2012/05/01 BUG * fix a tiny bug in PatternDisk (initialization of phimin/max) * rearrange flags in Makefiles/local_settings for easier downstream packaging 0.0.2 2012/04/19 PKG * install include files in include/Gyoto * add this ChangeLog 0.0.1 2012/04/16 ABI 0 * release Gyoto-1.2.0/README.Developers000066400000000000000000000047141302352257300156120ustar00rootroot00000000000000Dear Gyoto developers, A few notes on maintenance: Before each commit: =================== * If you touched configure.ac or any Makefile.am file, run autoreconf and commit the regenerated files (configure, Makefile*.in) * Run make check. If possible, build the yorick plug-in so that make-check will do the detailed regression testing suite. * Check that the files you are commiting have correct Copyright information, including the years. If needed, use "git blame to check who modified this file and when. * Add something in the NEWS file. The NEWS file should contain an entry for the next release, put your note in there. * If this commit changes the user manual, update the date on the title page. To make a new release: ====================== * Check with the team whether they had plans for this release. * Update the date in the user manual. Check the right date by using git log doc/user_guide and edit doc/user_guide/GyotoManual.tex accordingly. * Choose a version number. Version is MAJOR.MINOR.MICRO. Bump MAJOR when significant new feature are there; update MINOR for continued development of existing features; update MICRO for bugfix or packaging releasing. * Edit configure.ac + update the version info in AC_INIT + update VERSINFO according to http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html Note that this VERSINFO has nothing to do with the Gyoto version. + run autoreconf. * Edit NEWS + add a new entry (or change the one which has not been released yet) + mark the release either "ABI n" if the ABI changed, "BUG" if its a simple backwards-compatible bugfix release, PKG if only the packaging has been changed. + document shortly what has changed in Gyoto: new features, significant bug fixes... * Regenerate ChangeLog: + run "git log --no-merges > ChangeLog" + add an item on top which should correspond to the log message that you will use for the *next* commit (the one that does the release). Use "unknown" as commit identifier and the output of "LANG=C date --rfc-822" as date. * Make clean, configure, make, make check again. * Commit the changes. * If releasing another branch than stable: merge this branch into stable, make sure the two branches can be merged both ways and are identical, merge stable into master. * Tag the release using the version as tag name. Use a signed tag: "git tag -s 1.0.0". * Take a coffee break. Regards, Thibaut. Gyoto-1.2.0/README.lorene000066400000000000000000000033721302352257300147650ustar00rootroot00000000000000 *** Activating LORENE in Gyoto *** Building the libgyoto-lorene plug-in 3+1 metrics support in Gyoto is implemented in the lorene plug-in, based on the LORENE library. I- BUILDING TOGETHER WITH GYOTO =============================== To enable it at build time, download LORENE from http://www.lorene.obspm.fr/, compile liblorene.a with the -fPIC CFLAG (i.e. check that the CFLAG variable defined in LORENE's local_settings file contains "-fPIC"), and set the HOME_LORENE variable according to the LORENE manual. If HOME_LORENE is defined when compiling Gyoto, the lorene plug-in is automatically built and installed. II- TESTING LIBGYOTO-LORENE ============================ Two example files are provided in doc/examples/: example-*-rotstar3_1.xml. They allow to ray-trace a moving/motionless star orbiting in the space-time of a relativistic rotating star. To run these examples: 1- Run make in $HOME_LORENE/Codes/Nrotstar: $ cd $HOME_LORENE/Codes/Nrotstar $ make 2- Prepare parameter files par_eos.d and par_rot.d, for instance $ cp Parameters/GR/Kepler/*.d ./ 3- Run the executable nrotstar to obtain the result file resu.d $ ./nrotstar 4- Update the file location in example-*-rotstar3_1.xml or copy resu.d to the Gyoto examples directory: $ cd - $ cp $HOME_LORENE/Codes/Nrotstar/resu.d doc/examples/ 5- Run GYOTO with example-*-rotstar3_1.xml. Assuming Gyoto is installed: $ gyoto doc/examples/example-fixedstar_rotstar3_1.xml out1.fits $ gyoto doc/examples/example-movingstar_rotstar3_1.xml out2.fits If gyoto is not installed replace "gyoto" above by: - under Linux: LD_LIBRARY_PATH=lib:$LD_LIBRARY_PATH bin/gyoto - under Mac OS X: DYLD_LIBRARY_PATH=lib:$DYLD_LIBRARY_PATH bin/gyotoGyoto-1.2.0/README.md000066400000000000000000000053311302352257300140760ustar00rootroot00000000000000# GYOTO: the General relativitY Orbit Tracer of Observatoire de Paris ## What Gyoto is [Gyoto](http://gyoto.obspm.fr/) aims at providing a framework for computing orbits and ray-traced images in General relativity. It consists in a library (libgyoto), utility programs, and a plug-in for the Yorick programing language. We request that use of Gyoto in scientific publications be properly acknowledged. Please cite: GYOTO: a new general relativistic ray-tracing code, F. H. Vincent, T. Paumard, E. Gourgoulhon & G. Perrin, Classical and Quantum Gravity 28, 225011 (2011) [arXiv:1109.4769] We also request that Gyoto modifications, extensions or plug-ins leading to a scientific publication be made public as free software reasonably fast (within one year after publication of the scientific paper), for instance by contributing it directly to the Gyoto code base. Contributors will be listed in the relevant source files as well as in the AUTHORS file in the package. ## Copyright information Gyoto is Copyright 2011-2015 Thibaut Paumard, Frédéric Vincent and Odele Straub (To ease reading on non-UTF8 systems, French accents are omitted in file headers). Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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](COPYING) along with Gyoto. If not, see . File python/doxyfile.py is Copyright 2008 Prabhu Ramachandran under BSD style license. File python/numpy.i is Copyright (c) 2005-2015, NumPy Developers under BSD 3-clause license. File bin/optionparser.h is Copyright (C) 2012 Matthias S. Benkmann. See each file for details. ## Installation instructions Refer to the file [INSTALL.Gyoto.md](INSTALL.Gyoto.md) for building and installing Gyoto. Several sample files are provided in doc/examples. You can ray-trace those sceneries with: gyoto FITS files can be read by a variety of free and proprietary software. See http://heasarc.gsfc.nasa.gov/docs/heasarc/fits.html. ## Extending Gyoto Custom metrics and astronomical objects can be added fairly easily by implementing them as a Gyoto plug-in. This, of course, requires knowledge of the C++ language. The [user manual](http://gyoto.obspm.fr/GyotoManual.pdf) contains detailed instructions. -- Thibaut Paumard, Thu Dec 08 2016. Gyoto-1.2.0/TODO.md000066400000000000000000000012111302352257300136770ustar00rootroot00000000000000# Gyoto to-do list This file keeps track of some issues that the Gyoto developers should attend to at their earliest convenience: ## stdplug: All: Add/check doxygen comments in header file and document properties in C++ source file ChernSimons: Document RezzollaZhidenko: Document and provide example DeformedTorus: Document and provide example DynamicalDiskBolometric: Document and provide example EquatorialHotspot: Document and provide example InflateStar: Document and provide example OscilTorus: Document ## libgyoto: Scenery: Apply Object/Property paradigm Gyoto-1.2.0/aclocal.m4000066400000000000000000001227561302352257300144720ustar00rootroot00000000000000# generated automatically by aclocal 1.14.1 -*- Autoconf -*- # Copyright (C) 1996-2013 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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' 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.14.1], [], [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.14.1])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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$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-2013 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. # 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", "OBJC", "OBJCXX", "UPC", or "GJC". # 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 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" 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 10 /bin/sh. echo '/* dummy */' > 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], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) 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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf 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"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # 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.65])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], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) 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], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [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([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # 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])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro 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 # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi ]) 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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 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-2013 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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 is modern enough. # If it is, 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 --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_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}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/ax_append_compile_flags.m4]) m4_include([m4/ax_append_flag.m4]) m4_include([m4/ax_append_link_flags.m4]) m4_include([m4/ax_check_compile_flag.m4]) m4_include([m4/ax_check_link_flag.m4]) m4_include([m4/ax_cxx_compile_stdcxx_11.m4]) m4_include([m4/ax_pkg_swig.m4]) m4_include([m4/ax_pthread.m4]) m4_include([m4/ax_require_defined.m4]) m4_include([m4/boost.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/pkg.m4]) m4_include([m4/python.m4]) Gyoto-1.2.0/bin/000077500000000000000000000000001302352257300133655ustar00rootroot00000000000000Gyoto-1.2.0/bin/Makefile.am000066400000000000000000000113461302352257300154260ustar00rootroot00000000000000ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -I@top_srcdir@/include $(XERCES_CFLAGS) $(UDUNITS_CFLAGS) $(BOOST_CPPFLAGS) \ -DPACKAGE_STRING="$(PACKAGE_STRING)" AM_LDFLAGS = $(XERCES_LIBS) $(PTHREAD_LIBS) $(LDFLAGS_EXEC) AM_CXXFLAGS = $(PTHREAD_CFLAGS) $(CXXFLAGS_EXEC) CLEANFILES = bin_PROGRAMS = dist_man_MANS = if BUILD_GYOTO bin_PROGRAMS += gyoto dist_man_MANS += gyoto.1 endif if HAVE_MPI AM_LDFLAGS += $(BOOST_MPI_LDFLAGS) $(BOOST_MPI_LIBS) \ $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) bin_PROGRAMS += gyoto-mpi-worker.@sovers@ dist_man_MANS += gyoto-mpi-worker.@sovers@.1 CLEANFILES += gyoto-mpi-worker.@sovers@.1 endif gyoto_SOURCES = gyoto.C gyoto_LDADD = @top_builddir@/lib/libgyoto@FEATURES@.la gyoto_CPPFLAGS = $(AM_CPPFLAGS) $(CFITSIO_CFLAGS) gyoto_LDFLAGS = $(AM_LDFLAGS) $(CFITSIO_LIBS) -export-dynamic gyoto_mpi_worker_@sovers@_SOURCES = gyoto-mpi-worker.C gyoto_mpi_worker_@sovers@_LDADD = @top_builddir@/lib/libgyoto@FEATURES@.la gyoto_mpi_worker_@sovers@_CPPFLAGS = $(AM_CPPFLAGS) $(CFITSIO_CFLAGS) gyoto_mpi_worker_@sovers@_LDFLAGS = $(AM_LDFLAGS) $(CFITSIO_LIBS) -export-dynamic gyoto-mpi-worker.@sovers@.1: gyoto-mpi-worker.1 cp $^ $@ export PATH := .:$(PATH) EXAMPLE_DIR = $(top_srcdir)/doc/examples/ CHECK_RESULTS = \ example-thin-disk.fits \ example-thin-disk-KS.fits \ example-thin-disk-minkowski-cartesian.fits \ example-thin-disk-minkowski-spherical.fits \ example-complex-astrobj.fits \ example-fixed-star.fits \ example-fixed-star-minkowski-cartesian.fits \ example-fixed-star-minkowski-spherical.fits \ example-startrace.fits \ example-moving-star.fits \ example-moving-star-CS.fits \ example-page-thorne-disk-BL.fits \ example-page-thorne-disk-KS.fits \ example-page-thorne-disk-BL-with-basis.fits \ example-torus.fits \ example-torus-KS.fits \ example-oscil-torus.fits if HAVE_UDUNITS CHECK_RESULTS += \ example-fixed-star-KS.fits \ example-polish-doughnut.fits endif CHECK_MPI_RESULTS = $(CHECK_RESULTS:.fits=-mpi.fits) CLEANFILES += $(CHECK_RESULTS) $(CHECK_MPI_RESULTS) MPIRUN = mpirun CHECK_ENV = LD_LIBRARY_PATH=@top_builddir@/lib/.libs/:$(LD_LIBRARY_PATH) CHECK_RAW_CMD = ./gyoto -pstdplug -r32 -T8 -P0 CHECK_CMD = $(CHECK_ENV) $(CHECK_RAW_CMD) check-nompi-clean: rm -f $(CHECK_RESULTS) check-mpi-clean: rm -f $(CHECK_MPI_RESULTS) if BUILD_GYOTO $(CHECK_RESULTS): gyoto $(EXAMPLE_DIR)$(@:.fits=.xml) $(CHECK_CMD) $(EXAMPLE_DIR)$(@:.fits=.xml) \!$@ $(CHECK_MPI_RESULTS): gyoto $(EXAMPLE_DIR)$(@:-mpi.fits=.xml) $(CHECK_ENV) $(MPIRUN) $(CHECK_RAW_CMD) -P4 $(EXAMPLE_DIR)$(@:-mpi.fits=.xml) \!$@ check-nompi-compute: $(CHECK_RESULTS) check-nompi: check-nompi-clean check-nompi-compute check-mpi-compute: $(CHECK_MPI_RESULTS) check-mpi: check-mpi-clean check-mpi-compute check: check-nompi if HAVE_LORENE # make check-lorene check-lorene-mpi # Will # 1- copy the Nrotstar directory from HOME_LORENE into .check-lorene; # 2- configure Nrotstar by copying par_eos.d and par_rot.d from GR/Kepler; # 3- build Nrotstar/nrotstar; # 4- run it to build Nrotstar/resu.d; # 5- ray-trace ../doc/examples/example-*-rotstar3_1.xml twice # (with and without MPI). export HOME_LORENE .check-lorene/resu.d: rm -Rf .check-lorene cp -a $(HOME_LORENE)/Codes/Nrotstar ./.check-lorene cd .check-lorene && rm -f nrotstar *.o cd .check-lorene && cp -f Parameters/GR/Kepler/*.d ./ cd .check-lorene && $(SED) -i.bak 's/1 graph/0 graph/' par_rot.d cd .check-lorene && $(MAKE) cd .check-lorene && ./nrotstar CHECK_ROTSTAR_RESULTS = example-movingstar-rotstar3_1.fits example-fixedstar-rotstar3_1.fits CHECK_ROTSTAR_MPI_RESULTS = $(CHECK_ROTSTAR_RESULTS:.fits=-mpi.fits) CLEANFILES += $(CHECK_ROTSTAR_RESULTS) $(CHECK_ROTSTAR_MPI_RESULTS) $(CHECK_ROTSTAR_MPI_RESULTS): gyoto $(EXAMPLE_DIR)$(@:-mpi.fits=.xml) .check-lorene/resu.d $(CHECK_ENV) $(MPIRUN) $(CHECK_RAW_CMD) -pstdplug,lorene -P4 $(EXAMPLE_DIR)$(@:-mpi.fits=.xml) \!$@ $(CHECK_ROTSTAR_RESULTS): gyoto $(EXAMPLE_DIR)$(@:.fits=.xml) .check-lorene/resu.d $(CHECK_CMD) -pstdplug,lorene -T0 $(EXAMPLE_DIR)$(@:.fits=.xml) \!$@ check-lorene-clean: rm -f $(CHECK_ROTSTAR_RESULTS) check-lorene-compute: $(CHECK_ROTSTAR_RESULTS) check-lorene: check-lorene-clean check-lorene-compute check-lorene-mpi-clean: rm -f $(CHECK_ROTSTAR_RESULTS) check-lorene-mpi-compute: $(CHECK_ROTSTAR_MPI_RESULTS) check-lorene-mpi: check-lorene-mpi-clean check-lorene-mpi-compute endif endif clean-local: -rm -rf .check-lorene .PHONY: check-nompi-compute check-nompi-clean check-nompi check-mpi-clean check-mpi-compute check-mpi check check-lorene-clean check-lorene-compute check-lorene check-lorene-mpi-clean check-lorene-mpi-compute check-lorene-mpi check Gyoto-1.2.0/bin/Makefile.in000066400000000000000000001066441302352257300154450ustar00rootroot00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) @BUILD_GYOTO_TRUE@am__append_1 = gyoto @BUILD_GYOTO_TRUE@am__append_2 = gyoto.1 @HAVE_MPI_TRUE@am__append_3 = $(BOOST_MPI_LDFLAGS) $(BOOST_MPI_LIBS) \ @HAVE_MPI_TRUE@ $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) @HAVE_MPI_TRUE@am__append_4 = gyoto-mpi-worker.@sovers@ @HAVE_MPI_TRUE@am__append_5 = gyoto-mpi-worker.@sovers@.1 @HAVE_MPI_TRUE@am__append_6 = gyoto-mpi-worker.@sovers@.1 @HAVE_UDUNITS_TRUE@am__append_7 = \ @HAVE_UDUNITS_TRUE@ example-fixed-star-KS.fits \ @HAVE_UDUNITS_TRUE@ example-polish-doughnut.fits @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@am__append_8 = $(CHECK_ROTSTAR_RESULTS) $(CHECK_ROTSTAR_MPI_RESULTS) subdir = bin DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(dist_man_MANS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_append_compile_flags.m4 \ $(top_srcdir)/m4/ax_append_flag.m4 \ $(top_srcdir)/m4/ax_append_link_flags.m4 \ $(top_srcdir)/m4/ax_check_compile_flag.m4 \ $(top_srcdir)/m4/ax_check_link_flag.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ $(top_srcdir)/m4/ax_pkg_swig.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/ax_require_defined.m4 \ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/python.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 \ $(top_builddir)/include/GyotoConfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @BUILD_GYOTO_TRUE@am__EXEEXT_1 = gyoto$(EXEEXT) @HAVE_MPI_TRUE@am__EXEEXT_2 = gyoto-mpi-worker.@sovers@$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) am_gyoto_OBJECTS = gyoto-gyoto.$(OBJEXT) gyoto_OBJECTS = $(am_gyoto_OBJECTS) gyoto_DEPENDENCIES = @top_builddir@/lib/libgyoto@FEATURES@.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = gyoto_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(gyoto_LDFLAGS) $(LDFLAGS) -o $@ am_gyoto_mpi_worker_@sovers@_OBJECTS = \ gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.$(OBJEXT) gyoto_mpi_worker_@sovers@_OBJECTS = \ $(am_gyoto_mpi_worker_@sovers@_OBJECTS) gyoto_mpi_worker_@sovers@_DEPENDENCIES = \ @top_builddir@/lib/libgyoto@FEATURES@.la gyoto_mpi_worker_@sovers@_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) \ $(gyoto_mpi_worker_@sovers@_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(gyoto_SOURCES) $(gyoto_mpi_worker_@sovers@_SOURCES) DIST_SOURCES = $(gyoto_SOURCES) $(gyoto_mpi_worker_@sovers@_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 NROFF = nroff MANS = $(dist_man_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BIBTEX = @BIBTEX@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_MPI_LDFLAGS = @BOOST_MPI_LDFLAGS@ BOOST_MPI_LDPATH = @BOOST_MPI_LDPATH@ BOOST_MPI_LIBS = @BOOST_MPI_LIBS@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SERIALIZATION_LDFLAGS = @BOOST_SERIALIZATION_LDFLAGS@ BOOST_SERIALIZATION_LDPATH = @BOOST_SERIALIZATION_LDPATH@ BOOST_SERIALIZATION_LIBS = @BOOST_SERIALIZATION_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXFLAGS_EXEC = @CXXFLAGS_EXEC@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYLIB_VAR = @DYLIB_VAR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FEATURES = @FEATURES@ FGREP = @FGREP@ GREP = @GREP@ GYOTO_PLUGIN_SFX = @GYOTO_PLUGIN_SFX@ HAVE_CXX11 = @HAVE_CXX11@ HOME_LORENE = @HOME_LORENE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEWHICH = @KPSEWHICH@ LD = @LD@ LDFLAGS = @LDFLAGS@ LDFLAGS_EXEC = @LDFLAGS_EXEC@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LORENECPPFLAGS = @LORENECPPFLAGS@ LORENELDFLAGS = @LORENELDFLAGS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAKE_S = @MAKE_S@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MPICXX = @MPICXX@ NM = @NM@ NMEDIT = @NMEDIT@ 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@ PDFLATEX = @PDFLATEX@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POW_LIB = @POW_LIB@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTENSION_SUFFIX = @PYTHON_EXTENSION_SUFFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ SYS = @SYS@ UDUNITS_CFLAGS = @UDUNITS_CFLAGS@ UDUNITS_LIBS = @UDUNITS_LIBS@ VERBATIM = @VERBATIM@ VERSINFO = @VERSINFO@ VERSION = @VERSION@ VIRTUALENV = @VIRTUALENV@ VIRTUALENV_FLAGS = @VIRTUALENV_FLAGS@ XERCES_CFLAGS = @XERCES_CFLAGS@ XERCES_LIBS = @XERCES_LIBS@ YORICK = @YORICK@ Y_INST_HOME = @Y_INST_HOME@ Y_INST_SITE = @Y_INST_SITE@ 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__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ 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@ localpkglibdir = @localpkglibdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ mySUBDIRS = @mySUBDIRS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkg_cflags = @pkg_cflags@ pkg_libs = @pkg_libs@ pkg_requires = @pkg_requires@ pkgpythondir = @pkgpythondir@ plugin_sfx = @plugin_sfx@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sovers = @sovers@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -I@top_srcdir@/include $(XERCES_CFLAGS) $(UDUNITS_CFLAGS) $(BOOST_CPPFLAGS) \ -DPACKAGE_STRING="$(PACKAGE_STRING)" AM_LDFLAGS = $(XERCES_LIBS) $(PTHREAD_LIBS) $(LDFLAGS_EXEC) \ $(am__append_3) AM_CXXFLAGS = $(PTHREAD_CFLAGS) $(CXXFLAGS_EXEC) CLEANFILES = $(am__append_6) $(CHECK_RESULTS) $(CHECK_MPI_RESULTS) \ $(am__append_8) dist_man_MANS = $(am__append_2) $(am__append_5) gyoto_SOURCES = gyoto.C gyoto_LDADD = @top_builddir@/lib/libgyoto@FEATURES@.la gyoto_CPPFLAGS = $(AM_CPPFLAGS) $(CFITSIO_CFLAGS) gyoto_LDFLAGS = $(AM_LDFLAGS) $(CFITSIO_LIBS) -export-dynamic gyoto_mpi_worker_@sovers@_SOURCES = gyoto-mpi-worker.C gyoto_mpi_worker_@sovers@_LDADD = @top_builddir@/lib/libgyoto@FEATURES@.la gyoto_mpi_worker_@sovers@_CPPFLAGS = $(AM_CPPFLAGS) $(CFITSIO_CFLAGS) gyoto_mpi_worker_@sovers@_LDFLAGS = $(AM_LDFLAGS) $(CFITSIO_LIBS) -export-dynamic EXAMPLE_DIR = $(top_srcdir)/doc/examples/ CHECK_RESULTS = example-thin-disk.fits example-thin-disk-KS.fits \ example-thin-disk-minkowski-cartesian.fits \ example-thin-disk-minkowski-spherical.fits \ example-complex-astrobj.fits example-fixed-star.fits \ example-fixed-star-minkowski-cartesian.fits \ example-fixed-star-minkowski-spherical.fits \ example-startrace.fits example-moving-star.fits \ example-moving-star-CS.fits example-page-thorne-disk-BL.fits \ example-page-thorne-disk-KS.fits \ example-page-thorne-disk-BL-with-basis.fits example-torus.fits \ example-torus-KS.fits example-oscil-torus.fits $(am__append_7) CHECK_MPI_RESULTS = $(CHECK_RESULTS:.fits=-mpi.fits) MPIRUN = mpirun CHECK_ENV = LD_LIBRARY_PATH=@top_builddir@/lib/.libs/:$(LD_LIBRARY_PATH) CHECK_RAW_CMD = ./gyoto -pstdplug -r32 -T8 -P0 CHECK_CMD = $(CHECK_ENV) $(CHECK_RAW_CMD) @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@CHECK_ROTSTAR_RESULTS = example-movingstar-rotstar3_1.fits example-fixedstar-rotstar3_1.fits @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@CHECK_ROTSTAR_MPI_RESULTS = $(CHECK_ROTSTAR_RESULTS:.fits=-mpi.fits) all: all-am .SUFFIXES: .SUFFIXES: .C .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign bin/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; 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 echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ 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; \ else { print "f", $$3 "/" $$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_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list gyoto$(EXEEXT): $(gyoto_OBJECTS) $(gyoto_DEPENDENCIES) $(EXTRA_gyoto_DEPENDENCIES) @rm -f gyoto$(EXEEXT) $(AM_V_CXXLD)$(gyoto_LINK) $(gyoto_OBJECTS) $(gyoto_LDADD) $(LIBS) gyoto-mpi-worker.@sovers@$(EXEEXT): $(gyoto_mpi_worker_@sovers@_OBJECTS) $(gyoto_mpi_worker_@sovers@_DEPENDENCIES) $(EXTRA_gyoto_mpi_worker_@sovers@_DEPENDENCIES) @rm -f gyoto-mpi-worker.@sovers@$(EXEEXT) $(AM_V_CXXLD)$(gyoto_mpi_worker_@sovers@_LINK) $(gyoto_mpi_worker_@sovers@_OBJECTS) $(gyoto_mpi_worker_@sovers@_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gyoto-gyoto.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.Po@am__quote@ .C.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .C.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .C.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< gyoto-gyoto.o: gyoto.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gyoto_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gyoto-gyoto.o -MD -MP -MF $(DEPDIR)/gyoto-gyoto.Tpo -c -o gyoto-gyoto.o `test -f 'gyoto.C' || echo '$(srcdir)/'`gyoto.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gyoto-gyoto.Tpo $(DEPDIR)/gyoto-gyoto.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gyoto.C' object='gyoto-gyoto.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gyoto_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gyoto-gyoto.o `test -f 'gyoto.C' || echo '$(srcdir)/'`gyoto.C gyoto-gyoto.obj: gyoto.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gyoto_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gyoto-gyoto.obj -MD -MP -MF $(DEPDIR)/gyoto-gyoto.Tpo -c -o gyoto-gyoto.obj `if test -f 'gyoto.C'; then $(CYGPATH_W) 'gyoto.C'; else $(CYGPATH_W) '$(srcdir)/gyoto.C'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gyoto-gyoto.Tpo $(DEPDIR)/gyoto-gyoto.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gyoto.C' object='gyoto-gyoto.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gyoto_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gyoto-gyoto.obj `if test -f 'gyoto.C'; then $(CYGPATH_W) 'gyoto.C'; else $(CYGPATH_W) '$(srcdir)/gyoto.C'; fi` gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.o: gyoto-mpi-worker.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gyoto_mpi_worker_@sovers@_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.o -MD -MP -MF $(DEPDIR)/gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.Tpo -c -o gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.o `test -f 'gyoto-mpi-worker.C' || echo '$(srcdir)/'`gyoto-mpi-worker.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.Tpo $(DEPDIR)/gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gyoto-mpi-worker.C' object='gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gyoto_mpi_worker_@sovers@_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.o `test -f 'gyoto-mpi-worker.C' || echo '$(srcdir)/'`gyoto-mpi-worker.C gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.obj: gyoto-mpi-worker.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gyoto_mpi_worker_@sovers@_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.obj -MD -MP -MF $(DEPDIR)/gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.Tpo -c -o gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.obj `if test -f 'gyoto-mpi-worker.C'; then $(CYGPATH_W) 'gyoto-mpi-worker.C'; else $(CYGPATH_W) '$(srcdir)/gyoto-mpi-worker.C'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.Tpo $(DEPDIR)/gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gyoto-mpi-worker.C' object='gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gyoto_mpi_worker_@sovers@_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gyoto_mpi_worker_@sovers@-gyoto-mpi-worker.obj `if test -f 'gyoto-mpi-worker.C'; then $(CYGPATH_W) 'gyoto-mpi-worker.C'; else $(CYGPATH_W) '$(srcdir)/gyoto-mpi-worker.C'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(dist_man_MANS)'; \ 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=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | 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) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 $(PROGRAMS) $(MANS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(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: -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-am clean-am: clean-binPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -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-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool clean-local \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS 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-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-man \ uninstall-man1 gyoto-mpi-worker.@sovers@.1: gyoto-mpi-worker.1 cp $^ $@ export PATH := .:$(PATH) check-nompi-clean: rm -f $(CHECK_RESULTS) check-mpi-clean: rm -f $(CHECK_MPI_RESULTS) @BUILD_GYOTO_TRUE@$(CHECK_RESULTS): gyoto $(EXAMPLE_DIR)$(@:.fits=.xml) @BUILD_GYOTO_TRUE@ $(CHECK_CMD) $(EXAMPLE_DIR)$(@:.fits=.xml) \!$@ @BUILD_GYOTO_TRUE@$(CHECK_MPI_RESULTS): gyoto $(EXAMPLE_DIR)$(@:-mpi.fits=.xml) @BUILD_GYOTO_TRUE@ $(CHECK_ENV) $(MPIRUN) $(CHECK_RAW_CMD) -P4 $(EXAMPLE_DIR)$(@:-mpi.fits=.xml) \!$@ @BUILD_GYOTO_TRUE@check-nompi-compute: $(CHECK_RESULTS) @BUILD_GYOTO_TRUE@check-nompi: check-nompi-clean check-nompi-compute @BUILD_GYOTO_TRUE@check-mpi-compute: $(CHECK_MPI_RESULTS) @BUILD_GYOTO_TRUE@check-mpi: check-mpi-clean check-mpi-compute @BUILD_GYOTO_TRUE@check: check-nompi # make check-lorene check-lorene-mpi # Will # 1- copy the Nrotstar directory from HOME_LORENE into .check-lorene; # 2- configure Nrotstar by copying par_eos.d and par_rot.d from GR/Kepler; # 3- build Nrotstar/nrotstar; # 4- run it to build Nrotstar/resu.d; # 5- ray-trace ../doc/examples/example-*-rotstar3_1.xml twice # (with and without MPI). @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@export HOME_LORENE @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@.check-lorene/resu.d: @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@ rm -Rf .check-lorene @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@ cp -a $(HOME_LORENE)/Codes/Nrotstar ./.check-lorene @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@ cd .check-lorene && rm -f nrotstar *.o @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@ cd .check-lorene && cp -f Parameters/GR/Kepler/*.d ./ @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@ cd .check-lorene && $(SED) -i.bak 's/1 graph/0 graph/' par_rot.d @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@ cd .check-lorene && $(MAKE) @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@ cd .check-lorene && ./nrotstar @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@$(CHECK_ROTSTAR_MPI_RESULTS): gyoto $(EXAMPLE_DIR)$(@:-mpi.fits=.xml) .check-lorene/resu.d @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@ $(CHECK_ENV) $(MPIRUN) $(CHECK_RAW_CMD) -pstdplug,lorene -P4 $(EXAMPLE_DIR)$(@:-mpi.fits=.xml) \!$@ @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@$(CHECK_ROTSTAR_RESULTS): gyoto $(EXAMPLE_DIR)$(@:.fits=.xml) .check-lorene/resu.d @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@ $(CHECK_CMD) -pstdplug,lorene -T0 $(EXAMPLE_DIR)$(@:.fits=.xml) \!$@ @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@check-lorene-clean: @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@ rm -f $(CHECK_ROTSTAR_RESULTS) @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@check-lorene-compute: $(CHECK_ROTSTAR_RESULTS) @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@check-lorene: check-lorene-clean check-lorene-compute @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@check-lorene-mpi-clean: @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@ rm -f $(CHECK_ROTSTAR_RESULTS) @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@check-lorene-mpi-compute: $(CHECK_ROTSTAR_MPI_RESULTS) @BUILD_GYOTO_TRUE@@HAVE_LORENE_TRUE@check-lorene-mpi: check-lorene-mpi-clean check-lorene-mpi-compute clean-local: -rm -rf .check-lorene .PHONY: check-nompi-compute check-nompi-clean check-nompi check-mpi-clean check-mpi-compute check-mpi check check-lorene-clean check-lorene-compute check-lorene check-lorene-mpi-clean check-lorene-mpi-compute check-lorene-mpi check # 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: Gyoto-1.2.0/bin/Makefile.old000066400000000000000000000021161302352257300156020ustar00rootroot00000000000000SHELL=/bin/sh include ../local_settings .SUFFIXES : .o .C SRC = gyoto.C OBJ = $(SRC:.C=.o) LIB_SRC = $(shell ls ../lib/*.C) HDRS = $(shell ls ../include/*.h) EXE_ALL = gyoto # the gyoto executable requires XERCES ifeq (,$(findstring -DGYOTO_USE_XERCES,$(GYOTO_FLAGS))) EXE = $(filter-out gyoto,$(EXE_ALL)) else EXE = $(EXE_ALL) endif all: $(EXE) .C.o: $(CXX) -c $(GYOTO_FLAGS) -I../include $(CPPFLAGS) $(CXXFLAGS) $< gyoto: gyoto.o ../lib/$(LIBGYOTO_FILE) $(CXX) -o $@ $< -L../lib -lgyoto -ldl $(LDFLAGS) $(LDLIBS) clean: rm -f $(OBJ) rm -f $(EXE_ALL) rm -fr Doc rm -fr *~ rm -f libgyoto.a rm -fr gyoto.dSYM $(DESTDIR)$(PREFIX)/share/man/man1 $(DESTDIR)$(PREFIX)/bin: install -d $@ ifeq (,$(findstring -DGYOTO_USE_XERCES,$(GYOTO_FLAGS))) install: else install: $(EXE) $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/man/man1 gyoto.1 install -m 0755 $(EXE) $(DESTDIR)$(PREFIX)/bin install -m 0644 gyoto.1 $(DESTDIR)$(PREFIX)/share/man/man1 endif uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/gyoto rm -f $(DESTDIR)$(PREFIX)/share/man/man1/gyoto.1 .PHONY: clean install uninstallGyoto-1.2.0/bin/gyoto-mpi-worker.1000066400000000000000000000016241302352257300167050ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii foo.1 .\" .TH GYOTO-MPI-WORKER 1 "OCTOBER 2014" Science "User Manuals" .SH NAME Gyoto \- the General relativitY Orbit Tracer of Observatoire de Paris .SH SYNOPSIS gyoto-mpi-worker.\fISOVERS\fR [MPI options] .SH DESCRIPTION Gyoto is a framework for computing geodesics in curved space-times. The \fBgyoto-mpi-worker\fR helper program is not meant to be executed directly by the user. It is spawned by the MPI frawework when using multi-processing. It does not process any command-line parameter, but passes them to MPI_Init(3). \fBgyoto-mpi-worker\fR is bound to a specific version of the Gyoto application binary interface (ABI). To allow for co-installation of several versions of the Gyoto library, the SO information digits are appended to the executable name. .SH AUTHOR Thibaut Paumard wrote this manual. .SH "SEE ALSO" .BR gyoto (1) Gyoto-1.2.0/bin/gyoto-mpi-worker.C000066400000000000000000000063051302352257300167300ustar00rootroot00000000000000/* Copyright 2011, 2013 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ // Gyoto #include "GyotoDefs.h" #include "GyotoFactory.h" #include "GyotoUtils.h" #include "GyotoRegister.h" #include "GyotoScenery.h" #include "GyotoScreen.h" // FITS I/O #include // signal() #include // getpid() #include #include using namespace std; using namespace Gyoto; static SmartPointer sc = NULL; #ifdef HAVE_MPI #include #include #include #include #include namespace mpi = boost::mpi; #endif static std::string curmsg = ""; static int curretval = 1; void gyotoErrorHandler( const Gyoto::Error e ) { cerr << curmsg << e << endl; if (debug()) abort(); // to keep stack for debugger exit (curretval); } int main(int argc, char** argv) { /* This program aims at computing the null geodesics of photons from an observation screen to an astrophysical object (star orbit, fixed star or disk). The final result is a list of illuminated pixels. */ // For debug output debug(0); verbose(GYOTO_SEVERE_VERBOSITY); mpi::environment env(argc, argv); MPI_Comm parent_c; MPI_Comm_get_parent(&parent_c); mpi::communicator team=(parent_c==MPI_COMM_NULL)?mpi::communicator(): mpi::intercommunicator(parent_c,mpi::comm_take_ownership).merge(true); string pluglist= getenv("GYOTO_PLUGINS")? getenv("GYOTO_PLUGINS"): GYOTO_DEFAULT_PLUGINS; Gyoto::Error::setHandler ( &gyotoErrorHandler ); curmsg = "In gyoto-mpi-worker.C: Error initializing libgyoto: "; curretval = 1; Gyoto::Register::init(pluglist.c_str()); sc = new Scenery(); sc -> mpi_team_ = &team; Screen::Empty empty; Scenery::mpi_tag task=Scenery::give_task; Scenery::am_worker=true; while (task != Scenery::terminate) { sc->mpiTask(task); switch (task) { case Scenery::read_scenery: { std::string parfile; broadcast(team, parfile, 0); curmsg = "In gyoto-mpi-worker.C: Error in Factory creation: "; curretval = 1; sc = Factory(const_cast(parfile.c_str())).getScenery(); sc -> mpi_team_ = &team; break; } case Scenery::raytrace: curmsg = "In gyoto-mpi-worker.C: Error in ray-tracing: "; curretval = 1; sc -> rayTrace(empty, NULL, NULL); break; case Scenery::terminate: sc = NULL; break; default: std::cerr << "unknown task " << task << endl; } } team.barrier(); return 0; } Gyoto-1.2.0/bin/gyoto.1000066400000000000000000000342311302352257300146130ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii foo.1 .\" .TH GYOTO 1 "SEPTEMBER 2016" Science "User Manuals" .SH NAME Gyoto \- the General relativitY Orbit Tracer of Observatoire de Paris .SH SYNOPSIS gyoto [\fB\-\-silent\fR|\fB\-\-quiet\fR|\fB\-\-verbose\fR[=\fIN\fR]|\fB\-\-debug\fR] [\fB\-\-no\-sigfpe\fR] [\fB\-\-help\fR[=\fIclass\fR]] [\fB\-\-list\fR] [\fB\-\-ispec\fR=\fIi0\fR:\fIi1\fR:\fIdi\fR] [\fB\-\-jspec\fR=\fIj0\fR:\fIj1\fR:\fIdj\fR] ([\fB\-\-imin\fR=\fIi0\fR] [\fB\-\-imax\fR=\fIi1\fR] [\fB\-\-di\fR=\fIdi\fR]) ([\fB\-\-jmin\fR=\fIj0\fR] [\fB\-\-jmax\fR=\fIj1\fR] [\fB\-\-dj\fR=\fIdj\fR]) [\fB\-\-time\fR=\fItobs\fR] [\fB\-\-tmin\fR=\fItmin\fR] [\fB\-\-fov\fR=\fIangle\fR] [\fB\-\-resolution\fR=\fInpix\fR] [\fB\-\-distance\fR=\fIdist\fR] [\fB\-\-paln\fR=\fIOmega\fR] [\fB\-\-inclination\fR=\fIi\fR] [\fB\-\-argument\fR=\fItheta\fR] [\fB\-\-nthreads\fR=\fInth\fR] [\fB\-\-nprocesses\fR=\fInprocs\fR] [\fB\-\-plugins\fR=\fIpluglist\fR] [\fB\-\-impact-coords\fR[=\fIfname.fits\fR]] [\fB\-\-unit\fR[=\fIunit\fR]] [\fB\-\-parameter\fR=\fIPath::Name\fR[=\fIvalue\fR]] [\fB\-\-xmlwrite\fR=\fIoutput.xml\fR] [\fB\-\-\fR] \fIinput.xml \fIoutput.fits .SH DESCRIPTION Gyoto is a framework for computing geodesics in curved space-times. The \fBgyoto\fR utility program uses this framework to compute images of astronomical objects in the vicinity of compact objects (e.g. black-holes). Such images are distorted by strong gravitational lensing. \fBgyoto\fR takes a scenery description in XML format (\fIinput.xml\fR), computes this scenery using relativistic ray-tracing, and saves the result in FITS format. A companion program, \fBgyotoy\fR(1), can be used to interactively visualize a single geodesic in any Gyoto metric (the trajectory of a single photon or massive particle). Ray-tracing can be very time consuming. It is possible to interrupt the process at any time by hitting ^C, which will save the already-computed part of the image before exiting the program. You can then compute the rest of the image later using the \fB\-\-jmin\fR option. .SH OPTIONS The \fBgyoto\fR program accepts many options. Most have a long name (e.g. \fB\-\-parameter\fR) and a short name (e.g. \fB\-E\fR). When an option takes an argument, this argument must follow immediately the short option (e.g. \fB\-E\fIPath::Name\fR) and be separated from the long option by exactly the character "=" (e.g. \fB\-\-parameter\fR=\fIPath::Name\fR). Long options can be abbreviated as long as the abbreviation is unambiguous (e.g. \fB\-\-par=\fIPath::Name\fR). Most options can appear several times and are processed in the order they appear in the command line. The two positional parameters (\fIinput.xml\fR and \fIoutput.fits\fR) can appear anywhere in the command line, except if they start with a minus character (\-) in which case they must appear last, after the option \fB\-\-\fR. .SS Getting help .IP \fB\-\-help\fR[=\fIclass\fR] .PD 0 .IP \fB\-h\fR[\fIclass\fR] Without argument \fIclass\fR, print help summary. Although not as verbose as this manual page, the output of \fBgyoto \fI\-h\fR may be more complete and up to date. If \fIclass\fR is specified, list and document the properties of \fIclass\fR (e.g. "Screen", "Astrobj::Star"). Then exit the program, unless \fB\-\-list\fR below has only been specified. .PD .PD 0 .IP \fB\-\-list\fR .IP \fB\-l\fR Print list of currently registered Astrobj, Metric etc., then exit the program. This occurs after loading \fIinput.xml\fR (if provided), so that any plug-in specified in the input file have already been loaded. .PD .SS Setting the verbosity level Those options are processed separately from the other and take effect early in the program execution. .IP \fB\-\-silent\fR .PD 0 .IP \fB\-s\fR No output. .PD .IP \fB\-\-quiet\fR .PD 0 .IP \fB\-q\fR Minimal output. .PD .IP \fB\-\-verbose\fR[=\fIN\fR] .PD 0 .IP \fB\-v\fR[\fIN\fR] Verbose mode. Verbosity level \fIN\fR may be specified. .PD .IP \fB\-\-debug\fR .PD 0 .IP \fB\-d\fR Insanely verbose. .PD .IP \fB\-\-no\-sigfpe\fR Do not try to raise SIGFPE upon arithmetic exceptions. This option is meaningful only if fenv.h support is built in. Else this option is a no-op as SIGFPE is never raised. .SS Loading plug-ins .IP \fB\-\-plugins\fR[=\fI[nofail:]plug1[,[nofail:]plug2][...]]\fR .PD 0 .IP \fB\-p\fI[[nofail:]plug1[,[nofail:]plug2][...]]\fR Comma-separated list of Gyoto plugins to load. Overrides GYOTO_PLUGINS environment variable below. Only the last occurrence matters. .PD .SS Selecting a region It is possible to ray-trace only part of the scenery by providing the pixel coordinates of the bottom-left (\fIi0\fR, \fIj0\fR) and top-right (\fIi1\fR, \fIj1\fR) corners of the region. The bottom-left pixel of the complete image has coordinates i=1 and j=1. The step in each direction (\fIdi\fR, \fIdj\fR) can also be specified. .IP \fB\-\-ispec\fR=\fI[i0]:[i1]:[di]\fR .PD 0 .IP \fB\-i\fI[i0]:[i1]:[di]\fR .IP \fB\-\-jspec\fR=\fI[j0]:[j1]:[dj]\fR .IP \fB\-j\fI[j0]:[j1]:[dj]\fR Default values: \fIx0\fR: 1; \fIx1\fR: \fInpix\fR (see option \fB\-\-resolution\fR below); \fIdx\fR: 1. .PD .IP \fB\-\-ispec\fR=\fIN\fR .PD 0 .IP \fB\-i\fIN\fR .IP \fB\-\-jspec\fR=\fIN\fR .IP \fB\-j\fIN\fR Set both \fIx0\fR and \fIx1\fR to \fIN\fR. .PD .SS Alternate region-selection options: Those options are still supported for backward compatibility. They are deprecated in favour of \fB\-\-ispec\fR and \fB\-\-jspec\fR above: .IP \fB\-\-imin\fR=\fIi0 Default value: 1. .IP \fB\-\-imax\fR=\fIi1 Default value: \fInpix\fR (see option \fB\-\-resolution\fR below). .IP \fB\-\-di\fR=\fIdi Default value:1. .IP \fB\-\-jmin\fR=\fIj0 Default value: 1. .IP \fB\-\-jmax\fR=\fIj1 Default value: \fInpix\fR (see option \fB\-\-resolution\fR below). .IP \fB\-\-dj\fR=\fIdj Default value:1. .SS Setting the camera position The following parameters are normally provided in the Screen section of \fIinput.xml\fR but can be overridden on the command line for instance to make a movie (by calling \fBgyoto\fR for each movie frame, changing only the option \fB\-\-time\fR). .IP \fB\-\-time\fR=\fItobs The observing time in geometrical units. .IP \fB\-\-fov\fR=\fIangle\fR The field-of-view of the camera, in radians. .IP \fB\-\-resolution\fR=\fInpix\fR .PD 0 .IP \fB\-r\fInpix\fR .PD Number of rows and columns in the output image. .IP \fB\-\-distance\fR=\fIdist\fR (Coordinate) distance from the observer to the center of the coordinate system, in geometrical units. .IP \fB\-\-paln\fR=\fIOmega\fR Position angle of the line of nodes, in radians, East of North. The is the angle between the North direction and the line of nodes (see below). .IP \fB\-\-inclination\fR=\fIi\fR Angle between the plane of the sky and the equator of the coordinate system. The intersection of those two planes is the line of nodes. .IP \fB\-\-argument\fR=\fItheta\fR Angle in the equatorial plane between the line of nodes and one of the main axes of the coordinate system. .SS Miscellaneous Unsorted option(s): .IP \fB\-\- Ends option processing, in case either \fIinput.xml\fR or \fIoutput.fits\fR starts with "\-". .IP \fB\-\-nthreads\fR=\fInth\fR .PD 0 .IP \fB\-T\fInth\fR .PD Number of parallel threads to use. For instance, on a dual-core machine, \fB\-\-nthreads\fR=2 should yield the fastest computation. This option is silently ignored if Gyoto was compiled without POSIX threads support. Note that the metric and object are replicated for each thread which can lead to a decrease in performance if either is memory-intensive. Setting this option to 0 is equivalent to setting it to 1. .IP \fB\-\-nprocesses\fR=\fInprocs\fR .PD 0 .IP \fB\-P\fInprocs\fR .PD Number of MPI processes to spawn for parallel ray-tracing, in addition to the main gyoto process which remains for managing the computation. Ignored if gyoto was compiled without MPI support. \fInprocs\fR is the number of workers spawned. \fB-P\fR0 disables MPI multi-processing, while \fB\-P\fR1 uses two processes: the manager and one worker. If \fInprocs\fR is >0, \-\-nthreads is ignored. Note that the MPI environment usually needs to be set-up using some variant of .BR mpirun (1). You should usually only launch one instance of \fBgyoto\fR, and either let it spawn its workers (using .BR MPI_Comm_spawn (3)) or tell mpirun to do so: .RS .IP \fBmpirun\fR \-np 1 \fBgyoto\fR \-P\fInprocs\fR \fIinput.xml\fR \fIoutput.fits\fR .IP \fBmpirun\fR \-np 1 \fBgyoto\fR \-P1\fR \fIinput.xml\fR \fIoutput.fits\fR : \-np \fInprocs\fR \fBgyoto-mpi-worker.version\fR .P However, under Open MPI, \fBgyoto\fR also supports the more traditional: .IP \fBmpirun\fR \-np \fInprocs\fR \fBgyoto\fR \fIinput.xml\fR \fIoutput.fits\fR .P In this case, this option (\fB\-\-nprocesses\fR/\fB\-P\fR) is ignored. .RE .IP \fB\-\-impact\-coords\fR[=\fIimpactcoords.fits\fR] In some circumstances, you may want to perform several computations in which the computed geodesics end up being exactly identical. This is the case for instance if you want to experiment changing the spectrum of a star or when making a movie of a rotating, optically thick disk. This option provides a mechanism to not recompute the geodesics in the most simple case: . .RS .IP \(bu 4 the Screen is always at the same position; .IP \(bu 4 the Metric is always exactly the same; .IP \(bu 4 the Astrobj is optically thick (no radiative transfer processing is necessary); .IP \(bu 4 the location and shape of the Astrobj is always the same. .RE . .IP If \fB\-\-impact\-coords\fR is passed without specifying \fIimpactcoords.fits\fR, the 8-coordinate vectors of the object and photon at impact point are saved for each point of the Screen. Missing data (no impact) are set to DBL_MAX. These data are saved as a supplementary image HDU in the FITS file which is identified by its EXTNAME: "Gyoto Impact Coordinates". The FITS keyword "HIERARCH Gyoto Observing Date" of this HDU holds the observing date (in geometrical unit). .IP If \fIimpactcoords.fits\fR is specified, the above mentioned data are read back from this file. The ray-tracing is not performed, but the Gyoto::Astrobj::Generic::processHitQuantities() method is called directly, yielding the same result if the four conditions above are met. The observing date stored in the FITS keyword "HIERARCH Gyoto Observing Date" is compared to the date specified in the screen or using the \fB\-\-time\fR option and the impact coordinates are shifted in time accordingly. .IP It is also possible to set the two versions of this option at the same time: .RS .PD 0 .IP \fB\-\-impact\-coords\fR=\fIimpactcoords.fits\fR \fB\-\-impact\-coords\fR .RE .IP In this case, the impact coordinates are read from \fIimpactcoords.fits\fR, shifted in time, and saved in \fIoutput.fits\fR. .PD .IP \fB\-\-unit\fR[=\fIunit\fR] .PD 0 .IP \fB\-u\fR[\fIunit\fR] .PD Specify unit to use for allowing instances of \fB\-\-parameter\fR, until next instance of \fB\-\-unit\fR. .IP \fB\-\-parameter\fR=\fIPath::Name\fR[=\fIvalue\fR] .PD 0 .IP \fB\-E\fIPath::Name\fR[=\fIvalue\fR] .PD Set arbitrary parameter by name. Parameters can be set in the Astrobj, Metric etc. using the \fIPath\fR componenent. For instance, For instance, assuming the Astrobj in \fIstar.xml\fR has a property named "Radius" that can be set in unit "km", and a property named "Spectrum" which has a property named "Temperature", we can set the radius, temperature and the quantities to compute (a property in the Scenery itself) with: .RS 10 \fBgyoto\fR \-EQuantities=Spectrum \\ .br \-ukm \-EAstrobj::Radius=3 \\ .br \-u \-EAstrobj::Spectrum::Temperature=1000 \\ .br star.xml star.fits \fBgyoto\fR \-\-parameter=Quantities=Spectrum \\ .br \-\-unit=km \-\-parameter=Astrobj::Radius=3 \\ .br \-\-unit="" \-\-param=Astrobj::Spectrum::Temperature=1000 \\ .br star.xml star.fits .RE .IP \fB\-\-xmlwrite\fR=\fIoutput.xml\fR .PD 0 .IP \fB\-X\fIoutput.xml\fR .PD Write back scenery to an XML file. The new file will contain additional default parameters and reflect the effect of \fB\-\-(astrobj|metric|scenery|screen|spectrometer)-parameter\fR that appear before \fB\-\-xmlwrite\fR. Can appear several times, e.g. to generate several XML files with different settings. .SH FILES .IP \fIinput.xml A gyoto input file in XML format. Several examples are provided in the source doc/examples directory. Depending on how you installed \fBgyoto\fR, they may be installed on your system in a place such as \fI/usr/share/doc/libgyoto/examples/\fR. It goes beyond the scope of this manpage to document the XML file format supported by Gyoto, please refer to the library documentation which may be distributed by your package manager, can be compiled from the Gyoto source, and can be consulted online at \fIhttp://gyoto.obspm.fr/\fR. .IP \fIoutput.fits The output image in FITS format. \fBgyoto\fR will not overwrite \fIoutput.fits\fR unless it is prefixed with an (escaped) "!": "gyoto in.xml \\!out.fits". This file may actually consist in a stack of images depending on the Gyoto Quantities and on the Spectrometer specified in \fIinput.xml\fR. For further information on the FITS format, see \fIhttp://fits.gsfc.nasa.gov/\fR. .SH ENVIRONMENT .IP GYOTO_PLUGINS Gyoto astronomical objects and metrics are implemented in plug-ins. To use more (or less!) than the standard plug-ins, you may set the environment variable GYOTO_PLUGINS to a comma-separated list of plug-ins. \fBgyoto\fR will exit with an error status if unable to load a specified plug-in, unless it is prefixed with "nofail:" in GYOTO_PLUGINS. This environment variable is overridden by he \fB\-\-plugins\fR command-line parameter. Default value: "stdplug,nofail:lorene". Gyoto attempts to find plug-ins first by relying on the system's dynamic linker (so paths in e.g. LD_LIBRARY_PATH and ld.so.conf are searched first). If that fails, it looks in PREFIX/lib/gyoto/ and finally in PREFIX/lib/gyoto/SOVERS/ where PREFIX and SOVERS are two compile-time options. PREFIX usually is /usr/local or /usr. At the time of writing, SOVERS is 0.0.0. .SH EXIT STATUS \fBgyoto\fR returns \fB0\fR upon success, \fB1\fR if unable to parse the command line or to interpret \fIinput.xml\fR, and a CFITSIO error code if an error occurs when trying to open, write to, or close \fIoutput.fits\fR. Refer to the CFITSIO documentation for more details. .SH AUTHOR Thibaut Paumard wrote this manual. .SH "SEE ALSO" .BR gyotoy (1) Gyoto-1.2.0/bin/gyoto.C000066400000000000000000000562471302352257300146500ustar00rootroot00000000000000/* Copyright 2011, 2013, 2016 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ // Gyoto #include "GyotoDefs.h" #include "GyotoFactory.h" #include "GyotoUtils.h" #include "GyotoRegister.h" #include "optionparser.h" // feenableexcept() #if defined HAVE_FENV_H # include #endif // FITS I/O #include // signal() #include // getpid(), execlp #include #include // MPI #if defined HAVE_MPI # include # include #endif // ULONG_MAX #include using namespace std; using namespace Gyoto; static char* pixfile = NULL; static fitsfile* fptr = NULL; static int status = 0; static long fpixel[] = {1,1,1}; static long nelements = 0; static double* vect = NULL; static double* impactcoords=NULL; static SmartPointer data = NULL; namespace Gyoto { struct Arg; } struct Gyoto::Arg: public option::Arg { static void printError(const char* msg1, const option::Option& opt, const char* msg2) { fprintf(stderr, "ERROR: %s", msg1); fwrite(opt.name, opt.namelen, 1, stderr); fprintf(stderr, "%s", msg2); } static option::ArgStatus Required(const option::Option& option, bool msg) { if (option.arg != 0) return option::ARG_OK; if (msg) printError("Option '", option, "' requires an argument\n"); return option::ARG_ILLEGAL; } }; enum optionType { DEBUG, QUIET, VERBOSE, SILENT, IMIN, IMAX, JMIN, JMAX, ISTEP, JSTEP, ISPEC, JSPEC}; enum optionIndex { UNKNOWN, HELP, PLUGINS, LIST, VERSION, VERBOSITY, NOSIGFPE, RANGE, BOUNDARIES, STEPS, IPCT, TIME, TMIN, FOV, RESOLUTION, DISTANCE, PALN, INCLINATION, ARGUMENT, NTHREADS, NPROCESSES, SETPARAMETER, UNIT, XMLWRITE}; const option::Descriptor usage[] = { {UNKNOWN, 0, "", "",option::Arg::None, "\nUSAGE: gyoto [options] input.xml output.fits\t\n\n" "Generic options:\t\n -- \tStop option processing." }, {HELP, 0,"h","help",option::Arg::Optional, " --help[=, -h \tWithout argument, print usage and exit. With argument, document class (e.g. \"Screen\", \"Astrobj::Star\") and exit." }, {VERSION, 0, "", "version", option::Arg::None, " --version, -V \tPrint the Gyoto version."}, {LIST, 0,"l","list",option::Arg::None, " --list, -l \tPrint the Gyoto register of Astrobj, Metrics etc." }, {NOSIGFPE, 0, "", "no-sigfpe",option::Arg::None, " --no-sigfpe \tDo not enable SIGFPE." #if !defined HAVE_FENV_H " (noop: this Gyoto lacks fenv.h support)." #endif }, {PLUGINS, 0,"p","plugins",option::Arg::Optional, " --plugins=, -p \tList of plug-ins to load instead of $GYOTO_PLUGINS." }, {NTHREADS, 0, "T", "nthreads", Gyoto::Arg::Required, " --nthreads=, -T \tNumber of parallel threads to use."}, {NPROCESSES, 0, "P", "nprocesses", Gyoto::Arg::Required, " --nprocesses=, -P \tNumber of MPI parallel processes to use."}, {IPCT, 0, "", "impact-coords", option::Arg::Optional, " --impact-coords[=] \tRead impact coordinates from file or store in output.fits."}, {XMLWRITE, 0, "X", "xmlwrite", Gyoto::Arg::Required, " --xmlwrite=, -X \tWrite back scenery to XML file . Useful to see default values and check the effect of --parameter, see below."}, {UNKNOWN, 0, "", "",option::Arg::None, "\nVerbosity level:" }, {VERBOSITY, SILENT, "s", "silent", option::Arg::None, " --silent, -s \tBe silent." }, {VERBOSITY, QUIET, "q", "quiet", option::Arg::None, " --quiet, -q \tBe quiet." }, {VERBOSITY, VERBOSE, "v", "verbose", option::Arg::Optional, " --verbose[=], -v[] \tBe verbose. Optional parameter: verbosity level." }, {VERBOSITY, DEBUG, "d", "debug", option::Arg::None, " --debug, -d \tEnable debug output." }, {UNKNOWN, 0, "", "",option::Arg::None, "\nField selection:" }, {BOUNDARIES, IMIN, "", "imin", Gyoto::Arg::Required, " --imin= \tFirst column (1)."}, {BOUNDARIES, IMAX, "", "imax", Gyoto::Arg::Required, " --imax= \tLast column (ULONG_MAX)."}, {STEPS, ISTEP, "", "di", Gyoto::Arg::Required, " --di= \tColumn step (1)."}, {BOUNDARIES, JMIN, "", "jmin", Gyoto::Arg::Required, " --jmin= \tFirst line (1)."}, {BOUNDARIES, JMAX, "", "jmax", Gyoto::Arg::Required, " --jmax= \tLast line (ULONG_MAX)."}, {STEPS, JSTEP, "", "dj", Gyoto::Arg::Required, " --dj= \tLine step (1)."}, {RANGE, ISPEC, "i", "ispec", Gyoto::Arg::Required, " --ispec=, -i \tColumn specification (imin[:imax[:di]])."}, {RANGE, JSPEC, "j", "jspec", Gyoto::Arg::Required, " --jspec=, -j \tLine specification (jmin[:jmax[:dj]])."}, {UNKNOWN, 0, "", "",option::Arg::None, "\nScreen parameters:" }, {TIME, 0, "", "time", Gyoto::Arg::Required, " --time= \tObserving date."}, {TMIN, 0, "", "tmin", Gyoto::Arg::Required, " --tmin= \tMinimum time."}, {FOV, 0, "", "fov", Gyoto::Arg::Required, " --fov= \tField-of-view."}, {RESOLUTION, 0, "r", "resolution", Gyoto::Arg::Required, " --resolution=, -r \tField size in pixels (on each side)."}, {DISTANCE, 0, "", "distance", Gyoto::Arg::Required, " --distance= \tDistance from observer."}, {PALN, 0, "", "paln", Gyoto::Arg::Required, " --paln= \tPosition angle of the line of nodes."}, {INCLINATION, 0, "", "inclination", Gyoto::Arg::Required, " --inclination= \tInclination."}, {ARGUMENT, 0, "", "argument", Gyoto::Arg::Required, " --argument= \tArgument of the x axis."}, {UNKNOWN, 0, "", "",option::Arg::None, "\nArbitrary parameters:" }, {UNIT, 0, "u", "unit", Gyoto::Arg::Optional, " --unit[=], -u[] \tUnit for following parameters (until next instance of this option)."}, {SETPARAMETER, 0, "E", "parameter", Gyoto::Arg::Required, " --parameter=[=], -E[=]" "\tSet arbitrary parameter by name. Optional value is expressed in unit previously set with --unit/-u. Examples: -ENThreads=5, -EAstrobj::Spectrum::Temperature=100."}, {0,0,0,0,0,0} }; void sigint_handler(int sig) { if (sig!=SIGINT) cerr << "\n********GYOTO: sigint_handler trapping signal " << sig << ", this should not happen !" << endl; cerr << "GYOTO: SIGINT received: saving data to " << pixfile << "... "; signal(SIGINT, SIG_DFL); fits_write_pix(fptr, TDOUBLE, fpixel, nelements, vect, &status); fits_close_file(fptr, &status); fits_report_error(stderr, status); cerr << "Killing self." << endl; kill(getpid(), SIGINT); } static std::string curmsg = ""; static int curretval = 1; void gyotoErrorHandler( const Gyoto::Error e ) { cerr << curmsg << e << endl; if (debug()) abort(); // to keep stack for debugger exit (curretval); } int main(int argc, char** argv) { // If we are no rank 0 in an OpenMPI context, respawn as gyoto-mpi-worker if (getenv("OMPI_COMM_WORLD_RANK") && (string("0") != getenv("OMPI_COMM_WORLD_RANK")) ) { execlp("gyoto-mpi-worker." GYOTO_SOVERS, (char *) NULL); } // Set-up error reporter Gyoto::Error::setHandler ( &gyotoErrorHandler ); // No debug out put by default debug(0); char * parfile=NULL; string ipctfile=""; string param; size_t imin=1, imax=ULONG_MAX, jmin=1, jmax=ULONG_MAX; ptrdiff_t di=1, dj=1; bool ipct=0; long ipctdims[3]={0, 0, 0}; double ipcttime; string pluglist= getenv("GYOTO_PLUGINS")? getenv("GYOTO_PLUGINS"): GYOTO_DEFAULT_PLUGINS; argc-=(argc>0); argv+=(argc>0); // skip program name argv[0] if present option::Stats stats(true, usage, argc, argv); option::Option* options = new option::Option[stats.options_max]; option::Option* buffer = new option::Option[stats.buffer_max]; option::Parser parse(true, usage, argc, argv, options, buffer, 1); if (parse.error()) return 1; // Check whether to output usage string if (options[VERSION] || (!options[LIST] && (argc == 0 || parse.nonOptionsCount() != 2 || options[UNKNOWN])) || options[HELP] ) { cout << GYOTO_STRINGIFY(PACKAGE_STRING) << endl << "ABI compatibility version: " << GYOTO_SOVERS << endl; if (!options[VERSION] && !options[HELP].arg) option::printUsage(std::cout, usage); if (!options[VERSION] && !options[LIST] && !options[HELP].arg) { if (options[HELP]) return 0; return 1; } } // Process options setting verbosity or debug level for (option::Option* opt = options[VERBOSITY]; opt; opt = opt->next()) { switch (opt->type()) { case DEBUG: debug(1); break; case SILENT: verbose(0); break; case QUIET: verbose(GYOTO_QUIET_VERBOSITY); break; case VERBOSE: if (opt->arg) verbose(atoi(opt->arg)); else verbose(10); break; default: cerr << "gyoto: error parsing command line, unknown verbosity type" << endl; return 1; } } // Retrieve file names if (parse.nonOptionsCount() > 0) parfile=strdup(parse.nonOptions()[0]); if (parse.nonOptionsCount() > 1) pixfile=strdup(parse.nonOptions()[1]); // State copyright if (options[VERSION] ||(!options[LIST] && !options[HELP] && verbose() >= GYOTO_QUIET_VERBOSITY)) { cout << " Copyright (c) 2011-2016 Frederic Vincent & Thibaut Paumard\n" << " GYOTO is distributed under the terms of the GPL v. 3 license.\n" << " We request that use of Gyoto in scientific publications be " << " properly \n acknowledged. Please cite:\n" << " GYOTO: a new general relativistic ray-tracing code,\n" << " F. H. Vincent, T. Paumard, E. Gourgoulhon & G. Perrin 2011,\n" << " Classical and Quantum Gravity 28, 225011 (2011) " << "[arXiv:1109.4769]" << endl << endl; } if (options[VERSION]) return 0; if (options[PLUGINS]) pluglist = options[PLUGINS].last()->arg?options[PLUGINS].last()->arg:""; curmsg = "In gyoto.C: Error initializing libgyoto: "; curretval = 1; Gyoto::Register::init(pluglist.c_str()); SmartPointer scenery = NULL; if (parfile) { Factory *factory =NULL; if (verbose() >= GYOTO_QUIET_VERBOSITY) cout << "Reading parameter file: " << parfile << endl; curmsg = "In gyoto.C: Error in Factory creation: "; curretval = 1; factory = new Factory(parfile); curmsg = "In gyoto.C: Error getting Kind: "; const string kind = factory->kind(); if (kind.compare("Scenery")) { cerr << "Unknown kind for root element in XML file" << endl; return 1; } curmsg = "In gyoto.C: Error getting Scenery: "; scenery = factory -> getScenery(); curmsg = "In gyoto.C: Error deleting Scenery: "; delete factory; } if (options[HELP] && options[HELP].arg) { help(options[HELP].arg); if (!options[LIST]) return 0; } if (options[LIST]) { Gyoto::Register::list(); return 0; } curmsg = "In gyoto.C: Error initializing ray-tracing: "; curretval = 2; SmartPointer screen = scenery->screen(); string unit=""; for (int i = 0; i < parse.optionsCount(); ++i) { option::Option& opt = buffer[i]; switch(opt.index()) { case NOSIGFPE: #if defined HAVE_FENV_H GYOTO_DEBUG << "enabling SIGFPE delivery\n"; feenableexcept(FE_DIVBYZERO | FE_OVERFLOW | FE_INVALID); #endif break; case BOUNDARIES: { double valtest=Gyoto::atof(opt.arg); if (valtest<=0){ cerr << "In gyoto.C: screen indices should be >0" << endl; return 1; } size_t val=atoi(opt.arg); switch (opt.type()) { case IMIN: imin=val; break; case IMAX: imax=val; break; case JMIN: jmin=val; break; case JMAX: jmax=val; break; default: cerr << "Gyoto BUG: unknown type of screen boundary" << endl; return 1; } } break; case STEPS: { ptrdiff_t val=atoi(opt.arg); if (val==0) val=1; switch(opt.type()) { case ISTEP: di=val; break; case JSTEP: dj=val; break; default: cerr << "Gyoto BUG: unknown type of screen step" << endl; return 1; } } break; case RANGE: { string spec=opt.arg; size_t pos=spec.find(":"), pos2=string::npos; string sub=spec.substr(0, pos); size_t nmin=1, nmax=ULONG_MAX; ptrdiff_t dn=1; if (sub.length()) nmin=atoi(sub.c_str()); if (pos==string::npos) { nmax=nmin; } else { pos2=spec.find(":", pos+1); sub=spec.substr(pos+1, pos2-pos-1); if (sub.length()) nmax=atoi(sub.c_str()); if (pos2 != string::npos) { sub=spec.substr(pos2+1); if (sub.length()) dn=atoi(sub.c_str()); } } GYOTO_DEBUG << "nmin="< time (Gyoto::atof(opt.arg)); break; case TMIN: scenery -> tMin (Gyoto::atof(opt.arg)); break; case FOV: screen -> fieldOfView(Gyoto::atof(opt.arg)); break; case RESOLUTION: screen -> resolution ( atoi(opt.arg)); break; case DISTANCE: screen -> distance (Gyoto::atof(opt.arg)); break; case PALN: screen -> PALN (Gyoto::atof(opt.arg)); break; case INCLINATION: screen -> inclination(Gyoto::atof(opt.arg)); break; case ARGUMENT: screen -> argument (Gyoto::atof(opt.arg)); break; case NTHREADS: scenery -> nThreads ( atoi(opt.arg)); break; case NPROCESSES: scenery -> nProcesses ( atoi(opt.arg)); break; case UNIT: unit=opt.arg?opt.arg:""; break; case SETPARAMETER: { string arg=opt.arg; size_t pos=arg.find("="); string name=arg.substr(0, pos); string val=(pos==string::npos)?"":arg.substr(pos+1); GYOTO_DEBUG << "Setting parameter \"" << name << "\" to value \"" << val << "\" using unit \"" << unit << "\".\n"; if(scenery -> setParameter(name, val, unit)) throwError("Unknown parameter"); } break; case XMLWRITE: Factory(scenery).write(opt.arg); break; default: break; } } #if defined HAVE_MPI if (scenery -> nProcesses() || getenv("OMPI_COMM_WORLD_SIZE")) { int status = MPI_Init(&argc, &argv); if (status) { cerr << "error initializing MPI"<< endl; return 2; } // If WORLD size is more than 1, use processes from WORLD // instead of spawning new processes int wsize=0; MPI_Comm_size(MPI_COMM_WORLD, &wsize); if (wsize > 1) { scenery -> nProcesses(-1); } } #endif { double tobs= screen -> time(); size_t res = screen -> resolution(); if (ipctfile != "") { // if (verbose() >= GYOTO_QUIET_VERBOSITY) size_t ipctnelt=0; cout << "Reading precomputed impact coordinates from " << ipctfile <("Gyoto Impact Coordinates"), 0, &status); fits_read_key(fptr, TDOUBLE, "Gyoto Observing Date", &ipcttime, NULL, &status); fits_get_img_size(fptr, 3, ipctdims, &status); fits_report_error(stderr, status); if (status) return status; if (ipctdims[0]==16 && size_t(ipctdims[1]) == res && size_t(ipctdims[2]) == res) { impactcoords = new double[(ipctnelt=16*res*res)]; } else { cerr<<"ERROR: bad dimensions for precomputed impact coordinates\n"; return 1; } fits_read_subset(fptr, TDOUBLE, fpixel, ipctdims, fpixel, 0, impactcoords, NULL, &status); fits_close_file(fptr, &status); fptr=NULL; fits_report_error(stderr, status); if (status) return status; double dt = tobs * GYOTO_C / scenery -> metric() -> unitLength() - ipcttime; for (size_t i=0; i < ipctnelt; i+=8) if (impactcoords[i] != DBL_MAX) impactcoords[i] += dt; ipcttime = tobs * GYOTO_C / scenery -> metric() -> unitLength(); } Quantity_t quantities = scenery -> getRequestedQuantities(); if (debug()) cerr << "DEBUG: Gyoto.C: Requested Quantities: " << quantities < spr = screen -> spectrometer(); if (!spr) throwError("Spectral quantity requested but " "no spectrometer specified!"); nbnuobs = spr -> nSamples(); } //nb of frames that will be used for spectral cube size_t nbdata= scenery->getScalarQuantitiesCount(); //nb of frames used for diverse interesting outputs //(obs flux, impact time, redshift..) size_t nelt=res*res*(nbdata+nbnuobs); vect = new double[nelt]; // First check whether we can open file int naxis=3; long naxes[] = {long(res), long(res), long(nbdata+nbnuobs)}; nelements=nelt; fits_create_file(&fptr, pixfile, &status); fits_create_img(fptr, DOUBLE_IMG, naxis, naxes, &status); fits_report_error(stderr, status); if (status) return status; // Allocate space for the output data data = new Astrobj::Properties(); data->alloc=true; size_t curquant=0; size_t offset=res*res; if (debug()) { cerr << "DEBUG: gyoto.C: flag_radtransf = "; cerr << scenery -> astrobj() -> opticallyThin() << endl; cerr << "DEBUG: gyoto.C: Requested quantities: "; cerr << scenery -> requestedQuantitiesString() << endl; } char keyname[FLEN_KEYWORD]; char const * fmt="QUANT_%lu"; char * CNULL=NULL; if (quantities & GYOTO_QUANTITY_INTENSITY) { data->intensity=vect+offset*(curquant++); sprintf(keyname, fmt, curquant); fits_write_key(fptr, TSTRING, keyname, const_cast("Intensity"), CNULL, &status); } if (quantities & GYOTO_QUANTITY_EMISSIONTIME) { data->time=vect+offset*(curquant++); sprintf(keyname, fmt, curquant); fits_write_key(fptr, TSTRING, keyname, const_cast("EmissionTime"), CNULL, &status); } if (quantities & GYOTO_QUANTITY_MIN_DISTANCE) { data->distance=vect+offset*(curquant++); sprintf(keyname, fmt, curquant); fits_write_key(fptr, TSTRING, keyname, const_cast("MinDistance"), CNULL, &status); } if (quantities & GYOTO_QUANTITY_FIRST_DMIN) { data->first_dmin=vect+offset*(curquant++); sprintf(keyname, fmt, curquant); fits_write_key(fptr, TSTRING, keyname, const_cast("FirstDistMin"), CNULL, &status); } if (quantities & GYOTO_QUANTITY_REDSHIFT) { if (debug()) cerr << "DEBUG: gyoto.C: REDSHIFT requested\n"; data->redshift=vect+offset*(curquant++); sprintf(keyname, fmt, curquant); fits_write_key(fptr, TSTRING, keyname, const_cast("Redshift"), CNULL, &status); } if ((quantities & GYOTO_QUANTITY_IMPACTCOORDS || ipct) && !ipctdims[0] ) { // Allocate if requested AND not provided cerr << "gyoto.C: allocating data->impactcoords" << endl; data->impactcoords = impactcoords = new double [res*res*16]; ipcttime = tobs * GYOTO_C / scenery -> metric() -> unitLength(); } if (quantities & GYOTO_QUANTITY_USER1) { data->user1=vect+offset*(curquant++); sprintf(keyname, fmt, curquant); fits_write_key(fptr, TSTRING, keyname, const_cast("User1"), CNULL, &status); } if (quantities & GYOTO_QUANTITY_USER2) { data->user2=vect+offset*(curquant++); sprintf(keyname, fmt, curquant); fits_write_key(fptr, TSTRING, keyname, const_cast("User2"), CNULL, &status); } if (quantities & GYOTO_QUANTITY_USER3) { data->user3=vect+offset*(curquant++); sprintf(keyname, fmt, curquant); fits_write_key(fptr, TSTRING, keyname, const_cast("User3"), CNULL, &status); } if (quantities & GYOTO_QUANTITY_USER4) { data->user4=vect+offset*(curquant++); sprintf(keyname, fmt, curquant); fits_write_key(fptr, TSTRING, keyname, const_cast("User4"), CNULL, &status); } if (quantities & GYOTO_QUANTITY_USER5) { data->user5=vect+offset*(curquant++); sprintf(keyname, fmt, curquant); fits_write_key(fptr, TSTRING, keyname, const_cast("User5"), CNULL, &status); } if (quantities & GYOTO_QUANTITY_SPECTRUM) { data->spectrum=vect+offset*(curquant++); data->offset=int(offset); sprintf(keyname, fmt, curquant); fits_write_key(fptr, TSTRING, keyname, const_cast("Spectrum"), CNULL, &status); } if (quantities & GYOTO_QUANTITY_BINSPECTRUM) { data->binspectrum=vect+offset*(curquant++); data->offset=int(offset); sprintf(keyname, fmt, curquant); fits_write_key(fptr, TSTRING, keyname, const_cast("BinSpectrum"), CNULL, &status); } signal(SIGINT, sigint_handler); curmsg = "In gyoto.C: Error during ray-tracing: "; if (imax>res) imax=res; if (jmax>res) jmax=res; Screen::Range irange(imin, imax, di); Screen::Range jrange(jmin, jmax, dj); Screen::Grid grid(irange, jrange, "\rj = "); if (verbose() >= GYOTO_QUIET_VERBOSITY) cout << "j = " << 1 << "/" << (jmax-jmin)/dj+1 << flush; scenery -> rayTrace(grid, data, ipctdims[0]?impactcoords:NULL); curmsg = "In gyoto.C: Error while saving: "; if (verbose() >= GYOTO_QUIET_VERBOSITY) cout << "\nSaving to file: " << pixfile << endl; signal(SIGINT, SIG_DFL); // Save to fits file fits_write_pix(fptr, TDOUBLE, fpixel, nelements, vect, &status); if (quantities & GYOTO_QUANTITY_IMPACTCOORDS || ipct) { // Save if requested, copying if provided cout << "Saving precomputed impact coordinates" << endl; long naxes_ipct[] = {16, long(res), long(res)}; fits_create_img(fptr, DOUBLE_IMG, naxis, naxes_ipct, &status); fits_write_key(fptr, TSTRING, const_cast("EXTNAME"), const_cast("Gyoto Impact Coordinates"), CNULL, &status); fits_write_key(fptr, TDOUBLE, const_cast("Gyoto Observing Date"), &ipcttime, "Geometrical units", &status); fits_write_pix(fptr, TDOUBLE, fpixel, res*res*16, impactcoords, &status); fits_report_error(stderr, status); if (status) return status; } fits_close_file(fptr, &status); fits_report_error(stderr, status); if (debug()) cerr << "DEBUG: gyoto.C: FITS file closed, cleaning" << endl; curmsg = "In gyoto.C: Error while cleaning (file saved already): "; if (debug()) cerr << "DEBUG: gyoto.C: delete [] vect" << endl; delete [] vect; if (impactcoords) { if (debug()) cerr << "gyoto.C: delete [] data->impact" << endl; delete [] impactcoords; } GYOTO_DEBUG << "screen = NULL\n"; screen = NULL; GYOTO_DEBUG << "scenery = NULL\n"; scenery = NULL; if (status) return status; } #if defined HAVE_MPI if (MPI::Is_initialized() && !MPI::Is_finalized()) MPI_Finalize(); #endif return 0; } Gyoto-1.2.0/bin/optionparser.h000066400000000000000000003052631302352257300162740ustar00rootroot00000000000000/* * The Lean Mean C++ Option Parser * * Copyright (C) 2012 Matthias S. Benkmann * * The "Software" in the following 2 paragraphs refers to this file containing * the code to The Lean Mean C++ Option Parser. * The "Software" does NOT refer to any other files which you * may have received alongside this file (e.g. as part of a larger project that * incorporates The Lean Mean C++ Option Parser). * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /* * NOTE: It is recommended that you read the processed HTML doxygen documentation * rather than this source. If you don't know doxygen, it's like javadoc for C++. * If you don't want to install doxygen you can find a copy of the processed * documentation at * * http://optionparser.sourceforge.net/ * */ /** * @file * * @brief This is the only file required to use The Lean Mean C++ Option Parser. * Just \#include it and you're set. * * The Lean Mean C++ Option Parser handles the program's command line arguments * (argc, argv). * It supports the short and long option formats of getopt(), getopt_long() * and getopt_long_only() but has a more convenient interface. * The following features set it apart from other option parsers: * * @par Highlights: *
    *
  • It is a header-only library. Just \#include "optionparser.h" and you're set. *
  • It is freestanding. There are no dependencies whatsoever, not even the * C or C++ standard library. *
  • It has a usage message formatter that supports column alignment and * line wrapping. This aids localization because it adapts to * translated strings that are shorter or longer (even if they contain * Asian wide characters). *
  • Unlike getopt() and derivatives it doesn't force you to loop through * options sequentially. Instead you can access options directly like this: *
      *
    • Test for presence of a switch in the argument vector: * @code if ( options[QUIET] ) ... @endcode *
    • Evaluate --enable-foo/--disable-foo pair where the last one used wins: * @code if ( options[FOO].last()->type() == DISABLE ) ... @endcode *
    • Cumulative option (-v verbose, -vv more verbose, -vvv even more verbose): * @code int verbosity = options[VERBOSE].count(); @endcode *
    • Iterate over all --file=<fname> arguments: * @code for (Option* opt = options[FILE]; opt; opt = opt->next()) * fname = opt->arg; ... @endcode *
    • If you really want to, you can still process all arguments in order: * @code * for (int i = 0; i < p.optionsCount(); ++i) { * Option& opt = buffer[i]; * switch(opt.index()) { * case HELP: ... * case VERBOSE: ... * case FILE: fname = opt.arg; ... * case UNKNOWN: ... * @endcode *
    *
@n * Despite these features the code size remains tiny. * It is smaller than uClibc's GNU getopt() and just a * couple 100 bytes larger than uClibc's SUSv3 getopt(). @n * (This does not include the usage formatter, of course. But you don't have to use that.) * * @par Download: * Tarball with examples and test programs: * optionparser-1.3.tar.gz @n * Just the header (this is all you really need): * optionparser.h * * @par Changelog: * Version 1.3: Compatible with Microsoft Visual C++. @n * Version 1.2: Added @ref option::Option::namelen "Option::namelen" and removed the extraction * of short option characters into a special buffer. @n * Changed @ref option::Arg::Optional "Arg::Optional" to accept arguments if they are attached * rather than separate. This is what GNU getopt() does and how POSIX recommends * utilities should interpret their arguments.@n * Version 1.1: Optional mode with argument reordering as done by GNU getopt(), so that * options and non-options can be mixed. See * @ref option::Parser::parse() "Parser::parse()". * * @par Feedback: * Send questions, bug reports, feature requests etc. to: optionparser-feedback (a) lists.sourceforge.net * @htmlonly @endhtmlonly * * * @par Example program: * (Note: @c option::* identifiers are links that take you to their documentation.) * @code * #include * #include "optionparser.h" * * enum optionIndex { UNKNOWN, HELP, PLUS }; * const option::Descriptor usage[] = * { * {UNKNOWN, 0,"" , "" ,option::Arg::None, "USAGE: example [options]\n\n" * "Options:" }, * {HELP, 0,"" , "help",option::Arg::None, " --help \tPrint usage and exit." }, * {PLUS, 0,"p", "plus",option::Arg::None, " --plus, -p \tIncrement count." }, * {UNKNOWN, 0,"" , "" ,option::Arg::None, "\nExamples:\n" * " example --unknown -- --this_is_no_option\n" * " example -unk --plus -ppp file1 file2\n" }, * {0,0,0,0,0,0} * }; * * int main(int argc, char* argv[]) * { * argc-=(argc>0); argv+=(argc>0); // skip program name argv[0] if present * option::Stats stats(usage, argc, argv); * option::Option options[stats.options_max], buffer[stats.buffer_max]; * option::Parser parse(usage, argc, argv, options, buffer); * * if (parse.error()) * return 1; * * if (options[HELP] || argc == 0) { * option::printUsage(std::cout, usage); * return 0; * } * * std::cout << "--plus count: " << * options[PLUS].count() << "\n"; * * for (option::Option* opt = options[UNKNOWN]; opt; opt = opt->next()) * std::cout << "Unknown option: " << opt->name << "\n"; * * for (int i = 0; i < parse.nonOptionsCount(); ++i) * std::cout << "Non-option #" << i << ": " << parse.nonOption(i) << "\n"; * } * @endcode * * @par Option syntax: * @li The Lean Mean C++ Option Parser follows POSIX getopt() conventions and supports * GNU-style getopt_long() long options as well as Perl-style single-minus * long options (getopt_long_only()). * @li short options have the format @c -X where @c X is any character that fits in a char. * @li short options can be grouped, i.e. -X -Y is equivalent to @c -XY. * @li a short option may take an argument either separate (-X foo) or * attached (@c -Xfoo). You can make the parser accept the additional format @c -X=foo by * registering @c X as a long option (in addition to being a short option) and * enabling single-minus long options. * @li an argument-taking short option may be grouped if it is the last in the group, e.g. * @c -ABCXfoo or -ABCX foo (@c foo is the argument to the @c -X option). * @li a lone minus character @c '-' is not treated as an option. It is customarily used where * a file name is expected to refer to stdin or stdout. * @li long options have the format @c --option-name. * @li the option-name of a long option can be anything and include any characters. * Even @c = characters will work, but don't do that. * @li [optional] long options may be abbreviated as long as the abbreviation is unambiguous. * You can set a minimum length for abbreviations. * @li [optional] long options may begin with a single minus. The double minus form is always * accepted, too. * @li a long option may take an argument either separate ( --option arg ) or * attached ( --option=arg ). In the attached form the equals sign is mandatory. * @li an empty string can be passed as an attached long option argument: --option-name= . * Note the distinction between an empty string as argument and no argument at all. * @li an empty string is permitted as separate argument to both long and short options. * @li Arguments to both short and long options may start with a @c '-' character. E.g. * -X-X , -X -X or --long-X=-X . If @c -X * and @c --long-X take an argument, that argument will be @c "-X" in all 3 cases. * @li If using the built-in @ref option::Arg::Optional "Arg::Optional", optional arguments must * be attached. * @li the special option @c -- (i.e. without a name) terminates the list of * options. Everything that follows is a non-option argument, even if it starts with * a @c '-' character. The @c -- itself will not appear in the parse results. * @li the first argument that doesn't start with @c '-' or @c '--' and does not belong to * a preceding argument-taking option, will terminate the option list and is the * first non-option argument. All following command line arguments are treated as * non-option arguments, even if they start with @c '-' . @n * NOTE: This behaviour is mandated by POSIX, but GNU getopt() only honours this if it is * explicitly requested (e.g. by setting POSIXLY_CORRECT). @n * You can enable the GNU behaviour by passing @c true as first argument to * e.g. @ref option::Parser::parse() "Parser::parse()". * @li Arguments that look like options (i.e. @c '-' followed by at least 1 character) but * aren't, are NOT treated as non-option arguments. They are treated as unknown options and * are collected into a list of unknown options for error reporting. @n * This means that in order to pass a first non-option * argument beginning with the minus character it is required to use the * @c -- special option, e.g. * @code * program -x -- --strange-filename * @endcode * In this example, @c --strange-filename is a non-option argument. If the @c -- * were omitted, it would be treated as an unknown option. @n * See @ref option::Descriptor::longopt for information on how to collect unknown options. * */ #ifndef OPTIONPARSER_H_ #define OPTIONPARSER_H_ /** @brief The namespace of The Lean Mean C++ Option Parser. */ namespace option { #ifdef _MSC_VER #include #pragma intrinsic(_BitScanReverse) struct MSC_Builtin_CLZ { static int builtin_clz(unsigned x) { unsigned long index; _BitScanReverse(&index, x); return 32-index; // int is always 32bit on Windows, even for target x64 } }; #define __builtin_clz(x) MSC_Builtin_CLZ::builtin_clz(x) #endif class Option; /** * @brief Possible results when checking if an argument is valid for a certain option. * * In the case that no argument is provided for an option that takes an * optional argument, return codes @c ARG_OK and @c ARG_IGNORE are equivalent. */ enum ArgStatus { //! The option does not take an argument. ARG_NONE, //! The argument is acceptable for the option. ARG_OK, //! The argument is not acceptable but that's non-fatal because the option's argument is optional. ARG_IGNORE, //! The argument is not acceptable and that's fatal. ARG_ILLEGAL }; /** * @brief Signature of functions that check if an argument is valid for a certain type of option. * * Every Option has such a function assigned in its Descriptor. * @code * Descriptor usage[] = { {UNKNOWN, 0, "", "", Arg::None, ""}, ... }; * @endcode * * A CheckArg function has the following signature: * @code ArgStatus CheckArg(const Option& option, bool msg); @endcode * * It is used to check if a potential argument would be acceptable for the option. * It will even be called if there is no argument. In that case @c option.arg will be @c NULL. * * If @c msg is @c true and the function determines that an argument is not acceptable and * that this is a fatal error, it should output a message to the user before * returning @ref ARG_ILLEGAL. If @c msg is @c false the function should remain silent (or you * will get duplicate messages). * * See @ref ArgStatus for the meaning of the return values. * * While you can provide your own functions, * often the following pre-defined checks (which never return @ref ARG_ILLEGAL) will suffice: * * @li @c Arg::None @copybrief Arg::None * @li @c Arg::Optional @copybrief Arg::Optional * */ typedef ArgStatus (*CheckArg)(const Option& option, bool msg); /** * @brief Describes an option, its help text (usage) and how it should be parsed. * * The main input when constructing an option::Parser is an array of Descriptors. * @par Example: * @code * enum OptionIndex {CREATE, ...}; * enum OptionType {DISABLE, ENABLE, OTHER}; * * const option::Descriptor usage[] = { * { CREATE, // index * OTHER, // type * "c", // shortopt * "create", // longopt * Arg::None, // check_arg * "--create Tells the program to create something." // help * } * , ... * }; * @endcode */ struct Descriptor { /** * @brief Index of this option's linked list in the array filled in by the parser. * * Command line options whose Descriptors have the same index will end up in the same * linked list in the order in which they appear on the command line. If you have * multiple long option aliases that refer to the same option, give their descriptors * the same @c index. * * If you have options that mean exactly opposite things * (e.g. @c --enable-foo and @c --disable-foo ), you should also give them the same * @c index, but distinguish them through different values for @ref type. * That way they end up in the same list and you can just take the last element of the * list and use its type. This way you get the usual behaviour where switches later * on the command line override earlier ones without having to code it manually. * * @par Tip: * Use an enum rather than plain ints for better readability, as shown in the example * at Descriptor. */ const unsigned index; /** * @brief Used to distinguish between options with the same @ref index. * See @ref index for details. * * It is recommended that you use an enum rather than a plain int to make your * code more readable. */ const int type; /** * @brief Each char in this string will be accepted as a short option character. * * The string must not include the minus character @c '-' or you'll get undefined * behaviour. * * If this Descriptor should not have short option characters, use the empty * string "". NULL is not permitted here! * * See @ref longopt for more information. */ const char* const shortopt; /** * @brief The long option name (without the leading @c -- ). * * If this Descriptor should not have a long option name, use the empty * string "". NULL is not permitted here! * * While @ref shortopt allows multiple short option characters, each * Descriptor can have only a single long option name. If you have multiple * long option names referring to the same option use separate Descriptors * that have the same @ref index and @ref type. You may repeat * short option characters in such an alias Descriptor but there's no need to. * * @par Dummy Descriptors: * You can use dummy Descriptors with an * empty string for both @ref shortopt and @ref longopt to add text to * the usage that is not related to a specific option. See @ref help. * The first dummy Descriptor will be used for unknown options (see below). * * @par Unknown Option Descriptor: * The first dummy Descriptor in the list of Descriptors, * whose @ref shortopt and @ref longopt are both the empty string, will be used * as the Descriptor for unknown options. An unknown option is a string in * the argument vector that is not a lone minus @c '-' but starts with a minus * character and does not match any Descriptor's @ref shortopt or @ref longopt. @n * Note that the dummy descriptor's @ref check_arg function @e will be called and * its return value will be evaluated as usual. I.e. if it returns @ref ARG_ILLEGAL * the parsing will be aborted with Parser::error()==true. @n * if @c check_arg does not return @ref ARG_ILLEGAL the descriptor's * @ref index @e will be used to pick the linked list into which * to put the unknown option. @n * If there is no dummy descriptor, unknown options will be dropped silently. * */ const char* const longopt; /** * @brief For each option that matches @ref shortopt or @ref longopt this function * will be called to check a potential argument to the option. * * This function will be called even if there is no potential argument. In that case * it will be passed @c NULL as @c arg parameter. Do not confuse this with the empty * string. * * See @ref CheckArg for more information. */ const CheckArg check_arg; /** * @brief The usage text associated with the options in this Descriptor. * * You can use option::printUsage() to format your usage message based on * the @c help texts. You can use dummy Descriptors where * @ref shortopt and @ref longopt are both the empty string to add text to * the usage that is not related to a specific option. * * See option::printUsage() for special formatting characters you can use in * @c help to get a column layout. * * @attention * Must be UTF-8-encoded. If your compiler supports C++11 you can use the "u8" * prefix to make sure string literals are properly encoded. */ const char* help; }; /** * @brief A parsed option from the command line together with its argument if it has one. * * The Parser chains all parsed options with the same Descriptor::index together * to form a linked list. This allows you to easily implement all of the common ways * of handling repeated options and enable/disable pairs. * * @li Test for presence of a switch in the argument vector: * @code if ( options[QUIET] ) ... @endcode * @li Evaluate --enable-foo/--disable-foo pair where the last one used wins: * @code if ( options[FOO].last()->type() == DISABLE ) ... @endcode * @li Cumulative option (-v verbose, -vv more verbose, -vvv even more verbose): * @code int verbosity = options[VERBOSE].count(); @endcode * @li Iterate over all --file=<fname> arguments: * @code for (Option* opt = options[FILE]; opt; opt = opt->next()) * fname = opt->arg; ... @endcode */ class Option { Option* next_; Option* prev_; public: /** * @brief Pointer to this Option's Descriptor. * * Remember that the first dummy descriptor (see @ref Descriptor::longopt) is used * for unknown options. * * @attention * @c desc==NULL signals that this Option is unused. This is the default state of * elements in the result array. You don't need to test @c desc explicitly. You * can simply write something like this: * @code * if (options[CREATE]) * { * ... * } * @endcode * This works because of operator const Option*() . */ const Descriptor* desc; /** * @brief The name of the option as used on the command line. * * The main purpose of this string is to be presented to the user in messages. * * In the case of a long option, this is the actual @c argv pointer, i.e. the first * character is a '-'. In the case of a short option this points to the option * character within the @c argv string. * * Note that in the case of a short option group or an attached option argument, this * string will contain additional characters following the actual name. Use @ref namelen * to filter out the actual option name only. * */ const char* name; /** * @brief Pointer to this Option's argument (if any). * * NULL if this option has no argument. Do not confuse this with the empty string which * is a valid argument. */ const char* arg; /** * @brief The length of the option @ref name. * * Because @ref name points into the actual @c argv string, the option name may be * followed by more characters (e.g. other short options in the same short option group). * This value is the number of bytes (not characters!) that are part of the actual name. * * For a short option, this length is always 1. For a long option this length is always * at least 2 if single minus long options are permitted and at least 3 if they are disabled. * * @note * In the pathological case of a minus within a short option group (e.g. @c -xf-z), this * length is incorrect, because this case will be misinterpreted as a long option and the * name will therefore extend to the string's 0-terminator or a following '=" character * if there is one. This is irrelevant for most uses of @ref name and @c namelen. If you * really need to distinguish the case of a long and a short option, compare @ref name to * the @c argv pointers. A long option's @c name is always identical to one of them, * whereas a short option's is never. */ int namelen; /** * @brief Returns Descriptor::type of this Option's Descriptor, or 0 if this Option * is invalid (unused). * * Because this method (and last(), too) can be used even on unused Options with desc==0, you can (provided * you arrange your types properly) switch on type() without testing validity first. * @code * enum OptionType { UNUSED=0, DISABLED=0, ENABLED=1 }; * enum OptionIndex { FOO }; * const Descriptor usage[] = { * { FOO, ENABLED, "", "enable-foo", Arg::None, 0 }, * { FOO, DISABLED, "", "disable-foo", Arg::None, 0 }, * { 0, 0, 0, 0, 0, 0 } }; * ... * switch(options[FOO].last()->type()) // no validity check required! * { * case ENABLED: ... * case DISABLED: ... // UNUSED==DISABLED ! * } * @endcode */ int type() const { return desc == 0 ? 0 : desc->type; } /** * @brief Returns Descriptor::index of this Option's Descriptor, or -1 if this Option * is invalid (unused). */ int index() const { return desc == 0 ? -1 : desc->index; } /** * @brief Returns the number of times this Option (or others with the same Descriptor::index) * occurs in the argument vector. * * This corresponds to the number of elements in the linked list this Option is part of. * It doesn't matter on which element you call count(). The return value is always the same. * * Use this to implement cumulative options, such as -v, -vv, -vvv for * different verbosity levels. * * Returns 0 when called for an unused/invalid option. */ int count() { int c = (desc == 0 ? 0 : 1); Option* p = first(); while (!p->isLast()) { ++c; p = p->next_; }; return c; } /** * @brief Returns true iff this is the first element of the linked list. * * The first element in the linked list is the first option on the command line * that has the respective Descriptor::index value. * * Returns true for an unused/invalid option. */ bool isFirst() const { return isTagged(prev_); } /** * @brief Returns true iff this is the last element of the linked list. * * The last element in the linked list is the last option on the command line * that has the respective Descriptor::index value. * * Returns true for an unused/invalid option. */ bool isLast() const { return isTagged(next_); } /** * @brief Returns a pointer to the first element of the linked list. * * Use this when you want the first occurrence of an option on the command line to * take precedence. Note that this is not the way most programs handle options. * You should probably be using last() instead. * * @note * This method may be called on an unused/invalid option and will return a pointer to the * option itself. */ Option* first() { Option* p = this; while (!p->isFirst()) p = p->prev_; return p; } /** * @brief Returns a pointer to the last element of the linked list. * * Use this when you want the last occurrence of an option on the command line to * take precedence. This is the most common way of handling conflicting options. * * @note * This method may be called on an unused/invalid option and will return a pointer to the * option itself. * * @par Tip: * If you have options with opposite meanings (e.g. @c --enable-foo and @c --disable-foo), you * can assign them the same Descriptor::index to get them into the same list. Distinguish them by * Descriptor::type and all you have to do is check last()->type() to get * the state listed last on the command line. */ Option* last() { return first()->prevwrap(); } /** * @brief Returns a pointer to the previous element of the linked list or NULL if * called on first(). * * If called on first() this method returns NULL. Otherwise it will return the * option with the same Descriptor::index that precedes this option on the command * line. */ Option* prev() { return isFirst() ? 0 : prev_; } /** * @brief Returns a pointer to the previous element of the linked list with wrap-around from * first() to last(). * * If called on first() this method returns last(). Otherwise it will return the * option with the same Descriptor::index that precedes this option on the command * line. */ Option* prevwrap() { return untag(prev_); } /** * @brief Returns a pointer to the next element of the linked list or NULL if called * on last(). * * If called on last() this method returns NULL. Otherwise it will return the * option with the same Descriptor::index that follows this option on the command * line. */ Option* next() { return isLast() ? 0 : next_; } /** * @brief Returns a pointer to the next element of the linked list with wrap-around from * last() to first(). * * If called on last() this method returns first(). Otherwise it will return the * option with the same Descriptor::index that follows this option on the command * line. */ Option* nextwrap() { return untag(next_); } /** * @brief Makes @c new_last the new last() by chaining it into the list after last(). * * It doesn't matter which element you call append() on. The new element will always * be appended to last(). * * @attention * @c new_last must not yet be part of a list, or that list will become corrupted, because * this method does not unchain @c new_last from an existing list. */ void append(Option* new_last) { Option* p = last(); Option* f = first(); p->next_ = new_last; new_last->prev_ = p; new_last->next_ = tag(f); f->prev_ = tag(new_last); } /** * @brief Casts from Option to const Option* but only if this Option is valid. * * If this Option is valid (i.e. @c desc!=NULL), returns this. * Otherwise returns NULL. This allows testing an Option directly * in an if-clause to see if it is used: * @code * if (options[CREATE]) * { * ... * } * @endcode * It also allows you to write loops like this: * @code for (Option* opt = options[FILE]; opt; opt = opt->next()) * fname = opt->arg; ... @endcode */ operator const Option*() const { return desc ? this : 0; } /** * @brief Casts from Option to Option* but only if this Option is valid. * * If this Option is valid (i.e. @c desc!=NULL), returns this. * Otherwise returns NULL. This allows testing an Option directly * in an if-clause to see if it is used: * @code * if (options[CREATE]) * { * ... * } * @endcode * It also allows you to write loops like this: * @code for (Option* opt = options[FILE]; opt; opt = opt->next()) * fname = opt->arg; ... @endcode */ operator Option*() { return desc ? this : 0; } /** * @brief Creates a new Option that is a one-element linked list and has NULL * @ref desc, @ref name, @ref arg and @ref namelen. */ Option() : desc(0), name(0), arg(0), namelen(0) { prev_ = tag(this); next_ = tag(this); } /** * @brief Creates a new Option that is a one-element linked list and has the given * values for @ref desc, @ref name and @ref arg. * * If @c name_ points at a character other than '-' it will be assumed to refer to a * short option and @ref namelen will be set to 1. Otherwise the length will extend to * the first '=' character or the string's 0-terminator. */ Option(const Descriptor* desc_, const char* name_, const char* arg_) { init(desc_, name_, arg_); } /** * @brief Makes @c *this a copy of @c orig except for the linked list pointers. * * After this operation @c *this will be a one-element linked list. */ void operator=(const Option& orig) { init(orig.desc, orig.name, orig.arg); } /** * @brief Makes @c *this a copy of @c orig except for the linked list pointers. * * After this operation @c *this will be a one-element linked list. */ Option(const Option& orig) { init(orig.desc, orig.name, orig.arg); } private: /** * @internal * @brief Sets the fields of this Option to the given values (extracting @c name if necessary). * * If @c name_ points at a character other than '-' it will be assumed to refer to a * short option and @ref namelen will be set to 1. Otherwise the length will extend to * the first '=' character or the string's 0-terminator. */ void init(const Descriptor* desc_, const char* name_, const char* arg_) { desc = desc_; name = name_; arg = arg_; prev_ = tag(this); next_ = tag(this); namelen = 0; if (name == 0) return; namelen = 1; if (name[0] != '-') return; while (name[namelen] != 0 && name[namelen] != '=') ++namelen; } static Option* tag(Option* ptr) { return (Option*) ((unsigned long long) ptr | 1); } static Option* untag(Option* ptr) { return (Option*) ((unsigned long long) ptr & ~1ull); } static bool isTagged(Option* ptr) { return ((unsigned long long) ptr & 1); } }; /** * @brief Functions for checking the validity of option arguments. * * @copydetails CheckArg * * The following example code * can serve as starting place for writing your own more complex CheckArg functions: * @code * struct Arg: public option::Arg * { * static void printError(const char* msg1, const option::Option& opt, const char* msg2) * { * fprintf(stderr, "ERROR: %s", msg1); * fwrite(opt.name, opt.namelen, 1, stderr); * fprintf(stderr, "%s", msg2); * } * * static option::ArgStatus Unknown(const option::Option& option, bool msg) * { * if (msg) printError("Unknown option '", option, "'\n"); * return option::ARG_ILLEGAL; * } * * static option::ArgStatus Required(const option::Option& option, bool msg) * { * if (option.arg != 0) * return option::ARG_OK; * * if (msg) printError("Option '", option, "' requires an argument\n"); * return option::ARG_ILLEGAL; * } * * static option::ArgStatus NonEmpty(const option::Option& option, bool msg) * { * if (option.arg != 0 && option.arg[0] != 0) * return option::ARG_OK; * * if (msg) printError("Option '", option, "' requires a non-empty argument\n"); * return option::ARG_ILLEGAL; * } * * static option::ArgStatus Numeric(const option::Option& option, bool msg) * { * char* endptr = 0; * if (option.arg != 0 && strtol(option.arg, &endptr, 10)){}; * if (endptr != option.arg && *endptr == 0) * return option::ARG_OK; * * if (msg) printError("Option '", option, "' requires a numeric argument\n"); * return option::ARG_ILLEGAL; * } * }; * @endcode */ struct Arg { //! @brief For options that don't take an argument: Returns ARG_NONE. static ArgStatus None(const Option&, bool) { return ARG_NONE; } //! @brief Returns ARG_OK if the argument is attached and ARG_IGNORE otherwise. static ArgStatus Optional(const Option& option, bool) { if (option.arg && option.name[option.namelen] != 0) return ARG_OK; else return ARG_IGNORE; } }; /** * @brief Determines the minimum lengths of the buffer and options arrays used for Parser. * * Because Parser doesn't use dynamic memory its output arrays have to be pre-allocated. * If you don't want to use fixed size arrays (which may turn out too small, causing * command line arguments to be dropped), you can use Stats to determine the correct sizes. * Stats work cumulative. You can first pass in your default options and then the real * options and afterwards the counts will reflect the union. */ struct Stats { /** * @brief Number of elements needed for a @c buffer[] array to be used for * @ref Parser::parse() "parsing" the same argument vectors that were fed * into this Stats object. * * @note * This number is always 1 greater than the actual number needed, to give * you a sentinel element. */ unsigned buffer_max; /** * @brief Number of elements needed for an @c options[] array to be used for * @ref Parser::parse() "parsing" the same argument vectors that were fed * into this Stats object. * * @note * @li This number is always 1 greater than the actual number needed, to give * you a sentinel element. * @li This number depends only on the @c usage, not the argument vectors, because * the @c options array needs exactly one slot for each possible Descriptor::index. */ unsigned options_max; /** * @brief Creates a Stats object with counts set to 1 (for the sentinel element). */ Stats() : buffer_max(1), options_max(1) // 1 more than necessary as sentinel { } /** * @brief Creates a new Stats object and immediately updates it for the * given @c usage and argument vector. You may pass 0 for @c argc and/or @c argv, * if you just want to update @ref options_max. * * @note * The calls to Stats methods must match the later calls to Parser methods. * See Parser::parse() for the meaning of the arguments. */ Stats(bool gnu, const Descriptor usage[], int argc, const char** argv, int min_abbr_len = 0, // bool single_minus_longopt = false) : buffer_max(1), options_max(1) // 1 more than necessary as sentinel { add(gnu, usage, argc, argv, min_abbr_len, single_minus_longopt); } //! @brief Stats(...) with non-const argv. Stats(bool gnu, const Descriptor usage[], int argc, char** argv, int min_abbr_len = 0, // bool single_minus_longopt = false) : buffer_max(1), options_max(1) // 1 more than necessary as sentinel { add(gnu, usage, argc, (const char**) argv, min_abbr_len, single_minus_longopt); } //! @brief POSIX Stats(...) (gnu==false). Stats(const Descriptor usage[], int argc, const char** argv, int min_abbr_len = 0, // bool single_minus_longopt = false) : buffer_max(1), options_max(1) // 1 more than necessary as sentinel { add(false, usage, argc, argv, min_abbr_len, single_minus_longopt); } //! @brief POSIX Stats(...) (gnu==false) with non-const argv. Stats(const Descriptor usage[], int argc, char** argv, int min_abbr_len = 0, // bool single_minus_longopt = false) : buffer_max(1), options_max(1) // 1 more than necessary as sentinel { add(false, usage, argc, (const char**) argv, min_abbr_len, single_minus_longopt); } /** * @brief Updates this Stats object for the * given @c usage and argument vector. You may pass 0 for @c argc and/or @c argv, * if you just want to update @ref options_max. * * @note * The calls to Stats methods must match the later calls to Parser methods. * See Parser::parse() for the meaning of the arguments. */ void add(bool gnu, const Descriptor usage[], int argc, const char** argv, int min_abbr_len = 0, // bool single_minus_longopt = false); //! @brief add() with non-const argv. void add(bool gnu, const Descriptor usage[], int argc, char** argv, int min_abbr_len = 0, // bool single_minus_longopt = false) { add(gnu, usage, argc, (const char**) argv, min_abbr_len, single_minus_longopt); } //! @brief POSIX add() (gnu==false). void add(const Descriptor usage[], int argc, const char** argv, int min_abbr_len = 0, // bool single_minus_longopt = false) { add(false, usage, argc, argv, min_abbr_len, single_minus_longopt); } //! @brief POSIX add() (gnu==false) with non-const argv. void add(const Descriptor usage[], int argc, char** argv, int min_abbr_len = 0, // bool single_minus_longopt = false) { add(false, usage, argc, (const char**) argv, min_abbr_len, single_minus_longopt); } private: class CountOptionsAction; }; /** * @brief Checks argument vectors for validity and parses them into data * structures that are easier to work with. * * @par Example: * @code * int main(int argc, char* argv[]) * { * argc-=(argc>0); argv+=(argc>0); // skip program name argv[0] if present * option::Stats stats(usage, argc, argv); * option::Option options[stats.options_max], buffer[stats.buffer_max]; * option::Parser parse(usage, argc, argv, options, buffer); * * if (parse.error()) * return 1; * * if (options[HELP]) * ... * @endcode */ class Parser { int op_count; //!< @internal @brief see optionsCount() int nonop_count; //!< @internal @brief see nonOptionsCount() const char** nonop_args; //!< @internal @brief see nonOptions() bool err; //!< @internal @brief see error() public: /** * @brief Creates a new Parser. */ Parser() : op_count(0), nonop_count(0), nonop_args(0), err(false) { } /** * @brief Creates a new Parser and immediately parses the given argument vector. * @copydetails parse() */ Parser(bool gnu, const Descriptor usage[], int argc, const char** argv, Option options[], Option buffer[], int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) : op_count(0), nonop_count(0), nonop_args(0), err(false) { parse(gnu, usage, argc, argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); } //! @brief Parser(...) with non-const argv. Parser(bool gnu, const Descriptor usage[], int argc, char** argv, Option options[], Option buffer[], int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) : op_count(0), nonop_count(0), nonop_args(0), err(false) { parse(gnu, usage, argc, (const char**) argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); } //! @brief POSIX Parser(...) (gnu==false). Parser(const Descriptor usage[], int argc, const char** argv, Option options[], Option buffer[], int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) : op_count(0), nonop_count(0), nonop_args(0), err(false) { parse(false, usage, argc, argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); } //! @brief POSIX Parser(...) (gnu==false) with non-const argv. Parser(const Descriptor usage[], int argc, char** argv, Option options[], Option buffer[], int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) : op_count(0), nonop_count(0), nonop_args(0), err(false) { parse(false, usage, argc, (const char**) argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); } /** * @brief Parses the given argument vector. * * @param gnu if true, parse() will not stop at the first non-option argument. Instead it will * reorder arguments so that all non-options are at the end. This is the default behaviour * of GNU getopt() but is not conforming to POSIX. @n * Note, that once the argument vector has been reordered, the @c gnu flag will have * no further effect on this argument vector. So it is enough to pass @c gnu==true when * creating Stats. * @param usage Array of Descriptor objects that describe the options to support. The last entry * of this array must have 0 in all fields. * @param argc The number of elements from @c argv that are to be parsed. If you pass -1, the number * will be determined automatically. In that case the @c argv list must end with a NULL * pointer. * @param argv The arguments to be parsed. If you pass -1 as @c argc the last pointer in the @c argv * list must be NULL to mark the end. * @param options Each entry is the first element of a linked list of Options. Each new option * that is parsed will be appended to the list specified by that Option's * Descriptor::index. If an entry is not yet used (i.e. the Option is invalid), * it will be replaced rather than appended to. @n * The minimum length of this array is the greatest Descriptor::index value that * occurs in @c usage @e PLUS ONE. * @param buffer Each argument that is successfully parsed (including unknown arguments, if they * have a Descriptor whose CheckArg does not return @ref ARG_ILLEGAL) will be stored in this * array. parse() scans the array for the first invalid entry and begins writing at that * index. You can pass @c bufmax to limit the number of options stored. * @param min_abbr_len Passing a value min_abbr_len > 0 enables abbreviated long * options. The parser will match a prefix of a long option as if it was * the full long option (e.g. @c --foob=10 will be interpreted as if it was * @c --foobar=10 ), as long as the prefix has at least @c min_abbr_len characters * (not counting the @c -- ) and is unambiguous. * @n Be careful if combining @c min_abbr_len=1 with @c single_minus_longopt=true * because the ambiguity check does not consider short options and abbreviated * single minus long options will take precedence over short options. * @param single_minus_longopt Passing @c true for this option allows long options to begin with * a single minus. The double minus form will still be recognized. Note that * single minus long options take precedence over short options and short option * groups. E.g. @c -file would be interpreted as @c --file and not as * -f -i -l -e (assuming a long option named @c "file" exists). * @param bufmax The greatest index in the @c buffer[] array that parse() will write to is * @c bufmax-1. If there are more options, they will be processed (in particular * their CheckArg will be called) but not stored. @n * If you used Stats::buffer_max to dimension this array, you can pass * -1 (or not pass @c bufmax at all) which tells parse() that the buffer is * "large enough". * @attention * Remember that @c options and @c buffer store Option @e objects, not pointers. Therefore it * is not possible for the same object to be in both arrays. For those options that are found in * both @c buffer[] and @c options[] the respective objects are independent copies. And only the * objects in @c options[] are properly linked via Option::next() and Option::prev(). * You can iterate over @c buffer[] to * process all options in the order they appear in the argument vector, but if you want access to * the other Options with the same Descriptor::index, then you @e must access the linked list via * @c options[]. You can get the linked list in options from a buffer object via something like * @c options[buffer[i].index()]. */ void parse(bool gnu, const Descriptor usage[], int argc, const char** argv, Option options[], Option buffer[], int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1); //! @brief parse() with non-const argv. void parse(bool gnu, const Descriptor usage[], int argc, char** argv, Option options[], Option buffer[], int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) { parse(gnu, usage, argc, (const char**) argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); } //! @brief POSIX parse() (gnu==false). void parse(const Descriptor usage[], int argc, const char** argv, Option options[], Option buffer[], int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) { parse(false, usage, argc, argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); } //! @brief POSIX parse() (gnu==false) with non-const argv. void parse(const Descriptor usage[], int argc, char** argv, Option options[], Option buffer[], int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) { parse(false, usage, argc, (const char**) argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); } /** * @brief Returns the number of valid Option objects in @c buffer[]. * * @note * @li The returned value always reflects the number of Options in the buffer[] array used for * the most recent call to parse(). * @li The count (and the buffer[]) includes unknown options if they are collected * (see Descriptor::longopt). */ int optionsCount() { return op_count; } /** * @brief Returns the number of non-option arguments that remained at the end of the * most recent parse() that actually encountered non-option arguments. * * @note * A parse() that does not encounter non-option arguments will leave this value * as well as nonOptions() undisturbed. This means you can feed the Parser a * default argument vector that contains non-option arguments (e.g. a default filename). * Then you feed it the actual arguments from the user. If the user has supplied at * least one non-option argument, all of the non-option arguments from the default * disappear and are replaced by the user's non-option arguments. However, if the * user does not supply any non-option arguments the defaults will still be in * effect. */ int nonOptionsCount() { return nonop_count; } /** * @brief Returns a pointer to an array of non-option arguments (only valid * if nonOptionsCount() >0 ). * * @note * @li parse() does not copy arguments, so this pointer points into the actual argument * vector as passed to parse(). * @li As explained at nonOptionsCount() this pointer is only changed by parse() calls * that actually encounter non-option arguments. A parse() call that encounters only * options, will not change nonOptions(). */ const char** nonOptions() { return nonop_args; } /** * @brief Returns nonOptions()[i] (@e without checking if i is in range!). */ const char* nonOption(int i) { return nonOptions()[i]; } /** * @brief Returns @c true if an unrecoverable error occurred while parsing options. * * An illegal argument to an option (i.e. CheckArg returns @ref ARG_ILLEGAL) is an * unrecoverable error that aborts the parse. Unknown options are only an error if * their CheckArg function returns @ref ARG_ILLEGAL. Otherwise they are collected. * In that case if you want to exit the program if either an illegal argument * or an unknown option has been passed, use code like this * * @code * if (parser.error() || options[UNKNOWN]) * exit(1); * @endcode * */ bool error() { return err; } private: friend struct Stats; class StoreOptionAction; struct Action; /** * @internal * @brief This is the core function that does all the parsing. * @retval false iff an unrecoverable error occurred. */ static bool workhorse(bool gnu, const Descriptor usage[], int numargs, const char** args, Action& action, bool single_minus_longopt, bool print_errors, int min_abbr_len); /** * @internal * @brief Returns true iff @c st1 is a prefix of @c st2 and * in case @c st2 is longer than @c st1, then * the first additional character is '='. * * @par Examples: * @code * streq("foo", "foo=bar") == true * streq("foo", "foobar") == false * streq("foo", "foo") == true * streq("foo=bar", "foo") == false * @endcode */ static bool streq(const char* st1, const char* st2) { while (*st1 != 0) if (*st1++ != *st2++) return false; return (*st2 == 0 || *st2 == '='); } /** * @internal * @brief Like streq() but handles abbreviations. * * Returns true iff @c st1 and @c st2 have a common * prefix with the following properties: * @li (if min > 0) its length is at least @c min characters or the same length as @c st1 (whichever is smaller). * @li (if min <= 0) its length is the same as that of @c st1 * @li within @c st2 the character following the common prefix is either '=' or end-of-string. * * Examples: * @code * streqabbr("foo", "foo=bar",) == true * streqabbr("foo", "fo=bar" , 2) == true * streqabbr("foo", "fo" , 2) == true * streqabbr("foo", "fo" , 0) == false * streqabbr("foo", "f=bar" , 2) == false * streqabbr("foo", "f" , 2) == false * streqabbr("fo" , "foo=bar",) == false * streqabbr("foo", "foobar" ,) == false * streqabbr("foo", "fobar" ,) == false * streqabbr("foo", "foo" ,) == true * @endcode */ static bool streqabbr(const char* st1, const char* st2, long long min) { const char* st1start = st1; while (*st1 != 0 && (*st1 == *st2)) { ++st1; ++st2; } return (*st1 == 0 || (min > 0 && (st1 - st1start) >= min)) && (*st2 == 0 || *st2 == '='); } /** * @internal * @brief Returns true iff character @c ch is contained in the string @c st. * * Returns @c true for @c ch==0 . */ static bool instr(char ch, const char* st) { while (*st != 0 && *st != ch) ++st; return *st == ch; } /** * @internal * @brief Rotates args[-count],...,args[-1],args[0] to become * args[0],args[-count],...,args[-1]. */ static void shift(const char** args, int count) { for (int i = 0; i > -count; --i) { const char* temp = args[i]; args[i] = args[i - 1]; args[i - 1] = temp; } } }; /** * @internal * @brief Interface for actions Parser::workhorse() should perform for each Option it * parses. */ struct Parser::Action { /** * @brief Called by Parser::workhorse() for each Option that has been successfully * parsed (including unknown * options if they have a Descriptor whose Descriptor::check_arg does not return * @ref ARG_ILLEGAL. * * Returns @c false iff a fatal error has occured and the parse should be aborted. */ virtual bool perform(Option&) { return true; } /** * @brief Called by Parser::workhorse() after finishing the parse. * @param numargs the number of non-option arguments remaining * @param args pointer to the first remaining non-option argument (if numargs > 0). * * @return * @c false iff a fatal error has occurred. */ virtual bool finished(int numargs, const char** args) { (void) numargs; (void) args; return true; } }; /** * @internal * @brief An Action to pass to Parser::workhorse() that will increment a counter for * each parsed Option. */ class Stats::CountOptionsAction: public Parser::Action { unsigned* buffer_max; public: /** * Creates a new CountOptionsAction that will increase @c *buffer_max_ for each * parsed Option. */ CountOptionsAction(unsigned* buffer_max_) : buffer_max(buffer_max_) { } bool perform(Option&) { if (*buffer_max == 0x7fffffff) return false; // overflow protection: don't accept number of options that doesn't fit signed int ++*buffer_max; return true; } }; /** * @internal * @brief An Action to pass to Parser::workhorse() that will store each parsed Option in * appropriate arrays (see Parser::parse()). */ class Parser::StoreOptionAction: public Parser::Action { Parser& parser; Option* options; Option* buffer; int bufmax; //! Number of slots in @c buffer. @c -1 means "large enough". public: /** * @brief Creates a new StoreOption action. * @param parser_ the parser whose op_count should be updated. * @param options_ each Option @c o is chained into the linked list @c options_[o.desc->index] * @param buffer_ each Option is appended to this array as long as there's a free slot. * @param bufmax_ number of slots in @c buffer_. @c -1 means "large enough". */ StoreOptionAction(Parser& parser_, Option options_[], Option buffer_[], int bufmax_) : parser(parser_), options(options_), buffer(buffer_), bufmax(bufmax_) { // find first empty slot in buffer (if any) int bufidx = 0; while ((bufmax < 0 || bufidx < bufmax) && buffer[bufidx]) ++bufidx; // set parser's optionCount parser.op_count = bufidx; } bool perform(Option& option) { if (bufmax < 0 || parser.op_count < bufmax) { if (parser.op_count == 0x7fffffff) return false; // overflow protection: don't accept number of options that doesn't fit signed int buffer[parser.op_count] = option; int idx = buffer[parser.op_count].desc->index; if (options[idx]) options[idx].append(buffer[parser.op_count]); else options[idx] = buffer[parser.op_count]; ++parser.op_count; } return true; // NOTE: an option that is discarded because of a full buffer is not fatal } bool finished(int numargs, const char** args) { // only overwrite non-option argument list if there's at least 1 // new non-option argument. Otherwise we keep the old list. This // makes it easy to use default non-option arguments. if (numargs > 0) { parser.nonop_count = numargs; parser.nonop_args = args; } return true; } }; inline void Parser::parse(bool gnu, const Descriptor usage[], int argc, const char** argv, Option options[], Option buffer[], int min_abbr_len, bool single_minus_longopt, int bufmax) { StoreOptionAction action(*this, options, buffer, bufmax); err = !workhorse(gnu, usage, argc, argv, action, single_minus_longopt, true, min_abbr_len); } inline void Stats::add(bool gnu, const Descriptor usage[], int argc, const char** argv, int min_abbr_len, bool single_minus_longopt) { // determine size of options array. This is the greatest index used in the usage + 1 int i = 0; while (usage[i].shortopt != 0) { if (usage[i].index + 1 >= options_max) options_max = (usage[i].index + 1) + 1; // 1 more than necessary as sentinel ++i; } CountOptionsAction action(&buffer_max); Parser::workhorse(gnu, usage, argc, argv, action, single_minus_longopt, false, min_abbr_len); } inline bool Parser::workhorse(bool gnu, const Descriptor usage[], int numargs, const char** args, Action& action, bool single_minus_longopt, bool print_errors, int min_abbr_len) { // protect against NULL pointer if (args == 0) numargs = 0; int nonops = 0; while (numargs != 0 && *args != 0) { const char* param = *args; // param can be --long-option, -srto or non-option argument // in POSIX mode the first non-option argument terminates the option list // a lone minus character is a non-option argument if (param[0] != '-' || param[1] == 0) { if (gnu) { ++nonops; ++args; if (numargs > 0) --numargs; continue; } else break; } // -- terminates the option list. The -- itself is skipped. if (param[1] == '-' && param[2] == 0) { shift(args, nonops); ++args; if (numargs > 0) --numargs; break; } bool handle_short_options; const char* longopt_name; if (param[1] == '-') // if --long-option { handle_short_options = false; longopt_name = param + 2; } else { handle_short_options = true; longopt_name = param + 1; //for testing a potential -long-option } bool try_single_minus_longopt = single_minus_longopt; bool have_more_args = (numargs > 1 || numargs < 0); // is referencing argv[1] valid? do // loop over short options in group, for long options the body is executed only once { int idx; const char* optarg; /******************** long option **********************/ if (handle_short_options == false || try_single_minus_longopt) { idx = 0; while (usage[idx].longopt != 0 && !streq(usage[idx].longopt, longopt_name)) ++idx; if (usage[idx].longopt == 0 && min_abbr_len > 0) // if we should try to match abbreviated long options { int i1 = 0; while (usage[i1].longopt != 0 && !streqabbr(usage[i1].longopt, longopt_name, min_abbr_len)) ++i1; if (usage[i1].longopt != 0) { // now test if the match is unambiguous by checking for another match int i2 = i1 + 1; while (usage[i2].longopt != 0 && !streqabbr(usage[i2].longopt, longopt_name, min_abbr_len)) ++i2; if (usage[i2].longopt == 0) // if there was no second match it's unambiguous, so accept i1 as idx idx = i1; } } // if we found something, disable handle_short_options (only relevant if single_minus_longopt) if (usage[idx].longopt != 0) handle_short_options = false; try_single_minus_longopt = false; // prevent looking for longopt in the middle of shortopt group optarg = longopt_name; while (*optarg != 0 && *optarg != '=') ++optarg; if (*optarg == '=') // attached argument ++optarg; else // possibly detached argument optarg = (have_more_args ? args[1] : 0); } /************************ short option ***********************************/ if (handle_short_options) { if (*++param == 0) // point at the 1st/next option character break; // end of short option group idx = 0; while (usage[idx].shortopt != 0 && !instr(*param, usage[idx].shortopt)) ++idx; if (param[1] == 0) // if the potential argument is separate optarg = (have_more_args ? args[1] : 0); else // if the potential argument is attached optarg = param + 1; } const Descriptor* descriptor = &usage[idx]; if (descriptor->shortopt == 0) /************** unknown option ********************/ { // look for dummy entry (shortopt == "" and longopt == "") to use as Descriptor for unknown options idx = 0; while (usage[idx].shortopt != 0 && (usage[idx].shortopt[0] != 0 || usage[idx].longopt[0] != 0)) ++idx; descriptor = (usage[idx].shortopt == 0 ? 0 : &usage[idx]); } if (descriptor != 0) { Option option(descriptor, param, optarg); switch (descriptor->check_arg(option, print_errors)) { case ARG_ILLEGAL: return false; // fatal case ARG_OK: // skip one element of the argument vector, if it's a separated argument if (optarg != 0 && have_more_args && optarg == args[1]) { shift(args, nonops); if (numargs > 0) --numargs; ++args; } // No further short options are possible after an argument handle_short_options = false; break; case ARG_IGNORE: case ARG_NONE: option.arg = 0; break; } if (!action.perform(option)) return false; } } while (handle_short_options); shift(args, nonops); ++args; if (numargs > 0) --numargs; } // while if (numargs > 0 && *args == 0) // It's a bug in the caller if numargs is greater than the actual number numargs = 0; // of arguments, but as a service to the user we fix this if we spot it. if (numargs < 0) // if we don't know the number of remaining non-option arguments { // we need to count them numargs = 0; while (args[numargs] != 0) ++numargs; } return action.finished(numargs + nonops, args - nonops); } /** * @internal * @brief The implementation of option::printUsage(). */ struct PrintUsageImplementation { /** * @internal * @brief Interface for Functors that write (part of) a string somewhere. */ struct IStringWriter { /** * @brief Writes the given number of chars beginning at the given pointer somewhere. */ virtual void operator()(const char*, int) { } }; /** * @internal * @brief Encapsulates a function with signature func(string, size) where * string can be initialized with a const char* and size with an int. */ template struct FunctionWriter: public IStringWriter { Function* write; virtual void operator()(const char* str, int size) { (*write)(str, size); } FunctionWriter(Function* w) : write(w) { } }; /** * @internal * @brief Encapsulates a reference to an object with a write(string, size) * method like that of @c std::ostream. */ template struct OStreamWriter: public IStringWriter { OStream& ostream; virtual void operator()(const char* str, int size) { ostream.write(str, size); } OStreamWriter(OStream& o) : ostream(o) { } }; /** * @internal * @brief Like OStreamWriter but encapsulates a @c const reference, which is * typically a temporary object of a user class. */ template struct TemporaryWriter: public IStringWriter { const Temporary& userstream; virtual void operator()(const char* str, int size) { userstream.write(str, size); } TemporaryWriter(const Temporary& u) : userstream(u) { } }; /** * @internal * @brief Encapsulates a function with the signature func(fd, string, size) (the * signature of the @c write() system call) * where fd can be initialized from an int, string from a const char* and size from an int. */ template struct SyscallWriter: public IStringWriter { Syscall* write; int fd; virtual void operator()(const char* str, int size) { (*write)(fd, str, size); } SyscallWriter(Syscall* w, int f) : write(w), fd(f) { } }; /** * @internal * @brief Encapsulates a function with the same signature as @c std::fwrite(). */ template struct StreamWriter: public IStringWriter { Function* fwrite; Stream* stream; virtual void operator()(const char* str, int size) { (*fwrite)(str, size, 1, stream); } StreamWriter(Function* w, Stream* s) : fwrite(w), stream(s) { } }; /** * @internal * @brief Sets i1 = max(i1, i2) */ static void upmax(int& i1, int i2) { i1 = (i1 >= i2 ? i1 : i2); } /** * @internal * @brief Moves the "cursor" to column @c want_x assuming it is currently at column @c x * and sets @c x=want_x . * If x > want_x , a line break is output before indenting. * * @param write Spaces and possibly a line break are written via this functor to get * the desired indentation @c want_x . * @param[in,out] x the current indentation. Set to @c want_x by this method. * @param want_x the desired indentation. */ static void indent(IStringWriter& write, int& x, int want_x) { int indent = want_x - x; if (indent < 0) { write("\n", 1); indent = want_x; } if (indent > 0) { char space = ' '; for (int i = 0; i < indent; ++i) write(&space, 1); x = want_x; } } /** * @brief Returns true if ch is the unicode code point of a wide character. * * @note * The following character ranges are treated as wide * @code * 1100..115F * 2329..232A (just 2 characters!) * 2E80..A4C6 except for 303F * A960..A97C * AC00..D7FB * F900..FAFF * FE10..FE6B * FF01..FF60 * FFE0..FFE6 * 1B000...... * @endcode */ static bool isWideChar(unsigned ch) { if (ch == 0x303F) return false; return ((0x1100 <= ch && ch <= 0x115F) || (0x2329 <= ch && ch <= 0x232A) || (0x2E80 <= ch && ch <= 0xA4C6) || (0xA960 <= ch && ch <= 0xA97C) || (0xAC00 <= ch && ch <= 0xD7FB) || (0xF900 <= ch && ch <= 0xFAFF) || (0xFE10 <= ch && ch <= 0xFE6B) || (0xFF01 <= ch && ch <= 0xFF60) || (0xFFE0 <= ch && ch <= 0xFFE6) || (0x1B000 <= ch)); } /** * @internal * @brief Splits a @c Descriptor[] array into tables, rows, lines and columns and * iterates over these components. * * The top-level organizational unit is the @e table. * A table begins at a Descriptor with @c help!=NULL and extends up to * a Descriptor with @c help==NULL. * * A table consists of @e rows. Due to line-wrapping and explicit breaks * a row may take multiple lines on screen. Rows within the table are separated * by \\n. They never cross Descriptor boundaries. This means a row ends either * at \\n or the 0 at the end of the help string. * * A row consists of columns/cells. Columns/cells within a row are separated by \\t. * Line breaks within a cell are marked by \\v. * * Rows in the same table need not have the same number of columns/cells. The * extreme case are interjections, which are rows that contain neither \\t nor \\v. * These are NOT treated specially by LinePartIterator, but they are treated * specially by printUsage(). * * LinePartIterator iterates through the usage at 3 levels: table, row and part. * Tables and rows are as described above. A @e part is a line within a cell. * LinePartIterator iterates through 1st parts of all cells, then through the 2nd * parts of all cells (if any),... @n * Example: The row "1 \v 3 \t 2 \v 4" has 2 cells/columns and 4 parts. * The parts will be returned in the order 1, 2, 3, 4. * * It is possible that some cells have fewer parts than others. In this case * LinePartIterator will "fill up" these cells with 0-length parts. IOW, LinePartIterator * always returns the same number of parts for each column. Note that this is different * from the way rows and columns are handled. LinePartIterator does @e not guarantee that * the same number of columns will be returned for each row. * */ class LinePartIterator { const Descriptor* tablestart; //!< The 1st descriptor of the current table. const Descriptor* rowdesc; //!< The Descriptor that contains the current row. const char* rowstart; //!< Ptr to 1st character of current row within rowdesc->help. const char* ptr; //!< Ptr to current part within the current row. int col; //!< Index of current column. int len; //!< Length of the current part (that ptr points at) in BYTES int screenlen; //!< Length of the current part in screen columns (taking narrow/wide chars into account). int max_line_in_block; //!< Greatest index of a line within the block. This is the number of \\v within the cell with the most \\vs. int line_in_block; //!< Line index within the current cell of the current part. int target_line_in_block; //!< Line index of the parts we should return to the user on this iteration. bool hit_target_line; //!< Flag whether we encountered a part with line index target_line_in_block in the current cell. /** * @brief Determines the byte and character lengths of the part at @ref ptr and * stores them in @ref len and @ref screenlen respectively. */ void update_length() { screenlen = 0; for (len = 0; ptr[len] != 0 && ptr[len] != '\v' && ptr[len] != '\t' && ptr[len] != '\n'; ++len) { ++screenlen; unsigned ch = (unsigned char) ptr[len]; if (ch > 0xC1) // everything <= 0xC1 (yes, even 0xC1 itself) is not a valid UTF-8 start byte { // int __builtin_clz (unsigned int x) // Returns the number of leading 0-bits in x, starting at the most significant bit unsigned mask = (unsigned) -1 >> __builtin_clz(ch ^ 0xff); ch = ch & mask; // mask out length bits, we don't verify their correctness while (((unsigned char) ptr[len + 1] ^ 0x80) <= 0x3F) // while next byte is continuation byte { ch = (ch << 6) ^ (unsigned char) ptr[len + 1] ^ 0x80; // add continuation to char code ++len; } // ch is the decoded unicode code point if (ch >= 0x1100 && isWideChar(ch)) // the test for 0x1100 is here to avoid the function call in the Latin case ++screenlen; } } } public: //! @brief Creates an iterator for @c usage. LinePartIterator(const Descriptor usage[]) : tablestart(usage), rowdesc(0), rowstart(0), ptr(0), col(-1), len(0), max_line_in_block(0), line_in_block(0), target_line_in_block(0), hit_target_line(true) { } /** * @brief Moves iteration to the next table (if any). Has to be called once on a new * LinePartIterator to move to the 1st table. * @retval false if moving to next table failed because no further table exists. */ bool nextTable() { // If this is NOT the first time nextTable() is called after the constructor, // then skip to the next table break (i.e. a Descriptor with help == 0) if (rowdesc != 0) { while (tablestart->help != 0 && tablestart->shortopt != 0) ++tablestart; } // Find the next table after the break (if any) while (tablestart->help == 0 && tablestart->shortopt != 0) ++tablestart; restartTable(); return rowstart != 0; } /** * @brief Reset iteration to the beginning of the current table. */ void restartTable() { rowdesc = tablestart; rowstart = tablestart->help; ptr = 0; } /** * @brief Moves iteration to the next row (if any). Has to be called once after each call to * @ref nextTable() to move to the 1st row of the table. * @retval false if moving to next row failed because no further row exists. */ bool nextRow() { if (ptr == 0) { restartRow(); return rowstart != 0; } while (*ptr != 0 && *ptr != '\n') ++ptr; if (*ptr == 0) { if ((rowdesc + 1)->help == 0) // table break return false; ++rowdesc; rowstart = rowdesc->help; } else // if (*ptr == '\n') { rowstart = ptr + 1; } restartRow(); return true; } /** * @brief Reset iteration to the beginning of the current row. */ void restartRow() { ptr = rowstart; col = -1; len = 0; screenlen = 0; max_line_in_block = 0; line_in_block = 0; target_line_in_block = 0; hit_target_line = true; } /** * @brief Moves iteration to the next part (if any). Has to be called once after each call to * @ref nextRow() to move to the 1st part of the row. * @retval false if moving to next part failed because no further part exists. * * See @ref LinePartIterator for details about the iteration. */ bool next() { if (ptr == 0) return false; if (col == -1) { col = 0; update_length(); return true; } ptr += len; while (true) { switch (*ptr) { case '\v': upmax(max_line_in_block, ++line_in_block); ++ptr; break; case '\t': if (!hit_target_line) // if previous column did not have the targetline { // then "insert" a 0-length part update_length(); hit_target_line = true; return true; } hit_target_line = false; line_in_block = 0; ++col; ++ptr; break; case 0: case '\n': if (!hit_target_line) // if previous column did not have the targetline { // then "insert" a 0-length part update_length(); hit_target_line = true; return true; } if (++target_line_in_block > max_line_in_block) { update_length(); return false; } hit_target_line = false; line_in_block = 0; col = 0; ptr = rowstart; continue; default: ++ptr; continue; } // switch if (line_in_block == target_line_in_block) { update_length(); hit_target_line = true; return true; } } // while } /** * @brief Returns the index (counting from 0) of the column in which * the part pointed to by @ref data() is located. */ int column() { return col; } /** * @brief Returns the index (counting from 0) of the line within the current column * this part belongs to. */ int line() { return target_line_in_block; // NOT line_in_block !!! It would be wrong if !hit_target_line } /** * @brief Returns the length of the part pointed to by @ref data() in raw chars (not UTF-8 characters). */ int length() { return len; } /** * @brief Returns the width in screen columns of the part pointed to by @ref data(). * Takes multi-byte UTF-8 sequences and wide characters into account. */ int screenLength() { return screenlen; } /** * @brief Returns the current part of the iteration. */ const char* data() { return ptr; } }; /** * @internal * @brief Takes input and line wraps it, writing out one line at a time so that * it can be interleaved with output from other columns. * * The LineWrapper is used to handle the last column of each table as well as interjections. * The LineWrapper is called once for each line of output. If the data given to it fits * into the designated width of the last column it is simply written out. If there * is too much data, an appropriate split point is located and only the data up to this * split point is written out. The rest of the data is queued for the next line. * That way the last column can be line wrapped and interleaved with data from * other columns. The following example makes this clearer: * @code * Column 1,1 Column 2,1 This is a long text * Column 1,2 Column 2,2 that does not fit into * a single line. * @endcode * * The difficulty in producing this output is that the whole string * "This is a long text that does not fit into a single line" is the * 1st and only part of column 3. In order to produce the above * output the string must be output piecemeal, interleaved with * the data from the other columns. */ class LineWrapper { static const int bufmask = 15; //!< Must be a power of 2 minus 1. /** * @brief Ring buffer for length component of pair (data, length). */ int lenbuf[bufmask + 1]; /** * @brief Ring buffer for data component of pair (data, length). */ const char* datbuf[bufmask + 1]; /** * @brief The indentation of the column to which the LineBuffer outputs. LineBuffer * assumes that the indentation has already been written when @ref process() * is called, so this value is only used when a buffer flush requires writing * additional lines of output. */ int x; /** * @brief The width of the column to line wrap. */ int width; int head; //!< @brief index for next write int tail; //!< @brief index for next read - 1 (i.e. increment tail BEFORE read) /** * @brief Multiple methods of LineWrapper may decide to flush part of the buffer to * free up space. The contract of process() says that only 1 line is output. So * this variable is used to track whether something has output a line. It is * reset at the beginning of process() and checked at the end to decide if * output has already occurred or is still needed. */ bool wrote_something; bool buf_empty() { return ((tail + 1) & bufmask) == head; } bool buf_full() { return tail == head; } void buf_store(const char* data, int len) { lenbuf[head] = len; datbuf[head] = data; head = (head + 1) & bufmask; } //! @brief Call BEFORE reading ...buf[tail]. void buf_next() { tail = (tail + 1) & bufmask; } /** * @brief Writes (data,len) into the ring buffer. If the buffer is full, a single line * is flushed out of the buffer into @c write. */ void output(IStringWriter& write, const char* data, int len) { if (buf_full()) write_one_line(write); buf_store(data, len); } /** * @brief Writes a single line of output from the buffer to @c write. */ void write_one_line(IStringWriter& write) { if (wrote_something) // if we already wrote something, we need to start a new line { write("\n", 1); int _ = 0; indent(write, _, x); } if (!buf_empty()) { buf_next(); write(datbuf[tail], lenbuf[tail]); } wrote_something = true; } public: /** * @brief Writes out all remaining data from the LineWrapper using @c write. * Unlike @ref process() this method indents all lines including the first and * will output a \\n at the end (but only if something has been written). */ void flush(IStringWriter& write) { if (buf_empty()) return; int _ = 0; indent(write, _, x); wrote_something = false; while (!buf_empty()) write_one_line(write); write("\n", 1); } /** * @brief Process, wrap and output the next piece of data. * * process() will output at least one line of output. This is not necessarily * the @c data passed in. It may be data queued from a prior call to process(). * If the internal buffer is full, more than 1 line will be output. * * process() assumes that the a proper amount of indentation has already been * output. It won't write any further indentation before the 1st line. If * more than 1 line is written due to buffer constraints, the lines following * the first will be indented by this method, though. * * No \\n is written by this method after the last line that is written. * * @param write where to write the data. * @param data the new chunk of data to write. * @param len the length of the chunk of data to write. */ void process(IStringWriter& write, const char* data, int len) { wrote_something = false; while (len > 0) { if (len <= width) // quick test that works because utf8width <= len (all wide chars have at least 2 bytes) { output(write, data, len); len = 0; } else // if (len > width) it's possible (but not guaranteed) that utf8len > width { int utf8width = 0; int maxi = 0; while (maxi < len && utf8width < width) { int charbytes = 1; unsigned ch = (unsigned char) data[maxi]; if (ch > 0xC1) // everything <= 0xC1 (yes, even 0xC1 itself) is not a valid UTF-8 start byte { // int __builtin_clz (unsigned int x) // Returns the number of leading 0-bits in x, starting at the most significant bit unsigned mask = (unsigned) -1 >> __builtin_clz(ch ^ 0xff); ch = ch & mask; // mask out length bits, we don't verify their correctness while ((maxi + charbytes < len) && // (((unsigned char) data[maxi + charbytes] ^ 0x80) <= 0x3F)) // while next byte is continuation byte { ch = (ch << 6) ^ (unsigned char) data[maxi + charbytes] ^ 0x80; // add continuation to char code ++charbytes; } // ch is the decoded unicode code point if (ch >= 0x1100 && isWideChar(ch)) // the test for 0x1100 is here to avoid the function call in the Latin case { if (utf8width + 2 > width) break; ++utf8width; } } ++utf8width; maxi += charbytes; } // data[maxi-1] is the last byte of the UTF-8 sequence of the last character that fits // onto the 1st line. If maxi == len, all characters fit on the line. if (maxi == len) { output(write, data, len); len = 0; } else // if (maxi < len) at least 1 character (data[maxi] that is) doesn't fit on the line { int i; for (i = maxi; i >= 0; --i) if (data[i] == ' ') break; if (i >= 0) { output(write, data, i); data += i + 1; len -= i + 1; } else // did not find a space to split at => split before data[maxi] { // data[maxi] is always the beginning of a character, never a continuation byte output(write, data, maxi); data += maxi; len -= maxi; } } } } if (!wrote_something) // if we didn't already write something to make space in the buffer write_one_line(write); // write at most one line of actual output } /** * @brief Constructs a LineWrapper that wraps its output to fit into * screen columns @c x1 (incl.) to @c x2 (excl.). * * @c x1 gives the indentation LineWrapper uses if it needs to indent. */ LineWrapper(int x1, int x2) : x(x1), width(x2 - x1), head(0), tail(bufmask) { if (width < 2) // because of wide characters we need at least width 2 or the code breaks width = 2; } }; /** * @internal * @brief This is the implementation that is shared between all printUsage() templates. * Because all printUsage() templates share this implementation, there is no template bloat. */ static void printUsage(IStringWriter& write, const Descriptor usage[], int width = 80, // int last_column_min_percent = 50, int last_column_own_line_max_percent = 75) { if (width < 1) // protect against nonsense values width = 80; if (width > 10000) // protect against overflow in the following computation width = 10000; int last_column_min_width = ((width * last_column_min_percent) + 50) / 100; int last_column_own_line_max_width = ((width * last_column_own_line_max_percent) + 50) / 100; if (last_column_own_line_max_width == 0) last_column_own_line_max_width = 1; LinePartIterator part(usage); while (part.nextTable()) { /***************** Determine column widths *******************************/ const int maxcolumns = 8; // 8 columns are enough for everyone int col_width[maxcolumns]; int lastcolumn; int leftwidth; int overlong_column_threshold = 10000; do { lastcolumn = 0; for (int i = 0; i < maxcolumns; ++i) col_width[i] = 0; part.restartTable(); while (part.nextRow()) { while (part.next()) { if (part.column() < maxcolumns) { upmax(lastcolumn, part.column()); if (part.screenLength() < overlong_column_threshold) // We don't let rows that don't use table separators (\t or \v) influence // the width of column 0. This allows the user to interject section headers // or explanatory paragraphs that do not participate in the table layout. if (part.column() > 0 || part.line() > 0 || part.data()[part.length()] == '\t' || part.data()[part.length()] == '\v') upmax(col_width[part.column()], part.screenLength()); } } } /* * If the last column doesn't fit on the same * line as the other columns, we can fix that by starting it on its own line. * However we can't do this for any of the columns 0..lastcolumn-1. * If their sum exceeds the maximum width we try to fix this by iteratively * ignoring the widest line parts in the width determination until * we arrive at a series of column widths that fit into one line. * The result is a layout where everything is nicely formatted * except for a few overlong fragments. * */ leftwidth = 0; overlong_column_threshold = 0; for (int i = 0; i < lastcolumn; ++i) { leftwidth += col_width[i]; upmax(overlong_column_threshold, col_width[i]); } } while (leftwidth > width); /**************** Determine tab stops and last column handling **********************/ int tabstop[maxcolumns]; tabstop[0] = 0; for (int i = 1; i < maxcolumns; ++i) tabstop[i] = tabstop[i - 1] + col_width[i - 1]; int rightwidth = width - tabstop[lastcolumn]; bool print_last_column_on_own_line = false; if (rightwidth < last_column_min_width && rightwidth < col_width[lastcolumn]) { print_last_column_on_own_line = true; rightwidth = last_column_own_line_max_width; } // If lastcolumn == 0 we must disable print_last_column_on_own_line because // otherwise 2 copies of the last (and only) column would be output. // Actually this is just defensive programming. It is currently not // possible that lastcolumn==0 and print_last_column_on_own_line==true // at the same time, because lastcolumn==0 => tabstop[lastcolumn] == 0 => // rightwidth==width => rightwidth>=last_column_min_width (unless someone passes // a bullshit value >100 for last_column_min_percent) => the above if condition // is false => print_last_column_on_own_line==false if (lastcolumn == 0) print_last_column_on_own_line = false; LineWrapper lastColumnLineWrapper(width - rightwidth, width); LineWrapper interjectionLineWrapper(0, width); part.restartTable(); /***************** Print out all rows of the table *************************************/ while (part.nextRow()) { int x = -1; while (part.next()) { if (part.column() > lastcolumn) continue; // drop excess columns (can happen if lastcolumn == maxcolumns-1) if (part.column() == 0) { if (x >= 0) write("\n", 1); x = 0; } indent(write, x, tabstop[part.column()]); if ((part.column() < lastcolumn) && (part.column() > 0 || part.line() > 0 || part.data()[part.length()] == '\t' || part.data()[part.length()] == '\v')) { write(part.data(), part.length()); x += part.screenLength(); } else // either part.column() == lastcolumn or we are in the special case of // an interjection that doesn't contain \v or \t { // NOTE: This code block is not necessarily executed for // each line, because some rows may have fewer columns. LineWrapper& lineWrapper = (part.column() == 0) ? interjectionLineWrapper : lastColumnLineWrapper; if (!print_last_column_on_own_line) lineWrapper.process(write, part.data(), part.length()); } } // while if (print_last_column_on_own_line) { part.restartRow(); while (part.next()) { if (part.column() == lastcolumn) { write("\n", 1); int _ = 0; indent(write, _, width - rightwidth); lastColumnLineWrapper.process(write, part.data(), part.length()); } } } write("\n", 1); lastColumnLineWrapper.flush(write); interjectionLineWrapper.flush(write); } } } } ; /** * @brief Outputs a nicely formatted usage string with support for multi-column formatting * and line-wrapping. * * printUsage() takes the @c help texts of a Descriptor[] array and formats them into * a usage message, wrapping lines to achieve the desired output width. * * Table formatting: * * Aside from plain strings which are simply line-wrapped, the usage may contain tables. Tables * are used to align elements in the output. * * @code * // Without a table. The explanatory texts are not aligned. * -c, --create |Creates something. * -k, --kill |Destroys something. * * // With table formatting. The explanatory texts are aligned. * -c, --create |Creates something. * -k, --kill |Destroys something. * @endcode * * Table formatting removes the need to pad help texts manually with spaces to achieve * alignment. To create a table, simply insert \\t (tab) characters to separate the cells * within a row. * * @code * const option::Descriptor usage[] = { * {..., "-c, --create \tCreates something." }, * {..., "-k, --kill \tDestroys something." }, ... * @endcode * * Note that you must include the minimum amount of space desired between cells yourself. * Table formatting will insert further spaces as needed to achieve alignment. * * You can insert line breaks within cells by using \\v (vertical tab). * * @code * const option::Descriptor usage[] = { * {..., "-c,\v--create \tCreates\vsomething." }, * {..., "-k,\v--kill \tDestroys\vsomething." }, ... * * // results in * * -c, Creates * --create something. * -k, Destroys * --kill something. * @endcode * * You can mix lines that do not use \\t or \\v with those that do. The plain * lines will not mess up the table layout. Alignment of the table columns will * be maintained even across these interjections. * * @code * const option::Descriptor usage[] = { * {..., "-c, --create \tCreates something." }, * {..., "----------------------------------" }, * {..., "-k, --kill \tDestroys something." }, ... * * // results in * * -c, --create Creates something. * ---------------------------------- * -k, --kill Destroys something. * @endcode * * You can have multiple tables within the same usage whose columns are * aligned independently. Simply insert a dummy Descriptor with @c help==0. * * @code * const option::Descriptor usage[] = { * {..., "Long options:" }, * {..., "--very-long-option \tDoes something long." }, * {..., "--ultra-super-mega-long-option \tTakes forever to complete." }, * {..., 0 }, // ---------- table break ----------- * {..., "Short options:" }, * {..., "-s \tShort." }, * {..., "-q \tQuick." }, ... * * // results in * * Long options: * --very-long-option Does something long. * --ultra-super-mega-long-option Takes forever to complete. * Short options: * -s Short. * -q Quick. * * // Without the table break it would be * * Long options: * --very-long-option Does something long. * --ultra-super-mega-long-option Takes forever to complete. * Short options: * -s Short. * -q Quick. * @endcode * * Output methods: * * Because TheLeanMeanC++Option parser is freestanding, you have to provide the means for * output in the first argument(s) to printUsage(). Because printUsage() is implemented as * a set of template functions, you have great flexibility in your choice of output * method. The following example demonstrates typical uses. Anything that's similar enough * will work. * * @code * #include // write() * #include // cout * #include // ostringstream * #include // fwrite() * using namespace std; * * void my_write(const char* str, int size) { * fwrite(str, size, 1, stdout); * } * * struct MyWriter { * void write(const char* buf, size_t size) const { * fwrite(str, size, 1, stdout); * } * }; * * struct MyWriteFunctor { * void operator()(const char* buf, size_t size) { * fwrite(str, size, 1, stdout); * } * }; * ... * printUsage(my_write, usage); // custom write function * printUsage(MyWriter(), usage); // temporary of a custom class * MyWriter writer; * printUsage(writer, usage); // custom class object * MyWriteFunctor wfunctor; * printUsage(&wfunctor, usage); // custom functor * printUsage(write, 1, usage); // write() to file descriptor 1 * printUsage(cout, usage); // an ostream& * printUsage(fwrite, stdout, usage); // fwrite() to stdout * ostringstream sstr; * printUsage(sstr, usage); // an ostringstream& * * @endcode * * @par Notes: * @li the @c write() method of a class that is to be passed as a temporary * as @c MyWriter() is in the example, must be a @c const method, because * temporary objects are passed as const reference. This only applies to * temporary objects that are created and destroyed in the same statement. * If you create an object like @c writer in the example, this restriction * does not apply. * @li a functor like @c MyWriteFunctor in the example must be passed as a pointer. * This differs from the way functors are passed to e.g. the STL algorithms. * @li All printUsage() templates are tiny wrappers around a shared non-template implementation. * So there's no penalty for using different versions in the same program. * @li printUsage() always interprets Descriptor::help as UTF-8 and always produces UTF-8-encoded * output. If your system uses a different charset, you must do your own conversion. You * may also need to change the font of the console to see non-ASCII characters properly. * This is particularly true for Windows. * @li @b Security @b warning: Do not insert untrusted strings (such as user-supplied arguments) * into the usage. printUsage() has no protection against malicious UTF-8 sequences. * * @param prn The output method to use. See the examples above. * @param usage the Descriptor[] array whose @c help texts will be formatted. * @param width the maximum number of characters per output line. Note that this number is * in actual characters, not bytes. printUsage() supports UTF-8 in @c help and will * count multi-byte UTF-8 sequences properly. Asian wide characters are counted * as 2 characters. * @param last_column_min_percent (0-100) The minimum percentage of @c width that should be available * for the last column (which typically contains the textual explanation of an option). * If less space is available, the last column will be printed on its own line, indented * according to @c last_column_own_line_max_percent. * @param last_column_own_line_max_percent (0-100) If the last column is printed on its own line due to * less than @c last_column_min_percent of the width being available, then only * @c last_column_own_line_max_percent of the extra line(s) will be used for the * last column's text. This ensures an indentation. See example below. * * @code * // width=20, last_column_min_percent=50 (i.e. last col. min. width=10) * --3456789 1234567890 * 1234567890 * * // width=20, last_column_min_percent=75 (i.e. last col. min. width=15) * // last_column_own_line_max_percent=75 * --3456789 * 123456789012345 * 67890 * * // width=20, last_column_min_percent=75 (i.e. last col. min. width=15) * // last_column_own_line_max_percent=33 (i.e. max. 5) * --3456789 * 12345 * 67890 * 12345 * 67890 * @endcode */ template void printUsage(OStream& prn, const Descriptor usage[], int width = 80, int last_column_min_percent = 50, int last_column_own_line_max_percent = 75) { PrintUsageImplementation::OStreamWriter write(prn); PrintUsageImplementation::printUsage(write, usage, width, last_column_min_percent, last_column_own_line_max_percent); } template void printUsage(Function* prn, const Descriptor usage[], int width = 80, int last_column_min_percent = 50, int last_column_own_line_max_percent = 75) { PrintUsageImplementation::FunctionWriter write(prn); PrintUsageImplementation::printUsage(write, usage, width, last_column_min_percent, last_column_own_line_max_percent); } template void printUsage(const Temporary& prn, const Descriptor usage[], int width = 80, int last_column_min_percent = 50, int last_column_own_line_max_percent = 75) { PrintUsageImplementation::TemporaryWriter write(prn); PrintUsageImplementation::printUsage(write, usage, width, last_column_min_percent, last_column_own_line_max_percent); } template void printUsage(Syscall* prn, int fd, const Descriptor usage[], int width = 80, int last_column_min_percent = 50, int last_column_own_line_max_percent = 75) { PrintUsageImplementation::SyscallWriter write(prn, fd); PrintUsageImplementation::printUsage(write, usage, width, last_column_min_percent, last_column_own_line_max_percent); } template void printUsage(Function* prn, Stream* stream, const Descriptor usage[], int width = 80, int last_column_min_percent = 50, int last_column_own_line_max_percent = 75) { PrintUsageImplementation::StreamWriter write(prn, stream); PrintUsageImplementation::printUsage(write, usage, width, last_column_min_percent, last_column_own_line_max_percent); } } // namespace option #endif /* OPTIONPARSER_H_ */ Gyoto-1.2.0/compile000077500000000000000000000162451302352257300142030ustar00rootroot00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: Gyoto-1.2.0/config.guess000077500000000000000000001303611302352257300151410ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-06-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 3 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # 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 # # Please send patches with a ChangeLog entry to config-patches@gnu.org. 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 1992-2013 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|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #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 ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_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 ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 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 ;; arc:Linux:*:* | arceb:Linux:*:*) 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; } ;; or1k:Linux:*:*) echo ${UNAME_MACHINE}-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 ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 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 ;; x86_64:Haiku:*:*) echo x86_64-unknown-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 eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi 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 case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi 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 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: Gyoto-1.2.0/config.h.in000066400000000000000000000070541302352257300146460ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Enable debugging information gathering code for putative speed gain */ #undef GYOTO_DEBUG_ENABLED /* Define to 1 if C++11 and Boost.odeint are both available */ #undef GYOTO_HAVE_BOOST_INTEGRATORS /* Suffix for Gyoto plug-ins */ #undef GYOTO_PLUGIN_SFX /* Define to 1 if size_t and unsigned long are the same */ #undef GYOTO_SIZE__T_IS_UNSIGNED_LONG /* Gyoto ABI version */ #undef GYOTO_SOVERS /* Define to 1 if you have cfitsio */ #undef GYOTO_USE_CFITSIO /* Define to 1 if you have Xerces */ #undef GYOTO_USE_XERCES /* Defined if the requested minimum BOOST version is satisfied */ #undef HAVE_BOOST /* Define to 1 if you have */ #undef HAVE_BOOST_ARRAY_HPP /* Define to 1 if you have */ #undef HAVE_BOOST_MPI_ENVIRONMENT_HPP /* Define to 1 if you have */ #undef HAVE_BOOST_MULTIPRECISION_CPP_DEC_FLOAT_HPP /* Define to 1 if you have */ #undef HAVE_BOOST_NUMERIC_ODEINT_STEPPER_CONTROLLED_STEP_RESULT_HPP /* Define to 1 if you have */ #undef HAVE_BOOST_SERIALIZATION_BASE_OBJECT_HPP /* define if the compiler supports basic C++11 syntax */ #undef HAVE_CXX11 /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 to use fenv.h. */ #undef HAVE_FENV_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have MPI */ #undef HAVE_MPI /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD /* Have PTHREAD_PRIO_INHERIT. */ #undef HAVE_PTHREAD_PRIO_INHERIT /* Define to 1 if you have the `sincos' function. */ #undef HAVE_SINCOS /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have libudunits2 */ #undef HAVE_UDUNITS /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* 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 /* Define to necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to `unsigned int' if does not define. */ #undef size_t Gyoto-1.2.0/config.sub000077500000000000000000001053541302352257300146100ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-08-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 3 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # 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 1992-2013 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-musl* | 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*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -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 | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | 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 | microblazeel | 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 \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ | or1k | 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-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | 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-* | microblazeel-* \ | 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-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | 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 ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-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 ;; 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=i686-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 | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) 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* | -plan9* \ | -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* \ | -bitrig* | -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* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -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 ;; -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 ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; 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 ;; or1k-*) 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: Gyoto-1.2.0/configure000077500000000000000000026207771302352257300145510ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for Gyoto 1.2.0. # # 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 -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 test \$(( 1 + 1 )) = 2 || 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: gyoto@sympa.obspm.fr about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: 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='Gyoto' PACKAGE_TARNAME='gyoto' PACKAGE_VERSION='1.2.0' PACKAGE_STRING='Gyoto 1.2.0' PACKAGE_BUGREPORT='gyoto@sympa.obspm.fr' PACKAGE_URL='' ac_unique_file="include/GyotoKerrKS.h" # 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" enable_option_checking=no ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS mySUBDIRS subdirs sovers FEATURES BUILD_GYOTO_FALSE BUILD_GYOTO_TRUE pkg_libs pkg_cflags pkg_requires MKGUIDE_FALSE MKGUIDE_TRUE MKREF_FALSE MKREF_TRUE LORENELDFLAGS LORENECPPFLAGS HAVE_LORENE_FALSE HAVE_LORENE_TRUE HOME_LORENE MAKE_S HAVE_CFITSIO_FALSE HAVE_CFITSIO_TRUE CFITSIO_LIBS CFITSIO_CFLAGS XERCES_LIBS XERCES_CFLAGS HAVE_UDUNITS_FALSE HAVE_UDUNITS_TRUE UDUNITS_LIBS UDUNITS_CFLAGS PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CC ax_pthread_config Y_INST_SITE Y_INST_HOME HAVE_YORICK_FALSE HAVE_YORICK_TRUE YORICK POW_LIB LIBOBJS plugin_sfx SYS DYLIB_VAR GYOTO_PLUGIN_SFX LDFLAGS_EXEC CXXFLAGS_EXEC KPSEWHICH BIBTEX PDFLATEX DOXYGEN PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG HAVE_MPI_FALSE HAVE_MPI_TRUE BOOST_SERIALIZATION_LIBS BOOST_SERIALIZATION_LDPATH BOOST_SERIALIZATION_LDFLAGS BOOST_MPI_LIBS BOOST_LDPATH BOOST_MPI_LDPATH BOOST_MPI_LDFLAGS MPICXX BOOST_CPPFLAGS DISTCHECK_CONFIGURE_FLAGS BOOST_ROOT HAVE_CXX11 SWIG_LIB SWIG VIRTUALENV_FLAGS VIRTUALENV PYTHON_EXTENSION_SUFFIX pyexecdir PYTHON_EXEC_PREFIX pkgpythondir pythondir PYTHON_PREFIX PYTHON_LIBS PYTHON_LDFLAGS PYTHON_CFLAGS PYTHON_INCLUDES PYTHON_CONFIG PYTHON localpkglibdir HAVE_LOCALPKGLIBDIR_FALSE HAVE_LOCALPKGLIBDIR_TRUE VERSINFO VERBATIM CXXCPP CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC LIBTOOL AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V 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_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build 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_silent_rules enable_static enable_shared with_pic enable_fast_install enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock enable_release enable_localpkglibdir with_fenv with_size_t with_python with_virtualenv enable_c__11 with_mpi with_boost enable_static_boost enable_native enable_hardening enable_deprecated with_yorick with_yorick_home with_yorick_site enable_debugging enable_pthreads with_udunits with_udunits_inc with_udunits_lib with_xerces with_xerces_headers with_xerces_libs with_cfitsio with_cfitsio_headers with_cfitsio_libs with_lorene enable_doc ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP CXXCPP PYTHON PYTHON_CONFIG VIRTUALENV_FLAGS BOOST_ROOT PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR UDUNITS_CFLAGS UDUNITS_LIBS XERCES_CFLAGS XERCES_LIBS CFITSIO_CFLAGS CFITSIO_LIBS MAKE_S HOME_LORENE' ac_subdirs_all='plugins/python' # 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 Gyoto 1.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] 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/gyoto] --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] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of Gyoto 1.2.0:";; 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-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) --enable-release enable a release build (remove -unreleased from SONAME) --enable-localpkglibdir[=PKGLIBDIR] additional directory to look for plug-ins [/usr/local/lib/gyoto, only if PREFIX is not /usr/local]. If specified, Gyoto will look for additional plug-ins in LOCALPKGLIBDIR/GYOTO_SOVERS and LOCALPKGLIBDIR before looking in PKGLIBDIR/GYOTO_SOVERS and PKGLIBDIR --disable-c++11 disable C++11 features (including advanced integrators) --enable-static-boost Prefer the static boost libraries over the shared ones [no] --enable-native append "-march=native" to CXXFLAGS if supported --enable-hardening add warnings and hardening flags if supported --enable-deprecated enable deprecated method names (needing this is a bug) --disable-debugging remove debugging code for hypothetical speed gain --disable-pthreads disable POSIX threads parallelization --disable-doc disable building documentation (automatically) 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). --without-fenv do not use fenv.h (see BUGS.md) --with-size_t=same|distinct|auto consider size_t as the same as or distinct from unsigned long (auto). Should normally be specified only if cross-compiling. --with-python force (or disable) python support --with-virtualenv install to a Python virtualenv --with-mpi compile with MPI (parallelization) support. If none is found, MPI is not used. Default: auto --with-boost=DIR prefix of Boost 1.53.1 [guess] --with-yorick[=yorick-executable] force using yorick and optionnally specify which one [default=yorick, only if found] --with-yorick-home=DIR architecture-dependent Yorick files [default: the yorick directory if it is under ${exec_prefix}, else ${exec_prefix}/lib/yorick] --with-yorick-site=DIR architecture-independent Yorick files [default: the yorick directory if it is under ${prefix}, else ${prefix}/lib/yorick] --with-udunits[=DIR] Force using udunits2 installed in a given prefix or force disable it. --with-udunits-inc=DIR path to base directory with UDUNITS headers --with-udunits-lib=LDFLAGS linker flags for udunits --with-xerces[=xerces-prefix] Force using xerces installed in a given prefix or force disable it. --with-xerces-headers=path location of xercesc include files (without trailing "/xercesc") --with-xerces-libs=path location of xercesc library files --with-cfitsio[=cfitsio-prefix] Force using cfitsio installed in a given prefix or force disable it. --with-cfitsio-headers=path location of cfitsio include files --with-cfitsio-libs=path location of cfitsio library files --with-lorene[=${HOME_LORENE}] force using the optional LORENE library, possibly specifying HOME_LORENE [default=${HOME_LORENE}] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory 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 CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor CXXCPP C++ preprocessor PYTHON the Python interpreter PYTHON_CONFIG the Python-config program VIRTUALENV_FLAGS flags to pass to the virtualenv command BOOST_ROOT Location of Boost installation PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path UDUNITS_CFLAGS C compiler flags for UDUNITS, overriding pkg-config UDUNITS_LIBS linker flags for UDUNITS, overriding pkg-config XERCES_CFLAGS C compiler flags for XERCES, overriding pkg-config XERCES_LIBS linker flags for XERCES, overriding pkg-config CFITSIO_CFLAGS C compiler flags for CFITSIO, overriding pkg-config CFITSIO_LIBS linker flags for CFITSIO, overriding pkg-config MAKE_S make command which does not print directories [[make -w]] HOME_LORENE path to Lorene build directory (see also --with-lorene) Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF 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 Gyoto configure 1.2.0 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_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_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_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_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_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_c_preproc_warn_flag$ac_c_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_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_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_c_try_run # 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_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_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_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_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $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 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 gyoto@sympa.obspm.fr ## ## ----------------------------------- ##" ) | 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 # ac_fn_py_try_link LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_py_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_py_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_py_try_link # ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES # --------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_cxx_check_type () { 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 eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else eval "$3=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 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_cxx_check_type # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_cxx_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_cxx_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_cxx_check_func 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 Gyoto $as_me 1.2.0, 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 gyoto_test_CXXFLAGS=${CXXFLAGS+set} gyoto_test_CPPFLAGS=${CPPFLAGS+set} ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$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. # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version='1.14' # 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; } # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file 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 --is-lightweight"; then am_missing_run="$MISSING " 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; } 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 # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' 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='gyoto' VERSION='1.2.0' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # 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}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 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 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" # 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # 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_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 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_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 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" 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 depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". 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_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false 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 10 /bin/sh. echo '/* dummy */' > 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_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $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 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 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" && \ test undefined != "$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 ;; 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 | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=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 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 { $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 depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". 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_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false 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 10 /bin/sh. echo '/* dummy */' > 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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$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*|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*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*) 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" ;; powerpcle-*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*) 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 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 { $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; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_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_c_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_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_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_c_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 \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $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_c_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_c_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 # 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=yes # 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=no fi 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 --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 | 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 ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=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* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $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 link_all_deplibs=no 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* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *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 version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; 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 | 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' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; 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 ;; 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 | 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 | 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* | netbsdelf*-gnu) ;; *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 ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) 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 version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; 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 | 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' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; 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: ac_config_headers="$ac_config_headers config.h include/GyotoConfig.h" # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html # C: current; R: revision; A: age # Linux library name is: libgyoto.so.(C-A).A.R VERSINFO_C=6 VERSINFO_R=0 VERSINFO_A=0 VERSINFO=${VERSINFO_C}:${VERSINFO_R}:${VERSINFO_A} ## Needed for gcc-5, should be harmless for other compilers: # for flag in -P; do as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags__$flag" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 $as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } if eval \${$as_CACHEVAR+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CXXFLAGS CXXFLAGS="$CXXFLAGS $flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_CACHEVAR=yes" else eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : if ${CPPFLAGS+:} false; then : case " $CPPFLAGS " in #( *" $flag "*) : { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains \$flag"; } >&5 (: CPPFLAGS already contains $flag) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; #( *) : as_fn_append CPPFLAGS " $flag" { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5 (: CPPFLAGS="$CPPFLAGS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; esac else CPPFLAGS=$flag { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5 (: CPPFLAGS="$CPPFLAGS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } fi else : fi done ## Ensure local build does not have a release soname by default # FEATURES="" # Check whether --enable-release was given. if test "${enable_release+set}" = set; then : enableval=$enable_release; fi if test "x$enable_release" != "xyes"; then : FEATURES+="-unreleased" fi ## An additional directory to look for plug-ins # Default /usr/local/lib/gyoto, only if ${prefix} is not /usr/local # Check whether --enable-localpkglibdir was given. if test "${enable_localpkglibdir+set}" = set; then : enableval=$enable_localpkglibdir; else if test x${prefix} == xNONE || test "x${prefix}" == x/usr/local; then : enable_localpkglibdir=no else enable_localpkglibdir=yes fi fi if test x$enable_localpkglibdir != "xno"; then : if test x$enable_localpkglibdir == "xyes"; then : localpkglibdir="/usr/local/lib/"${PACKAGE} else localpkglibdir=$enable_localpkglibdir fi else localpkglibdir="" fi if test "x$localpkglibdir" != "x"; then HAVE_LOCALPKGLIBDIR_TRUE= HAVE_LOCALPKGLIBDIR_FALSE='#' else HAVE_LOCALPKGLIBDIR_TRUE='#' HAVE_LOCALPKGLIBDIR_FALSE= fi ## SIGFPE delivery # # Check whether --with-fenv was given. if test "${with_fenv+set}" = set; then : withval=$with_fenv; else with_fenv=auto fi if test "x$with_fenv" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fenv.h" >&5 $as_echo_n "checking for fenv.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { feenableexcept(FE_DIVBYZERO); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : $as_echo "#define HAVE_FENV_H 1" >>confdefs.h HAVE_FENV_H=1 { $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 rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test "x$with_fenv" = xyes && test "x$HAVE_FENV_H" != x1; then : as_fn_error $? "fenv.h required but not usable\"" "$LINENO" 5 fi ## IS SIZE_T EQUIVALENT TO UNSIGNED LONG? # { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether size_t is the same as unsigned long" >&5 $as_echo_n "checking whether size_t is the same as unsigned long... " >&6; } # Check whether --with-size_t was given. if test "${with_size_t+set}" = set; then : withval=$with_size_t; if test "x$with_size__t" != xsame && test "x$with_size__t" != xdistinct && test "x$with_size__t" != xauto; then : as_fn_error $? "with-size_t should be one of same, distinct or auto" "$LINENO" 5 fi else with_size__t=auto fi if test "x$with_size__t" = xauto; 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. */ #include typedef void (* set_size_t_t) (size_t val); typedef void (* set_unsigned_long_t) (unsigned long); size_t size_t_value; void set_size_t (size_t v) {size_t_value = v;} int main(int, char**) { set_unsigned_long_t ulsetter = &set_size_t; (*ulsetter)(25); if (size_t_value != 25) return 1; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : with_size__t="same" else with_size__t="distinct" 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 "x$with_size__t" = xsame; then : $as_echo "#define GYOTO_SIZE__T_IS_UNSIGNED_LONG 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_size__t" >&5 $as_echo "$with_size__t" >&6; } # PYTHON STUFF # Check whether --with-python was given. if test "${with_python+set}" = set; then : withval=$with_python; else with_python=optional fi for ac_prog in python \ python3 \ python2 \ python4.0 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 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_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # 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_PYTHON="$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 ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYTHON" && break done # Extract the first word of "`basename $PYTHON`-config", so it can be a program name with args. set dummy `basename $PYTHON`-config; 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_PYTHON_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON_CONFIG="$PYTHON_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON_CONFIG="$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 ;; esac fi PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG if test -n "$PYTHON_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CONFIG" >&5 $as_echo "$PYTHON_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 $as_echo_n "checking for Python includes... " >&6; } if ${pc_cv_python_includes+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then pc_cv_python_includes=`$PYTHON_CONFIG --includes 2>&5` else pc_cv_python_includes="-I$includedir/$_PYTHON_BASENAME" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_includes" >&5 $as_echo "$pc_cv_python_includes" >&6; } PYTHON_INCLUDES=$pc_cv_python_includes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python prefix" >&5 $as_echo_n "checking for Python prefix... " >&6; } if ${pc_cv_python_prefix+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then pc_cv_python_prefix=`$PYTHON_CONFIG --prefix 2>&5` else ac_ext=py ac_compile='chmod +x conftest.$ac_ext >&5' ac_link='chmod +x conftest.$ac_ext && cp conftest.$ac_ext conftest >&5' cat > conftest.$ac_ext <<_ACEOF #!$PYTHON import sys if __name__ == '__main__': sys.stdout.write(sys.prefix) _ACEOF if ac_fn_py_try_link "$LINENO"; then : pc_cv_python_prefix=`./conftest`; if test $? != 0; 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 $? "could not determine Python prefix See \`config.log' for more details" "$LINENO" 5; } fi 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 $? "failed to run Python program See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext 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 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_prefix" >&5 $as_echo "$pc_cv_python_prefix" >&6; } PYTHON_PREFIX=$pc_cv_python_prefix { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python exec-prefix" >&5 $as_echo_n "checking for Python exec-prefix... " >&6; } if ${pc_cv_python_exec_prefix+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then pc_cv_python_exec_prefix=`$PYTHON_CONFIG --exec-prefix 2>&5` else ac_ext=py ac_compile='chmod +x conftest.$ac_ext >&5' ac_link='chmod +x conftest.$ac_ext && cp conftest.$ac_ext conftest >&5' cat > conftest.$ac_ext <<_ACEOF #!$PYTHON import sys if __name__ == '__main__': sys.stdout.write(sys.exec_prefix) _ACEOF if ac_fn_py_try_link "$LINENO"; then : pc_cv_python_exec_prefix=`./conftest`; if test $? != 0; 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 $? "could not determine Python exec_prefix See \`config.log' for more details" "$LINENO" 5; } fi 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 $? "failed to run Python program See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext 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 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_exec_prefix" >&5 $as_echo "$pc_cv_python_exec_prefix" >&6; } PYTHON_EXEC_PREFIX=$pc_cv_python_exec_prefix pc_cflags_store=$CPPFLAGS CPPFLAGS="$CFLAGS $PYTHON_INCLUDES" ac_fn_cxx_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" if test "x$ac_cv_header_Python_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 $as_echo_n "checking for Python includes... " >&6; } if ${pc_cv_python_includes+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then pc_cv_python_includes=`$PYTHON_CONFIG --includes 2>&5` else pc_cv_python_includes="-I$includedir/$_PYTHON_BASENAME" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_includes" >&5 $as_echo "$pc_cv_python_includes" >&6; } PYTHON_INCLUDES=$pc_cv_python_includes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python CFLAGS" >&5 $as_echo_n "checking for Python CFLAGS... " >&6; } if ${pc_cv_python_cflags+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then pc_cv_python_cflags=`$PYTHON_CONFIG --cflags 2>&5` else pc_cv_python_cflags= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_cflags" >&5 $as_echo "$pc_cv_python_cflags" >&6; } PYTHON_CFLAGS=$pc_cv_python_cflags { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python LDFLAGS" >&5 $as_echo_n "checking for Python LDFLAGS... " >&6; } if ${pc_cv_python_ldflags+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then pc_cv_python_ldflags=`$PYTHON_CONFIG --ldflags 2>&5` else pc_cv_python_ldflags= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_ldflags" >&5 $as_echo "$pc_cv_python_ldflags" >&6; } PYTHON_LDFLAGS=$pc_cv_python_ldflags { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python libs" >&5 $as_echo_n "checking for Python libs... " >&6; } if ${pc_cv_python_libs+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then pc_cv_python_libs=`$PYTHON_CONFIG --libs 2>&5` else pc_cv_python_libs="-l$_PYTHON_BASENAME" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_libs" >&5 $as_echo "$pc_cv_python_libs" >&6; } PYTHON_LIBS=$pc_cv_python_libs { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages directory" >&5 $as_echo_n "checking for Python site-packages directory... " >&6; } if ${pc_cv_python_site_dir+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=py ac_compile='chmod +x conftest.$ac_ext >&5' ac_link='chmod +x conftest.$ac_ext && cp conftest.$ac_ext conftest >&5' if test "x$prefix" = xNONE then pc_py_prefix=$ac_default_prefix else pc_py_prefix=$prefix fi cat > conftest.$ac_ext <<_ACEOF #!$PYTHON import sys from platform import python_implementation # sysconfig in CPython 2.7 doesn't work in virtualenv # try: import sysconfig except: can_use_sysconfig = False else: can_use_sysconfig = True if can_use_sysconfig: if python_implementation() == "CPython" and sys.version[:3] == '2.7': can_use_sysconfig = False if not can_use_sysconfig: from distutils import sysconfig sitedir = sysconfig.get_python_lib(False, False, prefix='$pc_py_prefix') else: sitedir = sysconfig.get_path('purelib', vars={'base':'$pc_py_prefix'}) if __name__ == '__main__': sys.stdout.write(sitedir) _ACEOF if ac_fn_py_try_link "$LINENO"; then : pc_cv_python_site_dir=`./conftest` 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 $? "failed to run Python program See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext 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 case $pc_cv_python_site_dir in $pc_py_prefix*) pc__strip_prefix=`echo "$pc_py_prefix" | sed 's|.|.|g'` pc_cv_python_site_dir=`echo "$pc_cv_python_site_dir" | sed "s,^$pc__strip_prefix/,,"` ;; *) case $pc_py_prefix in /usr|/System*) ;; *) pc_cv_python_site_dir=lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_site_dir" >&5 $as_echo "$pc_cv_python_site_dir" >&6; } pythondir=\${prefix}/$pc_cv_python_site_dir pkgpythondir=\${pythondir}/$PACKAGE_NAME { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python extension module directory" >&5 $as_echo_n "checking for Python extension module directory... " >&6; } if ${pc_cv_python_exec_dir+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=py ac_compile='chmod +x conftest.$ac_ext >&5' ac_link='chmod +x conftest.$ac_ext && cp conftest.$ac_ext conftest >&5' if test "x$pc_cv_python_exec_prefix" = xNONE then pc_py_exec_prefix=$pc_cv_python_prefix else pc_py_exec_prefix=$pc_cv_python_exec_prefix fi cat > conftest.$ac_ext <<_ACEOF #!$PYTHON import sys from platform import python_implementation # sysconfig in CPython 2.7 doesn't work in virtualenv # try: import sysconfig except: can_use_sysconfig = False else: can_use_sysconfig = True if can_use_sysconfig: if python_implementation() == "CPython" and sys.version[:3] == '2.7': can_use_sysconfig = False if not can_use_sysconfig: from distutils import sysconfig sitedir = sysconfig.get_python_lib(False, False, prefix='$pc_py__exec_prefix') else: sitedir = sysconfig.get_path('purelib', vars={'platbase':'$pc_py_exec_prefix'}) if __name__ == '__main__': sys.stdout.write(sitedir) _ACEOF if ac_fn_py_try_link "$LINENO"; then : pc_cv_python_exec_dir=`./conftest` 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 $? "failed to run Python program See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext 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 case $pc_cv_python_exec_dir in $pc_py_exec_prefix*) pc__strip_prefix=`echo "$pc_py_exec_prefix" | sed 's|.|.|g'` pc_cv_python_exec_dir=`echo "$pc_cv_python_exec_dir" | sed "s,^$pc__strip_prefix/,,"` ;; *) case $pc_py_exec_prefix in /usr|/System*) ;; *) pc_cv_python_exec_dir=lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_exec_dir" >&5 $as_echo "$pc_cv_python_exec_dir" >&6; } pyexecdir=\${exec_prefix}/$pc_cv_python_pyexecdir { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python extension suffix" >&5 $as_echo_n "checking for Python extension suffix... " >&6; } if ${pc_cv_python_extension_suffix+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then pc_cv_python_extension_suffix=`$PYTHON_CONFIG --extension-suffix 2>&5` else pc_cv_python_extension_suffix= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_extension_suffix" >&5 $as_echo "$pc_cv_python_extension_suffix" >&6; } PYTHON_EXTENSION_SUFFIX=$pc_cv_python_extension_suffix { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python extension module directory" >&5 $as_echo_n "checking for Python extension module directory... " >&6; } if ${pc_cv_python_exec_dir+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=py ac_compile='chmod +x conftest.$ac_ext >&5' ac_link='chmod +x conftest.$ac_ext && cp conftest.$ac_ext conftest >&5' if test "x$pc_cv_python_exec_prefix" = xNONE then pc_py_exec_prefix=$pc_cv_python_prefix else pc_py_exec_prefix=$pc_cv_python_exec_prefix fi cat > conftest.$ac_ext <<_ACEOF #!$PYTHON import sys from platform import python_implementation # sysconfig in CPython 2.7 doesn't work in virtualenv # try: import sysconfig except: can_use_sysconfig = False else: can_use_sysconfig = True if can_use_sysconfig: if python_implementation() == "CPython" and sys.version[:3] == '2.7': can_use_sysconfig = False if not can_use_sysconfig: from distutils import sysconfig sitedir = sysconfig.get_python_lib(False, False, prefix='$pc_py__exec_prefix') else: sitedir = sysconfig.get_path('purelib', vars={'platbase':'$pc_py_exec_prefix'}) if __name__ == '__main__': sys.stdout.write(sitedir) _ACEOF if ac_fn_py_try_link "$LINENO"; then : pc_cv_python_exec_dir=`./conftest` 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 $? "failed to run Python program See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext 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 case $pc_cv_python_exec_dir in $pc_py_exec_prefix*) pc__strip_prefix=`echo "$pc_py_exec_prefix" | sed 's|.|.|g'` pc_cv_python_exec_dir=`echo "$pc_cv_python_exec_dir" | sed "s,^$pc__strip_prefix/,,"` ;; *) case $pc_py_exec_prefix in /usr|/System*) ;; *) pc_cv_python_exec_dir=lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_exec_dir" >&5 $as_echo "$pc_cv_python_exec_dir" >&6; } pyexecdir=\${exec_prefix}/$pc_cv_python_pyexecdir else PYTHON="" fi CPPFLAGS=$pc_cflags_store if test "x$with_python" = xno; then : PYTHON="" fi if test "x$with_python" = xyes && test "x$PYTHON" = x; then : as_fn_error $? "Python requested but no supported version found (>=2.7, <4.0)" "$LINENO" 5 fi # Check whether --with-virtualenv was given. if test "${with_virtualenv+set}" = set; then : withval=$with_virtualenv; else with_virtualenv=no fi if test "x$with_virtualenv" != xno; then : for ac_prog in virtualenv virtualenv3 virtualenv2 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_VIRTUALENV+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$VIRTUALENV"; then ac_cv_prog_VIRTUALENV="$VIRTUALENV" # 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_VIRTUALENV="$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 VIRTUALENV=$ac_cv_prog_VIRTUALENV if test -n "$VIRTUALENV"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VIRTUALENV" >&5 $as_echo "$VIRTUALENV" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$VIRTUALENV" && break done test -n "$VIRTUALENV" || VIRTUALENV="no" if test "x$VIRTUALENV" = xno; 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 $? "--with-virtualenv given but virtualenv could not be found See \`config.log' for more details" "$LINENO" 5; } fi else VIRTUALENV=no fi # Ubuntu has swig 2.0 as /usr/bin/swig2.0 # Debian has swig 3.0 as /usr/bin/swig3.0 for ac_prog in swig swig2.0 swig3.0 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_path_SWIG+:} false; then : $as_echo_n "(cached) " >&6 else case $SWIG in [\\/]* | ?:[\\/]*) ac_cv_path_SWIG="$SWIG" # 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_SWIG="$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 ;; esac fi SWIG=$ac_cv_path_SWIG if test -n "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5 $as_echo "$SWIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$SWIG" && break done if test -z "$SWIG" ; then : elif test -n "2.0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5 $as_echo_n "checking SWIG version... " >&6; } swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5 $as_echo "$swig_version" >&6; } if test -n "$swig_version" ; then # Calculate the required version number components required=2.0 required_major=`echo $required | sed 's/[^0-9].*//'` if test -z "$required_major" ; then required_major=0 fi required=`echo $required | sed 's/[0-9]*[^0-9]//'` required_minor=`echo $required | sed 's/[^0-9].*//'` if test -z "$required_minor" ; then required_minor=0 fi required=`echo $required | sed 's/[0-9]*[^0-9]//'` required_patch=`echo $required | sed 's/[^0-9].*//'` if test -z "$required_patch" ; then required_patch=0 fi # Calculate the available version number components available=$swig_version available_major=`echo $available | sed 's/[^0-9].*//'` if test -z "$available_major" ; then available_major=0 fi available=`echo $available | sed 's/[0-9]*[^0-9]//'` available_minor=`echo $available | sed 's/[^0-9].*//'` if test -z "$available_minor" ; then available_minor=0 fi available=`echo $available | sed 's/[0-9]*[^0-9]//'` available_patch=`echo $available | sed 's/[^0-9].*//'` if test -z "$available_patch" ; then available_patch=0 fi # Convert the version tuple into a single number for easier comparison. # Using base 100 should be safe since SWIG internally uses BCD values # to encode its version number. required_swig_vernum=`expr $required_major \* 10000 \ \+ $required_minor \* 100 \+ $required_patch` available_swig_vernum=`expr $available_major \* 10000 \ \+ $available_minor \* 100 \+ $available_patch` if test $available_swig_vernum -lt $required_swig_vernum; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0 is required. You have $swig_version." >&5 $as_echo "$as_me: WARNING: SWIG version >= 2.0 is required. You have $swig_version." >&2;} SWIG='' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5 $as_echo_n "checking for SWIG library... " >&6; } SWIG_LIB=`$SWIG -swiglib` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5 $as_echo "$SWIG_LIB" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;} SWIG='' fi fi # DONE WITH PYTHON STUFF # Checks for programs. ############### CHECK FOR OPTIONAL FEATURES ######################### ## ADVANCED INTEGRATORS # Check for C++11 # Check whether --enable-c++11 was given. if test "${enable_c__11+set}" = set; then : enableval=$enable_c__11; fi if test "x$enable_c__11" != "xno"; then : ax_cxx_compile_cxx11_required=false 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_success=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } if ${ax_cv_cxx_compile_cxx11+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; struct Base { virtual void f() {} }; struct Child : public Base { virtual void f() override {} }; typedef check> right_angle_brackets; int a; decltype(a) b; typedef check check_type; check_type c; check_type&& cr = static_cast(c); auto d = a; auto l = [](){}; _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ax_cv_cxx_compile_cxx11=yes else ax_cv_cxx_compile_cxx11=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } if test x$ax_cv_cxx_compile_cxx11 = xyes; then ac_success=yes fi if test x$ac_success = xno; then for switch in -std=gnu++11 -std=gnu++0x; do cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } if eval \${$cachevar+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $switch" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; struct Base { virtual void f() {} }; struct Child : public Base { virtual void f() override {} }; typedef check> right_angle_brackets; int a; decltype(a) b; typedef check check_type; check_type c; check_type&& cr = static_cast(c); auto d = a; auto l = [](){}; _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval $cachevar=yes else eval $cachevar=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS="$ac_save_CXXFLAGS" fi eval ac_res=\$$cachevar { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test x\$$cachevar = xyes; then CXXFLAGS="$CXXFLAGS $switch" ac_success=yes break fi done fi if test x$ac_success = xno; then for switch in -std=c++11 -std=c++0x; do cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } if eval \${$cachevar+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $switch" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; struct Base { virtual void f() {} }; struct Child : public Base { virtual void f() override {} }; typedef check> right_angle_brackets; int a; decltype(a) b; typedef check check_type; check_type c; check_type&& cr = static_cast(c); auto d = a; auto l = [](){}; _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval $cachevar=yes else eval $cachevar=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS="$ac_save_CXXFLAGS" fi eval ac_res=\$$cachevar { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test x\$$cachevar = xyes; then CXXFLAGS="$CXXFLAGS $switch" ac_success=yes break fi done 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 if test x$ax_cxx_compile_cxx11_required = xtrue; then if test x$ac_success = xno; then as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 fi else if test x$ac_success = xno; then HAVE_CXX11=0 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 $as_echo "$as_me: No compiler with C++11 support was found" >&6;} else HAVE_CXX11=1 $as_echo "#define HAVE_CXX11 1" >>confdefs.h fi fi fi if test "x$HAVE_CXX11" != "x1" && test "x$enable_c__11" = "xyes"; then : as_fn_error $? "C++11 requested but not found" "$LINENO" 5 fi # Check whether --with-mpi was given. if test "${with_mpi+set}" = set; then : withval=$with_mpi; else with_mpi=auto fi # Check for boost have_boost=no if test "x$with_boost" != "xno"; then : have_boost=yes echo "$as_me: this is boost.m4 serial 22" >&5 boost_save_IFS=$IFS boost_version_req=1.53.1 IFS=. set x $boost_version_req 0 0 0 IFS=$boost_save_IFS shift boost_version_req=`expr "$1" '*' 100000 + "$2" '*' 100 + "$3"` boost_version_req_string=$1.$2.$3 # Check whether --with-boost was given. if test "${with_boost+set}" = set; then : withval=$with_boost; fi # If BOOST_ROOT is set and the user has not provided a value to # --with-boost, then treat BOOST_ROOT as if it the user supplied it. if test x"$BOOST_ROOT" != x; then if test x"$with_boost" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: Detected BOOST_ROOT; continuing with --with-boost=$BOOST_ROOT" >&5 $as_echo "$as_me: Detected BOOST_ROOT; continuing with --with-boost=$BOOST_ROOT" >&6;} with_boost=$BOOST_ROOT else { $as_echo "$as_me:${as_lineno-$LINENO}: Detected BOOST_ROOT=$BOOST_ROOT, but overridden by --with-boost=$with_boost" >&5 $as_echo "$as_me: Detected BOOST_ROOT=$BOOST_ROOT, but overridden by --with-boost=$with_boost" >&6;} fi fi DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS '--with-boost=$with_boost'" boost_save_CPPFLAGS=$CPPFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost headers version >= $boost_version_req_string" >&5 $as_echo_n "checking for Boost headers version >= $boost_version_req_string... " >&6; } if ${boost_cv_inc_path+:} false; then : $as_echo_n "(cached) " >&6 else boost_cv_inc_path=no 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !defined BOOST_VERSION # error BOOST_VERSION is not defined #elif BOOST_VERSION < $boost_version_req # error Boost headers version < $boost_version_req #endif int main () { ; return 0; } _ACEOF # If the user provided a value to --with-boost, use it and only it. case $with_boost in #( ''|yes) set x '' /opt/local/include /usr/local/include /opt/include \ /usr/include C:/Boost/include;; #( *) set x "$with_boost/include" "$with_boost";; esac shift for boost_dir do # Without --layout=system, Boost (or at least some versions) installs # itself in /include/boost-. This inner loop helps to # find headers in such directories. # # Any ${boost_dir}/boost-x_xx directories are searched in reverse version # order followed by ${boost_dir}. The final '.' is a sentinel for # searching $boost_dir" itself. Entries are whitespace separated. # # I didn't indent this loop on purpose (to avoid over-indented code) boost_layout_system_search_list=`cd "$boost_dir" 2>/dev/null \ && ls -1 | "${GREP}" '^boost-' | sort -rn -t- -k2 \ && echo .` for boost_inc in $boost_layout_system_search_list do if test x"$boost_inc" != x.; then boost_inc="$boost_dir/$boost_inc" else boost_inc="$boost_dir" # Uses sentinel in boost_layout_system_search_list fi if test x"$boost_inc" != x; then # We are going to check whether the version of Boost installed # in $boost_inc is usable by running a compilation that # #includes it. But if we pass a -I/some/path in which Boost # is not installed, the compiler will just skip this -I and # use other locations (either from CPPFLAGS, or from its list # of system include directories). As a result we would use # header installed on the machine instead of the /some/path # specified by the user. So in that precise case (trying # $boost_inc), make sure the version.hpp exists. # # Use test -e as there can be symlinks. test -e "$boost_inc/boost/version.hpp" || continue CPPFLAGS="$CPPFLAGS -I$boost_inc" fi if ac_fn_cxx_try_compile "$LINENO"; then : boost_cv_inc_path=yes else boost_cv_version=no fi rm -f core conftest.err conftest.$ac_objext if test x"$boost_cv_inc_path" = xyes; then if test x"$boost_inc" != x; then boost_cv_inc_path=$boost_inc fi break 2 fi done done 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_inc_path" >&5 $as_echo "$boost_cv_inc_path" >&6; } case $boost_cv_inc_path in #( no) boost_errmsg="cannot find Boost headers version >= $boost_version_req_string" { $as_echo "$as_me:${as_lineno-$LINENO}: $boost_errmsg" >&5 $as_echo "$as_me: $boost_errmsg" >&6;} have_boost=no ;;#( yes) BOOST_CPPFLAGS= ;;#( *) BOOST_CPPFLAGS="-I$boost_cv_inc_path" ;; esac if test x"$boost_cv_inc_path" != xno; then $as_echo "#define HAVE_BOOST 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost's header version" >&5 $as_echo_n "checking for Boost's header version... " >&6; } if ${boost_cv_lib_version+:} false; then : $as_echo_n "(cached) " >&6 else 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include boost-lib-version = BOOST_LIB_VERSION _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | tr -d '\r' | $SED -n -e "/^boost-lib-version = /{s///;s/\"//g;p;q;}" >conftest.i 2>&1; then : boost_cv_lib_version=`cat conftest.i` fi rm -rf conftest* 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_version" >&5 $as_echo "$boost_cv_lib_version" >&6; } # e.g. "134" for 1_34_1 or "135" for 1_35 boost_major_version=`echo "$boost_cv_lib_version" | sed 's/_//;s/_.*//'` case $boost_major_version in #( '' | *[!0-9]*) as_fn_error $? "invalid value: boost_major_version=$boost_major_version" "$LINENO" 5 ;; esac fi CPPFLAGS=$boost_save_CPPFLAGS if test "x$have_boost" == "xyes"; then : if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Boost.multiprecision not found" >&5 $as_echo "$as_me: WARNING: Boost.multiprecision not found" >&2;} have_boost=partial else 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 boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/multiprecision/cpp_dec_float.hpp" "ac_cv_header_boost_multiprecision_cpp_dec_float_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_multiprecision_cpp_dec_float_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_MULTIPRECISION_CPP_DEC_FLOAT_HPP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Boost.multiprecision not found" >&5 $as_echo "$as_me: WARNING: Boost.multiprecision not found" >&2;} have_boost=partial fi CPPFLAGS=$boost_save_CPPFLAGS 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 fi if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: boost/array.hpp not found" >&5 $as_echo "$as_me: WARNING: boost/array.hpp not found" >&2;} have_boost=partial else 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 boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/array.hpp" "ac_cv_header_boost_array_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_array_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_ARRAY_HPP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: boost/array.hpp not found" >&5 $as_echo "$as_me: WARNING: boost/array.hpp not found" >&2;} have_boost=partial fi CPPFLAGS=$boost_save_CPPFLAGS 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 fi if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Boost.odeint not found" >&5 $as_echo "$as_me: WARNING: Boost.odeint not found" >&2;} have_boost=partial else 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 boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/numeric/odeint/stepper/controlled_step_result.hpp" "ac_cv_header_boost_numeric_odeint_stepper_controlled_step_result_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_numeric_odeint_stepper_controlled_step_result_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_NUMERIC_ODEINT_STEPPER_CONTROLLED_STEP_RESULT_HPP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Boost.odeint not found" >&5 $as_echo "$as_me: WARNING: Boost.odeint not found" >&2;} have_boost=partial fi CPPFLAGS=$boost_save_CPPFLAGS 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 fi fi else have_boost=no fi if test "x$HAVE_CXX11" == "x1" && test "x$ac_cv_header_boost_numeric_odeint_stepper_controlled_step_result_hpp" == xyes; then : $as_echo "#define GYOTO_HAVE_BOOST_INTEGRATORS 1" >>confdefs.h fi if test "x$have_boost" != "xyes"; then : FEATURES+="-noboost" fi # If --with-mpi=auto is used, try to find MPI, but use standard C compiler if it is not found. # If --with-mpi=yes is used, try to find MPI and fail if it isn't found. # If --with-mpi=no is used, use a standard C compiler instead. have_mpi=no for ac_prog in mpic++ mpicxx 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_MPICXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MPICXX"; then ac_cv_prog_MPICXX="$MPICXX" # 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_MPICXX="$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 MPICXX=$ac_cv_prog_MPICXX if test -n "$MPICXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICXX" >&5 $as_echo "$MPICXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$MPICXX" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the toolset name used by Boost for $CXX" >&5 $as_echo_n "checking for the toolset name used by Boost for $CXX... " >&6; } if ${boost_cv_lib_tag+:} false; then : $as_echo_n "(cached) " >&6 else boost_cv_lib_tag=unknown if test x$boost_cv_inc_path != xno; 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 # The following tests are mostly inspired by boost/config/auto_link.hpp # The list is sorted to most recent/common to oldest compiler (in order # to increase the likelihood of finding the right compiler with the # least number of compilation attempt). # Beware that some tests are sensible to the order (for instance, we must # look for MinGW before looking for GCC3). # I used one compilation test per compiler with a #error to recognize # each compiler so that it works even when cross-compiling (let me know # if you know a better approach). # Known missing tags (known from Boost's tools/build/v2/tools/common.jam): # como, edg, kcc, bck, mp, sw, tru, xlc # I'm not sure about my test for `il' (be careful: Intel's ICC pre-defines # the same defines as GCC's). for i in \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 8 && !defined __ICC && \ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw48" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 8 && !defined __ICC @ gcc48" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 7 && !defined __ICC && \ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw47" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 7 && !defined __ICC @ gcc47" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 6 && !defined __ICC && \ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw46" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 6 && !defined __ICC @ gcc46" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 5 && !defined __ICC && \ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw45" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 5 && !defined __ICC @ gcc45" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 4 && !defined __ICC && \ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw44" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 4 && !defined __ICC @ gcc44" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 3 && !defined __ICC && \ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw43" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 3 && !defined __ICC @ gcc43" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && !defined __ICC && \ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw42" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && !defined __ICC @ gcc42" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 1 && !defined __ICC && \ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw41" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 1 && !defined __ICC @ gcc41" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 0 && !defined __ICC && \ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw40" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 0 && !defined __ICC @ gcc40" \ "defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \ && (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw" \ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 4 && !defined __ICC @ gcc34" \ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 3 && !defined __ICC @ gcc33" \ "defined _MSC_VER && _MSC_VER >= 1500 @ vc90" \ "defined _MSC_VER && _MSC_VER == 1400 @ vc80" \ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 2 && !defined __ICC @ gcc32" \ "defined _MSC_VER && _MSC_VER == 1310 @ vc71" \ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 1 && !defined __ICC @ gcc31" \ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 0 && !defined __ICC @ gcc30" \ "defined __BORLANDC__ @ bcb" \ "defined __ICC && (defined __unix || defined ) @ il" \ "defined __ICL @ iw" \ "defined _MSC_VER && _MSC_VER == 1300 @ vc7" \ "defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ == 95 && !defined __ICC @ gcc295" \ "defined __MWERKS__ && __MWERKS__ <= 0x32FF @ cw9" \ "defined _MSC_VER && _MSC_VER < 1300 && !defined UNDER_CE @ vc6" \ "defined _MSC_VER && _MSC_VER < 1300 && defined UNDER_CE @ evc4" \ "defined __MWERKS__ && __MWERKS__ <= 0x31FF @ cw8" do boost_tag_test=`expr "X$i" : 'X\([^@]*\) @ '` boost_tag=`expr "X$i" : 'X[^@]* @ \(.*\)'` cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if $boost_tag_test /* OK */ #else # error $boost_tag_test #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : boost_cv_lib_tag=$boost_tag; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done 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 case $boost_cv_lib_tag in #( # Some newer (>= 1.35?) versions of Boost seem to only use "gcc" as opposed # to "gcc41" for instance. *-gcc | *'-gcc ') :;; #( Don't re-add -gcc: it's already in there. gcc*) boost_tag_x= case $host_os in #( darwin*) if test $boost_major_version -ge 136; then # The `x' added in r46793 of Boost. boost_tag_x=x fi;; esac # We can specify multiple tags in this variable because it's used by # BOOST_FIND_LIB that does a `for tag in -$boost_cv_lib_tag' ... boost_cv_lib_tag="$boost_tag_x$boost_cv_lib_tag -${boost_tag_x}gcc" ;; #( unknown) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not figure out which toolset name to use for $CXX" >&5 $as_echo "$as_me: WARNING: could not figure out which toolset name to use for $CXX" >&2;} boost_cv_lib_tag= ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_tag" >&5 $as_echo "$boost_cv_lib_tag" >&6; } # Check whether --enable-static-boost was given. if test "${enable_static_boost+set}" = set; then : enableval=$enable_static_boost; enable_static_boost=yes else enable_static_boost=no fi # Check whether we do better use `mt' even though we weren't ask to. 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined _REENTRANT || defined _MT || defined __MT__ /* use -mt */ #else # error MT not needed #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : boost_guess_use_mt=: else boost_guess_use_mt=false fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 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 "x$MPICXX" != x && test "x$have_boost" == xyes && test "x$with_mpi" != xno; then : ax_save_CXX=$CXX ax_save_CPP=$CXXCPP CXX=$MPICXX CXXCPP="$MPICXX -E" if test x"$boost_cv_inc_path" = xno; then have_mpi=no CXX=$ax_save_CXX if test "x$with_mpi" == xyes; then : as_fn_error $? "MPI features require boost.mpi" "$LINENO" 5 fi else 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 boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/mpi/environment.hpp" "ac_cv_header_boost_mpi_environment_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_mpi_environment_hpp" = xyes; then : if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for the Boost mpi library" >&5 $as_echo "$as_me: Boost not available, not searching for the Boost mpi library" >&6;} else 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 x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for boost/mpi/environment.hpp" >&5 $as_echo "$as_me: Boost not available, not searching for boost/mpi/environment.hpp" >&6;} else 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 boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/mpi/environment.hpp" "ac_cv_header_boost_mpi_environment_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_mpi_environment_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_MPI_ENVIRONMENT_HPP 1" >>confdefs.h else as_fn_error $? "cannot find boost/mpi/environment.hpp" "$LINENO" 5 fi CPPFLAGS=$boost_save_CPPFLAGS 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 fi boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Boost mpi library" >&5 $as_echo_n "checking for the Boost mpi library... " >&6; } if ${boost_cv_lib_mpi+:} false; then : $as_echo_n "(cached) " >&6 else boost_cv_lib_mpi=no case "" in #( (mt | mt-) boost_mt=-mt; boost_rtopt=;; #( (mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X" : 'Xmt-*\(.*\)'`;; #( (*) boost_mt=; boost_rtopt=;; esac if test $enable_static_boost = yes; then boost_rtopt="s$boost_rtopt" fi # Find the proper debug variant depending on what we've been asked to find. case $boost_rtopt in #( (*d*) boost_rt_d=$boost_rtopt;; #( (*[sgpn]*) # Insert the `d' at the right place (in between `sg' and `pn') boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #( (*) boost_rt_d='-d';; esac # If the PREFERRED-RT-OPT are not empty, prepend a `-'. test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt" $boost_guess_use_mt && boost_mt=-mt # Look for the abs path the static archive. # $libext is computed by Libtool but let's make sure it's non empty. test -z "$libext" && as_fn_error $? "the libext variable is empty, did you invoke Libtool?" "$LINENO" 5 boost_save_ac_objext=$ac_objext # Generate the test file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { boost::mpi::environment() ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_objext=do_not_rm_me_plz else as_fn_error $? "cannot compile a test that uses Boost mpi" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext ac_objext=$boost_save_ac_objext boost_failed_libs= # Don't bother to ident the following nested for loops, only the 2 # innermost ones matter. for boost_lib_ in mpi; do for boost_tag_ in -$boost_cv_lib_tag ''; do for boost_ver_ in -$boost_cv_lib_version ''; do for boost_mt_ in $boost_mt -mt ''; do for boost_rtopt_ in $boost_rtopt '' -d; do for boost_lib in \ boost_$boost_lib_$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ boost_$boost_lib_$boost_tag_$boost_rtopt_$boost_ver_ \ boost_$boost_lib_$boost_tag_$boost_mt_$boost_ver_ \ boost_$boost_lib_$boost_tag_$boost_ver_ do # Avoid testing twice the same lib case $boost_failed_libs in #( (*@$boost_lib@*) continue;; esac # If with_boost is empty, we'll search in /lib first, which is not quite # right so instead we'll try to a location based on where the headers are. boost_tmp_lib=$with_boost test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include} for boost_ldpath in "$boost_tmp_lib/lib" '' \ /opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \ "$with_boost" C:/Boost/lib /lib* do # Don't waste time with directories that don't exist. if test x"$boost_ldpath" != x && test ! -e "$boost_ldpath"; then continue fi boost_save_LDFLAGS=$LDFLAGS # Are we looking for a static library? case $boost_ldpath:$boost_rtopt_ in #( (*?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt) boost_cv_lib_mpi_LIBS="$boost_ldpath/lib$boost_lib.$libext" test -e "$boost_cv_lib_mpi_LIBS" || continue;; #( (*) # No: use -lboost_foo to find the shared library. boost_cv_lib_mpi_LIBS="-l$boost_lib";; esac boost_save_LIBS=$LIBS LIBS="$boost_cv_lib_mpi_LIBS $LIBS" test x"$boost_ldpath" != x && LDFLAGS="$LDFLAGS -L$boost_ldpath" rm -f conftest$ac_exeext boost_save_ac_ext=$ac_ext boost_use_source=: # If we already have a .o, re-use it. We change $ac_ext so that $ac_link # tries to link the existing object file instead of compiling from source. test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false && $as_echo "$as_me:${as_lineno-$LINENO}: re-using the existing conftest.$ac_objext" >&5 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 || $as_executable_p conftest$ac_exeext }; then : boost_cv_lib_mpi=yes else if $boost_use_source; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi boost_cv_lib_mpi=no fi ac_objext=$boost_save_ac_objext ac_ext=$boost_save_ac_ext rm -f core conftest.err conftest_ipa8_conftest.oo \ conftest$ac_exeext ac_objext=$boost_save_ac_objext LDFLAGS=$boost_save_LDFLAGS LIBS=$boost_save_LIBS if test x"$boost_cv_lib_mpi" = xyes; then # Check or used cached result of whether or not using -R or # -rpath makes sense. Some implementations of ld, such as for # Mac OSX, require -rpath but -R is the flag known to work on # other systems. https://github.com/tsuna/boost.m4/issues/19 if ${boost_cv_rpath_link_ldflag+:} false; then : $as_echo_n "(cached) " >&6 else case $boost_ldpath in '') # Nothing to do. boost_cv_rpath_link_ldflag= boost_rpath_link_ldflag_found=yes;; *) for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath" LIBS="$boost_save_LIBS $boost_cv_lib_mpi_LIBS" rm -f conftest$ac_exeext boost_save_ac_ext=$ac_ext boost_use_source=: # If we already have a .o, re-use it. We change $ac_ext so that $ac_link # tries to link the existing object file instead of compiling from source. test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false && $as_echo "$as_me:${as_lineno-$LINENO}: re-using the existing conftest.$ac_objext" >&5 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 || $as_executable_p conftest$ac_exeext }; then : boost_rpath_link_ldflag_found=yes break else if $boost_use_source; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi boost_rpath_link_ldflag_found=no fi ac_objext=$boost_save_ac_objext ac_ext=$boost_save_ac_ext rm -f core conftest.err conftest_ipa8_conftest.oo \ conftest$ac_exeext done ;; esac if test "x$boost_rpath_link_ldflag_found" != "xyes"; then : as_fn_error $? "Unable to determine whether to use -R or -rpath" "$LINENO" 5 fi LDFLAGS=$boost_save_LDFLAGS LIBS=$boost_save_LIBS fi test x"$boost_ldpath" != x && boost_cv_lib_mpi_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath" boost_cv_lib_mpi_LDPATH="$boost_ldpath" break 7 else boost_failed_libs="$boost_failed_libs@$boost_lib@" fi done done done done done done done # boost_lib_ rm -f conftest.$ac_objext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_mpi" >&5 $as_echo "$boost_cv_lib_mpi" >&6; } case $boost_cv_lib_mpi in #( (no) $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 as_fn_error $? "cannot find the flags to link with Boost mpi" "$LINENO" 5 ;; esac BOOST_MPI_LDFLAGS=$boost_cv_lib_mpi_LDFLAGS BOOST_MPI_LDPATH=$boost_cv_lib_mpi_LDPATH BOOST_LDPATH=$boost_cv_lib_mpi_LDPATH BOOST_MPI_LIBS=$boost_cv_lib_mpi_LIBS CPPFLAGS=$boost_save_CPPFLAGS 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 fi if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for the Boost serialization library" >&5 $as_echo "$as_me: Boost not available, not searching for the Boost serialization library" >&6;} else 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 x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for boost/serialization/base_object.hpp" >&5 $as_echo "$as_me: Boost not available, not searching for boost/serialization/base_object.hpp" >&6;} else 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 boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/serialization/base_object.hpp" "ac_cv_header_boost_serialization_base_object_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_serialization_base_object_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_SERIALIZATION_BASE_OBJECT_HPP 1" >>confdefs.h else as_fn_error $? "cannot find boost/serialization/base_object.hpp" "$LINENO" 5 fi CPPFLAGS=$boost_save_CPPFLAGS 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 fi boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Boost serialization library" >&5 $as_echo_n "checking for the Boost serialization library... " >&6; } if ${boost_cv_lib_serialization+:} false; then : $as_echo_n "(cached) " >&6 else boost_cv_lib_serialization=no case "" in #( (mt | mt-) boost_mt=-mt; boost_rtopt=;; #( (mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X" : 'Xmt-*\(.*\)'`;; #( (*) boost_mt=; boost_rtopt=;; esac if test $enable_static_boost = yes; then boost_rtopt="s$boost_rtopt" fi # Find the proper debug variant depending on what we've been asked to find. case $boost_rtopt in #( (*d*) boost_rt_d=$boost_rtopt;; #( (*[sgpn]*) # Insert the `d' at the right place (in between `sg' and `pn') boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #( (*) boost_rt_d='-d';; esac # If the PREFERRED-RT-OPT are not empty, prepend a `-'. test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt" $boost_guess_use_mt && boost_mt=-mt # Look for the abs path the static archive. # $libext is computed by Libtool but let's make sure it's non empty. test -z "$libext" && as_fn_error $? "the libext variable is empty, did you invoke Libtool?" "$LINENO" 5 boost_save_ac_objext=$ac_objext # Generate the test file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_objext=do_not_rm_me_plz else as_fn_error $? "cannot compile a test that uses Boost serialization" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext ac_objext=$boost_save_ac_objext boost_failed_libs= # Don't bother to ident the following nested for loops, only the 2 # innermost ones matter. for boost_lib_ in serialization; do for boost_tag_ in -$boost_cv_lib_tag ''; do for boost_ver_ in -$boost_cv_lib_version ''; do for boost_mt_ in $boost_mt -mt ''; do for boost_rtopt_ in $boost_rtopt '' -d; do for boost_lib in \ boost_$boost_lib_$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ boost_$boost_lib_$boost_tag_$boost_rtopt_$boost_ver_ \ boost_$boost_lib_$boost_tag_$boost_mt_$boost_ver_ \ boost_$boost_lib_$boost_tag_$boost_ver_ do # Avoid testing twice the same lib case $boost_failed_libs in #( (*@$boost_lib@*) continue;; esac # If with_boost is empty, we'll search in /lib first, which is not quite # right so instead we'll try to a location based on where the headers are. boost_tmp_lib=$with_boost test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include} for boost_ldpath in "$boost_tmp_lib/lib" '' \ /opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \ "$with_boost" C:/Boost/lib /lib* do # Don't waste time with directories that don't exist. if test x"$boost_ldpath" != x && test ! -e "$boost_ldpath"; then continue fi boost_save_LDFLAGS=$LDFLAGS # Are we looking for a static library? case $boost_ldpath:$boost_rtopt_ in #( (*?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt) boost_cv_lib_serialization_LIBS="$boost_ldpath/lib$boost_lib.$libext" test -e "$boost_cv_lib_serialization_LIBS" || continue;; #( (*) # No: use -lboost_foo to find the shared library. boost_cv_lib_serialization_LIBS="-l$boost_lib";; esac boost_save_LIBS=$LIBS LIBS="$boost_cv_lib_serialization_LIBS $LIBS" test x"$boost_ldpath" != x && LDFLAGS="$LDFLAGS -L$boost_ldpath" rm -f conftest$ac_exeext boost_save_ac_ext=$ac_ext boost_use_source=: # If we already have a .o, re-use it. We change $ac_ext so that $ac_link # tries to link the existing object file instead of compiling from source. test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false && $as_echo "$as_me:${as_lineno-$LINENO}: re-using the existing conftest.$ac_objext" >&5 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 || $as_executable_p conftest$ac_exeext }; then : boost_cv_lib_serialization=yes else if $boost_use_source; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi boost_cv_lib_serialization=no fi ac_objext=$boost_save_ac_objext ac_ext=$boost_save_ac_ext rm -f core conftest.err conftest_ipa8_conftest.oo \ conftest$ac_exeext ac_objext=$boost_save_ac_objext LDFLAGS=$boost_save_LDFLAGS LIBS=$boost_save_LIBS if test x"$boost_cv_lib_serialization" = xyes; then # Check or used cached result of whether or not using -R or # -rpath makes sense. Some implementations of ld, such as for # Mac OSX, require -rpath but -R is the flag known to work on # other systems. https://github.com/tsuna/boost.m4/issues/19 if ${boost_cv_rpath_link_ldflag+:} false; then : $as_echo_n "(cached) " >&6 else case $boost_ldpath in '') # Nothing to do. boost_cv_rpath_link_ldflag= boost_rpath_link_ldflag_found=yes;; *) for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath" LIBS="$boost_save_LIBS $boost_cv_lib_serialization_LIBS" rm -f conftest$ac_exeext boost_save_ac_ext=$ac_ext boost_use_source=: # If we already have a .o, re-use it. We change $ac_ext so that $ac_link # tries to link the existing object file instead of compiling from source. test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false && $as_echo "$as_me:${as_lineno-$LINENO}: re-using the existing conftest.$ac_objext" >&5 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 || $as_executable_p conftest$ac_exeext }; then : boost_rpath_link_ldflag_found=yes break else if $boost_use_source; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi boost_rpath_link_ldflag_found=no fi ac_objext=$boost_save_ac_objext ac_ext=$boost_save_ac_ext rm -f core conftest.err conftest_ipa8_conftest.oo \ conftest$ac_exeext done ;; esac if test "x$boost_rpath_link_ldflag_found" != "xyes"; then : as_fn_error $? "Unable to determine whether to use -R or -rpath" "$LINENO" 5 fi LDFLAGS=$boost_save_LDFLAGS LIBS=$boost_save_LIBS fi test x"$boost_ldpath" != x && boost_cv_lib_serialization_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath" boost_cv_lib_serialization_LDPATH="$boost_ldpath" break 7 else boost_failed_libs="$boost_failed_libs@$boost_lib@" fi done done done done done done done # boost_lib_ rm -f conftest.$ac_objext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_serialization" >&5 $as_echo "$boost_cv_lib_serialization" >&6; } case $boost_cv_lib_serialization in #( (no) $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 as_fn_error $? "cannot find the flags to link with Boost serialization" "$LINENO" 5 ;; esac BOOST_SERIALIZATION_LDFLAGS=$boost_cv_lib_serialization_LDFLAGS BOOST_SERIALIZATION_LDPATH=$boost_cv_lib_serialization_LDPATH BOOST_LDPATH=$boost_cv_lib_serialization_LDPATH BOOST_SERIALIZATION_LIBS=$boost_cv_lib_serialization_LIBS CPPFLAGS=$boost_save_CPPFLAGS 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 fi have_mpi=yes else have_mpi=no CXX=$ax_save_CXX if test "x$with_mpi" == xyes; then : as_fn_error $? "MPI features require boost.mpi" "$LINENO" 5 fi fi CPPFLAGS=$boost_save_CPPFLAGS 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 fi fi if test "x$have_mpi" == xyes; then : $as_echo "#define HAVE_MPI 1" >>confdefs.h else if test "x$with_mpi" == xyes; then : as_fn_error $? "MPI requested but not found" "$LINENO" 5 else FEATURES+="-nompi" MPICXX="" fi fi if test "x$have_mpi" == xyes; then HAVE_MPI_TRUE= HAVE_MPI_FALSE='#' else HAVE_MPI_TRUE='#' HAVE_MPI_FALSE= fi { $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 { $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 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; 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_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$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 ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; 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_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$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 ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" 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 PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; 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; } PKG_CONFIG="" fi fi for ac_prog in doxygen 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_DOXYGEN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DOXYGEN"; then ac_cv_prog_DOXYGEN="$DOXYGEN" # 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_DOXYGEN="$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 DOXYGEN=$ac_cv_prog_DOXYGEN if test -n "$DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 $as_echo "$DOXYGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DOXYGEN" && break done for ac_prog in pdflatex 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_PDFLATEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PDFLATEX"; then ac_cv_prog_PDFLATEX="$PDFLATEX" # 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_PDFLATEX="$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 PDFLATEX=$ac_cv_prog_PDFLATEX if test -n "$PDFLATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDFLATEX" >&5 $as_echo "$PDFLATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PDFLATEX" && break done for ac_prog in bibtex 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_BIBTEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$BIBTEX"; then ac_cv_prog_BIBTEX="$BIBTEX" # 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_BIBTEX="$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 BIBTEX=$ac_cv_prog_BIBTEX if test -n "$BIBTEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BIBTEX" >&5 $as_echo "$BIBTEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$BIBTEX" && break done for ac_prog in kpsewhich 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_KPSEWHICH+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$KPSEWHICH"; then ac_cv_prog_KPSEWHICH="$KPSEWHICH" # 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_KPSEWHICH="$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 KPSEWHICH=$ac_cv_prog_KPSEWHICH if test -n "$KPSEWHICH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KPSEWHICH" >&5 $as_echo "$KPSEWHICH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$KPSEWHICH" && break done # Provide additional defaults for user variables for flag in -rdynamic; do as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags__$flag" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 $as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } if eval \${$as_CACHEVAR+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CXXFLAGS CXXFLAGS="$CXXFLAGS $flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_CACHEVAR=yes" else eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : if ${LDFLAGS+:} false; then : case " $LDFLAGS " in #( *" $flag "*) : { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains \$flag"; } >&5 (: LDFLAGS already contains $flag) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; #( *) : as_fn_append LDFLAGS " $flag" { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5 (: LDFLAGS="$LDFLAGS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; esac else LDFLAGS=$flag { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5 (: LDFLAGS="$LDFLAGS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } fi else : fi done # Check whether --enable-native was given. if test "${enable_native+set}" = set; then : enableval=$enable_native; if test "x$enable_native" = "xyes"; then : for flag in -march=native; do as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags__$flag" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 $as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } if eval \${$as_CACHEVAR+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CXXFLAGS CXXFLAGS="$CXXFLAGS $flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_CACHEVAR=yes" else eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : if ${CXXFLAGS+:} false; then : case " $CXXFLAGS " in #( *" $flag "*) : { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 (: CXXFLAGS already contains $flag) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; #( *) : as_fn_append CXXFLAGS " $flag" { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS\""; } >&5 (: CXXFLAGS="$CXXFLAGS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; esac else CXXFLAGS=$flag { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS\""; } >&5 (: CXXFLAGS="$CXXFLAGS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } fi else : fi done fi fi # Check whether --enable-hardening was given. if test "${enable_hardening+set}" = set; then : enableval=$enable_hardening; if test "x$enable_hardening" = "xyes"; then : for flag in -pedantic -Wall -W -Wundef -Wshadow -Wcast-qual \ -Wcast-align -Wconversion -Winline -Wabi -Woverloaded-virtual \ -Wno-long-long -Wformat -Wformat-security -Werror=format-security \ -fstack-protector "--param ssp-buffer-size=4"; do as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags__$flag" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 $as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } if eval \${$as_CACHEVAR+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CXXFLAGS CXXFLAGS="$CXXFLAGS $flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_CACHEVAR=yes" else eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : if ${CXXFLAGS+:} false; then : case " $CXXFLAGS " in #( *" $flag "*) : { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 (: CXXFLAGS already contains $flag) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; #( *) : as_fn_append CXXFLAGS " $flag" { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS\""; } >&5 (: CXXFLAGS="$CXXFLAGS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; esac else CXXFLAGS=$flag { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS\""; } >&5 (: CXXFLAGS="$CXXFLAGS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } fi else : fi done for flag in -D_FORTIFY_SOURCE=2; do as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags__$flag" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 $as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } if eval \${$as_CACHEVAR+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CXXFLAGS CXXFLAGS="$CXXFLAGS $flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_CACHEVAR=yes" else eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : if ${CPPFLAGS+:} false; then : case " $CPPFLAGS " in #( *" $flag "*) : { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains \$flag"; } >&5 (: CPPFLAGS already contains $flag) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; #( *) : as_fn_append CPPFLAGS " $flag" { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5 (: CPPFLAGS="$CPPFLAGS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; esac else CPPFLAGS=$flag { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5 (: CPPFLAGS="$CPPFLAGS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } fi else : fi done for flag in -fPIE; do as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags__$flag" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 $as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } if eval \${$as_CACHEVAR+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CXXFLAGS CXXFLAGS="$CXXFLAGS $flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_CACHEVAR=yes" else eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : if ${CXXFLAGS_EXEC+:} false; then : case " $CXXFLAGS_EXEC " in #( *" $flag "*) : { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS_EXEC already contains \$flag"; } >&5 (: CXXFLAGS_EXEC already contains $flag) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; #( *) : as_fn_append CXXFLAGS_EXEC " $flag" { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS_EXEC=\"\$CXXFLAGS_EXEC\""; } >&5 (: CXXFLAGS_EXEC="$CXXFLAGS_EXEC") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; esac else CXXFLAGS_EXEC=$flag { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS_EXEC=\"\$CXXFLAGS_EXEC\""; } >&5 (: CXXFLAGS_EXEC="$CXXFLAGS_EXEC") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } fi else : fi done for flag in -pie; do as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_-fPIE_$flag" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 $as_echo_n "checking whether the linker accepts $flag... " >&6; } if eval \${$as_CACHEVAR+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$LDFLAGS LDFLAGS="$LDFLAGS -fPIE $flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_CACHEVAR=yes" else eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : if ${LDFLAGS_EXEC+:} false; then : case " $LDFLAGS_EXEC " in #( *" $flag "*) : { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS_EXEC already contains \$flag"; } >&5 (: LDFLAGS_EXEC already contains $flag) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; #( *) : as_fn_append LDFLAGS_EXEC " $flag" { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS_EXEC=\"\$LDFLAGS_EXEC\""; } >&5 (: LDFLAGS_EXEC="$LDFLAGS_EXEC") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; esac else LDFLAGS_EXEC=$flag { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS_EXEC=\"\$LDFLAGS_EXEC\""; } >&5 (: LDFLAGS_EXEC="$LDFLAGS_EXEC") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } fi else : fi done fi fi # Check whether --enable-deprecated was given. if test "${enable_deprecated+set}" = set; then : enableval=$enable_deprecated; if test "x$enable_deprecated" = "xno"; then : for flag in -DGYOTO_NO_DEPRECATED; do as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags__$flag" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 $as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } if eval \${$as_CACHEVAR+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CXXFLAGS CXXFLAGS="$CXXFLAGS $flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_CACHEVAR=yes" else eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : if ${CPPFLAGS+:} false; then : case " $CPPFLAGS " in #( *" $flag "*) : { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains \$flag"; } >&5 (: CPPFLAGS already contains $flag) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; #( *) : as_fn_append CPPFLAGS " $flag" { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5 (: CPPFLAGS="$CPPFLAGS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; esac else CPPFLAGS=$flag { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5 (: CPPFLAGS="$CPPFLAGS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } fi else : fi done fi else for flag in -DGYOTO_NO_DEPRECATED; do as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags__$flag" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 $as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } if eval \${$as_CACHEVAR+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CXXFLAGS CXXFLAGS="$CXXFLAGS $flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_CACHEVAR=yes" else eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : if ${CPPFLAGS+:} false; then : case " $CPPFLAGS " in #( *" $flag "*) : { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains \$flag"; } >&5 (: CPPFLAGS already contains $flag) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; #( *) : as_fn_append CPPFLAGS " $flag" { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5 (: CPPFLAGS="$CPPFLAGS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; esac else CPPFLAGS=$flag { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5 (: CPPFLAGS="$CPPFLAGS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } fi else : fi done fi # Guess *LD_LIBRARY_PATH variable for make check SYS=other DYLIB_VAR=LD_LIBRARY_PATH case "x$target_os" in xdarwin*|xmacos) DYLIB_VAR=DYLD_LIBRARY_PATH SYS=Darwin ;; *) ;; esac plugin_sfx=so cat >>confdefs.h <<_ACEOF #define GYOTO_PLUGIN_SFX "${plugin_sfx}" _ACEOF GYOTO_PLUGIN_SFX=${plugin_sfx} # Used in yorick/stdplug/Makefile # Checks for libraries. { $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_cxx_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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBS="-ldl $LIBS" fi # Checks for header files. # We are not using those tests to far # AC_CHECK_HEADERS([float.h stddef.h string.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_cxx_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # Checks for library functions. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 $as_echo_n "checking for error_at_line... " >&6; } if ${ac_cv_lib_error_at_line+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { error_at_line (0, 0, "", 0, "an error occurred"); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_error_at_line=yes else ac_cv_lib_error_at_line=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 $as_echo "$ac_cv_lib_error_at_line" >&6; } if test $ac_cv_lib_error_at_line = no; then case " $LIBOBJS " in *" error.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS error.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 $as_echo_n "checking for working strtod... " >&6; } if ${ac_cv_func_strtod+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_strtod=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifndef strtod double strtod (); #endif int main() { { /* Some versions of Linux strtod mis-parse strings with leading '+'. */ char *string = " +69"; char *term; double value; value = strtod (string, &term); if (value != 69 || term != (string + 4)) return 1; } { /* Under Solaris 2.4, strtod returns the wrong value for the terminating character under some conditions. */ char *string = "NaN"; char *term; strtod (string, &term); if (term != string && *(term - 1) == 0) return 1; } return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_strtod=yes else ac_cv_func_strtod=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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 $as_echo "$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = no; then case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac ac_fn_cxx_check_func "$LINENO" "pow" "ac_cv_func_pow" if test "x$ac_cv_func_pow" = xyes; then : fi if test $ac_cv_func_pow = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 $as_echo_n "checking for pow in -lm... " >&6; } if ${ac_cv_lib_m_pow+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $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 pow (); int main () { return pow (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_m_pow=yes else ac_cv_lib_m_pow=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_m_pow" >&5 $as_echo "$ac_cv_lib_m_pow" >&6; } if test "x$ac_cv_lib_m_pow" = xyes; then : POW_LIB=-lm else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 $as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} fi fi fi # other functions we may need to check for according to autoscan: # floor getcwd pow sqrt strdup for ac_func in sincos do : ac_fn_cxx_check_func "$LINENO" "sincos" "ac_cv_func_sincos" if test "x$ac_cv_func_sincos" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SINCOS 1 _ACEOF fi done ## YORICK # Check for Yorick yorick_exe=yorick YORICK= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use yorick" >&5 $as_echo_n "checking whether to use yorick... " >&6; } # Check whether --with-yorick was given. if test "${with_yorick+set}" = set; then : withval=$with_yorick; if test "x$with_yorick" == "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if test "x$with_yorick" != "xyes"; then : YORICK=$with_yorick else YORICK=$yorick_exe fi if $YORICK -batch; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YORICK" >&5 $as_echo "$YORICK" >&6; } else as_fn_error $? "$YORICK does not work" "$LINENO" 5 fi fi else for ac_prog in $yorick_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_YORICK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YORICK"; then ac_cv_prog_YORICK="$YORICK" # 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_YORICK="$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 YORICK=$ac_cv_prog_YORICK if test -n "$YORICK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YORICK" >&5 $as_echo "$YORICK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YORICK" && break done fi if test "x$YORICK" != "x"; then HAVE_YORICK_TRUE= HAVE_YORICK_FALSE='#' else HAVE_YORICK_TRUE='#' HAVE_YORICK_FALSE= fi # Only if YORICK available, check for install directories if test "x$YORICK" != "x"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking install path for Yorick platform-dependent files" >&5 $as_echo_n "checking install path for Yorick platform-dependent files... " >&6; } Y_EXE_HOME=`echo write,format=\"%s\",Y_HOME\; quit | ${YORICK}| tail -1` Y_EXE_SITE=`echo write,format=\"%s\",Y_SITE\; quit | ${YORICK}| tail -1` Y_INST_HOME= Y_INST_SITE= # Check whether --with-yorick-home was given. if test "${with_yorick_home+set}" = set; then : withval=$with_yorick_home; Y_INST_HOME=${with_yorick_home} Y_INST_SITE=${with_yorick_home} else if echo ${Y_EXE_HOME} | grep ${exec_prefix}; then : Y_INST_HOME=Y_EXE_HOME Y_INST_SITE=Y_EXE_SITE else Y_INST_HOME='${exec_prefix}/lib/yorick' Y_INST_SITE='${prefix}/lib/yorick' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $Y_INST_HOME" >&5 $as_echo "$Y_INST_HOME" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking install path for Yorick platform-independent files" >&5 $as_echo_n "checking install path for Yorick platform-independent files... " >&6; } # Check whether --with-yorick-site was given. if test "${with_yorick_site+set}" = set; then : withval=$with_yorick_site; Y_INST_SITE=${with_yorick_site} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $Y_INST_SITE" >&5 $as_echo "$Y_INST_SITE" >&6; } fi ## DEBUGGING INFORMATION # Enable debugging by default GYOTO_DEBUG_ENABLED=yes # Check whether --enable-debugging was given. if test "${enable_debugging+set}" = set; then : enableval=$enable_debugging; if test "x$enable_debugging" == "xno"; then : GYOTO_DEBUG_ENABLED=0 fi fi if test "x$GYOTO_DEBUG_ENABLED" == xyes; then : $as_echo "#define GYOTO_DEBUG_ENABLED 1" >>confdefs.h fi ## POSIX THREADS # Check for pthreads use_pthreads=yes # Check whether --enable-pthreads was given. if test "${enable_pthreads+set}" = set; then : enableval=$enable_pthreads; if test "x$enable_pthreads" = "xno"; then : use_pthreads=no fi fi if test "x$use_pthreads" == "xyes"; then : 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 ax_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } 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 pthread_join (); int main () { return pthread_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ax_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 $as_echo "$ax_pthread_ok" >&6; } if test x"$ax_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case ${host_os} in solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" ;; darwin*) ax_pthread_flags="-pthread $ax_pthread_flags" ;; esac if test x"$ax_pthread_ok" = xno; then for flag in $ax_pthread_flags; do case $flag in none) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 $as_echo_n "checking whether pthreads work without any flags... " >&6; } ;; -*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 $as_echo_n "checking whether pthreads work with $flag... " >&6; } PTHREAD_CFLAGS="$flag" ;; pthread-config) # Extract the first word of "pthread-config", so it can be a program name with args. set dummy pthread-config; 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_ax_pthread_config+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ax_pthread_config"; then ac_cv_prog_ax_pthread_config="$ax_pthread_config" # 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_ax_pthread_config="yes" $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_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" fi fi ax_pthread_config=$ac_cv_prog_ax_pthread_config if test -n "$ax_pthread_config"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 $as_echo "$ax_pthread_config" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x"$ax_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 $as_echo_n "checking for the pthreads library -l$flag... " >&6; } PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include static void routine(void *a) { a = 0; } static void *start_routine(void *a) { return a; } int main () { pthread_t th; pthread_attr_t attr; pthread_create(&th, 0, start_routine, 0); pthread_join(th, 0); pthread_attr_init(&attr); pthread_cleanup_push(routine, 0); pthread_cleanup_pop(0) /* ; */ ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ax_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 $as_echo "$ax_pthread_ok" >&6; } if test "x$ax_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$ax_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 $as_echo_n "checking for joinable pthread attribute... " >&6; } attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int attr = $attr; return attr /* ; */ ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : attr_name=$attr; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 $as_echo "$attr_name" >&6; } if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then cat >>confdefs.h <<_ACEOF #define PTHREAD_CREATE_JOINABLE $attr_name _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 $as_echo_n "checking if more special flags are required for pthreads... " >&6; } flag=no case ${host_os} in aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; osf* | hpux*) flag="-D_REENTRANT";; solaris*) if test "$GCC" = "yes"; then flag="-D_REENTRANT" else flag="-mt -D_REENTRANT" fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 $as_echo "${flag}" >&6; } if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = PTHREAD_PRIO_INHERIT; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ax_cv_PTHREAD_PRIO_INHERIT=yes else ax_cv_PTHREAD_PRIO_INHERIT=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then : $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with xlc_r or cc_r if test x"$GCC" != xyes; then for ac_prog in xlc_r cc_r 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_PTHREAD_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_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_PTHREAD_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 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 $as_echo "$PTHREAD_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PTHREAD_CC" && break done test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" else PTHREAD_CC=$CC fi else PTHREAD_CC="$CC" fi # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$ax_pthread_ok" = xyes; then $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h : else ax_pthread_ok=no 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 FEATURES+="-nopthreads" fi ## UDUNITS # Check for UDUNITS pkg_requires= pkg_cflags= pkg_libs= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libudunits2 should be used" >&5 $as_echo_n "checking whether libudunits2 should be used... " >&6; } udunits_cppflags= udunits_ldflags= UDUNITS_CFLAGS= UDUNITS_LIBS= # Check whether --with-udunits was given. if test "${with_udunits+set}" = set; then : withval=$with_udunits; if test "x$withval" == "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } elif test "x$withval" != "xyes"; then : udunits_cppflags=-I$withval/include udunits_ldflags="-L$withval/lib -ludunits2" with_udunits=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else with_udunits=check { $as_echo "$as_me:${as_lineno-$LINENO}: result: probe" >&5 $as_echo "probe" >&6; } fi have_udunits=no if test "x$with_udunits" != "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether udunits2 include path is provided" >&5 $as_echo_n "checking whether udunits2 include path is provided... " >&6; } # Check whether --with-udunits-inc was given. if test "${with_udunits_inc+set}" = set; then : withval=$with_udunits_inc; with_udunits=yes udunits_cppflags=-I${withval} { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${withval}" >&5 $as_echo "${withval}" >&6; } 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 udunits linker flags are provided" >&5 $as_echo_n "checking whether udunits linker flags are provided... " >&6; } # Check whether --with-udunits-lib was given. if test "${with_udunits_lib+set}" = set; then : withval=$with_udunits_lib; with_udunits=yes udunits_ldflags="${withval}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 $as_echo "$withval" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Now check whether or not to use pkg-config for udunits if test "x$udunits_cppflags" == "x" \ && test "x$udunits_ldflags" == "x" \ && test "x$PKG_CONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UDUNITS" >&5 $as_echo_n "checking for UDUNITS... " >&6; } if test -n "$UDUNITS_CFLAGS"; then pkg_cv_UDUNITS_CFLAGS="$UDUNITS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"udunits\""; } >&5 ($PKG_CONFIG --exists --print-errors "udunits") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_UDUNITS_CFLAGS=`$PKG_CONFIG --cflags "udunits" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$UDUNITS_LIBS"; then pkg_cv_UDUNITS_LIBS="$UDUNITS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"udunits\""; } >&5 ($PKG_CONFIG --exists --print-errors "udunits") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_UDUNITS_LIBS=`$PKG_CONFIG --libs "udunits" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then UDUNITS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "udunits" 2>&1` else UDUNITS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "udunits" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$UDUNITS_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: udunits.pc not found" >&5 $as_echo "$as_me: udunits.pc not found" >&6;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: udunits.pc not found" >&5 $as_echo "$as_me: udunits.pc not found" >&6;} else UDUNITS_CFLAGS=$pkg_cv_UDUNITS_CFLAGS UDUNITS_LIBS=$pkg_cv_UDUNITS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } pkg_requires="${pkg_requires} udunits" have_udunits=yes fi fi # Failing that, check without pkg-config if test "x$have_udunits" == "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for udunits (without pkg-config)" >&5 $as_echo_n "checking for udunits (without pkg-config)... " >&6; } TMPCPPFLAGS=$CPPFLAGS TMPCFLAGS=$CFLAGS TMPLDFLAGS=$LDFLAGS TMPLIBS=$LIBS CPPFLAGS="$TMPCPPFLAGS $udunits_cppflags" LDFLAGS="$TMPLDFLAGS $udunits_ldflags" LIBS=-ludunits2 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { ut_set_error_message_handler(ut_ignore); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : have_udunits=yes { $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 rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CPPFLAGS=$TMPCPPFLAGS LDFLAGS=$TMPLDFLAGS LIBS=$TMPLIBS UDUNITS_LIBS="$udunits_ldflags -ludunits2" UDUNITS_CFLAGS="$udunits_cppflags" pkg_cflags="${pkg_cflags} ${UDUNITS_CFLAGS}" pkg_libs="${pkg_libs} ${UDUNITS_LIBS}" fi fi if test "x$have_udunits" != xno; then HAVE_UDUNITS_TRUE= HAVE_UDUNITS_FALSE='#' else HAVE_UDUNITS_TRUE='#' HAVE_UDUNITS_FALSE= fi if test "x$have_udunits" == "xno"; then : if test "x$with_udunits" == "xyes"; then : as_fn_error $? " **************************************** *** UDUNITS requested but not found! *** ****************************************" "$LINENO" 5 else FEATURES+="-nounits" fi else use_udunits=yes $as_echo "#define HAVE_UDUNITS 1" >>confdefs.h fi ## XERCES # Check for Xerces-c { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libxerces should be used" >&5 $as_echo_n "checking whether libxerces should be used... " >&6; } xerces_headers= xerces_lib= XERCES_CFLAGS= XERCES_LIBS= # Check whether --with-xerces was given. if test "${with_xerces+set}" = set; then : withval=$with_xerces; if test "x$with_xerces" == "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } elif test "x$with_xerces" != "xyes"; then : xerces_headers=-I$with_xerces/include xerces_lib=-L$with_xerces/lib with_xerces=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else with_xerces=check { $as_echo "$as_me:${as_lineno-$LINENO}: result: probe" >&5 $as_echo "probe" >&6; } fi have_xerces=no if test "x$with_xerces" != "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xerces include path is provided" >&5 $as_echo_n "checking whether xerces include path is provided... " >&6; } # Check whether --with-xerces-headers was given. if test "${with_xerces_headers+set}" = set; then : withval=$with_xerces_headers; with_xerces=yes xerces_headers=-I${with_xerces_headers} { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_xerces_headers}" >&5 $as_echo "${with_xerces_headers}" >&6; } 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 xerces library path is provided" >&5 $as_echo_n "checking whether xerces library path is provided... " >&6; } # Check whether --with-xerces-libs was given. if test "${with_xerces_libs+set}" = set; then : withval=$with_xerces_libs; with_xerces=yes xerces_lib=-L$with_xerces_libs { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xerces_libs" >&5 $as_echo "$with_xerces_libs" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Now check whether or not to use pkg-config for xerces if test "x$xerces_headers" == "x" \ && test "x$xerces_lib" == "x" \ && test "x$PKG_CONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XERCES" >&5 $as_echo_n "checking for XERCES... " >&6; } if test -n "$XERCES_CFLAGS"; then pkg_cv_XERCES_CFLAGS="$XERCES_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xerces-c\""; } >&5 ($PKG_CONFIG --exists --print-errors "xerces-c") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XERCES_CFLAGS=`$PKG_CONFIG --cflags "xerces-c" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XERCES_LIBS"; then pkg_cv_XERCES_LIBS="$XERCES_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xerces-c\""; } >&5 ($PKG_CONFIG --exists --print-errors "xerces-c") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XERCES_LIBS=`$PKG_CONFIG --libs "xerces-c" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XERCES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xerces-c" 2>&1` else XERCES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xerces-c" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XERCES_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: xerces-c.pc not found" >&5 $as_echo "$as_me: xerces-c.pc not found" >&6;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: xerces-c.pc not found" >&5 $as_echo "$as_me: xerces-c.pc not found" >&6;} else XERCES_CFLAGS=$pkg_cv_XERCES_CFLAGS XERCES_LIBS=$pkg_cv_XERCES_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } pkg_requires="${pkg_requires} xerces-c" have_xerces=yes fi fi # Failing that, check without pkg-config if test "x$have_xerces" == "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xerces-c (without pkg-config)" >&5 $as_echo_n "checking for xerces-c (without pkg-config)... " >&6; } TMPCPPFLAGS=$CPPFLAGS TMPCFLAGS=$CFLAGS TMPLDFLAGS=$LDFLAGS TMPLIBS=$LIBS CPPFLAGS="$TMPCPPFLAGS $xerces_headers" LDFLAGS="$TMPLDFLAGS $xerces_lib" LIBS=-lxerces-c cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { xercesc::XMLPlatformUtils::Initialize(); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : have_xerces=yes { $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 rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CPPFLAGS=$TMPCPPFLAGS LDFLAGS=$TMPLDFLAGS LIBS=$TMPLIBS XERCES_LIBS="$xerces_lib -lxerces-c" XERCES_CFLAGS="$xerces_headers" pkg_cflags="${pkg_cflags} ${XERCES_CFLAGS}" pkg_libs="${pkg_libs} ${XERCES_LIBS}" fi fi if test "x$have_xerces" == "xno"; then : if test "x$with_xerces" == "xyes"; then : as_fn_error $? "xerces requested but not found" "$LINENO" 5 else FEATURES+="-noxml" fi if test "x$have_mpi" == "xyes"; then : as_fn_error $? "The MPI feature set requires Xerces. Please reconfigure with --without-mpi or with --with-xerces." "$LINENO" 5 fi else use_xerces=yes $as_echo "#define GYOTO_USE_XERCES 1" >>confdefs.h fi ## CFITSIO # Check for CFITSIO { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libcfitsio should be used" >&5 $as_echo_n "checking whether libcfitsio should be used... " >&6; } cfitsio_headers= cfitsio_lib= # Check whether --with-cfitsio was given. if test "${with_cfitsio+set}" = set; then : withval=$with_cfitsio; if test "x$with_cfitsio" == "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } elif test "x$with_cfitsio" != "xyes"; then : cfitsio_headers=-I$with_cfitsio/include cfitsio_lib=-L$with_cfitsio/lib with_cfitsio=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else with_cfitsio=check { $as_echo "$as_me:${as_lineno-$LINENO}: result: probe" >&5 $as_echo "probe" >&6; } fi have_cfitsio=no if test "x$with_cfitsio" != "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cfitsio include path is provided" >&5 $as_echo_n "checking whether cfitsio include path is provided... " >&6; } # Check whether --with-cfitsio-headers was given. if test "${with_cfitsio_headers+set}" = set; then : withval=$with_cfitsio_headers; with_cfitsio=yes cfitsio_headers=-I${with_cfitsio_headers} { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_cfitsio_headers}" >&5 $as_echo "${with_cfitsio_headers}" >&6; } 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 cfitsio library path is provided" >&5 $as_echo_n "checking whether cfitsio library path is provided... " >&6; } # Check whether --with-cfitsio-libs was given. if test "${with_cfitsio_libs+set}" = set; then : withval=$with_cfitsio_libs; with_cfitsio=yes cfitsio_lib=-L$with_cfitsio_libs { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cfitsio_libs" >&5 $as_echo "$with_cfitsio_libs" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Now check whether or not to use pkg-config for cfitsio if test "x$cfitsio_headers" == "x" \ && test "x$cfitsio_lib" == "x" \ && test "x$PKG_CONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFITSIO" >&5 $as_echo_n "checking for CFITSIO... " >&6; } if test -n "$CFITSIO_CFLAGS"; then pkg_cv_CFITSIO_CFLAGS="$CFITSIO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cfitsio\""; } >&5 ($PKG_CONFIG --exists --print-errors "cfitsio") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CFITSIO_CFLAGS=`$PKG_CONFIG --cflags "cfitsio" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$CFITSIO_LIBS"; then pkg_cv_CFITSIO_LIBS="$CFITSIO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cfitsio\""; } >&5 ($PKG_CONFIG --exists --print-errors "cfitsio") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CFITSIO_LIBS=`$PKG_CONFIG --libs "cfitsio" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CFITSIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cfitsio" 2>&1` else CFITSIO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cfitsio" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CFITSIO_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: cfitsio.pc not found" >&5 $as_echo "$as_me: cfitsio.pc not found" >&6;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: cfitsio.pc not found" >&5 $as_echo "$as_me: cfitsio.pc not found" >&6;} else CFITSIO_CFLAGS=$pkg_cv_CFITSIO_CFLAGS CFITSIO_LIBS=$pkg_cv_CFITSIO_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } pkg_requires="${pkg_requires} cfitsio" have_cfitsio=yes fi fi # Failing that, check without pkg-config if test "x$have_cfitsio" == "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cfitsio (without pkg-config)" >&5 $as_echo_n "checking for cfitsio (without pkg-config)... " >&6; } TMPCPPFLAGS=$CPPFLAGS CPPFLAGS="$TMPCPPFLAGS $cfitsio_headers" TMPLDFLAGS=$LDFLAGS LDFLAGS="$TMPLDFLAGS $cfitsio_lib" TMPLIBS=$LIBS LIBS=-lcfitsio cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { fitsfile* fptr=NULL; std::string file=""; int status=0; fits_open_file(&fptr, file.c_str(), 0, &status); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : have_cfitsio=yes { $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 rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CPPFLAGS=$TMPCPPFLAGS LDFLAGS=$TMPLDFLAGS LIBS=$TMPLIBS CFITSIO_LIBS="$cfitsio_lib -lcfitsio" CFITSIO_CFLAGS="$cfitsio_headers" pkg_cflags="${pkg_cflags} ${CFITSIO_CFLAGS}" pkg_libs="${pkg_libs} ${CFITSIO_LIBS}" fi fi if test "x$have_cfitsio" == "xno"; then : if test "x$with_cfitsio" == "xyes"; then : as_fn_error $? "cfitsio requested but not found" "$LINENO" 5 else FEATURES+="-nofits" fi else use_cfitsio=yes $as_echo "#define GYOTO_USE_CFITSIO 1" >>confdefs.h fi if test "x$have_cfitsio" == "xyes"; then HAVE_CFITSIO_TRUE= HAVE_CFITSIO_FALSE='#' else HAVE_CFITSIO_TRUE='#' HAVE_CFITSIO_FALSE= fi ## LORENE # Check for LORENE { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LORENE" >&5 $as_echo_n "checking for LORENE... " >&6; } if test "x$MAKE_S" = "x"; then : MAKE_S="make -s" fi # first check whether LORENE is required and get HOME_LORENE require_lorene=no # Check whether --with-lorene was given. if test "${with_lorene+set}" = set; then : withval=$with_lorene; if test "x$with_lorene" == "xno"; then : HOME_LORENE="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } elif test "x$with_lorene" == "xyes"; then : require_lorene=yes if test "x$HOME_LORENE" != "x"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOME_LORENE" >&5 $as_echo "$HOME_LORENE" >&6; } else as_fn_error $? "--with-lorene passed with no path: please specify LORENE path either using the HOME_LORENE environment variable or --with-lorene=." "$LINENO" 5 fi else require_lorene=yes HOME_LORENE="$with_lorene" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOME_LORENE" >&5 $as_echo "$HOME_LORENE" >&6; } fi else if test "x$HOME_LORENE" != "x"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOME_LORENE" >&5 $as_echo "$HOME_LORENE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi # then check whether LORENE is actually installed in HOME_LORENE # finally output HOME_LORENE if test "x$HOME_LORENE" != "x"; then HAVE_LORENE_TRUE= HAVE_LORENE_FALSE='#' else HAVE_LORENE_TRUE='#' HAVE_LORENE_FALSE= fi if test "x$HOME_LORENE" != "x"; then : if test ! -r ${HOME_LORENE}/local_settings; then : as_fn_error $? "${HOME_LORENE}/local_settings not found" "$LINENO" 5 fi cat >conftest.make <<_ACEOF include \$(HOME_LORENE)/local_settings conftest.make: touch conftest.make %: conftest.make @echo \$(\$@) _ACEOF LORENELDFLAGS="-L$HOME_LORENE/Lib -llorene" LORENELDFLAGS="$LORENELDFLAGS `$MAKE_S HOME_LORENE=$HOME_LORENE -f conftest.make LIB_LAPACK | tr -d '\n\r'`" LORENELDFLAGS="$LORENELDFLAGS `$MAKE_S HOME_LORENE=$HOME_LORENE -f conftest.make LIB_GSL | tr -d '\n\r'`" LORENELDFLAGS="$LORENELDFLAGS `$MAKE_S HOME_LORENE=$HOME_LORENE -f conftest.make LIB_PGPLOT | tr -d '\n\r'`" LORENELDFLAGS="$LORENELDFLAGS `$MAKE_S HOME_LORENE=$HOME_LORENE -f conftest.make LIB_LORENE | tr -d '\n\r'`" LORENELDFLAGS="$LORENELDFLAGS `$MAKE_S HOME_LORENE=$HOME_LORENE -f conftest.make LIB_CXX | tr -d '\n\r'`" LORENECPPFLAGS=`$MAKE_S HOME_LORENE=$HOME_LORENE -f conftest.make INC | tr -d '\n\r'` LORENECPPFLAGS="$LORENECPPFLAGS" rm conftest.make pkg_cflags="${pkg_cflags} ${LORENECPPFLAGS}" pkg_libss="${pkg_libss} ${LORENELDFLAGS}" fi ## DOCUMENTATION # disable doc # Check whether --enable-doc was given. if test "${enable_doc+set}" = set; then : enableval=$enable_doc; if test "x$enable_doc" == "xyes"; then : mkdoc=yes elif test "x$enable_doc" == "xno"; then : mkdoc=no else as_fn_error $? "Please set --disable-doc or --enable-doc only to \`\`yes'' or \`\`no''" "$LINENO" 5 fi else mkdoc=yes fi # check if doxygen is available if test "x$DOXYGEN" != "x"; then MKREF_TRUE= MKREF_FALSE='#' else MKREF_TRUE='#' MKREF_FALSE= fi # check if all the necessary LaTeX tools are available if test "x$KPSEWHICH" != "x" && ${KPSEWHICH} kluwer.bst && test "x$PDFLATEX" != "x" && test "x$BIBTEX" != "x"; then MKGUIDE_TRUE= MKGUIDE_FALSE='#' else MKGUIDE_TRUE='#' MKGUIDE_FALSE= fi #################### FINALIZATION ################################### # Finalization: select output files, subdirs etc. mySUBDIRS="lib" build_exec=no if test "x$have_mpi" == xyes; then : build_exec=yes fi if test "x$use_xerces" != "x" && test "x$use_cfitsio" != "x"; then : build_exec=yes fi if test "x$build_exec" == xyes; then : mySUBDIRS="$mySUBDIRS bin" fi if test "x$use_xerces" != "x" && test "x$use_cfitsio" != "x"; then BUILD_GYOTO_TRUE= BUILD_GYOTO_FALSE='#' else BUILD_GYOTO_TRUE='#' BUILD_GYOTO_FALSE= fi sovers=$(( VERSINFO_C - VERSINFO_A )) sovers+=$FEATURES cat >>confdefs.h <<_ACEOF #define GYOTO_SOVERS "${sovers}" _ACEOF if test "x$PYTHON" != "x"; then : subdirs="$subdirs plugins/python" mySUBDIRS="$mySUBDIRS python" fi ac_config_files="$ac_config_files Makefile bin/Makefile doc/Makefile doc/doxyfile doc/user_guide/Makefile lib/Makefile lib/gyoto.pc lib/gyoto-uninstalled.pc" if test "x$YORICK" != "x"; then : mySUBDIRS="$mySUBDIRS yorick" ac_config_files="$ac_config_files yorick/Makefile" ac_config_files="$ac_config_files yorick/stdplug/Makefile" ac_config_files="$ac_config_files yorick/gyoto.info yorick/yorick1 yorick/setpaths.i" ac_config_files="$ac_config_files gyoto" fi if test "x$PYTHON" != "x"; then : ac_config_files="$ac_config_files python/Makefile python/setup.py python/setup_std.py python/setup_lorene.py" fi if test "x$DOXYGEN" != "x" && test "x$mkdoc" == "xyes"; then : mySUBDIRS="$mySUBDIRS doc" fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= 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 "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCALPKGLIBDIR_TRUE}" && test -z "${HAVE_LOCALPKGLIBDIR_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCALPKGLIBDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_MPI_TRUE}" && test -z "${HAVE_MPI_FALSE}"; then as_fn_error $? "conditional \"HAVE_MPI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_YORICK_TRUE}" && test -z "${HAVE_YORICK_FALSE}"; then as_fn_error $? "conditional \"HAVE_YORICK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_UDUNITS_TRUE}" && test -z "${HAVE_UDUNITS_FALSE}"; then as_fn_error $? "conditional \"HAVE_UDUNITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CFITSIO_TRUE}" && test -z "${HAVE_CFITSIO_FALSE}"; then as_fn_error $? "conditional \"HAVE_CFITSIO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LORENE_TRUE}" && test -z "${HAVE_LORENE_FALSE}"; then as_fn_error $? "conditional \"HAVE_LORENE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MKREF_TRUE}" && test -z "${MKREF_FALSE}"; then as_fn_error $? "conditional \"MKREF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MKGUIDE_TRUE}" && test -z "${MKGUIDE_FALSE}"; then as_fn_error $? "conditional \"MKGUIDE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_GYOTO_TRUE}" && test -z "${BUILD_GYOTO_FALSE}"; then as_fn_error $? "conditional \"BUILD_GYOTO\" 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 Gyoto $as_me 1.2.0, 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 ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ Gyoto config.status 1.2.0 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 # 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_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $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' YORICK=$YORICK YORICK=$YORICK _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 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "include/GyotoConfig.h") CONFIG_HEADERS="$CONFIG_HEADERS include/GyotoConfig.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/doxyfile") CONFIG_FILES="$CONFIG_FILES doc/doxyfile" ;; "doc/user_guide/Makefile") CONFIG_FILES="$CONFIG_FILES doc/user_guide/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "lib/gyoto.pc") CONFIG_FILES="$CONFIG_FILES lib/gyoto.pc" ;; "lib/gyoto-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES lib/gyoto-uninstalled.pc" ;; "yorick/Makefile") CONFIG_FILES="$CONFIG_FILES yorick/Makefile" ;; "yorick/stdplug/Makefile") CONFIG_FILES="$CONFIG_FILES yorick/stdplug/Makefile" ;; "yorick/gyoto.info") CONFIG_FILES="$CONFIG_FILES yorick/gyoto.info" ;; "yorick/yorick1") CONFIG_FILES="$CONFIG_FILES yorick/yorick1" ;; "yorick/setpaths.i") CONFIG_FILES="$CONFIG_FILES yorick/setpaths.i" ;; "gyoto") CONFIG_FILES="$CONFIG_FILES gyoto" ;; "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;; "python/setup.py") CONFIG_FILES="$CONFIG_FILES python/setup.py" ;; "python/setup_std.py") CONFIG_FILES="$CONFIG_FILES python/setup_std.py" ;; "python/setup_lorene.py") CONFIG_FILES="$CONFIG_FILES python/setup_lorene.py" ;; *) 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 "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf 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"` # 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'`; 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 static libraries. build_old_libs=$enable_static # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # 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 ;; "yorick/Makefile":F) oldpwd=`pwd` cd yorick $YORICK -batch make.i cd $oldpwd ;; "yorick/stdplug/Makefile":F) oldpwd=`pwd` cd yorick/stdplug $YORICK -batch make.i cd $oldpwd ;; "yorick/gyoto.info":F) chmod a+x yorick/yorick1 ;; "yorick/yorick1":F) chmod a+x yorick/yorick1 ;; "yorick/setpaths.i":F) chmod a+x yorick/yorick1 ;; "gyoto":F) chmod a+x gyoto ;; 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 # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file, --srcdir, and --disable-option-checking arguments # so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" shift for ac_arg do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -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=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; --disable-option-checking) ;; *) case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_sub_configure_args " '$ac_arg'" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" # Pass --silent if test "$silent" = yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi # Always prepend --disable-option-checking to silence warnings, since # different subdirs can have different --enable and --with options. ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 $as_echo "$ac_msg" >&6 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 cd "$ac_dir" # Check for guested configure; otherwise get Cygnus style configure. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure elif test -f "$ac_srcdir/configure.in"; then # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/configure else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative name. ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 fi cd "$ac_popdir" done 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 ########################## SUMMARY ############################ if test "x$have_xerces" == "xno" || test "x$have_cfitsio" == "xno" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building without xerces-c and/or cfitsio. *** The gyoto executable will not be built! *** Gyoto can still be used as a C++ library and through the Yorick plug-in (although without XML support and/or without certain object types). " >&5 $as_echo "$as_me: WARNING: Building without xerces-c and/or cfitsio. *** The gyoto executable will not be built! *** Gyoto can still be used as a C++ library and through the Yorick plug-in (although without XML support and/or without certain object types). " >&2;} fi if test "x$have_udunits" == "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building without udunits *** Unit conversions disabled *** " >&5 $as_echo "$as_me: WARNING: Building without udunits *** Unit conversions disabled *** " >&2;} fi if test "x$have_boost" == "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building without boost *** Advanced integrators disabled *** The advanced integrators require the Boost library (>=1.53) and a C++ compiler that supports the c++11 standard. " >&5 $as_echo "$as_me: WARNING: Building without boost *** Advanced integrators disabled *** The advanced integrators require the Boost library (>=1.53) and a C++ compiler that supports the c++11 standard. " >&2;} fi Gyoto-1.2.0/configure.ac000066400000000000000000000704511302352257300151120ustar00rootroot00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. # Few bits where taken from pyconf, bearing this notice: dnl Copyright 2012, 2013 Brandon Invergo dnl dnl Copying and distribution of this file, with or without modification, dnl are permitted in any medium without royalty provided the copyright dnl notice and this notice are preserved. This file is offered as-is, dnl without any warranty. AC_PREREQ([2.69]) AC_INIT([Gyoto], [1.2.0], [gyoto@sympa.obspm.fr]) gyoto_test_CXXFLAGS=${CXXFLAGS+set} gyoto_test_CPPFLAGS=${CPPFLAGS+set} AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_SRCDIR([include/GyotoKerrKS.h]) AC_CONFIG_MACRO_DIR([m4]) AC_LANG(C++) LT_INIT([dlopen disable-static]) AC_CONFIG_HEADERS([config.h include/GyotoConfig.h]) AC_SUBST([VERBATIM], []) # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html # C: current; R: revision; A: age # Linux library name is: libgyoto.so.(C-A).A.R VERSINFO_C=6 VERSINFO_R=0 VERSINFO_A=0 VERSINFO=${VERSINFO_C}:${VERSINFO_R}:${VERSINFO_A} AC_SUBST([VERSINFO]) ## Needed for gcc-5, should be harmless for other compilers: # AX_APPEND_COMPILE_FLAGS([-P], [CPPFLAGS]) ## Ensure local build does not have a release soname by default # FEATURES="" AC_ARG_ENABLE([release], [AS_HELP_STRING([--enable-release], [enable a release build (remove -unreleased from SONAME)])]) AS_IF([test "x$enable_release" != "xyes"], [FEATURES+="-unreleased"]) ## An additional directory to look for plug-ins # Default /usr/local/lib/gyoto, only if ${prefix} is not /usr/local AC_ARG_ENABLE([localpkglibdir], [AS_HELP_STRING([--enable-localpkglibdir[[=PKGLIBDIR]]], [additional directory to look for plug-ins [/usr/local/lib/gyoto, only if PREFIX is not /usr/local]. If specified, Gyoto will look for additional plug-ins in LOCALPKGLIBDIR/GYOTO_SOVERS and LOCALPKGLIBDIR before looking in PKGLIBDIR/GYOTO_SOVERS and PKGLIBDIR])], [], [AS_IF([test x${prefix} == xNONE || test "x${prefix}" == x/usr/local], [enable_localpkglibdir=no], [enable_localpkglibdir=yes])]) AS_IF([test x$enable_localpkglibdir != "xno"], [AS_IF([test x$enable_localpkglibdir == "xyes"], [localpkglibdir="/usr/local/lib/"${PACKAGE}], [localpkglibdir=$enable_localpkglibdir] )], [localpkglibdir=""]) AM_CONDITIONAL(HAVE_LOCALPKGLIBDIR, [test "x$localpkglibdir" != "x"]) AC_SUBST(localpkglibdir) ## SIGFPE delivery # AC_ARG_WITH([fenv], [AS_HELP_STRING([--without-fenv], [do not use fenv.h (see BUGS.md)],)], [], [with_fenv=auto]) AS_IF([test "x$with_fenv" != xno], [AC_MSG_CHECKING([for fenv.h]) AC_TRY_LINK( [#include ], [feenableexcept(FE_DIVBYZERO);], [AC_DEFINE([HAVE_FENV_H], [1], [Define to 1 to use fenv.h.]) HAVE_FENV_H=1 AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) ]) AS_IF([test "x$with_fenv" = xyes && test "x$HAVE_FENV_H" != x1], [AC_MSG_ERROR(fenv.h required but not usable")]) ## IS SIZE_T EQUIVALENT TO UNSIGNED LONG? # AC_MSG_CHECKING(whether size_t is the same as unsigned long) AC_ARG_WITH([size_t], [AS_HELP_STRING([--with-size_t=same|distinct|auto], [consider size_t as the same as or distinct from unsigned long (auto). Should normally be specified only if cross-compiling.])], [AS_IF([test "x$with_size__t" != xsame && test "x$with_size__t" != xdistinct && test "x$with_size__t" != xauto], [AC_MSG_ERROR([with-size_t should be one of same, distinct or auto])]) ], [with_size__t=auto] ) AS_IF([test "x$with_size__t" = xauto], [AC_TRY_RUN( [ #include typedef void (* set_size_t_t) (size_t val); typedef void (* set_unsigned_long_t) (unsigned long); size_t size_t_value; void set_size_t (size_t v) {size_t_value = v;} int main(int, char**) { set_unsigned_long_t ulsetter = &set_size_t; (*ulsetter)(25); if (size_t_value != 25) return 1; return 0; } ], [with_size__t="same"], [with_size__t="distinct"]) ] ) AS_IF([test "x$with_size__t" = xsame], [AC_DEFINE([GYOTO_SIZE__T_IS_UNSIGNED_LONG], [1], [Define to 1 if size_t and unsigned long are the same])] ) AC_MSG_RESULT($with_size__t) # PYTHON STUFF AC_ARG_WITH([python], [AC_HELP_STRING([--with-python], [force (or disable) python support])], [], [with_python=optional]) PC_PROG_PYTHON([], [2.7], [4.0]) PC_PYTHON_PROG_PYTHON_CONFIG PC_PYTHON_CHECK_HEADERS( [ PC_PYTHON_CHECK_INCLUDES PC_PYTHON_CHECK_CFLAGS PC_PYTHON_CHECK_LDFLAGS PC_PYTHON_CHECK_LIBS PC_PYTHON_CHECK_SITE_DIR PC_PYTHON_SITE_PACKAGE_DIR PC_PYTHON_CHECK_EXEC_DIR PC_PYTHON_CHECK_EXTENSION_SUFFIX PC_PYTHON_CHECK_EXEC_DIR ],[PYTHON=""]) AS_IF([test "x$with_python" = xno], [PYTHON=""]) AS_IF([test "x$with_python" = xyes && test "x$PYTHON" = x], [AC_MSG_ERROR([Python requested but no supported version found (>=2.7, <4.0)])]) AC_ARG_WITH([virtualenv], [AS_HELP_STRING([--with-virtualenv], [install to a Python virtualenv])], [], [with_virtualenv=no]) AS_IF([test "x$with_virtualenv" != xno], AC_CHECK_PROGS([VIRTUALENV], [virtualenv virtualenv3 virtualenv2], [no]) AS_IF([test "x$VIRTUALENV" = xno], [AC_MSG_FAILURE( [--with-virtualenv given but virtualenv could not be found])]), AC_SUBST([VIRTUALENV], [no])) AC_ARG_VAR([VIRTUALENV_FLAGS], [flags to pass to the virtualenv command]) AX_PKG_SWIG(2.0) # DONE WITH PYTHON STUFF # Checks for programs. ############### CHECK FOR OPTIONAL FEATURES ######################### ## ADVANCED INTEGRATORS # Check for C++11 AC_ARG_ENABLE([c++11], [AS_HELP_STRING([--disable-c++11], [disable C++11 features (including advanced integrators)])]) AS_IF([test "x$enable_c__11" != "xno"], [AX_CXX_COMPILE_STDCXX_11(, [optional])] ) AS_IF([test "x$HAVE_CXX11" != "x1" && test "x$enable_c__11" = "xyes"], [AC_MSG_ERROR([C++11 requested but not found])]) AC_ARG_WITH(mpi, [AS_HELP_STRING([--with-mpi], [compile with MPI (parallelization) support. If none is found, MPI is not used. Default: auto]) ],,[with_mpi=auto]) # Check for boost have_boost=no AS_IF([test "x$with_boost" != "xno"], [have_boost=yes BOOST_REQUIRE([1.53.1], [have_boost=no]) AS_IF([test "x$have_boost" == "xyes"], [BOOST_FIND_HEADER([boost/multiprecision/cpp_dec_float.hpp], [AC_MSG_WARN([Boost.multiprecision not found]) have_boost=partial], []) BOOST_FIND_HEADER([boost/array.hpp], [AC_MSG_WARN([boost/array.hpp not found]) have_boost=partial], []) BOOST_FIND_HEADER([boost/numeric/odeint/stepper/controlled_step_result.hpp], [AC_MSG_WARN([Boost.odeint not found]) have_boost=partial], []) ]) ], [have_boost=no] ) AS_IF([test "x$HAVE_CXX11" == "x1" && test "x$ac_cv_header_boost_numeric_odeint_stepper_controlled_step_result_hpp" == xyes], [AC_DEFINE([GYOTO_HAVE_BOOST_INTEGRATORS], [1], [Define to 1 if C++11 and Boost.odeint are both available] )] ) AS_IF([test "x$have_boost" != "xyes"], [FEATURES+="-noboost"] ) # If --with-mpi=auto is used, try to find MPI, but use standard C compiler if it is not found. # If --with-mpi=yes is used, try to find MPI and fail if it isn't found. # If --with-mpi=no is used, use a standard C compiler instead. have_mpi=no AC_CHECK_PROGS([MPICXX], [mpic++ mpicxx]) AS_IF([test "x$MPICXX" != x && test "x$have_boost" == xyes && test "x$with_mpi" != xno], [ ax_save_CXX=$CXX ax_save_CPP=$CXXCPP CXX=$MPICXX CXXCPP="$MPICXX -E" BOOST_FIND_HEADER([boost/mpi/environment.hpp], [have_mpi=no CXX=$ax_save_CXX AS_IF([test "x$with_mpi" == xyes], [ AC_MSG_ERROR([MPI features require boost.mpi]) ])], [ BOOST_FIND_LIBS([mpi], [mpi], [], [boost/mpi/environment.hpp], [boost::mpi::environment()], []) BOOST_FIND_LIBS([serialization], [serialization], [], [boost/serialization/base_object.hpp], [], []) have_mpi=yes ]) ] ) AS_IF([test "x$have_mpi" == xyes], [ AC_SUBST(MPICXX) AC_DEFINE([HAVE_MPI], [1], [Define to 1 if you have MPI])], [ AS_IF([test "x$with_mpi" == xyes], [ AC_ERROR([MPI requested but not found]) ], [FEATURES+="-nompi" MPICXX=""]) ]) AM_CONDITIONAL(HAVE_MPI, [test "x$have_mpi" == xyes]) AC_PROG_MKDIR_P AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET PKG_PROG_PKG_CONFIG([]) AC_CHECK_PROGS([DOXYGEN], [doxygen]) AC_CHECK_PROGS([PDFLATEX], [pdflatex]) AC_CHECK_PROGS([BIBTEX], [bibtex]) AC_CHECK_PROGS([KPSEWHICH], [kpsewhich]) # Provide additional defaults for user variables AX_APPEND_COMPILE_FLAGS([-rdynamic], [LDFLAGS]) AC_ARG_ENABLE([native], [AC_HELP_STRING([--enable-native], [append "-march=native" to CXXFLAGS if supported])], [AS_IF([test "x$enable_native" = "xyes"], [AX_APPEND_COMPILE_FLAGS([[-march=native]])])]) AC_ARG_ENABLE([hardening], [AS_HELP_STRING([--enable-hardening], [add warnings and hardening flags if supported])], [AS_IF([test "x$enable_hardening" = "xyes"], [AX_APPEND_COMPILE_FLAGS([-pedantic -Wall -W -Wundef -Wshadow -Wcast-qual \ -Wcast-align -Wconversion -Winline -Wabi -Woverloaded-virtual \ -Wno-long-long -Wformat -Wformat-security -Werror=format-security \ -fstack-protector "--param ssp-buffer-size=4"]) AX_APPEND_COMPILE_FLAGS([-D_FORTIFY_SOURCE=2], [CPPFLAGS]) AX_APPEND_COMPILE_FLAGS([-fPIE], [CXXFLAGS_EXEC]) AX_APPEND_LINK_FLAGS([-pie], [LDFLAGS_EXEC], [-fPIE]) ]) ] ) AC_SUBST([CXXFLAGS_EXEC]) AC_SUBST([LDFLAGS_EXEC]) AC_ARG_ENABLE([deprecated], [AS_HELP_STRING([--enable-deprecated], [enable deprecated method names (needing this is a bug)])], [AS_IF([test "x$enable_deprecated" = "xno"], [AX_APPEND_COMPILE_FLAGS([-DGYOTO_NO_DEPRECATED], [CPPFLAGS])])], [AX_APPEND_COMPILE_FLAGS([-DGYOTO_NO_DEPRECATED], [CPPFLAGS])] ) # Guess *LD_LIBRARY_PATH variable for make check AC_SUBST([target_os]) SYS=other DYLIB_VAR=LD_LIBRARY_PATH case "x$target_os" in xdarwin*|xmacos) DYLIB_VAR=DYLD_LIBRARY_PATH SYS=Darwin ;; *) ;; esac plugin_sfx=so AC_DEFINE_UNQUOTED([GYOTO_PLUGIN_SFX],["${plugin_sfx}"], [Suffix for Gyoto plug-ins]) AC_SUBST([GYOTO_PLUGIN_SFX],[${plugin_sfx}]) AC_SUBST([DYLIB_VAR]) # Used in yorick/stdplug/Makefile AC_SUBST([SYS]) AC_SUBST([plugin_sfx]) # Checks for libraries. AC_CHECK_LIB([dl], [dlopen]) # Checks for header files. # We are not using those tests to far # AC_CHECK_HEADERS([float.h stddef.h string.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_CHECK_HEADER_STDBOOL AC_TYPE_SIZE_T # Checks for library functions. AC_FUNC_ERROR_AT_LINE AC_FUNC_STRTOD # other functions we may need to check for according to autoscan: # floor getcwd pow sqrt strdup AC_CHECK_FUNCS([sincos]) ## YORICK # Check for Yorick yorick_exe=yorick YORICK= AC_MSG_CHECKING([whether to use yorick]) AC_ARG_WITH([yorick], [AC_HELP_STRING([--with-yorick[[=yorick-executable]]], [force using yorick and optionnally specify which one [default=yorick, only if found]])], [AS_IF([test "x$with_yorick" == "xno"], [AC_MSG_RESULT([no])], [AS_IF([test "x$with_yorick" != "xyes"], [YORICK=$with_yorick], [YORICK=$yorick_exe]) AS_IF([$YORICK -batch], [AC_MSG_RESULT([$YORICK])], [AC_MSG_ERROR([$YORICK does not work])]) ]) AC_SUBST([YORICK]) ], [AC_CHECK_PROGS([YORICK],$yorick_exe)] ) AM_CONDITIONAL(HAVE_YORICK, [test "x$YORICK" != "x"]) # Only if YORICK available, check for install directories AS_IF([test "x$YORICK" != "x"], [AC_MSG_CHECKING([install path for Yorick platform-dependent files]) Y_EXE_HOME=`echo write,format=\"%s\",Y_HOME\; quit | ${YORICK}| tail -1` Y_EXE_SITE=`echo write,format=\"%s\",Y_SITE\; quit | ${YORICK}| tail -1` Y_INST_HOME= Y_INST_SITE= AC_ARG_WITH([yorick-home], [AC_HELP_STRING([--with-yorick-home=DIR], [architecture-dependent Yorick files [default: the yorick directory if it is under ${exec_prefix}, else ${exec_prefix}/lib/yorick]])], [Y_INST_HOME=${with_yorick_home} Y_INST_SITE=${with_yorick_home} ], [AS_IF([echo ${Y_EXE_HOME} | grep ${exec_prefix}], [Y_INST_HOME=Y_EXE_HOME Y_INST_SITE=Y_EXE_SITE], [Y_INST_HOME='${exec_prefix}/lib/yorick' Y_INST_SITE='${prefix}/lib/yorick'] )]) AC_MSG_RESULT([$Y_INST_HOME]) AC_SUBST([Y_INST_HOME]) AC_MSG_CHECKING([install path for Yorick platform-independent files]) AC_ARG_WITH([yorick-site], [AC_HELP_STRING([--with-yorick-site=DIR], [architecture-independent Yorick files [default: the yorick directory if it is under ${prefix}, else ${prefix}/lib/yorick]]) ], [Y_INST_SITE=${with_yorick_site}]) AC_MSG_RESULT([$Y_INST_SITE]) AC_SUBST([Y_INST_SITE]) ] ) ## DEBUGGING INFORMATION # Enable debugging by default GYOTO_DEBUG_ENABLED=yes AC_ARG_ENABLE([debugging], [AS_HELP_STRING([--disable-debugging], [remove debugging code for hypothetical speed gain])], [AS_IF([test "x$enable_debugging" == "xno"], [GYOTO_DEBUG_ENABLED=0]) ]) AS_IF([test "x$GYOTO_DEBUG_ENABLED" == xyes], [AC_DEFINE([GYOTO_DEBUG_ENABLED], [1], [Enable debugging information gathering code for putative speed gain]) ] ) ## POSIX THREADS # Check for pthreads use_pthreads=yes AC_ARG_ENABLE([pthreads], [AS_HELP_STRING([--disable-pthreads], [disable POSIX threads parallelization])], [AS_IF([test "x$enable_pthreads" = "xno"], [use_pthreads=no])]) AS_IF([test "x$use_pthreads" == "xyes"], [AX_PTHREAD], [FEATURES+="-nopthreads"]) ## UDUNITS # Check for UDUNITS pkg_requires= pkg_cflags= pkg_libs= AC_MSG_CHECKING([whether libudunits2 should be used]) udunits_cppflags= udunits_ldflags= UDUNITS_CFLAGS= UDUNITS_LIBS= AC_ARG_WITH( [udunits], [AS_HELP_STRING( [--with-udunits[[=DIR]]], [Force using udunits2 installed in a given prefix or force disable it.])], [ AS_IF([test "x$withval" == "xno"], [AC_MSG_RESULT(no)], [test "x$withval" != "xyes"], [udunits_cppflags=-I$withval/include udunits_ldflags="-L$withval/lib -ludunits2" with_udunits=yes AC_MSG_RESULT(yes)], [AC_MSG_RESULT(yes)]) ], [with_udunits=check AC_MSG_RESULT(probe) ] ) have_udunits=no AS_IF([test "x$with_udunits" != "xno"], [ AC_MSG_CHECKING(whether udunits2 include path is provided) AC_ARG_WITH([udunits-inc], [AS_HELP_STRING([--with-udunits-inc=DIR], [path to base directory with UDUNITS headers])], [with_udunits=yes udunits_cppflags=-I${withval} AC_MSG_RESULT([${withval}])], [AC_MSG_RESULT([no])]) AC_MSG_CHECKING(whether udunits linker flags are provided) AC_ARG_WITH([udunits-lib], [AS_HELP_STRING([--with-udunits-lib=LDFLAGS], [linker flags for udunits])], [with_udunits=yes udunits_ldflags="${withval}" AC_MSG_RESULT([$withval])], [AC_MSG_RESULT([no])]) # Now check whether or not to use pkg-config for udunits AS_IF([test "x$udunits_cppflags" == "x" \ && test "x$udunits_ldflags" == "x" \ && test "x$PKG_CONFIG" != "x"], [PKG_CHECK_MODULES([UDUNITS], [udunits], [pkg_requires="${pkg_requires} udunits" have_udunits=yes ], [AC_MSG_NOTICE([udunits.pc not found]) ] ) ], []) # Failing that, check without pkg-config AS_IF([test "x$have_udunits" == "xno"], [AC_MSG_CHECKING([for udunits (without pkg-config)]) TMPCPPFLAGS=$CPPFLAGS TMPCFLAGS=$CFLAGS TMPLDFLAGS=$LDFLAGS TMPLIBS=$LIBS CPPFLAGS="$TMPCPPFLAGS $udunits_cppflags" LDFLAGS="$TMPLDFLAGS $udunits_ldflags" LIBS=-ludunits2 AC_TRY_LINK( [#include ], [ut_set_error_message_handler(ut_ignore);], [have_udunits=yes AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) CPPFLAGS=$TMPCPPFLAGS LDFLAGS=$TMPLDFLAGS LIBS=$TMPLIBS UDUNITS_LIBS="$udunits_ldflags -ludunits2" UDUNITS_CFLAGS="$udunits_cppflags" pkg_cflags="${pkg_cflags} ${UDUNITS_CFLAGS}" pkg_libs="${pkg_libs} ${UDUNITS_LIBS}" ]) ], [] ) AM_CONDITIONAL(HAVE_UDUNITS, [test "x$have_udunits" != xno]) AS_IF([test "x$have_udunits" == "xno"], [ AS_IF([test "x$with_udunits" == "xyes"], [AC_MSG_ERROR([ **************************************** *** UDUNITS requested but not found! *** ****************************************]) ], [FEATURES+="-nounits"] ) ], [use_udunits=yes AC_DEFINE([HAVE_UDUNITS], [1], [Define to 1 if you have libudunits2])] ) AC_SUBST([UDUNITS_LIBS]) AC_SUBST([UDUNITS_CFLAGS]) ## XERCES # Check for Xerces-c AC_MSG_CHECKING([whether libxerces should be used]) xerces_headers= xerces_lib= XERCES_CFLAGS= XERCES_LIBS= AC_ARG_WITH( [xerces], [AS_HELP_STRING( [--with-xerces[[=xerces-prefix]]], [Force using xerces installed in a given prefix or force disable it.])], [ AS_IF([test "x$with_xerces" == "xno"], [AC_MSG_RESULT(no)], [test "x$with_xerces" != "xyes"], [xerces_headers=-I$with_xerces/include xerces_lib=-L$with_xerces/lib with_xerces=yes AC_MSG_RESULT(yes)], [AC_MSG_RESULT(yes)]) ], [with_xerces=check AC_MSG_RESULT(probe) ] ) have_xerces=no AS_IF([test "x$with_xerces" != "xno"], [ AC_MSG_CHECKING(whether xerces include path is provided) AC_ARG_WITH([xerces-headers], [AS_HELP_STRING([--with-xerces-headers=path], [location of xercesc include files (without trailing "/xercesc")])], [with_xerces=yes xerces_headers=-I${with_xerces_headers} AC_MSG_RESULT([${with_xerces_headers}])], [AC_MSG_RESULT([no])]) AC_MSG_CHECKING(whether xerces library path is provided) AC_ARG_WITH([xerces-libs], [AS_HELP_STRING([--with-xerces-libs=path], [location of xercesc library files])], [with_xerces=yes xerces_lib=-L$with_xerces_libs AC_MSG_RESULT([$with_xerces_libs])], [AC_MSG_RESULT([no])]) # Now check whether or not to use pkg-config for xerces AS_IF([test "x$xerces_headers" == "x" \ && test "x$xerces_lib" == "x" \ && test "x$PKG_CONFIG" != "x"], [PKG_CHECK_MODULES([XERCES], [xerces-c], [pkg_requires="${pkg_requires} xerces-c" have_xerces=yes ], [AC_MSG_NOTICE([xerces-c.pc not found]) ] ) ], []) # Failing that, check without pkg-config AS_IF([test "x$have_xerces" == "xno"], [AC_MSG_CHECKING([for xerces-c (without pkg-config)]) TMPCPPFLAGS=$CPPFLAGS TMPCFLAGS=$CFLAGS TMPLDFLAGS=$LDFLAGS TMPLIBS=$LIBS CPPFLAGS="$TMPCPPFLAGS $xerces_headers" LDFLAGS="$TMPLDFLAGS $xerces_lib" LIBS=-lxerces-c AC_TRY_LINK( [#include ], [xercesc::XMLPlatformUtils::Initialize();], [have_xerces=yes AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) CPPFLAGS=$TMPCPPFLAGS LDFLAGS=$TMPLDFLAGS LIBS=$TMPLIBS XERCES_LIBS="$xerces_lib -lxerces-c" XERCES_CFLAGS="$xerces_headers" pkg_cflags="${pkg_cflags} ${XERCES_CFLAGS}" pkg_libs="${pkg_libs} ${XERCES_LIBS}" ]) ], [] ) AS_IF([test "x$have_xerces" == "xno"], [ AS_IF([test "x$with_xerces" == "xyes"], [AC_MSG_ERROR([xerces requested but not found]) ], [FEATURES+="-noxml"] ) AS_IF([test "x$have_mpi" == "xyes"], [AC_MSG_ERROR([The MPI feature set requires Xerces. Please reconfigure with --without-mpi or with --with-xerces.])]) ], [use_xerces=yes AC_DEFINE([GYOTO_USE_XERCES], [1], [Define to 1 if you have Xerces])] ) AC_SUBST([XERCES_LIBS]) AC_SUBST([XERCES_CFLAGS]) ## CFITSIO # Check for CFITSIO AC_MSG_CHECKING(whether libcfitsio should be used) cfitsio_headers= cfitsio_lib= AC_ARG_WITH( [cfitsio], [AS_HELP_STRING( [--with-cfitsio[[=cfitsio-prefix]]], [Force using cfitsio installed in a given prefix or force disable it.])], [ AS_IF([test "x$with_cfitsio" == "xno"], [AC_MSG_RESULT(no)], [test "x$with_cfitsio" != "xyes"], [cfitsio_headers=-I$with_cfitsio/include cfitsio_lib=-L$with_cfitsio/lib with_cfitsio=yes AC_MSG_RESULT(yes)], [AC_MSG_RESULT(yes)]) ], [with_cfitsio=check AC_MSG_RESULT(probe) ] ) have_cfitsio=no AS_IF([test "x$with_cfitsio" != "xno"], [ AC_MSG_CHECKING(whether cfitsio include path is provided) AC_ARG_WITH([cfitsio-headers], [AS_HELP_STRING([--with-cfitsio-headers=path], [location of cfitsio include files])], [with_cfitsio=yes cfitsio_headers=-I${with_cfitsio_headers} AC_MSG_RESULT([${with_cfitsio_headers}])], [AC_MSG_RESULT([no])]) AC_MSG_CHECKING(whether cfitsio library path is provided) AC_ARG_WITH([cfitsio-libs], [AS_HELP_STRING([--with-cfitsio-libs=path], [location of cfitsio library files])], [with_cfitsio=yes cfitsio_lib=-L$with_cfitsio_libs AC_MSG_RESULT([$with_cfitsio_libs])], [AC_MSG_RESULT([no])]) # Now check whether or not to use pkg-config for cfitsio AS_IF([test "x$cfitsio_headers" == "x" \ && test "x$cfitsio_lib" == "x" \ && test "x$PKG_CONFIG" != "x"], [PKG_CHECK_MODULES([CFITSIO], [cfitsio], [pkg_requires="${pkg_requires} cfitsio" have_cfitsio=yes ], [AC_MSG_NOTICE([cfitsio.pc not found]) ] ) ], []) # Failing that, check without pkg-config AS_IF([test "x$have_cfitsio" == "xno"], [AC_MSG_CHECKING([for cfitsio (without pkg-config)]) TMPCPPFLAGS=$CPPFLAGS CPPFLAGS="$TMPCPPFLAGS $cfitsio_headers" TMPLDFLAGS=$LDFLAGS LDFLAGS="$TMPLDFLAGS $cfitsio_lib" TMPLIBS=$LIBS LIBS=-lcfitsio AC_TRY_LINK( [#include #include ], [fitsfile* fptr=NULL; std::string file=""; int status=0; fits_open_file(&fptr, file.c_str(), 0, &status);], [have_cfitsio=yes AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) CPPFLAGS=$TMPCPPFLAGS LDFLAGS=$TMPLDFLAGS LIBS=$TMPLIBS CFITSIO_LIBS="$cfitsio_lib -lcfitsio" CFITSIO_CFLAGS="$cfitsio_headers" pkg_cflags="${pkg_cflags} ${CFITSIO_CFLAGS}" pkg_libs="${pkg_libs} ${CFITSIO_LIBS}" ] ) ], [] ) AS_IF([test "x$have_cfitsio" == "xno"], [AS_IF([test "x$with_cfitsio" == "xyes"], [AC_MSG_ERROR([cfitsio requested but not found]) ], [FEATURES+="-nofits"] ) ], [use_cfitsio=yes AC_DEFINE([GYOTO_USE_CFITSIO], [1], [Define to 1 if you have cfitsio]) ] ) AM_CONDITIONAL([HAVE_CFITSIO], [test "x$have_cfitsio" == "xyes"]) AC_SUBST([CFITSIO_LIBS]) AC_SUBST([CFITSIO_CFLAGS]) ## LORENE # Check for LORENE AC_MSG_CHECKING([for LORENE]) AC_ARG_VAR([MAKE_S], [make command which does not print directories [[make -w]]]) AS_IF([test "x$MAKE_S" = "x"], [MAKE_S="make -s"]) AC_ARG_VAR([HOME_LORENE], [path to Lorene build directory (see also --with-lorene)]) # first check whether LORENE is required and get HOME_LORENE require_lorene=no AC_ARG_WITH([lorene], [AS_HELP_STRING([--with-lorene[[=${HOME_LORENE}]]], [force using the optional LORENE library, possibly specifying HOME_LORENE [default=${HOME_LORENE}]])], [AS_IF([test "x$with_lorene" == "xno"], [HOME_LORENE="" AC_MSG_RESULT([no]) ], [test "x$with_lorene" == "xyes"], [require_lorene=yes AS_IF([test "x$HOME_LORENE" != "x"], [AC_MSG_RESULT($HOME_LORENE)], [AC_MSG_ERROR([--with-lorene passed with no path: please specify LORENE path either using the HOME_LORENE environment variable or --with-lorene=.])]) ], [require_lorene=yes HOME_LORENE="$with_lorene" AC_MSG_RESULT($HOME_LORENE) ]) ], [AS_IF([test "x$HOME_LORENE" != "x"], [AC_MSG_RESULT($HOME_LORENE)], [AC_MSG_RESULT([no])]) ] ) # then check whether LORENE is actually installed in HOME_LORENE # finally output HOME_LORENE AC_SUBST([HOME_LORENE]) AM_CONDITIONAL([HAVE_LORENE], [test "x$HOME_LORENE" != "x"]) AS_IF([test "x$HOME_LORENE" != "x"], [ AS_IF([test ! -r ${HOME_LORENE}/local_settings], [AC_MSG_ERROR([${HOME_LORENE}/local_settings not found])]) cat >conftest.make <<_ACEOF include \$(HOME_LORENE)/local_settings conftest.make: touch conftest.make %: conftest.make @echo \$(\$@) _ACEOF LORENELDFLAGS="-L$HOME_LORENE/Lib -llorene" LORENELDFLAGS="$LORENELDFLAGS `$MAKE_S HOME_LORENE=$HOME_LORENE -f conftest.make LIB_LAPACK | tr -d '\n\r'`" LORENELDFLAGS="$LORENELDFLAGS `$MAKE_S HOME_LORENE=$HOME_LORENE -f conftest.make LIB_GSL | tr -d '\n\r'`" LORENELDFLAGS="$LORENELDFLAGS `$MAKE_S HOME_LORENE=$HOME_LORENE -f conftest.make LIB_PGPLOT | tr -d '\n\r'`" LORENELDFLAGS="$LORENELDFLAGS `$MAKE_S HOME_LORENE=$HOME_LORENE -f conftest.make LIB_LORENE | tr -d '\n\r'`" LORENELDFLAGS="$LORENELDFLAGS `$MAKE_S HOME_LORENE=$HOME_LORENE -f conftest.make LIB_CXX | tr -d '\n\r'`" LORENECPPFLAGS=`$MAKE_S HOME_LORENE=$HOME_LORENE -f conftest.make INC | tr -d '\n\r'` LORENECPPFLAGS="$LORENECPPFLAGS" rm conftest.make AC_SUBST([LORENECPPFLAGS]) AC_SUBST([LORENELDFLAGS]) pkg_cflags="${pkg_cflags} ${LORENECPPFLAGS}" pkg_libss="${pkg_libss} ${LORENELDFLAGS}" ] ) ## DOCUMENTATION # disable doc AC_ARG_ENABLE([doc], [AS_HELP_STRING([--disable-doc], [disable building documentation (automatically)])], [AS_IF([test "x$enable_doc" == "xyes"], [mkdoc=yes], [test "x$enable_doc" == "xno"], [mkdoc=no], [AC_MSG_ERROR([Please set --disable-doc or --enable-doc only to ``yes'' or ``no''])]) ], [mkdoc=yes]) # check if doxygen is available AM_CONDITIONAL([MKREF], [test "x$DOXYGEN" != "x"]) # check if all the necessary LaTeX tools are available AM_CONDITIONAL([MKGUIDE], [test "x$KPSEWHICH" != "x" && ${KPSEWHICH} kluwer.bst && test "x$PDFLATEX" != "x" && test "x$BIBTEX" != "x"]) #################### FINALIZATION ################################### # Finalization: select output files, subdirs etc. AC_SUBST([pkg_requires]) AC_SUBST([pkg_cflags]) AC_SUBST([pkg_libs]) mySUBDIRS="lib" build_exec=no AS_IF([test "x$have_mpi" == xyes], [build_exec=yes]) AS_IF([test "x$use_xerces" != "x" && test "x$use_cfitsio" != "x"], [build_exec=yes]) AS_IF([test "x$build_exec" == xyes], [mySUBDIRS="$mySUBDIRS bin"]) AM_CONDITIONAL([BUILD_GYOTO], [test "x$use_xerces" != "x" && test "x$use_cfitsio" != "x"]) sovers=$(( VERSINFO_C - VERSINFO_A )) sovers+=$FEATURES AC_SUBST([FEATURES]) AC_SUBST([sovers]) AC_DEFINE_UNQUOTED([GYOTO_SOVERS], ["${sovers}"], [Gyoto ABI version]) AS_IF([test "x$PYTHON" != "x"], [AC_CONFIG_SUBDIRS([plugins/python]) mySUBDIRS="$mySUBDIRS python" ]) AC_CONFIG_FILES([Makefile bin/Makefile doc/Makefile doc/doxyfile doc/user_guide/Makefile lib/Makefile lib/gyoto.pc lib/gyoto-uninstalled.pc ]) AS_IF([test "x$YORICK" != "x"], [mySUBDIRS="$mySUBDIRS yorick" AC_CONFIG_FILES([yorick/Makefile], [oldpwd=`pwd` cd yorick $YORICK -batch make.i cd $oldpwd], YORICK=$YORICK) AC_CONFIG_FILES([yorick/stdplug/Makefile], [oldpwd=`pwd` cd yorick/stdplug $YORICK -batch make.i cd $oldpwd], YORICK=$YORICK) AC_CONFIG_FILES([yorick/gyoto.info yorick/yorick1 yorick/setpaths.i ], [chmod a+x yorick/yorick1]) AC_CONFIG_FILES([gyoto], [chmod a+x gyoto]) ] ) AS_IF([test "x$PYTHON" != "x"], [ AC_CONFIG_FILES([python/Makefile python/setup.py python/setup_std.py python/setup_lorene.py]) ] ) AS_IF([test "x$DOXYGEN" != "x" && test "x$mkdoc" == "xyes"], [mySUBDIRS="$mySUBDIRS doc" ] ) AC_SUBST([mySUBDIRS]) AC_OUTPUT ########################## SUMMARY ############################ AS_IF([test "x$have_xerces" == "xno" || test "x$have_cfitsio" == "xno" ], [ AC_MSG_WARN( [ Building without xerces-c and/or cfitsio. *** The gyoto executable will not be built! *** Gyoto can still be used as a C++ library and through the Yorick plug-in (although without XML support and/or without certain object types). ]) ]) AS_IF([test "x$have_udunits" == "xno"], [ AC_MSG_WARN( [ Building without udunits *** Unit conversions disabled *** ]) ]) AS_IF([test "x$have_boost" == "xno"], [ AC_MSG_WARN( [ Building without boost *** Advanced integrators disabled *** The advanced integrators require the Boost library (>=1.53) and a C++ compiler that supports the c++11 standard. ]) ]) Gyoto-1.2.0/depcomp000077500000000000000000000560161302352257300142020ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, 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 Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: Gyoto-1.2.0/doc/000077500000000000000000000000001302352257300133625ustar00rootroot00000000000000Gyoto-1.2.0/doc/Makefile.in000066400000000000000000000006501302352257300154300ustar00rootroot00000000000000SHELL=/bin/sh DOXYGEN=@DOXYGEN@ all: doxygen.stamp latex.stamp doxygen.stamp: @top_srcdir@/include/*.h ../include/*.h @MKREF_TRUE@ $(DOXYGEN) doxyfile touch doxygen.stamp latex.stamp: @srcdir@/user_guide/GyotoManual.tex @MKGUIDE_TRUE@ cd user_guide; $(MAKE) touch latex.stamp distclean clean: -rm doxygen.stamp latex.stamp -rm -fr html xml latex doxygen_sqlite3.db @MKGUIDE_TRUE@ cd user_guide; $(MAKE) clean %: ; Gyoto-1.2.0/doc/Makefile.old000066400000000000000000000001331302352257300155740ustar00rootroot00000000000000SHELL=/bin/sh doc: ../include/*.h doxygen doxyfile clean: rm -fr html latex rm -fr *~ Gyoto-1.2.0/doc/doxyfile.in000066400000000000000000001743611302352257300155510ustar00rootroot00000000000000# Doxyfile 1.5.8 # 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 a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = Gyoto # 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 = # 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, 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-Cyrilic, Slovak, Slovene, # Spanish, Swedish, and Ukrainian. 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 = # 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 is your file systems # 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 = NO # 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 = NO # 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 = 8 # 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 = # 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 = NO # 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, C#, 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 EXTENSION_MAPPING = h=C++ C=C++ # 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 make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # 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 to 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 = NO # 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 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 penality. # 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 rougly 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 #--------------------------------------------------------------------------- # 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 = YES # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # 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 namespace 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 = NO # 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 = NO # 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 = NO # 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 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 = YES # 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_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 # 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 define 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 defines 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 = NO # 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 = #--------------------------------------------------------------------------- # 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 # This WARN_NO_PARAMDOC option can be abled 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 = #--------------------------------------------------------------------------- # 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 = @top_srcdir@/include @top_srcdir@/plugins/python/include # 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++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = # 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 = NO # The EXCLUDE tag can be used to specify files and/or directories that should # 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. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem 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 = # 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 = @top_srcdir@/doc/examples @top_srcdir@/plugins/python/doc/examples # 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 = # 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 = NO # 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 = images # 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, INPUT_FILTER # is applied to all files. 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 #--------------------------------------------------------------------------- # 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 = YES #--------------------------------------------------------------------------- # 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 = 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. 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 # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # 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 = NO # 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 # 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 = # 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 = # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # 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 FRAME, 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 (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. Other possible values # for this tag are: HIERARCHIES, which will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list; # ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which # disables this behavior completely. For backwards compatibility with previous # releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE # respectively. GENERATE_TREEVIEW = NONE # 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 # 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 #--------------------------------------------------------------------------- # 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 = YES # 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. 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, a4wide, 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 = # 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 = # 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 = YES # 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 = YES # 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 #--------------------------------------------------------------------------- # 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 stylesheet 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 = YES # 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 = YES # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if 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_RUN GYOTO_USE_XERCES \ GYOTO_OBJECT="GYOTO_OBJECT \ static Property const properties[]; \ virtual Property const * getProperties() const" # 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. EXPAND_AS_DEFINED = GYOTO_OBJECT # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and 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. # Optionally an initial location of the external documentation # can be added for each tagfile. 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. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # 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 is superseded by the HAVE_DOT option below. This is only a # fallback. 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 # By default doxygen will write a font called FreeSans.ttf to the output # directory and reference it in all dot files that doxygen generates. This # font does not include all possible unicode characters however, so when you need # these (or just want a differently looking font) you can specify the font name # using DOT_FONTNAME. You need 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 # 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 output directory to look for the # FreeSans.ttf font (which doxygen will put there itself). If you specify a # different font using DOT_FONTNAME you can set the path where dot # can find it using this tag. 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 # 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 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 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 png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # 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 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 = 0 # 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 #--------------------------------------------------------------------------- # Options related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO Gyoto-1.2.0/doc/examples/000077500000000000000000000000001302352257300152005ustar00rootroot00000000000000Gyoto-1.2.0/doc/examples/example-complex-astrobj.xml000066400000000000000000000056161302352257300224740ustar00rootroot00000000000000 0. 1000. 100. 1.22 0. 0.314159265358979323846264338327950288419716 32 2.0e-6 2.4e-6 2. 0. 0. 0.037037 600. 9. 1.5707999999999999741 0 0 0.001 0 0.01 2. 0. 0. 0.037037 650. 9. 1.5707999999999999741 0 0 0 0 1 1. 0. 0. 0.037037 550. 9. 1.5707999999999999741 0 0 1e-4 0 1 2. 0. 0. 0.037037 550. 9. 1.5707999999999999741 0 0 1e-3 0 0.1 9 1. 0. 1e-2 0. 1e-3 12 0 0 0 0 0.001 0 0.01 10000. Spectrum 0. Gyoto-1.2.0/doc/examples/example-fixed-star-KS.xml000066400000000000000000000023741302352257300217420ustar00rootroot00000000000000 4e6 8 150 In UTF-8 locales, "microas" may be written "µas". 90 In UTF-8 locales, "degree" may be written "°". 0 0 32 12 0 0 0 0 0.001 0 0.01 1e9 -1. Intensity One can also specify a unit (if Gyoto was compiled with --with-udunits): Intensity[mJy/pix²] Intensity[mJy/µas²] Intensity[J.m-2.s-1.sr-1.Hz-1] Intensity[erg.cm-2.s-1.sr-1.Hz-1] Intensity[mJy.sr-1] Intensity[Jy.sr-1] Gyoto-1.2.0/doc/examples/example-fixed-star-minkowski-cartesian.xml000066400000000000000000000026051302352257300254040ustar00rootroot00000000000000 An optically thin blob centered on the origin of the coordinate system, in flat space-time. Computation uses the Cartesian coordinates. 4e6 8 150 In UTF-8 locales, "microas" may be written "µas". 90 In UTF-8 locales, "degree" may be written "°". 0 0 32 12 0 0 0 0 0.001 0 0.01 1e0 0. Intensity One can also specify a unit (if Gyoto was compiled with --with-udunits): Intensity[mJy/pix²] Intensity[mJy/µas²] Intensity[J.m-2.s-1.sr-1.Hz-1] Intensity[erg.cm-2.s-1.sr-1.Hz-1] Intensity[mJy.sr-1] Intensity[Jy.sr-1] Gyoto-1.2.0/doc/examples/example-fixed-star-minkowski-spherical.xml000066400000000000000000000026261302352257300254100ustar00rootroot00000000000000 An optically thin blob centered on the origin of the coordinate system, in flat space-time. Computation uses the spherical coordinates. 4e6 8 150 In UTF-8 locales, "microas" may be written "µas". 90 In UTF-8 locales, "degree" may be written "°". 0 0 32 12 0 0 0 0 0.001 0 0.01 1e0 0. Intensity One can also specify a unit (if Gyoto was compiled with --with-udunits): Intensity[mJy/pix²] Intensity[mJy/µas²] Intensity[J.m-2.s-1.sr-1.Hz-1] Intensity[erg.cm-2.s-1.sr-1.Hz-1] Intensity[mJy.sr-1] Intensity[Jy.sr-1] Gyoto-1.2.0/doc/examples/example-fixed-star.xml000066400000000000000000000027621302352257300214300ustar00rootroot00000000000000 0. 4e6 8 150 Note: "microas" can be written "µas" in UTF-8 locales. We use the ASCII version here as automated systems are not always configured with a UTF-8 locales by default. 90 "degree" can be written "°" in UTF-8 locales. 0 0 32 12 0 0 0 0 0.001 0 0.01 1e0 0. Intensity One can also specify a unit (if Gyoto was compiled with --with-udunits): Intensity[mJy/pix²] Intensity[mJy/µas²] Intensity[J.m-2.s-1.sr-1.Hz-1] Intensity[erg.cm-2.s-1.sr-1.Hz-1] Intensity[mJy.sr-1] Intensity[Jy.sr-1] The subscript "²" requires a UTF-8 locale. A normal "2" can be used instead. 12 Gyoto-1.2.0/doc/examples/example-fixedstar-rotstar3_1.xml000066400000000000000000000015421302352257300233450ustar00rootroot00000000000000 The path is normally either absolute or relative to the XML file, but it is interpreted as relative to the working directory if prefixed with "`pwd`/" : `pwd`/.check-lorene/resu.d SpecificIntegrator: 3+1D integration; GenericIntegrator: 4D integration. 1000. 25. 1.57 0. 1. 32 1. 15. 1.5707999999999999741 3.1415926535897932384 Gyoto-1.2.0/doc/examples/example-moving-star-CS.xml000066400000000000000000000024251302352257300221270ustar00rootroot00000000000000 0. 0.5 1000. 100. 0.78 0. 0.314159265358979323846264338327950288419716 128 2.0e-6 2.4e-6 By using a cleverly pre-computed mask, on can avoid computing pixels that are known to be black. The path is normally either absolute or relative to the XML file, but it is interpreted as relative to the working directory if prefixed with "`pwd`/" : `pwd`/example-startrace.fits 2. 0. 0. 0.037037 600. 9. 1.5707999999999999741 0 6000 0 0.1 50. Spectrum 2 0. Gyoto-1.2.0/doc/examples/example-moving-star.xml000066400000000000000000000023631302352257300216250ustar00rootroot00000000000000 0. 1000. 100. 0.78 0. 0.314159265358979323846264338327950288419716 128 2.0e-6 2.4e-6 By using a cleverly pre-computed mask, on can avoid computing pixels that are known to be black. The path is normally either absolute or relative to the XML file, but it is interpreted as relative to the working directory if prefixed with "`pwd`/" : `pwd`/example-startrace.fits 2. 0. 0. 0.037037 600. 9. 1.5707999999999999741 0 6000 0 0.1 50. Spectrum 2 0. Gyoto-1.2.0/doc/examples/example-movingstar-rotstar3_1.xml000066400000000000000000000016621302352257300235500ustar00rootroot00000000000000 The path is normally either absolute or relative to the XML file, but it is interpreted as relative to the working directory if prefixed with "`pwd`/" : `pwd`/.check-lorene/resu.d SpecificIntegrator: 3+1D integration; GenericIntegrator: 4D integration. 1000. 21. 1.22 0. 0.78 32 1.5 0. 0. 0.03 0. 6. 1.5707999999999999741 0 0. Gyoto-1.2.0/doc/examples/example-oscil-torus.xml000066400000000000000000000034161302352257300216420ustar00rootroot00000000000000 10 0. 1000. 1000. 1.484 0. 0.07 50 1e17 1e17 Spectrum 18. Torus radius: distance from origin to center of torus tube 0.0001 Polytropic constant kappa 1.5 Polytropic index n 1. Central energy density 0 Mode number Only for mode=0, file containing time series of cross section area: t1 area1 t2 area2 ... tN areaN Breathing Perturbation kind, one of Radial Vertical X Plus Breathing 0.15 Perturbation strength NB: if this factor is >>1 (absurd case) then the image looks strange as the perturbation 4-vel is ~ the Keplerian 4-vel, so the redshift distribution (hence the intensity) is more or less random. Always optically thick 50. 50. Increase SafetyValue if you have trouble resolving the surface of the doughnut. Increasing SafetyValue also increases computation time. The default value is slightly more conservative. -1000. 1 Gyoto-1.2.0/doc/examples/example-page-thorne-disk-BL-with-basis.xml000066400000000000000000000027621302352257300250660ustar00rootroot00000000000000 0. 1000. 100. 0.785 0. 1.010152544552210596151553545496426522731781005859375 0. 0. 0. 0. 0. 0. -0.0141477698691514323925400020698361913673579692840576171875 0. 0. -0.01000000000000000020816681711721685132943093776702880859375 0. 0. -0.98994949366116646860547234609839506447315216064453125 0. 0. 1.570796327 0. 101 -1000. Bolometric emission, this is the default (and only intensity) for PageThorneDisk. Gyoto-1.2.0/doc/examples/example-page-thorne-disk-BL.xml000066400000000000000000000011741302352257300230120ustar00rootroot00000000000000 0. 1000. 100. 1.22 0. 0.314159265358979323846264338327950288419716 32 -1000. Bolometric emission, this is the default (and only intensity) for PageThorneDisk. Gyoto-1.2.0/doc/examples/example-page-thorne-disk-KS.xml000066400000000000000000000013361302352257300230320ustar00rootroot00000000000000 Warning: this metric is seldom used and may be buggy. 0. 1000. 93.909936 0. 34.364575 0.314159265358979323846264338327950288419716 32 -1000. Bolometric emission, this is the default (and only intensity) for PageThorneDisk. Gyoto-1.2.0/doc/examples/example-polish-doughnut.sbatch000066400000000000000000000010721302352257300231500ustar00rootroot00000000000000#!/bin/bash #SBATCH --job-name=Gyoto #SBATCH --nodes=4 --ntasks-per-node=4 set -e SCRATCH=/scratch/$USER/run.${SLURM_JOBID} XMLFILE=$HOME/git/Gyoto/doc/examples/example-polish-doughnut.xml FITSFILE=\!toto.fits export LD_LIBRARY_PATH=/usr/local/lib:$HOME/usr/lib:$LD_LIBRARY_PATH export PATH=$HOME/usr/bin:$PATH:$HOME/usr/lib/gyoto/3.0.1 mpirun -n 1 mkdir -p $SCRATCH mpirun -n 1 cp $XMLFILE $SCRATCH/ mpirun -n 1 -wdir $SCRATCH ${HOME}/usr/bin/gyoto \ --nprocesses=15 `basename $XMLFILE` $FITSFILE mpirun -n 1 cp -a $SCRATCH $HOME/ && rm -Rf $SCRATCH exit 0 Gyoto-1.2.0/doc/examples/example-polish-doughnut.xml000066400000000000000000000053551302352257300225140ustar00rootroot00000000000000 4.31e6 This is the mass of SgrA*, in solar mass. 0. 8 The distance to SgrA*. 150 A reasonable field-of-view, about 15 Schwarzschild radii. In UTF-8 locales, "microas" may be written "µas". 90 90° is edge-on In UTF-8 locales, "degree" may be written "°". 180 Put top on top... 0 32 0.9 1.1 2.1 2.3 2.9 3.1 This is what a real-life detector measures. Spectrum[mJy/pix2] This unit can easily be confronted to observations. In UTF-8 locales, "pix2" may be written "pix²". We can specify the plug-in in which this Astrobj is implemented. 0.3 1e-17 g/cm³ is actually the same as kg/L, the default. In UTF-8 locales, "cm3" may be written "cm³". 0.04 0.1 25. Set UseSpecificImpact to use the specific implementation of the Impact() method instead of Standard::Impact(). 0. Increase SafetyValue if you have trouble resolving the surface of the doughnut. Increasing SafetyValue also increases computation time. The default value is slightly more conservative. Number of subsamples to use when computing BinSpectrum. More subsamples is more accurate but slower. Those two are numerical tuning parameters: 1e0 Default (initial) step for geodesic integration 0. No light-ray will be integrated further in the past. Do we want to use multi-threading? 2 Gyoto-1.2.0/doc/examples/example-startrace.xml000066400000000000000000000020421302352257300213410ustar00rootroot00000000000000 0. 1000. 100. 0.78 0. 0.314159265358979323846264338327950288419716 128 2.0e-6 2.4e-6 2. 0. 0. 0.037037 600. 9. 1.5707999999999999741 0 6000 0 0.1 50. 600 800 5 Intensity MinDistance 2 0. Gyoto-1.2.0/doc/examples/example-thin-disk-KS.xml000066400000000000000000000007721302352257300215660ustar00rootroot00000000000000 0. 1000. 93.91 0. 34.36 0.314159265358979323846264338327950288419716 32 3. 0. Gyoto-1.2.0/doc/examples/example-thin-disk-minkowski-cartesian.xml000066400000000000000000000012301302352257300252210ustar00rootroot00000000000000 An optically thin, geometrically thin disk in Keplerian rotation, viewed in flat Minkowski space-time. Computation is done using Cartesian coordinates. 1000. 93.91 0. 34.36 0.314159265358979323846264338327950288419716 32 3. 0. Gyoto-1.2.0/doc/examples/example-thin-disk-minkowski-spherical.xml000066400000000000000000000012471302352257300252320ustar00rootroot00000000000000 An optically thin, geometrically thin disk in Keplerian rotation, viewed in flat Minkowski space-time. Computation is done using spherical coordinates. 1000. 100. 1.22 0. 0.314159265358979323846264338327950288419716 32 3. 0. Gyoto-1.2.0/doc/examples/example-thin-disk.xml000066400000000000000000000007701302352257300212510ustar00rootroot00000000000000 0. 1000. 100. 1.22 0. 0.314159265358979323846264338327950288419716 32 3. 0. Gyoto-1.2.0/doc/examples/example-torus-KS.xml000066400000000000000000000014761302352257300210520ustar00rootroot00000000000000 0.52 1000. 70.33 0. 71.09 0.15 32 2.0e-6 2.4e-6 3.5 0.5 0. 1. 0. 1e-10 20. BinSpectrum Gyoto-1.2.0/doc/examples/example-torus.xml000066400000000000000000000014741302352257300205350ustar00rootroot00000000000000 0.52 1000. 100. 0.78 0. 0.15 32 2.0e-6 2.4e-6 3.5 0.5 0. 1. 0. 1e-10 20. BinSpectrum Gyoto-1.2.0/doc/images/000077500000000000000000000000001302352257300146275ustar00rootroot00000000000000Gyoto-1.2.0/doc/images/ClassHierarch.pdf000066400000000000000000000613071302352257300200440ustar00rootroot00000000000000%PDF-1.4 %쏢 1 0 obj << /Type /Catalog /Outlines 3 0 R /Pages 4 0 R /Dests 5 0 R /AcroForm 6 0 R /Names 7 0 R /Threads 8 0 R /PageLayout /SinglePage /ViewerPreferences << /PageDirection /L2R >> >> endobj 2 0 obj << /Creator (Scribus 1.3.5.1) /Producer (Scribus PDF Library 1.3.5.1) /Title <> /Author <> /Keywords <> /CreationDate (D:20120705201821) /ModDate (D:20120705201821) /Trapped /False >> endobj 9 0 obj << /Length 169 /Filter /FlateDecode >> stream x}MC!uD@󚦛[l~Z]7 J4`4 SZb ^Q.VVUJ5k4u4TH:4#<R1=! 㸫"EOk> (L$`gs~3z~Ͷ?l [y)e endstream endobj 10 0 obj << /Length 553 /Filter /FlateDecode >> stream xmKr0 D:ש2wR4HX~3 FSXSNK*HFeh+ ?72YRJ~y߬jSdN&;#**ę1{Ct@(~0S*Uz#dpE7=L$S~7`8٬Lͨ> stream xڍ;0S0w@j!YxU"dm /r):g W+?r,v'࿺=8q'] f s-n <%v>:s endstream endobj 12 0 obj << /Length 187 /Filter /FlateDecode >> stream xڍұ!p@iעiڤ^uRdJ[dSRΧ<S#B?dnp%dzHdتڀLI>eng1* VW̢Dl"DY2SwwhH:e9C2HR'm.z[~W,2L4'Q] h endstream endobj 13 0 obj << /Length 611 /Filter /FlateDecode >> stream xڍMr >׳PI8OOMeoSV:ٸdID՝ |WTJfPV=^Y pz+Px= aCDgԻRAc :1zf2ZbooL8ƹ3z2kN7L{ߩ78s8(> stream xmK0 D>B#Ry<)rgZ;Y&U&Kmh <4K7Z47oK1  <7^P[/籁I05#> stream xڍr#! sރ L*K ƵaJ,ո9圏v~ÙYߍAF5vU6re4+LuVבQi!d], EA?+i"( V53:2 H2NNfܘ`VHPS{g1p<1dB:={7>acM@eѵ̼=z]n:6`.Sٶ> stream xڅ1B! ཧДRyx1. c K(K&K ɣƌL>g,9Ȋ ,Dj%V`_i~^٘*!$KWV`_b$Gk]-8.v$tWeLN/x/ } endstream endobj 17 0 obj << /Length 457 /Filter /FlateDecode >> stream xڅM#! u #<fߎqH()VOV+ Ýzæ}:.Eht]dcqU4~9so`<+a{,*`рQB:%ʃ ʑXH2Q"$J6Vd,&Ԫa،>$W'|# MZM>8XW\QĔOUTg•^EIMB0Xf櫖*v/qN6PˮZcF ]WS'7e5=Y n` }vD5qclz"fcc:$a/%WEcAc/Q7@} !`jAmqVݟT7X8q>orD"_ێ 9(\R_+agV] Ĩ' endstream endobj 18 0 obj << /Length 95 /Filter /FlateDecode >> stream x324V0P0F@B!1PTr1憦zFF؄YXK¯Ld)̕S4 endstream endobj 19 0 obj << /Length 185 /Filter /FlateDecode >> stream xڅ;0ݧ19KiRAz1VQw*P+Q_>`0x(, 2md\,gfC(,*hg maB=2@͒ނ ~n0j]6oMLs%ӣLV*o2<ʟ0˳>n :0 endstream endobj 20 0 obj << /Length 115 /Filter /FlateDecode >> stream xڅ10НS0w@W}WQ3$da@ $-+#Z6?Jx@9lF&Vi (> stream xڅA!=pADpctoM3|bb^Ԕ%[˚m-XuaJo ̆UF:DZrTC>#d*c5m"?S(Vi#vQU JcdSy83^ktX">fFSW]YBS endstream endobj 22 0 obj << /Length 389 /Filter /FlateDecode >> stream xڅM#1u g5<zvURBW`ǣ35l.3t/ }p2 = *H {U`Bl;dg5 !nG7v2<ʚhjtU[dξaduE7ˆ9E4 5।ȀBMHQVՑݬ8vy ҦjU㥅]sYNL~=ϙO뽓͠?{NQ]f##.de l#9peuA%-zfJ]g"֬&S[IVW˅]wWTSNcicC`zz٭73Ii.^Y]}WT+68Z<'ZPfM1byA?{`j endstream endobj 23 0 obj << /Length 476 /Filter /FlateDecode >> stream xڅ=r0{Bu _!ɤ Y1p8 GZlXp}'ƍ8C-*nזQ ~2S] &8-+|dZDgZ:]~<'SQ/DdW1}gԪ@E(hQDU/r:А6B:{`B8tV WG4ύQn4:c{ L#NBсGP*dG EB1+\zөTFE|g199/˧qfN(;ABގ1'{me##7y ^$AdJ8-Ra1g'TQ]dLk(ajCй*ǺiZ5| %;e1zaae~cUg#Ӻ UyQTuUX;Ujkyq-<rٛ2.*oG@U endstream endobj 24 0 obj << /Length 593 /Filter /FlateDecode >> stream xmK$1Dy\Ȁyj4;HŦ v mĵ49Ev FYȺs;}P5g)$sWOgTZ2#2 2Qs>GFkrQmwWF(5"7 =N'Xϕ H"m%Rǥ|U>L#6{wtqt؞;'݀ k3/j'Vԫ ^ :Н }#CtSc\OACLAXgI'3Ͼakb_,~)tf/Cje/b}A,d8:W{um endstream endobj 25 0 obj << /Length 132 /Filter /FlateDecode >> stream xڅ9 1 ^PBhyBܿ'lEqaR;#xP3·" _-Pbڀ0)TR$פFUK}uRkNE ȓ޼o 5e endstream endobj 26 0 obj << /Length 368 /Filter /FlateDecode >> stream xڅMn 9J'UM■ $u|x~U 哸xL*yFl17hA& oؾ)` 0el'KTTV Aꄲ t }!W0uK+$ E* "9n#~noULp~aBQm2Q/GoMoj0 p@)n&ԯefw3+ ް}{S~gQdE >XJz8@NY #]#, 4s >0)`cm(>)y=SvWݙϸ˚g'>Wp=v;#e7%0B"X'05%h~R endstream endobj 27 0 obj << /Length 202 /Filter /FlateDecode >> stream xڅK! }N!cr?%=ldv#yúo;F+-RUƔK=${O xSTq endstream endobj 28 0 obj << /Length 94 /Filter /FlateDecode >> stream xڍM @ཧpጞg"tm?(j> 2"hgJܨ3Ƀ!!;|vM)>d_Â|m:( endstream endobj 29 0 obj << /Length 629 /Filter /FlateDecode >> stream xڍKn%1Eodj$v}BQgWPpL$5}$?9Bb[&=} u٧_lڨ9SfXr]I q妤Ey$1 +x+Z+}.;NV2bףif)bOhBy=YX=4{2xW yOfhnXsp%go!a)S?D>B?+zY0u9|BE>! Bk&LngPFd(OP,^>gV+g_ ei4<эʳ'Sە7#^I0ռ u>ef] f]ji}VPVBUgr@UKfPo:\3ٺ=d_'ǩ♻`r> ]=H-ہCk/ԯp># Cmu=h-{MWş!UxxNpsEKUW{X~1~m2W07fF ЩǓޘTso^W6w?Uo/>]]?`Kщrwj){^ƽfm3#zMлyF4[\ endstream endobj 30 0 obj << /Length 387 /Filter /FlateDecode >> stream xڅMn u/pTU7smmNr>~/Jd|C/-b2NZ.P+z Wؠ#m $"ّmPPm٧f`sfViGEDrbe21v' dQ;C1_?12]  WgCḅYГPDv;/Sk=z\B_7>+$9o=/vTY&%> stream xm9n0 E{u!Jyir6,XSq&ᦼ7?&}R1LT~Tܡ٣Њe}UH0_l c:g^VUZe3 ŚUHN  Wl/+z1j8'SV="`O-WO*bVqjJA"m܋^и^ƶԢgeyd.a^P:N^DiHsdO&o,Q1T'Tw伷o:^7o8]4a%RaTJC@ QٍOx15Qs{AGto|o_P߮ endstream endobj 32 0 obj << /Length 388 /Filter /FlateDecode >> stream xڍMn 9J/pTU7smmBAQg~V))'􅛇ڸ 9~` a}"t``oȵ֢91BaX9K8]@Ξajz$ɯlV(5t 5YB Bx"OD@x{oč![h $~FVM!K(Pv-QWF&z'fHPt 5җ=3۷dsjašJt27 h N r݇ " Ͻ᠉JߗpX_Ξ,/K'VhFαB:&|^tY2^9-{l>U@~I endstream endobj 33 0 obj << /Length 400 /Filter /FlateDecode >> stream xڍAnd! DH9E)ә4~\6UR L[E]y0j}DϔZ ~qשn)JF{ua1(fRX'ۯ]%: 7frPsO*4'ñƨX}Wyew XOHZHĒ3'1J`Bɘǔo 0y)`tB3luH^ZQuZ3ڿUBv 4ho]НPQeE2뇯h%*?4#(/Ձ;(b4c)ɖJWU>p6gJ㬚}#i9*&ZEk,H ^&TThng:;+:^3E5X|[J+ͽxep*S= endstream endobj 34 0 obj << /Length 296 /Filter /FlateDecode >> stream x}n0<󤪺{UD(,_OڈȭFMaɠ[5NR4KyXսG(Q;Ш cS04KPXI q+\ic˨u83eAQn:R.J2,3>QOgx5X8Oh<{\=(:h2wWg?L,vCN=.,̬wY=f,_If_0}Uq~&am7&c._/LN endstream endobj 35 0 obj << /Length 586 /Filter /FlateDecode >> stream xڍM >ש !8fM c7PIf| hdӼ]y?"IfB.Cd F6*1;+eQ)QYQJ j^ЈxPL#\uɚ2zZMKn+){oNq0LPlK \HS55Wt025M]Ŀsλ#vwHnO_qpp=VMۃ!ijWkW{3&Xߪ/p*!Pn{At s*oqp5K _m B,}$@*i{FsuXWw}-`Ӏ}+ W)Bm.Gf|,T4vQ^,gNdwtb~J?f :*3\Y`c endstream endobj 36 0 obj << /Length 338 /Filter /FlateDecode >> stream x}n! y yfXPֻS_T`?uj+vPρB^t2Q&ro 7(#DB- j7Ņ[F W\vFe XtK^x쪝Q4Y0 {D'G ] yF'z%k{lgaP]'l endstream endobj 37 0 obj << /Length 139 /Filter /FlateDecode >> stream xڍ10НS0w@@K qTu׺CbP,/}"k?]\C"(ܘYA.FYQָ]5O2tQ{J +f?ӈJ-j%"^,9y*x *t] endstream endobj 38 0 obj << /Length 323 /Filter /FlateDecode >> stream xڍKn 9JXc0IUu3IHԱݙ9ՐB,5)d<[5"M)jd8{hhj۷W2[;iE?=tJ^+q 7#&Ab38 &gBQ9x$"TuF1^;lC"/TڛYٯsU0i,$bV> stream xڅ;0ݧ1Uե_K"5MefH'lXUKw!w*f+O}ʹB N( 26 lH.bj_kh@AOlLU}mLE J ?%`;t~.q26faX✳)nR@j)e{5WNFyǭf endstream endobj 40 0 obj << /Length 94 /Filter /FlateDecode >> stream xڅα @ݧpn.繈͆"*P+2҈&3.&d.Z= &\#AOX˫Jg* 6\84 endstream endobj 41 0 obj << /Length 488 /Filter /FlateDecode >> stream xڅ0 w?xAѥᅱ%[A4C |/W^Jg~T.nAIwEeA݄?ؾ[4hZJVCIL{e,jyeǖQV&\\+]Qiqpuu]<߬۟hB endstream endobj 42 0 obj << /Length 331 /Filter /FlateDecode >> stream x}=0"5CP8"!}9h1W'Lg 8,/-:D}Ώ'®F={bP0|fn~a.Vn~hGpl9}3t.n|f9Sg^j,1-Ƅ_,6NTF7)ʨXv[}vOsE;U2KP*suBwυͭr'|mPp endstream endobj 43 0 obj << /Length 370 /Filter /FlateDecode >> stream x}Mn uZyRU5if6|$K%cVĹMZl]Z~(tk^ TQ?ޠ3+58u /#uROueAE~ŎJ҉*+㗵2]D}O8zKu 2& Ɔ4:l;;@e /:4#PR*=[OOόoI^%WkG\rqJS9UҫW=Q:R٬_*F zOTÙ> stream xڍKn0 D>Byzd3NIVZN,tf~MQ1idQ;{;^KymF;&Zx2J:B.&-FodPg=SӾP`<[o}&F^{Ŵ|d#ԍrGpm0, .CJ? ~8^\ݠp6Wvt1> stream xڅ;n0 D{BuNj M߆:M\gid$jk񲐮To\,NT cGy]<-f!OQ43 ,){to*@})RH%Gɨ=DX«2u͎Q1}C2hltz,fgƨCԢLf;$7HrƜÝНyp8l{*f'tWa.r'?| endstream endobj 46 0 obj << /Length 516 /Filter /FlateDecode >> stream xmI0 E><ې2\ ?2 K".&X~*Ͱ6&$_be_8e+s`;M+4*Nd넲Sg@F\ 6`2`1\*O:fψA,DG>;bijc EHAW?넒Y,P.*vt{\ F۫aЦS$yyĭ <=ޙs*Է-<넪kǑYtFCR;ϦdddFwSUv/)ͨG~,g]j9;{pVCݧgȎg)#Ϥލ_|wy[[}e԰A,F3^anN-ֿM58 O󾢨q Z'9JZ;k׹u"E= endstream endobj 47 0 obj << /Length 332 /Filter /FlateDecode >> stream xڅKn0 D>Bԏ:O[JVLb\o;XOG/~Z 2wʍ٪+/4y픪?,,噫5>=rRAzx!l& R TΪq?'" 6:B:h}RFol0H ^Fnbة+: h;hzls:^ت>Yy|e endstream endobj 48 0 obj << /Length 341 /Filter /FlateDecode >> stream xڅ;n0 D{BuGA&oCj3W􃆦ckNnFTH4W&A-X%B3PzVr d PY/10M4Sy0^BlR0/VކXL$T IWb dM.2ӝ6?!h x>Ru+"tnXWQ/OrGN! cc>}(36Uںݗ@h&_0KJ{c#Od;&ƊYp,\bS mȐhAqVDߌ8z#vUos^< wrU[ endstream endobj 49 0 obj << /Length 197 /Filter /FlateDecode >> stream xڅK! }Nẋ`Xlۉeݽ&9=#dLu{yv)Pmh% N#v3 <)\K[P)񌮌-TP">X޺Pv<-lA\dl *5O)Y0|8&.ݘe7^ɝ?_q78 endstream endobj 50 0 obj << /Length 197 /Filter /FlateDecode >> stream xڅ ;OCR`jg-R3%h"*VO"JEeWF},BD6K:Aܣh(&󜀶bq aj5{)Y2eCfT4%S7t}7Ublm/Qq2)vdv]I.Hgۥ< endstream endobj 51 0 obj << /Length 310 /Filter /FlateDecode >> stream xڅ1n! E{NA 6m î&ZK[|3M0c0an>idAJͧ s0j JQجAC6SD V)FlzU?"Z[VxKEoz@#懣؁\Yf\w5-<*vT zzgTydrb {Hl;tn̝z!!.4 *4SXLOY76SDI: n77q\^v@ 0O^3- dsȅ endstream endobj 52 0 obj [ 394 513 235 718 673 671 672 564 717 213 720 581 762 621 717 618 590 643 943 561 522 572 531 547 519 362 547 543 209 206 546 209 824 543 575 574 402 508 321 541 777 547 540 ] endobj 53 0 obj << /one 9 0 R /three 10 0 R /colon 11 0 R /A 12 0 R /B 13 0 R /C 14 0 R /D 15 0 R /F 16 0 R /G 17 0 R /I 18 0 R /K 19 0 R /L 20 0 R /M 21 0 R /P 22 0 R /R 23 0 R /S 24 0 R /T 25 0 R /U 26 0 R /W 27 0 R /underscore 28 0 R /a 29 0 R /b 30 0 R /c 31 0 R /d 32 0 R /e 33 0 R /f 34 0 R /g 35 0 R /h 36 0 R /i 37 0 R /j 38 0 R /k 39 0 R /l 40 0 R /m 41 0 R /n 42 0 R /o 43 0 R /p 44 0 R /r 45 0 R /s 46 0 R /t 47 0 R /u 48 0 R /w 49 0 R /x 50 0 R /y 51 0 R >> endobj 54 0 obj << /Type /Encoding /Differences [ 0 /one /three /colon /A /B /C /D /F /G /I /K /L /M /P /R /S /T /U /W /underscore /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /r /s /t /u /w /x /y ] >> endobj 55 0 obj << /Type /Font /Subtype /Type3 /Name /Fo0S0 /FirstChar 0 /LastChar 42 /Widths 52 0 R /CharProcs 53 0 R /FontBBox [-46 -210 943 728] /FontMatrix [0.001 0 0 0.001 0 0] /Encoding 54 0 R >> endobj 56 0 obj << /Type /Group /S /Transparency /I false /K false >> endobj 57 0 obj <> endobj 58 0 obj << /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0.00000 0.00000 1280.28000 1160.89000 ] /Group 56 0 R /Length 4262 /Filter /FlateDecode >> stream x]Mϯs3b?X aK~NhXY+ b`׽fw5^}Ɨʉ3ݎ_Q[WK]C_5)uը%jVv@wMEr?L%lE7V]>vq7Dz y}rݟOTOWǾh~pn{yR>DY5ĕk+=@WJK-Еg+=ҕʺ ])u%:@Wyu$XWufđ{{<1jn``u@FyA6eTR)Y[gXs2lq7В֕Tg 4sH~7˱o/ٻӉKY!7=X-awwgXraO'Te*ON4b?5elͣoٙI3]:<>%3/tTV6?>幎9~_R?PlDaƑTH~=j4NaӘ}a3H~ZD,\)T({@~:!\C)9sOO¡TjP~F]f-5r.y(@iW;ѓx:*IhdH@]2)p,j tX"t.l5Og @4S$eM9p)370<=lV2ƫkG8KhյV^gFaEY BaRXƋ,V=5*5xɘގa]A3 'VYg]IF6`WT\BU\k]4 gRdA3O߇;nyKEڹ"e\Xsja ;`󮑑~tNkd`ܲ #!ui-]r'?FV[9*ثiI1\|a0t.x5Tätc&)kgl03E5#J,PdeO\eOƑ'9Q=QMʞTJŽ PA((*Qn M  8BQ] ɼOYJAKY4nEk\݊k\ ly0JgѿjR|i xt׍yzwMqMHM-:5#'T(,D)d)RR$@-zQB[Z=ьD c4ֺR$ֺk%zr,uDRo*>hyo'.2S%G!gzjIW@4Me[*a\0NȵrIkYӾy4ҴPJ ˭2vMO0Bb+ t}u%PH\4rbr TdM4Y3Twd Tשo;oGƵ] |o 8&[% şb=P?j(?؀g``(ϩמrK1ԡYaq18E6Ay,V?Xt./Pg*[0.:V&2ZA:uXj035*$+ tR&5eR\g$0YtU$iFTu+ӢNfo*n#׭ZFg#+FFgndGn5Âze{,5de?I$@i wՉ֏đsDt0FFgmO,ت쀌Βg`tVFg'*X6O>?؈Ǝ<΍Ax6~|R U|tj%"JR2GV+YYbdg`;Z bqkX~wTql,Pn9g/4empF8a/+B%\>RZqm͵͸iŴT_rF^#qt Pȧ8]Mi`n 8NW ͆ Ʃqj$8]IfV)4om?qzl^پkHXO@ q"a=UYnn 鴳rWr-50 Ϗ%]3Ej]E&xr,jo9;ki-wm&Gn -!%[BzKHGJH3~=^ lO[|v} 䬯ŗc19Y6pz 7pz c4,.xw +SIF%)ը4UJZطvq} dJ8֔6 蚳t^{=n5/KO4þu :-R0>r6޴zM7޴zMC7::xS>y{L~ H"f_Zwp &ڀqBԜ,-N) %@VݖX57 m_nNSlo,ɤX(ou7߼~7߼~@^SC6T2.PbWb_a5OIm1s+EH帶',NPhl |b8Ek{rO'ʉw[EA\6x;[m~8Ֆubι-{wY(t6NG* <{uqvY.edV::Tjḵ .ޗl,[D;Xz(vJnuNno+3<"a>Y@1\UCvxl2՚}gtœ IOy.޻f{LX mM7AyM7As'ȂlUZR* {2WjIY,zVö[zrO Zq9^M» NڵX(}SM6)om`f-Tysc)%.A@%U KSփ`p%|lc {PNi<Տl־h8:wf:v`۸x⍋7.޺[7wnܽ nT XL o4F~[8Cb g`φ-¾?DYЬ%8Q^s.~/2^ endstream endobj 59 0 obj << /Length 82 /Filter /FlateDecode >> stream x+2T0B gp:9 3444ѳ1s 5DMPRZj^ \4! endstream endobj 60 0 obj << /S /Transparency /CS /DeviceRGB >> endobj 61 0 obj << /Type /Page /Parent 4 0 R /MediaBox [0 0 1280.28000 1160.89000] /BleedBox [0.00000 0.00000 1280.28000 1160.89000] /CropBox [0 0 1280.28000 1160.89000] /TrimBox [0.00000 0.00000 1280.28000 1160.89000] /ArtBox [0.00000 0.00000 1280.28000 1160.89000] /Rotate 0 /Contents 59 0 R /Group 60 0 R >> endobj 62 0 obj << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /XObject << /RE1 58 0 R >> /Font << /Fo0S0 55 0 R >> /ExtGState << /RE0 57 0 R >> >> endobj 3 0 obj << /Type /Outlines /Count 0 >> endobj 4 0 obj << /Type /Pages /Kids [61 0 R ] /Count 1 /Resources 62 0 R >> endobj 5 0 obj << >> endobj 6 0 obj << /Fields [ ] >> endobj 7 0 obj << >> endobj 8 0 obj [] endobj xref 0 63 0000000000 65535 f 0000000015 00000 n 0000000207 00000 n 0000023655 00000 n 0000023701 00000 n 0000023778 00000 n 0000023799 00000 n 0000023833 00000 n 0000023855 00000 n 0000000406 00000 n 0000000646 00000 n 0000001271 00000 n 0000001484 00000 n 0000001743 00000 n 0000002426 00000 n 0000002877 00000 n 0000003371 00000 n 0000003595 00000 n 0000004124 00000 n 0000004290 00000 n 0000004547 00000 n 0000004734 00000 n 0000004997 00000 n 0000005458 00000 n 0000006006 00000 n 0000006671 00000 n 0000006875 00000 n 0000007315 00000 n 0000007589 00000 n 0000007754 00000 n 0000008455 00000 n 0000008914 00000 n 0000009356 00000 n 0000009816 00000 n 0000010288 00000 n 0000010656 00000 n 0000011314 00000 n 0000011724 00000 n 0000011935 00000 n 0000012330 00000 n 0000012594 00000 n 0000012759 00000 n 0000013319 00000 n 0000013722 00000 n 0000014164 00000 n 0000014654 00000 n 0000014976 00000 n 0000015564 00000 n 0000015968 00000 n 0000016381 00000 n 0000016650 00000 n 0000016919 00000 n 0000017301 00000 n 0000017493 00000 n 0000017963 00000 n 0000018168 00000 n 0000018370 00000 n 0000018440 00000 n 0000018545 00000 n 0000022984 00000 n 0000023138 00000 n 0000023192 00000 n 0000023503 00000 n trailer << /Size 63 /Root 1 0 R /Info 2 0 R /ID [<52724A213CE9B8FC234C666966E628EB><52724A213CE9B8FC234C666966E628EB>] >> startxref 23873 %%EOF Gyoto-1.2.0/doc/images/DemoPageThorne.pdf000066400000000000000000000124611302352257300201670ustar00rootroot00000000000000%PDF-1.4 %쏢 5 0 obj <> stream x+T03T0A(˥d^U504564R01z E y\Q6]K L2zF <,=SPM-EbN$^WE_\uk׻ǮMm<1[mN!A%N/*G^|Y$/p ?bUb";s~1yg]:} J,b9_dfmrz絢C74gO7ǃ"f}Ǧ(:GoJSN"֌Y˔^qz ϲ!|$ c'/֭k5ᢽ_Obo \ \ϟUoJj*9lsI6߽_ヷ>=)MpC YL>͞}VEd(yXzUýjyrw&hWU;me[/nCӅOgnPYr9g/~kg7Wq~әҧ{W}ۜ秵ǙOr~B٥ݍƧ3O*pG6Waͻ/չ;ggלR'C6\ghZ7nwܫkkv=(fmnԋ'?IמvU|Ik䫤k!O*Sn8+I4x:VJ<ܽkY<ƽW(kMendstream endobj 6 0 obj 834 endobj 4 0 obj <> /Contents 5 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 4 0 R ] /Count 1 >> endobj 1 0 obj <> endobj 7 0 obj <>endobj 8 0 obj [/Indexed /DeviceRGB 199 (\000\000\000\001\000\000\002\000\000\004\000\000\006\000\000\b\000\000\n\000\000\013\000\000\016\000\000\020\000\000\022\000\000\024\000\000\025\000\000\027\000\000\031\000\000\033\000\000\034\000\000\036\000\000 \000\000!\000\000$\000\000%\000\000'\000\000\)\000\000*\000\000.\000\000/\000\0001\000\0003\000\0004\000\0007\000\0008\000\0009\000\000;\000\000=\000\000?\000\000A\000\000B\000\000D\000\000E\000\000H\000\000I\000\000L\000\000N\000\000P\000\000R\000\000T\000\000U\000\000W\000\000X\000\000\\\000\000^\000\000_\000\000a\000\000b\000\000e\000\000f\000\000h\000\000j\000\000m\000\000o\000\000q\000\000r\000\000t\000\000u\000\000x\000\000y\000\000{\000\000}\000\000~\000\000\200\000\000\202\000\000\203\000\000\205\000\000\207\000\000\213\000\000\214\000\000\215\000\000\217\000\000\221\000\000\223\000\000\225\000\000\226\000\000\230\000\000\232\000\000\234\000\000\235\000\000\237\000\000\241\000\000\242\000\000\245\000\000\246\000\000\251\000\000\253\000\000\254\000\000\257\001\000\260\003\000\262\005\000\264\b\000\265\n\000\271\017\000\272\021\000\274\023\000\276\025\000\277\027\000\302\032\000\303\034\000\305\037\000\310"\000\311$\000\314'\000\315\)\000\317,\000\321.\000\3220\000\3243\000\3264\000\3307\000\3319\000\333;\000\335>\000\337@\000\341C\000\342D\000\343F\000\347K\000\351M\000\353P\000\354R\000\356T\000\360V\000\361X\000\363[\000\365]\000\366_\000\371b\000\372d\000\374f\000\376h\000\377j\000\377m\000\377p\000\377t\000\377v\000\377w\000\377z\000\377|\000\377\177\000\377\201\000\377\203\000\377\210\007\377\211\f\377\214\021\377\216\026\377\220\032\377\223\037\377\225$\377\230\)\377\2331\377\2355\377\240:\377\242?\377\245D\377\247I\377\251M\377\253R\377\255W\377\260\\\377\262a\377\264e\377\267i\377\271n\377\273s\377\275x\377\277|\377\304\205\377\306\212\377\311\217\377\313\224\377\314\230\377\317\234\377\321\241\377\324\246\377\326\253\377\330\257\377\333\264\377\335\271\377\337\276\377\341\303\377\343\307\377\346\314\377\351\322\377\355\331\377\356\336\377\360\342\377\363\347\377\365\354\377\370\361\377\372\366\377\374\372)]endobj 9 0 obj <> endobj 10 0 obj <> endobj 11 0 obj <>stream Gist Yorick 0fvincent endstream endobj 2 0 obj <>endobj xref 0 12 0000000000 65535 f 0000001167 00000 n 0000004859 00000 n 0000001108 00000 n 0000000938 00000 n 0000000015 00000 n 0000000919 00000 n 0000001232 00000 n 0000001273 00000 n 0000003381 00000 n 0000003410 00000 n 0000003440 00000 n trailer << /Size 12 /Root 1 0 R /Info 2 0 R /ID [<47F018736F3B8FCEAA206DAA13C7852B><47F018736F3B8FCEAA206DAA13C7852B>] >> startxref 5032 %%EOF Gyoto-1.2.0/doc/images/RWI_t1822_nu18.pdf000066400000000000000000004200541302352257300175030ustar00rootroot00000000000000%PDF-1.4 %쏢 5 0 obj <> stream x+T03T0A(˥d^U504564RL -Lr ,L p> /Contents 5 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 4 0 R ] /Count 1 >> endobj 1 0 obj <> endobj 7 0 obj <>endobj 8 0 obj [/Indexed /DeviceRGB 199 (\000\000\000\000\0000\000\000>\000\000L\000\000Y\000\000h\000\000t\000\004t\001\007t\002\nt\003\ru\004\020u\005\023u\005\026u\006\031u\b\034v\b\037v\t"v\n%v\013\(w\f+w\r-w\0160w\0173x\0176x\0219x\022;x\022>y\023Ay\024Cy\026Fy\026Hz\027Kz\030Nz\031Pz\032S{\033U{\034W{\035Z{\036\\{\037_| a|!c|"e|#g}$j}%l}&m}'p~\(r~\)t~*v~+x\177,z\177-|\177/~\1770\200\1770\200}0\201|1\201{2\203y2\203w3\204v3\205u4\205s5\206q5\207p6\210n6\210m7\211l8\212i8\213h9\214g9\214e:\215d;\216a;\217`<\217_=\220]=\221\\>\222Y?\222X?\223W@\224U@\224TA\226QB\226PC\227OC\227MD\230LE\231IE\232HF\233FH\233FK\234GN\235HQ\236IT\236IW\237JZ\240K^\241L`\241Ld\242Mg\243Mi\243Nm\245Oo\245Ps\246Pv\246Qx\247Rz\250R|\250S\177\251S\200\251S\202\252T\205\253T\207\253U\211\254U\213\254U\214\254V\217\255V\221\256W\224\256W\225\257W\227\257X\232\260X\234\260Y\236\261Y\240\261Y\242\262Z\245\263Z\246\263[\251\263[\253\264[\255\264\\\257\265\\\261\266]\264\266]\266\267]\267\266^\270\265^\270\264_\271\263_\271\262_\272\261`\273\257a\273\256a\273\255a\274\254b\274\253b\275\251c\276\250c\276\247c\276\246d\277\245d\300\243e\300\243f\302\243i\303\244k\304\244n\306\245q\307\246t\311\247w\312\247z\313\250}\315\252\201\317\253\204\320\254\207\321\255\212\322\256\215\325\260\221\326\261\224\327\262\227\330\264\233\332\265\236\334\270\242\335\271\246\336\273\251\340\275\254\341\277\257\343\302\263\344\304\267\346\307\273\347\311\277\350\313\302\352\316\306\353\321\312\355\324\315\356\326\322\357\331\325\361\335\331\363\340\335\364\343\341\365\347\345\366\352\351\371\356\355\372\362\362\373\366\366\374\372\372\376\376\376)]endobj 13 0 obj <> endobj 14 0 obj <> endobj 15 0 obj <> endobj 12 0 obj <>stream x݇w[ו?z$${;)6"ը.UmYeɒYc[qw%;dfe[{;{~HYfb˦ >{MJ2111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111rZL^褊bZM~INNN*=hbf/)"suZ*TBy M&IhYdS.An(gK1YoE|2!j@|)}/`4aY}F (_>"/TAL\_G'!f0gkh 3|BbOk| |ƫeR $*uT4EX{W|R/>&bhb,>yoG/5*M6/)\xV>g4yxa>q:,/0V1o^L=֛ *}2[MbOhjd)2G3y[jLs&,|]!Mt>K#|';&+GIvBiob$>OK M)U}+7/}.Z26p|O&gեc:RQ!nU=NF ωHE Qʦ(h:$ WE;ܱteRh5*S=I/"_˿ `+=U(¯>\ɚ$%dIͥf1E[}ӆT>!z|t}pOsiL8GK[ΖhUkѤ+)-"4:+O\ #h3%)iZ[9IaRh`؈"d:D(Q[[| /Tx\IE[6SS=Vt7@MV T66Huf # eUT#>))w S6l׵(2Sʄդ!e$)R{{{ LȈg ]x۞L\-=%ӕ?@QY'"0//O$%)P&_U= $W?Mj'ު$x.Cv5j:I:8Yd.3QBH?(PmH]t/W>]g_MV܌lGM^)E$eVL P1&+Qb~%"H%_%~=|1fyv@`6@I]'^̈́_ѹ>bDܤ6Xh64Sf~ 0oSK7jFU XqB(D (I{;/R<`IgMb ݻ^~i֑N& \N;+IZߺf-q(/|։' 'ukJӵ\KWh\fVVYS#y>][5IEa}8] %( hqq9CE#Y>=tpȓ{־ơ6#/7#@Y_4)|B,0M;[)4ʇ84g"?(\}R}?'Ix"r8ni3O6Sղ 4͆I3i¨‹&5–ii5 a*z,KTOD$glR\ֲP]mI\BL4q2-&U~_.h ;/Ql2Yp=]>«gU<<x0:mɊף,++,2%MȃEҤ*SPm9AَjU/}"Pַi0릭|٦jJ di2vwY~>-+'j).QExݨLP3m9bnt>۸Z:fS4&N@R0?I=|0Fqr O;x ~%y8|6qA$Mleܦ4 C`r`p$HxvS7A.wweg')g[S,ӸܷlZ&iIsn261л6q]IGtgV.gY<#u::=|G|&qKMlfYmmlI94ZS53AL% R#p1Cx1Zlj$njt}dž0%YŵU!6)+e^)fzZB>pep:S hUe8΁%N3 ?lYw/@D' Ox:nP mڤ-:G*M؂h&fEQ]M,c$A- ,:\wt;ǯa28݋8VʳGt:G$.W6qj R6-^Ux09aBݐ5d^# >o$|lb ρNO VW)4sMv9جc-lfYiE 6;hW*s|jjx4GheE).,,ѹ qE,Dm $??uMz&t&ܰafF9qԅ1瘚AϚ<=Oq]TyV6Q!ƓoN8yLxbYS[:- : aיh3j `j S oRĉ#NuB}yRP':m['#EgagMpB8.GuKE H9=U^M/6 MxA[.hn"2&9<4M W.1ѿڤ)SIPfK1 OZ7ѵjԙUzѦKY]-mf pPln4 _M(v״o7϶j,Ia^.*΢ Siؗ:32}>2%u5 fM>MvhN'+$ DګVᎣ*_BdTG#zA~n|1+p “d< *u%J׼m%ĭ;aجPmzM/NOiu @Bsh!>I)@K u)镽_vx^\ǛdfFyPbBxbkGt [oufN@&@6Ylj4P·pʹL0\oM,p? eBq)o]a<67@kr=>ufxt:Ε$҂3tYlffj6mZ:ܨ$0U=R&a%0&JFqJ*!.^:g#x@^By6i**HuȳzJ|Frr峣Yϧ/ƽ|&:uЉs~h36ӭ6$06EK'67lSfAʎQ_eNx:D4w-' kOM< k"R<N)s ='ΘtE=%_O'6ɒ*Mҡh`Jo̶6 nqb0+C^h֒Ch d{!>O' 7+< tVe5TgLɝfga%h35&![Emb*ԐnWluu&Ҥf2WU2~B% ,Ux&6&-=“uT8N8Q˦,;cK)mfZj3 lؿۍ{MzD&qBfyy YD >ƎDyd Jx nd# PUpRYN'v]'}e$Ī#,;JD)fJfqUMnwe(4t/Hlb4ۑ&%0ˡg3yypkn.;(x\q>?&Io_Oˀb otzu̲3θmVbj3]ڴ|'w؜c[cxISɷڑ&%Md2gPYYy@ᅂQ _E ? Oz=^g E$ Yl̕::,;cHtMج./ q/7Zo$OvQf%2srԙky<i{Ii+, ;9wWSElkx'؅N,:4θtdbEhP9Z%wiøػdLZOןcsyLIu : 6>NS,;Mc>&uuE~:Ԉ6'ƠMYَ JPX*XdpZWy{ NNZGxo2IdO܃Az+(tRn; -uj2e(ie"N낳gDgsbb>K[:}WTD>U.dz<)H.qXUo**'gg'oJWX9ϊxa[us!}Vi:N}ٙfpFWiH6uY6x=Ŧf!҉^MIM<0VPs}<>~NspPSYVVR,-謪Tt7eNNmٙntF:,8&9x7q[HhD&orV%%&\\gå+Y@TC83j5SR]'l)58 iN:c_O3:H/8i8nn!6BM1 q fa.|n eǀF-seD/ E|ffflllkb<''UL'kEE\IDg9:xi }1=ʄ:L5UմbsbTg6{lJ`S\OffςIxvuα s]wųBه:ssNԖ^V|=M$83Mhsx8Mu׊gE>Y2^'> cqOg8娳J u*?7DGuS6u(EӾ69 &Mi,hLyҕ'l :GxkV96 :ʲ3S4v3Er6uƕgXh߸i Teݩ<ϐs,: KN2egd]NgDZp*M(//V.l)jl6׎&^l'@:GښQgԉԩ:a3Ye٩4v3O‰6j9lgjyn"6m6bm4=dOYߖAxp8 loDNPj;`?߲Tnfe\dMzpL-/ N+6M&N鬥iĸ\gslfܰtj{RM-p0ө.;Lc*LCñۡMzLxݺM4!gYY99:gNIt6 xU]YYY u T'4,SI-3=1&4u(ռz^nJlNol;t68OۥiV<6ls5Mgm]C͖ gttNo; W8]4T44zaݸqi3dlN~L҄ϬshlL9tv $EgMm4LEgL#]Jѧ!X!6D ћսw}-Y.x@sPFut'""l4Й:Nx9) [8*4DzhVl9 -6{$&m>'em&-Egg0HuNMD焓2-;I}LLw3'ǧ!KSׂMۄIhjslV6ɨ*y6ÑP#Oax27YѢڲćiɩn}JŷO3MC/$SڄsiK_G6y$Os9l8-Fө;6ppVTTWiӐCS/Mn6:,6sUK!i q[;99CtIYtVNh샃g(pN)ΉpeiSKz_}\H٨؄GlBRSNG''gfVUl.?)ڐpfeRJz{fS)prXk,:Dž:YVZYdΎ>Si3)'/X8NNCNlLҦ>0[fM JQgttt9Jtޠ5vO<S:̨ g!Nxem"M؜S.z6ά״tw+:VIgSSskGo fgiJgD]83pzR'cS'uslxp@-&LEhC,/}l^2/tR#u7457>6ON=43\b*^vv2ocxz׫$DQ`+-:ntvHںzI Eb/Nt*dIpfi&Iߟ\"u2T:ɬNt643;ɃNS:IR"NKNfP_pgKY%mz¿$n]El:ɱ~/; Y;N]$t½I'$8piHml456D$IJC鬭:3Mrݤ034:#N3ٷlt,Ӑ <f}=?g6ΖE-7S==bYQ[3Q;ѹa|JgNS:i"d_~2UԵDZ Nkp9tH[[6C겳֦6 ˔Np ; 'YUp4 Bꂓښ&-u.nBtNκZN>Mt#޹twMP8i$kȅsvvN9t(>f-DbV8p gP+aN2Ӧ<ۤ:s{JN2J? pZJ"E*8p7|Qu[ksdqy AL]YI]?~tc?𧻡ᔕzaYYItNCc8Lw8Ygi$"qҩuu ' ơio 'h[iy㭱Q|_RJ@7v]<+OKgK+JV:G"<qn 6)N88\W=ra @/Ӑ.A˷ڿ݋@AA%kt&ڵk|JKgΆ瑈n (NxwkSi+P_w[b;/|I5+Nw׶mΥKg7+SSHɩ; ۩*,hW '^OW ,mmU< _`R'^:ХS$_&'4:蜧wv(#JАH$smz8tuxvV8 gcUUIlz+ӌ/WrHkK//-9֖JgoHT?/"ꐵ[FJ9042::6L*Β<fBp-VL5j<81/hK q4A˗&ỺV8-8Csl||qrX8KJr ;oG/~#o#3[ %,;ގ8iliD99Tۺtnꥑz{2$V8'&6  g"&f@j-t&j&8JDmNJD*'dSz^紶+ ׉'srz g;K+1,Iy? t*Ai)b7Dҩuu>$ӛ99#8Du‰8MsvS gr+!21%#WFny^:wb&8ÔN6M"u)"p)]'9at(4 즹 -SGpNɖ!f~4I%8tDD&XJe$ްNDgs_O7}]+"uuR8I zbqnΤ\}#)j^8C%u}T go[]] s2 C|/t=~蔥3GvuI~IqT뗇i 'V΁!}?,?Xop; ?){ҹoߡq}$D'r~E"N':YdA922uuR8hD$[Z釋"9tvV:f#NZ:6#QGGG;׳,8NQ8 pyΡ+ SS3843 pvUIpv NV:8e_z=i1"Ӕ$  &eS֮8gf7nǡ^V8.gE ۩GgjjV1d-HԇJ8y_z=6gL8M_QpUp:Į8m[ǡu~-/eX\^ΣGHs8z?/t3#~<8p~!-8#=lHX8Y윜,S/N%Cty+2'VR8CU:hj;bPF" 3}}XuPqE5WhKNNKNKWs`\ڿ_#ŋZ¿YхMx9d&ؿ6өe_'kN4}F[r941>wu, +Gkq%y(shhΓ'b8zק隓:)NqKN'~92җpO pV4NG-v|$:{ ù\_8ϚSp:[X8\sȱ#Φxq'hRm)GGO2N}]ѱ)3|_7^8yr1 NbscWg8%yvh_p:Nf"ۂ׾ gHtusIlH'=I 8*Z穳N}G޾~ Xf%-x8r$N]=Nk!%u|+% N}u2t8Egvu"2X ƴiǰtn8Mp *8#,:&"?g1C8,9' 8x)?ζs \l&ρ㠓߾>ipZpMaq%'$6}[f|8zL׏!:^<}\)EpĉNzd6钓NsP[u/mNK'n&m;pk#NV:Nun"^idY݂zya.%S$Y.tq-?p>ݎQ&4q&p:iԾ&.4桠 w&KNsߖPk|8v )9׮\87/7ypإS#w8yv'qᬬiL[AY1|G<{s^]t:LD'B3tWxlKZIbbNs<|Uj8͢6-m ^]rZS>ϵwDSuy\7:N#N3alúgz'΁mb uq]d3EUu)a9D/[ZpYvֱpZp Q;t pgD}%gc _,I_NDc3Dq,8^dN8')p~<,9Y\1D7K\chnʼn{pA N}"28mKA9MG~ +YrZ_V?sL8{ gЂsvv2J/h9#$65ܾû\r6d.DDtϞ=~H) :8^h9ueyg ف1ŕM\+M-/~7D'ŹT '-:N^T * 8p6OZqbד]EqbTpNYp%~ia.*Ħs% \+MII_J8i8Ӿ$qMsdE܃ns94|CY{, #f*ѨEs[,㺾4aSۅOo`8JK2Ӽn'6'Xr8cTo\zJJsf:[(Nqqc@LMTIWs)A*~щ8C*-DpQ&{<$9%%8LU綝Vl').kSJWZ:){I%N^$:fsI'M8 3hLNR E `+I/OjOa\ֽ$FM6Mf'=߱aR8_QqҮΌžD}D${uֽ$A2MLNMQŅhĀׂko=zgGuX gbn>W"[WŹ}aƙI;8Ag 8_H.R"?o]:3m4%%GG}>w'q9SLDV/fĮ>΂sCwUUO^Cjԕ[6<kyǂsn3p8_оΖ :Ά3$S%&ILQDN 8e_|a| gWUwROCc~99oǹ#Μp8_܉H1pWΪ T+(a;Ν8'qfċs+ř˳ !qqu9fpF~e8eu3Žq|7:=p8qN$g@,<>ap$#p8_]qYq{m,ܾf!%h^'8s8;68O48] g_ïg8:p<y \ I_0/L8%)3uwͬL_HcwyW@΢7%Nmޱc^Ͽ?7}ƙ51?{Y;?a+! E}daapɣ/߳ yNNmS3Df*Xx2x[ o,XO8k3(\(8bŹ/8+z]Q~*gy8Z =u8OE3tJ87'gܚŞh7p9 ,, -?gfP>WB2gq8Kb9_W3)ws>Vb)ڗjv;ΗpĈ3`pF Ѡ j?Oxԏ8GùgiO8pJqV!7Y.P 6pn E6:ٿ:8k&S%&1uR8m88sęgf gG3 pl8c֙u=Q+!i,yֆsq9G8/0NW8płss.;[iJN's%"Q8so ΅qzLyQq*/?ן=yf3f{Pۮ>|w]<} }uqXp~$:^ ͌+UTyps{bIzhhb}O]㏿":8oƇ3$Xz4ǹivvfzz<0Om%j쵷gP '~-Q+uGd Ώm9$"6m8]'NMgJI{h J/:z>/k8ޱv6g'uq#TΔbuZpҾQ\sZ˒v,8]ᜱxHЕ NY\y=Ptj8STuά𿱼|5r'5;SyMv G~ +;;;˟ 'Su83ҙR~NKuG}<ͩ|y;NzÜ g HvKK '*Nm\G6:xgԕms*8M `g)pn8qpKʌ9%죭0џkJ˩h:NDwpęepN\gI\Zj*tHkzyeAa_JlRgn<ͧr'XrFӗ^㔋eq6:NW}xq_KG[YzI 'ŗ?N 'l8R_`D NF'NVs_/}}-/c;wuk/96NA,z?N'X=ů'ꓭ(5|Tq9qҁ"$9ms.-m |m*8`o 2;Iq-\ 8NS]tZ'"׻j~IEkf7k첦ƍ{O^]]CĦGTNN;NN)J'0yzixWWmQ8DS1Mq /mZpB8Sܴp47Y*'+e"RgO/xp&5Xfs'_~էpJyHIlJxaE5SnϺ<:gqvz:O9ɘ8`8ͯ>}ɹiԻ|z(;''8 i\6a|O]to NpU:̘ͻ:Il_<v]]Ǚgd^t)EELDNo_/;(a/?]$6C/KέpF/~qIY>p8YtΘu5&Ř~f$:Il";w%V#C`Ԣudq^JgLlwbHg7Ӱ) &NT[%>LC'X:]~_P}}|4wL: _z;0;b[yˮq玝vY48ip}.:O_p8e_?zaavf8ϯ+b|ی'P\˻s&ùkuf ip&!HNiYtm\| C_/8cloH $aѣ~!w0X9%ej8 6#.u8Y!3Yi"?aT͈Ngb{qeW8z+"n8W>WpF\tv}D_|e<>w;C1~Z8)Χ_Y$6ˮ.pM}ɩC3򢳳CT]{St:%%UޘOMf*cdb곏DW8 `S$#CY' ⌼ uw J_"؇)Ηy_t&^Ŀe2槗p| ٹyy[JW78F#q*}/Ry_g#Q: rn_HLw Ŝ/1]x8ĻW. N+8rܲoG\t*8E١Q:cRT1|J;@fvS)?a8Orʒ3]$%gHΥq*}=/Oy_#QAvfNf,"q9WԗKdR3qwȡ$W2) f 9gУ.3H"{K$#FLg^7fTks=]]]rJz48iNui=?'ND--q$K?$#FJ(7α1eՏBwqʒ#qgloN~f?Re}]Dt xJgR3#?$J gؖsb '"νԮl$)K$Ix3]] ÙAI8|d/?#3ҙ=iԧǗ8l¹Ό兓CF Օ%[ O" ''s_wN^:2]t(\AL\S&rbp擯fC]az%N|L/'8Do>#k Ntƣ3ܮ|Jrc8{F$U-ǖqh/>]]YrfK޵[: )p}z_08tNm$"87]ҙTۄ|J{~K?wIlNjӹKNSe_ t~t[AR:ˠtfNWK\?x֛ ηM8wgOE |WW~S T Ծށ8h|1+A'|SN:fzyck|LK Kj:)|`S'Ip,]]HRɒpI])'.V:~IpKgSu O jb,IIOϫT ~8|ҥX8 6|0]=tuHzG{;Dt/?tJggљ=AyRwpbM)'Nɓ¹N$szH28PzOWK͛i_go~%yΣ OL:Ό{RRF?tA|W647-a: '|'Ni'48e,Iv]PG"w÷^:.P:s+${|.5,gSiyˤ@l#8/,𡥗^b~}"6)Nb3/ǟfztQN3+ tRHtΟ{;t;NpNlq,lysz,VjhS'6 λ"8m|饃lڥC&Il:uu3l_g8E_#qZ:NKCp^| {?|[VA4&oh>چp//siIN}ᅓLNN]=+K<_/.uSe$BV:q`Ct޼~t. 7o<6RFޝ y+X4u,=a9pK>8?ř񤙮LINKD燿믝K۷sǡLTURtz%޴ͯV_k ?{s?ge$.ӏ>Ip߫#x]=Ledf)QuH:=t:۷jc, xW3)#o»bT6Rs ~RLϧ4ǿyG~sܿw`Sp ˪DX:xwJ'D޾Eub&i,$:Wv'm^J_嗻FD}-|z 8?ݿ} q{ܱbb]=w47]9>au^:U_>J'6OߺqNg{z3))Pyfo-ݯno\QfA-!yOpvyВp99f]Iqفw ߇OOi)c[w['k[ZQ3ѹe'K˷itˉߝqQOX,SCK/ _:{El@t+K' wηt} s'{w U==}I ޙu KS'ѣI‰83p!SYNU6P:AwO<~DpBcto|,ѹut–ȟ9S=Y2|9C 7=wn@d:Ic5EI'Y3M p9\ⴎCpAb$JvIVsmyK_'OtCkgP`{s,8s䂓4{C6IF(9dkQetAC$8O> t~Do߽|gp93|DMMrI ޻M 1!pj"6ա<3-eG̪v[{çOA'؟~7nS@c?:n:Yd6 o^cM]n8ӝBB  8Ntv)>|JدNt%:Ϋg\~BZ|m' w#6]5ux4xR8}ZDnG2#?HtQ租po|Wo]t3jI|7߼vٳ֦[#N^8 pGKK7 'P:AϟptݛܺV;׹NW#U4+/=(G&_8g_#q(rtvYJg𮣗nޔgϟWo-Egmzש*|t~䫧ΚuSm,lΟ'6OҦ6I|i;g#fIZg\.^LP:۹6<{ONwP|WιjԹ~x7ݻw_y dmgql>PnZHLS8cKgKG)NIcx~>w~%yI'<[֨ټ~3gNI$s릥™g™c gq-[: Y:Lt4w+SYv^ؽu*tGF@zi-+klPm޸[hKS XpNln<.846@w)qV:mgX:eczX6vOTu~;Ν+OS>06;*l^vfuMmn<Աpz,(pFXK'I˷?$:St޸Nw|Nt: r\g me=y3'')SSwM<o gt#NNNo<չ霙Wt~?gWS:a{tyҍo66>H-tqƌԡp; D|>A]Y K+ҭΐey]ݻ?3у7Nt2~e#LyK`ynsqeO5T8ݲ΂S8cJol---p_=w.+:_:7:{'Ob<ϲxrHsfym^6$ij m PmҞ5u: kҙS4 /;ݽSt$:?t tOUt64{ԡpzc ;>9:ۥ7Uu†ҩ-sT׹gy_|w:)K[mA4*M湳a&~R8=n 4oIgII|ٮsqQGA'ϪU4h6ѣ'N:yڂS O6GMm 6=nm[b23R3rN,a&ͦsqy_ %3d:'qyTHU3oxS*i/6O>sI)iRGM$fBM\p/7un 8Bp`L;ZcC^N23LgO :/Ck~?o~G<:~[ZZWh3gi6/^$46rb N2 yN[S4M=`锍a&Je8|S{W-sAsډN23?pw(-}&n[$P&Y!i r&ټt<jsq68u9'IӚOjlaf4m :;{m:/: 34>:]ᇯϥ-[ 7ʀLb199V&YR[Ke_ƍMRD$M94dχ!Έ%0Ԧnp>EjtIu6SsR7] vKDt2_ޭ[鼽賡ѧsa.}DH ʬmkk#4'@ƭ[q<&l^mKtQ!I,**2M=!t67:PwXu.ݝ894<3_P?O>csqqě}Ob"Y+ND\f[0@vaB-8wV͜S' ov ͐s@yۢޱ1nM_P?|<ÇJKKI8$2T&ܿaNիlͣG,Yl$f̴ؤM X tص6&G ?r$x)YZÒfM˒|D333KK)S@Ilea$f3=&q-8p™0M=QEL\v6(:;:Olٴirt'թnH36We35:ɜsUa#Ϛ\\ݷ?Hx~7}ɯ~us.5CPWW=KSjhawd\X\2YyX_e6tNl..n cf3d6ߟޝ8Uy W\}Uq%-EMDj%u\Y;K:euUgRө9y.*\WSIT4dxl‚;'/s#<6.:?"A'NkaP < 6#lWVit|Ďzz6+sij<ۻs=<wF_}_<OޅQn]>Q]+A E?h޹}۹4aټq5Zn+wiɬWkkU59fTk@lN+EN'G@ 5^9|:?OpQSze;zA{>F:99y@;w܁0`i>zHt2Ô6{Ͳf}fl '~_ƷL,+}9CM/pW^$G39ҹWNMM}~tDtͻhM)lja3fM]} قuV8ϵCU)Ix$L#5k5OxϿ?3ǿ@(6|N>94̙3S9u-n~hN?iuNy b :=n31<ߠyweP?ŏ{?='O:zCA瑃Ox n1|:2߉|=>SuwS| \sj?7.:?~2KѼ I/;r#Zg[a`ts0oYp~X`P7 Ǘݿ?M& 'kC;w Mx>!6k&m۬#`6CS^N\ޠshlRNNϳ-Xέ-9=x~VD{ Ͽ /U%Ig鿅}\T>2~t0հl_͊*Zml, [p.J~u0I##:霾wO <:;ώ >O:5 >ot ˟]rsg/h(DrǏK虗 = 4݈ 4y>ňfccY-x)|` fsQJ,;g{+uPgos9:G:ݽL:GEgx"O9<'o޼VB '3a?' '|aMe3KS:]ams,ϔ؂s1tϢ3]?S禭{ ΋=惻 >'F4M7mgyجHJڬKڬ&KE{gR"7rLk=iu^xoA͛ϠO=&X=O[{!?Y zݟD>ס{pJfnzn_?Rl2iDyႢ928دMISz=a1al.f)ds>=ONqxU]tNK<;rJt??|iP`OQ<8ok`J& 2h^pᣏ&&& ٿ6AJi撄Nz{:iq%&oڟ$ ʕ+"hzf\ &`,ilNWoQg/v<7L_ JsmGnOB?ݾsK׃'w2?^h>hMY^ך"h+G6R*E^gs:Igwwwb9xxB'l4ϵk'lw !PN6PFOmՃxx|̙32h۷of='MLn6ҕ* :s\:{EgL;O9Pb}ȓ}:::DCOرk.w?LNMMx[dz[x2' ut^u3Ք'K< MM3y|Ot߼mV%,_' OKקe2|:'>(Ai[?.`E -6HFLRӤӣæYI+fsNҙOg횄N7㛻ϩ;]vOg;$-JGp~}3kבեK*9VS^=>+M>#$us7׍%&ovv.2]~Trux4방AT6 g3_w鬮.'~s gφM3vOh}nT>5ںs!&V2W^&YhƧGfUe$[!Yb%(Ag4os292rxg `ڨۣBԮ]怫'jMӬ⁓<͂uKO3yr\t\9t. @ۧPhnTb4 LW;\MC&ьse>:ҝM|n\mY_ w99`J?M.9lUK܏cnJt3{#y' 5ȅBsw G!>r0xcH$ԓ!W0+^^E49>&.f/7ipG4fKuUWw$Ϟ 9x"ZzAS~*@(-UhJ(iK lʔ'f9+O O*[]P:ad)ʻNl4ձkaӹloo# ̮\_k:gyV4x1/$&x: |4+[i L̻rM!AG4& o>6XX9_2F:w4fmn؅p0Э[QljHj}M$2Kӄip'װrs>s :q>߻m۷ O92:|Kvy|]֦zSd6󞁦V13VxA-7lEtґRxK'xnF>Qxm0݂ ~W>|+\OĿآeGj129lULf0NZv^x:Emmk<0s$n­?ᥞ:",Htَ =l9B:Z|S*\h ]؟ӭqߡQWSJ/l#L-Y#fES,\tesΩ=ψ'߱|9+Pl9 tGc(6pqk[:=M4q؄#hsժyfd"w3<'|b!־*>l(wJPEkLˤPi¬6W,dN'yL'KpmvC@ߣvJx\1wKj{4EjФ<cmr؜ߝ,l^9B3 )uE+РSJwkhç(?A@I(%a'H2l64L$Sf345i6o+'P6*C_ήDfxMEh R3oL0 {c|*%8AApU 5 TZЗ!"Pu{/l:7Wmm%W ef C@/9z R=N`f}܃3)m-e.YRRba2m|cs<3kR< ( OU`8(GDž!~i=I^@G2T\$3K|-(+|҇:Wʦ0\{g_L':#/ai33{Hef`ͷ<_bj2NCMak7]3ů%>i4"+\NHM_Ś+ A22,_K;㛸5$ xyA:WצĦ|K"ej'T,D:MԊWtB|?ZVOFUrOdiuCy5|76xfg> y啧i6JKlb|[^*'mOhҬ 'no4߉'̪2߅&|_yNR'L\.@Q,'c-]pJ>dПMΕςfY*D3>3]ЭG~4jT |nvM +)Q>hZ-?P,)I%|@J6] ]w*lL3O@E6~qAѴrhFP>SUnai2Y+YreFtKhåɴ+E$^-|MMVE@0{h^ʒ0k&Z@P_ib++ҩʴr0э&֛ E"^&So%dZR ɬ8)hpLULH^w2$U9 {ii0"fyp&U7ͥNx-ӳ,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,˲,Zf? endstream endobj 11 0 obj <>stream xsW/z s$0gRL $%RD*gRT%9ɒlgsjs֫[zkн eMd ~^k))IFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFby߁LXH^w!#2̆,2:ҧF,26d6h,j^"#Sf#GБ:e6r$O j ϥR,kT3-K) VXXTWZ1z?/o+_6xէVrieb0鈞*L2 L|>0kRo!.Pd"23ɒf,I c6lii!>PiKNNxZ3fffIeb4mW$*ԡ.? PvSkkk>52jR3/h M!3ISY{Qv(Q , vvfboHEy6S7-f=\6d4q' C P<$,HNN[:߬`\OG^4uu8ngfNN!|'/F /z4ClCISʎ2 &\^i)/kif2U֤u3VG'sYӂI/HZ7%lfiFsGؘC08EZ>~=OK:Qu{c2 fffjt(4_AؾRgz:l|x犊X&c\fBr8܉9< nu7>: g6Y<5gxwsclR)ФMsQ$7e7OFWx@ [ZZ/X'fg*!.5nx֑nG_ PMr8 U)yy*f)~+Osج{|T`yLeuSG )Ot ȬdLsߴԹ1-,ѕMW& R'?k>QS?۹[#k48Os (O/婙1rhXa- /:'6cY8r>EӤ\ ^τv(|%<^=|:7^632<1M&0f/ AHA';٦M'/D8)&shppPq3Nߍ|€DNbdKo3dͽ!N;?NOՌrP##}A,bmjqP<,))!Q!}*GYRSR5N(rIs'U` ܢRЉ<t%,kff,*"4aQf :}%Zwut75{ 4wTvq<OZ< O`fdVzl\GEEmmS2{Fp;=LfZm*؅)ЬT+78Oᖊ$Z q3N:_gf Ym-=r&T&a93D7v巘q;N hA>' =YB܏' o,SR(֚b4z #. .!B׮?1L(o/|3!-Rx:Nmkwe:ng6C?I28cG+ߡ>6Նm}wQcQ)f O^QPz-m_52)MKh"$L&g6]RB'+|fAORቫB :NuGjJg~2ab%ͰPDmr"M?Yg>[ sINkf‘놚!Փuu'5 > <]e3O:Q'lv0lC)2mfgGkӯ)x7v:N孛05~(Cy4|[r2ɝD9ENdEuӤ(oB+_Tihl &cae%yp={p{5p\O#~vhwwwOIugVV>vֳz3 Kbt;9::6I֙ʰkK.M2d yf)Y:P֟8i϶:|ӣI-'*ƣΐyRGk4.lL @/L^0X$(ӮkUljP U((=ﳗDe4*OvyVN{(xsm0x#0/'-MbSo\Lb(! =>Juu|;N|64T<4<ӅGb:+đ]|6b-lLi@` *.ke8g(unTx§Zf 3݄𺊏YxHGOh3}v1Q@ywAtfN&ww :;ec_0TTZJltPZfήhʦJi4"*3VuI'YO\"<;{uwT'IuQ37'X'dVg oH&d3?lAK]nު Р<i"2C?##X,J;$r]}]g/9O22Ykg%8HgkN[v;#&2Zt =sM GԦzN;iGF9hiIC%AN&@| <5:򲳕ډ3:Ju&J!t,H7ױ.lot*xЬhdd;iA"9wNTxOK :!\g A+]v?(%33556fhm +Ylo:Cx#<ϯOmeLgSxI M؊ƞ$gT=܂ģdwS6uMK{4T --Q23W)^ZGtf|?Xg.g8Mz*}DF™磛HM&YnNG3 u2UU ';ukuRM:{z|e6d;P8KJHSwǷlCM/)]6ilgwd$7imTg3//XgUM}=N}z4PΘ6ugNxD])ޠK.7iK 44:}>su&΢`t.;8je-|ǘM<(ԮmV39oI*F[N'~"ĩlNth攥325[!^ƆAb..8r6xІuT#Osbu*:8^gQYZYv*{Nu|i2|6 m‚6yWol_7TKWb:0W :A縠6HgYTnV_|6_Ej-fSΦ{ÕM+6v(wLQfvz3BDYv'lV,18 ss3Μ0$٬SmB6s -GzZ.ispt:~-,uƎ'ٰۍ,C gnfiiz-f`Nԡ:iktuu҂)NYރ:=C6|QNKШ٤8ʲ7&:K>Eg)YP ͭxmc5i6hN|K\ёrx'?7Ul6_{1@5͠'NLaPcm4v$K™A g=b9:2 oo]pGz7fiii%55͂ΩqUg-YDqtVUU644vn%K٨3HSUCٓfb3?ͰI'LE5DѹyJBtkueUյ8i2i{H$M]D tͰ:SѹeNgҲriءr:d?N;YTv8mV6p6y6\gUglyggtVT(]ȢSUM_!Rlzfybm$htO):NNK'>ī,DcEg)qF( &l mZ4A E92Ft0Y,t餥352B+Cs\Z8kKp󍳩Su^|vCfYZpbc'{3oti!J'&l^[(9X8Ŧmt6k*P\CsWYTHt#y,U;D~tJQ gff™6p©,8qm7&YS#ܼyrbz鲳tƮD}3BPRgXH ]83ZB46^QKND%N,6OuYKg%)]}}mJs|^q lúi56? .8p>j3)ɓ],ٶtβR}3QkpJg諴dh͂sttNpMhZ[u63 OIN:Fgggu:+++Dvblln Hltʾ9pdC?3'₳\v?xЙMuLON).;**K'oqd|#˫ $8Nz#9}$׬ N(OtmҩYv:kjkeLpH 8CLͤpvww4 \63z:Ap6Eݤg'[N ';IڔINP{:k:;6oQ=5vg )~|9Y:-Q6MSǍ$3|mRA9 :RcgEr㔥3|{ap Si>z50봩6A'+> ǠWsÔN"#!Pg67١)Si>jk'+e ܺuҨWVTtK8CNÆNO4/ℕ'+x<6uks'*sImc'4!J2(-D#QqC^ 'Ik<}@fyq!Vszz96* Q:3E*(Qq(dLl3p::;uM8?/sm_CΝsu 2tWtʑ(\q(>RZCCP8LCxS9ԋ2=ƷOL2뽽~˿_>%%9ʲszz҉lVW)8ՙΡ~I> 啇 W8©ىɛz~dz.63GՅɦ4%I/,vwF}zʲsxjzƾ5vZЩ+=Cj鴇.)RgDpuuu^8aogPm-mcq?q~isyW4\}I DgkxjK'6-[LT_t6S_:Ś"q%5778D 'e DĀlϟ+K*LWeg t*} mmӰt45 NV: 1Y-pJF99zZ+"vfGG2]8IM'?%8tߕmuatbc'3QKS)Uځqg:CDi3utm©_t׭OS~xVTkR~_a(6I:aՕZJ瀾tDV3d&řlM2< N}hasԠ?^A}K*;22 Ic3mt6J'^VKKΊ#! 'i ?R}u nhhW#mqtdh۷m㥳QS:i5)ͬtNg}=d-A]o\8*8 U,pPQ|a?-kKo4vK="Κj'+#;ɾ*ne hps(;Q6 Ҍ- |}GF:oY[[SCqb88}=DF5,٩ 7ɏ>$~wg= dh$S!?p l^v|z>lx>6-s{H.ΆzS[:Ց%&#`qp>|Wo ]84D|k}$LnxΊfEt647uDx?4,r8l>$Nw-ΡqOpb^YklE822ҹc7\~4DrzfbIM @Ogc9::619(a-i}d2hn֕1lGqG"=C?5ٸt0%N}HጀlvZp`sbb,aӾch-S JQqҩMSO?GzotwpIq w&p)SDSZ:wC\طg~fzj,ytVa8e_7K]%4s.~Cw lj<tNQ;56ySC =O$^89NqhpNZWVN{c,7TtqJq! 8i |ڑtR=QufHB<9ya5AO0֎Cccpyixq4ݏãKVlC;/v;@p#8#߰]3mMN8uAi.{$6{ zk8vu1})NZ:XTF"83tZ8NS +8F0+ql+&ds~uV:*FSneS9NY:ՠ(pY]ݽC#6 gkL7z.JBi*rf!NV:A0)k0O '4XrNpOm:+#͸pYOSDK^,;Jt# W#Nþ->Quug{Hpf=X?CTag+WŰHK6V:#Q_wiׇt!qJ,pxWpN K'}x guݎӨ7 }}دaIBq͐8 bW8Uq,<{-"gVN:pFC###*NGEI4'>mrڮNqfbٶNbMI쇰1S׻`?⌰48a)7 :㊱y*kߐq8Nިur)t-KNvVtuV8cYSߛ5/p0F}ݫf//Ԏ:r^V8$KN'Aէz8_GSdix_-I).:]r)斜' |ziTQwNI6+8;NkEĉ ,9 N9ez.V8%畬i3w-ըAIv/:DDaZr2[wlߵx vC񽓸R1f}}-ݝ!vY1"$|S^nny=xIpnAyիOի˚|3qmt} )['7 Nԩ 4v!qbgd48/]z1;κSq;bb_?uуގ8i/:{5NT:-[pCVqpV$(f^ʭ8t8ĉqӠN)q' NTq }·/VpҩND#x/jd'Iΰ{`N8cxSK"&>}ܬ}{IMDm3əL1>% g0ΞA']r>c^rdVV١3h/) NLpJ 9:)d]=>e# cf 6:ĉH`'<΢֮N [s'IZ(8%FIؾ8NkK}NmNag ֳ|308{I9666VS 8]#S3 P8p. grFKo%q ^<^=?84,qI8[8\}~<βOo%qi)!pn#d(DgT1U9p~'{{qb1C_f;.~Fvp JQۿċ,`8ۢ纅L5p(c?M[S8-pExpfmiQ`Ǣ8C&& Ǚ6Z_5!d33ΤqK\8S*;~+ M'~@Wy zn3TgIC8$d$""\r|I4Ξ/wشGJ2Es!N"*8;pk8LBBN3:msNo=NgxIBcbc$39n gJ 5$NN)4y%wTGi<svk8!q&Y1_t8'.FΉI"͍xhkjԵk>ᜊ3J,fp qǏ^q,$0]>>{[VOWLp>_~??'kC%D~ l81aqf^iK|3NFKF;r"-=a#dqh'O488i_qbgt,]?\yi5H8-VS==;q_|NNTqҾ;$LLc7/jq?ǹi,5grJr8Δ8Y_T'"/:9t$,%&^pmNq'iAsb*'9a.'M3mB8ÕN-Nu&g1ot&976:mÉ68Nęq"Nq"8iu31$na&,ɽÉt8'qz8'Eqqqb\23){< k-n}z48şqѩ%=~O?T8m}3 JKF%/޿Źh')ZmQLD gF'N_~Ӵ<7yDG.yiu8)Q Dq :1ά񾙄̬qMKK{s;IgD3^oP7u 8cgDċ-’+9uDȝ$S0h8DiԷiۉyjpƾtVlq8@p~s+8gN%"ܢq}j_Ӵ~WfSj3{#\) 6]D PKaQ-xSqBTj_ޢ8c*I|Sg#H8_|5 6%̴K%Sq_t664(8Cn]8Y4;%%2Bw wvqcKi+8m)KNqFlmnRp }ͤ<8}=Yw:Ij/^'ؤ8޿t]jW.tu˓-9%NLcDOW)o}zl#QRv;Kl^_LIqM]*N+9YnGHEyr󆮯(·Q:3߬gWK{[;wBW6()N u>Atfþe,pAIR2&W} s  ]=N Wx҉G?22bimo-4AŚqwsF]]XrzDUwJRhGҼXp&%!7UϛCō==8}՗n1kp%gP[t}]뺑hˋ8cԹGalٲxJɺN I!poĩ i 8C>}8Yϴt>~Km#]-55%1Τ=R sz/CR8xǡ#Sv Ct9u13vB oqWu$z+gϞ<8)){o33p"Ώ>dpD;Bvuaɉ7N8ccu3@g(}t:8YjF"y5:t \،{{FP8_~9 'ũCuug߯!(pjNK?G߾yښR:Kb-Iɋ¤3ǯj-_~g-V88&6.g}pNn$ܽ}uKg,sqRޟzwҟo. gm N}G..9}_ot'u>}TJ)y1m@v_1yn4J#mtT .Z8)N 8͐I%NtfdAZ:wYUNmOq;܆S-p^p#&9C'Ħ]\azC}=IpL:CtΦ*Iv=4ukHΌӁ͂:]|csaI -%].gmqN~dw%|"X:UEE17$[ڎ_wWwZP1>N!R8?qZڷ9K؊ 'YΠpeWHIM-D'@K2?;ĉ:ҹ{xKg:N|SɏPɋ^P8#xX(KӐf+N̶TSiȮnNuR '+8Y|"Ӈ8x{RRc|+3 [&Ny")wϞ pj!Iqjm8]gp(:nw@ӇHLDbny]Q|P;4TA 'T EV8&\\ܥwupCR:XTF'} )I}+cDq6vm'?0~!DyV:)=6I< ")sq/GR!m]D"l&K2g|7ƥ͛/Nld&,p!Tߪ Z;*XSypx sY-s7G i ^vKk{:JM+Ad0#Ga%nztߤ=ţ}$|Ȁ=¹{~~;ޅfj*8dCFnG"R:/߽ :D&+t& 4vy 3ՙ1`YUŵ`ziޭp"sP8-X8ÌC'.ɮ*'/l#N]/x-X:Ic&DgR#obdjň{BGvW4Hf~_hX8 Hpl2988!Iqr8l>䢳IW:!N҉MEsocEU3e';2ֽFB7̜R[ٝ/z<5~kj8¹W[8'~t(xR 'ⴧ$K涇J25yNdu>uhayyV<*eech׏iln~]MUbM8CtRt>K'|t㼆] 'Z'@ҒvZ}>my?+\gjY(\&69C 'lW g8Ļ:D4q.Nt4{.|G-7_|s+LԲSξdgª\pM(g\}JS 65zb]]4әκ: /h|:IcAu^:ƾex,;337ijգYp>UYl'+vCCg0G"Y_WGt*Sؿ)t&"8<|:Ǝ:K22Xvfnq40-s m.95(NOK}8CpF(tP?tj;<:/Ν;K,;OYpBS':ڄ,.,9\80ɮ>#Qa}=4.?GHcWg7t޽ tn2<2DUU ' ig4܇6CNM~tHCa$J)*t4/Pū7o޹O.ܲ0=FDyUAfmKLmƻsn!pq(8ŽDSS:^ҩ4{EyGйvtazzMl-@Sw,8޻6/6uӪ).#ICz()K'}}Lf"hgάxt<ƚF+~Dp{l 6]:rJlˤp.RiN3t"D!JS7vG1n cUln[8Fm~nejSx39pZlvuIv ?iK'=LֵIʙӨsmxtZhmpҞnD 'řd"v ptow'~.;ܼPyu;kmO)6߾wW'yXsap.G,QPZ(eD|@&GrgnQ]33P$=Bɣ*_vΥ EgWWccqzzwYX=͓khsq Hp;|76 M Q8Xᔉ{jzZNJg}=Є}5vprʲsׂc/] O'ڬl]6o6Oxў=y8G MY8cu/58Q+6'Jaٹrf~y-N9 :7N+ڬ6w86\6/R'65`svۖŦ xW9eSNST:myQ-Lz2ⲓܪra騢?:F'YnVV6^6Ϯǎ 6ISӐަ) D*)=Ȥje!QΠ;>:ou?Ayȱ o^cyӪtp%fkkgMycDZP8V\VҦiV4,Y8cLāKg6vqCT׹x켨cxvvtJ-}|ǵ6WVMJ@SWfAzvwpd4ȥ3Al-^Թ]v;ӹwrӟu> :'&:^/OZ6+*hӧ\Jk'6vTuwniu :B|HYQjyڀhs<3gUyVy'6 6ɝze7jpxXi6tYNlb$N]vs_yTun_|Um*>6 ѦN gq 04zy#TgţPWT~oss ?,ol`sq3*Uy ?A>^INe64 ] 3Wd^?{VLmn ZjʝߵM]93rc,;1vyHyn\Ru6'NϞu"ӧ9299 ;>Bl..[[anO[Ǫ)-2fߦMÂͳgDkTNns+4羻t N\L6]vf㲳ج:'7^{c:}ͪNx,TxN'On2YWo..Cd50li✮Mึmy+h(9 6GG;kjTعR[xS)zbEce'ꬮVusnuδ|͍1pDgLji~'7n@33gAn a\\fϧܾ};ON4Q۳+`QsjmGM=5LȦD՘3qKsagOɋgsNWϿI|./P--rg,';q1.7i֭Hs׮ ͓'O6ϟ' MyΦM6SD8a6zY3'rYq)".!xۺuǎw^\d4Myj\_ i k/8pf@t:)' Q4vY[#l:ϜtFcc-< O'[h+lWpxV.sdjJWqgY\#4/\XMЬfJ Ij.8=|LJ07xyuœnsnt^~SѹrrvvfԩSK?ӏSߺuܱi Цrl5YJG@..sjfD1`9&щe4t9S:Mj/8H oa^b_DgYtiuNU'iXB;Ï?o?c|2)Ю&5jWM &0fgfvܹTib/p9&g 66'&T!IpZl6o=q6aD0W:4:oN2JlNtJKu:U_(<9Acc],MujjմҴtuQI5;; 2w.,,.3xBŋ͵5<,DlM`3Kc#f)d Nlӹ b=X 3KˉNg{;]&Kϻ'믿>]ó0й165B$\N .sA)@see. el;M&n@RnM$Ѧ \p[=yF\-Z7A'C\'m"ϪF'w9o'Xsel_MMR,!ɧ̮]xR>r!&s˗/\TiL`Ӧi6SS'ڴ˦XQtҩ۱|K&v, σSx~7ϧxvjx=Q%\Y Ф2<4W&Ht^:E o633II6M!]L`3bcsǎeo&=l^oȳD9w|WgO1D)9277 u+P̓D5JeyѼ|<4M҇lf:)ڤgo2f %,8'4V3NuJ9t^IlB+xtsd>ϟ=#Eyr]JP^eO'0Q&_%Kx;W/^x{O={\Sr158Ȑs*yʕ+D& a4aV_Yh(-لegM li:6NQu./!ѹ4992"yV{' 3]zEpi[A>sPQ&xTe^vUChs` M pj3.isղ謪b:T}Ӌ T%ԉ~OCiJrܼI`D1 4ϓJiMOlhK',λ& 6S)LYNlx;g}UU)gVyv+>? y!cROۘ[w1%J\ zɤ89MpI+95IId - NtI"Nɝ;Nڏd NgfffV峩J;v&)TC. ۴%"/_`4EzŲId-] I2t"\4v4ӹgIF"gf&|!(sؙ6k;GGGFPDyڵJX[{sR5qI{9TP4e֭"͒t&t]MeBt6s6%uޑuFxYIy*:Yk&:]ΓOgn.ke>O턐s১C篩Qw<5&گoDxE9ZܧIyXNl\^z* @.\ڽ{791114ԩ[CScEfr2i̐6_iȃgZYQQA읚đH DJ,;͝ il|O;rAix/BSs,/HSC3uWG\HHb+ T=Ujϡ{_67H@~ޙ3YUd9GnF_rs1w^S9;{=iA5g ١k/]{ ׯm(9^W0ҽf %SsN33WXt\^W)!Ίs`vܼ<gOQ%CI=GyzyDǁ}%b: jXs86 n3&R@vevn^LLzr|LvF=?znt~."gL jcX<|xïx-ʙL͹f!6/I9-KU}&ԄcgD;N7'홞/^Ϟ==ύgBMA 5 %]|DZ$-]hjA2Oͪ̓h 7vJ{3Nׯ熏O*L] ? &)O)1 14%2OVܤW|enN譯+vk;ۢ'}GvXwvE?UX)QL™9ǤfOPt1-CVk 'MI[_Waz;IoSC4i~]QPzX]4zYYb95"3W)5VCx vGjҾIz$;Lϟ~R=Ͻ]zK>X|weAM> 9SUZ&撮p)H&_Pl7'w3ݠ}֓8Oz[]QynP?_KzͬsIf^37+6<7sI{s}]3y-ѓ僟ԝ<ڗu%5ToƲBiu)Cp4ӧ#r=w3ġf]J: 9꒒ o'{B؏s]q8x_J7qrZA05sraF>ؒH/; 󋃃Ga)у( v{Z9MLBBӔl)๚Fj^=R)uEedޙ):F5m55[Pb#vOM7~r˒UPn;CiȦAO]r^1+ijRcha5/- I,#|g,}>s,N>wZXw^2mofқyԿ< 5/&VOqٌzzkϾYt{۞?Ұٓxu;mY5g yqٌx?btK֌ufN~fSu3+933頛@ .#-/r5q&'qFɚ>ߐOo薭i%˜q MRV[j͋δBt\˦nLhb(+rfdb&5-cMQP*NNg(}43TST?g E9W df M&*y=ҌzzL43U?gMJ4ljIfJ'貪)H͏i4gT 1.J}~ThjdfIr˳PcY~vԙn$rP C[䱩w뾞S̵i ^S ijbf]h.8c%yQ?yk~V 6l&<Ji Fnmd\q>bRWm}OR0f%4WMbg\rIߴ*Bӂ?ShhpiZ|&y 6q71/! z0o t)¬ ZKڒGbQ>stream xw[G/zFs9 ,&%*PDRT%*`E[-[rnOힶ=g]ou[z{:A<(v}?޻vb=OͶҟOeFQY2 /L0%R#R/U ^j2іF M%$LcɦPYS4+*!'!Lh2fDq8%$ %R\ _Dೱb͒L1nTB`hKJ/A Е*;B&d2L%`)%&b7%EYoj@mj@RQ4$Bf"Lԥ1&.N&d 74.U@Uhh4 2Q()5L1^,Q h^B|s&~d:L(UCvmEʆ{ @i,T>UxfVq1eee$GnM&hD,|XcbѶ;{|.UY3a4J**Q 2$SAb|l ře>#UvͲ2NanLH,oqql\rP4hHv$z?OfcxleH]K6uu0)hged&)Z?eP|?ߖʊhb3M~(?:-j?liP#\z&j>sss 9:Y_{d)YtBX<@%&2i't+l9"=%-R<1Ӵ*)D>SRRҴY^ܬ\U%ډ65 qqlƘήKH'L<+_mfl͘Ѥ34_6CxRDw/K_efFaalFUW + -4dص򙙙_G~*&d/lFHֹr',g;ll̆/fYJ$fnFe3;{vy \%SmH0PFKKKsx!^X<ڳV<~XK/,JNGateHZ~D4 I >d33xW7)k=rlZ D+avu.w0RцO fI'oJZO,-d H2{ E5uMcgVOhϴ'kGyvR#Ϩ͂"cKbM kfWutk>N( :Fv'݅A♑[:*k4h`37^Ns@Y1J#U#к:ڸg@ty(o%R/ߢr,.іf̞^Jd{;I<ô(ޘMM34F\!x&%It6O\utպs ,DɖZ:94D48ͮI&q.!nsH{_-WO|m %qg,Dv'^]on%ڈf3l&ƇnSi%8Mxd?b\֦Cm֢gq:+*6 =1$'_Ok lt$:ݭ: #d wyw'&fv[ZM1Sxn(,`:Uk_6s$R&d&noDĪS擒dabX"gHt8Laҙ }t}U ,,di0=xJ+EsGãV9zomG#vڈP>'> %<33qd鴫C2ii` ;d̦Iǁt8\E]&lh t \=?Ҩ$S?}^_03#%%I晀G/esFLKPld[h2] u#pA[eeEkb ]1O|"O|!7 :SN˩{fRb(6ss]!*7/2ɤpIOO TJ j֣M|ɅvI'*Úi992OM晊;tšV\}!fb\H6emtf A֙&dI@-浔JN4L7ߥLEپs2I'Ɂtf^^v3jGiUh3l!1c?G笛3`rLL\_$ESJdžwS׶@𻘍X>gy!"x"-.wdYgV6Nu.I͵`= tl+%|4qYe2YسSaIIv׫Ǔ(qM m4L8>[::[# \AHMNsu4!OPrUU!lgLmM:%JFdl Rfsݺ~#̦^5u0񢉧 1aǬl)'K3p~g>%l"OzLa:4:'sEC άTPWj6jM< /M4g`L ]VIC7Oڗ+ں#g;;DϴVggk6;&nnm{-kdsib`WRxv#[{eYuJN܌wyT}"=#22lI S&Lg-]*+Ix 9OIOPڝΪ*NR) z :phM=s23M,ݘٔ[|OgspP\ti:3uUT6SJrEj_6ٽf۬7&&!!33_?x2t$LIGe99źNVԪlyzP/eM^6iI-}MdYgoo(tyNvT.$tBcgN8syZS'C]mrrK$HuNIgY̠s?Nq|tegҹ,i(+XSw:vn"ֻf)gӃ:{:[LS 8Igi</rz C8zZZ4ƻ qTlZ:d::wY'!Xed: ː'9:KJ 37,SUcv8 k҂Lwyل©īmdtRk_7A0 /ii8NJgt 6 i Nfl՘l&+dЙ/Z:ZM'rNOOR=qMz™Λ:.8qI~&6 1%f𻅬dg>O;hr \g8SZpfl gzcӸgfsU A:Yki]f֙kIΊԩ2N[T76 N6uEk&$vۨKYtuegu]47v5E-` gt(C}łt6*KK׈M*tv:3'K'4J鳱gU g NIod*a~~nZ{Ayy}slDYSA:ss|,--a&Z+V8@oo$C{S؄fV=ès鄏䭳7NC\}'xL M"&QY@6SS׊͘|] ufgpN*Z;!N٩x7mm6Cy4HllRs|鄑=?7P:AIP:Kn$8{{;q!pj6fQffΑqMguN]Ψ$986[1KaI6IԙO:M:=ͤP^vȍ4N3R8pvv.f!i؀+Ί"Q;D.tF3!lmZS8'n͢,}_{6rIcCA_vJ8 3QO7T3jI V8S{}7ugK^pBS/)Nk&Lu֏NrY裱7u$e,)s4 1P8:5j3&Ɩ.tΉMA'gZP:L'u͜ G‰贳2N馦.LOw$##[tVCc/Jgm}uvGU(3a;LI=mӋMK^p :6o2:ٲ>tLT\][_JgW* $ &Nv5p5MM҂3F:F9~ė,8:qS.U:V8L‰" Ʌ~.-6Άa]dN@YZZPm-.U: g?N~6 5kZiVW,rwx=d$lY\\8˩t6*+Yrp™RG"Omn긑WK 5muB_M|9:;;LbYt&: x Sn T*׼[ju]'_vv]+36^ 3|)x 'ԚNuj p? JJ8NV:K'T:K}$pY% )lHT<Щ/;Ml9TYZVJgTt2N lb[||qq~o1xsY]M;&N',%%~JXtfCI gKcjee`3+emAb(ڱtNL^_Ot'ī^Τ.plN '=3:>-E%) ]~_?bwWs3&&5ڲsmsR4v|5DN]V:zz gX vt(GtQ]?XԚzmyp8jGScu%iI䜢M׾=l{mSj~KgggOT:cpdpC3:5Y_Y_5~~gkLFLl mccX:Ď3QcmuYt{*ŎL X8&℥O,wSo8ɭ_p<Θ,khތ:}FIX,Hd=t8xlFufkkR]8c^~xeCCoڢ'~tKgw,)ANNAi-391! !./-UGp.֑SVflc$,Y^8y1NR&pir.4Tvߞ2>ZtG:9h1 V:ݼt j$V8]pNY_Y~dfo _?1O(zcܱ{֍}2 z^:T pzuu^8[Y_UUEų{>c[o2> 0Lwz7cgv66J#NGD$XW!]8Krsӣeoo^8#Rc :}J^:}D-!tu_lY8ӽׇ3}CZXnn~NuwE1m߶{g鬪2Gn 'VN3㐫qvvuw8&-Zr-_}iWDo6pBVtTW1F"t"N33L]Wi gI gOxF[#(pn9-Zĉ:˥:Nɿ*VvL9'D}P8 vn9/cHLJ甡t8tjI4u&"3ꉉ=>ǡv 6{z]89eL=3]S鄿g#/Gn% 8foOwuu944<2(/#=I8MsƩtVY&oǴp'Ħ}$^8pZ61/'nRbs::pK'-~3h}D]U8p"Nn6#Ǚ;r ү?aOҹoͨOq-T}rB.q/98p 6=MU,zwo9?uꥳNkP'éN5[$Q8NP_T8 3#ji57jsn~t4DUUՠ UjlYYI]]/.ՇY$ݯ*~o-atܹopeNrp8Ӓbtue##pΤ0CLbKxCMq^:2zҩp"pT8;='逳o8 κʫ;$ӞYPC8yܾ8UT5 CcNCf8l]q [7b"-;8 aME񩈓YHן4/!N8CΑǡ̈pxOzf?d8y霛3Dnws髯 g&:ȯpRW ݻ} gZV.g7Mt$ [t[ ^}P:} !-9>H>:ܻffDGlGxEߊ8kHt^g_zJKҊ]}rӻvF0-%Nm7i׮9N_}Y98U ]:YWoU'pyȁ}mkrIS` g;^?sx[CY8K}k>ŧcWz`3@_Nzp[}vu3'%s͛OR඼}}G_z[GGgw3Т3+- NXr8C]==>zD8  #lj:N* Z_+ڬT:yCpM}uquGI"x{v*'/[ޠ::^iXtN-%+&ڕhB8}fa,K8 ׃%ؒ[Zr2`wpxl/Qu+1;y_'2N贞KNNlmؼu'3'# W_䥳I;JEgג 󐧛p6KNlnݹEV8#U|SVV:{=!qYT@8pp%' 6=u+#H*+DQ2T:7SiXt&"pRgZ3DWo6Cbɹs.^rQ>Ϊ|ȓ1hR_?:穱g6u?)J8e8MXrN(̎h3we^T#IzsKN^:9NytMD_W mve8YW8SF*WpZ.s|sa^iXtb"B>R8E,tuy⩳ 'ΰq>n屩y55'©t2qv<]] 6™_J$pj}a 8 5u#ո gp9I<-99mV,^=N/p}}7u B dXg89N.y ^[rF3k\JqXx1:7LDR_w=&j8Afx퐧whl/-9Y%Zyq<+/:mx\;ݭSᴘpn3sNyY_rxD#ZIjD|f uNJpmnNpg`pK0p|HSNtZyy4 v8t8E &teϞ=h*0?"pRińS^th2NuH q6qM'o8|f[8KG!+[Dt3q99}YeŬϞp&Ң4ODtu*tq` 6Y+XYpRpvwpT_Cũ$KǟpY gJ':5t8K '9;Ip27·c2F D% 8E_8׏qz%/pO|JFFeۜf/G37-O4eZ)iם^zPq g(8ۼqq>{ղgKS‰ 3 bvsVKE\|%m#pNǙ '&.Ѐ:}osP8N|褑9lF$Fкu$otum9s z8}( %u|ȷ&3Nጱь𩋷?/IzX8&l}1/i|dh݄Kg_s<p6}g6gtd"ʩZiѣw;yhfώ-sA3XL8{ss-)++۲Fw=}y'N/ gȉ-G/ֿ>Ece\g8w~('N:߸k8]8| "zzF8GvFgo 87٫pZ NK8[|S8s'"Q8}o[Lze*o;|T8%rlgFXϟ\XxԌ-;qh;8[,] l gO~85 Ip-A8S6YHJsl8g|(Vg{™ut~YsB8m$8s'E9& }yHFb)vwdյzZ:pZ;F'6?owO\9{3Q=94Yxڠ=}|{O> 0pԑOlY7ՉW 9##}|Wh%8Q>Z*?p6[ 277ٓ+~XcBm0= gx 3+sF?rؾj.Zgսq g7a:}‹wZCi8N!)~CO)D1 '~sq΅3Qęng!NhD#p 7ν>pXpZ!2Z8E1_]=4C>qN?U@Hq |hNZrz :k8{1|ϿZ"ю-6y OpFXSltF3RD")Z>{ܲ1d^%Rƙi_L8G\ڝVBOB#p$[N{/>~p~9 j,l0|ί' g\۪Kdk/$S;sttxhP 3!d}^i3<~tq^ gLʑ>Gbїk/CCCãcc+!%FS ';j ؀^8 8!#q+3آS^XkY7wO[-,Dؕ PpZr[t8ŢS鵗O\ g̅H>FhE'8߼66bBYgi_g:c|HFWq޸xy$4sitJ8[KЙ:Y;O2cggwOnU;I&8N^F,^pN-É:sɜ:Ox#ܻpn޸~ltN,ApK:vڽ_[ypp<%|l2P3o{'I kM Oqj}=ʙz%T8u>~ ͛6nXkXWۜcat:2w8y8Й{kD%*4.dsԀs||eXW8cB謫y݀JS3ҹYZp$h]!SC 'NBqjj/:zYk):)/:s<ꄌ2}CpBtq v3pt#NS)-:cN R8r&X-`shhዢ{CZW7Cvي 8qdx\U:-/܃eZz9=Ӻi5,9ehS m=܀4z+MDt>uaau3&bD%Xy +$A߼{/<4j8mU'Ia844NDqopqNGi"KMlwy/97!NӗOHLLT8yRP*a"Y8ϿpN3,+yZ30p `p_zX:_Xx c; O΅C4NN8dp}?p}-Kgo*v>Ti ]P8x]274v>éMAzIͤr_q(Cg̞EBM=w%'7I s׎8NcW7,9T6ކ?'/yd/+a}*Ըma-98>pB6ocNSLWHD}}qskg{6qvrW6fT8 !~%?{qݛgإ3fr*cNǀxWqwusΝ!wu37`Sl)ɉ~+~ci.l$q̙cg$3fV^+xօ]Q9qNn qVp*ro3s뀓gHt%iL.;-40!p~՗/XW?ul\8N+Nc_Cta$goݸzqi) 3%f?Wz,<~Cꫯ^?r!l"Nf3p74Np5u(ܺ:P:cb2)wNw'b*?$8NِbWW8 zJp>sy$ |98H o0u%d<9&S~ȼqV:D.F FKkt~/7oT:tvwkK"kNWeFX-9##4 y9?o/qH[qr^Sm$MͤFFNX_ owܵijδǾeQ 6p~t?9ozn¹<w3vSUWf|gy/Su 3ƫt~W|t޼qt8f4-~Z#mw{ @ kX8oΗ?T8 8wHqHuuk!Jhl3> u*70.]24Gg7?o=#sϖKɇ5=p܊w UW`}k$B;.ݹ:ͥfHNt58";tnj*?ŖUΦa96?T8yܣέ7Q=8wIJR8'.J'?JwKw̥Wo`F}~jpw@[CTtсϧж[VV۷&λlR{ foop>iEXlk߄8Y|P:}pychjbx,.;731~٣?;5 +GAt&ypspg^S^ u=ݤf©wr|pqt^}~jvv熁6l/;:foˡ+3Q[[ܷy3Gw6Օ¸of{p,6hypNI8#©pOrPZ鬮!t>K'ѣNyٝˠW1I1FZMN'=Ḯa)&M#p[gO]6ЁRE7pjk]]x_tp(؟>}!~(\;wtne)qjP8O/ES(ݿd\8!3PプNM2;jg'W߹:egjZĐ/8>|""3Rd(N uVWUNtRc*JkJ'6v1=xuVFe(zI6߽h 6pbpsR]q,3NXUWW+_/t~7{<:ϝ;6s.;[ךLmyl>yCyE4933;;3= &_^8 R:sQ :_%>]qyh90t&fpmMipG3Ц˦BH|RtzN׉:zqbc*5 Wn؏ݱaj@kҙY6~ۼzQkpNPc;{`S P:Wt҅Wn|ylvԦM-kJ'tm6`h3'&B.j -T:\t/t:uzP:e%fs.8&ΫW/.-?.^8o^3I8st|~Ӡ24/uf34udiMMM 'C=™d#)AS1涭s]KLxIԹ|p\t, 6YzKZp=x|zS gOOmfpYr҉:N`tN,Nj6|sF^t2 6o}/8.869 ,⣱iȻp1dZC*5ztut Nԉ/Dc?{Suk@',m^ݻwݥ'4`q S4uɾ(٤dU8CKݤjt¢14D5߸r3s|B:3ٹcdDMMF7oJ6p{֭koт‚fAsS8y/3amlZxuQ:+'dD_$_v.x tu:{3-k;`):~|쒮3;-gtssh]a,yH/sƦN`SH'ꬪd8~Z4?~}yEZvF5o_:kWNl5y)ytnIk=fS8ΐk`Z謑f"jO~TԖ;4oߒ%9^S uR>d{r&SSg|=RNEqV@$N?~:?d:/^tc3y2ڼ6/0ǎ6¹e M(RS*tfN]'YcG\<};<dw[ziC7)l^iy(ym3 sh!߅3YNk Z:t{;5w~X/t*e_]筥s5v9ټ6/_4 тیc'%™pZLij쵍NԹd\v.-umu?w4O,%%hsd+؜_X8yf< 6 6gf N3!1iZpҭ8p^:Cnյsxxr^։1d:yI:_ϠswtЙ dsmΓW._m`62&'}ӈ}6u*Cΰ8-5vI}<[v~Mo=ۨ? 2imY+r+`mpd4\\<}mm2 n$M NϦ8De3/WTT@:ϳe>m8ug:z:߽{ :]ywɓ)/p&CaדM.=N{b\i=Nj;[vj:M]~)<:AF߽}ꑤ}lnd-4<#NFBj젳ܗ΋׮utVTNOIa6NsfFIX<ynڤ9&{ڕ]3I*'xcIG(:ϒc:;Zxpb0<{I>?֭ZWWē&'5UF HAl=&<~Ik`sbb 6 $e3 /YtVr#۷t]'#|,b@O~TE#?0AĎ;&@ȑ:MK>߽{y*Zy nikk$r m!SS\ѣ'_\\4ŋz\Z:u(oX6Rg$6BZp.cl6[¨Ѩb^VV,(Ó4wOo_nYM\sx `NS;?t{'xFɽsfZp.c,,+-tf<<}u^`:vxf@23φus.]xW쳗vla|V$zS=m sԵ W^ф/a=i#MYT$MVMym"-_Bi[Ρ!y־{6Ϣ<<6o4== <&|rkKVOKuM+&ΝbK={odpI6یm:dZƄ:;A#G~" ߿yXnO.ߠ0Y4O!hN!!ZMm3lI{d3A\ބ4uN7b:& f"䙕y֖gpz:I&)wXb6r.)9MXr^̊&YNsf<+S.<6lړ*tNu1$)xHLI!g)ߗ'aB%#AxF'qC eҘd"ݻ%C ZɦcbdS\4`Pa@*+aY-S|ye·_h6hzԗ>m1)J|饳Lk )鄑HI,Sy6<]uQDܼ)~ MfN.0+{ٶmƍ2͂df|<MfZJ2s2N7s'Nbb<32$X?O;KA&tCjx^kLگ0 sffFD##M'MlR h3=lڕX9:Y,))־m>D)srNJ9%r!\`LSO uD,L%δ8JA{B2ӖѐY4s 4ihx@(V;ySl߄\2|YE3S3yEO|qBBO + .hHG*#l-=5uii$esENx.Yg{xjiBAR1Ouum% 6H70 &ɬggqtrSf aCf?%Rk/-d:ussSy-*BJ>]_QN)`aI&,rs|4i69HBi)%D1PXTp)$%%|⭐|H!,H)gg#KLPed)NjM>e(!!tzۍ1<7$~ *D''V<66NWvNt8 e*Hm LfuUc>m*b.y]'yUg >[q]ZŞ Sh!,=JUMZ:4! .3-]qfU%n.| hm- 7G+6}?T[%2LzfϦM-7WgB)u#->L:Y8O >ieJ Asē@Pr2O0B&3LVm}?9 _c 6L|C L<Os`_=!BkiՄ#NAIXjuj1p.fI89MzPZZF3фUK_ձ̳xaSFaLJ(a cǁ&ijwone`pؼϗN0!I'Noo>ؾB/y=ae<~{i#qXq4%M6iZ; ܫs}~@sV-ּH_hh./TaZ{u7l%0lpHi}m3yy_ MrJ/s%MRf{8lr,Uv<-ϓ*n]U^4iV=%Ѧ:|@.v4OS۔CwOS %ɩO]d~{W嫟Ϣx:+u(-]o';կKas zg͏#rnKNJƧGdۅ4ڦ5lAgJt>ŚZvݯqv} yT :ۺXB;igc-I>}g/p/j<)E/:L4G?|:-M>5j̼c?8N˔8'%M{47`{>|Nr;>]B5MC}Ռ.SN<ڒ g4G).in&D<|nZ)Qk^ރgE~q_5h覠\1u}VCbQ㉆4S-dK;׃f&mnG [[auG{_*y} 3yOl AJ{ŨqgSfh/:*7(q(SAS咭8W}͑&I6' /RGͣ\f3%a<>gn}ۑTʴw(W0e~,r2xN ujð-]Lq29Ӯ$M< cJ3<jmZ>0 /ƓGlZ\V&K8W}FKk0e^e|Qׯ> OVctZ];y&7^] 8{Ϊ&l:^pBNJ.]8)%[ H )4Pkx)Q[>NZ.aR˵)2|}`z>I^6Mg)ޓ[;쉻xxگ|Ub {kڈ 07X7Ѷ׷%<^Sv:o>XHddE/k endstream endobj 9 0 obj <>stream x݇wǙ(z`f@ "HDb$$J,+JlӒ,^{^^zv=s{֫\]= X$@/TWW8~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{1 ӟ;,$3N~ԏ{VcvoHخ*?;!m #׸Gf|~d_GCdų# Bh?E6|~99Ǐٱ,aϢl(ըnϟ<2Sh#G)/Oa]3PUf9R|2>N?0ܳe7{dHp|=`nIdF*.2$lC3{}]pğ{+i[gOwc"3 Asw.gSa"  Y"L hf;qa̜(02"ag;f?›L2(..*"9Cڠfm6<~4arhTQY#tF#b"*Fm{4ϝt~lkxHE*(IRd(V}9՝/׹'cIHRD[T哓S1OO^d`T\:QYɰhMPI%Pw;tohiJ$Ţ4PfXrDB9>Mw(جє290%"TUFY܉,("SO+yȸ0L'D5 F <@42gPEd>wDrU&`04YR kCKQ=\պP/fC,p{j2Yc(UܣREd%Q)T+KOKT<_n , cL`' ?vcRKTCRV51L>u~ܥ&%T"[2GM"8*V~)U/҅rx3u3JS&͘\d)Ta2K4Vx'PSͧ)DJ(F'$,+K2f4x:k~p is3.SRi 3= F >23yH^ijIt .s< ]IuӅ}~664s$LS\ET%>9Oztfs%iC=;ǟO'Q1T;KH87uWMvf 4Kz.0O45%,Z?9()}]դL3yuOaKWIoMjILzV!JlyFTVw1'O3MEs~9' F3GsEp47kQPN'}JXyxː4#) fC&,TMerWݨ=O{+2iWe)f!3)kV%F]UPP>')ԴyŦVvYqDTCQ}(IEKePXRO5}ә<};jIg?M&}43M&\R Y- Zk4j|"Lj>Cr'ɖtbSkoվ 7HMYMnưifKQA~ԩEOjTxm' O;ɟYv}f`bҦx@-TJ'M.7"S9H<Q ՑCy@S8 Pç“EO<lI^-_= gI/*#5iSn)&,d&H#4C2L*xBI0j}ӧg,/YT$u'Q`&ΡMt$\]IbR&pBHEA? Cy E4O˝#6 ؄9xKCuZJN~EetaLv8d>e0)4$ʡ~ *r@̡(.a,1͛A삧<΀Y7jEK,薴YdPi555LaaD#PD ƴ˻P92B<L})?q:8τS۵B̦ZҍLIL y$qI!f6qyJ|NNN8%;HgyEESO#ymFi׹]a, 9J:؄i44f_&ODeC(T\'A>Y , 99 S$yRVʚ<ɓ'h{i׹=MHx#3m4G8K tqcm-G ALѠlHiI|NOSS{ dyqWgRwS'褒mooK6 MmItm]L8i4j x:d.qHZ4t\3 Y>e >qeӢ3Q&O,΀s[bvĦmHɗ}}Hʄa,s3I5OR&czTfKt@nȈ٣F|eO'lp:czܾp +%].l4ґBk@&M:B$$LqGD}gh Hpcd C械 Wf)<%_D&vV]&4Z[!AQܣt!w%2# (PslL>庒3Hq%Oo:wGBYToWG`Ӡvllʄ Qb6՗ F2Ĝ:P: ¯J'<ɓLƳYc`Rm©Ď)hVM&"&-SLH"/p)zO6cm@1xOkxevrVct)bSQ'|vtcs 7Y̎TK;eoJxݭdi3.64[Z[qCYd4IUx ?M^AfѨ|lEaS܆W}º<'OIO/xS)unC{6NhVWpf-it<]IU&l5`rCVi-]ƫ8σ94<9Om.RXTJ{׹aumPf$6+ xhW)oDʲ2|ML;tצ"?MBoohyN N3hYW:|[ aXme%l3&Ё8XT 2fg*I7S__'sϭڶ鳥OTg1{,iaJ,u,&;EX)-}}phuAAVU;0A'<եFMpt](Pg-ROy~dgO=]&x8hGJcMgי0mIM}t%mv6&bD<+I)>eI0$gZ[8yaq ]likk<'(z#yVNDqYǝ:|Df,M7WFbAChSKm4e¦6_&15?[ZZ\Lkѫ,\~1rg51O' e<'&4tU 2C'.:'ڰjD܃Dm`#>jHҠ G"w`)&siiI\>vĂ¼#jA<sY'DTA4xv O%y])1toQpf6iIlҒ{A|b* X|Wd \%mάi424QrcɌȨӬIIjch>vWS']O<ŻAsNL%/xN@o;3}k0$m+vi6vtM &yҤ &e&PH\R}xڥr-Ƴ%y*ik8ufjSڬ61ctkMaR><|:^ƶ6spTd̪*:]v\nMN `͞.f9 \ɖ4%J\&9Mpr-jZGJO)! ܜzwsbb|yw~EH[N %:ILtՙFڍ"G}w&ppj fBl&6TIfɒ4KK;MNsiiE9ωMbR$&'&%ng[1%zV9~*'>Z944#QxKf3l:{A'9EoI )Ż츠vo=DqvAԆX,dfsfD+hsZK.єIir_t#JS{ փ'3DnųxOO[f>Fʓw5MTZ:inN<3 1m:N wi8faQی6֢͊ 6#a39fZ-%&# x% i']׆e9́O>Rb. a&D+sB/ w)AS(xgOG “ucZ$3d:LTN~=:^ KQgd% mvQf,j 3dsY=gդI~|F<Od6st?LV2q^"1ɝ OxJpRي3:+T>v֐rn dIK0lάcI_6iA'6%M6?83dDPK|x/U7B@ ?&IB'\<$}':Χ1uө3dDvS"_I-pH񶐴 U`I6>˶+6hBdBͮcO .]'}L181ؾ=ʳ_ "'NDxHW/uVQx!C\'Ei.'y({Q7v"i ';;[6:y| l-˝FhhBIځIR% mkRdUaO^a0Oue>1y:. &stbU'vSI1 E"Goͤbش кRň>i1$KF3E\TL_FߌH$ˉKb ڼB :>==|.-(< ]u6OMaΣGebDB'm;Ya'WJO~&Ɋ2 utw*:'xbBXb*6-ew^ #n–Q*S,I2 ߜŲ*6u}d9(IyB'DSi`bi:aי:F1N%]"?uSNkJlVUXmLǎ-.MFsrJ92"hkFt![&X!{1?W_CTk<2l-g-M'I9υ,8t6,OBY:K!XNl ^JϷ㘮'dIWMnCh505U'IM^F"*cӌ(0@{qon]\VxV%Y mr]=SxSdd'ÚS[,¾g"f,g v47>^jKHMR=.t^яPh677r*!IH_E07(]Iเ<&xJSúNXR?bYU]JECֶ:S)[awPhh8T)FM:M I.i6M<,PeKxS 5NR( ֺ w2?O kJ'vztz{Ul(Vtjm'OVw} Ӧ)z8e=D0 U1q f-6פM~4-GfB$4 &_>ȔSE0#Zp?Nf{ 1ql ';Eš͍梴I5l*4;:&YA˔k{'Mxp\^^sq$ϱ!\ ΎNM utնTnOY\0u8uru3Nn-|&*:_4l#%NYfEp)] mq 2vt̚4Ddnk!g--o,J{cS#)x:N~l;\R3QM5z.ppSl`GMy_gIWis(M!ɷ,'<@'It.Dx;v(vS&6M3vI,u=S%q{0YԊ:Ips'&>Hm+H;&Et(>'lNyMM-:WW1;;5EV١L:YfG]83,'gaK|6 )EgkkdOXvnsnִ)M6{{4S:|g|x x_<6'' xƓilkuK3ii;ea7f:Zi%N&(qQ zgImb/lQ3vùδ)h5i_?IgAQuINTa:NR:u|)h;C|5)P'vm&bss4;ɇ!yEݰ⻰ytAllNpffv p}}&a'牯#<7%suHLMNv,LgyHuqv2쉓ĉӐ(2,jIo[tI9&t%mJ{@~|DߖAxaS':[A',(f:2V4 1{H{2s&Ne: EߓFI7{[[k9qbiKzL&~6.Exj:׹Й:;2)NѹtmgYt)aܞR^鰩&N>Ӑ,pG)Mz֌M9 H& qnii@'y$sCgNx*~aitvI {rqH,( #g &ζv9 [xQ?lC7Uc#Z^Y OGssrTditȐ\^&:.f"z -uDn N5qqRg9'lP:fV04K3sT׹uvSxֲ:{FƦਆ4+LD&,uv>I Nx8R·&NHp\YəE\__YŢ. 6lnn;sFTg5':j:tm=84DtbaO^V},Nx^m)S6o[;!,+F9%ީ fG+ڬFp}SyN%xK{ u>)u97m:FFXaOgDGqgH'v{hH$Nva cg<>a$?@#fC*0u>pZD=488 ,K,:ٞpOCKlΒY,S86몫T'Iu$%q6jS$8/BNchGجmMj:O9T*wut[ ;I,!7̫I{c$r#kЮS>؄N,V:LCfYV6M"&Rs~um' S)|&)Lpi_GìY#gDmE"$N,ps6KMC^9,uDDvk溻Xalj}v( :嶈3$u#ўȜ֑xD86)j:.mCjspO om(tN̙:wsL'-0D :9NGꔫIVvQdIp0qvdHh#؄Ĺ<4qN;c 98KzUwC '$XMgq؄NLuukx͢J]R'<xlCNQاW6K$s8S,iJJX$8;3&Fsc͘Ι,$8wMYyD'giV{Ml&!8W0u&]Rg,`َDqH$(Md=ܐ9qnl) ;ᱨ6vMByŋ }}]4uO`vKj]/W#7w:87e$k#sy輱 6pv3uuE6ΒRsyyy$m'>mgK񌩓@M$u$|{gqDsm P8?2lN:O==:''KɤHĦupOu]zlo;>E"&`=q9K!qw@e&4ݏ_;[ ;3 vvkk:39L}}C#tN:m#̩o۩0[NR)CUcZZC DN.ֿ_s6EP[x+3謪jh 8aHd̮ok۱ȮSe)qwHCK 3m![✛P[Q鲇ߦd:T'w1HPϟȍ@i\NPR (N:-#Q R//umzĺTTd YЌsfv~ޞ8::Tԓmn4s*qe( GnܰNXTRm$BY[~.Sgjr L7NpJ"uN"N=u wz R^ux8RNc3q|] g.z C^:y]JÚ"iQG]})״b rRqOݨ4qC2qGVn)v,nN:GG>:61:獺N"I-gM IlϨ8qhuEIC==-[Ksm e;sǟx蔩3sXDCD'ŹhbRUU(rs3P,p6귇\:4g$4q"ΖCUU[Hw-\i!eRk7C4u.-#8gD]UzR&QYE=tp-'ꈳ;N,8-U}zzv%m)Z'',GGpP:i$87])R:HČ"Nr5b>pju}6ZNg4%pV%KCAΥc8硪T"RۃcGpIzk7Y|Am$FNYټNqU7cD*si{qqƙZNbSL_S᰽SǏǡI8܈!a6+t1 g;& p>D}y6d ~(uXǚM!$6%Έ,G'Vuyٳq%Μ>ӵuX4'& N u11s33>i֖vWqSu[IL 8-gl9U`Sj8W-ZpbUG?%JX&:o>̳0Jk:F Ge1n&x<&΄r 읫"qU'P#|o-]3YHtcO2/9뺂svAtӲ Dpf1Ph98ɵ>fgY@8㧳SQ,u8W9N[]u}RpMgHo:LDjd?ƣÙVc[c&Q7lU\UEX6:g} i"u>itVMs1>q7yRqb)pN-,~VsY<Eypڹ붺橓EcpZSm:kj̉(>u.ʼn[PҘ Nj\XZ]8q8تzQ23Eb*yb/(Sz]g8YdG<+8Lo:="8N{M㺎F(b%*gZ87^-]y2sDB믽O>z΂᩼:}Lz>[돁>4ylPN$uz>~\:s S'ǩ5DDSgeuM]] Y8p:&Mג{9+<$)O'6{f,Ђ:=I-b3W8!xM{|uԦ:$gĂ6g\K= ^W';0\5 $8EUg/!YFJN)pMe"8J{NFu:V:pMyHi9%Nb3k'} rק N:)N4&c++pW)iZR+I6gISUm9BYz:ϗ ( 0=MDJ]'ѩTN2ﵵ˜.+IINb[ljs%%JkI{ӜZ]qZ9n}8O2_O?Z[t^H KDth8NǸTYa]K˜J;NbSy۷_~pKcT\3߹Ip> p.p:ଈ/tB,s-8LGp%q 1s<ޟKs}'뷾oDSi: E'NNLgAQ(,ж/sZq,8^q3Y_[xo~c8'Y20qԩ\^4p:duIpo0\IVp=ޝ!:|a$Eq>_~SǩODTh:5ֵ$xʈs7tɖI/y&<ĩ$SZ5p)Gw/CW|4q9iT&"Bgغ _^j)kl<| ̒⊉_Hrf{ :W~ r>N$uYtRn%1ڸ4M-u=B7[ <\<-ps+8t/ IC3t*8qݶ8Չ=߶p7s)Z8:Oa;VL襜xN=n搷}s3ND$x_)N3Izm]]-Y9ΠNug8 tS̩$3ԅ'e6*&"i% K뤦8qb5]g8%n83✞]X8}÷Htu97 y[+}-iK..eYS}lq8' {w>2gAυ_-dgVM']Kq##1Ҳ8AgNu\qfs~oో39,stmroፅΏ?7^wo=|"\\,uY4q8,8se,KTظOj"Y64/t}DpB4qqV,8Kkp8ӈs]e^H~ !o C24q\㺁\s8 2l8tKz<_\Ҩ\8s8Ypn q笊m[jK(9㱬3N-88kp:_j8w}%)8Lu~ c^jp rW,8L8 g87!85ɖ_DgqVwg/Dn8SV6%fG~ 3^ϕΣV:篷0 ):s⼥_~_}=}x"%yP/bۀ8ۇky{ 并rlyiiiy:QyI.b3* U%aܔo!QMl&c;P]~q>O]W3iO 'p4ζ+;~j1Oc8 }s*{ 7ӘTd'u5>NgȎs҂__o~SDg8t]؆sx\vUq~٧?꫟ۯ<bU33R'q [9a/'љi-)Qu?Z'6ַ3pjj46/?wS?x;wAt8 gO^YqXՏ8u̙3M+ΈN=yHiܿTp;?'4quu=Η*݉#6 ?纆ɵi,,qNe\ƚgf mZpBqb|6'j_&&o[*o{™Lҗ*gu}n8z8',8i]Wq.qfNˈo{K+ϛ8ם8K X$LO5NJ΢q,YHĬ81u8y)q6uFjn?*O{;RAtO=a$gYgl:oeYq*ʃM 'i꺆SND2!z9-+mO̩|aNU5V$mRxޥC؎T6qbtMĩS Γg@k~XM"Hwy9r8M Nbӆ։BD΂@Hm꺁S8Nc-t%=0Lzj5\?m#yMpv]ۑS$8O#U g] 'I СaoȹlM8ͅ:֒>z(΀l_^YpsROg_V,pkYN:8eө4uӱyZ/N:=_Ťocs~?@y|Il:p¹;kS^S$NZu8?Qqruv\_pkqzQp+I$qV;qF6i N:_UsMY 5="{|ݺTq>[n\rIV2 '©5NZ4&B繫 ɛtqNӻΊTo*=KNXTp޸Np?{SJi_,qZVᛆkIOppf:kzߦM$׃&NUW.]8I|y$pyht"NB'Kڸ~t̃N:9NQgu%wf3&=ۦTumRq>IlfsrřBg1Oͨ8E]Gj(Nz ;_ھ 1Bk6$P[gy*S3gNMM8]V2E,tjM>TN$ Ӧǥ⎝m0]r&k(NbS!Qu)p9wMϫ%5ӓ4$:UDDS'Y^ 9;΂xU/#85--3#UhSǸyi]I8[TzapNUqjcM5DgI8_ۮ17S3Ǐ_+ys"65&M5剒+I{nBm-Ne zh0RS'u"bgƺ8N:5x_Ǫ '{~阇h8iDpq&ν9NMsut8y]g8N~9u~eIy;]K~巿WKyY#qJ sE{g6kIeHxg@)NIS?M/ :gm9љ΂ئ %+q^^9Nb_}~GoyD'T[c]I38YKjh̩ 8QQ7t24uDYg^onCW{BY9ίCpy<e{u%ZRY5ΉHm: u pN)z8YuE6*OfRVu|XsWmW,Qia}@1fΘSo:?'KuDžEe ܫ^U}@VuD^l9y^o9M!ki9N_]qft'?+dqDzqd{I;tGS^&KZ$6spO]k9';y\n 2ӎS MMDf'?dpʺz*f@Cn$F<߸+)U{or&yUf󐉓`ў)zq987S/p/OP[IqzOMߟݮ! WۼA8z''yU8!q>qM dsyȁl.q:&"6Υa8A'i룣gV3ZL a[b\csĦyrrո]Nk9'wp2։ȹ ?,KSx]xqcdHt@󍯷djK | 'Ӳ83Cg@Ddm:NSu//<Rg6#сrV6YU_8~Kr!ItRl$cT~%Ϸ]olK.`w)O>x[TuؼTu93-g7Bfi2.MHJ]V]U^{h]p{aCm:y%SܥXhd꿠8_{9[UTugmEE%x΂W:ԉC?8]y^յSՍ-I{zf"RN%73d;,uґ`7$lS҇~wtUdystq8Dq<$!y+-gYVQU]]q ~tNDNC4r1I=IS}R,u/LR灢CՠKKd_Oxp*׮\y^Vue!Ik9%NUۖ=2tAuet R`D\?8sL ׿x:{q&,t"N::~L͠3~Xc2 fy}%q~,&Nc:Gq6U^g[^j98Sm:3ss:LS_}3[':*g7ADp-%~jg}{-q'|HIqW[.U]m9 {~Ȟ޴Cj];9qM>aǙUJ]HJ&pn~c Ru{luRH:?'SRO.όBa&(i~{YS'z| P!qW8oݼCq(qʔR˝U]m9C*Nv5Nx旿j3LD$uQVؓ9L4W=O|,QyRko֋>OlBwML?'yaDqON|:cӪX  uZ#uN(I_Ry 2+ UUN@2uw9~}~RtBQ,'!qCp޽?w,ՕqLC"q7p֖ da;F"я?۷ W!uPLvb*ϝr+1H-+>ϋ]';y {h,S!Lb|]]U}t䱮=c$fę裷b:_|Y>-L 7%c kCtPEѲA84'?ۯa|‘8/688ī:;AOU}/ԛN$u^61#u>ȳ2uba{RA[oNV&DQU˩3/|yc5w/T[LfɓXQH|$:&f&8B/쯾Kg򶳚y QX(JAҏVԆ"KȆs${GESG}T%N<,V#NQɪ:WbakUC8u=8knM®Nŧ'-(&щyչAm҆ubGboGo9;N8 ze qjl!zWus1ɲ,DD tN\3j~ m?$:`}j5:a:$84]8 [7Q]I¦R8p M7}EOlZ׃q(@'l7,u1u>S_%:|G+o~o"k;F4m ')|;}duI荇'eVSCG&[72-v"4aI;LCM8D"6>'t6[ҫ揄_1:7]5N3q&b$htP'BQGR瘒:?,uj/~>|=|^ 竫L{1p~{xE_|႒8˴ĉ8$OqȨ83?q_M}g5uV)W`8S{/N6=_~Ķ|7_`:gQgii$r Oʆx>Q!qә}UydυKopծb#bQH,XPލO&lvߜswng|>:a7_2m|k9Ӳypރ'4uasxؚ dmOYeꚚK++233%JgdJg)on(tNL];oٷ|3o͙iTMfrԩp ev6™thR| g)NDK'_77nߎnwn\]s#}?\ڶysԩS5u(8bNY_4t8S"w5 V g)p mNs;} ::'N Jgq3\yڼu7lNldS‰u&yD֤HɦCæ5L5%:Rgq҉s9Ns"yQ;'^wϿ2:M0Můl!Bdscy*TMm>3l\N~PlLQ:M_ϓ8khW:qNB@sNO;ؙ΋oHǖ6gI'N6'Ӧp8M6N 'WL=UsLWL&MgJV@g} mMB,siGd}|L6'HǏiPQ脖EpօsXN8z keO76Y/ ihU|{w2%ķW:sXM]4s1j=yҩG?V:w^t=[lg6/]smwMjz62pV gZG(Hgդ²L]:;ĄH} cgaŁ#ϖy3Tvm e*<7bl€SN1mpVY*p֤,iM)S:V"O3>ciJOΏٰ׮:(Yk0P:lW_NsCGה͙wm)'LVNi3WpʦN gM™;u2$~$/z9ɜDwZ:/Ή W/嗢x]6h/yAќh<6GFFGo6GG]ǏZcᬨ3:ao"VNz/6N*9DҙХ3=EΉ޹J};ٻw|)[]דDIKI4͕+ ͱ7)p6O<|ر9C7 gcc) '?e3Z:s|N1]ϳK'ovZQoI/߿oN: *3!t,@Maw48ؼll^h. YN5ޔMφ&l13n\^8㜴8߈KYfNT"3'R} \ta'<}9t;6Ώo#<57'x=Ǚ~OM,3f۷#hs|lNL("A,hs9 g;*p&B1/=]%jؗ,!0ܴs`t~'}pssyVS?f:-熦^'Np6aܩǹM 0JQ8hS'gΣP8)QIIp*{KKK:٧ttgx^zZ;xƟ̝M5$lymES-cmn46+l33%N9R)pN38S_RQ CC,sDԃrÝDç@CkIͻN$ W:E<uϘym+\h 'm4E\'iIlIMneXr|jiX8dμpN )K'9ÞjK=)uFfW\V:/ }/K?嗠xN:ɳH1Kٺp!ܺuk__9rظkUf2$ C33bLR:sJivcφ9mBͨyӧνJUR_4~04dSPp9ܽ6s 4%6Ǖsf?,p6=689WΗ8v.';d3Gyt^b7v32\nss<ۚŏ~ ZTT#ҏ:ӨХlB悥K.2wwD<):+es̶}%K*=ܬ1!Eljj[8M*v#M N}{rع}:޽_յr%6ϟop߿E3gy"\;7LYͼd.4<4!MasttL҄s=TK=I.=L$<6kg%8f}H;Le$tXR8(Nb:(kw7m"x\goώ9:qV3]ȍjt)2ٵich?[˗/d'M&%6R `ۤ.lV'R7z+JSΉxckְsŋ}:V:'Ν[FgЉ<AQ-bHnuѥ PR;CCljYIm|m^r钲y,T͈MǦ;( 'wc8?In[:sDVc1]0lXtv*L91i߻s֭S<-Y?1<W>o_VmkkiYe< cj%w}IǏ3HQ+W'7MpeұY6耳V>-M+ΒJ)~N8:8w/ԭ}|x_'Sa?~v]fHm .li',;֬YzuwgO! 4O kcҔMI-Ia߾pgsZ c1Oԣ8MocgS"6'b}|Og[!u:d넃AQ\׿~U񫯾} 'N^|vY8ߊR5mC{pYSN4\&ܟ-]ܽgώ ͚Zil"N}N|K1{M]φptK'|[M¾Nf/c5 ^0]tnl :rٵ`w_Iw@ sg̊&&e7l 2G5Mj4/ W^e6/]xلņ}wo6-uud2Qmh`3zo gvtNF,D%sN1!h)Z{tx'?֭zhLw&kt@%E )I+p4Aի׮yYCܽmzmgq~~>&Z 8lV:ٜH7vXUR=W;Q[gsNjqaK&|?Oѣ[$dv|dӦ:dHx`))slf=ׯ\54Lf{]JeS:f+zoMC|#Y7jY^vf{uZy6ϝCB瞽;vn]9q{9<;%"x~rr8Em]TRI0e>^5Ft*##'OPK'ZԔiąWXD6kdH 8sxd64pҙ {tةDeMꄅsP<xٱcժeۑ:90L ڀ:Rw%dxyOk9W9ҷAl BͺZf =N^7CSqJg^\^]Su.%u­ߢx#GUxΜ9G\wP6>an>~_HwRLAP.億9<|na'h&̈LZ:UMiVta36[6Elnvl.mki%yMża/1F:5^LcS)bgY͇i^JgR#t: ryu\:gٳUS!j&@o01 /_рxM8>M*i6lYӵ 7a"$d4ޜQ^^lg3N^Vߣ6 7)I3(+}<ŋFgOy*\<~ujgd<,3~shO/q.UI 2ƛӐ&o݂6IesKW6V6hج6P&pvxNlRI:'ZNSپأsyfhC, a?}~F"S zJ.m۷o˗E90ߢؘh\3f֍f)mJP8nfžvgg9:,\#tq91v쨭six"Orm۶O;"T>&R(`{\\G;wnݺC4Msؿ߱9#a/ %)&^%I`3/rwHTل=ۣ:K:vBcѿ[;̍N:v() xfI<ׯ_M< D _}D@!{ w{o݁ zC LaS퉉;X&?HTz@%wDwLQXj{);zfMZ` tf]f鬾pNIR:N>WɖI;6vйc +RIgS>eu'tw\%$Q?v}{t*H-ӻ2;zzV*f""jBFfB\Q/`MsjW(oīaԩ;N6\ s|xN97o^{nn{~O TD{d>4N*7̋pvwi::Tkfmmufs llZGz>pBGVagu}?Qدs1ĭ=̅ '|tnCsM,ͪJ\Brl6m is7TcEtzM~mpOx( :qC " %O|ЕDoݿ}dyY.Å;2N. % 2AǕLקi /᝵tYI˛͖Y%8+Τ(Qct:N*'Co99lNS\ z{a2/ >7_zY-GU4m4W)б9:y|L͊rضh̷{g2zqocW:ʨGg\=w[:aJy^*yφ&]?/O*ޫOm6>yɨ./9F2̣8#߷  i٬7|4 Lfm>d(4œ ;΢iFgNU/L.ZtǹxL)yv,Z< 7-B7o >vW7tZ9ӬMi3Q-m6X6kjp]tvɩPgh,Gu)Q^q7nA3G- &LwB*@S4iS6khYƚOe/[7{yyc޽~lݫe Ri*ꑧX/m(6͂+r{iB']ϏΫx2AW<7n\+x ?i٠d4JBm˖u%H[!e -Blj욐)f ak3ױ 7ΒtI:HgYݡDDt 8+?qܲSgk\WZ~Ktyu+M &E1b0עYihګGfuit^jGA6S 8n ;x[D\f))V\xرxυ3>tIS:KYǂ()]]k*v%OjhjiѬЬV:[6a( l|s13֩kg#sƁ[P|:;|#\e P_0Ef!(b9n4lJy_:?jimOn3{ItIM4W2K|ݻt*/kBgcfQJ…&ɤmhV㑟YUU]mt 8am]f,tO=GSvS_eg:r<ҿg'>sy~Y }\&yPʼn `=Pu<.GV S&82UɴiNYicMf-!g MiNut< 8!yI>V>(=Pa"Ji?v&^DRL)Sus&x٤eU f6sM L=)ri>7LkoCʮ.ݫyI'fYrI@5N'I%j^-)$\*5CΚae\-]ؔC f\pm&g(L5)r/1ՎNwQ'/Wx!Y>{2hhK@x峞c*)xǂd»ʢI%f]6ѥfYfp NrR,uFw>{ ų yv,:gI>Hy! Gr^E*eJ_ YlZܺ&J&k-M fBڌ6==P8%Ng7xtOUM޾yvix~aw1=tAS KiV"ŒU\kz) 'Y֯L.grZzUEY+I{$8UtIݽȎxtgY:Zf)yv߮]MC씏tFe3uAs&K&>xڢ\M]6eKᦰi]tm'|iu֓Nk=O'.z*+VV<'N>a% ;B(C3gd a|i]T29fTJm)pnf,4%R]0ڳ]8x.[AN4N:=+J)t + |”hvw6&-|6塉 ˖M2f3hfYᷙ6LS4:g9[{nrOh't>2q?zAcǞV<L7sTF4&X_"x@MC[7lYQЎg҂V%C*?LCf>HلNK'fm/gHf:KN]er٣Г-W,3NJrپUĴ8asw@jhbل nl`W6srz\2a.1:/,/OASwvx>qOPeni[lgʞ(LvET-'>0dhΞ%I9m鵙p;3F\D DO\gqD' :-K|.$3t tSOK#PalXEmLV4[4aI'+KBzI,ftQ J^8-*e֮OV<Ox,| հ^햷ikڱGsY<R^EN3o4gAK^ɲ)ݝN=h*lΜ:aMqaב♝H iT }k6+%Z2C]4u#1hTT Hjl֙cTkJ=39OU>a]^T@WjoNU<ſi"QΧH*V.hYFҜ>͞yl˛ HV<$r)[;]i/pyƣݚ%jMX%NICM%$kjt²&riMpS-Od. =)t:ᙯw ҧ橸P}æ*Qs!ג\uC4i[-=M}nl>ެ^VQ7ȻJ|oQ7*ҨE45^PطEh64lI+- 6wlzn텅)p3 S-PEB*SƦ`so2 ͼVG&iKJVVj2Ót#]~OҢRH\vh◬L o&m=wWeC)[zf6_pGIx:S-sERTPP}E \$:ȯN, '1Ԗ#ρ 1s&;R6qҽzpl>(q6d:cYr'/xrqEoӐx~9Tǩ5W+W4]DhւLA8/J3Ts Zl5Yr੿6Ox*|^oJ6ty|bF |R^J&hA#6 Zz"EItxgF )G^*B]]- *ۀ錏FL)$cOќI6t-]kM,VΒ(O5Tݿh(uu=ibnҰԡ$(M_6c)lf/>13Y@:zQ*^Lh<йׁҬtÐ0+dɔhrT4}e3I4oْg˳ SԳ"xO#yEys('N*:ne82nK&,.θlfrvO0SO|z?T;QDh.i䦧|?3xxVUO|iIRqYxn,gOg&iE̼|^4fjYY&rykX,W;`U<ğ)}M}ʵO=}gB15|oWK1SŦhՠLh&w /v8M1׆e)DSgB^xp@`|"R6$|Ɍ:o0B)aj%%ih 5 T?dz)x,>UwBYIZoP&IfI 3ygtZZ:30dL)^1Mu2'ˢ@*oOrwjY B)aʚ)dω} )g6kHYVVVJ%m-;hEJeD^fVIf<]Ǯ.,̩6`qnO'3.VEyF9O3 T5^#;}* W6a2t!SP6 An^KPtńLsVWaoRaUTvQ)[݈+ 4yygnD`% }DKpZ+쮷L:OG6~VxhʋZkgg`4Ig@ɉ$Ė*ԧ1 nQ?.c2I~$5xC%>f@'|*m*ϔMf>M4FRd<}S|@9 2*3М-82yWMY0C?2qYdB_hN-}J=OB?vG/z?2i$#Py߆41ff49Tr| М>jb4IK[f aL@`%M3nP0CXtLx e"]Yd8, $ҋ3,ǂ4l&4S^>`!i'C8^y3$(P-,T̐g ]MpA3$7Drfv:I"UM!-yf&R}WEL/#mdˎGۯ3 I=t endstream endobj 16 0 obj <>stream Gist Yorick 0fvincent endstream endobj 2 0 obj <>endobj xref 0 17 0000000000 65535 f 0000000464 00000 n 0000138640 00000 n 0000000405 00000 n 0000000216 00000 n 0000000015 00000 n 0000000197 00000 n 0000000529 00000 n 0000000570 00000 n 0000094158 00000 n 0000066555 00000 n 0000036490 00000 n 0000002320 00000 n 0000002197 00000 n 0000002227 00000 n 0000002257 00000 n 0000137221 00000 n trailer << /Size 17 /Root 1 0 R /Info 2 0 R /ID [<6DF23B003EB83EA1A6FB1C0AF6EBBE29><6DF23B003EB83EA1A6FB1C0AF6EBBE29>] >> startxref 138813 %%EOF Gyoto-1.2.0/doc/images/doc-fig-ctime-tol.pdf000066400000000000000000000075551302352257300205410ustar00rootroot00000000000000%PDF-1.4 %쏢 5 0 obj <> stream xWn\7 ߯2]̍^c>P@Q 7 AܽB~9Zg.~d΃Ň[u/pV;oc(S)N>řč=N?cJ=ďRJ+-g{9z 9G\.W:vuV'~:ّz!Ԡ xE^-P>%zg0*a YeX޸#" Pm@lŒEH6F>a"L N k\m]mMk;o)dI@D+MĞ,(VɉlವLh>T!j?ϩ]5OT/Dϓk DbQ?15ū OB,ADA %\IĂ *+I bmP {soҁ:'%N9GaEoFdpb4Z'Ĥy(b|wF }c$ h2IML y %ÊyN%77 Sһs_w?z|{wcߞO!?QO[endstream endobj 6 0 obj 1257 endobj 4 0 obj <> /Contents 5 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 4 0 R ] /Count 1 >> endobj 1 0 obj <> endobj 7 0 obj <>endobj 9 0 obj <> endobj 10 0 obj <> endobj 8 0 obj <> endobj 11 0 obj <> endobj 12 0 obj <>stream 2014-06-16T16:21:55+02:00 2014-06-16T16:21:55+02:00 Gist Yorick 1thibaut endstream endobj 2 0 obj <>endobj xref 0 13 0000000000 65535 f 0000001586 00000 n 0000003364 00000 n 0000001527 00000 n 0000001362 00000 n 0000000015 00000 n 0000001342 00000 n 0000001651 00000 n 0000001751 00000 n 0000001692 00000 n 0000001721 00000 n 0000001831 00000 n 0000001889 00000 n trailer << /Size 13 /Root 1 0 R /Info 2 0 R /ID [] >> startxref 3536 %%EOF Gyoto-1.2.0/doc/images/doc-fig-dfl-ctime.pdf000066400000000000000000000104621302352257300204770ustar00rootroot00000000000000%PDF-1.4 %쏢 5 0 obj <> stream xMo7 +tSQߺ$1CC;8.KDhP$FֻP$EJ1vc~ZѱӐp &FM8-iޙhg)9N[L8[\mL!I [IG,hB'r<`ZNC.#3,klw}jf [}0uRXH/x_=.fp=#Xކ֝zBZ%W1U>{4%b_-5ltQ 9(V*يb+ɋXY/LP5ʒ {%BMXWŒO\+jҋ%KO,YCXLì(n%QlFt?03AfRktG30z 2ff#Lh@&;- aN<3_UΌFվ0Q,|ݞٙe/zfF3j^+ψw2]jGKܪֿTc[hsvt*Z||_?<ߘwtBW66f%4oã}wF#`gCӟ==ܚDܾ Aendstream endobj 6 0 obj 1497 endobj 4 0 obj <> /Contents 5 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 4 0 R ] /Count 1 >> endobj 1 0 obj <> endobj 7 0 obj <>endobj 10 0 obj <> endobj 11 0 obj <> endobj 8 0 obj <> endobj 12 0 obj <> endobj 9 0 obj <> endobj 13 0 obj <> endobj 14 0 obj <>stream 2014-06-16T15:45:01+02:00 2014-06-16T15:45:01+02:00 Gist Yorick 2thibaut endstream endobj 2 0 obj <>endobj xref 0 15 0000000000 65535 f 0000001827 00000 n 0000003777 00000 n 0000001768 00000 n 0000001602 00000 n 0000000015 00000 n 0000001582 00000 n 0000001892 00000 n 0000002002 00000 n 0000002140 00000 n 0000001933 00000 n 0000001963 00000 n 0000002082 00000 n 0000002217 00000 n 0000002302 00000 n trailer << /Size 15 /Root 1 0 R /Info 2 0 R /ID [<0CF0EA744B166F441A387895E7B90C27><0CF0EA744B166F441A387895E7B90C27>] >> startxref 3949 %%EOF Gyoto-1.2.0/doc/images/doc-fig-dfl-tol.pdf000066400000000000000000000101131302352257300201650ustar00rootroot00000000000000%PDF-1.4 %쏢 5 0 obj <> stream xX]k7}_ǔfP(BB&mv4.ctH`l|}BL{`B{,)1esÎ1 \?ViC{)ez•\Z[CȀr Dj b@vz׀@' `n18 F^Gk@ΩyaΖԂB6wi# إqيdJt =Üjch˰kVr:hhfJ ͨKWm#ڇ.cu:2ްdf΢#і1Ps%r.AXC,#K,rՑ%V@> /Contents 5 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 4 0 R ] /Count 1 >> endobj 1 0 obj <> endobj 7 0 obj <>endobj 10 0 obj <> endobj 11 0 obj <> endobj 8 0 obj <> endobj 12 0 obj <> endobj 9 0 obj <> endobj 13 0 obj <> endobj 14 0 obj <>stream 2014-06-16T15:45:00+02:00 2014-06-16T15:45:00+02:00 Gist Yorick 0thibaut endstream endobj 2 0 obj <>endobj xref 0 15 0000000000 65535 f 0000001596 00000 n 0000003546 00000 n 0000001537 00000 n 0000001371 00000 n 0000000015 00000 n 0000001351 00000 n 0000001661 00000 n 0000001771 00000 n 0000001909 00000 n 0000001702 00000 n 0000001732 00000 n 0000001851 00000 n 0000001986 00000 n 0000002071 00000 n trailer << /Size 15 /Root 1 0 R /Info 2 0 R /ID [<1D850FF6462AEB7885CFF3910109A1E5><1D850FF6462AEB7885CFF3910109A1E5>] >> startxref 3718 %%EOF Gyoto-1.2.0/doc/images/gyotoy_screenshot.png000066400000000000000000002201051302352257300211240ustar00rootroot00000000000000PNG  IHDRCdsBIT|dtEXtSoftwaregnome-screenshot> IDATxwtTL&!N("HoҔbEPrUD HU}m ݫ &Mz'I%=S?"#t2I~X>59;wWNN EDDDDDDDDJfzۺu\?Mlllˆ YHݻٳg{upA5k֬j׮]1ƥSNnWvl"""""""""fCvޝlɹQFJ`ө_>999M@#OOOVke$""""""""@c#QX""""""""jv2J`SH,qz%""""""""N1KDDDDDDDDYi$8=ce """"""""RM'V+ uODDD9Xcl6K؉pU\zwHp`@\bbpqq$TS9KtI,$#3isdCxcvu؉[zF\uy|nެ\q&998 #I+sbdq˞tB|_ٴtMVvWe~D8p,aSc9s.zuCKt]%DDDę;tisz{v9:n(b"떹*owB`|ff1yd 4S+u kWn>:ˤuѴA}vϳ/PQnތ4k6kJvNN8YugS?*qGMvN.`QԏMDfWW oXϞ؉2vzu/f[֛pg?0LtnӚ7rI:nc _Jx_'=TN&0gwn ߖY!y]}wgcZɵX07ncr-/FbHseDG9zO?x&='_Ztmߖ\`U-pd cvv6D_YēI:kY,Vrrr-^qq6;csnf3nnn|c.;;8<=ݥ#?=QCo#^$Yَr#ѕd٪[gl6Cص =;`0{ꄆ-n̛U\=VuEDDDIvN}f[X#k=N("""Rv!ڵ&%5 U&m;G 4(lth݊-7B-//܍d{ȵX+""""dr`Q#kqG1͹岡7<)&&-EDDD vjrX"i9{FfMxxp<edf2e | o1c֋('M፷r$>kUEa}Uf:z}\0EDDDDDD 3p-O|EF]C]d}Ɵwб}{yzfZeq >ߗG@P` c{?_wJfVM7n:^ OݎflHU$VxXݻv)aC/:fXHKOsYYYK}nO?DGE9?piv˹s4ZlvKꥥQV-LL G!$WVEUa3gn/͊WDDDDDDDR% ̠!xѱՓ^zu6lbƔg' ~˼kj2#s,1/bǮ]Fzt#QYj)ګԏ/˨[C~YH?av @}{=}$ڵm[Slٶ ͆db`~BTd=;s3pqqe ߏ@֬[ςҼY3:o3'Μ^ˋ/eמ=꿊 Y,2WWWx|}}_ނT]&Eeܾ]{Ɯ4_[7 p$m5E\]ÚuHII`{-[pa 1Z6_Rgճ4H+W!++n]:ЭsgV^ÖmhǕu遻; n:44K鏠 1tF# ~ȁ]vnM/JWڶ};H 89:_;M777lv;.?Y/+[h_p.:~>1c (:Х~孹HJNveXO(%=@_S(oeM p4oen' %""\b+Ι3gYa={t6mǿ[~[1bJ^K鏽3#f3-&7uH|<ͼ\T$}UP!;v} y- $8W_?6m#lٺ+"""""""U['ݙd<E ZY@+"""""""k&օ KR77sU~,n^V^{d2S_ql񊈈H$T6rYDD{^k\...WBĪ?q$>??nrGe%"""""""RĪmw6łɤRDDDDDDDrߝP.?%DDDDDDDSKDDDDDDDDX""""""""4MDD$$c+;FM%DDD*];&"gVz5Qi_;vgYnsܹ"ϒ)I|OycddfVuDDDDDDʱ{|B*[nh0вE `ucXXr_'<|Q}j}JXf-o Gb6pu;_Yo}o GtԮ](Y98oŪL<WWW||qBo\]_9#Wwϙ3g1tԑyO6nć};ɡV-/Ab0J\GWԮMLI+xʓ;g_|ML)[ %99isuk}H:I 2'K^=-7i8tXngH=}G۫11tܩLfggc6OHÅյNdffߒL`@FcYۛ/?^l{GX&##W3|GTuV7ΣS{ ]:u?`4nz{91F?dEI$e{wg0?qqs1Lx)mnͷ?ȾJՎ\Y_;;w[oˋc߷qIGkڴ6mwЁ?6o+Iʔ4򊧼u҅}k/""RZ޽e|bԓej^5t1v/""ミ/XpYrPl6ؚuֻ/ G_㮻3| ;Gò~tݗnr1%&cw-x#3f:1)9n2n$t 1ce{ ->.nvgňqo{"oڲJe G#18/u]z71EN*KZf޽qםZjr 潷'OҭK2#+k[θ096m§_|? fsx{LI㫨x.U:i @xX=uO<0>6~7[Ey~-ǂn{zz2|PbX,>sDqfdd[ln_!"Rݙ =i1~7jޥcV޽X/y3[`ҟiҸ18x3gq7q}>~{d {'NaZyrBBgĉ,cF=o̙3gxrrrr9cxɧ;=O@tTii*D|B^R0"zEv,1А|kת' Ajyy2ɧI8+״iÈħgZyW/ -ҫsލW_]vxe}qС=]G&i|?}ŗpC~%.S**Ke2 ofT dOe6l6&} !øa@VZ嘖x^yΟl70%%^ú X,1 Ԯ]x%&2Yص Hn]yd􃸻_Tp,?6oӅ;fY'LwCcy\3֮[OVV-1ю'CD&p,&׬),|V72c̛%6&qqxOnՊtV^Cb41 }>ǟ민l.U""5)&];wkܵǟ/z@^=Y'ddf0 tkݔ+d̛|zk۶Ћ0c֋ض{=<9w$>MA~Ν;GpPPV+rsӢE1ٹ{7qMK|'5lH$?lyVlL 11\ק7>>>|g |;iiijGW׎nwҧWOF zɤs5m(~F0.:2%")Ov r\TWDD ne֭x{{-7aC1tF# ~ȁIݻ[/a~a;صgo̙Mymԋ,0-[Fyݰ/ny۷S͜bl޺7[ Lh԰a>Xo˗ؾ^^^[uV8xƳS`jF@@0ͭSIOPєu"ۻcɲ5'> u"/ZkV߅'\?6m&++;w}|&Mխb洩 fcX.)XY^;vt\'FߣV])Siժ%O?hkU$w<-9n ﺾ}ht^+o͝GRr2*jm 48e^$6&oM:8DD<=14jH&M0\زu19 qU}Sk?wC+QQܵ)oLhh(Wdҟpqq6mhެ!L:Q#GB Z_ժLh/M~0'NtLLOO'q~[s~Ʈݻe`0{F2ndLݻg>~1}zts9yeKڵmCZz:s/ (0fM$[\>z^ O>9-,V M5 ovЌ8 IDATɂѬij׮]v[NN6ZP׎hdAC\]]iؠO_<rj&M;vps3;v ,LI+x[vv6n]+}ػo?S;l6ӫ߀"tB1p4o柟Q]AtdNaxzz:p9FD|*;F:u"v{#~l,;w*q+<,,(+潷\VVHZ%X{{Il6SR-_DrѻHJNSJo u|8]wAyYn]m?.UDիwQ;GC|Bz`y1زm6 x{INIaАa0?+V"99^{-""*99;9🂃YrEQ}̛ &=0@ZZ:;5דA uEF^Td F.YvYYYxzz2'hM2?6K$fbp"5V-tes.Bx\\.dd۶``geŒd ''ɵD5k' gŪU|ͷ̘"/`g!iS|9{,mZWw F# ~ȁIݻӧW'b4k6Z,\0Xne֭x{{-7aCi׌qqthw k֭#%%l߱Ӧruh֤ 7~w޾i˖" w_j5mо5|222,)GJb8__RN`kt~%NjXi?C`4BrJ2~~%dktܙv3Y/Yey$%';ּX,xED_O%Nnnn]]]9~8~%F2%.nD"#t"00cǎFYyx]V H93Vv"""sVlvfz^Yq~1K][Djrbm6Ŕz6 "FF iڤ & [nc<:!GPX?5mp*5-ٳZVDƈφ9xx?Qxxxjnc0pq1a6}M8F.K|ѰA^zu#ӓ/yp@+`""X"""Nh4|ŧFPP0W`nCRIN<ίΠ[n`0sX ԉ`qtQغm/yPZ6Z̘" '<,ADęFۏO>^}zwm_<=7':IRInLx10u o{7yl4n민؜Z|Y)-âE8DDD;wNppEǖ^{;vKhܤf77 !;+?m'547pk.U 6TjժTuOb+QLD:9u*~%uԡAO6Þݻ9|8ބ*"R-e \Fb8ooo6qfO$;;77wBCCkGttLIF?|KHuw`?Y|j&$$fѭe%"RS)%""d cS?~e"""14kGfqH[""""""""$8=%D*v)_JbC )ʧ$8=%DDDDDDDD*;SH$H%DDDDDM'$8=%DDDDDDDD)%""""""""NOI,Jf0*;$!Cֻ/+Wn[ᆲ۰\L}qrmWDD%DDDDDޚ.%߱Kbjg0yڌbyyzr!DG#"R(%ROԴClAAA'$ݏDz;=B AnnE8tpӓÆb3exY,N>}Qbq|FF)))m6'NfZ,SXnYGDę*;gb0`?L%@DDDW&)`!={tÃ?4yq&>7QXb"_Ŏ]0֕GF?;w 0 2gŪU$'0uҳ4'K^=IIIWnF, aaLyvQ"Śr}qXn=YYYh؇F'b˶ml6L&%9%8zU|g^_Ӗ5kaiڤ1W_I@?/Lꈳ,Vd>|$@㸹<0꾊{T%DJ|D?WG%IH}q=1r=j 27IOYnj{8=2y'xth8x;vv;'Mb0}$9|$:i8HHOO?g+/AؿAY ?yf4lP8+sfs7\fΘF-//}iS&wޅq=w3gq7q}>@~8 %DJ?]x2Gi)$"""%44n?gq-7sS߶lFBQ LVV6...FǰjZF=MٳiQ|g[?`מ=1g6 %EFoԡ1?a6oJmv`1,X!t$.(|֭ /14ifMٵ{%6Y >t0'OEiղE}&"⬔)$Tew6Ěu6yf9c̘b㾾t~lL]۶Wޚ;d<=<\4=}pU)K+d̛|zk۶k8#%DP#%"""Rfz4 yt5>7A!ZU2j8q$aݷϿ c6o@uK[(eퟒ+HVhݪ9씩|{DD N(Rg;ۡv<"8(}yf3q4oHBQoȆ8ʄrq/~YFZZzl IJNfME&\ZǏ3#((k\ͩT|||8s,_]J[Q)Iڵg?,Y0LDGEa1\HeH,KP]5e--S9<9~v+Uins^#<,mݝMfK/ĸ@ިMn:YǼ"1e2\}U+z]ۃ35_B]E)k[x;wOOO>4o+He2,Z>xʎC*,IU/g,ki4.'RSܹu/:%ޫBfL&.Tj*v ??W)kf3Xrs h|r{]#Dْ5%"""U77sK˫D a+b-_Oir[D2(%BG`U6x(""""""5XRUrPDDDDDDj %Zs+ҪN}*"""UW`@PaH9RKjlZZ""""""R(%UJy&jR"QZ"""Un?q̌GDDD*'!!8)%5NuU0JKσ͡5qwspDDDdeg{n<8$UeY)'OЮM;\.dggWv8"""R\.4iuǔĒj&-^ U:=(33LNNNe""""jb6tSK=%,FiADDfQK=}-?ΰ3JM=͑233nD>Hf#""R|=ĒjK#x*v<s*5v;NKKcǮ]4nP, u.EDDj&%ZRsQZzޥ2'$xHBX"H#DDD~+%Վ\3 9~#Y4P-M-p^5aC { -Rq/""R3)%ՆV %""A#DDD?M'jG WmΰT=%nc۶e옇&_}?&MO-[Brrt}#G`6 GDDDRh:ZR(-="Rz- ӞM֗))O?lg>˯扱ЩCr\iټ9}{"''# 믩UÇ -0)FbIP_ekLjS<|q,:*2’rRl˞n?5r}z^FF\Ff&CDx8v8g^.GDDb4WWEsssؽg71ѱ_t^I,\yV]߸iǏ;VJUXv~_Ar7s,1^dFztʘݝdnvc$0 <;|xu699=w$Ǯ={x1gGxHͲ^֬]{z4{~\II иQӋ+%UXPD.c>]>F5|\<<4 / 2Yص+/ ҭ+~;RJv~\n]Wj􄉄0`),cF QH| Ҩ쵴DjhGhHDVHKKg>O,Ċevp0*:XMu"+{g&ZvGddZla{.{>Lzx|z*'; IDAT@ 0{9;14` nR-D5I&aȠG(.)Ad^4mr2ܤMDD:MbB,HW/4K//ҤP(lzgխ#;6Jh񾌗t:z(ߘT`` /rr[ Vbsr5OWi&.C?b}yOwߩ .ի[# yfl,\._guVW_?'M&.YYLNڛ_!VeUʸ~= o}}Tդ_:uhZBDD1pz "0z0"n0yVll,:umCnn&_\͵L,*BQQV}nd2h%x⟏!^Ld2tN|޹c|vxoo؈&?E a`^"z`İб};TNaв*O' w݅>(C۪66} *sGI}pB  UioؐHZ Щcjop'}иQ#(P9EXj fϛ_b j@p=Kߴw^pфzlbܾ}%% 5dQL!x_BډiCDDDt: ȫ00 o UZF$rYMx]]!0?j??Yk6y>hP>V:naaaՆ*{#00awpBZNsiv$tz=  xL&Cx R (HLf|NpBy*XK/7k{+dWVbwb%y~'_*-"u o-zWҮ 3+%ŞZ&NM,R Q"tD ٙAXH#="""*,,Dhh-"+;dC,r9)UksiIEVvb"cDDJ%$?^e$bE.;Ui1d&")())ALL T*{""{o߆Zz=jX\o"'j5{j)O&UfE.Dsi90~gEV `>!IKMLDDͤZ%!9JC,r,"_<$"o#""JRpBr /!yXDDD!مWDd̓xHDVUXx* zF 1c!"r_Zv%ӝ7a 'p'"YKH[nAPPC^ObuB1Fb Ζm#eԉנ_>xt#&?m_~W۶&.>iWFzmqNHvcED2dմ4j5N С}{Lf*խks\<0~fϜ!?`4?8_,IZ(ξd[cF1qj!nωn#C嶟2a*Ұ_1c!"r7_2^ &XD,!Y1?eㅙϡIFHϸ?pQV1hҸ{Kުo{}z݋ ЯOo( lشϜEV-qV F@u#-Mn]Y&EFbm9""rvwID orj$7z Fi&^4wEmCVc҄Ѥq#:99(//wϷ틋g׬lt:̟;3ÇA.?0~χW[G&!77q&˺w늊 pAty:~O'jH9 /uq8?c"d2V`)"<濻ѱ};4jذZ1mh׶ 9Ro3=(ᄝ:v'o^BVcpOvof"N;t:0jpL2yyx`9?<<k5ٸj{ušGѺUKk>%%kQD7yiIHԉ7Y(dee ׹SG|?F QPX~ @DbTysÿCCC1lSTFzmȵbQ5HD_پKhִ)t4mZ@ѶMk؁Bu40WL磰֍EEFbظn-ΛukV+`7__tR(J( $&6Yp[GEm׆\!p y;>GI[@@ꅕ/۫VVq1^bM*'qOtb**Ӊ;̷/{<0~7<7k6X˞*VTK2 !%'\߽z8FZоm[ <-[>FfWK)xMڸjn^x_Xzg] }L[h~խEEdeW7c>+o,~5<9=b  iq]{ۓkd2Lz*fΞ-Xsm~P4nT9I(*˗-++CAA!N9-۶!7/˖.1پ6_}-+&&"((ލ;NEm׆cd1"aDDD33GѺU+‰ 423qEEEXmƢ[q0A,mg((,CVa]qî,~5ݺW_^6FY}X( o߀v駞4y?98|([.X0LPlr\}ߣu5c;f4Em׆,.zfL}3s n޼D ɐPIWϞ&m>hܨ^YZҶ+˖7kuX܎m9" ^_,y:SLƳSBBB*vm(?j}ci!"r'_\;vǍ瑝,PWp swYÿ!ztfw\\\߃As>Lƍ];AA rrs xash׶ 7Pb} u:DFFگI_~}{t77!%ykGȜ\.GTT62-s`vomOa0HDDTɟ*X`a%aI'&""6R!XD$%μh7DG#y>m""""rX~I ӈXDDD^esbI,"""`u0= """r| K`i4H& <WDl/111PT5DDDPՒ۟^GPPRR byNNDdHV3"""BeFP5?LV>L"""|VbXDDDD537j%VbXDDDDDDDXXEDDDdXDDD^e/Vby;`EDDDXDDDX^e oBR!0[b_lc!"J5kW:ݩ} 1""""L~ G`` ~ػ亟p5- cF)my[Fzmj~c.lӦ# 2 .>))I}RR,`#"_nnW,PڵkW>r 7lΑ?u6iƨ`r^ǔkвEsԭSC$G_KGbD7旒̘"QV-<:u#fϝn]c&N|>mc^RVVJ;|[v/J*JJ+L ,""1d2U|.%c݌wߍn/.\L`ȝֿEE0vh|׆xk;^$͟L~}zCP`æ8},Z4ڴnKv1?爈j 'v V/DUbccq5- _waYii)ݲjˑr핕Y<Ǭ]Ggs>qMK@zFF\nX?>m̏m‹{/zS]1r3n ^׻;ݰ(.)(U''Ӥ^00tzw㡉!#Gc1Xzz֮UQQ˖i&c]o<$$QQ6r;{y zPU}2Æa'`".ִCv5b8bcpQkuccؐ!KC/]l:r// ?l.\# Цry7LB6վڈji3=pb%q k0O?V#22j&<4퉄zpO*C4(++E]G#9+;l؈V-[ =%))/{v$h*+KRSBh4lc6kCD) <jCxaa8t~ (jm%OfP9GVbXt11ix쉧`:r/2+JJKӘ3_EEE_-۶!1a_r6W>Xx[Fzm\5g/?*ά ƎM6 Xw2,)ty/77iiOgwڵ]r96vm>CBz޵+Ыg۶L&C^u|ؿK0_s1ᇰdKxdChݲ%:o:~P?O>ۅaCCV[#Z6hhYӦأ&B'NЏ0t`d2k4شu. "ۋoİC0fHl&˯Al#6D]JKKRztvK@vء7n!S) %xٳC8_۳Α?]bƴg?wxf^[2zy1ѡ];2""""8 R.I&twHDDDT"#"=p3(--tw J%+_` XDDDDQQQhh4Ht:ˡj b9giZ7DDD$}ꊈ+ؚHҗe_t|υX0DDd)=GGnDDDDDDbY](UDDDDDDDD3sbzRDDDDDDDD~gB,""""""""_ ̜Xf뗭{m%V[\//|r9;x(;;Ov]9Cb%N""!ռ`&l{IK^Wzt:ҾDD Ƚt:rʏj&y?VA\l,XoYc[<ܳشu20gQYTdҮCv5b8bcpQkjfz.ByE9&-DttR\EBtxqaOw}w7ؼXh1nJDDD`xw{!v:۟K/ccؐ!K)"-""s!.@CDDDD=ztn] 7oAqqI[#*2ҹay5q[nA.6CSn*4oVٶab"8} -Y;wi cǍ_}QÇY.\?7]w5j(1;\LlCvءCDk|.""""""ߢR):c_NSkeFFFoGzze&Ύ[bIl˖.Ʀ-a01?: ݻv\͑ IDAT cd2***,^b vhhҨ(@ZzZR\1,+..FNN.խkѕN0u;t֬¦wFp -F^^u|C,"""""xdffbw{w2n\ @xx8 W_AANPRRbnmq//ǏڶAŠk8|(ʉmЮ=4qqXv~=R\;|;={rиQ#z\Wp8-Q͸Hw-ԭښ\w4?^YмY3ԭS~}z|[7Cug!(Jrx/̝W^NBxoڌu7 Zڕo"*29VZj n\.w?EEEX]ܼyV1c3 /رC?n8Oçd2N$xy7<Ξ=k~>d] >gʞ{0 vH߸NH/z=rߺu Z.ۭ[UU.߶=t: P"&&_dٿzXDDDDD"#"d2DG\ߝë*rq""ΉEDDDDDDDD^!y='$""ckOϙEDDDDD|C*"""""/0 ""Gzdfg"3+%ŞZ&NMư!Ye-2 ,gEDDdfg"'7a!atDDDRVXXPO[EVv2XD@\dog-k`EDD沲("""oJaaa۟^2Oid1"#bUnx["""s%%%JrH n߾ Z-z!5-հ!"):-UBˬDr1NJ-""Vj5'ɪU\3`007:?+̯t;0w{ΆpDD~?3" J(x֖ KDDq&""fRȇY |-t{z}m-#""""""X2^&vuR Tfm,fޯDJ,""JRpB"$R%f+1: |/"?1"bb, c@S|gm#eԉנ_>xt#we;ڜ;nيGBBTbx)U] pB"/$v*KaCq 14o"".BAVq- t3"## Co9`Ѐxr8rrr$ivč|09m\.JĿ^P;7oA\L 3|x]g0"01ZT<[C 'q&"~]P(xhjWTTuO{4d2 B 6hݪeewnn.-}GTd$`ؿ!zuחG& ::%k.6[DMK a]…""!~BfRSe><=@RydkAAAU-*3j ̜>0{?6lڌF֭lCaq{ 1>W***]_YYЯsT!"rʨUkVֳpV3K|!g TfX2}A$=9x`9?<<k55m2TTT@V{:&CBBl/(/}CCgX޹SG|?F QPX~ @xOc._~5`Ƞ[7t8 jа@r5ckNbիP*wԙ3 RӟtɈ/UU,*V}[Bhs;?7n߾I6i;xnl<4qr9t:a YܮcicoA֭vbS`CD,[)ӧV~~Vڽ6T?:z1ކ=:(P:C ' ÆA}jw2^Yy/FNn.N:.>TVդ^1YBh4'~"^="#uzl\ ź5oԯ1ּY3> Iw|b6""!IUaqdp| *bx25mbx7.pý"c^wa,1a_r6WV]PTt #תU ۶вE cta.xOKI:uPQQa /"okNH>v~Bc,UiQͲ}BN3 r9+p-3g(Ukؗ=r LOOs 1t@q<6 ƍ-LBQ-\̰Rz&  8u lۆܼ\,[ci=(//G֭SN-[Ѿm[u0;vЏ7΃=~΄U7 njo6-M,nMyƏw1&}Yÿ!ztkb8 |߃AsdgϜ!32pl|{-`5b:uɮǎC^}-fn,HzrE` H6g>~Qvmv~I(c|׆u>r{wZl)دӟ#GݺtMl=m.^o:ΰN6mI5,s9ƍHסb9>@I#̲`ЊX dy7kX"bu!C\9c׻۹~: x;3@BB*?|\3G&M\AD5J! ! 0k̈́USֶc)0ߗ}ZwɞЋ\A'$h$g|9(ז#>T\DFFd;U\]a#l6aaah߮mc_bG VM [!rkZekB-}'}q'hOw,` Q% Х?c MX [BIXh>P8ekBwډ7R?~&sgEDDDDD~ ʐ>R;;vTp&bAy`"""o#J,'$vB[F*p̓e՞,Vg+""""""bE.%fr R İ5/y啭!p? +*I˘k~OZ lkVKjc<? 8ϼڍǔ=t76J,rڥV9+,jmMJO[E%f8".M)SФQ{;DDD%J|\t8 RHem^hW YGM<7[dD$qRD|\|~I桕WxKeNLe[X""r DGGC@.DDDRP^^VkX&j?[ /r0q fhZ7DDD$} H4`5˜P0^Gfv&22Q\RUjh4j $bYey,D **sbS* z=yJ K!#obC,x| }H{ &&*ޗ}6jԴT2 > 󁙇wU,c/jL ?LVZ! 5o MWa ]'{_tdd~t;O!""ƯPYa넪!&HmKjo-ę "W8y3Vb D%*Cx, |y.,[O8|BrŶ lӎls'""""?~qɺ/5Qb>qJ'kWZ ZW""_)DDD^$8t9G\X5$vX9kmR#"E|BDDb |7_OK̗e-]9aȷ>s־?S A}^a]_~WDF ѫgO1 Er *zaBqlܼq11T~jN} QQI۰a=r}vUޏXj_}xXMLzdztX]<ܳc(""wJ,uKR~Abm5ulݏFByC,lYB]|ձ_,޵ V! 7_BC'ٵn.]Ьiewnn.-}GTd$***ֺwЧ׽H?2 BMqYnv`ؿIRn]r<DGGs;zf<;M=CMK w_+\HI1,ѽz pn_~E !}vUYf1W_lٳ=h.|ŗ4q1bܰg;DD?Οo'N%/879>DD&֪5+DmgfuzcEd=[rG*铵Z9;fa=rvUTT`hڤ ~lpgk4qMwدڷkkr\} ""rC,6̫rm9rWb3~LU UgY 8ԐJ%>#j1ػ?[6LSжukOub]6O\kX~=.XwlL߸}6&MxhfQQZHBsf㡉 ˡ OWpj cnj͢"<ش(?m[/Ǐ{OLv%'u1hצ˙%gpElݸՆ`F¡#G;ܬXb9rˎs#^׻fzt+Wp?8; b;UsI 9[%DhwogיOnAZ%ʐ[:ȸv 7,K@I/^fMιw݅.20W~)R*R* '&6Y0d(>zcF4\WTt |)kC2JMb ??M nm;ӧqZ&bbqj.{ ׇ^GEE ac̙h߮ayfмY3> xLJG& =t,Z}ɏۻ/gnWVv6ٰZ@z5g\ŔTtؗ="#ѮmZ6Fw|ZƜ p)oeֹ1jp9!6LX̫,v1sE7[RyC(1C \:rΝ:Б&!CѹS?̞r9?/!5E̯ xrxM޵ EE }"pŜZxd -U-L(̲.Q0ushڵï_oZ hР>.b%1S%ef?Eq-\.C޽&V._oq_01AAAvntwwhvIi)vzDƍL+0驘9{`!?Νa}CѸQ#Q۩RVVB:s[mCn^.-]b~xst3z7nb݆ E;?ރri 8u4ݲ۶Ehh(?yV0d*'yOwr~P oIoMM|x<ݲ ZhׯcΝء=Zjc({|qNH6/*qlU㸻JhUL^.xR`OՕعu0΋Xv-RS 1^;Qum6X2G=i o'ObAˆsp_ UQ;p1Gyy9k00vhҾW/(cz{/.J7`]6x'M|q9 ֥ $-4(y k"0#ǎN3iۦ .Zh_(yd[11]eN=ELL4ŗB}0m&Ud8b LJȝ|kY;ƍs/}E()fE IDAT, zV. $}Bk>͚4qڗboX'V~n9ƍ55kKÝ%_lW>7[sP;>VcrWX*qHb=2Wn322ҩ[liѝ\6}!ve>s1{CDDpB5/0O-UeyWOnNLpn>K@ D[C -]/K""k&pBWqƙ$Il5X m^$x?2߿Doᔥ@R$"EA4iGI+??/]&Nԫbֆ` / 1jUQp%%&fklhT,IڶcN9yj>ڲu[ W:[aJJvZbkb $\HbIoI'8O1jV~=Yk$!h]h.6oF]ti="!!gQGڵ<w_CL 1޾Ldaaaw{ 4d<ںCMkmc ?P濽Krh{Y6ULعKz1Vݴŝmwhe##Wd2i5E1"mf{a.dz)I\4M55G4ч}ކbpɒ%cF;t!ʋ[.Cضm:ZiM[IXY翷s-2mi&}kܹ8~.((hK5lv%zИGu<>{ӪVFzWiڔ1~`?_!x|lzj)==]F^{%IcFCw|ކbP:x𠲳 U:p6{& (j-i ׶|`fgkhHdDF {X4dUUVBd|j́|lC 1@(=b G+nrķcAn pE)yy~v}نb~&}JP׶U+70rR+#?o_6++x9&&@7|dپTwtqKsS,;}x:6с$V\ۏ&oo{ޒYI-csay5| 0H~ @1z%zj* r>WCCdXQcceHby"I GR+TS2{kXLh+Zf|G Q[* -#%Lڪjm{ޒZ-?_X75ܝsp[ =v4!`N5R`ű$XJ}jΌPnؑ[}UHw '`m[鲎$bJ[0 T[UZj1oX[X&|o][nS*V*?'_̉{)))4vR$Hb!j9'$!1 ZKHy;FޒͩVο{kߟDR{ھ/ =W۱cǔT*Ľ:fn+99Y%%u$<%HoWh ʗdd{Nxm/_s<Bf:$g2ZT\BkNvREwުZx_־wn+OuWGw ^8BwX! ,5:omvw[_^#mooŒNq X ΏE+sC`m՞fwx! xHby7{["Xyx*imP||^+N!<%<%H`d\ZUZ^JF6>Hb!fVC"ڪqwV"RSS]_!@b bkܙ;O hߜasܫ$&֒W%I8khySZ$]1zzچbᄈyba'yռ}akzjo<%WSjO/mܬ-[ꅗ^־}4cZCL 1jPm Hb!fy< hkΫZm%}!.Xw=ES?]4gӺ`6eL&^0XIIIZ9mظI}8ۜvjb;5LB;9,q^8S$a:dsn׹ pZq_SZ]%%=d2\euH%$$8_5JI 1caaa2k>-_3J,,5iռu\jzJ @8ƛT4dIK/ԉ;K?m++/$u.,tY\UVkb $\$sZK6dV/u=c=wMEUQYI$H^ƍJOKSjJ&Mɮ‰QBB55-#l6%%% 1Pi|3IY}11§!p0=Mc:4/C/:o_d˜+%%E{ղC4{J_~u yT SRejUuu,_CL 1"5O65?ޒ6{{0si!V8XonԾ*Ăm;vꔓ{;%-[EWh֣GwuEˋ]_;ׯm!&OXXXXqݞm%z~y&S`s,yRh<%I,DHUY5[76t$MK+v+Z^뎫SGyy<"&&@7BTaBͼ%}rh9*롃LZNtwB Q#ړ-T=j?00B0def+%9ETa7DWb1Q'Xgo}=2 d%'%G@L"V9UZ~TbXθ+"E>n,ͯs. xiZ1ժ4sw* 7{NC 1~ǸIt\hX#hf=tHVTǎ}o˯=UR. Ҳrkԥ#X՘+%I[6Hk%Rˬ9Ojٟ3**QH)-+Ï? I>tյQi5گsf锓O5.si_xJ !Iz:sp^F޹r??]]vbǗ}kb $&Xs˰=JR1cOݴiTTTnD @(**rY"}r<'ݺvq;I988xPˋ?9RД*-+4jH$7y T^.ZL+|j'''[VuQqrݵd2bEsWh䈋E.ib $¡VQH8+]cǤFɴdرcH<3bh DwӦM?x׸sp\Pвg銥6tXp;4[srssKk뙧*3]uwݺxE涹cu˯wݫ]k4q:tgH>}C[z 4cK-SL5۔(Is5:6h m*ցdIb#Z.h1Eӹ$V(ٽ[y1m޲Eӵq&͟;ck#o9jw:p𠊦ЖtbB=pÓ?6H Ib1X){ɛC!@%@<4$V@K%@"H`v)Y<7DWb10N1 X@'$<07{\ʈ+qWv{K@k~#\i4YHwjUPep\v u^ܮ={++++ ZeZm6Y ,*S"$?rs$qFF; RRRTXPXE @<_ ˓bQBc`Dfs#e0  H`fsP $pQ pXE!X @0vUPEe;0e)XG(호@0Uо}T^v^@DUWWN0l6UtYG+ƑS$CJ+77q/%%E۟nWDI,b"hys8v󕚚3:fn+99Y%%u$8Ċ!\p @43j%'̄#H` X1B׹8*hbJ,X)F D+JqBbنܧdzt "n7/>Ȅ@/M[JMMUbw}نbPJsgJ?1}sB\TB =4͟3[{TU~=;GOLSQV^^˶P?ϧvVYYsiOitQ-JLL hb $?F1XbA*T,oBqvꢟ^s$w@m[_ljG^O>ES?<WSjO/mܬ-[ꅗ^־}4cZCL 1jPm HbEXbA(Uy/Mz萎;&WonO9s]X[nUǎ>TJJ ૆͙.tM,ɤ VRR,|N6nR3No6ڇbqC˃H|c…XYv|s@ǟW_o$u[ue]nU^:o֞RIҐ#$I/=P'vggҲrk;X՘+`sx:{F c_s TF=9qښp!߬9O{HbyW/H`vl^SD͛5SZ|]#V~vUm/DE{R&!I ӄ2IRBUe^!@bE+H`v$kڰA;wҬթ}Hz<%&%%E|m6.j۶$DŽm{f߾Vuu?4O_*6' ԸuYf:яpK˗vM&7׆>׷fӦM?x׸sp\PrK5lvݻG-[$I}8]7nss\}a;W%%գGwM[q钤:zӍj*>C[nӉ 3?_!x|lzj)==]F^{lz萖CL1JTvvaWXf$VhmXVc$G+v9rD֮|gc`Xz <՘(++'݆bP0zk$w' X]y}y4?έhIE,I_U999nחm!&@9 ֪ ZDc["' Ѝ?gq ƋBpǹ @$VkS m@,\ VE`+z8a_PqQ pk.˸( ^`hbJ,g5HH`vo6ĺ4sVkBj*] QۮsB2R`ջgoeeeE;DQ+V&KE%{J$`+nNEX dHvi捪tw@};1Ċ\QCCdXQcceHbAėDhc\>㋻$^5Gj.hKsw`qrO4rZ[$D7 vUPEe;0e)XwI,g+ƹB*-WE ڧ̌LeE;DTuuN8VoSJuq UZ‰xRR9ebw@KIIQffgە?%Ips$ @9v󕚚9d6 ?ݮd8e+ Z@[19_$L y3L-*.'Ti/`G86$qĒ*-Ƅ<Kq ˓KbE{B*-M%bUZ@|dshC%M^ *-17) gI$O$ bSF M 3aDBhi7/>ȄtWभDVua*1lgi/ϋ@(B%3%Iwо9UZq.@~xpϙ޽zkV}v>8^FӞR%%%ѣ4[66[V~^/uKc[l٪xSvlWIn2B#I>\{'OQbbV-[cALxb:\Zx,XMb׶VE_=z|)Ur2U~znfmٺU/ۧӊ#룏WNNL oG^=OҠ]D`HѣGOz<&Y8I:P^n*+eon߮4p_:J^9F~Q=OrWU΅R={ʊJ۶$DŽm{f߾Vuu?O .ܿdk9\SsKqN)ݮݻw+l֐4uFǫyZ;%&)1QnۦEWǎ}i/ϋe0pi|3IY}QFJ GF}e6nʽ{gt駩[-/@۶oWCc/Oϋ$}X - 0$˕${ڵ6mnoԵK>\]ɤqRGڵ<wnP;aҡCuU;vtY!I Zc T?e2544)S>=/baaaaw{Nh8nާw^,5wnͭ%ѣ5gUXT)c.~iǤ;vR}}N9v[XXWL:tЀVzzZ1skҽS4bE=b]z4,tr4Gyo+*qSSҳHʿ-`Ґ%Ic.\O̚;\9y S'u֙A1KF>XX"&<1$,Yb;vl>&Cvz<s~q&.+=hzצM?Zq+ja$I%w/<[Hq6nܤs8Z?uaeddhuw?E֛nlWTڲuN\gLWnnny|Xz 4cK-SL5۔(Is5:6Nc}%%&jʦ=>k^y5ݺu՟Mө}N jE/.tELb Bnͷ{&9&p]k࡭8p@YYYɷ}6dgwJVL{"&<1 FObX‘b8a# H@oi3 B.×999nןm<eL{DLt}$V6M%8>0"X\+@OSiHbAkB^0p%V0.FC9["yMZtJ+8Deٴ}USSW{ikխk{O|~Ǻ4Y7\wzp U"(+یE4 cТ sbκp߳p g=vLVKOOӸkѣJLLTbbUs䈲23jWIKl~[Urձ!/ h ule.tb /_$nuuu2ξ*]u|eZfkY\Y<~=N=UFԣ**+5so>7+!!A@wq#A~=>k>YubzhM=!GH^z~tյIwa׾4Ax'l^ I1D=$"lV%˄$ÈǙ_{+--SUjllО2>"I={4딒ܜ7e߯[~=NiiizͷtĻ.m744SR<#G>wq\iEU=Ds-\X4IRnN8oll/6M>p :uc3gٳIb@+ ĊP4%P*T*m _~/RϮp.$}iƍzxt$I8Cc^.qc}JKtر=:^f:qzFm޲Ef?SO9EtR3UnNuv6XV2ґsԀϖ$3pyy=zTf9 #X~1 UX7=E_+.dʿ$ݱ.--My*//w-)Ϗ<>;;[Tg$/RS166g4EÙ IDATDXNl `/ Xqba$dnIj}߾* 4%6//Wgեˉ-mzTxd2!(}.! ,Y6/UZZF9c;~:O=>kV|R>TfY5K]c@NO2}3쿎,zt,}3gH\Bg(VM]DX4Ũ bsBKZ3w@lKHH_?u=fa%$$h'LHiiw]MׇƍӔ?0YW]{rʾ xQ:>zb~;Ӓ%Kcǎl'81$7.;rA6mz;w-_b <_Xx;L_9rD6MYYY.Ke#?5\Tr xz}h-ѣ$I]/u ່'ĖX  566_'ɤݻE;?E S zDCy@tܻWoM},wbX@EJ+ÒIX{ -eeG+D4~1!` PWiQ ZC bX"I`"FbhnW UTV豣sY,,u$D{*-p%<*0WO΋twjp ۟ަʽ.Hb1Έ o)*V*?'_JHHtweffnv])S\Y$v;B [;oǎS~~RSS#2hRWW'lv%''ı$!C zfX?ԢkX|*Q !8͌Z I,hV$-M/+N +@"@|"DnסCD+55!@bħXĚ=w$7g@`8?:UU$uAu붛oRrrK鍷MkEv';'CJHH #Yff͝=JJJGi(11}نb#c8!`%Z~]2|l6ءwjjj4{1 Zr$iيb]ڕ illԟyD QRRRПk#룏WNNLj _O?z ><ϏN;lݦ^X|S$++Kt Zk?Ts~wf=0qnfSRRb6}نbiOu>x礈oN ,^2B+|oZ0wn8uwCuo4d.ۣ{WK}yp!ի\o ,wv]O}J]rn&벑wߥO֯ח_Ζj.ZVUWWbhחm!&7$d[&;tZ_.)XW+?P6mrٷ~ 9r$3;#GCi ԣGwuEˋ]wn} 1kXXXXBØ1c'e>UUUzֵo߹]NAok.x|eu6uf?ԣNC:wouU:$tPrrJvv,?}L&uf?ƛ:n]jF:I>[QO>]vi!!A))*]zdRCC^+:\Stzyi9_*!!A.ZJLOF#G\+F$M..vL&SCL 1 Iaӟ]F4p9_=&5J%KǎFW6mrkƝ;p炂/]TÆ n IiO~wNG ; uuuk~=4u~~ub]Iqo󎞘5GES[l| s￯b}Rb֬~o{=mٺUy:st۔Yl@eeJOOרަDIҘ!-!@cķ*;;۰+^UnHb:xhoߚ(++1/|نbZr# SJ0v6H 2I,ĜP'&@7Q G%bJ$ y_Tb QC%M^J,Ĕ4sVkBj*͜J,KEwnWQFIJZڶc,)D 1&';GK7oTmmmB %%EM!Р@ԣ 1nbo**+tHw9,KEN:X){+j232Q: ?[M{+]֑@L[|2; (33pJٟ"r1+55U&) d6 ?ݮd8֑@1$d2L_  >8SofFJ,D=*s+E%b ,X9&QFFzmUWVjj}6H 8JsgJ?1}sfQ?PYy77vUUkW4;n]< B>'lzC?ŗ_겑Ķ}^|Y_mؠ:kkƺz͚;O{JK+F[oQbb~ 1Ø1c[?)-׭k-߾sz+3V}Çkԥ#jѣz7uAѽLRNNv@m?Ewu><+L=p|ܼ>|X&ݣ޽{PuwAdة]qF]zNТ_R~^N;L&>X}`c8n:j_Qݺp-6H JMMd$iO{%KT{Vj ĘFU߯luL}}jQVff]]ڭWMM]SZ]%%>B۲[o*))I0c̹܁_0h>*^JL 3i]0|M2Y&IC/$-X6lܤgҦ/ۜvjb;5@WU!G?Y#_\K/f:GE1 ]qպW7j]^ݿO/+~1V#F_9Oϗn/oY+WiWI !Gܥ}I9'f/A\>0E;wy3o&''d2I25Ʒv]ΒdRiY5ґJHHp]5JIֵh×m!&pUWw5 P?s| fl6=*I͜'f9~"ݮE^V\ޣ]N!ە,RtO> /=wMEUQYI$pMF7e߯[~=NiiizͷtĻ>WJc\TV^&I\X\UVmц/CL 1&$@8w@ 8lI9ѣG}Nm޲Ef?SO9EtRk6u5c%IGQBB^xeعS7\wrsU]]wW_iƍzxt$I8Cc^F7WkgXs ]#6!imvl6%%%hӗm!&__W[牉wNfz~8 &H*ٳGTX` j]uʟ+i,_+Iѣc]ZZT^^R0.׮DS \nٱdKjUuu,1_!@bMHb?{E5l' 䐦"h҉4+PAwX@lptBXXӳl|83&g^hp0 5o_H^-f`>u nھÕۃ~85L|9Q:48+gyχc?ǐ;F@\\~_چ1yqpu1WOQrrrNIhҩc~~~ն'&%[nMQ\\iS&d2?|F Gnٳ?Fdф_!"* gΞExX$I‡! h4j|ŗapDFDԹ?qc 00xD=0\2Çh/.$IuRV;EjZ:.]BzF:uAa0`;tJo`򤉘9}kW\jȉ!"bVm?>lD3&a#͙3;!""jN>χwaW۾>3޽ɵ"-`8~/-??=.Xk8},$:v?׽}V /ǽ`ˠkܯNŋ}z聒Ry#^x'zs8w:DF`sk!JR}aǮp4!e2ܻ:vtqQu %`w^<֫J1e٣Cń⿟yغc'RioC>ՕxEAa!|m1DD5G```/8AJ,b5X-[ii)V+$IBNn.χ$ 6_o sӘf+//ɷՆ1CDTQk/bo'$""VE>zI4zAxFkBbPPPa c%Y"""""qDDD5MޚcTH,""""*LDDҴXH,""""""""j8Gb9Xq$yNOADDDMzݟ<͑XDDDDU $&%{t:DDDZGb 0`L1`LP` Μbt:DDD4 "#WEDDDD^n#$$ g ""jDQfjucjtRKDDD/]QǑXDDDDU$IBfv&22a2<5VC0sXDDDDU23q92#$0yTQQڷoڬΪE,""""*YY Epp0'v'"6O߿'I4J,ȫfBBOCDDQt?IVaL5:ױEDDDD^GӱEDD@f}OlA6㯉밀EDD6T|H,""""*}ř%k#j‘XDDDDDDDDq$y"""rh#*őXDDD2DM_DDDmGbɠQRRRz"j:jT~J0FN QSXl,YLV<)* Μc[GNN.ar`Qm915* .\[6n~ͥ1UđXDDDԪ! v_1&V -"#뛰a= >>>vL:a8r} A<%; 'NDnn..\Lѳi;Ԅ'V~Ew-v"#"*o׮Bݨ6a""r/Uq~8[f+ > GEnn.°`@ii) }\LJBǨ(+ځ0ځ?@jj̙ >>>[w:"VzeVp`P\RRi$I(ZR)Ն1SwwYtG۰FQ/NHDDDʔ'/>ׇعeݵyR-y 0e-x+8Ȋ_lR}8q+!{eܿd)_ ¦|mVM'Αh1`04 c#'܋E,"""+_H^-f`>4AAmص}+zyv-rss xoכs=z(^2;c(}Gp}01rb<9 .\111 """4_uI֥;R+'Cָf჏~}v1) ?|̜̬,?qc 00x:~ ARDM/ IDATVv6Ν?9gCd}AIpyddd"22\3ѥsJA@]F%#T*%~[wɓ&biV_Ǐs c#'9X,hߑCF4?cfaϞ=Ҝ9s"" n^mݾ0~xwDW:o>KԸl6p=p-8w_ymz@Ii)F_@qq1@a}d&8y$}9mjH0z[wDjZ0mx2.((,āov c#7)#00C Y%E//?("((0vQQPXՊjCf 5n'~Kۮp c#')":XvB"""*j91S(nJVAV5EZt+ו6a""j,b(7"""&@oMUıDDDDDDDDq$yO^&""jiZH}q$xEDDDD^#ZH8^GAA ""&VPPN#ȫ HLJDt<*((`7b"y @N9t h4DG8`nGHH  ΎADD\"yZ餖Z?^""""""""#ȫHLdfed6y:"""j:p a:ȫdfgreGH`!""򨢢"o߾gYUiXDDDDU`NNDDmFO$hr5 Y,bW1 V NȣˡZ]$AVØjtcNc \ Pm5_amϑXDDDDU3QKZGbՄ#H,"""":EDDGbU#ȫEDD6q$y Y$zJOwjlȉ!"j 0kӖ %GX"""-999Οq5q4 w/\Ȉ_0&'cQa.\piꥬ ZE` ϘlEDDD^&*ƍY3u/`obuѩcG,\0Z2T*ŸWRRSqh͆׷)(EP``m6JJK_mdRH 7;y4`ףw/Ycnm1jXScFJSѻWO01i?"VWZQ큃&큃{]8m&M-w}.=aFOt Scms0iLl޾$90yf,nzw擛'WƤ31sݸt -ǔY`X˰X,5]7f j5߱_SjOMKGZz:M B\?;vp|4" x{vĪUxÏ讅dbC8ݵ[@¯ÆSQvl0FV XDDD*(|H]2 8߯QTT!Wj`@ii) }\LJr>Æ > o6L&/&̹sضu ߑsb)ijU7{aǛpםwq1l޾}%627!\$IB JȊ)wYtG۰FQ/NHDDD^/77Ui}tXZdee㾇Zqa2<s\DDQ11,"P-.=#qR$+ ]gIzxE 7hBD#hJ PTTȊ!""b$Ixoχ]mAmص}+zyv-rss8!vR X‹e s|'.O HMK-$ı]o"n7哏`ɩ2JKK㣨O1Rj1 *sGp=c#+Ɠp…KKZj{nH[]"""rMNNNU[n]#6?|j5.8ǁp;qӍ7d2?|F nDZ_~BT*sch8GKF#BÐ0nb8>g}wxΜ=c {lDFp ;M""RpY!4$χ `$J8{<222Q#3ѥsJQEE8۷g۝w@V}_@n-+b^=zFވiS&;=q8_|[ˏ~~z\2pYIs :ucr2^}}N< Iо}{̜6 o5H-GVu8^/ΟGHp0n1K?J}. qm?;v"5- ~~~6f<PUȉ!"jJ ls$yCI޵;<G֑Xp SX"""""/H3`X<5F,bW `B1Z#Qa`ZX"""""cZ+QKWDDDDDDDDq$y:""""""DDDDDDZ>cZ<cZ<cZ<ڈU|X4rNFO[OBDD̈́E,"""""ۻÚy:tssr+֯{~z=V|ovuc_^b<%; 'NDnn..\LtoQvB""""61ltƈÐ Ʉ!8(:CƐhHMMѣ`tCG83g%ѷODw~};nL4cGB`` ̝nIIQ'NSXt ƎaC`SO.}apx:fb|h*?jbצ1;wb⾇Kt4B Z}Qs`j$v{u!!9&:Tkq[ZX59!k_xܻ3NJ)̣cr2BCL&\#GC}[UCR4uA0x \LJk6g8#"jNjLv?CII)Ukñ_c _86lނز5rNN~t]NWo }| j|ƽn5)))o|oTDDr {̙<ӧ&<<ں}aH#a6Am/))GóϯÞwF!"j_s`@"4$ZN ݏDQDAa!lV+BCC=Q۵>HV#qjjU.au/ɛ 2VM_}Ͽ;)Q"ձ_PT\QQ8{<>sL|3|||<y1ȭ'&b Θ;tZDDX""""""{l̽m6l6|}#GhH~4  """" XDDrEDDDDDDDD-/W$ ٙʄlt:DDDtZ  u,bWo珐OCDDQEEEh߾}j"+;:ȫdeg!4(P(8;m?IT*dEDDDD^l6#44Z x:"""*//NkuIZ cѹE,""""::,""" 4{bs'BMDDDD^,""{>GbWi+DDD-YkU""""""""#p$CkU/"""""QđXDDDDu+dCBttו6a" #6mXxy%""""R׉OamHIMJӰ{T*ea cQU|]tKNNNU[n]#%ዯQ#ot*䂴4Dwv^ |ÏX6:ܽp!"#"GUw c#' .\z)++Vm=6tx3&a)"Gb!%5FOA2vl޶Fވ5O?A0fMPTع-`t:~xf'B5W pD1<@j좬"7^r 4a~0?y<'^~x#r?]yVDǿH,'&@ӹa~0?y|oi Ɯٷb͓lSZQQ1Z-J׏Wi/j^0 aӖ %5EJ0MZ?5yu 0MMS[Cx _VzF*<7JKK)3N" Qt{u9~7XϏTп oIJZuO'7'6^>mבhwߪ)K%{q%FC?`63?sO[Q&%zE ~EA[*3<5vrx Xק?3ڟ-ې Jӧa}BxU_Ն~?~S'ߌ'{nL~Dŕ(NYVgAܹθ<$vg___{7gk*m[bñv3.d66/@c-$N7A= k\$ y?l܌v by D>\W.'s(o}zKmSӉf?ރs?˗ܚՍnc2ŗ_#((_ve?ɏZoPmS$ $fsU*vڷǓ?RS(bK/aPTϻ}~>G.A`` ^_X X]tm>- vsCx:}j$^ubFVv:,X,ZFDx<{'V@=f~0?y2?'Go$IoD7|"A|a9 FoAv/$'d_2[nREWߡ90dN0W'kWn'z`t0.$^DfVn9 i nm1jXScFJSѯoF ?* s\ب{Z" I  T8c:Q2̲ݫ'ΝݍY$^}`҄5n7i#l6JJJ_ԙL&fp. 4$ E/0LP*h*++Jjp'&^𷅋|1tcb^WRsEP5ۧ?L&Q!"mUUVV(V+`Ueeeo k9ZJ­߂a~xu~/ JHUFbYK/CNQca9,iC^rk&JU(= ,iCRKEXoEΗBs%(=&T=&AQm4XC~ ϞŮ[달l<*T*~-/5-iXlicga箷p8>16Zڳ v58?jy\W]K7i7\a2 v:o~w(d:H*Mz,vsbu ÇۻÇ7om'8n!|cb̘6?:\ؼ؅?N(S{`İ8$_>п?>sfŵkѵK4 =#ϿN9BG%A=po~P՘z$,ZGmv%?;[ hc__y<̯qꫩ>C>W7nUUZz 2"v!$8YYniؾv_g20?8FϽm6~>|/ ܶZm~Yb^xeE+^ u,?!!vL:a8r} A=8 F6B|i[~sbxwa۱i;Ԅ'V~Ew-Ť$<%; 'NDnn..\L\Uc{T,bkc ATT'̟[oDذ<ĺZ@jtӷCaa!3\ӭg+#j,J -#Nd #'5WH,qU^V I/UOD$WӵYJЋx%dK_g=0</|z̈́"g-__qMnۻ7L?9{HMMÂ9s`tCG讅P((+ځ0ں?zొܭǗ(T 0w\toI0pnuAQkMė_}c̨qP)?w+jXU&veJziUK9ʊ!BB8VEV郳(Ja?(́-47|n|A.O'OKOK ,qRMM'Ǩ1bb PTT65qe?&?}||Ѩ?k4jVEQXWuܵ[w}@w.\ɩ4GVMMZ-+]W^zR@yVtXZz]Rt=[CWcHP($I~{`D7@3?y<1?7RPMDEu1fAE ~ [x:u AA .=j, i~Mرsk_KXoN/Vb~0?yZS~<EFG63$S_Cԅ߶CuqP7: MG}1O̧K! ]$B7H0?y()-AzF:}Bnry?y+,f DJJ廸cGMp$ E[YA.9R(Xr}X,־"JJK?m8񯰨: >bb`ǪEw#`@Ff&A ™stztRn] kc ૅMwXTO9 ߔ`v $cVg(G39=_}O׊+V$e0әXvaK5{\͞=7JKtiNWpeC=6^+K̐ ̐ t wV7VPXX[PUJs;qNM=@>33C>33C>38_zKG*bNR/b}Mw6v!!!I peeB{5<0b0b |Qr9≤eiEb2@>33C>33C>33L>e߀ѾЕ턩zaEqwRN>33C>33C>33L>CZ0W!`9-I%b}i=btK#!!I&!.Qeۻ W0Tff'`0(?1@~́C[.,{4>ӯXr'^{O)þ>g|fg|fg|f-K>kтRmKR^nԩxR1?0F*`0ڏjcs  s [iЫUM f~d dI1iwn/pJOO׸qH$2qs `/-INEuEn9~ DQY[D";v8l_U@^́CK|(`DɌ9HEiCE, yQ6XLZګ0$ZU2, {b8 , E,˲\ڸQpZb1IV^-IW_ .TpDZÇh%%Pt7iv a% -ҁT!kyRJϝztu5]4U4UNv1yޮ-˒$Iח$ ^{KtGXLPkiiQSs>ڳW%Ie@'yi}z6[557k-ۻh횛͏ju19w.ZZZUzпwW*{7:Д555uUTT5_'%I =:op{XSFNSK=wKIkjRA~oz\?DtAqۭ9LsoPKk^h WbnSْr:\lbkתx$IѨQ~m/ߪ˖MHks,=]wժ jJI{ rm/ߪɓTi-ist7t$Mq-]&ϧٳݦei'<~zbfYٻWݷO5]rB=ZhCdý뙭Oj5T2yG?(YܪV^8- XRmwrΞ9CTРv+Wt*3sbbuu:k 22zӮ>WpHj֔b-/[ڭTУMqǝv,K56jקUM_Px ҏK,K9 iir8:xS9}Txٔn%諸T XWcѱc _Ei_}ᰊ'u&á}b9Fz󭷵[mmm;iD}g_$λ)RR|<{gF>|D-XꚀje֡Ç(bQ^^[pah4ZC!yv'|*mRDdYy x<Wb vK|&.ۦ| JE, y0Q:wx GDRtIENDB`Gyoto-1.2.0/doc/user_guide/000077500000000000000000000000001302352257300155155ustar00rootroot00000000000000Gyoto-1.2.0/doc/user_guide/GyotoManual.bib000066400000000000000000001026351302352257300204410ustar00rootroot00000000000000 @INPROCEEDINGS{eisenhauer08, author = {{Eisenhauer}, F. and {Perrin}, G. and {Brandner}, W. and {Straubmeier}, C. and {Richichi}, A. and {Gillessen}, S. and {Berger}, J.~P. and {Hippler}, S. and {Eckart}, A. and {Sch{\"o}ller}, M. and {Rabien}, S. and {Cassaing}, F. and {Lenzen}, R. and {Thiel}, M. and {Cl{\'e}net}, Y. and {Ramos}, J.~R. and {Kellner}, S. and {F{\'e}dou}, P. and {Baumeister}, H. and {Hofmann}, R. and {Gendron}, E. and {Boehm}, A. and {Bartko}, H. and {Haubois}, X. and {Klein}, R. and {Dodds-Eden}, K. and {Houairi}, K. and {Hormuth}, F. and {Gr{\"a}ter}, A. and {Jocou}, L. and {Naranjo}, V. and {Genzel}, R. and {Kervella}, P. and {Henning}, T. and {Hamaus}, N. and {Lacour}, S. and {Neumann}, U. and {Haug}, M. and {Malbet}, F. and {Laun}, W. and {Kolmeder}, J. and {Paumard}, T. and {Rohloff}, R.-R. and {Pfuhl}, O. and {Perraut}, K. and {Ziegleder}, J. and {Rouan}, D. and {Rousset}, G. }, title = "{GRAVITY: getting to the event horizon of Sgr A*}", booktitle = {Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series}, year = 2008, series = {Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series}, volume = 7013, archivePrefix = "arXiv", eprint = {0808.0063}, month = jul, doi = {10.1117/12.788407}, adsurl = {http://adsabs.harvard.edu/abs/2008SPIE.7013E..69E}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{vincent11a, author = {{Vincent}, F.~H. and {Paumard}, T. and {Gourgoulhon}, E. and {Perrin}, G.}, title = "{GYOTO: a new general relativistic ray-tracing code}", journal = {Classical and Quantum Gravity}, archivePrefix = "arXiv", eprint = {1109.4769}, primaryClass = "gr-qc", year = 2011, month = nov, volume = 28, number = 22, pages = {225011}, doi = {10.1088/0264-9381/28/22/225011}, adsurl = {http://adsabs.harvard.edu/abs/2011CQGra..28v5011V}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{vincent11b, author = {{Vincent}, F.~H. and {Paumard}, T. and {Perrin}, G. and {Mugnier}, L. and {Eisenhauer}, F. and {Gillessen}, S.}, title = "{Performance of astrometric detection of a hotspot orbiting on the innermost stable circular orbit of the Galactic Centre black hole}", journal = {MNRAS}, archivePrefix = "arXiv", eprint = {1011.5439}, primaryClass = "astro-ph.GA", keywords = {black hole physics, instrumentation: interferometers, astrometry, Galaxy: centre}, year = 2011, month = apr, volume = 412, pages = {2653-2664}, doi = {10.1111/j.1365-2966.2010.18084.x}, adsurl = {http://adsabs.harvard.edu/abs/2011MNRAS.412.2653V}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{zamaninasab10, author = {{Zamaninasab}, M. and {Eckart}, A. and {Witzel}, G. and {Dovciak}, M. and {Karas}, V. and {Sch{\"o}del}, R. and {Gie{\ss}{\"u}bel}, R. and {Bremer}, M. and {Garc{\'{\i}}a-Mar{\'{\i}}n}, M. and {Kunneriath}, D. and {Mu{\v z}i{\'c}}, K. and {Nishiyama}, S. and {Sabha}, N. and {Straubmeier}, C. and {Zensus}, A.}, title = "{Near infrared flares of Sagittarius A*. Importance of near infrared polarimetry}", journal = {A\&A}, archivePrefix = "arXiv", eprint = {0911.4659}, primaryClass = "astro-ph.GA", keywords = {black hole physics, infrared: general, accretion, accretion disks, Galaxy: center, Galaxy: nucleus}, year = 2010, month = jan, volume = 510, eid = {A3}, pages = {A3}, doi = {10.1051/0004-6361/200912473}, adsurl = {http://adsabs.harvard.edu/abs/2010A\%26A...510A...3Z}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{will08, author = {{Will}, C.~M.}, title = "{Testing the General Relativistic ``No-Hair'' Theorems Using the Galactic Center Black Hole Sagittarius A*}", journal = {ApJL}, archivePrefix = "arXiv", eprint = {0711.1677}, keywords = {Black Hole Physics, Galaxy: Center, Relativity}, year = 2008, month = feb, volume = 674, pages = {L25-L28}, doi = {10.1086/528847}, adsurl = {http://adsabs.harvard.edu/abs/2008ApJ...674L..25W}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{will09, author = {{Will}, C.~M.}, title = "{The Confrontation Between General Relativity and Experiment}", journal = {Space Sci. Rev.}, keywords = {General relativity, Gravitational experiments}, year = 2009, month = dec, volume = 148, pages = {3-13}, doi = {10.1007/s11214-009-9541-6}, eprint = {http://adsabs.harvard.edu/abs/2009SSRv..148....3W}, adsurl = {http://adsabs.harvard.edu/abs/2009SSRv..148....3W}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{hamaus09, author = {{Hamaus}, N. and {Paumard}, T. and {M{\"u}ller}, T. and {Gillessen}, S. and {Eisenhauer}, F. and {Trippe}, S. and {Genzel}, R.}, title = "{Prospects for Testing the Nature of Sgr A*'s Near-Infrared Flares on the Basis of Current Very Large Telescope -- and Future Very Large Telescope Interferometer -- Observations}", journal = {ApJ}, archivePrefix = "arXiv", eprint = {0810.4947}, keywords = {astrometry, black hole physics, Galaxy: center, gravitational lensing, techniques: interferometric}, year = 2009, month = feb, volume = 692, pages = {902-916}, doi = {10.1088/0004-637X/692/1/902}, adsurl = {http://adsabs.harvard.edu/abs/2009ApJ...692..902H}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{tagger06, author = {{Tagger}, M. and {Varniere}, P.}, title = "{Accretion-Ejection Instability, MHD Rossby Wave Instability, Diskoseismology, and the High-Frequency QPOs of Microquasars}", journal = {ApJ}, eprint = {arXiv:astro-ph/0608123}, keywords = {Accretion, Accretion Disks, Black Hole Physics, Instabilities, Magnetohydrodynamics: MHD, X-Rays: Binaries}, year = 2006, month = dec, volume = 652, pages = {1457-1465}, doi = {10.1086/508318}, adsurl = {http://adsabs.harvard.edu/abs/2006ApJ...652.1457T}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{do09, author = {{Do}, T. and {Ghez}, A.~M. and {Morris}, M.~R. and {Yelda}, S. and {Meyer}, L. and {Lu}, J.~R. and {Hornstein}, S.~D. and {Matthews}, K. }, title = "{A Near-Infrared Variability Study of the Galactic Black Hole: A Red Noise Source with NO Detected Periodicity}", journal = {ApJ}, archivePrefix = "arXiv", eprint = {0810.0446}, keywords = {black hole physics, Galaxy: center, techniques: high angular resolution}, year = 2009, month = feb, volume = 691, pages = {1021-1034}, doi = {10.1088/0004-637X/691/2/1021}, adsurl = {http://adsabs.harvard.edu/abs/2009ApJ...691.1021D}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{genzel10, author = {{Genzel}, R. and {Eisenhauer}, F. and {Gillessen}, S.}, title = "{The Galactic Center massive black hole and nuclear star cluster}", journal = {Reviews of Modern Physics}, archivePrefix = "arXiv", eprint = {1006.0064}, primaryClass = "astro-ph.GA", keywords = {Galactic center, bar, circumnuclear matter, and bulge}, year = 2010, month = oct, volume = 82, pages = {3121-3195}, doi = {10.1103/RevModPhys.82.3121}, adsurl = {http://adsabs.harvard.edu/abs/2010RvMP...82.3121G}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{meheut10, author = {{Meheut}, H. and {Casse}, F. and {Varniere}, P. and {Tagger}, M. }, title = "{Rossby wave instability and three-dimensional vortices in accretion disks}", journal = {A\&A}, archivePrefix = "arXiv", eprint = {1004.0302}, primaryClass = "astro-ph.SR", keywords = {Accretion, accretion disks, protoplanetary disks, hydrodynamics, instabilities, methods: numerical}, year = 2010, month = jun, volume = 516, eid = {A31}, pages = {A31}, doi = {10.1051/0004-6361/201014000}, adsurl = {http://adsabs.harvard.edu/abs/2010A\%26A...516A..31M}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{paumard05, author = {{Paumard}, T. and {Perrin}, G. and {Eckart}, A. and {Genzel}, R. and {Lena}, P. and {Schoedel}, R. and {Eisenhauer}, F. and {Mueller}, T. and {Gillessen}, S.}, title = "{Scientific prospects for VLTI in the Galactic Centre: Getting to the Schwarzschild radius.}", journal = {Astronomische Nachrichten}, year = 2005, month = aug, volume = 326, pages = {568-568}, adsurl = {http://adsabs.harvard.edu/abs/2005AN....326..568P}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @PhdThesis{vincent11c, author = {{Vincent}, F.}, title = "{\'Etude d'effets relativistes en champ gravitationnel fort}", school = {Ecole doctorale d'astronomie et d'astrophysique d'Ile de France}, year = {2011}, } @INPROCEEDINGS{vincent11d, author = {{Vincent}, F.~H. and {Paumard}, T. and {Perrin}, G. and {Gourgoulhon}, E. and {Eisenhauer}, F. and {Gillessen}, S.}, title = "{Towards constraining the central black hole's properties by studying its infrared flares with the GRAVITY instrument}", keywords = {Galaxy: center, Black hole physics}, booktitle = {SF2A-2011: Proceedings of the Annual meeting of the French Society of Astronomy and Astrophysics}, year = 2011, archivePrefix = "arXiv", eprint = {1110.0746}, primaryClass = "astro-ph.GA", editor = "{G.~Alecian, K.~Belkacem, R.~Samadi, \& D.~Valls-Gabaud}", month = dec, pages = {689-693}, adsurl = {http://adsabs.harvard.edu/abs/2011sf2a.conf..689V}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{yusefzadeh06, author = {{Yusef-Zadeh}, F. and {Roberts}, D. and {Wardle}, M. and {Heinke}, C.~O. and {Bower}, G.~C.}, title = "{Flaring Activity of Sagittarius A* at 43 and 22 GHz: Evidence for Expanding Hot Plasma}", journal = {ApJ}, eprint = {arXiv:astro-ph/0603685}, keywords = {Galaxy: Center, Techniques: Interferometric}, year = 2006, month = oct, volume = 650, pages = {189-194}, doi = {10.1086/506375}, adsurl = {http://adsabs.harvard.edu/abs/2006ApJ...650..189Y}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{tagger06b, author = {{Tagger}, M. and {Melia}, F.}, title = "{A Possible Rossby Wave Instability Origin for the Flares in Sagittarius A*}", journal = {ApJL}, eprint = {arXiv:astro-ph/0511520}, keywords = {Accretion, Accretion Disks, Black Hole Physics, Galaxy: Center, Instabilities, Magnetohydrodynamics: MHD, Plasmas}, year = 2006, month = jan, volume = 636, pages = {L33-L36}, doi = {10.1086/499806}, adsurl = {http://adsabs.harvard.edu/abs/2006ApJ...636L..33T}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{markoff01, author = {{Markoff}, S. and {Falcke}, H. and {Yuan}, F. and {Biermann}, P.~L. }, title = "{The Nature of the 10 kilosecond X-ray flare in Sgr A*}", journal = {A\&A}, eprint = {arXiv:astro-ph/0109081}, keywords = {GALAXY: CENTER, GALAXIES: JETS, X-RAYS: GALAXIES, RADIATION MECHANISMS: NON-THERMAL, ACCRETION, ACCRETION DISKS, BLACK HOLE PHYSICS}, year = 2001, month = nov, volume = 379, pages = {L13-L16}, doi = {10.1051/0004-6361:20011346}, adsurl = {http://adsabs.harvard.edu/abs/2001A\%26A...379L..13M}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{do09, author = {{Do}, T. and {Ghez}, A.~M. and {Morris}, M.~R. and {Yelda}, S. and {Meyer}, L. and {Lu}, J.~R. and {Hornstein}, S.~D. and {Matthews}, K. }, title = "{A Near-Infrared Variability Study of the Galactic Black Hole: A Red Noise Source with NO Detected Periodicity}", journal = {ApJ}, archivePrefix = "arXiv", eprint = {0810.0446}, keywords = {black hole physics, Galaxy: center, techniques: high angular resolution}, year = 2009, month = feb, volume = 691, pages = {1021-1034}, doi = {10.1088/0004-637X/691/2/1021}, adsurl = {http://adsabs.harvard.edu/abs/2009ApJ...691.1021D}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{gillessen11, author = {{Gillessen}, S. and {Genzel}, R. and {Fritz}, T.~K. and {Quataert}, E. and {Alig}, C. and {Burkert}, A. and {Cuadra}, J. and {Eisenhauer}, F. and {Pfuhl}, O. and {Dodds-Eden}, K. and {Gammie}, C.~F. and {Ott}, T. }, title = "{A gas cloud on its way towards the super-massive black hole in the Galactic Centre}", journal = {ArXiv e-prints}, archivePrefix = "arXiv", eprint = {1112.3264}, primaryClass = "astro-ph.GA", keywords = {Astrophysics - Galaxy Astrophysics}, year = 2011, month = dec, adsurl = {http://adsabs.harvard.edu/abs/2011arXiv1112.3264G}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{ghez08, author = {{Ghez}, A.~M. and {Salim}, S. and {Weinberg}, N.~N. and {Lu}, J.~R. and {Do}, T. and {Dunn}, J.~K. and {Matthews}, K. and {Morris}, M.~R. and {Yelda}, S. and {Becklin}, E.~E. and {Kremenek}, T. and {Milosavljevic}, M. and {Naiman}, J.}, title = "{Measuring Distance and Properties of the Milky Way's Central Supermassive Black Hole with Stellar Orbits}", journal = {ApJ}, archivePrefix = "arXiv", eprint = {0808.2870}, keywords = {Black Hole Physics, Galaxy: Center, Galaxy: Kinematics and Dynamics, Infrared: Stars, Techniques: High Anular Resolution}, year = 2008, month = dec, volume = 689, pages = {1044-1062}, doi = {10.1086/592738}, adsurl = {http://adsabs.harvard.edu/abs/2008ApJ...689.1044G}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{gillessen09, author = {{Gillessen}, S. and {Eisenhauer}, F. and {Trippe}, S. and {Alexander}, T. and {Genzel}, R. and {Martins}, F. and {Ott}, T.}, title = "{Monitoring Stellar Orbits Around the Massive Black Hole in the Galactic Center}", journal = {ApJ}, archivePrefix = "arXiv", eprint = {0810.4674}, keywords = {black hole physics, astrometry, Galaxy: center, infrared: stars}, year = 2009, month = feb, volume = 692, pages = {1075-1109}, doi = {10.1088/0004-637X/692/2/1075}, adsurl = {http://adsabs.harvard.edu/abs/2009ApJ...692.1075G}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{genzel03, author = {{Genzel}, R. and {Sch{\"o}del}, R. and {Ott}, T. and {Eckart}, A. and {Alexander}, T. and {Lacombe}, F. and {Rouan}, D. and {Aschenbach}, B. }, title = "{Near-infrared flares from accreting gas around the supermassive black hole at the Galactic Centre}", journal = {Nature}, eprint = {arXiv:astro-ph/0310821}, year = 2003, month = oct, volume = 425, pages = {934-937}, doi = {10.1038/nature02065}, adsurl = {http://adsabs.harvard.edu/abs/2003Natur.425..934G}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{eisenhauer11, author = {{Eisenhauer}, F. and {Perrin}, G. and {Brandner}, W. and {Straubmeier}, C. and {Perraut}, K. and {Amorim}, A. and {Sch{\"o}ller}, M. and {Gillessen}, S. and {Kervella}, P. and {Benisty}, M. and {Araujo-Hauck}, C. and {Jocou}, L. and {Lima}, J. and {Jakob}, G. and {Haug}, M. and {Cl{\'e}net}, Y. and {Henning}, T. and {Eckart}, A. and {Berger}, J.-P. and {Garcia}, P. and {Abuter}, R. and {Kellner}, S. and {Paumard}, T. and {Hippler}, S. and {Fischer}, S. and {Moulin}, T. and {Villate}, J. and {Avila}, G. and {Gr{\"a}ter}, A. and {Lacour}, S. and {Huber}, A. and {Wiest}, M. and {Nolot}, A. and {Carvas}, P. and {Dorn}, R. and {Pfuhl}, O. and {Gendron}, E. and {Kendrew}, S. and {Yazici}, S. and {Anton}, S. and {Jung}, Y. and {Thiel}, M. and {Choquet}, {\'E}. and {Klein}, R. and {Teixeira}, P. and {Gitton}, P. and {Moch}, D. and {Vincent}, F. and {Kudryavtseva}, N. and {Str{\"o}bele}, S. and {Sturm}, S. and {F{\'e}dou}, P. and {Lenzen}, R. and {Jolley}, P. and {Kister}, C. and {Lapeyr{\`e}re}, V. and {Naranjo}, V. and {Lucuix}, C. and {Hofmann}, R. and {Chapron}, F. and {Neumann}, U. and {Mehrgan}, L. and {Hans}, O. and {Rousset}, G. and {Ramos}, J. and {Suarez}, M. and {Lederer}, R. and {Reess}, J.-M. and {Rohloff}, R.-R. and {Haguenauer}, P. and {Bartko}, H. and {Sevin}, A. and {Wagner}, K. and {Lizon}, J.-L. and {Rabien}, S. and {Collin}, C. and {Finger}, G. and {Davies}, R. and {Rouan}, D. and {Wittkowski}, M. and {Dodds-Eden}, K. and {Ziegler}, D. and {Cassaing}, F. and {Bonnet}, H. and {Casali}, M. and {Genzel}, R. and {Lena}, P.}, title = "{GRAVITY: Observing the Universe in Motion}", journal = {The Messenger}, year = 2011, month = mar, volume = 143, pages = {16-24}, adsurl = {http://adsabs.harvard.edu/abs/2011Msngr.143...16E}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{trippe07, author = {{Trippe}, S. and {Paumard}, T. and {Ott}, T. and {Gillessen}, S. and {Eisenhauer}, F. and {Martins}, F. and {Genzel}, R.}, title = "{A polarized infrared flare from Sagittarius A* and the signatures of orbiting plasma hotspots}", journal = {MNRAS}, eprint = {arXiv:astro-ph/0611737}, keywords = {accretion, accretion discs, black hole physics, Galaxy: centre}, year = 2007, month = mar, volume = 375, pages = {764-772}, doi = {10.1111/j.1365-2966.2006.11338.x}, adsurl = {http://adsabs.harvard.edu/abs/2007MNRAS.375..764T}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{baganoff01, author = {{Baganoff}, F.~K. and {Bautz}, M.~W. and {Brandt}, W.~N. and {Chartas}, G. and {Feigelson}, E.~D. and {Garmire}, G.~P. and {Maeda}, Y. and {Morris}, M. and {Ricker}, G.~R. and {Townsley}, L.~K. and {Walter}, F.}, title = "{Rapid X-ray flaring from the direction of the supermassive black hole at the Galactic Centre}", journal = {Nature}, eprint = {arXiv:astro-ph/0109367}, year = 2001, month = sep, volume = 413, pages = {45-48}, doi = {10.1038/35092510}, adsurl = {http://adsabs.harvard.edu/abs/2001Natur.413...45B}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{eckart04, author = {{Eckart}, A. and {Baganoff}, F.~K. and {Morris}, M. and {Bautz}, M.~W. and {Brandt}, W.~N. and {Garmire}, G.~P. and {Genzel}, R. and {Ott}, T. and {Ricker}, G.~R. and {Straubmeier}, C. and {Viehmann}, T. and {Sch{\"o}del}, R. and {Bower}, G.~C. and {Goldston}, J.~E.}, title = "{First simultaneous NIR/X-ray detection of a flare from Sgr A*}", journal = {A\&A}, eprint = {arXiv:astro-ph/0403577}, keywords = {black hole physics, X-rays: general, infrared: general, accretion, accretion disks, Galaxy: center, Galaxy: nucleus}, year = 2004, month = nov, volume = 427, pages = {1-11}, doi = {10.1051/0004-6361:20040495}, adsurl = {http://adsabs.harvard.edu/abs/2004A\%26A...427....1E}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{eckart06, author = {{Eckart}, A. and {Sch{\"o}del}, R. and {Meyer}, L. and {Trippe}, S. and {Ott}, T. and {Genzel}, R.}, title = "{Polarimetry of near-infrared flares from Sagittarius A*}", journal = {A\&A}, eprint = {arXiv:astro-ph/0610103}, keywords = {black hole physics, infrared: general, accretion, accretion disks, Galaxy: center, Galaxy: nucleus}, year = 2006, month = aug, volume = 455, pages = {1-10}, doi = {10.1051/0004-6361:20064948}, adsurl = {http://adsabs.harvard.edu/abs/2006A\%26A...455....1E}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{doddseden09, author = {{Dodds-Eden}, K. and {Porquet}, D. and {Trap}, G. and {Quataert}, E. and {Haubois}, X. and {Gillessen}, S. and {Grosso}, N. and {Pantin}, E. and {Falcke}, H. and {Rouan}, D. and {Genzel}, R. and {Hasinger}, G. and {Goldwurm}, A. and {Yusef-Zadeh}, F. and {Clenet}, Y. and {Trippe}, S. and {Lagage}, P.-O. and {Bartko}, H. and {Eisenhauer}, F. and {Ott}, T. and {Paumard}, T. and {Perrin}, G. and {Yuan}, F. and {Fritz}, T.~K. and {Mascetti}, L.}, title = "{Evidence for X-Ray Synchrotron Emission from Simultaneous Mid-Infrared to X-Ray Observations of a Strong Sgr A* Flare}", journal = {ApJ}, archivePrefix = "arXiv", eprint = {0903.3416}, primaryClass = "astro-ph.GA", keywords = {accretion, accretion disks, black hole physics, Galaxy: center, infrared: general, radiation mechanisms: general, X-rays: general}, year = 2009, month = jun, volume = 698, pages = {676-692}, doi = {10.1088/0004-637X/698/1/676}, adsurl = {http://adsabs.harvard.edu/abs/2009ApJ...698..676D}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{trap11, author = {{Trap}, G. and {Goldwurm}, A. and {Dodds-Eden}, K. and {Weiss}, A. and {Terrier}, R. and {Ponti}, G. and {Gillessen}, S. and {Genzel}, R. and {Ferrando}, P. and {B{\'e}langer}, G. and {Cl{\'e}net}, Y. and {Rouan}, D. and {Predehl}, P. and {Capelli}, R. and {Melia}, F. and {Yusef-Zadeh}, F.}, title = "{Concurrent X-ray, near-infrared, sub-millimeter, and GeV gamma-ray observations of Sagittarius A*}", journal = {A\&A}, archivePrefix = "arXiv", eprint = {1102.0192}, primaryClass = "astro-ph.HE", keywords = {Galaxy: center, black hole physics, radiation mechanisms: non-thermal, X-rays: general, infrared: general, submillimeter: general}, year = 2011, month = apr, volume = 528, eid = {A140}, pages = {A140}, doi = {10.1051/0004-6361/201015157}, adsurl = {http://adsabs.harvard.edu/abs/2011A\%26A...528A.140T}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{doddseden10, author = {{Dodds-Eden}, K. and {Sharma}, P. and {Quataert}, E. and {Genzel}, R. and {Gillessen}, S. and {Eisenhauer}, F. and {Porquet}, D.}, title = "{Time-Dependent Models of Flares from Sagittarius A*}", journal = {ApJ}, archivePrefix = "arXiv", eprint = {1005.0389}, primaryClass = "astro-ph.GA", keywords = {accretion, accretion disks, black hole physics, Galaxy: center, infrared: general, radiation mechanisms: general}, year = 2010, month = dec, volume = 725, pages = {450-465}, doi = {10.1088/0004-637X/725/1/450}, adsurl = {http://adsabs.harvard.edu/abs/2010ApJ...725..450D}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{burkert12, author = {{Burkert}, A. and {Schartmann}, M. and {Alig}, C. and {Gillessen}, S. and {Genzel}, R. and {Fritz}, T.~K. and {Eisenhauer}, F.}, title = "{Physics of the Galactic Center Cloud G2, on Its Way toward the Supermassive Black Hole}", journal = {ApJ}, archivePrefix = "arXiv", eprint = {1201.1414}, primaryClass = "astro-ph.GA", keywords = {galaxies: active, galaxies: ISM, Galaxy: center, Galaxy: nucleus }, year = 2012, month = may, volume = 750, eid = {58}, pages = {58}, doi = {10.1088/0004-637X/750/1/58}, adsurl = {http://adsabs.harvard.edu/abs/2012ApJ...750...58B}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{schartmann12, author = {{Schartmann}, M. and {Burkert}, A. and {Alig}, C. and {Gillessen}, S. and {Genzel}, R. and {Eisenhauer}, F. and {Fritz}, T.~K.}, title = "{Simulations of the Origin and Fate of the Galactic Center Cloud G2}", journal = {ArXiv e-prints}, archivePrefix = "arXiv", eprint = {1203.6356}, primaryClass = "astro-ph.GA", keywords = {Astrophysics - Galaxy Astrophysics}, year = 2012, month = mar, adsurl = {http://adsabs.harvard.edu/abs/2012arXiv1203.6356S}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{vincent12a, author = {{Vincent}, F.~H. and {Gourgoulhon}, E. and {Novak}, J.}, title = "{3+1 geodesic equation and images in numerical spacetimes}", journal = {Classical and Quantum Gravity}, archivePrefix = "arXiv", eprint = {1208.3927}, primaryClass = "gr-qc", year = 2012, month = dec, volume = 29, number = 24, pages = {245005}, doi = {10.1088/0264-9381/29/24/245005}, adsurl = {http://adsabs.harvard.edu/abs/2012CQGra..29x5005V}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{straub12, author = {{Straub}, O. and {Vincent}, F. H. and {Abramowicz}, M.~A. and {Gourgoulhon}, E. and {Paumard}, T.}, title = "{Modelling the black hole silhouette in Sagittarius A* with ion tori}", journal = {A\&A}, archivePrefix = "arXiv", eprint = {1203.2618}, primaryClass = "astro-ph.GA", keywords = {black hole physics, accretion, accretion disks, Galaxy: center}, year = 2012, month = jul, volume = 543, eid = {A83}, pages = {A83}, doi = {10.1051/0004-6361/201219209}, adsurl = {http://adsabs.harvard.edu/abs/2012A\%26A...543A..83S}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{abramowicz78, author = {{Abramowicz}, M. and {Jaroszynski}, M. and {Sikora}, M.}, title = "{Relativistic, accreting disks}", journal = {A\&A}, keywords = {BLACK HOLES (ASTRONOMY), RELATIVITY, ROTATING DISKS, STELLAR MASS ACCRETION, ANGULAR MOMENTUM, ASTRONOMICAL MODELS, BINARY STARS, CUSPS, GRAVITATIONAL EFFECTS, PRESSURE GRADIENTS}, year = 1978, month = feb, volume = 63, pages = {221-224}, adsurl = {http://adsabs.harvard.edu/abs/1978A\%26A....63..221A}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{page74, author = {{Page}, D.~N. and {Thorne}, K.~S.}, title = "{Disk-Accretion onto a Black Hole. Time-Averaged Structure of Accretion Disk}", journal = {ApJ}, year = 1974, month = jul, volume = 191, pages = {499-506}, doi = {10.1086/152990}, adsurl = {http://adsabs.harvard.edu/abs/1974ApJ...191..499P}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{doddseden11, author = {{Dodds-Eden}, K. and {Gillessen}, S. and {Fritz}, T.~K. and {Eisenhauer}, F. and {Trippe}, S. and {Genzel}, R. and {Ott}, T. and {Bartko}, H. and {Pfuhl}, O. and {Bower}, G. and {Goldwurm}, A. and {Porquet}, D. and {Trap}, G. and {Yusef-Zadeh}, F.}, title = "{The Two States of Sgr A* in the Near-infrared: Bright Episodic Flares on Top of Low-level Continuous Variability}", journal = {ApJ}, archivePrefix = "arXiv", eprint = {1008.1984}, primaryClass = "astro-ph.GA", keywords = {accretion, accretion disks, black hole physics, Galaxy: center, infrared: general}, year = 2011, month = feb, volume = 728, eid = {37}, pages = {37}, doi = {10.1088/0004-637X/728/1/37}, adsurl = {http://adsabs.harvard.edu/abs/2011ApJ...728...37D}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{mignone07, author = {{Mignone}, A. and {Bodo}, G. and {Massaglia}, S. and {Matsakos}, T. and {Tesileanu}, O. and {Zanni}, C. and {Ferrari}, A.}, title = "{PLUTO: A Numerical Code for Computational Astrophysics}", journal = {ApJS}, eprint = {arXiv:astro-ph/0701854}, keywords = {Hydrodynamics, Methods: Numerical, Magnetohydrodynamics: MHD, Relativity, Shock Waves}, year = 2007, month = may, volume = 170, pages = {228-242}, doi = {10.1086/513316}, adsurl = {http://adsabs.harvard.edu/abs/2007ApJS..170..228M}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{yusefzadeh06b, author = {{Yusef-Zadeh}, F. and {Bushouse}, H. and {Dowell}, C.~D. and {Wardle}, M. and {Roberts}, D. and {Heinke}, C. and {Bower}, G.~C. and {Vila-Vilar{\'o}}, B. and {Shapiro}, S. and {Goldwurm}, A. and {B{\'e}langer}, G.}, title = "{A Multiwavelength Study of Sgr A*: The Role of Near-IR Flares in Production of X-Ray, Soft {$\gamma$}-Ray, and Submillimeter Emission}", journal = {ApJ}, eprint = {arXiv:astro-ph/0510787}, keywords = {Accretion, Accretion Disks, Black Hole Physics, Galaxies: Nuclei, Galaxy: Center}, year = 2006, month = jun, volume = 644, pages = {198-213}, doi = {10.1086/503287}, adsurl = {http://adsabs.harvard.edu/abs/2006ApJ...644..198Y}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{broderick06, author = {{Broderick}, A.~E. and {Loeb}, A.}, title = "{Imaging optically-thin hotspots near the black hole horizon of Sgr A* at radio and near-infrared wavelengths}", journal = {MNRAS}, eprint = {arXiv:astro-ph/0509237}, keywords = {black hole physics, polarization, techniques: interferometric, Galaxy: centre, infrared: general, submillimetre}, year = 2006, month = apr, volume = 367, pages = {905-916}, doi = {10.1111/j.1365-2966.2006.10152.x}, adsurl = {http://adsabs.harvard.edu/abs/2006MNRAS.367..905B}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{zamaninasab11, author = {{Zamaninasab}, M. and {Eckart}, A. and {Dov{\v c}iak}, M. and {Karas}, V. and {Sch{\"o}del}, R. and {Witzel}, G. and {Sabha}, N. and {Garc{\'{\i}}a-Mar{\'{\i}}n}, M. and {Kunneriath}, D. and {Mu{\v z}i{\'c}}, K. and {Straubmeier}, C. and {Valencia-S}, M. and {Zensus}, J.~A.}, title = "{Near-infrared polarimetry as a tool for testing properties of accreting supermassive black holes}", journal = {MNRAS}, archivePrefix = "arXiv", eprint = {1102.0775}, primaryClass = "astro-ph.HE", keywords = {accretion, accretion discs, black hole physics, Galaxy: centre, Galaxy: nucleus, infrared: general}, year = 2011, month = may, volume = 413, pages = {322-332}, doi = {10.1111/j.1365-2966.2010.18139.x}, adsurl = {http://adsabs.harvard.edu/abs/2011MNRAS.413..322Z}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{paczynski80, author = {{Paczy{\'n}sky}, B. and {Wiita}, P.~J.}, title = "{Thick accretion disks and supercritical luminosities}", journal = {A\&A}, keywords = {BLACK HOLES (ASTRONOMY), STELLAR LUMINOSITY, STELLAR MASS ACCRETION, ANGULAR MOMENTUM, DISKS, GALACTIC NUCLEI}, year = 1980, month = aug, volume = 88, pages = {23-31}, adsurl = {http://adsabs.harvard.edu/abs/1980A\%26A....88...23P}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{murrayclay11, author = {{Murray-Clay}, R.~A. and {Loeb}, A.}, title = "{Disruption of a Proto-Planetary Disk by the Black Hole at the Milky Way Centre}", journal = {ArXiv e-prints}, archivePrefix = "arXiv", eprint = {1112.4822}, primaryClass = "astro-ph.GA", keywords = {Astrophysics - Galaxy Astrophysics, Astrophysics - Earth and Planetary Astrophysics}, year = 2011, month = dec, adsurl = {http://adsabs.harvard.edu/abs/2011arXiv1112.4822M}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{falcke96, author = {{Falcke}, H.}, title = "{The Nuclear Jet in M81}", journal = {ApJL}, eprint = {arXiv:astro-ph/9604026}, keywords = {ACCRETION, ACCRETION DISKS, GALAXIES: ACTIVE, BLACK HOLE PHYSICS, GALAXY: CENTER, GALAXIES: INDIVIDUAL MESSIER NUMBER: M81, GALAXIES: JETS}, year = 1996, month = jun, volume = 464, pages = {L67}, doi = {10.1086/310085}, adsurl = {http://adsabs.harvard.edu/abs/1996ApJ...464L..67F}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{uttley02, author = {{Uttley}, P. and {McHardy}, I.~M. and {Papadakis}, I.~E.}, title = "{Measuring the broad-band power spectra of active galactic nuclei with RXTE}", journal = {MNRAS}, eprint = {arXiv:astro-ph/0201134}, keywords = {methods: numerical, galaxies: active, galaxies: Seyfert, X-rays: galaxies}, year = 2002, month = may, volume = 332, pages = {231-250}, doi = {10.1046/j.1365-8711.2002.05298.x}, adsurl = {http://adsabs.harvard.edu/abs/2002MNRAS.332..231U}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{vaughan05, author = {{Vaughan}, S.}, title = "{A simple test for periodic signals in red noise}", journal = {A\&A}, eprint = {arXiv:astro-ph/0412697}, keywords = {methods: data analysis, methods: statistical, X-rays: general, X-rays: galaxies}, year = 2005, month = feb, volume = 431, pages = {391-403}, doi = {10.1051/0004-6361:20041453}, adsurl = {http://adsabs.harvard.edu/abs/2005A\%26A...431..391V}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{dolence12, author = {{Dolence}, J.~C. and {Gammie}, C.~F. and {Shiokawa}, H. and {Noble}, S.~C.}, title = "{Near-infrared and X-Ray Quasi-periodic Oscillations in Numerical Models of Sgr A*}", journal = {ApJL}, archivePrefix = "arXiv", eprint = {1201.1917}, primaryClass = "astro-ph.HE", keywords = {accretion, accretion disks, black hole physics, Galaxy: center, magnetohydrodynamics: MHD, methods: numerical, radiative transfer}, year = 2012, month = feb, volume = 746, eid = {L10}, pages = {L10}, doi = {10.1088/2041-8205/746/1/L10}, adsurl = {http://adsabs.harvard.edu/abs/2012ApJ...746L..10D}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{dexter09, author = {{Dexter}, J. and {Agol}, E. and {Fragile}, P.~C.}, title = "{Millimeter Flares and VLBI Visibilities from Relativistic Simulations of Magnetized Accretion Onto the Galactic Center Black Hole}", journal = {ApJL}, archivePrefix = "arXiv", eprint = {0909.0267}, primaryClass = "astro-ph.HE", keywords = {accretion, accretion disks, black hole physics, Galaxy: center, radiative transfer, relativity}, year = 2009, month = oct, volume = 703, pages = {L142-L146}, doi = {10.1088/0004-637X/703/2/L142}, adsurl = {http://adsabs.harvard.edu/abs/2009ApJ...703L.142D}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @BOOK{gourgoulhon12, author = {{Gourgoulhon}, E.}, publisher = {Springer}, address = {Heidelberg, Germany}, title = {3+1 Formalism in General Relativity}, year = {2012}, }Gyoto-1.2.0/doc/user_guide/GyotoManual.tex000066400000000000000000001647111302352257300205100ustar00rootroot00000000000000% Copyright 2014-2016 Frédéric Vincent, Thibaut Paumard % % This file is part of Gyoto. % % Gyoto 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 3 of the License, or % (at your option) any later version. % % Gyoto is distributed in the hope that 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 Gyoto. If not, see . \documentclass[a4paper,12pt]{article} % The build system will provide this command to make out-of-tree build % work \providecommand{\GyotoSrcDir}{../..} \usepackage[]{natbib} \usepackage{fullpage} \usepackage{calc} \usepackage[usenames,dvipsnames]{color} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{textcomp} \usepackage{rotating} \usepackage[frenchb,english]{babel} \usepackage{amssymb,amsmath} \usepackage{float} \usepackage{hyperref} \usepackage{amstext} \usepackage{tipa} %\usepackage{palatino} \usepackage{fancyvrb} \DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small} \newcommand{\D}{\mathrm{d}} \newcommand{\GYOTO}{\texttt{GYOTO}} \newcommand{\Metric}{\texttt{Metric}} \newcommand{\Astrobj}{\texttt{Astrobj}} \newcommand{\Spectrum}{\texttt{Spectrum}} \graphicspath{{\GyotoSrcDir/doc/images/}} \begin{document} \begin{center} \section*{\Huge{Quick User Guide for \texttt{GYOTO}}} \vspace{0.5cm} % Let's enter the date manually. Need to update it at least for each % release. Use git log to find out the last change to the user manual. \Large{Updated December 7, 2016} %\today \vspace{4cm} \begin{figure}[htbp] \centering \includegraphics[width=10cm,height=10cm]{RWI_t1822_nu18.pdf} %\caption{} %\label{fig:hotspot} \end{figure} \end{center} \newpage \section*{Introduction - Scope of this Guide} This Guide aims at giving a general presentation of the \textit{General relativitY Orbit Tracer of Observatoire de Paris}, \texttt{GYOTO} (pronounced \textipa{[dZIoto]}, as for the Italian trecento painter Giotto di Bondone). This text is not a lecture on ray-tracing techniques and is only devoted to presenting the code so that it can be quickly handled by any user. Readers interested in the physics behind \texttt{GYOTO} are referred to~\citet[][and references therein]{vincent11a,vincent12a}. The aim of this Guide is also to present the code in sufficient details so that people interested to develop their own version of \texttt{GYOTO} can do it easily. \texttt{GYOTO} is an open source C++ code with a Yorick plug-in that computes null and time-like geodesics in the Kerr metric as well as in any metric computed within the framework of the 3+1 formalism of general relativity. This code allows to compute mainly images and spectra of astrophysical sources emitting electromagnetic radiation in the vicinity of compact objects (e.g. accretion disks or nearby stars). As \texttt{GYOTO} is continually evolving, this guide will (hopefully) be regularly updated to present the new functionalities added to the code. However, this guide does not constitute a full reference. The reference manual is built from the C++ header files using \texttt{doxygen} into the \texttt{doc/html/} directory of the source tree. It is also available online (rebuilt every night) at \url{http://gyoto.obspm.fr/}. The reader is strongly encouraged to give feedback on this Manual, report typos, ask questions or suggest improvements by sending an email to \url{frederic.vincent@obspm.fr} \tableofcontents \newpage \section{Installing \texttt{GYOTO}} \label{install} \texttt{GYOTO} is freely available at the URL \url{http://gyoto.obspm.fr/}. This URL hosts the online manual of \texttt{GYOTO}, with installation instructions and brief descriptions of the code architecture. \texttt{GYOTO} is version-controlled with the \texttt{git} software that you should install on your machine. Before uploading the code, be sure that the \texttt{xerces-c3} (or \texttt{xercesc3} depending on the architecture) and \texttt{cfitsio} libraries are installed on your system: \texttt{GYOTO} won't compile without these. It is also better (but not required) to install the \texttt{udunits2} library. Once this is done, just type on a command line \begin{code} git clone git://github.com/gyoto/Gyoto.git \end{code} which will create a \texttt{Gyoto} repository. It contains directories \texttt{bin}, \texttt{lib}, \texttt{include}, \texttt{doc}, \texttt{yorick} containing respectively the core code and executable, the \texttt{.C} source files, the \texttt{.h} headers, the documentation and \texttt{Yorick} plug-in related code. In the \texttt{Gyoto} repository, use the standard \begin{code} ./configure; make; sudo make install \end{code} commands to build the code. In case of problems, have a look at the \texttt{INSTALL} file that gives important complementary informations on how to install \texttt{GYOTO}. \section{Basic usage} \subsection{Using the \texttt{gyoto} command-line tool} \label{demo} The most basic way of using \texttt{GYOTO} is through the \texttt{gyoto} command-line tools. It relies on two kinds of files: an \texttt{XML} file containing the inputs and a \texttt{FITS} file containing the outputs. \subsubsection{XML input file} You can find examples of \texttt{XML} input files in \texttt{doc/examples/}. Let us consider the computation of the image of a standard Page-Thorne accretion disk in Boyer-Lindquist coordinates, described in \texttt{example-page-thorne-disk-BL.xml}. \begin{sloppypar} %to allow proper newline for long words (in texttt) If you are not familiar with \texttt{XML} language, just remember that an \texttt{XML} file is made of several fields beginning with the \texttt{} and ending with \texttt{}. One field can have sub-fields, defined with the same symbols. For instance in \texttt{example-page-thorne-disk-BL.xml}, there is one global field, \texttt{Scenery}, describing the scenery that will be ray-traced, with a few sub-fields: \texttt{Metric} describing the metric used for the computation, here the Kerr metric in Boyer-Lindquist coordinates; \texttt{Screen} describing the observer's screen properties; finally \texttt{Astrobj} describing the astrophysical object that will be ray-traced, here a Page-Thorne accretion disk. All the parameters in this input file can be changed to specify a new scenery. Let us present in details the \texttt{example-page-thorne-disk-BL.xml} file: \begin{code} \end{code} The following lines specify the metric: it is the Kerr metric, expressed in Boyer-Lindquist coordinates, with spin 0 (so the Schwarzschild metric here!): \begin{code} 0. \end{code} The metric is now defined, let us describe the observer's screen. The \texttt{Position} field gives the screen's 4-position in Boyer-Lindquist coordinates $(t,r,\theta,\varphi)$, angles in radians, time and radius in geometrical units (i.e. units with $c$ and $G$ put to 1). The \texttt{Time} field gives the time of observation. The \texttt{FieldOfView} is given in radians. The screen's \texttt{Resolution} is the number of screen pixels in each direction. \begin{code} 1000. 100. 1.22 0. 0.314159265358979323846264338327950288419716 32 \end{code} The screen is now defined. The following line describes the target object that will be ray-traced: \begin{code} \end{code} Here the target object is very simple and requires no specifications. The \texttt{Scenery} is now fully defined and the field can be closed \begin{code} \end{code} This is the end of the \texttt{XML} input file! \end{sloppypar} \subsubsection{Calling \texttt{gyoto}} We will now use the \texttt{gyoto} command-line tools to ray-trace the scenery described in this \texttt{XML} file. The command-line options are documented in the usual UNIX-style manpage: \begin{code} $ man gyoto \end{code} %$ Once the \texttt{XML} input file is ready, the call to \texttt{gyoto} is done according to the following line: \begin{code} $ gyoto input.xml \!output.fits \end{code} %$ where \texttt{input.xml} is the above mentioned \texttt{XML} file and \texttt{output.fits} is the name of the \texttt{FITS} that will contain the result of the computation. The \texttt{!} before the \texttt{.fits} file allows to overwrite a pre-existing file. If you remove it, an error will occur if the \texttt{.fits} file already exists. \begin{figure} \centering \includegraphics[width=8cm,height=8cm]{DemoPageThorne.pdf} \caption{Image of a Page-Thorne thin accretion disk around a Schwarzschild black hole, with a $32\times 32$ pixels screen.} \label{fig:demo} \end{figure} The line above asks \texttt{GYOTO} to integrate a null geodesic from each pixel of the screen backward in time towards the astrophysical object. \subsubsection{FITS output file} Once the computation is performed, the \texttt{output.fits} file is created. You can visualise it by using the \texttt{ds9} software (\url{http://hea-www.harvard.edu/RD/ds9/site/Home.html}) and simply running: \begin{code} $ ds9 ouput.fits \end{code} %$ For instance, if you use the \texttt{example-page-thorne-disk-BL.xml} as is, you will obtain Fig.~\ref{fig:demo}. \subsection{Parallelisation} Ray-tracing of several hundreds of light-rays is a problem that is easily parralelised, by letting different CPUs compute distinct geodesics. \texttt{GYOTO} offers several facilities to perform such parallelisation, depending on the hardware and software environment. \subsubsection{Multi-threading} You can accelerate computations by using several cores on a computer using the \texttt{----nthreads=NCORES} option. \texttt{NCORES} is the number of threads that \texttt{GYOTO} will use. The optimal value is usually the number of hardware CPU cores on the machine. This option can also be specified in the input file using the \texttt{$<$NThreads$>$} entity. This facility does not work for LORENE-based metrics (see Sect.~\ref{3+1}). \subsubsection{Multi-processing} \texttt{GYOTO} is able to use the Message Passing Interface (MPI) to distribute the workload over many CPUs, possibly hosted on different computers. YOu can activate it by specifying \texttt{--nprocesses=NPROCS}. \texttt{NPROCS} is the number of helper processes that \texttt{GYOTO} will spawn. This does not include the main \texttt{GYOTO} process, which will act as a manager for the helpers. This functionnality relies on Astrobj::fillElement() and Metric::fillElement() being properly implemented, which is not always the case for new classes. Also, classes that use supplemental data (additional files referenced to in the XML file) do require that these supplemental data be accessible to all the processes using the same absolute path. Most notably, Lorene metrics require such data. Astrobj classes such as the PatternDisk also require on-disk data. \subsubsection{Poor-mans parallelisation} Another cheap way of parallelising the computation is to call several \texttt{gyoto} instances, running on different CPUs or even on different machines, each instance computing only a portion of the image. This sort of basic parrallelisation is, naturally, supported by all the \texttt{GYOTO} metrics. You can ask \texttt{GYOTO} to compute only a fraction of the screen's pixels by running one of: \begin{code} $ gyoto -iIMIN:IMAX:DI -jJMIN:JMAX:DJ input.xml \!output.fits $ gyoto --ispec=IMIN:IMAX:DI --jspec=JMIN:JMAX:DJ input.xml \!output.fits $ gyoto --imin=IMIN --imax=IMAX --jmin=JMIN --jmax=JMAX --di=DI --dj=DJ \ input.xml \!output.fits \end{code} %$ where \texttt{IMIN}, \texttt{IMAX}, \texttt{JMIN}, \texttt{JMAX} are the extremal indices of the pixels that will be computed. \texttt{DI} and \texttt{DJ} are the step size in the $i$ and $j$ direction respictively. With the \texttt{-{}-ispec} or \texttt{-i} syntax, \texttt{IMAX} defaults to \texttt{IMIN} if there is no colon in the specification, and to the image resolution otherwise. For instance, to compute only the geodesic that hits the central pixel of a $32 \times 32$ screen, type one of: \begin{code} $ gyoto -i16 -j16 input.xml \!output.fits $ gyoto --ispec=16 --jspec=16 input.xml \!output.fits $ gyoto --imin=16 --imax=16 --jmin=16 --jmax=16 input.xml \!output.fits \end{code} %$ To compute only the points with even $i$ and od $j$, use (for instance) one of: \begin{code} $ gyoto -i2::2 -j::2 input.xml \!output.fits $ gyoto --ispec=2::2 --jspec=1::2 input.xml \!output.fits $ gyoto --imin=2 --di=2 --jmin=1 --dj=2 input.xml \!output.fits \end{code} %$ To compute only the lower-right quadrant of the image: \begin{code} $ gyoto -i17: -j:16 input.xml \!output.fits $ gyoto --ispec=17: --jspec=:16 input.xml \!output.fits $ gyoto --imin=17 --jmax=16 input.xml \!output.fits \end{code} %$ How to recombine the several output files into a single FITS file is left as an exercise to the reader. It is easily done using any scientific interpreted language such as Yorick\footnote{\url{http://dhmunro.github.io/yorick-doc/}} or Python\footnote{\url{https://www.python.org/}}. \subsection{The \texttt{gyotoy} interface} \label{sect:gyotoy} The second most basic tool provided by \texttt{GYOTO} is \texttt{gyotoy} (Fig.~\ref{fig:gyotoy}). This is a graphical user interface to visualize a single geodesic. See the \texttt{README} and \texttt{INSTALL} files for the prerequisites. Once the installation is complete, your launch gyotoy as: \begin{code} $ gyotoy \end{code} %$ or, from the \texttt{yorick/} sub-directory of the built source tree: \begin{code} $ ./yorick -i gyotoy.i \end{code} %$ followed, on the Yorick prompt, by: \begin{code} > gyotoy \end{code} \begin{figure} \centering \includegraphics[width=0.7\linewidth]{gyotoy_screenshot.png} \caption{The \texttt{gyotoy} graphical user interface.} \label{fig:gyotoy} \end{figure} You can select a \texttt{KerrBL} metric and set the spin, or any other metric defined in an \texttt{XML} file. As of writing, \texttt{gyotoy} assumes that the coordinate system is spherical-like. It should work in Cartesian coordinates as well, but the labels will be odd. It is possible to select which kind of geodesic to compute (time-like or light-like, using the \texttt{Star} or \texttt{Photon} radio buttons), the initial position and 3-velocity of the particle, and the projection (a.k.a. the position of the observer). The bottom tool bar allows selecting a few numerical parameters such as whether or not to use an adaptive step. Menus allow saving or opening the parameters as an XML file, exporting the geodesic as a text file, and saving the view as an image file in various formats. The view can be zoomed and panned by clicking in the plot area. \section{Beyond the basics: scripting \texttt{GYOTO}} We have seen the two most basic ways of using \texttt{GYOTO}: computing a single frame using the \texttt{gyoto} command-line tool, and exploring a single geodesic using the \texttt{gyotoy} interface. There is much more that \texttt{GYOTO} can be used for: computing spectra, performing model-fitting, computing movies, evaluating lensing effects etc. \subsection{Using the Yorick plug-in} \label{sect:yorick} Yorick is a fairly easy to learn interpreted computer language. We provide a Yorick plug-in which exposes the \texttt{GYOTO} functionalities to this language. This plug-in is self documented: at the Yorick prompt, try: \begin{code} > #include "gyoto.i" > help, gyoto \end{code} A lot of the \texttt{GYOTO} test suite is written in Yorick, which provides many example code in the various \texttt{*.i} files in the \texttt{yorick/} directory of the \texttt{GYOTO} source tree. Another example is provided by the \texttt{gyotoy} graphical interface (Sect.~\ref{sect:gyotoy}). For Yorick basics, see: \begin{itemize} \item \url{https://github.com/dhmunro/yorick}; \item \url{http://dhmunro.github.io/yorick-doc/}; \item \url{http://yorick.sourceforge.net/}; \item \url{http://www.maumae.net/yorick/doc/index.php}. \end{itemize} As a very minimalist example, here is how to ray-trace an XML scenery into a FITS file in Yorick: \begin{code} $ rlwrap yorick \end{code} %$ This launches Yorick within the line-editing facility \texttt{rlwrap} (provided separately). Then, from the Yorick prompt: \begin{code} > #include "gyoto.i" > restore, gyoto; > sc = Scenery("input.xml"); > data = sc(,,"Intensity"); > fits_write, "output.fits", data; \end{code} or, in two lines: \begin{code} > #include "gyoto.i" > fits_write, "output.fits", gyoto.Scenery("input.xml")(,,"Intensity"); \end{code} Likewise, to integrate the spectrum over the field-of-view: \begin{code} > #include "gyoto.i" > restore, gyoto; > sc = Scenery("input.xml"); > data = sc(,,"Spectrum[mJy.pix-2]"); > spectrum = data(sum, sum, ); > freq = sc(screen=)(spectro=)(midpoints=, unit="Hz"); > plg, spectrum, freq; > xytitles, "Frequency [Hz]", "Spectrum [mJy]"; \end{code} MPI multi-processing is also available from within Yorick. To activate this functionality, you must call \texttt{gyoto.mpiInit} early in your script. Spawn the required number of processes using the \texttt{mpispawn} method, and don't forget to use the \texttt{mpiclone} method. Although not strictly necessary, it is also recommended to explicitely terminate helper processes that have been spawned in the background (using \texttt{mpispawn=0}, and to call \texttt{gyoto.mpiFinalize} at the very end of your script: \begin{code} > #include "gyoto.i" > restore, gyoto; > // call MPI_Init(): > mpiInit; > sc = Scenery("input.xml"); > // spawn helpers and send them the scenery > sc, mpispawn=12, mpiclone=; > // compute stuff > data =sc(); > // shut down the helper processes > sc, mpispawn=0; > // shut down MPI > mpiFinalize; > quit; \end{code} The Yorick plug-in is not generated automatically. Therefore only a subset of the Gyoto API is exposed. However, all the properties of any object (most of what can be set in XML) can be read and written from Yorick, with the possibility of specifying a unit for properties that support it: \begin{code} > #include "gyoto.i" > restore, gyoto; > tr = Astrobj("Torus"); > noop, tr.SmallRadius(0.5, unit="geometrical"); > small_radius_in_meters=tr.SmallRadius(unit="m"); > tr, SmallRadius=0.5, unit="geometrical", LargeRadius=5e6, unit="m"; > large_radius_in_default_unit=tr(LargeRadius=); \end{code} \subsection{Using the Python extensions} \label{sect:python} As of writting (January 2015), the Python extensions are fairly new. Some of the instructions below for loading the extensions or creating objects may change in future releases of the code. The Python layer is split into several extensions: \begin{description} \item[gyoto] expose the generic framework compiled in \texttt{libgyoto}; \item[gyoto\_std] expose the derived classes compiled in the standard plug-in, \texttt{libgyoto-stdplug}; \item[gyoto\_lorene] expose the derived classes compiled in the Lorene plug-in, \texttt{libgyoto-lorene}. \end{description} \subsubsection{Building and installing} How to build and install these extensions is documented in INSTALL. At the moment, this is not done automatically. The requisites are: \begin{itemize} \item Python (tested with 2.7 and 3.4), including the development files; \item Swig (tested with 2.0.12 and 3.0.2); \item NumPy, installed with its development files for the specific Python interpreter you plan on using. \end{itemize} For instance, on Debian Wheezy, to use compile the \texttt{gyoto} extension for Python 3.4, you need the packages: \begin{itemize} \item \texttt{python3.4-dev}; \item \texttt{python3-numpy}; \item \texttt{swig} or \texttt{swig2.0}. \end{itemize} Configure the Gyoto source tree specifying the Python interpreter (if you don't want to use the default on your system), build and install gyoto, then move to the \texttt{python/} subdirectory, build and install: \begin{code} $ ./configure PYTHON=/usr/bin/python3.4 $ make $ sudo make install $ cd python $ make $ sudo make install \end{code} Depending on your system, you may need to add the directory where gyoto.py has been installed to your PYTHONPATH variable. \subsubsection{Using} Some sample code can be found in \texttt{python/example.py}. The Python extension matches the C++ API very closely, so the C++ reference in \texttt{doc/html/} is quite relevant. Most of it can also be accessed through the Python function '\texttt{help}'. The \texttt{gyoto} extension should be enough to perform ray-tracing on anykind of objects, even located in plug-ins: Import the \texttt{gyoto} extension and load the standard plug-in into gyoto: \begin{code} import gyoto gyoto.requirePlugin("stdplug") \end{code} Get help on Gyoto: \begin{code} help(gyoto) \end{code} Read scenery from XML: \begin{code} a=gyoto.Factory("../doc/examples/example-moving-star.xml") sc=a.getScenery() \end{code} Create Astrobj by name, access property by name: \begin{code} tr=gyoto.Astrobj('Torus') p=tr.property('SmallRadius') tr.set(p, gyoto.Value(0.5)) \end{code} To access methods of specific derived classes (for instance the Star API, which allows computing time-like geodesics), the python extension for a specific Gyoto plug-in must be imported: \begin{code} import gyoto gyoto.requirePlugin("stdplug") import gyoto_std st=gyoto_std.Star() \end{code} The three extensions are fully compatible with each other: \begin{code} sc=gyoto.Scenery() st=gyoto_std.Star() sc.astrobj(st) \end{code} Pointers to the base classes can be up-cast to derived classes: \begin{code} ao = sc.astrobj() # ao contains a Gyoto::Astrobj::Generic * pointer st = gyoto_std.Star(ao) # if conversion fails, error is thrown \end{code} \subsection{Other languages} \label{sect:swig} The Python extension (Sect.~\ref{sect:python}) is generated automatically using the Swig tool, with only little python-specific code. It should therefore be rather easy to compile extensions for the other languages that Swig supports (Tcl, java, R, and many others). If you want it to happen, feel free to contact the Gyoto developers. \subsection{Interfacing directly to the \texttt{GYOTO} library} The core functionality is provided as a C++ shared library, which is used both by the \texttt{gyoto} command-line tool and the Yorick plug-in. You can, of course, interface directly to this library. The reference is generated from the source code using \texttt{doxygen} in the directory \texttt{doc/html/}. The application binary interface (ABI) is likely to change with every commit. We try to maintain a certain stability in the application programming interface (API), and to maintain a stable branch whic honly sees bug-fixes between official releases. But the effort we put into this stability is function of the needs of our users. If you start depending on the \texttt{GYOTO} library, please contact us (\texttt{gyoto@sympa.obspm.fr}): we will try harder to facilitate your work, or at least warn you when there is a significant API change. \section{Choosing the right integrator} \label{tuning} Numerical ray-tracing can be very much time-consuming. In order to control the numerical errors in your application, it is wise to experiment with the numerical tuning parameters. \texttt{GYOTO} provides several distinct integrators (depending on compile-time options): \begin{itemize} \item the \texttt{Legacy} integrator, the first to have been introduced; \item Boost\footnote{\url{http://www.boost.org/}} integrators from the \texttt{odeint}\footnote{\url{http://www.boost.org/doc/libs/1_55_0/libs/numeric/odeint/doc/html/index.html}} library. In \texttt{GYOTO}, they are called \texttt{runge\_kutta\_*} (see below). \end{itemize} The integrator and its numerical tuning parameters can be specified in either of these three XML sections: \begin{description} \item[\texttt{Scenery}] to specify the integrator and parameters used during ray-tracing by the individual photons; \item[\texttt{Photon}] if the XML file describes a single photon (the Yorick plug-in and the \texttt{gyotoy} tool can make use of such an XML file); \item[\texttt{Astrobj}] if it is a \texttt{Star}, for specifying the integrator and parameters used to compute the orbit of this star. \end{description} The full set of tuning parameters that \emph{may be} supported by the \texttt{Scenery} section is: \begin{code} runge_kutta_fehlberg78 1e-6 1e-6 1.79769e+308 2.22507e-308 1.79769e+308 100000 1 -1.7e308 \end{code} \begin{description} \item[Integrator] the integrator to use (one of the runge\_kutta\_* or Legacy; default: if compiled-in, \texttt{runge\_kutta\_fehlberg78}); \item[AbsTol]\footnote{\label{note:abstol}The \texttt{Legacy} integrator does not support the AbsTol nor the RelTol parameters} absolute tolerance for adapting the integration step (see \url{http://www.boost.org/doc/libs/1_55_0/libs/numeric/odeint/doc/html/boost_numeric_odeint/odeint_in_detail/generation_functions.html}); \item[RelTol]\footnotemark[\value{footnote}] relative tolerance for adapting the integration step (idem); \item[DeltaMax]\footnote{The \texttt{Legacy} integrator take the DeltaMin, DeltaMax and DeltaMaxOverR parameters in the \texttt{Metric} section.} the absolute maximum value for the integration step (defaults to the largest possible non-infinite value); \item[DeltaMin]\footnotemark[\value{footnote}] the absolute minimum value (defaults to the smallest possible strictly positive value); \item[DeltaMaxOverR]\footnotemark[\value{footnote}] this is $h=\delta_\text{max}/r$ such that, at any position, the integration step may not be larger than $h\times\;r$ where $r$ is the current distance to the centre of the coordinate system (defaults to $1$). \item[MaxIter] maximum number of integration steps (per photon); \item[Adaptive] (or NonAdaptive) whether or not to use an adaptive step; \item[Delta] integration step, initial in case it is adaptive. Not very important, but should be commensurable with the distance to the \texttt{Screen} (i.e. don't use Delta$=10^{-6}$ if the screen is at $10^{13}$ geometrical units!). Delta can be specified in any distance-like or time-like unit. \item[MinimumTime] stop integration when the photon travels back to this date. Defaults to the earliest possible date. Can be specified in any time-like or distance-like unit. \end{description} \subsection{The Boost integrators} If \texttt{GYOTO} was compiled with a C++11-capable compiler and with the Boost library (version 1.53 or above), then the following integrators are available: \begin{itemize} \item \texttt{runge\_kutta\_cash\_karp54}; \item \texttt{runge\_kutta\_fehlberg78}; \item \texttt{runge\_kutta\_dopri5}; \item \texttt{runge\_kutta\_cash\_karp54\_classic} (alternate implementation of\\ \texttt{runge\_kutta\_cash\_karp54}). \end{itemize} Those integrators are implemented in the \texttt{Worldline} object. This has the advantage that, when ray-tracing the image of a moving star (\texttt{Star} class), the star can use a different integrator than the photons. These integrators support all of the parameters described above. \subsection{The \texttt{Legacy} integrator} The \texttt{Legacy} integrator is a home-brewed 4\textsuperscript{th}-order, adaptive-step Runge--Kutta integrator. It is always available, independent of any compile-time options. It does not support AbsTol nor RelTol, and takes DeltaMin, DeltaMax and DeltaMaxOver in the \texttt{Metric} section, not in the \texttt{Scenery} or \texttt{Astrobj} section. It is not possible to use different tuning parameters for the Star and the Photons if both use the \texttt{Legacy} integrator. The \texttt{Legacy} integrator is implemented in the \texttt{Metric} object and may be re-implemented by specific \texttt{Metric} kinds. Most notably, the \texttt{KerrBL} metric reimplements it (this specific implementation takes advantage of the specific constants of motion). When a metric reimplements the \texttt{Legacy} integrator, it is possible to choose which implementation to choose by specifying either \texttt{$<$GenericIntegrator$>$} or \texttt{$<$SpecificIntegrator$>$} in the \texttt{$<$Metric$>$} section. The \texttt{KerrBL} specific implementation of the \texttt{Legacy} integrator accepts one additional tuning parameter: \texttt{DiffTol}, which defaults to $10^{-2}$ and empirically seems to have very little actual impact on the behaviour of the integrator. \subsection{Integrator comparison} \begin{figure} \includegraphics[width=0.32\textwidth]{doc-fig-dfl-tol.pdf} \includegraphics[width=0.32\textwidth]{doc-fig-ctime-tol.pdf} \includegraphics[width=0.32\textwidth]{doc-fig-dfl-ctime.pdf} \caption{Comparison of the integrators when measuring a deflection angle (see text). \emph{Left:} error on deflection angle vs. tuning parameter; \emph{centre:} computing time vs. tuning parameter; \emph{right:} computing time vs. error on deflection angle. Colours denote the integrator: \emph{red:} \texttt{Legacy} (\emph{solid:} specific \texttt{KerrBL} implementation, \emph{dash-dotted:} generic implementation); \emph{black:} \texttt{runge\_kutta\_fehlberg78}; \emph{blue:} \texttt{runge\_kutta\_karp54}; \emph{magenta:} \texttt{runge\_kutta\_dopri5}.} \label{fig:integrators} \end{figure} It is advisable to try the various integrators in your context, and to play with the tuning parameters. As a rule of thumbs, if you need to change DeltaMin, DeltaMax, DeltaMaxOverR, or MaxIter, it probably means that you should change for a higher-order integrator. The highest order integrator is currently \texttt{runge\_kutta\_fehlberg78} and is the default. As an example, we have compared all the integrators for a simple situation: the \texttt{Metric} is a Schwarzschild black-hole of $4\times10^6\,M_\odot$, the \texttt{Screen} is at 8~kpc, a single light-ray is launched $50\,\mu$as from the centre, we integrate the light-ray (back in time) during twice the travel-time to the origin of the coordinate centre and compute the deflection angle. We do that for each integrator and a set of numerical tuning parameters. For the \texttt{Legacy} integrator, we try both the generic integrator and the specific \texttt{KerrBL} implementation, and use DeltaMaxOverR as tuning parameter. For the Boost integrators, we use AbsTol and RelTol as tuning parameters (they are kept equal to each-other). We then compare the result for two values of the tuning parameter and measure the computing time required for each realisation. For each integrator, there exists an optimum value or the tuning parameter, for which the (estimated) uncertainty in deflection angle is minimal (Fig.~\ref{fig:integrators}, left panel). As long as the tuning parameter is larger than (or equal to) this optimum, computation time varies very little (central panel). However, when the tuning parameter becomes too small, numerical error and computation time explode (right panel). The two low-order Boost integrators are the fastest, the two \texttt{Legacy} integrators are the slowest. The default, \texttt{runge\_kutta\_fehlberg78}, has intermediate performance, but seems to yield the smallest error and to be less sensitive on the exact value of the tuning parameter close to its optimum. All the integrators except the generic implementation of the \texttt{Legacy} integrator agree to within $2\,\mu$as on the deflection angle, which is of order 33°. The relative uncertainty is therefore of order $10^{-11}$. In conclusion, for this specific use case, the best choice seems to be: \begin{code} runge_kutta_fehlberg78 1e-19 1e-19 \end{code} If computation time is more critical than accuracy, the other Boost integrators are also good choices. The Yorick code that was used to generate Fig.~\ref{fig:integrators} is provided in the \texttt{GYOTO} source code as \texttt{yorick/compare-integrators.i}. You can run it from the top directory of the built source tree as: \begin{code} yorick/yorick -i yorick/compare-integrators.i \end{code} \section{\texttt{GYOTO} architecture} \label{archi} \subsection{\texttt{GYOTO} base classes} \texttt{GYOTO} is basically organised around 8 base classes (see Fig.~\ref{fig:hierarch}): \begin{itemize} \item The \texttt{Metric} class: it describes the metric of the space-time (Kerr in Boyer-Lindquist coordinates, Kerr in Kerr-Schild coordinates, metric of a relativistic rotating star in 3+1 formalism...). \item The \texttt{Astrobj} class: it describes the astrophysical target object that must ray-traced (e.g. a thin accretion disk, a thick 3D disk, a star...). \item The \texttt{Spectrum} class: it describes the emitted spectrum of the \texttt{Astrobj}. \item The \texttt{Worldline} class: it gives the evolving coordinates of a time-like or null geodesic. The \texttt{Star} class is a sub-class of \texttt{Worldline} as for the time being a star in \texttt{GYOTO} is only described by the time-like geodesic of its centre, with a given fixed radius. \item The \texttt{WorldlineIntegState} class: it describes the integration of the \texttt{Worldline} in the given \texttt{Metric}. \item The \texttt{Screen} class: it describes the observer's screen, its resolution, its position in space-time, its field of view. \item The \texttt{Scenery} class: it describes the ray-tracing scene. It is made of a \texttt{Metric}, a \texttt{Screen}, an \texttt{Astrobj} and the quantities that must be computed (an image, a spectrum...). \item The \texttt{Factory} class: it allows to translate the \texttt{XML} input file into C++ objects. \end{itemize} Fig.~\ref{fig:hierarch} presents the main \texttt{GYOTO} classes and their hierarchy. \begin{figure}[htbp] \centering \includegraphics[width=18cm,height=20cm]{ClassHierarch.pdf} \caption{Hierarchy of \texttt{GYOTO} C++ main classes.} \label{fig:hierarch} \end{figure} \subsection{A typical \texttt{GYOTO} computation} \begin{sloppypar} %to allow proper newline for long words (in texttt) Let us now describe the main interactions of these various classes during the computation of one given photon, ray-traced in the Kerr metric in Boyer-Lindquist coordinates towards, for instance, a \texttt{PageThorneDisk}, i.e. a geometrically thin optically thick disk following \citet{page74}. All directories used in the following are located in \texttt{GYOTO} home directory. \texttt{GYOTO} \texttt{main} program is located in \texttt{bin/gyoto.C}. This program first interprets the command line given by the user. It creates a new \texttt{Factory} object, initialised by means of the \texttt{XML} input file, that will itself create (see \texttt{lib/Factory.C}) the \texttt{Scenery}, \texttt{Screen} and \texttt{Astrobj} objects. The output quantities the user is interested in (image, spectrum...) will be stored during the computation in the \texttt{data} object, of type \texttt{Astrobj::Properties}. The \texttt{Scenery} object is then used to perform the ray-tracing, by calling its \texttt{rayTrace} function. All the functions that begin with \texttt{fits\_} allow to store the final output quantities in \texttt{FITS} format. The function \texttt{Scenery::rayTrace} calls \texttt{Photon::hit} that forms the core of \texttt{GYOTO}: \texttt{Photon::hit} integrates the null geodesic from the observer's screen backward in time until the target object is reached (there are other stop conditions of course, see \texttt{lib/Photon.C}). \texttt{Photon::hit} is basically made of a loop that calls the function \texttt{WorldlineIntegState::nextStep} until a stop condition is reached. \texttt{WorldlineIntegState::nextStep} itself calls the correct adaptive fourth order Runge-Kutta integrator (RK4) , depending on the metric used. Here, the metric being \texttt{KerrBL}, the RK4 used is \texttt{KerrBL::myrk4\_adaptive}. Moreover, the \texttt{Photon::hit} also calls the \texttt{Astrobj::Impact} function that asks the \texttt{Astrobj} whether the integrated photon has reached it or not. When the photon has reached the target, this \texttt{Astrobj::Impact} function calls the \texttt{Astrobj::processHitQuantities} function that updates the \texttt{data} depending on the user's specifications. \end{sloppypar} \section{Computing an image or a spectrum in the Kerr metric with \texttt{GYOTO}} \label{kerr} \subsection{The \texttt{Screen}} The observer's \texttt{Screen} is made of $N\times N$ pixels, and has a field of view of $f$ radians. The field of view is defined as the maximum angle between the normal to the screen and the most tangential incoming geodesic. Keep in mind that the screen is point-like, the different pixels are all at the same position (the one and only screen position defined in the \texttt{XML} file), but the various pixels define various angles on the observer's sky. For instance, if $f=\pi / 2$ (which gives a view of the complete half space in front of the screen), the geodesic that hits the screen on the central pixel $(i=N/2,j=N/2)$ comes from the direction normal to the screen whereas the geodesic that hits the screen on the $(i=N,j=N/2)$ pixel comes from a direction tangential to the screen. Each pixel of the screen thus covers a small solid angle on the observer's sky. This elementary solid angle is equal to the solid angle subtended by a cone of opening angle $f$ divided by the number of pixels: $\delta\Omega_{\mathrm{pixel}} = 2\,\pi\,(1-\cos f) / N^{2}$ (assuming the field of view is small enough). \subsection{Computing an image} The quantity that is carried along the geodesics computed by \texttt{GYOTO} in most cases is the specific intensity $I_{\nu}$ ($\mathrm{erg\,cm^{-2}\,s^{-1}\,ster^{-1}\,Hz^{-1}}$). An image is then defined as a map of specific intensity: each pixel of the screen contains one value of $I_{\nu}$, that can then be plotted. It is important to keep in mind that such an "image" is not physically equivalent to a real image that would be obtained with a telescope: a real image is a map of specific fluxes values, and a specific flux is the sum of the specific intensity on some solid angle. An example of image computation has already been given in Section~\ref{demo}. \subsection{Computing a spectrum} To compute a spectrum, the \texttt{Screen} field of the \texttt{XML} file should contain information about the observed frequency range. For a real telescope, this means adding a spectrometer. The additional command in the \texttt{XML} file is thus: \begin{code} 5. 25. \end{code} This line means that that $20$ values of observed frequencies will be considered, evenly spaced logarithmically, between $10^{5}$ and $10^{25}$ Hz. It is possible to choose frequencies linearly evenly spaced by using \texttt{freq} instead of \texttt{freqlog}. It is also possible to use wavelengths instead of frequencies, see \texttt{GyotoScreen.h} for more information. Moreover, the \texttt{XML} file should explicitly state that the quantity of interest is no longer a simple image, but a spectrum. This is allowed by the following command, that should be added for instance before the end of \texttt{Scenery} field: \begin{code} Spectrum \end{code} When this command is used, the output \texttt{FITS} file will contain a cube of images, each image corresponding to one observed frequency. Computing the spectrum is now straightforward. Remembering that the flux is linked to the intensity by: \begin{equation} \D F_{\nu_{\mathrm{obs}}} = I_{\nu_{\mathrm{obs}}}\,\cos\theta\,\D \Omega, \end{equation} where $\Omega$ is the solid angle under which the emitting element is seen, and $\theta$ is the angle between the normal to the observer's screen and the direction of incidence, the flux is given by: \begin{equation} \label{deffluxGyoto} F_{\nu_{\mathrm{obs}}} = \sum_{\mathrm{pixels}} I_{\nu_{\mathrm{obs}},\mathrm{pixel}}\,\cos(\theta_{\mathrm{pixel}})\,\delta\Omega_{\mathrm{pixel}} , \end{equation} where $I_{\nu_{\mathrm{obs}},\mathrm{pixel}}$ is the specific intensity reaching the given pixel, $\theta_{\mathrm{pixel}}$ is the angle between the normal to the screen and the direction of incidence corresponding to this pixel and $\delta\Omega_{\mathrm{pixel}}$ is the element of solid angle introduced above. This quantity $F_{\nu_{\mathrm{obs}}}$ can thus be very simply computed from the cube of specific intensities computed by \texttt{GYOTO}. Examples of spectra computed by \texttt{GYOTO} can be found in, e.g.,~\citet{straub12}. Section~\ref{sect:yorick} contains example code to compute a spectrum directly using the provided Yorick interface. See also \texttt{yorick/check-polish-doughnut.i}, which does just that as part of the routine test suite of \GYOTO. \section{\texttt{GYOTO} in numerical metrics} \label{3+1} A specificity of \texttt{GYOTO} is its ability to ray-trace in non-Kerr metrics, numerically computed in the framework of the 3+1 formalism of general relativity~\citep{gourgoulhon12}, e.g. by means of the open source LORENE library developed by the Numerical Relativity group at Observatoire de Paris/LUTH\footnote{\url{http://www.lorene.obspm.fr/}}. \begin{sloppypar} For the time being, only a simple example of numerical metric is implemented in the public version of \texttt{GYOTO}: the metric of a relativistic rotating star. The file \texttt{doc/examples/example-movingstar-rotstar3\_1.xml} allows to ray-trace a basic \texttt{GYOTO} moving \texttt{Star} in this metric. The file \texttt{resu.d} specified in the \texttt{XML} file is the output of a LORENE computation for the metric of a rotating relativistic star by the LORENE/nrotstar code. \end{sloppypar} The basic functions developed in \texttt{lib/RotStar3\_1.C} are similar to their Kerr counterparts, but here the metric is expressed in terms of the 3+1 quantities (lapse, shift, 3-metric, extrinsic curvature). The equation of geodesics expressed in the 3+1 formalism is given in~\citet{vincent12a} and implemented in \texttt{lib/RotStar3\_1.C}. However, it is possible to choose in the \texttt{XML} file whether the integration will be performed by using this 3+1 equation of geodesics, or by using the most general 4D equation of geodesics~\citep[see][for a comparison of the two methods]{vincent11a}. \section{Extending \GYOTO} This section is currently under construction. \GYOTO\ can be extended easily by adding new \Metric, \Astrobj, and \Spectrum\ classes. Such classes can be written in the Python language (Sect.~\ref{sect:python-plug-in}) or in C++, in which case they are made available to Gyoto by cumpiling them into a \GYOTO\ plug-in (Sect.~\ref{sect:plug-in}). The main \GYOTO\ code-base already contain tree plug-ins: \begin{itemize} \item \texttt{stdplug}, which contain all the standard analytical metrics and all the standard astrophysical object; \item \texttt{python}, which allows implementing new \Metric, \Astrobj, and \Spectrum\ classes in the Python (2 or 3) language; \item and \texttt{lorene}, which contains the numerical, LORENE-based metrics. \end{itemize} In addition, we maintain our own private plug-in, which contains experimental or yet unpublished \Astrobj\ and \Metric\ classes. When we make a publication based on these classes, we try to move them from our private plug-in to the relevant public plug-in. We kindly request that you follow the same philosophy: whenever you write a new class and make a publication out of it, please publish the code as free software, either on your own servers or by letting us include it in \GYOTO. As soon as you write your own objects (especially if you do so in C++), you will dependent on the stability of the \GYOTO\ application programming interface, which is subject to frequent changes. It will help us to help you maintain your code if you inform us of such development: \texttt{gyoto@sympa.obspm.fr}. In addition, we try to maintain a stable branch in our github repository (\url{http://github.com/gyoto/Gyoto}). Code on this branch should remain API-and ABI-compatible with the latest official release. \subsection{Extending in Python} \label{sect:python-plug-in} The `python' plug-in allows writting derived classes in Python rather than C++. This is the easiest approach and lets you set-up your new objects in just a few lines of code, without the need for setting-up a plug-in, compiling it frequently during your deverlopment cycle. However, there is a cost in terms of code execution speed. This code is usually negligible to moderate for classes implementing the \Astrobj\ and \Spectrum\ interfaces, but it is major for classes implementing the \Metric\ interface. This is because the \Metric\ methods are evaluated several times per iteration when iterating geodesics, while the \Astrobj\ and \Spectrum\ methods are evaluated less frequently. To use your Python classes, simply load the Python plug-in, for instance by setting the \texttt{GYOTO\_PLUGINS} environment variable to include the ``python''\footnote{The actual name of the Gyoto plug-in will match that of the Python interpreter used for compiling it. For instance, if Gyoto was configured with \texttt{./configure PYTHON=/usr/bin/python3.4}, the plug-in will be called \texttt{python3.4} instead of \texttt{python}. This allows you to compile several versions of the plug-in, that will run inside each of the Python interpreters.} plug-in (see Sect.~\ref{sect:using-plug-in}). Then tell the plug-in about your module and class. For instance, in an XML file: \begin{code} Python module name for ``my_module.py'': my_module Class defined in ``my_module.py'': my_class Any parameters (foating point) ``my_class'' may need: 2.0 20.0 \end{code} The Python class will need to implement a few methods, with the same name as the C++ method it implements (except the C++ name \texttt{operator()} is translated as \texttt{\_\_call\_\_} in Python). More information can be found in the doxygen-generated documentation for the \href{https://github.com/gyoto/Gyoto/blob/master/plugins/python/include/GyotoPython.h}{\texttt{GyotoPython.h}} file and in the \href{https://github.com/gyoto/Gyoto/tree/master/plugins/python/doc/examples}{\texttt{plugins/python/doc/examples}} sub-directory of the source code distribution. \subsection{Writing a C++ plug-in} \label{sect:plug-in} A plug-in is merely a shared library which contains the object code for your new objects, plus a special initialisation function. It is loaded into memory using \texttt{dlopen()} by the function \texttt{Gyoto::loadPlugin(char const*const name, int nofail)} (note that the upper level function \texttt{Gyoto::requirePlugin(char const*const name, int nofail)} should be used instead whenever applicable), implemented in \texttt{lib/Register.C}. The \texttt{name} argument will be used three times: \begin{itemize} \item the shared library file must be called \texttt{libgyoto-\emph{name}.\$suffix} (\texttt{\$suffix} is usually \texttt{.so} under Linux, \texttt{.dylib} under Mac OS); \item the init function for your plug-in must be called either \texttt{\_\_Gyoto\emph{name}Init} or exactly \texttt{\_\_GyotoPluginInit}; \item each subcontractor registered by the init function (see below) will be tagged with the plug-in name, so it is later possible to search for a registered subcontractor by kind name and plugin name. \end{itemize} The role of the init function is to register subcontractors for your object classes so that they can be found by name. For instance, assuming you want to bundle the Minkowski metric (actually provided in the standard plug-in) in a plugin called \texttt{myplugin}, you would write a C++ file (whose name is not relevant, but assume \texttt{MyPlugin.C}) with this content: \begin{code} #include "GyotoMinkowski.h" using namespace Gyoto; extern "C" void __GyotomypluginInit() { Metric::Register("Minkowski", \&Metric::Subcontractor); } \end{code} Likewise, you could register more metrics, astrophysical objects and spectra. Other examples can be seen in the \texttt{lib/StdPlug.C} and \texttt{lib/LorenePlug.C} files, and in the \texttt{plugins/python/} directory. When building your plug-in, make sure \texttt{MyPlugin.C} ends up compiled with\\ \texttt{lib/Minkowski.C} (in this example) into a single shared library called\\ \texttt{libgyoto-myplugin.so} (assuming you work under Linux), and drop this file somewhere where Gyoto will find it at run-time. Gyoto will try to ldopen the plug-ins from the following locations in order (some variables are defined in \texttt{gyoto.pc}, see below): \begin{itemize} \item wherever the run-time linker looks by default, which typically includes: \begin{itemize} \item any directory listed in the \texttt{\$LD\_LIBRARY\_PATH} environment variable; \item \texttt{/usr/local/lib/}; \item \texttt{/usr/lib/}; \end{itemize} \item \texttt{\$\{localpkglibdir\}/\$\{GYOTO\_SOVERS\}/}; \item \texttt{\$\{localpkglibdir\}/} (typically \texttt{/usr/local/lib/gyoto}); \item \texttt{\$\{GYOTO\_PLUGDIR\}/}, this is the directory where the standard plug-ins shipped with Gyoto are installed (typically \texttt{\$\{pkglibdir\}/\$\{GYOTO\_SOVERS\}/}); \item \texttt{\$\{pkglibdir\}/} (typically \texttt{/usr/local/lib/gyoto} or \texttt{/usr/lib/gyoto}). \end{itemize} Note that \texttt{\$\{localpkglibdir\}} is defined only when it makes sense (i.e. when Gyoto is not itself installed under \texttt{/usr/local}). \GYOTO\ ships a pkg-config file (\texttt{gyoto.pc}) which stores useful build-time information such as the install prefix and the plug-in suffix. This file gets installed in the standard location, by default \texttt{/usr/local/lib/pkgconfig/gyoto.pc}. The Gyoto source code contains several examples of plug-ins. One of them is minimalistic and its only purpose is to illustrate how to build a plug-in, including an autoconf-based build system that parses \texttt{gyoto.pc}. It is a good starting point for writing your own plug-in. See the content of the subdirectory \texttt{plugins/null/}, in particular the \texttt{README} file. \subsection{Adding a new metric (\Metric)} The simplest example for a \Metric\ object is certainly the \texttt{Minkowski} class. Let's go through the header file that defines its interface (expunged from all this useless documentation \texttt{;-)}), we trust the reader to go see the corresponding \texttt{.C} file:\\ Avoid multiple and recursive inclusion of header files: \begin{code} #ifndef __GyotoMinkowski_H_ #define __GyotoMinkowski_H_ \end{code} Minkowski is a metric, include the \Metric\ base class header file: \begin{code} #include \end{code} Declare that our new class goes into the \texttt{Gyoto::Metric} namespace: \begin{code} namespace Gyoto { namespace Metric { class Minkowski; } } \end{code} Declare that Minkowski inherits from the base class: \begin{code} class Gyoto::Metric::Minkowski : public Gyoto::Metric::Generic { \end{code} Each class must be friend with the corresponding \texttt{SmartPointer} class: \begin{code} friend class Gyoto::SmartPointer; \end{code} Minkowski has no private data, else we would put it here: \begin{code} private: \end{code} Every class needs a constructor, which will at least populate the \texttt{kind\_} attribute of the parent class and the kind of coordinate system (Cartesian-like or spherical-like): \begin{code} public: Minkowski(); \end{code} The cloner is important, and easy to implement. It must provide a deep copy of an object instance. It is used in the multi-threading case to make sure two threads don't tip on each-other's toes, and in the Yorick plug-in (Sect.~\ref{sect:yorick}) when you want to make a copy of an object rather than reference the same object: \begin{code} virtual Minkowski* clone() const ; \end{code} Then come the two most important methods, which actually define the mathematical metric: \begin{code} void gmunu(double g[4][4], const double * x) const ; int christoffel(double dst[4][4][4], const double * x) const ; \end{code} The \texttt{setParameter} method is the one that interprets options from the XML file. For each XML entity found in the \Metric\ section in the form\\ \texttt{ParValueString},\\ the method \texttt{Metric::Generic::setParameters()} will call\\ \texttt{setParameter(ParName, ParValueString, unit\_name)}: \begin{code} virtual void setParameter(std::string, std::string, std::string); \end{code} \texttt{setParameter()} should interpret the parameters specific to this class and pass whatever remains to the \texttt{Generic} implementation. \texttt{setParameter()} has a counterpart,\\ \texttt{fillElement()}, which is mostly used by the Yorick plug-in (Sect.~\ref{sect:yorick}) to dump an in-memory object instance to text format (this is what allows \texttt{gyotoy}, Sect.~\ref{sect:gyotoy}, to write its parameters to disk). This method must be compiled only if XML input/output is compiled in: \begin{code} #ifdef GYOTO_USE_XERCES virtual void fillElement(FactoryMessenger *fmp); #endif \end{code} The Minkowski implementation goes on with an alternate implementation of \texttt{gmunu()} and \texttt{christoffel()}. For the purpose of this documentation, we will skip these additional examples and close the header file here: \begin{code} }; #endif \end{code} For more details, see the \GYOTO\ reference manual in \texttt{doc/html/} or at \url{http://gyoto.obspm.fr/}. There are a few other methods that are worthwhile reimplementing, such as \texttt{circularVelocity()}, which allows getting accurate beaming effects for thin disks and tori. Naturally, \texttt{circularVelocity()} can only be implemented if circular orbits physically exist in this metric (else, the Keplerian approximation is readily provided by the generic implementation). Some other low-level methods can be reimplemented, but it is not necessarily a good idea. Once you have implemented the new Metric, just make sure it is compiled into your plug-in and initialised in the initialisation function (Sect.~\ref{sect:plug-in}). For official \GYOTO\ code (that does not depend on LORENE), this is done by adding your \texttt{.C} file to\\ \texttt{libgyoto\_stdplug\_la\_SOURCES} in \texttt{lib/Makefile.am} (and running \texttt{autoreconf} followed by \texttt{configure}), and adding one line in \texttt{\_\_GyotostdplugInit} in \texttt{lib/StdPlug.C}. \subsection{Adding a new spectrum (\Spectrum)} Adding a new spectrum kind is almost the same as adding a metric. \subsection{Adding a new astrophysical target object (\Astrobj)} \label{newastrobj} Adding a new astronomical object kind is almost the same as adding a metric. However, astronomical objects are more complex than metrics (they can have abundant hair). Instead of inheriting directly from the most generic base class, \texttt{Gyoto::Astrobj::Generic}, you will save yourself a lot of effort if you are able to derive from one of the higher level bases: \begin{description} \item[Astrobj::ThinDisk] a geometrically thin disk (e.g. \texttt{PageThorneDisk}, \texttt{PatternDisk}); \item[Astrobj::UniformSphere] a... uniform sphere (e.g. \texttt{Star}, \texttt{FixedStar}); \item[Astrobj::Standard] any object whose boundary can be defined as an iso-surface of some function of the coordinates, such as a sphere or a torus (e.g. \texttt{UniformSphere}, \texttt{Torus}). \end{description} \subsection{Using your new plug-in} \label{sect:using-plug-in} There are several ways to instruct \GYOTO\ to load your plug-in. You can set the environment variable\texttt{GYOTO\_PLUGINS}\footnote{How to do it depends on your shell and is outside the scope of this manual.}, with a command such as \begin{code} export GYOTO_PLUGINS=stdplug,myplugin \end{code} Alternatively, a list of plug-ins can be specified on the command-line when using the \texttt{gyoto} tool: \begin{code} $ gyoto --plugins=stdplug,myplugin ... $ gyoto -pstdplug,myplugin ... \end{code} %$ A plug-in can also be specified in the input XML file for each section: \begin{code} \end{code} Finally, the Yorick interface (Sect.~\ref{sect:yorick}) has a function to explicitly load a \GYOTO\ plug-in at run-time: \begin{code} > gyoto.requirePlugin("myplugin"); \end{code} Once the plug-in is loaded, your new object kinds should be registered (that's the purpose of the init function). To check that your objects are correctly register, you can use the \texttt{-{}-list} (or \texttt{-l}) option of the \texttt{gyoto} tool or the \texttt{gyoto.listRegister()} function of the Yorick interface: \begin{code} $ gyoto --list [input.xml] $ gyoto -l [input.xml] \end{code} %$ You can use then use your classes directly in an XML file, using the name you provided to the \texttt{Register()} function in the init function of the plug-in: \begin{code} \end{code} The Yorick interface can load any object from an XML description, an can also initialise any object from its name: \begin{code} > metric = gyoto.Metric("Minkowski", "myplugin"); \end{code} If your object supports any options using the \texttt{setParameter()} method, these options can also be set from within Yorick: \begin{code} > metric, setparameter="ParName", "ParValueString", unit="unit_string"; \end{code} If your want finer access to your objects from the Yorick interface, you will need to provide a Yorick plug-in around your \GYOTO\ plug-in. Look at the content of the \texttt{yorick/stdplug/} directory. For new official \GYOTO\ objects in the standard plug-in, it is fairly easy to provide an interface directly inside our Yorick plug-in. \subsection{Quality assurance} It is customary to provide a test-suite for every new class in \GYOTO. This normally includes an example file in \texttt{doc/examples}, which is ray-traced in the \texttt{check} target of \texttt{bin/Makefile.am}. Usually, we also provide a new Yorick test file called\\ \texttt{yorick/check-myclass.i} which is called from \texttt{yorick/check.i}. This is a good idea to do so even if you don't intend on using the Yorick plug-in: at least, you can use this interpreted interface to perform unit tests on your code in a more fine-grained manner than a full-featured ray-traced image. \bibliographystyle{kluwer} \bibliography{\GyotoSrcDir/doc/user_guide/GyotoManual} \end{document} %%%Local Variables: %%% mode: latex %%% coding: utf-8 %%% TeX-PDF-mode: t %%% ispell-local-dictionary: "en_GB" %%%End: Gyoto-1.2.0/doc/user_guide/Makefile.in000066400000000000000000000011551302352257300175640ustar00rootroot00000000000000PDFLATEX=@PDFLATEX@ BIBTEX=@BIBTEX@ PDFLATEXCMD = $(PDFLATEX) \ '\nonstopmode \newcommand{\GyotoSrcDir}{@top_srcdir@} \input{@srcdir@/GyotoManual.tex}' vpath %.tex @srcdir@ vpath %.bib @srcdir@ TEXINPUTS=.:@srcdir@:@top_srcdir@/images/: export TEXINPUTS all: GyotoManual.pdf GyotoManual.aux: GyotoManual.tex $(PDFLATEXCMD) GyotoManual.bbl: GyotoManual.aux GyotoManual.bib $(BIBTEX) $< GyotoManual.pdf: GyotoManual.tex GyotoManual.bbl $(PDFLATEXCMD) $(PDFLATEXCMD) clean: -rm GyotoManual.aux GyotoManual.bbl GyotoManual.blg GyotoManual.log -rm GyotoManual.out GyotoManual.pdf GyotoManual.toc .PHONY: clean Gyoto-1.2.0/doc/user_guide/README000066400000000000000000000001451302352257300163750ustar00rootroot00000000000000To build the user guide, you need: - pdflatex; - bibtex; - Harvard kluwer.bst. Simply type make. Gyoto-1.2.0/git-post-merge000077500000000000000000000011071302352257300154050ustar00rootroot00000000000000#!/bin/bash # # Git does not preserve time stamps. This causes problems with files # generated with the autotools ("automake" and "autoconf"), as # generated files may seem older than source files and "make" will try # to regenerate them. # # This script fixes time stamps of these generated files. # # To run this script automatically after every "git merge" or "git # pull" invocation, copy it or link it as .git/hooks/post-merge . touch aclocal.m4 plugins/*/aclocal.m4 configure plugins/*/configure Makefile.in */Makefile.in */*/Makefile.in */*/*/Makefile.in config.h.in exit 0 Gyoto-1.2.0/gyoto.in000066400000000000000000000017361302352257300143150ustar00rootroot00000000000000#!/bin/bash # Copyright 2014 Thibaut Paumard # # This file is part of Gyoto. # # Gyoto 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 3 of the License, or # (at your option) any later version. # # Gyoto is distributed in the hope that 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 Gyoto. If not, see . # This script is a wrapper around the yorick interpreter meant to run # the gyoto plug-in from the built source tree. It is not supposed to # be installed on the system. abs_top_builddir=@abs_top_builddir@ export PATH="${abs_top_builddir}/bin:${PATH}" gyoto $@ exit 0 Gyoto-1.2.0/include/000077500000000000000000000000001302352257300142405ustar00rootroot00000000000000Gyoto-1.2.0/include/Gyoto.h000066400000000000000000000272771302352257300155310ustar00rootroot00000000000000/* Copyright 2011-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ /** * \file Gyoto.h * \brief All of Gyoto * * Gyoto.h should include all of the other Gyoto C++ header * files. Note that at any given time it may be lacking some new * headers. It is always best to specifically include the headers that * you actually use. * * Beware that some symbols are resolved only in the * plugins (libgyoto-stdplug.so, libgyoto-lorene.so). */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /** * \mainpage Gyoto
General relativitY Orbit Tracer of Observatoire de Paris
* * \ref download_sec | \ref manual_sec | \ref conditions_sec * * Gyoto aims at providing a framework for computing orbits and * ray-traced images in General relativity. It consists of a library * (libgyoto), utility programs, a plug-in for the Yorick programing * language, and an extension for the Python (2 and 3) programing * language. Gyoto is known to run under Linux and Mac OS X. Please do * tell us if you manage to run Gyoto under a different OS. It should * compile and run with moderate effort on most UNIX-like systems. * * Gyoto can be expanded with plug-ins providing custom * Gyoto::Metric::Generic, Gyoto::Astrobj::Generic and * Gyoto::Spectrum::Generic classes, which describe respectively * analytical or numerical metrics, astronomical objects, and spectral * shapes for astronomical objects (see \ref * writing_plugins_page). Custom Gyoto::Metric::Generic, * Gyoto::Astrobj::Generic and Gyoto::Spectrum::Generic classes can * also be written in the Python * (2.7 or 3.x) interpreted language using the \c python plug-in for * Gyoto, see below. Beware that a Python implementation of a custom * class will run significantly slower than the equivalent C++ * implementation, but sometimes saving on development time is better * than saving on computing time. * * The base distribution includes three plug-ins: the standard plug-in * (\c stdplug), a plug-in for using LORENE-based * numerical metrics (\c lorene) and a plug-in for writing custom * astronomical objects or metrics in the Python (2.7 or 3.x) interpreted * language (\c python). * * A graphical user interface for tracing stellar orbits is provided * with the Yorick plug-in (see \ref yorick_plugin_page). * * * \image html gyotoy_screenshot.png * * \section download_sec Downloading and installing * * Detailed information on installing Gyoto is available here. The user manual below is also a valuable read. * * \section manual_sec User manual * * The user manual is available here. * * \section conditions_sec Conditions for use * * We request that use of Gyoto in scientific publications be properly * acknowledged. Please cite: * * F. H. Vincent, T. Paumard, E. Gourgoulhon & G. Perrin: * GYOTO: a new general relativistic ray-tracing code, * Classical and Quantum Gravity 28, 225011 (2011) * [published version] * [preprint: arXiv:1109.4769] * * We also request that Gyoto modifications, extensions or plug-ins * leading to a scientific publication be made public as free software * reasonably fast (within one year after publication of the scientific * paper), for instance by contributing it directly to the Gyoto * code base. Contributors will be listed in the relevant source files as * well as in the AUTHORS file in the package. * * Gyoto is Copyright 2011-2016 Thibaut Paumard, * Frédéric Vincent and Odele Straub. * * Gyoto 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 3 of the License, or * (at your option) any later version. * */ /** \page yorick_plugin_page Gyoto for Yorick \section yoprerec_sec Prerequisites \subsection yo_sec Yorick For direct access to Gyoto, only Yorick (>=2.2) is required. Yorick comes precompiled with many distributions of Linux and is present in the Macports. You can also find source code at https://github.com/dhmunro/yorick For the graphical user interface Gyotoy, you'll need a few additional pieces. First of all, I seriously doubt it will run under MS Windows, but please report any news on that front. \subsection yutils_sec Yutils A collection of utilities for Yorick, distributed as yorick-yutils in many Linux distributions. Actually, only pyk.i is used in Gyotoy (so far), and as of writing, the CVS version is required. Either get yutils > 1.4.0 from e.g. http://www.maumae.net/yorick/packages/src/ or fetch pyk.i from the CVS browser at http://yorick.cvs.sourceforge.net/viewvc/yorick/yorick-yutils/pyk.i?view=markup \subsection pygtk_sec PyGObject The graphical interface gyotoy needs yorick-gy and the Gtk 3 GObject Introspection files. Get yorick-gy from: https://github.com/paumard/yorick-gy Under Mac OS X (using macports), install the gtk3 package. Under a Debian derivative GNU/Linux system, install gir1.2-gtk-3.0. Check yorick/README.gyotoy in the source distribution for more details. \section building_sec Building From the Gyoto source directory (i.e. the directory which contains the yorick/ subdirectory: \code make yorick \endcode You can check the package by running \code make check-yorick \endcode \section installing_sec Installing \code sudo make install-yorick \endcode \section running_sec Running Read gyoto.i and check.i for using Gyoto from within Yorick. The graphical interface, Gyotoy, can be run with \code yorick -i gyotoy.i \endcode or \code gyotoy \endcode */ /** \page writing_plugins_page Writing plug-ins for Gyoto Al the generic Gyoto machinery for computing orbits, reading input files, performing ray-tracing etc. is implemented in libgyoto. On the other hand, all the code specific to a given metric kind or a given astronomical object is available in plug-ins. For instance, the standard plug-in libgyoto-stdplug contains the two flavors of the Kerr metric: Gyoto::KerrBL and Gyoto::KerrKS, as well as basic objects: Gyoto::FixedStar, Gyoto::Star, Gyoto::Torus, Gyoto::ThinInfiniteDiskBL and Gyoto::ThinInfiniteDiskKS. The libgyoto-lorene plug-in contains the code to access numerical metrics (Gyoto::LoreneMetric) as well as an example thereof: Gyoto::RotStar3_1. The two basic spectral shapes Gyoto::Spectrum::PowerLaw and Gyoto::Spectrum::BlackBody are also to be found in the standard plug-in. Gyoto can be used right away to compute stellar orbits in the Kerr metric or to do basic ray-tracing of accretion disks. But Gyoto is not limited to the basic metrics and objects we have thought of. It is fairly easy to add custom metrics and objects (and emission/absorption laws) it Gyoto, and Gyoto itself does not need to be modified or even re-compiled to do so: custom classes can (and should) be implemented as plug-ins. For an example, simply look at the lib/StdPlug.C file in the source distribution, and the source files for the objects and metrics it provides: e.g. lib/FixedStar.C and lib/KerrBL.C. To implement a new plug-in, you first need to implement a derived class of either the Gyoto::Astrobj, Gyoto::Metric, or Gyoto::Spectrum::Generic class. You don't necessarily need to implement everything, the Gyoto::Astrobj page explains what is required for an astronomical object. Assuming you want to be able to actually use your custom class, you need a way to instantiate it. This is normally the job of the Gyoto::Factory. You need to instruct the Gyoto::Factory how to read parameters for your specific class from an XML file by implementing a subcontractor (for a Gyoto::Astrobj, the subcontractor is a static method of the Gyoto::Astrobj::Subcontractor_t type). The subcontractor communicates with the Gyoto::Factory by means of a Gyoto::FactoryMessenger and basically loops calling the Gyoto::FactoryMessenger::getNextParameter() method (see the GyotoRegister.h file, unfortunately undocumented at the moment). You also need to register your subcontractor, so that the Gyoto::Factory knows it must call it when it encounters a tag of the form <Astrobj kind="YourKind"> in an XML description. This is typically done by providing an static Init method in your class: \code void Gyoto::FixedStar::Init() { Gyoto::Astrobj::Register("FixedStar", &Gyoto::FixedStar::Subcontractor); } \endcode You need to make sure this Init() method is called when your plug-in is loaded. Assume you decide to call your plug-in MyPlug, and it contains a single Gyoto::Astrobj named Gyoto::MyObj. You will compile it under the file name libgyoto-MyPlug.so (under Linux) or libgyoto-MyPlug.dylib (under MacOS X). Just put this file somewhere where the dynamic linker can find it (any directory listed in $LD_LIBRARY_PATH or $DYLD_LIBRARY_PATH will be fine; /usr/local/lib/ should also be fine). In addition to the implementation of the Gyoto::MyObj class, you will need to provide a function called __GyotoMyPlugInit() which will be exactly this: \code extern "C" void __GyotostdplugInit() { Gyoto::MyObj::Init(); } \endcode This function is typically provided in a separate source file (such as lib/StdPlug.C in the Gyoto source) and can initialize several custom classes at once. Finally, you need to instruct Gyoto to load your plug-in at run time. This is done by adding the name of your plug-in to the GYOTO_PLUGINS environment variable. The default value for GYOTO_PLUGINS is "stdplug,nofail:lorene", meaning Gyoto should load the standard plug-in stdplug and attempt to load the lorene plug-in, failing only if stdplug is nowhere to be found. If you want to load your plug-in in addition to those, alter this variable in your shell (if you don't know what this means or how to do this, ask the local Unix guru or read the fine manual): \code export GYOTO_PLUGINS="stdplug,nofail:lorene,MyPlug" \endcode but if your lug-in is self-contained and your don't need the objects in the standard plug-ins, this will do it for you: \code export GYOTO_PLUGINS="MyPlug" \endcode This will instruct Gyoto to locate and load the file named libgyoto-MyPlug.(so|dylib) and to run the function named __GyotostdplugInit() from this library file. */ Gyoto-1.2.0/include/GyotoAstrobj.h000066400000000000000000000642541302352257300170520ustar00rootroot00000000000000/** * \file GyotoAstrobj.h * \brief Astronomical objects (light emitters) * * The target of ray-traced Gyoto::Photon */ /* Copyright 2011-2016 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoAstrobj_H_ #define __GyotoAstrobj_H_ #include "GyotoConfig.h" #include #include #include #include #include #include #include #include namespace Gyoto{ class Photon; namespace Register { class Entry; } namespace Metric { class Generic; } class FactoryMessenger; namespace Astrobj { class Generic; class Properties; /** * This is a more specific version of the * SmartPointee::Subcontractor_t type. An Astrobj::Subcontrator_t * is called by the Gyoto::Factory to build an instance of the * kind of astronomical object specified in an XML file (see * Register()). The Factory and Subcontractor_t function * communicate through a Gyoto::FactoryMessenger. A template is * provided so that you may not have to code anything. */ typedef SmartPointer Subcontractor_t(Gyoto::FactoryMessenger*, std::vector const &); ///< A function to build instances of a specific Astrobj::Generic sub-class /** * Instead of reimplementing the wheel, your subcontractor can simply be * Gyoto::Astrobj::Subcontractor. * * If MyKind accepts any XML parameters, it should re-implement * Astrobj::Generic::setParameter() or, if low-level access to the * FactoryMessenger is needed, Generic::setParameters(). * * \tparam T Gyoto::Astrobj::Generic sub-class */ template SmartPointer Subcontractor (FactoryMessenger* fmp, std::vector const &plugin) { SmartPointer ao = new T(); ao -> plugins(plugin) ; #ifdef GYOTO_USE_XERCES if (fmp) ao -> setParameters(fmp); #endif return ao; } ///< A template for Subcontractor_t functions /// Query the Astrobj register /** * Query the Astrobj register to get the Astrobj::Subcontractor_t * corresponding to a given kind name. This function is normally * called only from the Factory. If plugin is specified, only a * subcontractor matching both name and plugin will be returned, * loading the plug-in if necessary. If plugin is the empty * string, then the first subcontractor matching name will be * returned, and the name of the plug-in it belongs to will be * returned in plugin upon output. * * \param[in] name e.g. "Star" * \param[inout] plugin e.g. "stdplug". * \param[in] errmode 1 to return NULL in case of failure instead of * throwing an Error. * \return pointer to the corresponding subcontractor. */ Gyoto::Astrobj::Subcontractor_t* getSubcontractor(std::string name, std::vector &plugin, int errmode = 0); /** * Use the Astrobj::initRegister() once in your program to * initiliaze it, the Astrobj::Register() function to fill it, and * the Astrobj::getSubcontractor() function to query it. */ extern Gyoto::Register::Entry * Register_; ///< The Astrobj register /** * This must be called once. */ void initRegister(); ///< Empty the Astrobj register /** * Register a new Astrobj::Generic sub-class so that the * Gyoto::Factory knows it. * * \param name The kind name which identifies this object type in * an XML file, as in <Astrobj kind="name"> * * \param scp A pointer to the subcontractor, which will * communicate with the Gyoto::Factory to build an instance of * the class from its XML description */ void Register(std::string name, Gyoto::Astrobj::Subcontractor_t* scp); ///< Make an Astrobj kind known to the Factory } } /** * \namespace Gyoto::Astrobj * \brief Access to astronomical objects * * Objects which are supposed to be the target of the ray-tracing * code should inherit from the Gyoto::Astrobj::Generic class. * * When implementing a new object, you must: * - make sure the object can be loaded from XML by providing a * Subcontractor_t using the Gyoto::Astrobj::Register(std::string * name, Gyoto::Astrobj::Subcontractor_t* scp) function; * - make sure this subcontractor is registerred in the initialization * routine of your plug-in; * - make sure Generic::Impact() works (see below). * * In addition, you should make sure that your object plays nicely in * the Yorick plug-in, which means: * - implement the copy constructor and the Generic::clone() method; * - implement the fillElement method, used for printing and saving to * XML. * * There are basically two ways of making Generic::Impact() work: * either by making the Astrobj a sub-class of the low-level * Gyoto::Astrobj::Generic class ans providing your own * Generic::Impact() function (which, in principle, should rely on * Generic::processHitQuantities()), or by making the Astrobj a * sub-class of the higher-level Gyoto::Astrobj::Standard class and * implementing two lower level, simpler functions which are * used by the Standard::Impact(): * - Standard::operator()() yields a distance or potential defining * the interior of the object; * - Standard::getVelocity() yields the velocity field of the fluid. * * Generic::processHitQuantities() itself is an intermediate-level * function which you may choose to reimplement. It uses three * low-level, easy to implement functions: * - Generic::emission(); * - Generic::integrateEmission(); * - Generic::transmission(). * Default implementations of these three functions exist, they have * little physical relevance but allow quick 0-th order vizualisation * of your object. * * To be usable, a Astrobj::Generic (or Astrobj::Standard) sub-classe * should register an Astrobj::Subcontractor_t function using the * Astrobj::Register() function. See also \ref writing_plugins_page * . If your clas implements setParameter() and/or, if necessary, * setParameters(), registering it is normally done using the provided * template: * \code * Astrobj::Register("MyKind", &(Astrobj::Subcontractor)); * \endcode */ /** * \class Gyoto::Astrobj::Generic * \brief Base class for astronomical object * * See introduction in the Gyoto::Astrobj namespace. */ class Gyoto::Astrobj::Generic : public Gyoto::SmartPointee, public Gyoto::Object { friend class Gyoto::SmartPointer; // Data : // ----- protected: /** * \brief The Metric in this end of the Universe */ SmartPointer gg_; /** * Maximum distance from the center of the coordinate system at * which a photon may hit the object. Child classes may compute a * decent value for #rmax_ at any time if #rmax_ is * DBL_MAX. External classes (Photons in particular) must use rMax() * to access this information. * * #rmax_ is in geometrical units. */ double rmax_; ///< Maximum distance to the center of the coordinate system [geometrical units] bool flag_radtransf_; ///< 1 if radiative transfer inside Astrobj, else 0 int radiativeq_; ///< 1 to use the new radiativeQ function (under dvp) int shadow_; ///< 1 to highlight the shadow region in the image int noredshift_; ///< 1 to impose redshift factor g = 1 // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; /** * #kind_ = "Default", #rmax_ = DBL_MAX */ Generic(); ///< Default constructor. /** * #kind_ = "Default", #rmax_ = radmax */ Generic(double radmax); ///< Set rmax in constructor. /** * #kind_ = kind, #rmax_ = DBL_MAX */ Generic(std::string kind); ///< Set kind in constructor. /** * Make a deep copy of an Astrobj::Generic instance */ Generic(const Generic& ) ; ///< Copy constructor. /** * This method must be implemented by the various Astrobj::Generic * subclasses in order to support cloning: * \code * SmartPointer deep_copy = original->clone(); * \endcode * * Cloning is necessary for multi-threading, recommended for * interaction with the Yorick plug-in etc. * * Implementing it is very straightforward, as long as the copy * constructor Generic(const Generic& ) has been implemented: * \code * MyAstrobj* MyAstrobj::clone() const { return new MyAstrobj(*this); } * \endcode */ virtual Generic* clone() const = 0 ; ///< Cloner virtual ~Generic() ; ///< Destructor: does nothing. // Accessors // --------- public: /** * \brief Get the Metric #gg_ */ virtual SmartPointer metric() const; /** * \brief Set the Metric #gg_ */ virtual void metric(SmartPointer) ; /** * Get maximal distance from center of coordinate system at which a * Photon may hit the object. * * Child classes may use the #rmax_ member to cache this value, if * its current value is DBL_MAX. * * It can also be set using rMax(). * * \return rmax_ in geometrical units */ virtual double rMax(); ///< Get maximal distance from center of coordinate system virtual double rMax() const; ///< Get maximal distance from center of coordinate system /** * Call rMax() and convert result to unit. * * \param unit string * \return double rmax converted to unit */ virtual double rMax(std::string const &unit); ///< Get rmax_ is specified unit virtual double rMax(std::string const &unit) const; ///< Get rmax_ is specified unit /// Get max step constraint for adaptive integration /** * \param[in] coord position * \return max step to find this object reliably */ virtual double deltaMax(double coord[8]); const std::string kind() const; ///< Get the kind of the Astrobj (e.g. "Star") /** * Set maximal distance from center of coordinate system at which a * Photon may hit the object. * * \param val new #rmax_ in geometrical units. */ virtual void rMax(double val); ///< Set maximal distance from center of coordinate system /** * Call Generic::rMax(double val) after converting val from unit * to geometrical units. * * \param val #rmax_ expressed in unit "unit"; * \param unit string... */ virtual void rMax(double val, std::string const &unit); ///< Set maximal distance from center of coordinate system /** * Set flag indicating that radiative transfer should be integrated, * i.e. the object is to be considered optically thin. * \param flag: 1 if optically thin, 0 if optically thick. */ void opticallyThin(bool flag); ///< Set whether the object is optically thin. /** * See opticallyThin(bool flag). */ bool opticallyThin() const ; ///< Query whether object is optically thin. void radiativeQ(bool flag); bool radiativeQ() const ; void showshadow(bool flag); bool showshadow() const ; void redshift(bool flag); bool redshift() const ; /** * Return a Gyoto::Quantity_t suitable as input to * Gyoto::Scenery::setRequestedQuantities() to set de default * quantities to compute for this object. The default of these * defaults GYOTO_QUANTITY_INTENSITY. */ virtual Gyoto::Quantity_t getDefaultQuantities(); ///< Which quantities to compute if know was requested //XML I/O public: #ifdef GYOTO_USE_XERCES /** * \brief Main loop in Subcontractor_t function * * The Subcontractor_t function for each Astrobj kind should look * somewhat like this (templated as * Gyoto::Astrobj::Subcontractor): * \code * SmartPointer * Gyoto::Astrobj::MyKind::Subcontractor(FactoryMessenger* fmp) { * SmartPointer ao = new MyKind(); * ao -> setParameters(fmp); * return ao; * } * \endcode * * Each object kind should implement setParameter(string name, * string content, string unit) to interpret the individual XML * elements. setParameters() can be overloaded in case the specific * Astrobj class needs low level access to the FactoryMessenger. See * UniformSphere::setParameters(). */ virtual void setParameters(FactoryMessenger *fmp); #endif // Outputs // ------- public: /** * Impact() checks whether a Photon impacts the object between two * integration steps of the photon's trajectory (those two steps are * photon->getCoord(index, coord1) and photon->getCoord(index+1, * coord2)). Impact returns 1 if the photon impacts the object * between these two steps, else 0. In many cases of geometrically * thick obects, the implementation Astrobj::Standard::Impact() will * be fine. * * Impact will call Generic::processHitQuantities() (which is * virtual and may be re-implemented) to compute observable * properties on demand: if the data pointer is non-NULL, the object * will look in it for pointers to properties which apply to its * kind. If a pointer to a property known to this object is present, * then the property is computed and store at the pointed-to * address. For instance, all objects know the "intensity" * property. If data->intensity != NULL, the instensity is computed * and stored in *data->intensity. * * If data is non-NULL and only in this case, processHitQuantities() * will also call ph->transmit() to update the transmissions of the * Photon (see Photon::transmit(size_t, double)). This must not be * done if data is NULL (see Astrobj::Complex::Impact() for an * explanation). * * \param ph Gyoto::Photon aimed at the object; * \param index Index of the last photon step; * \param data Pointer to a structure to hold the observables at impact. * * \return 1 if impact, 0 if not. */ virtual int Impact(Gyoto::Photon* ph, size_t index, Astrobj::Properties *data=NULL) = 0 ; ///< Does a photon at these coordinates impact the object? /** * \brief Fills Astrobj::Properties * * processHitQuantities fills the requested data in Impact. To use * it, you need to call it in the Impact() method for your object in * case of hit. It will fill Redshift, Intensity, Spectrum, * BinSpectrum and update the Photon's transmission by calling * Photon::transmit(), only if data==NULL. * * You can overload it for your Astrobj. The generic implementation * calls emission(), integrateEmission() and transmission() below. */ virtual void processHitQuantities(Photon* ph, double* coord_ph_hit, double* coord_obj_hit, double dt, Astrobj::Properties* data) const; /** * \brief Specific intensity Iν * * Called by the default implementation for processHitQuantities(). * * emission() computes the intensity Iν emitted by the * small volume of length dsem, in the emitter's * frame. It should take self-absorption along dsem into * account. * * Reminder : * - intensity = Iν [J m^-2 s^-1 ster^-1 Hz^-1]; * * - invariant intensity = Iν3, which * has the same value in any frame; * * - emission coefficient = jν [J m^-3 s^-1 ster^-1 * Hz^-1] , defined by dIν = jν*ds, * where ds is the distance travelled by the photon inside the * object; * - invariant emission coef = jν2, * which has the same value in any frame. * * The equation used for radiative transfer (without absorption) is: * * d(Iν3)/dλ = (jν2) [*] * * where λ is the integration parameter along the null geodesic. * * NB: Let us consider a particular observer, with ν being the * frequency measured by this observer, and ds being the proper * distance (as measured by the observer) that the photon travels * as it moves from λ to λ+dλ along its * geodesic. Then it can be shown that: * * dλ = ds/ν * * This shows that Eq. [*] is homogeneous. * * The default implementation returns 1. if optically thick and dsem * if optically thin. It allows for a quick implementation of your * object for visualization purposes. * * \param nu_em Frequency at emission [Hz] * \param dsem length over which to integrate inside the object * [geometrical units] * \param coord_ph Photon coordinate * \param coord_obj Emitter coordinate at current photon position */ virtual double emission(double nu_em, double dsem, double coord_ph[8], double coord_obj[8]=NULL) const ; /** * \brief Specific intensity Iν for several values of νem * * Called by the default implementation for processHitQuantities(). * * emission() computes the intensity Iν emitted by the small * volume of length dsem. It should take self-absorption along dsem * into account. * * Same as emission(double nu_em, double dsem, double coord_ph[8], * double coord_obj[8]=NULL) const * looping on several values of nu_em. * * \param Inu[nbnu] Output (must be set to a previously allocated * array of doubles) * \param nu_em[nbnu] Frequencies at emission * \param nbnu Size of Inu[] and nu_em[] * \param dsem Length over which to integrate inside the object * \param coord_ph Photon coordinate * \param coord_obj Emitter coordinate at current photon position * \return Iν or dIν [W m-2 sr-2] */ virtual void emission(double Inu[], double nu_em[], size_t nbnu, double dsem, double coord_ph[8], double coord_obj[8]=NULL) const ; // Under development virtual void radiativeQ(double Inu[], double Taunu[], double nu_em[], size_t nbnu, double dsem, double coord_ph[8], double coord_obj[8]=NULL) const ; /** * Compute the integral of emission() from ν1 to * ν2. The default implementation is a numerical * integrator which works well enough and is reasonably fast if * emission() is a smooth function (i.e. no emission or absorption * lines). If possible, it is wise to implement an analytical * solution. It is used by processHitQuantities to compute the * "BinSpectrum" quantity which is the most physical: it is the only * quantity that can be actually measured directly by a real-life * instrument. */ virtual double integrateEmission(double nu1, double nu2, double dsem, double c_ph[8], double c_obj[8]=NULL) const; ///< ∫ν1ν2 Iν dν (or jν) /** * Like double integrateEmission(double nu1, double nu2, double * dsem, double c_ph[8], double c_obj[8]) const for each * Spectrometer channel. */ virtual void integrateEmission(double * I, double const * boundaries, size_t const * chaninds, size_t nbnu, double dsem, double *cph, double *co) const; ///< ∫ν1ν2 Iν dν (or jν) /** * transmission() computes the transmission of this fluid element or * 0 if optically thick. The default implementation returns 1. (no * attenuation) if optically thin, 0. if optically thick. * * \param nuem frequency in the fluid's frame * \param coord Photon coordinate * \param dsem geometrical length in geometrical units */ virtual double transmission(double nuem, double dsem, double coord[8]) const ; ///< Transmission: exp( αν * dsem ) }; /** * \class Gyoto::Astrobj::Properties * \brief Observable properties of an Astronomical object * * The sort of properties one wants to measure on a ray-traced * Gyoto::Photon which hits a Gyoto::Astrobj. Not all Astrobj are * able to fill all of these properties. * * An instance of Properties essentially contains a bunch of pointers * to memory areas where the observable quantities (see Quantity_t) * should be stored. * * Astrobj::Generic::processHitQuantities() fills the various arrays * upon request. A quantity is ignored if the corresponding pointer * is NULL. * * Scenery::operator()() increments the Properties between each * Photon using Properties::operator++(). * * The main application (gyoto, the yorick plug-in, or your user * application) is responsible for allocating the various arrays, * filling the various members of Properties, and doing whatever * meaninful with the arrays after they have been filled with values * by the ray-tracing code (e.g. saving them to disk or displaying * them). * * Also see Gyoto::Scenery and Gyoto::Quantity_t. */ class Gyoto::Astrobj::Properties : public Gyoto::SmartPointee { friend class Gyoto::SmartPointer; public: double *intensity; ///< GYOTO_QUANTITY_INTENSITY : Intensity double *time; ///< GYOTO_QUANTITY_EMISSIONTIME: EmissionTime /** * Behaves like the square of the closest distance between Photon * and Astrobj (but not exactly that). Initialize it to DBL_MAX from * float.h.; */ double *distance; ///< GYOTO_QUANTITY_MIN_DISTANCE: MinDistance /** * First local minimum in distance from object */ double * first_dmin; ///< GYOTO_QUANTITY_FIRST_DMIN : FirstDmin /** * Properties::first_dmin will be set to the first local minimum and * Properties::first_dmin_found will be set to 1 if a local minimum * in distance is found. Initialize it to 0. */ int first_dmin_found; ///< Whether Properties::first_dmin was found /** * Redshift factor νobsem (necessary * for emission lines computation) */ double *redshift; ///< GYOTO_QUANTITY_REDSHIFT : RedShift /** * Iν (ν) (observed specific intensity) */ double *spectrum; ///< GYOTO_QUANTITY_SPECTRUM : Spectrum /** * Iν1ν2, the * integral of Iν over each spectral channel * (i.e. what a spectrometer would measure) */ double *binspectrum; ///< GYOTO_QUANTITY_BINSPECTRUM : BinSpectrum /** * Spectra elements are separated by offset doubles in memory. In * other words, the ith spectral element is spectrum[i*offset]. */ ptrdiff_t offset; ///< How to jump from one spectral element to the next /** * Coordinates of the object and photon at impact */ double * impactcoords; ///< GYOTO_QUANTITY_IMPACTCOORDS: ImpactCoords /** * \brief GYOTO_QUANTITY_USER1 : User1 * Astrobj-specific quantity */ double *user1; /** * \brief GYOTO_QUANTITY_USER2 : User2 * Astrobj-specific quantity */ double *user2; /** * \brief GYOTO_QUANTITY_USER3 : User3 * Astrobj-specific quantity */ double *user3; /** * \brief GYOTO_QUANTITY_USER4 : User4 * Astrobj-specific quantity */ double *user4; /** * \brief GYOTO_QUANTITY_USER5 : User5 * Astrobj-specific quantity */ double *user5; # ifdef HAVE_UDUNITS /** * \brief Converter between SI (J.m -2.s-1.sr-1.Hz-1) and requested Intensity unit */ Gyoto::SmartPointer intensity_converter_ ; /** * \brief Converter between SI (J.m -2.s-1.sr-1.Hz-1) and requested Spectrum unit */ Gyoto::SmartPointer spectrum_converter_ ; /** * \brief Converter between SI (J.m -2.s-1.sr-1) and requested BinSpectrum unit */ Gyoto::SmartPointer binspectrum_converter_ ; # endif /// True if buffers are allocated for entire field (npix*npix) bool alloc; public: Properties(); ///< Default constructor (everything is set to NULL); Properties (double*, double*); ///<< Set intensity and time pointers. /** * \brief Initialize observable quantities * * The pointed-to values are initialized as follows (if the * corresponding pointer is not NULL): * * - intensity, firt_dmin_found, redshift, userN: 0 * - time, distance, first_dmin: DBL_MAX * - for spectrum and binspectrum, nbnuobs values separated by offset in memory are initialized to 0 * - for impactcoords, 16 contiguous values are initialized to DBL_MAX */ void init(size_t nbnuobs=0); /** * \brief Increment pointers * * All valid pointers are incremented by 1 (sizeof(double)), excepted * impactcoords which is incremented by 16. */ Properties& operator++(); /** * \brief Increment pointers by offset * * All valid pointers are incremented by offset (sizeof(double)), excepted * impactcoords which is incremented by 16*offset. */ Properties& operator+=(ptrdiff_t offset); operator Gyoto::Quantity_t () const; # ifdef HAVE_UDUNITS void intensityConverter(Gyoto::SmartPointer); ///< Set Properties::intentity_converter_ void intensityConverter(std::string); ///< Set Properties::intentity_converter_ void spectrumConverter(Gyoto::SmartPointer); ///< Set Properties::spectrum_converter_ void spectrumConverter(std::string); ///< Set Properties::spectrum_converter_ void binSpectrumConverter(Gyoto::SmartPointer); ///< Set Properties::binspectrum_converter_ void binSpectrumConverter(std::string); ///< Set Properties::binspectrum_converter_ # endif }; #endif Gyoto-1.2.0/include/GyotoBlackBodySpectrum.h000066400000000000000000000040401302352257300210060ustar00rootroot00000000000000/** * \file GyotoBlackBodySpectrum.h * \brief I_nu(nu, T) = cst_*2*h*nu^3/c^2/(exp(h*nu/k*T)-1.); * * h = 6.62606896e-34 J.s; J.s = kg.m^2/s * * k = 1.3806504e-23 J.K-1; h/k : s*K = K/Hz. * */ /* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoBlackBodySpectrum_H_ #define __GyotoBlackBodySpectrum_H_ #include "GyotoSpectrum.h" namespace Gyoto { namespace Spectrum { class BlackBody; } } /** * \class Gyoto::Spectrum::BlackBody * \brief Black Body * * Light emitted by e.g. a Star. * * Example XML entity: * \code * * 6000 * 1. * * \endcode * */ class Gyoto::Spectrum::BlackBody : public Gyoto::Spectrum::Generic { friend class Gyoto::SmartPointer; protected: double T_; ///< Temperature (K) double cst_; ///< Scaling constant double Tm1_; ///< 1./T_; public: GYOTO_OBJECT; BlackBody(); /** * \brief Constructor setting T_ and cst_ */ BlackBody(double T, double scaling=1.); virtual BlackBody * clone() const; ///< Cloner double temperature() const; ///< Get constant void temperature(double); ///< Set constant double scaling() const; ///< Get exponent void scaling(double); ///< Set exponent using Gyoto::Spectrum::Generic::operator(); virtual double operator()(double nu) const; }; #endif Gyoto-1.2.0/include/GyotoChernSimons.h000066400000000000000000000032021302352257300176600ustar00rootroot00000000000000/** * \file GyotoChernSimons.h * \brief Chern-Simons 1st order perturbation to KerrBL metric * */ /* Copyright 2013 Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoChernSimons_h #define __GyotoChernSimons_h #include namespace Gyoto { namespace Metric { class ChernSimons; }; }; class Gyoto::Metric::ChernSimons : public Gyoto::Metric::KerrBL { friend class Gyoto::SmartPointer; protected: double dzetaCS_; ///< Chern-Simons coupling constant public: GYOTO_OBJECT; ChernSimons(); ChernSimons(const ChernSimons &o); virtual ~ChernSimons(); virtual ChernSimons * clone() const ; void dzetaCS(double d); double dzetaCS() const; double gmunu(const double * const x, int mu, int nu) const ; double gmunu_up(const double * const x, int mu, int nu) const ; int diff(const double y[8], const double cst[5], double res[8]) const ; void circularVelocity(double const pos[4], double vel [4], double dir=1.) const ; }; #endif Gyoto-1.2.0/include/GyotoComplexAstrobj.h000066400000000000000000000124101302352257300203650ustar00rootroot00000000000000/** * \file GyotoComplexAstrobj.h * \brief Combine astronomical objects * * An astrobj made of several astrobjs */ /* Copyright 2011, 2013-2014, 2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoComplexAstrobj_H_ #define __GyotoComplexAstrobj_H_ #include namespace Gyoto{ namespace Astrobj { class Complex; } } /** * \class Gyoto::Astrobj::Complex * \brief Complex astronomical object * * A Gyoto::Astrobj::Generic whic contain several * Gyoto::Astrobj::Generic instances. It is essentially a * SmartPointer array, which some methods * around. Indeed, the operator[](size_t i) method is implemented to * retrieve the i-th element. * * In an XML description, the <Astrobj> section must be unique, * its kind is "Complex". Each sub-astrobj then appears as a * <SubAstrobj> subsection: * \code * * * * 2. * 0. 0. 0.037037 * 600. 9. 1.5707999999999999741 0 * * 0 * 0.001 * * * 0 * 0.01 * * * * * \endcode * */ class Gyoto::Astrobj::Complex : public Gyoto::Astrobj::Generic { friend class Gyoto::SmartPointer; // Data : // ----- protected: /** * \brief Number of objects */ size_t cardinal_; /** * \brief Array of Astrobj::Generic */ Gyoto::SmartPointer * elements_; /** * Currently not settable, always equal to GYOTO_DEFAULT_DELTA */ double step_max_; ///< Maximum δ step inside the Astrobj public: GYOTO_OBJECT_THREAD_SAFETY; Complex(); ///< Default constructor. Complex(const Complex& ) ; ///< Copy constructor. virtual Complex* clone() const; ///< "Virtual" copy constructor virtual double deltaMax(double coord[8]); /** * Frees every SmartPointer before freed the array itself. */ virtual ~Complex() ; ///< Destructor // Mutators // -------- public: /** * If the Astrobj::Complex itself does not have a metric already * assigned, it takes it from the new element. Else, it sets the * metric in the new element to its own. This ensures that all * elements use the same metric (this heuristic is not entirely * fool-proof, it's safer to set the metric directly in the * Astrobj::Complex). */ void append(Gyoto::SmartPointer element); ///< Add element at the end of the array. void remove(size_t i); ///< Remove i-th element from the array. size_t getCardinal() const; ///< Get the number of elements in the array. using Generic::metric; void metric(SmartPointer gg); ///< Set metric in each element. public: #ifdef GYOTO_USE_XERCES virtual void fillElement(FactoryMessenger *fmp) const ; virtual void setParameters(FactoryMessenger *fmp); #endif // Outputs // ------- public: /** * Astrobj::Complex::Impact(Gyoto::Photon* ph, size_t index, * Astrobj::Properties *data) calls the specific implementation of * Astrobj::Generic::Impact() for each of its * elements twice: the first time, data is set to NULL so that * Astrobj::Complex::Impact() only knows whether each object is hit * by the Photon. If no object is hit, return. If a single object is * hit, call Impact() again only for this object, passing data this * time. If several objects are hit, the Photon's trajectory is * refined so that the step is at most step_max_ and the Impact() * methods for each of the hit objects are called again for each * step, passing data. It is therefore important that the * transmission of the Photon is not touched by Impact() when * data==NULL. * */ virtual int Impact(Gyoto::Photon* ph, size_t index, Astrobj::Properties *data=NULL) ; ///< Call Impact() for each of the elements. /** * This should work as expected: * \code * SmartPointer cplx; * SmartPointer objA; * SmartPointer objB; * cplx -> append(objA); * cplx[0] = objB; * \endcode */ Gyoto::SmartPointer& operator[](size_t i) ; ///< Retrieve i-th element. Gyoto::SmartPointer const&operator[](size_t i) const; ///< Retrieve a const version of the i-th element. }; #endif Gyoto-1.2.0/include/GyotoComplexSpectrometer.h000066400000000000000000000120151302352257300214360ustar00rootroot00000000000000/** * \file GyotoComplexSpectrometer.h * \brief Combine spectrometer objects * * A spectrometer made of several spectrometers */ /* Copyright 2013-2014, 2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoComplexSpectrometer_H_ #define __GyotoComplexSpectrometer_H_ #include namespace Gyoto{ namespace Spectrometer { class Complex; } } /** * \class Gyoto::Spectrometer::Complex * \brief Complex spectrometer object * * A Gyoto::Spectrometer::Generic whic contain several * Gyoto::Spectrometer::Generic instances. It is essentially a * SmartPointer array, which some methods * arround. Indeed, the operator[](size_t i) method is implemented to * retrieve the i-th element. * * In an XML description, the <Spectrometer> section is unique, * its kind is "Complex". Each sub-spectrometer then appears as a * <SubSpectrometer> subsection. For instance, to compute 10 * channels ovr the K infrared band plus 10 channels in the high * energy domain: * \code * * * 2.0 2.4 * * * 14 22 * * * \endcode * */ class Gyoto::Spectrometer::Complex : public Gyoto::Spectrometer::Generic, public Gyoto::Hook::Listener { friend class Gyoto::SmartPointer; // Data : // ----- protected: /** * \brief Number of subspectrometers * * Size of elements_. */ size_t cardinal_; /** * \brief Actual array of SmartPointer objects */ Gyoto::SmartPointer * elements_; public: GYOTO_OBJECT_THREAD_SAFETY; Complex(); ///< Default constructor. Complex(const Complex& ) ; ///< Copy constructor. /** * \brief Clone an instance * * Use this to get a deep copy of an instance; * \code * SmartPointer myclone = orig->clone(); * \endcode * * Most implementations will use the copy constructor: * \code * Generic* Uniform::clone() const { return new Uniform(*this); } * \endcode */ virtual Complex* clone() const; /** * Frees every SmartPointer before freed the * array itself. */ virtual ~Complex() ; ///< Destructor // Mutators // -------- public: /** * If the Spectrometer::Complex itself does not have a metric already * assigned, it takes it from the new element. Else, it sets the * metric in the new element to its own. This ensures that all * elements use the same metric (this heuristic is not entirely * fool-proof, it's safer to set the metric directly in the * Spectrometer::Complex). */ void append(Gyoto::SmartPointer element); ///< Add element at the end of the array. void remove(size_t i); ///< Remove i-th element from the array. size_t getCardinal() const; ///< Get the number of elements in the array. virtual void tell(Gyoto::Hook::Teller *msg); public: #ifdef GYOTO_USE_XERCES /** * \brief Fill in the XML entity * * Loops on elements_[i]->fillElement(); */ virtual void fillElement(FactoryMessenger *fmp) const ; /** * \brief Main loop in the (templated) subcontractor * * In the case of Spectrometer::Complex, the setParameter() API is * not sufficient: setParameters() needs acces to the * FactoryMessenger to instantiate children for the * SubSpectrometers. */ virtual void setParameters(FactoryMessenger *fmp); #endif // Outputs // ------- public: /** * This should work as expected: \code SmartPointer cplx; SmartPointer objA; SmartPointer objB; cplx -> append(objA); cplx[0] = objB; \endcode */ Gyoto::SmartPointer & operator[](size_t i) ; ///< Retrieve i-th element. Gyoto::SmartPointer const & operator[](size_t i) const; ///< Retrieve a const version of the i-th element. /** * \brief "Complex" * * Use this static member attribute to check whether a Spectrometer * object spectro is of kind Complex: * \code * if (spectro->kind() == Complex::Kind) ... ; * \endcode * */ static kind_t const Kind; protected: }; #endif Gyoto-1.2.0/include/GyotoConfig.h.in000066400000000000000000000204321302352257300172460ustar00rootroot00000000000000/** * \file GyotoConfig.h * \brief Compile-time configuration * * Codes based on Gyoto and Gyoto plug-ins must have access to the * flags used when compiling Gyoto. This files is generated by Gyoto's * configure script and holds influential variables such as * HAVE_SINCOS. * * The values determined by configure when this documentation was * built are documented, replaced by "(undefined)" if the macro was * undefined. */ /* Copyright 2012-2015 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoConfig_H_ #define __GyotoConfig_H_ /** \def GYOTO_DEBUG_ENABLED \brief Whether debugging information gathering code was enabled. */ #undef GYOTO_DEBUG_ENABLED #ifdef DOXYGEN_RUN # ifndef GYOTO_DEBUG_ENABLED # define GYOTO_DEBUG_ENABLED (undefined) # endif #endif /** \def GYOTO_PLUGIN_SFX \brief Suffix for Gyoto plug-ins. */ #undef GYOTO_PLUGIN_SFX #ifdef DOXYGEN_RUN # ifndef GYOTO_PLUGIN_SFX # define GYOTO_PLUGIN_SFX (undefined) # endif #endif /** \def GYOTO_PREFIX \brief Gyoto prefix. */ #undef GYOTO_PREFIX #ifdef DOXYGEN_RUN # ifndef GYOTO_PREFIX # define GYOTO_PREFIX (undefined) # endif #endif /** \def GYOTO_PKGLIBDIR \brief Gyoto pkglibdir, usually GYOTO_PREFIX/lib/gyoto */ #undef GYOTO_PKGLIBDIR #ifdef DOXYGEN_RUN # ifndef GYOTO_PKGLIBDIR # define GYOTO_PKGLIBDIR (undefined) # endif #endif /** \def GYOTO_SIZE__T_IS_UNSIGNED_LONG \brief Define to 1 if size_t and unsigned long are the same */ #undef GYOTO_SIZE__T_IS_UNSIGNED_LONG #ifdef DOXYGEN_RUN # ifndef GYOTO_SIZE__T_IS_UNSIGNED_LONG # define GYOTO_SIZE__T_IS_UNSIGNED_LONG (undefined) # endif #endif /** \def GYOTO_SOVERS \brief Gyoto ABI version. Updated in stable releases, not during dev. cycle. */ #undef GYOTO_SOVERS #ifdef DOXYGEN_RUN # ifndef GYOTO_SOVERS # define GYOTO_SOVERS (undefined) # endif #endif /** \def GYOTO_USE_CFITSIO * \brief Whether cfitsio support is compiled-in. * * Necessary for FITS file format i/o, used in the Gyoto tool and * optional in Gtyoto::PatternDisk. */ #undef GYOTO_USE_CFITSIO #ifdef DOXYGEN_RUN # ifndef GYOTO_USE_CFITSIO # define GYOTO_USE_CFITSIO (undefined) # endif #endif /** \def GYOTO_USE_XERCES \brief Whether Xerces support (XML i/o) is compiled-in. Used only in the Gyoto::Factory but Gyoto build is not often tested without it. */ #undef GYOTO_USE_XERCES #ifdef DOXYGEN_RUN # ifndef GYOTO_USE_XERCES # define GYOTO_USE_XERCES (undefined) # endif #endif /** \def HAVE_DLFCN_H \brief Whether header file was found. */ #undef HAVE_DLFCN_H #ifdef DOXYGEN_RUN # ifndef # define (undefined) # endif #endif /** \def HAVE_INTTYPES_H \brief Whether header file was found. */ #undef HAVE_INTTYPES_H #ifdef DOXYGEN_RUN # ifndef HAVE_INTTYPES_H # define HAVE_INTTYPES_H (undefined) # endif #endif /** \def HAVE_LIBDL \brief Whether the `dl' library (-ldl) was found. Plug-in support. */ #undef HAVE_LIBDL #ifdef DOXYGEN_RUN # ifndef HAVE_LIBDL # define HAVE_LIBDL (undefined) # endif #endif /** \def HAVE_MEMORY_H \brief Whether the header file was found. */ #undef HAVE_MEMORY_H #ifdef DOXYGEN_RUN # ifndef HAVE_MEMORY_H # define HAVE_MEMORY_H (undefined) # endif #endif /** \def HAVE_MPI * \brief Whether MPI support is compiled in. * * Message-passing interface, used in multi-process ray-tracing */ #undef HAVE_MPI #ifdef DOXYGEN_RUN # ifndef HAVE_MPI # define HAVE_MPI (Undefined) # endif #endif /** \def HAVE_PTHREAD * \brief Whether POSIX threads support is compiled-in. * * Multi-threading support, see Gyoto::Scenery::nthreads_. */ #undef HAVE_PTHREAD #ifdef DOXYGEN_RUN # ifndef HAVE_PTHREAD # define HAVE_PTHREAD (undefined) # endif #endif /** \def HAVE_PTHREAD_PRIO_INHERIT \brief Have PTHREAD_PRIO_INHERIT. */ #undef HAVE_PTHREAD_PRIO_INHERIT #ifdef DOXYGEN_RUN # ifndef HAVE_PTHREAD_PRIO_INHERIT # define HAVE_PTHREAD_PRIO_INHERIT (undefined) # endif #endif /** \def HAVE_SINCOS * \brief Whether the `sincos' function is available. * * Else Gyoto provides it as a macro in GyotoDefs.h. */ #undef HAVE_SINCOS #ifdef DOXYGEN_RUN # ifndef HAVE_SINCOS # define HAVE_SINCOS (undefined) # endif #endif /** \def HAVE_STDINT_H \brief Whether the header file was found. */ #undef HAVE_STDINT_H #ifdef DOXYGEN_RUN # ifndef HAVE_STDINT_H # define HAVE_STDINT_H (undefined) # endif #endif /** \def HAVE_STDLIB_H \brief Whether the header file was found. */ #undef HAVE_STDLIB_H #ifdef DOXYGEN_RUN # ifndef HAVE_STDLIB_H # define HAVE_STDLIB_H (undefined) # endif #endif /** \def HAVE_STRINGS_H \brief Whether the header file was found. */ #undef HAVE_STRINGS_H #ifdef DOXYGEN_RUN # ifndef HAVE_STRINGS_H # define HAVE_STRINGS_H (undefined) # endif #endif /** \def HAVE_STRING_H \brief Whether the header file was found. */ #undef HAVE_STRING_H #ifdef DOXYGEN_RUN # ifndef HAVE_STRING_H # define HAVE_STRING_H (undefined) # endif #endif /** \def HAVE_SYS_STAT_H \brief Whether the header file was found. */ #undef HAVE_SYS_STAT_H #ifdef DOXYGEN_RUN # ifndef HAVE_SYS_STAT_H # define HAVE_SYS_STAT_H (undefined) # endif #endif /** \def HAVE_SYS_TYPES_H \brief Whether the header file was found. */ #undef HAVE_SYS_TYPES_H #ifdef DOXYGEN_RUN # ifndef HAVE_SYS_TYPES_H # define HAVE_SYS_TYPES_H (undefined) # endif #endif /** \def HAVE_UDUNITS * \brief Whether libudunits2 support is compiled in. * * Foundation for the Gyoto::Units framework. Gyoto ought to build * and work without it, but with restricted unit conversion * capabilities. */ #undef HAVE_UDUNITS #ifdef DOXYGEN_RUN # ifndef HAVE_UDUNITS # define HAVE_UDUNITS (undefined) # endif #endif /** \def HAVE_BOOST_MULTIPRECISION_CPP_DEC_FLOAT_HPP * \brief Whether support for arbitrary precision arithmetics is present * */ #undef HAVE_BOOST_MULTIPRECISION_CPP_DEC_FLOAT_HPP #ifdef DOXYGEN_RUN # ifndef HAVE_BOOST_MULTIPRECISION_CPP_DEC_FLOAT_HPP # define HAVE_BOOST_MULTIPRECISION_CPP_DEC_FLOAT_HPP (undefined) # endif #endif /** \def HAVE_BOOST_ARRAY_HPP * \brief Whether boost::array is available * */ #undef HAVE_BOOST_ARRAY_HPP #ifdef DOXYGEN_RUN # ifndef HAVE_BOOST_ARRAY_HPP # define HAVE_BOOST_ARRAY_HPP (undefined) # endif #endif /** \def GYOTO_HAVE_BOOST_INTEGRATORS * \brief Whether Boost.odeint is present, as well as C++11 * * Advanced integrators from boost/numeric/odeint/. */ #undef GYOTO_HAVE_BOOST_INTEGRATORS #ifdef DOXYGEN_RUN # ifndef GYOTO_HAVE_BOOST_INTEGRATORS # define GYOTO_HAVE_BOOST_INTEGRATORS (undefined) # endif #endif /** \def HAVE_UNISTD_H \brief Whether the header file was found. */ #undef HAVE_UNISTD_H #ifdef DOXYGEN_RUN # ifndef HAVE_UNISTD_H # define HAVE_UNISTD_H (undefined) # endif #endif /** \def HAVE_FENV_H \brief Define to 1 to use fenv.h. */ #undef HAVE_FENV_H #ifdef DOXYGEN_RUN # ifndef HAVE_FENV_H # define HAVE_FENV_H (undefined) # endif #endif /** \def HAVE__BOOL \brief Whether the system has the type `_Bool'. */ #undef HAVE__BOOL #ifdef DOXYGEN_RUN # ifndef HAVE__BOOL # define HAVE__BOOL (undefined) # endif #endif /** \def PTHREAD_CREATE_JOINABLE \brief Define to necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE #ifdef DOXYGEN_RUN # ifndef PTHREAD_CREATE_JOINABLE # define PTHREAD_CREATE_JOINABLE (undefined) # endif #endif /** \def STDC_HEADERS \brief Whether the ANSI C header files were found. */ #undef STDC_HEADERS #ifdef DOXYGEN_RUN # ifndef STDC_HEADERS # define STDC_HEADERS (undefined) # endif #endif /** \def size_t \brief If not defined in . */ #undef size_t #ifdef DOXYGEN_RUN # ifndef size_t # define size_t (undefined) # endif #endif #endif Gyoto-1.2.0/include/GyotoConverters.h000066400000000000000000000407541302352257300175770ustar00rootroot00000000000000/** * \file GyotoConverters.h * \brief GYOTO converters * * As a (recommended) option, Gyoto can use the libudunits2 library * by UCAR/Unidata * (http://www.unidata.ucar.edu/software/udunits/udunits-2/udunits2.html) * to perform conversions to and from various units. Since udunits * parses units, the following are equivalent for instance: * "mJy.sr-1", "mJy/sr", "1e-3Jy/sr". Gyoto considers every string as * UTF-8: either use UTF-8 or stay with ASCII. This means "µ" can be * used for "micro" and powers can be noted as superscripts: m³, * pix². * * In addition to the stock units known by udunits2, Gyoto registers * the following (which may be used in any context): Jansky (symbol * Jy), symbol "pc" for parsec, "sunradius", "sunmass", symbol "as" * for "arcsec". * * Other units are context-sensitive: "geometrical" allows converting * between geometrical units and other legnth units, but only when a * Metric is defined, and may not be used (yet) in compound * units. Likewise, "geometrical_time" can be used as duration unit * whenever a Metric is defined, but not in a compound unit. * * When a Screen is defined, "pix" can be used as an angle unit (you * need to call Screen::mapPixUnit() and Screen::unmapScreenUnit(), * which is done automatically in certain contexts). * * Units can often be specified using the "unit" XML attribute: * \code * * * 4e6 * *
* * * 8 * * * 150 * *
* \endcode * * Units for output quantities are specified after the name of the * quantity, in squared brackets, e.g.: * \code * * Spectrum[erg.s-1.cm-2.sr-1.Hz-1] * * \endcode * or * \code * * Spectrum[mJy/pix²] * * \endcode */ /* Copyright 2011-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoConverters_H_ #define __GyotoConverters_H_ #include #include #ifdef HAVE_UDUNITS #include #endif #include #include namespace Gyoto { namespace Metric { class Generic; } namespace Units { /** * \namespace Gyoto::Units * \brief Units-related classes and functions */ #ifdef HAVE_UDUNITS /** * \class Gyoto::Units::Unit * \brief Wrapper around ut_unit from udunits * * Gyoto::Units::Unit objects usually cast seamlessly to and from * udunits2 ut_unit* and std::string. */ class Unit; /** * \class Gyoto::Units::Converter * \brief Wrapper around ut_converter from udunits * * A Gyoto::Units::Converter object is a functor and can be used * to convert efficiently between the two units specified at * instantiation time: * * \code * Gyoto::Units::Unit from_unit ("erg.s-1.cm-2.sr-1.Hz-1"), * to_unit ("mJy/µas²"); * double data_in[1000], data_out[1000]; * Converter conv(from_unit, to_unit); * for (size_t i=0; i<1000; ++i) data_out[i] = conv(data_in[i]); * \endcode * * Since std::string cast automatically to Gyoto::Units::Unit * object, this is equivalent: * * \code * Converter conv("erg.s-1.cm-2.sr-1.Hz-1", "mJy/µas²"); * for (size_t i=0; i<1000; ++i) data_out[i] = conv(data_in[i]); * \endcode */ class Converter; /** * \brief Retrieve the unit system used in all of Gyoto */ ut_system * getSystem(); #endif /** * \brief Load and initialize all (non-context-sensitive) units * * If udunits is used (preprocessor macro HAVE_UDUNITS), Init() * initializes the ut_system used throughout Gyoto and maps a few * additional units to the unit system. */ void Init(); /** * \brief Convert from arbitrary length unit to meters * * Convert value from unit represented by "unit" to meters. * * If gg is provided (and not NULL), use it to interpret the * string "geometrical" as representing * gg->Gyoto::Metric::Generic::unitLength(). * * ToMeters() will also convert time, frequency and energy units * to meters (as in frequency -> wavelength). * * \param value * (double) the value to convert, expressed according to "unit" * \param unit (std::string) the "unit" from which to convert, * e.g. "km", "sunradius" or "geometrical". More units are * supported if Gyoto was compiled with udunits support. * \param gg (const Gyoto::SmartPointer &, * NULL if not specified) optional metric to interpret * "geometrical". * * \return value, expressed in meters. */ double ToMeters(double value, const std::string &unit, const Gyoto::SmartPointer &gg=NULL); /** * \brief Convert to arbitrary length unit from meters * * Convert value to unit represented by "unit" from meters. * * If gg is provided (and not NULL), use it to interpret the * string "geometrical" as representing * gg->Gyoto::Metric::Generic::unitLength(). * * ToMeters() will also convert to time, frequency and energy * units (as in wavelength -> frequency). * * \param value * (double) the value to convert, expressed in meters. * \param unit (std::string) the "unit" to which to convert, * e.g. "km", "sunradius" or "geometrical". More units are * supported if Gyoto was compiled with udunits support. * \param gg (const Gyoto::SmartPointer &, * NULL if not specified) optional metric to interpret * "geometrical". * * \return value, expressed in "unit". */ double FromMeters(double value, const std::string &unit, const Gyoto::SmartPointer &gg=NULL); /** * \brief Convert from arbitrary time unit to seconds * * Convert value from unit represented by "unit" to seconds. * * If gg is provided (and not NULL), use it to interpret the * string "geometrical_time" as representing * gg->Gyoto::Metric::Generic::unitLength()/GYOTO_C. * * \param value * (double) the value to convert, expressed according to "unit" * \param unit (std::string) the "unit" from which to convert, * e.g. "s", "yr" or "geometrical_time". More units are * supported if Gyoto was compiled with udunits support. * \param gg (const Gyoto::SmartPointer &, * NULL if not specified) optional metric to interpret * "geometrical". * * \return value, expressed in seconds. */ double ToSeconds(double value, const std::string &unit, const Gyoto::SmartPointer &gg=NULL); /** * \brief Convert to arbitrary time unit from seconds * * Convert value to unit represented by "unit" from seconds. * * If gg is provided (and not NULL), use it to interpret the * string "geometrical_time" as representing * gg->Gyoto::Metric::Generic::unitLength()/GYOTO_C. * * \param value * (double) the value to convert, expressed in seconds. * \param unit (std::string) the "unit" to which to convert, * e.g. "s", "yr" or "geometrical_time". More units are * supported if Gyoto was compiled with udunits support. * \param gg (const Gyoto::SmartPointer &, * NULL if not specified) optional metric to interpret * "geometrical". * * \return value, expressed in "unit". */ double FromSeconds(double value, const std::string &unit, const Gyoto::SmartPointer &gg=NULL); /** * \brief Convert from arbitrary mass unit to kilograms * * Convert value from unit represented by "unit" to kilograms. * * \param value * (double) the value to convert, expressed according to "unit" * \param unit (std::string) the "unit" from which to convert, * e.g. "g", "kg" or "sunmass". More units are * supported if Gyoto was compiled with udunits support. * * \return value, expressed in kilograms. */ double ToKilograms(double value, const std::string & unit); /** * \brief Convert to arbitrary mass unit from kilograms * * Convert value from unit represented by "unit" from kilograms. * * \param value * (double) the value to convert, expressed inkilograms. * \param unit (std::string) the "unit" to which to convert, * e.g. "g", "kg" or "sunmass". More units are * supported if Gyoto was compiled with udunits support. * * \return value, expressed in "unit". */ double FromKilograms(double value, const std::string & unit); /** * \brief Convert from arbitrary length unit to geometrical units * * Convert value from unit represented by "unit" to geometrical units. * * \param value * (double) the value to convert, expressed according to "unit". * \param unit (std::string) the "unit" from which to convert, * e.g. "km", "sunradius" or "geometrical". More units are * supported if Gyoto was compiled with udunits support. * \param gg (const Gyoto::SmartPointer &) * metric to interpret "geometrical". * * \return value, expressed in geometrical units. */ double ToGeometrical(double value, const std::string & unit, const Gyoto::SmartPointer & gg); /** * \brief Convert to arbitrary length unit from geometrical units * * Convert value to unit represented by "unit" from geometrical units. * * \param value * (double) the value to convert, expressed in geometrical units. * \param unit (std::string) the "unit" to which to convert, * e.g. "km", "sunradius" or "geometrical". More units are * supported if Gyoto was compiled with udunits support. * \param gg (const Gyoto::SmartPointer &) * metric to interpret "geometrical". * * \return value, expressed in "unit". */ double FromGeometrical(double value, const std::string & unit, const Gyoto::SmartPointer & gg); /** * \brief Convert from arbitrary time unit to geometrical units * * \param value * (double) the value to convert, expressed according to "unit". * \param unit (std::string) the "unit" from which to convert, * e.g. "s", "kyr" or "geometrical_time". More units are * supported if Gyoto was compiled with udunits support. * \param gg (const Gyoto::SmartPointer &) * metric to interpret "geometrical_time". * * \return value, expressed in geometrical (time) units. */ double ToGeometricalTime(double value, const std::string & unit, const Gyoto::SmartPointer & gg); /** * \brief Convert to arbitrary time unit from geometrical units * * \param value * (double) the value to convert, expressed in geometrical units. * \param unit (std::string) the "unit" to which to convert, * e.g. "yr", "s" or "geometrical_time". More units are * supported if Gyoto was compiled with udunits support. * \param gg (const Gyoto::SmartPointer &) * metric to interpret "geometrical_time". * * \return value, expressed in "unit". */ double FromGeometricalTime(double value, const std::string & unit, const Gyoto::SmartPointer &gg); /** * \brief Convert from arbitrary frequency unit to Herz * * ToHerz will also convert from length and energy units (such as * "eV"). * * \param value * (double) the value to convert, expressed according to "unit". * \param unit (std::string) the "unit" from which to convert, * e.g. "MHz", "keV" * * \return value, expressed in "Hz". */ double ToHerz(double value, const std::string &unit); /** * \brief Convert to arbitrary frequency unit from Herz * * FromHerz will also convert to length and energy units (such as * "eV"). * * \param value * (double) the value to convert, expressed according in "Hz". * \param unit (std::string) the "unit" from which to convert, * e.g. "MHz", "keV" * * \return value, expressed in "units". */ double FromHerz(double value, const std::string &unit); # ifdef HAVE_UDUNITS /** * \brief Is it possible to convert between unit1 and unit2? * * e.g. areConvertible("m", "kg") == 0; areConvertible("m", "km")==1. * * Warning: angle units are dimensionless, therefore e.g. * areConvertible("Jy", "Jy/microacsec2")==1. Numerically, "Jy" is * the same as "Jy/sr2". * * \param unit1 (Gyoto::Units::Unit) first unit * \param unit2 (Gyoto::Units::Unit) second unit * * \return bool, True if it is possible to convert between the two * units, 0 otherwise. */ bool areConvertible(const Unit &unit1, const Unit &unit2); # endif } } #ifdef HAVE_UDUNITS class Gyoto::Units::Unit : public Gyoto::SmartPointee { friend class Gyoto::SmartPointer; friend class Gyoto::Units::Converter; private: ut_unit * unit_; ///< the underlying ut_unit (from udunits) std::string kind_; ///< the string used to instantiate this unit public: /** * \brief Build Unit described by string * * Throws a Gyoto::Error if anything goes wrong. * * \param unit string description of the unit, e.g. "mJy/sr2" or "sunmass". */ Unit(const std::string &unit); /** * \brief Build Unit described by C string * * Throws a Gyoto::Error if anything goes wrong. * * \param unit char const * const description of the unit, * e.g. "mJy/sr2" or "sunmass". */ Unit(char const * const unit); /** * \brief Destructor * * Frees unit_. */ ~Unit(); /** * \brief Convert to Unit * * \param val double to convert * \param from_unit Unit from which to convert * * \return value converted to unit_. */ double To (double val, const Unit &from_unit); /** * \brief Convert from Unit * * \param val double to convert * \param to_unit Unit to which to convert * * \return value converted to "to_unit". */ double From (double val, const Unit &to_unit); /** * \brief Cast to string * * \return kind_ */ operator std::string() const ; /** * \brief Cast to ut_unit* * * \return unit_ */ operator ut_unit*() const ; }; class Gyoto::Units::Converter : public Gyoto::SmartPointee { friend class Gyoto::SmartPointer; private: cv_converter * converter_; ///< Underlying ut_converter object from udunits public: Converter(); ///< Construct trivial Converter (Converter()(x)==x) Converter(const Gyoto::Units::Unit& from, const Gyoto::Units::Unit& to); ///< Construct Converter from two Unit ~Converter(); ///< Destruct converter, freeing converter_ void reset(); ///< Reset to trivial Converter (Converter()(x)==x) void reset(const Gyoto::Units::Unit& from, const Gyoto::Units::Unit& to); ///< Reset to converter from "from" to "to" /** * \brief Actually convert data * * The entire Gyoto::Units::Converter class is there just for this * operator, which converts value from unit "from" to unit "to" * where "from" and "to" are the two Units passed to the constructor * Gyoto::Units::Converter::Converter(const Gyoto::Units::Unit& * from, const Gyoto::Units::Unit& to). * * \param value double expressed in Unit from * * \return converted value expressed in Unit to */ double operator()(double value) const ; }; #endif #endif Gyoto-1.2.0/include/GyotoDeformedTorus.h000066400000000000000000000036411302352257300202210ustar00rootroot00000000000000/** * \file GyotoDeformedTorus.h * \brief Slender torus subject to simple time-periodic deformations * * The target of ray-traced Gyoto::Photon */ /* * Copyright (c) 2013 Frederic Vincent * * */ #ifndef __DeformedTorus_h #define __DeformedTorus_h #include #include #include namespace Gyoto { namespace Astrobj { class DeformedTorus; }; class FactoryMessenger; namespace Spectrum { class Generic; } }; class Gyoto::Astrobj::DeformedTorus : public Gyoto::Astrobj::Standard { friend class Gyoto::SmartPointer; private: SmartPointer gg_; SmartPointer spectrum_; double c_; unsigned long mode_; double param_beta_; double param_beta_st_; double param_eta_; enum perturb_t {RadialTranslation=1, VerticalTranslation=2, Rotation=3, Expansion=4, RadialShear=5, VerticalShear=6, PureShear=7}; perturb_t perturb_kind_; public: GYOTO_OBJECT; DeformedTorus(); DeformedTorus(const DeformedTorus &o); virtual ~DeformedTorus(); virtual DeformedTorus * clone() const ; // Standard accessors GYOTO_OBJECT_ACCESSORS(SmartPointer, spectrum); GYOTO_OBJECT_ACCESSORS(double, largeRadius); GYOTO_OBJECT_ACCESSORS(double, beta); GYOTO_OBJECT_ACCESSORS(double, betaSt); GYOTO_OBJECT_ACCESSORS(double, eta); GYOTO_OBJECT_ACCESSORS(unsigned long, mode); GYOTO_OBJECT_ACCESSORS_STRING(perturbKind); using Generic::metric; virtual void metric(Gyoto::SmartPointer); virtual double operator()(double const coord[4]) ; ///< Called by Astrobj::Generic::Impact() virtual void getVelocity(double const pos[4], double vel[4]) ; /*virtual int Impact(Gyoto::Photon* ph, size_t index, Astrobj::Properties *data=NULL);*/ double emission(double nuem,double,double*,double*) const; #endif }; Gyoto-1.2.0/include/GyotoDefs.h000066400000000000000000000465761302352257300163360ustar00rootroot00000000000000/** * \file GyotoDefs.h * \brief Gyoto ubiquitous macros and typedefs */ /* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoDefs_H_ #define __GyotoDefs_H_ #include "GyotoConfig.h" #include /** * \brief Replacement for GNU extension sincos * * If #HAVE_SINCOS is undefined, Gyoto provides a trivial * implementation. * \param[in] t Angle in radian; * \param[out] s Adress where sin(t) should be stored; * \param[out] c Adress where cos(t) should be stored. */ #if !HAVE_SINCOS #define sincos(t, s, c) *s=sin(t); *c=cos(t) #else # ifdef DOXYGEN_RUN # define sincos(t, s, c) (undefined) # endif #endif /* Typedef for various Gyoto data types */ namespace Gyoto { //\{ /** * \name Observable quantities * * Individual quantities are represented as a variable of this * type. A combination of quantities is an ored list of Quantity_t, * e.g. * * \code * GYOTO_QUANTITY_INTENSITY | GYOTO_QUANTITY_EMISSIONTIME * \endcode * * To check wheter a given quantity is listed in a Quantity_t * variable quant: * \code * if (quant & GYOTOQUANTITY_EMISSION) ... * \endcode * * List of all possible Quantity_t individual values and the * corresponding string (see Gyoto::Scenery) with corresponding XML * name: */ /// Type for observabke quantities typedef unsigned int Quantity_t; /* Generic */ #define GYOTO_QUANTITY_NONE 0 /// Intensity: Iν at Scenery::freq_obs_. #define GYOTO_QUANTITY_INTENSITY 1 /// EmissionTime: Emission date. #define GYOTO_QUANTITY_EMISSIONTIME 2 /// MinDistance: Behaves like minimal distance between Photon and Astrobj. /** * Not always exactly a distance, though. */ #define GYOTO_QUANTITY_MIN_DISTANCE 4 /// FirstDmin: First Photon-Astrobj distance local minimum while integrating back in time. #define GYOTO_QUANTITY_FIRST_DMIN 8 /// Redshift: νobsem. #define GYOTO_QUANTITY_REDSHIFT 16 /// ImpactCoords: Astrobj and Photon 8-coordinates at emission. /** * A 16-element vector. See Gyoto::Quantity_t. */ #define GYOTO_QUANTITY_IMPACTCOORDS 32 /// Spectrum: Iν at each frequency in Scenery::screen_->getMidpoints(). #define GYOTO_QUANTITY_SPECTRUM 512 /// Spectrum: ∫ν1ν2Iν dν in each frequency channel in Scenery::screen_. #define GYOTO_QUANTITY_BINSPECTRUM 1024 /* Astrobj-specific */ /// User1: Gyoto::Astrobj specific Gyoto::Quantity_t #define GYOTO_QUANTITY_USER1 32768 /// User2: Gyoto::Astrobj specific Gyoto::Quantity_t #define GYOTO_QUANTITY_USER2 16384 /// User3: Gyoto::Astrobj specific Gyoto::Quantity_t #define GYOTO_QUANTITY_USER3 8192 /// User4: Gyoto::Astrobj specific Gyoto::Quantity_t #define GYOTO_QUANTITY_USER4 4096 /// User5: Gyoto::Astrobj specific Gyoto::Quantity_t #define GYOTO_QUANTITY_USER5 2048 //\} /** * \name Gyoto messages * \brief Controling which messages are shown to the user * * The user should be able to choose which messages are shown to * her. In Gyoto, this is determined by a user-settable verbosity * level (see Gyoto::verbose()) and a user-settable debug mode (see * Goyto::debug()). * * The following macros define various debug and verbosity level and * provide short-cuts to display formatted messages only at a given * verbosity level or in debug mode. */ //\{ /// Type for verbosity levels typedef unsigned int Verbosity_t; /// Default debug mode #define GYOTO_DEFAULT_DEBUG_MODE 0 /// Quiet Gyoto::Verbosity_t /** * Only very few messages may be output to stdout at this level. * * Use #GYOTO_QUIET to display messages at this level. */ #define GYOTO_QUIET_VERBOSITY 1 /// Severe warnings /** * Severe warning messages are output to stderr if * Gyoto::verbose()≥GYOTO_SEVERE_VERBOSITY. * * Use #GYOTO_SEVERE to display messages at this level. */ #define GYOTO_SEVERE_VERBOSITY 3 /// Warnings /** * Warning messages are output to stderr if * Gyoto::verbose()≥GYOTO_WARNING_VERBOSITY. * * Use #GYOTO_WARNING to display messages at this level. */ #define GYOTO_WARNING_VERBOSITY GYOTO_SEVERE_VERBOSITY /// Default verbosity level /** * Normal messages are output to stdout if * Gyoto::verbose()≥GYOTO_DEFAULT_VERBOSITY. * * Use #GYOTO_MSG to display messages at this level. */ #define GYOTO_DEFAULT_VERBOSITY 5 /// Informative messages /** * Informative messages are output to stderr if * Gyoto::verbose()≥GYOTO_INFO_VERBOSITY. * * Use #GYOTO_INFO to display messages at this level. */ #define GYOTO_INFO_VERBOSITY 10 /// Maximum verbosity level /** * In debug mode, all messages are displayed in addition to specific * debug information. * * To display debug messages, check #GYOTO_DEBUG_MODE or use * #GYOTO_DEBUG for instance. */ #define GYOTO_DEBUG_VERBOSITY 3000 /// Display a message to stdout even in quiet mode. /** * Only very few messages may be output to stdout at this * level. This should be reserved to messages shown at most once in * a run. * * \code * GYOTO_QUIET << "Important message displayed once" << std::endl; * \endcode */ #define GYOTO_QUIET if (Gyoto::verbose() >= GYOTO_QUIET_VERBOSITY) std::cout /// Display a severe level message to stderr. /** * \code * GYOTO_SEVERE << "Important warning" << std::endl; * \endcode */ #define GYOTO_SEVERE if(Gyoto::verbose()>=GYOTO_SEVERE_VERBOSITY) std::cerr<<"SEVERE: " /// Display a warning level message to stderr. /** * \code * GYOTO_WARNING << "Warning" << std::endl; * \endcode */ #define GYOTO_WARNING if(Gyoto::verbose()>=GYOTO_SEVERE_VERBOSITY) std::cerr<<"WARNING: " /// Display normal message to stdout. /** * The message will by default be shown to the user. To be reserved * to messages shown at most once per Gyoto::Screen row. * * \code * GYOTO_MSG << "Message" << std::endl; * \endcode */ #define GYOTO_MSG if (Gyoto::verbose() >= GYOTO_DEFAULT_VERBOSITY) std::cout /// Display informative message to stderr. /** * Message will be shown to the user only if Gyoto::verbose() has * been explicitely raised. * * \code * GYOTO_MSG << "Message" << std::endl; * \endcode */ #define GYOTO_INFO if (Gyoto::verbose() >= GYOTO_INFO_VERBOSITY) std::cerr<<"INFO: " /// Unit ignored because libudunits2 was disabled. /** * Use this warning when a conversion has been dropped due to * #HAVE_UDUNITS being undefined. * * \param from From unit. * \param to To unit. */ #define GYOTO_WARNING_UDUNITS(from, to) \ GYOTO_WARNING << "unit ignored (trying to convert from \"" << from \ << "\" to " \ << to \ << "\"), you may have more chance recompiling Gyoto with --with-udunits\n" /// Output expression value in debug mode /** * Output, only in debug mode both code and value that code * yield. For instance: * \code * int a=1, b=2; * GYOTO_DEBUG_EXPR(a+b); * \endcode * will essentially output, only in debug mode: * \code * DEBUG: : a+b=3 * \endcode */ #define GYOTO_DEBUG_EXPR(a) GYOTO_DEBUG << #a << "=" << a << std::endl /// Output array content in debug mode /** * Output, only in debug, name and content of array. * For instance: * \code * int a[]= {1, 2, 3}; * GYOTO_DEBUG_ARRAY(a,3); * \endcode * will essentially output, only in debug mode: * \code * DEBUG: : a=[1,2,3] * \endcode * * \param a Array * \param n Number of elements to show (array must be at least this * size). */ #define GYOTO_DEBUG_ARRAY(a,n) if (GYOTO_DEBUG_MODE) { \ std::cerr << "DEBUG: " << __PRETTY_FUNCTION__ << ": " \ << #a << "=[" << a[0] ; \ for (size_t _gyoto_debug_array_i=1; _gyoto_debug_array_i < n; ++_gyoto_debug_array_i) \ std::cerr << "," << a[_gyoto_debug_array_i] ; \ std::cerr << "]" << std::endl ;} /// Display debug message /** * Message is deiplayed only if #GYOTO_DEBUG_MODE is true and is * prepended with the word "DEBUG:" and the signature of the * function. * * \code * GYOTO_DEBUG << "message" << endl; * \endcode */ #define GYOTO_DEBUG if (GYOTO_DEBUG_MODE) std::cerr << "DEBUG: " << __PRETTY_FUNCTION__ << ": " /// Start debug-only block. /** * Code between GYOTO_IF_DEBUG and #GYOTO_ENDIF_DEBUG is only * executed in debug mode. */ #define GYOTO_IF_DEBUG if (GYOTO_DEBUG_MODE) { /// End debug-only block. /** * Code between #GYOTO_IF_DEBUG and GYOTO_ENDIF_DEBUG is only * executed in debug mode. */ #define GYOTO_ENDIF_DEBUG } /// Whether debug mode is activated (run-time). #define GYOTO_DEBUG_MODE Gyoto::debug() //\} //\{ /** * \name Coordinate system kind * GYOTO_COORDKIND_CARTESIAN or GYOTO_COORDKIND_SPHERICAL * * Every Gyoto::Metric has a coordinate system kind. It can be used * by functions which need to express coordinates always in * spherical or always in Cartesian form, with trivial conversion * between the two. */ /** * \brief Type for coordinate system kinds */ typedef unsigned int CoordKind_t; #define GYOTO_COORDKIND_UNSPECIFIED 0 ///< Unspecified coordinate kind #define GYOTO_COORDKIND_CARTESIAN 1 ///< Cartesian-like coordinate system #define GYOTO_COORDKIND_SPHERICAL 2 ///< Spherical-like coordinate system //\} } //{ /** * \name Default values for various things */ #define GYOTO_DEFAULT_X_SIZE 1024 ///< Default size for arrays in a Worldline /** * \brief Default value for the initial step in the integration loop. * * Since the step is (most of the time) adaptive, this default only * has little influence, but sometimes, it matters. Also used in * Scenery. */ #define GYOTO_DEFAULT_DELTA 0.01 /** * \brief Default value for the maximum step in the integration loop. */ #define GYOTO_DEFAULT_DELTA_MAX DBL_MAX /** * \brief Default value for the minimum step in the integration loop. */ #define GYOTO_DEFAULT_DELTA_MIN DBL_MIN /** * \brief Default value for delta_max_over_r_ * * For investigations close to the event horizon, 0.5 is usually * fine. If high accuracy is needed long after deflection (weak * lensing), then this must be smaller. A good test is to look at a * MinDistance map for a FixedStar: it must be smooth. */ #define GYOTO_DEFAULT_DELTA_MAX_OVER_R 1. #define GYOTO_DEFAULT_ABSTOL 1e-6 #define GYOTO_DEFAULT_RELTOL 1e-6 /** * \brief Default value for Gyoto::Worldline::maxiter_ */ #define GYOTO_DEFAULT_MAXITER 100000 /** * \brief Precision on the determination of a date * * E.g. in Gyoto::Photon::findMin(), Gyoto::Photon::findValue(). */ #define GYOTO_T_TOL 1e-4 #define GYOTO_KERR_HORIZON_SECURITY 0.01 /// \brief Default value for Screen::dmax_ #define GYOTO_SCREEN_DMAX DBL_MAX //For displays with setw and setprecision /// Precision when outputting double values #define GYOTO_PREC 15 /// \brief Field width when outputting double values #define GYOTO_WIDTH 25 /* Plugins Stuff */ /// \brief Default list of default plug-ins to load... #ifndef GYOTO_DEFAULT_PLUGINS #define GYOTO_DEFAULT_PLUGINS "stdplug,nofail:lorene" #endif #ifndef GYOTO_PLUGIN_SFX #define GYOTO_PLUGIN_SFX "so" #endif //\} //\{ /** *\name Physical constants */ /// \brief Celerity of light (m/s) #define GYOTO_C 299792458. /// \brief Celerity of light (cm/s) #define GYOTO_C_CGS 2.99792458e10 /// \brief Gravitational constant (SI = m^3 * kg^-1 * s-2) #define GYOTO_G 6.67428e-11 /// \brief Gravitational constant (cgs: cm^3 * g^-1 * s-2) #define GYOTO_G_CGS 6.67428e-8 /// \brief G/c^2=6.67428e-11/299792458.^2 #define GYOTO_G_OVER_C_SQUARE 7.426138e-28 /// \brief Planck's constant (h) in SI (J.s=kg.m^2/s) #define GYOTO_PLANCK 6.62606896e-34 /// \brief Planck's constant (h) in c.g.s (g.cm^2/s) #define GYOTO_PLANCK_CGS 6.62606896e-27 /// \brief h/c^2 in SI (kg.s) #define GYOTO_PLANCK_OVER_C_SQUARE 7.372496e-51 /// \brief Boltzmann's constant (k) in SI (J/K) #define GYOTO_BOLTZMANN 1.3806504e-23 /// \brief Boltzmann's constant (k) in cgs (erg/K) #define GYOTO_BOLTZMANN_CGS 1.3806504e-16 /// \brief Stefan-Boltzmann's constant (sigma) in cgs (erg/cm2/s/K4) #define GYOTO_STEFANBOLTZMANN_CGS 5.670373e-5 /// \brief h/k (K.s = K/Hz) #define GYOTO_PLANCK_OVER_BOLTZMANN 4.7992373e-11 /// \brief ideal gas constant R in SI #define GYOTO_GAS_CST 8.3144621 /// \brief ideal gas constant R in erg/(K mol) #define GYOTO_GAS_CST_CGS 8.3144621e7 /// \brief Avogadro constant #define GYOTO_AVOGADRO 6.0221413e23 /// \brief Thomson cross-section in cgs #define GYOTO_THOMSON_CGS 6.6524e-25 /// \brief Fine structure constant (=1/137) #define GYOTO_ALPHA_F 0.00729927 /// \brief proton mass in cgs #define GYOTO_PROTON_MASS_CGS 1.67262158e-24 /// \brief electron mass in cgs #define GYOTO_ELECTRON_MASS_CGS 9.10938188e-28 /// \brief electron classical radius in cgs #define GYOTO_ELECTRON_CLASSICAL_RADIUS_CGS 2.8179e-13 /// \brief elementary charge in cgs (erg^{1/2} cm^{1/2}) #define GYOTO_ELEMENTARY_CHARGE_CGS 4.80320427e-10 /// \brief Euler-Mascheroni constant #define GYOTO_EULER_MASCHERONI 0.577216 /// \brief atomic mass unit in cgs #define GYOTO_ATOMIC_MASS_UNIT_CGS 1.660537781e-24 /// \brief Factor to convert Iν from c.g.s. to SI #define GYOTO_INU_CGS_TO_SI 0.001 /// \brief Sun mass (kg) #define GYOTO_SUN_MASS 1.98843e30 /// \brief Sun mass (g) #define GYOTO_SUN_MASS_CGS 1.98843e33 /// \brief Sun radius (m) #define GYOTO_SUN_RADIUS 6.955e8 /// \brief Kiloparsec (m) #define GYOTO_KPC 3.08568025e19 /// \brief Astronomical Unit (m) #define GYOTO_ASTRONOMICAL_UNIT 1.49597870700e11 /// \brief Light-year (m) #define GYOTO_LIGHT_YEAR 9.4607304725808e15 /// \brief Convert from radians to degrees #define GYOTO_RADEG 57.2957795130823 /// \brief Convert from degrees to radians #define GYOTO_DEGRAD 0.0174532925199433 /// \brief Convert from arcminutes to radians #define GYOTO_MINRAD 2.908882086657216e-04 /// \brief Convert from arcseconds to radians #define GYOTO_SECRAD 4.848136811095360e-06 /// \brief Convert from milliarcseconds to radians #define GYOTO_MASRAD 4.848136811095360e-09 /// \brief Convert from microarcseconds to radians #define GYOTO_MUASRAD 4.848136811095360e-12 /// \brief Convert from eV to Hz #define GYOTO_eV2Hz 2.417989348e+14 //\} /// \brief Stringify macro content #define GYOTO_STRINGIFY(a) GYOTO_STRINGIFY_ARGUMENT(a) /// \brief Stringify argument #define GYOTO_STRINGIFY_ARGUMENT(a) #a #ifndef GYOTO_NO_DEPRECATED #warning Using deprecated method names.\ Define GYOTO_NO_DEPRECATED to disable. //\{ /** *\name Renamed methods * * Define GYOTO_NO_DEPRECATED to disable these macros and the warning. For instance: * \code * make CPPFLAGS=-DGYOTO_NO_DEPRECATED * \endcode */ # define getMetric metric # define setMetric metric # define setScreen screen # define getScreen screen # define getRmax rMax # define setRmax rMax # define getMass mass # define setMass mass # define getCoordKind coordKind # define setCoordKind coordKind # define getKind kind # define setKind kind # define getSpin spin # define setSpin spin # define getIntegKind integKind # define setIntegKind integKind # define getFileName fileName # define setFileName fileName # define getDistance distance # define setDistance distance # define getPALN PALN # define setPALN PALN # define getArgument argument # define setArgument argument # define getInclination inclination # define setInclination inclination # define getAstrobj astrobj # define setAstrobj astrobj # define getSpectrometer spectrometer # define setSpectrometer spectrometer # define getSpectrum spectrum # define setSpectrum spectrum # define getOpacity opacity # define setOpacity opacity # define setDelta delta # define getDelta delta # define setDelta delta # define getDelta delta # define setDelta0 delta0 # define getDelta0 delta0 # define setAlpha0 alpha0 # define getAlpha0 alpha0 # define setAnglekind anglekind # define getTmin tMin # define setTmin tMin # define getTime time # define setTime time # define getFreqObs freqObs # define setFreqObs freqObs # define getFieldOfView fieldOfView # define setFieldOfView fieldOfView # define getRadius radius # define setRadius radius # define getLargeRadius largeRadius # define setLargeRadius largeRadius # define getSmallRadius smallRadius # define setSmallRadius smallRadius # define getCentralDensity centralDensity # define setCentralDensity centralDensity # define getDmax dMax # define setDmax dMax # define getTemperature temperature # define setTemperature temperature # define getScaling scaling # define setScaling scaling # define getPatternVelocity patternVelocity # define setPatternVelocity patternVelocity # define getLambda lambda # define setLambda lambda # define getCentralTempOverVirial centralTempOverVirial # define setCentralTempOverVirial centralTempOverVirial # define getBeta beta # define setBeta beta # define getConstant constant # define setConstant constant # define getExponent exponent # define setExponent exponent # define getFlag_radtransf opticallyThin # define setFlag_radtransf opticallyThin # define getNThreads nThreads # define setNThreads nThreads # define getResolution resolution # define setResolution resolution # define getNSamples nSamples # define setNSamples nSamples # define getSpectralOverSampling spectralOversampling # define setSpectralOverSampling spectralOversampling # define setBinSpectrumConverter binSpectrumConverter # define setSpectrumConverter spectrumConverter # define setIntensityConverter intensityConverter # define getSafetyValue safetyValue; # define setSafetyValue safetyValue; # define setInnerRadius innerRadius; # define getInnerRadius innerRadius; # define setOuterRadius outerRadius; # define getOuterRadius outerRadius; # define setThickness thickness; # define getThickness thickness; # define setDir dir; # define getDir dir; # define setBand band; # define setObserverKind observerKind; # define getObserverKind observerKind; //\} #endif #endif Gyoto-1.2.0/include/GyotoDirectionalDisk.h000066400000000000000000000137741302352257300205170ustar00rootroot00000000000000/** * \file GyotoDirectionalDisk.h * \brief Geometrically thin disk read from FITS file * * This class describes a disk contained in the z=0 (equatorial) * plane. The flux emitted * at radius r, making an angle i with respect to the local normal, * at frequency nu is given in a FITS file. * * This astrobj is typically used to compute reflected spectra * in the lamp post model. * * For the time being the metric is imposed to be KerrBL, but should * easily generalized. * * The target of ray-traced Gyoto::Photon */ /* Copyright 2014-2015 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoDirectionalDisk_H_ #define __GyotoDirectionalDisk_H_ #include #include #include namespace Gyoto{ namespace Astrobj { class DirectionalDisk; } } //#include #include /** * \class Gyoto::Astrobj::DirectionalDisk * \brief Geometrically thin disk read from FITS file * * This class describes a disk contained in the z=0 (equatorial) * plane. The flux emitted * at radius r, making an angle i with respect to the local normal, * at frequency nu is given in a FITS file. * */ class Gyoto::Astrobj::DirectionalDisk : public Astrobj::ThinDisk { friend class Gyoto::SmartPointer; private: std::string filename_; ///< Optional FITS file name containing the arrays /** * An array of dimensionality double[nr_][ni_][nnu_]. In FITS * format, the first dimension is nu, the second cosi (direction cosine), * and the third r. There is no phi dependence. */ double * emission_; ///< Iν(ν, r, cosi;) double * radius_; ///< Radius vector double * cosi_; ///< Direction cosine vector double * freq_; ///< Frequencies vector double lampaltitude_; ///< Lamp altitude (z coordinate) in M units size_t nnu_; ///< Number of frequencies provided in DirectionalDisk::emission_ size_t ni_; ///< Number of direction cosine size_t nr_; ///< Number of radius values double minfreq_computed_; ///< Minimum frequency computed by ATM21 double maxfreq_computed_; ///< Maximum frequency computed by ATM21 double minfreq_lampframe_; ///< Minimum frequency emitted by the lamp double maxfreq_lampframe_; ///< Maximum frequency emitted by the lamp bool average_over_angle_; ///< true to average over emission angle // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; // fillProperty is overridden to remove leading "!" from FITS filename void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const; using Generic::metric; void metric(SmartPointer gg); DirectionalDisk(); ///< Standard constructor DirectionalDisk(const DirectionalDisk& ) ;///< Copy constructor virtual DirectionalDisk* clone () const; ///< Cloner virtual ~DirectionalDisk() ; ///< Destructor // Accessors // --------- public: void file(std::string const &f); std::string file() const ; void averageOverAngle(bool t); bool averageOverAngle()const; void lampaltitude(double zz); double lampaltitude() const ; void lampcutoffsinev(std::vector const &v) ; std::vector lampcutoffsinev() const ; #ifdef GYOTO_USE_CFITSIO /// Read parameters and arrays from FITS file virtual void fitsRead(std::string filename_); /// Write parameters and arrays to FITS file virtual void fitsWrite(std::string filename_); #endif /// Set DirectionalDisk::emission_ /** * The pointer is copied directly, not the array content. * * This is a low-level function. Beware that: * - previously allocated array will not be freed automatically; * - array attached when the destructor is called will be freed. */ void setEmission(double * pattern); void radius(double * pattern); /** * DirectionalDisk::emission_ is freed if not NULL, reallocated, and * pattern is copied into emission_. * * Finally, DirectionalDisk::nnu_, DirectionalDisk::ni_, and * DirectionalDisk::nr_ are set according to naxes. * * \param pattern Array to copy as emission_. May be NULL in which * case emission_ is simply deallocated and set to NULL. * * \param naxes { nnu_, ni_, nr_ }. */ virtual void copyIntensity(double const * const pattern = NULL, size_t const naxes[3] = NULL); virtual double const * getIntensity() const;///< Get DirectionalDisk::emission_ virtual void getIntensityNaxes( size_t naxes[3] ) const ; ///< Get DirectionalDisk::nnu_, DirectionalDisk::ni_, and DirectionalDisk::nr_ virtual void copyGridRadius(double const * const pattern = NULL, size_t nr = 0 ); virtual double const * getGridRadius() const; ///< Get DirectionalDisk::radius_ virtual void copyGridCosi(double const * const pattern = NULL, size_t ni = 0 ); virtual double const * getGridCosi() const; ///< Get DirectionalDisk::cosi_ virtual void copyGridFreq(double const * const pattern = NULL, size_t ni = 0 ); virtual double const * getGridFreq() const; ///< Get DirectionalDisk::freq_ protected: void getIndices(size_t i[3], double const co[4], double cosi, double nu=0.) const ; ///< Get emission_ cell corresponding to position co[4] public: using ThinDisk::emission; virtual double emission(double nu_em, double dsem, double c_ph[8], double c_obj[8]=NULL) const; }; #endif Gyoto-1.2.0/include/GyotoDisk3D.h000066400000000000000000000212331302352257300165150ustar00rootroot00000000000000/** * \file GyotoDisk3D.h * \brief A geometrically thick, optically thin disk * * The target of ray-traced Gyoto::Photon */ /* Copyright 2011 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoDisk3D_H_ #define __GyotoDisk3D_H_ #include #include #include namespace Gyoto{ namespace Astrobj { class Disk3D; } } /** * \class Gyoto::Astrobj::Disk3D * \brief Geometrically thick disk read from FITS file * * This class is the base class for thick disks. The emitter's * velocity is given in a FITS file, together with emission * related quantity (typically temperature). * This class mainly implements the Impact() function. * Emission() function is here left to its default, and should * be implemented according to specific needs in heir classes. * Here the disk is supposed not to evolve in time. The dynamical * treatment is provided in heir classes. * * The 3D disk is assumed to be described by a regular * (non adaptive) grid of cylindrical geometry. The disk * is a slab from rin_ to rout_ and zmin_ (typically = -zmax_) to zmax_. * */ class Gyoto::Astrobj::Disk3D : public Gyoto::Astrobj::Generic { friend class Gyoto::SmartPointer; private: std::string filename_; ///< Optional FITS file name containing the arrays /** * An array of dimensionality double[nr_][nz_][nphi_][nnu_]. In FITS * format, the first dimension is nu, the second phi, the third * z and last r. It typically contains temperature and is used only by * subclasses. */ double * emissquant_; ///< Physical quantity yielding emission. double * opacity_; ///< Opacity, same dimensions as emissquant_ /** * An array of dimensionality double[nr_][nz_][nphi_][3]. In FITS format, * the second dimension is phi, the third z and last r. The first plane in * the first FITS dimention is dphi/dt, the second dz/dt the last dr/dt. */ double * velocity_; ///< Velocity(r, z, phi) double dnu_; ///< Frequency scale of PatternDisk::emission_ in Hz double nu0_; ///< Lowest frequency provided in PatternDisk::emission_ in Hz size_t nnu_; ///< Number of frequencies provided in PatternDisk::emission_ double dphi_; ///< δφ between two grid columns double phimin_;///< Minimum φ in grid size_t nphi_; ///< Grid size in the φ direction double phimax_; ///< Maximum φ in grid /** * XML elment: <RepeatPhi>. * FITS keyword: HIERARCH GYOTO Disk3D RepeatPhi */ size_t repeat_phi_; ///< Number of times the pattern should be repeated to cover [0, 2Π] //double phi0_==0, phi max is always 2*M_PI double dz_; ///< Altitude step double zmin_; ///< Minimum altitude size_t nz_; ///< Grid size in the altitude direction double zmax_; ///< Maximum altitude double dr_; ///< Radius step double rin_; ///< Inner radius of the grid size_t nr_; ///< Number of rows in the patternGrid size in the r direction double rout_; ///< Outer radius of the grid int zsym_; ///< 1 to symmetrize the grid z -> -z (default case) double tPattern_; ///< If the disk is being rotated (like a pattern disk) this is the origin of time for this rotation double omegaPattern_; ///< If the disk is being rotated (like a pattern disk) this is the rotation velocity dphi/dt // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; // fillProperty is overridden to remove leading "!" from FITS filename void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const; Disk3D(); ///< Standard constructor. Disk3D(const Disk3D& ) ;///< Copy constructor. virtual Disk3D* clone () const; ///< Cloner. virtual ~Disk3D() ; ///< Destructor. // Accessors // --------- public: #ifdef GYOTO_USE_CFITSIO /// Read parameters and arrays from FITS file. virtual void fitsRead(std::string filename_); /// Write parameters and arrays to FITS file. virtual void fitsWrite(std::string filename_); #endif void file(std::string const &f); std::string file() const; void zsym(bool t); bool zsym() const; void tPattern(double t); double tPattern() const; void omegaPattern(double t); double omegaPattern() const; /// Set Disk3D::emissquant_. /** * The pointer is copied directly, not the array content. * * This is a low-level function. Beware that: * - previously allocated array will not be freed automatically; * - array attached when the destructor is called will be freed. */ void setEmissquant(double * pattern); void opacity(double * pattern); /// Set Disk3D::velocity__. /** * The pointer is copied directly, not the array content. * * This is a low-level function. Beware that: * - previously allocated array will not be freed automatically; * - array attached when the destructor is called will be freed. */ void setVelocity(double * pattern); /// Set Disk3D::emissquant_. /** * Disk3D::emissquant_ is freed if not NULL, reallocated, and * pattern is copied into emission_. * * If Disk3D::velocity_ or has been set previously with mismatching * sizes, it is deallocated too. * * Finally, Disk3D::nnu_, Disk3D::nphi_, Disk3D::nz_ and * Disk3D::nr_ are set according to naxes. * * \param pattern Array to copy as emission_. May be NULL in which * case emission_ is simply deallocated and set to NULL. * * \param naxes { nnu_, nphi_, nz_, nr_ }. */ virtual void copyEmissquant(double const * const pattern = NULL, size_t const naxes[4] = NULL); /// Get Disk3D::emissquant_. virtual double const * getEmissquant() const; /// Get { Disk3D::nnu_, Disk3D::nphi_, Disk3D::nz_, Disk3D::nr_ }. virtual void getEmissquantNaxes( size_t naxes[4] ) const ; virtual void copyOpacity(double const * const pattern = NULL, size_t const naxes[4] = NULL); /// Get Disk3D::opacity_. virtual double const * opacity() const; /// Set Disk3D::velocity_. /** * Disk3D::velocity_ is first freed if not NULL and set to NULL. * * If pattern is not NULL, Disk3D::emissquant_ must have been set * previously with matching dimensions. Disk3D::velocity_ is * then reallocated, and pattern is copied into velocity_. * * \param pattern Array to copy as velocity_. May be NULL in which * case velocity_ is simply deallocated and set to NULL. * * \param naxes { nphi_, nz_, nr_ }. */ virtual void copyVelocity(double const * const pattern = NULL, size_t const naxes[3] = NULL); /// Get Disk3D::velocity_. virtual double const * getVelocity() const; /// Set Disk3D::repeat_phi_. virtual void repeatPhi(size_t n); /// Get Disk3D::repeat_phi_. virtual size_t repeatPhi() const; /// Set Disk3D::nu0_. virtual void nu0(double freq); /// Get Disk3D::nu0_. virtual double nu0() const; /// Set Disk3D::dnu_. virtual void dnu(double dfreq); /// Get Disk3D::dnu_. virtual double dnu() const; /// Set Disk3D::rin_. void rin(double rrin); /// Get Disk3D::rin_. double rin() const; /// Set Disk3D::rout_. void rout(double rout); /// Get Disk3D::rout_. double rout() const; /// Set Disk3D::zmin_. void zmin(double zmin); /// Get Disk3D::zmin_. double zmin() const; /// Set Disk3D::zmax_. void zmax(double zmax); /// Get Disk3D::zmax_. double zmax() const; /// Set Disk3D::phimin_. void phimin(double phimin); /// Get Disk3D::phimin_. double phimin() const; /// Set Disk3D::phimax_. void phimax(double phimax); /// Get Disk3D::phimax_. double phimax() const; protected: void getIndices(size_t i[4], double const co[4], double nu=0.) const ; ///< Get emissquant_ cell corresponding to position co[4]. public: int Impact(Photon *ph, size_t index, Astrobj::Properties *data); /// Get fluid 4-velocity at point. /** * Fill vel with the 4-vector velocity of the fluid at 4-position * pos. * * \param[in] pos 4-position at which to compute velocity; * \param[out] vel 4-velocity at pos. */ virtual void getVelocity(double const pos[4], double vel[4]) ; }; #endif Gyoto-1.2.0/include/GyotoDynamicalDisk.h000066400000000000000000000066311302352257300201550ustar00rootroot00000000000000/** * \file GyotoDynamicalDisk.h * \brief A geometrically thin, optically thick disk, evolving dynamically * * The disk is described by a set of FITS files for a set of different times */ /* Copyright 2011-2015 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoDynamicalDisk_H_ #define __GyotoDynamicalDisk_H_ #include #include #include #include namespace Gyoto{ namespace Astrobj { class DynamicalDisk; } } //#include #include /** * \class Gyoto::Astrobj::DynamicalDisk * \brief Geometrically thin disk read from a set of FITS files * * This class describes a PatternDiskBB that evolves dynamically. * It is described by a set of FITS files. * */ class Gyoto::Astrobj::DynamicalDisk : public Astrobj::PatternDiskBB { friend class Gyoto::SmartPointer; private: char* dirname_; ///< FITS files directory double tinit_; ///< date of the first FITS file double dt_; ///< Time increment between two FITS (assumed constant) int nb_times_; ///< Number of dates /// Array of PatternDisk::emission_ arrays double ** emission_array_; /// Array of PatternDisk::opacity_ arrays double ** opacity_array_; /// Array of PatternDisk::velocity_ arrays double ** velocity_array_; ///< /// Array of PatternDisk::radius_ arrays double ** radius_array_; ///< radius vector /// Array of PatternDisk::dnu_ values double * dnu_array_; /// Array of PatternDisk::nu0_ values double * nu0_array_; /// Array of PatternDisk::nu1_ values size_t * nnu_array_; /// Array of PatternDisk::dphi_ values double * dphi_array_; /// Array of PatternDisk::nphi_ values size_t * nphi_array_; /// Array of PatternDisk::dr_ values double * dr_array_; /// Array of PatternDisk::nr_ values size_t * nr_array_; // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; DynamicalDisk(); ///< Standard constructor DynamicalDisk(const DynamicalDisk& ) ;///< Copy constructor virtual DynamicalDisk* clone () const; ///< Cloner virtual ~DynamicalDisk() ; ///< Destructor // Accessors // --------- public: std::string file() const; void file(std::string const &fname); void tinit(double t); double tinit()const; void dt(double t); double dt()const; using PatternDiskBB::emission; virtual double emission(double nu_em, double dsem, double c_ph[8], double c_obj[8]=NULL) const; void getVelocity(double const pos[4], double vel[4]); double const * getVelocity() const; protected: /// Set underlying PatternDisk pointers to a specific date slice. /** * \param iq Index of the date slice. */ void copyQuantities(int iq) ; }; #endif Gyoto-1.2.0/include/GyotoDynamicalDisk3D.h000066400000000000000000000122721302352257300203420ustar00rootroot00000000000000/** * \file GyotoDynamicalDisk3D.h * \brief A geometrically thick, optically thin disk, evolving dynamically, * with black body emission. * * The disk is described by a set of FITS files for a set of different times */ /* Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoDynamicalDisk3D_H_ #define __GyotoDynamicalDisk3D_H_ #include #include #include #include namespace Gyoto{ namespace Astrobj { class DynamicalDisk3D; } } #include #include /** * \class Gyoto::Astrobj::DynamicalDisk3D * \brief Geometrically thick optically thin disk * read from a set of FITS files. * * This class describes a PatternDiskBB that evolves dynamically. * It is described by a set of FITS files for different times. * Its emission is blackbody. * * The disk is assumed to be described by a regular, * constant in time, grid. * * The metric must be Kerr in BL coordinates. * */ class Gyoto::Astrobj::DynamicalDisk3D : public Astrobj::Disk3D { friend class Gyoto::SmartPointer; protected: SmartPointer spectrumBB_; ///< disk black body ///< emission law private: bool temperature_; ///< 1 if temperature is given in fits data file, 0 if emission coef is directly given char* dirname_; ///< FITS files directory double tinit_; ///< Time of the first FITS file double dt_; ///< Time increment between two FITS (assumed constant) int nb_times_; ///< Number of times double PLindex_; ///< power law index such that density_elec(E) ∝ E-p bool novel_; ///< put to true if velocity of emitting particle is not provided double floortemperature_; ///< if non-zero, emission and absorption are 0 for temperatures below this floor, emission=blackbody and absorption is infty for temperatures above (this is a kind of fake optically thick case, when the emitting surface is inside the grid, not at the boundary of the grid) /** * An array of arrays of dimensionality double[nr_][nz_][nphi_][nnu_]. * In FITS format, the first dimension is nu, the second phi, the third * z, the last r. It contains emission coef, or a closely related quantity. */ double ** emission_array_; /** * An array of arrays of dimensionality double[nr_][nz_][nphi_][nnu_]. * In FITS format, the first dimension is nu, the second phi, the third * z, the last r. It contains absorption coef, or a closely related quantity. */ double ** absorption_array_; /** * An array of arrays of dimensionality double[nr_][nz_][nphi_][3]. * In FITS format, the second dimension is phi, and the third r. * The first plane in the first FITS dimention is dphi/dt, * the second dz/dt, the third dr/dt. */ double ** velocity_array_; ///< velocity(r, z, phi) // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; GYOTO_OBJECT_THREAD_SAFETY; DynamicalDisk3D(); ///< Standard constructor DynamicalDisk3D(const DynamicalDisk3D& ) ;///< Copy constructor virtual DynamicalDisk3D* clone () const; ///< Cloner virtual ~DynamicalDisk3D() ; ///< Destructor // Accessors // --------- public: using Generic::metric; void metric(SmartPointer gg); void file(std::string const &f); std::string file() const; void tinit(double t); double tinit()const; void dt(double t); double dt()const; void PLindex(double t); double PLindex()const; void floorTemperature(double t); double floorTemperature()const; void temperature(bool t); bool temperature() const; void withVelocity(bool t); bool withVelocity() const; // Stuff // ----- /// Compute emission at one grid date. double emission1date(double nu_em, double dsem, double c_ph[8], double c_obj[8]) const; using Disk3D::emission; /// Interpolate emission between grid dates. virtual double emission(double nu_em, double dsem, double c_ph[8], double c_obj[8]=NULL) const; /// Compute transmission at one grid date. double transmission1date(double nu_em, double dsem, double c_ph[8], double c_obj[8]) const; /// Interpolate transmission between grid dates. double transmission(double nu_em, double dsem, double c_obj[8]) const; void getVelocity(double const pos[4], double vel[4]); double const * getVelocity() const; protected: /// Set underlying Disk3D pointers to a specific date slice. /** * \param iq Index of the date slice. */ void copyQuantities(int iq) ; }; #endif Gyoto-1.2.0/include/GyotoDynamicalDiskBolometric.h000066400000000000000000000044231302352257300221720ustar00rootroot00000000000000/** * \file GyotoDynamicalDiskBolometric.h * \brief A geometrically thin, optically thick disk, evolving dynamically * * The disk is described by a set of FITS files for a set of different times */ /* Copyright 2013 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoDynamicalDiskBolometric_H_ #define __GyotoDynamicalDiskBolometric_H_ #include #include #include #include namespace Gyoto{ namespace Astrobj { class DynamicalDiskBolometric; } } //#include #include /** * \class Gyoto::Astrobj::DynamicalDiskBolometric * \brief Geometrically thin disk read from a set of FITS files * * This class describes a PatternDiskBB that evolves dynamically. * It is described by a set of FITS files. * */ class Gyoto::Astrobj::DynamicalDiskBolometric : public Astrobj::DynamicalDisk { friend class Gyoto::SmartPointer; private: // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; DynamicalDiskBolometric(); ///< Standard constructor DynamicalDiskBolometric(const DynamicalDiskBolometric& ) ;///< Copy constructor virtual DynamicalDiskBolometric* clone () const; ///< Cloner virtual ~DynamicalDiskBolometric() ; ///< Destructor double emission(double nu_em, double dsem, double *, double coord_obj[8]) const; double bolometricEmission(double dsem, double coord_obj[8]) const; void processHitQuantities(Photon* ph, double* coord_ph_hit, double* coord_obj_hit, double dt, Properties* data) const; }; #endif Gyoto-1.2.0/include/GyotoEquatorialHotSpot.h000066400000000000000000000046521302352257300210710ustar00rootroot00000000000000/** * \file GyotoEquatorialHotSpot.h * \brief Equatorial hot spot * */ /* Copyright 2013 Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoEquatorialHotSpot_h #define __GyotoEquatorialHotSpot_h #include #include #include namespace Gyoto { namespace Astrobj { class EquatorialHotSpot; }; }; class Gyoto::Astrobj::EquatorialHotSpot : public Gyoto::Astrobj::ThinDisk, public Gyoto::Worldline { friend class Gyoto::SmartPointer; private: double sizespot_; enum beaming_t {IsotropicBeaming=0, NormalBeaming=1, RadialBeaming=2}; beaming_t beaming_; double beamangle_; public: GYOTO_OBJECT; GYOTO_WORLDLINE; using Gyoto::Worldline::deltaMax; using Gyoto::Astrobj::Generic::deltaMax; EquatorialHotSpot(); EquatorialHotSpot(const EquatorialHotSpot &o); virtual ~EquatorialHotSpot(); virtual EquatorialHotSpot * clone() const ; // Accessors for the Property list void spotRadSize(double t); double spotRadSize() const; void beaming(std::string const &b); std::string beaming() const; void beamAngle(double t); double beamAngle() const; // double getMass() const; using Generic::metric; void metric(SmartPointer gg); void setInitialCondition(double coord[8]); void getVelocity(double const pos[4], double vel[4]); double emission(double nu_em, double dsem, double *, double coord_obj[8]) const; // needed for legacy XML files virtual int setParameter(std::string name, std::string content, std::string unit); #ifdef GYOTO_USE_XERCES // needed for wait_pos_ void setParameters(FactoryMessenger* fmp); virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const ; #endif #endif }; Gyoto-1.2.0/include/GyotoError.h000066400000000000000000000116411302352257300165270ustar00rootroot00000000000000/** * \file GyotoError.h * \brief Error handling * * Gyoto dlopens its plug-ins. The throw/catch C++ mechanism cannot * pass the dlopen boundary. The Gyoto::Error mechanism alleviates * this C++ language limitation. * * Every Gyoto method (either in the main Gyoto library or in a Gyoto * plug-in) should check for possible error conditions and throw * adequate Gyoto::Error exceptions through the * Gyoto::Error::throw() function. For instance: * \code * if (error_condition) Gyoto::Error::throw("Useful error message"); * \endcode * * If the main code has set Gyoto::Error::handler_t error handler * using Gyoto::Error::setHandler(), these errors will then be passed * to it. Else, the Error is C++-thrown at the main Gyoto library * level, above the dlopen boundary. * * The main code can then catch these exceptions and act appropriately, * for instance: * \code * try { gyoto_code ; } * catch (Gyoto::Error err) * { * err.Report(); * abort(); * } * \endcode * */ /* Copyright 2011, 2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoError_H_ #define __GyotoError_H_ /** * \namespace Gyoto * \brief Namespace for the Gyoto library */ #include namespace Gyoto { class Error; } /** * \class Gyoto::Error * \brief Class for thowing exceptions. * * Gyoto dlopens its plug-ins. The throw/catch C++ mechanism cannot * pass the dlopen boundary. The Gyoto::Error mechanism alleviates * this C++ language limitation. * * Every Gyoto method (either in the main Gyoto library or in a Gyoto * plug-in) should check for possible error conditions and throw * adequate Gyoto::Error exceptions through the * Gyoto::throwError() function. For instance: * \code * if (error_condition) Gyoto::throwError("Useful error message"); * \endcode * * If the main code has set Gyoto::Error::handler_t error handler * using Gyoto::Error::setHandler(), these errors will then be passed * to it. Else, the Error is C++-thrown at the main Gyoto library * level, above the dlopen boundary. * * The main code can then catch these exceptions and act appropriately, * for instance: * \code * try { gyoto_code ; } * catch (Gyoto::Error err) * { * err.Report(); * abort(); * } * \endcode */ class Gyoto::Error { private: /// Error message. const std::string message; /// Error code. /** * Default value is EXIT_FAILURE from cstdlib. Currently not used in * practice. */ const int errcode; public: /// Constructor with an error message. Error( const std::string m ); // Copy constructor Error( const Gyoto::Error &o); /// Print-out error message on standard error. void Report() const ; /// Retrieve error code. /** * See also operator const char * () const and get_message(). * \return Error code */ int getErrcode() const ; /// Cast to const char *. /** * Retrieve error message as a C string. See also get_message() and * gerErrcode(). */ operator const char * () const; /// Retrieve error message for custom handling of the exception. /** * See also operator const char * () const and getErrCode(). * \return char* message : pointer to the error message */ std::string get_message() const ; /// Error handler type. /** * Instead of catching Gyoto errors directly (for instance if gyoto * itself is dlopened), you can set a Handler_t error handler using * setHandler(). * * A very simple handler could be: * \code * void applicationErrorHandler(const Gyoto::Error e) { * e.Report(); * exit ( e.getErrCode() ); * } * \endcode */ typedef void Handler_t (const Error); /// Set application error handler. /** * Instead of catching Gyoto errors directly (for instance if gyoto * itself is dlopened), you can set an Error::Handler_t error * handler using setHandler(). * * \code * void applicationErrorHandler(const Gyoto::Error e) { * e.Report(); * exit ( e.getErrCode() ); * } * int main() { * Gyoto::Error::setHandler(&applicationErrorHandler); * } * \endcode * \param phandler Function pointer to the handler. */ static void setHandler( Gyoto::Error::Handler_t* phandler); }; namespace Gyoto { /// Throw a Gyoto::Error void throwError( std::string ); } #endif Gyoto-1.2.0/include/GyotoFactory.h000066400000000000000000000314541302352257300170510ustar00rootroot00000000000000#ifdef GYOTO_USE_XERCES /** * \file GyotoFactory.h * \brief XML I/O * * The Factory is a place where objects are built. * */ /* Copyright 2011-2014, 2016 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoFactory_H_ #define __GyotoFactory_H_ #include #include "GyotoConfig.h" /// Xerces internal. /** * For some reason it sometimes need to be set to 0 instead of being * undefined. */ #ifndef XERCES_INCLUDE_WCHAR_H #define XERCES_INCLUDE_WCHAR_H 0 #endif #include #include #include #include #include #include #include #include namespace Gyoto { class Factory; class FactoryMessenger; namespace Spectrometer { class Generic; class Uniform; } } /** * \class Gyoto::Factory * \brief XML input/output * * The Factory is responsible from building objects from their XML * description, and from saving an XML description of existing * objects. Since the Factory doesn't know how to build the variety of * objects available in Gyoto and in external plug-ins, the Factory * orders Metric, Astrobj and Spectrum objects from registered * subcontractors (see SmartPointee::Subcontractor_t). The factory an the * various subcontractors communicate through a FactoryMessenger. * * To read an XML file, you simply create an instance of the Factory * with a filename, and get whichever object type you are interested * in: * \code * Gyoto::Factory * factory = new Gyoto::Factory("some/input/file.xml"); * const std::string kind = factory->kind(); * if (kind.compare("Scenery")) Gyoto::throwError("I wan't a Scenery"); * Gyoto::SmartPointer scenery = factory -> getScenery(); * Gyoto::SmartPointer screen = scenery->screen(); * Gyoto::SmartPointer object = scenery->astrobj(); * Gyoto::SmartPointer metric = scenery->metric(); * delete factory; factory=NULL; * \endcode or, for a single object and without checking the kind * (kind()) first: * \code * Gyoto::SmartPointer scenery = Factory("some/input/file.xml").getScenery(); * \endcode * * * Writing an object to a file is even easier. Assuming "object" below * is a Gyoto::SmartPointer where "class" is one of Scenery, * Metric::Generic, Astrobj::Generic, Spectrum::Generic, Screen, * Photon or Spectrometer: * \code * Gyoto::Factory * factory = new Gyoto::Factory(object); * factory -> write("some/output/file.xml"); * delete factory; factory=NULL; * \endcode * * or, for short: * \code * Gyoto::Factory(object).write("some/output/file.xml"); * \endcode * * You can also directly display the object to stdout: * \code * std::cout << Gyoto::Factory(object).format() << std::endl; * \endcode */ class Gyoto::Factory { friend class Gyoto::FactoryMessenger; protected: // XERCES MACHINERY /// Xerces error handler xercesc::ErrorHandler *reporter_; /// The document being read or written xercesc::DOMDocument *doc_; /// Root element in Factory::doc_ xercesc::DOMElement *root_; /// Xerces parser xercesc::XercesDOMParser *parser_; /// Xerces resolver xercesc::DOMXPathNSResolver* resolver_; /// Xerces implementation xercesc::DOMImplementation* impl_; // Elements which must happen only once in a file // but may happen about anywhere /// XML element representing the Metric xercesc::DOMElement *gg_el_; /// XML element representing the Astrobj xercesc::DOMElement *obj_el_; /// XML element representing the Photon xercesc::DOMElement *ph_el_; // GYOTO elements /// The Scenery read from or written to Factory::doc_ SmartPointer scenery_; /// The Metric read from or written to Factory::doc_ SmartPointer gg_; /// The Screen read from or written to Factory::doc_ SmartPointer screen_; /// The Astrobj read from or written to Factory::doc_ SmartPointer obj_; /// The Photon read from or written to Factory::doc_ SmartPointer photon_; /// The Spectrometer read from or written to Factory::doc_ SmartPointer spectro_; // Factory stuff /// XML file name, if actually reading from or writting to file. std::string filename_; /// Kind of root element (Scenery, Metric etc.) std::string kind_; public: /// Constructor for reading a file /** * If filename starts with " sc); /// Constructor for saving (or printing) a Metric Factory(SmartPointer gg); /// Constructor for saving (or printing) an Astrobj Factory(SmartPointer ao); /// Constructor for saving (or printing) a Spectrum Factory(SmartPointer sp); /// Constructor for saving (or printing) a Screen Factory(SmartPointer screen); /// Constructor for saving (or printing) a Photon Factory(SmartPointer photon); /// Constructor for saving (or printing) a Spectrometer Factory(SmartPointer Spectrometer); /// Destructor ~Factory(); private: /// Set Xerces reporter void setReporter(xercesc::ErrorHandler*); /// Get Factory::root_ xercesc::DOMElement * getRoot(); /// Get Factory::doc_ xercesc::DOMDocument* getDoc(); public: /// Get Factory::kind_ const std::string kind(); /// Find Scenery element, instantiate it and get it. /** * Scenery must be the root element. getScenery() will call * metric(), astrobj() and screen(). */ Gyoto::SmartPointer getScenery(); /// Find Metric element, instantiate it and get it. /** * Metric may be either the root element or directly within the root * element. */ Gyoto::SmartPointer metric(); /// Find Screen element, instantiate it and get it. /** * Screen may be either the root element or directly within the root * element. */ Gyoto::SmartPointer screen(); /// Find Astrobj element, instantiate it and get it. /** * Astrobj may be either the root element or directly within the root * element. */ Gyoto::SmartPointer astrobj(); /// Find Photon element, instantiate it and get it. /** * Photon may be either the root element or directly within the root * element. */ Gyoto::SmartPointer getPhoton(); /// Find Photon element, instantiate it and get it. /** * Photon may be either the root element or directly within the root * element. */ Gyoto::SmartPointer spectrum(); /// Find Spectrometer element, instantiate it and get it. /** * Spectrometer may be either the root element or directly within the root * element. */ Gyoto::SmartPointer spectrometer(); // XML OUTPUT /// Write constructed XML representation to file void write(const char* const fname=0); /// Get constructed XML representation as std::string std::string format(); // Setting elements /// Set Metric for this document. /** * If called several times for the same document, the metric * SmartPointers must point to the same instance or an error will be * thrown using Gyoto::throwError(). */ void metric(SmartPointer gg, xercesc::DOMElement *el); /// Set Astrobj for this document. /** * If called several times for the same document, the astrobj * SmartPointers must point to the same instance or an error will be * thrown using Gyoto::throwError(). */ void astrobj(SmartPointer ao, xercesc::DOMElement *el); /// Set Screen for this document. /** * If called several times for the same document, the screen * SmartPointers must point to the same instance or an error will be * thrown using Gyoto::throwError(). */ void screen(SmartPointer scr, xercesc::DOMElement *el); /// Set text content of XML element void setContent(std::string content, xercesc::DOMElement *el); /// Create new XML element without content /** * E.g. * \code * * \endcode * \param name XML entity name. * \param pel Parent XML element. */ void setParameter(std::string name, xercesc::DOMElement *pel); /// Create new XML element with double value /** * E.g. * \code * 2. * \endcode * \param name XML entity name. * \param value Entity content. * \param pel Parent XML element. */ void setParameter(std::string name, double value, xercesc::DOMElement *pel); /// Create new XML element with integer value /** * E.g. * \code * 7 * \endcode * \param name XML entity name. * \param value Entity content. * \param pel Parent XML element. */ void setParameter(std::string name, int value, xercesc::DOMElement *pel); /// Create new XML element with integer value /** * E.g. * \code * 7 * \endcode * \param name XML entity name. * \param value Entity content. * \param pel Parent XML element. */ void setParameter(std::string name, unsigned int value, xercesc::DOMElement *pel); /// Create new XML element with integer value /** * E.g. * \code * 7 * \endcode * \param name XML entity name. * \param value Entity content. * \param pel Parent XML element. */ void setParameter(std::string name, long value, xercesc::DOMElement *pel); /// Create new XML element with integer value /** * E.g. * \code * 7 * \endcode * \param name XML entity name. * \param value Entity content. * \param pel Parent XML element. */ void setParameter(std::string name, unsigned long value, xercesc::DOMElement *pel); /// Create new XML element with string content /** * E.g. * \code * Text * \endcode * * Any parameter can acually be set this way if total control over * Text formatting is wished for. * \param name XML entity name. * \param value Entity content. * \param pel Parent XML element. */ void setParameter(std::string name, std::string value, xercesc::DOMElement*pel); /// Create new XML element with array content /** * E.g. * \code * 0. 10. 3.14. 0. * \endcode * \param[in] name XML entity name. * \param[in] val Entity content. * \param[in] nelem Number of elements in val to output. * \param[in] pel Parent XML element. * \param[out] child If not NULL, set to a new Gyoto::FactoryMessenger * pointing to the new element. It must be deleted later. */ void setParameter(std::string name, double val[], size_t nelem, xercesc::DOMElement* pel, FactoryMessenger **child = NULL); void setParameter(std::string name, std::vector const &val, xercesc::DOMElement* pel, FactoryMessenger **child = NULL); void setParameter(std::string name, std::vector const &val, xercesc::DOMElement* pel, FactoryMessenger **child = NULL); /// Transform relative path into absolute path. /** * relpath is interpreted as follows: * * If it starts with "/", it is interpreted as an absolute path and * is returned as is. * * If it is prefixed with "`pwd`/", the rest of relpath is * interpreted as relative to the current working directory, * i.e. fullPath() tries to mimic how the shell would expand * relpath into an absolute path. * * In any other circumstance, relpath is interpreted to relative to * the directory where the XML file resides. * * \param relpath Path specification. * \return Absolute path to same file. */ std::string fullPath(std::string relpath); }; #endif #endif Gyoto-1.2.0/include/GyotoFactoryMessenger.h000066400000000000000000000376231302352257300207260ustar00rootroot00000000000000/** * \file GyotoFactoryMessenger.h * \brief Factory / SmartPointee::Subcontractor_t interface */ #ifdef GYOTO_USE_XERCES /* Copyright 2011-2014, 2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoFactoryMessenger_H_ #define __GyotoFactoryMessenger_H_ /// Internal to Xerces /** * For obscure reasons, this needs to be set to 0 instead of just * undefined. */ #ifndef XERCES_INCLUDE_WCHAR_H #define XERCES_INCLUDE_WCHAR_H 0 #endif #include #include #include #include #include namespace Gyoto { class Factory; class FactoryMessenger; namespace Metric { class Generic; } namespace Astrobj { class Generic; } namespace Spectrum { class Generic ; } class Screen; class Photon; } /** * \class Gyoto::FactoryMessenger * \brief Factory / SmartPointee::Subcontractor_t interface * * A FactoryMessenger instance is like an employee passing messages * between its employer (the Factory) and a subcontractor (a function * of the SmartPointee::Subcontractor_t type). * * The FactoryMessenger also communicate with the fillElement method * of some classes (Astrobj::Generic::fillElement(), * Metric::Generic::fillElement(), Spectrum::Generic::fillElement()). * * A subcontractor function typically loops calling getNextParameter() * to read all the parameters provided for it in an XML file. If BASE * is one of Astrobj, Metric or Spectrum, and MyClass is an * implementation of BASE::Generic, the subcontractor static member * function often looks like this: * * \code * SmartPointer MyClass::Subcontractor(Gyoto::FactoryMessenger *messenger) { * SmartPointer deliverable = new MyClass(); * while (messenger->getNextParameter(name, content) { * if (name=="SomeProperty") deliverable -> setSomeProperty(content); * else if (name=="AnotherProperty") deliverable -> setAnotherProperty(content); * } * return deliverable; * } * \endcode * * Other get* methods are provided to cope with more complex syntax * (e.g. when XML attributes are used, as in <ParameterName * attribute="attrvalue">ParameterValue</ParameterName> * * Conversely, the Factory asks certain Gyoto classes through their * fillElement() method how they should be printed or saved to an XML * file. Those fillElement() methods use the FactoryMessenger::set*() * methods (in particular setParameter()) as well as, occasionally, * makeChild() to describe themselves to the Factory. */ class Gyoto::FactoryMessenger { private: Gyoto::Factory* employer_; ///< The Factory that sent this messenger xercesc::DOMElement *element_; ///< The XML element concerned by this transaction xercesc::DOMNodeList* children_; ///< The children of the XML element concerned by this transaction XMLSize_t nodeCount_; ///< The number of children of the XML element concerned by this transaction XMLSize_t curNodeIndex_; ///< Current child public: FactoryMessenger(Gyoto::Factory*, xercesc::DOMElement*); ///< Constructor called before subcontracting FactoryMessenger(const FactoryMessenger& parent, std::string) ; ///< Constructor called before fillElement void reset(); ///< Get back to first parameter ///// GET METHODS, CALLED FROM A SUBCONTRACTOR /** * An Gyoto XML file may contain at most a single Metric section * and it may be present about anywhere in the XML tree. Individual * subcontractors should not try to interpret this section directly, * but should call metric() to find and interpret the Metric * section. */ SmartPointer metric () ; ///< Build and get the Metric described in this XML file /** * An Gyoto XML file may contain at most a single Screen section * and it may be present about anywhere in the XML tree. Individual * subcontractors should not try to interpret this section directly, * but should call screen() to find and interpret the Screen * section. */ SmartPointer screen () ; ///< Build and get the Screen described in this XML file /** * An Gyoto XML file may contain at most a single Photon section * and it may be present about anywhere in the XML tree. Individual * subcontractors should not try to interpret this section directly, * but should call getPhoton() to find and interpret the Photon * section. */ SmartPointer getPhoton () ; ///< Build and get the Photon described in this XML file /** * An Gyoto XML file may contain at most a single Astrobj section * and it may be present about anywhere in the XML tree. Individual * subcontractors should not try to interpret this section directly, * but should call astrobj() to find and interpret the Astrobj * section. */ SmartPointer astrobj () ; ///< Build and get the Astrobj described in this XML file /** * On each call, return a pair name-content of one of the * children_. Usually, "name" is the name of a parameter and * "content" is the string representation of the corresponding * value. For instance: * \code * Content * \endcode * * \param name upon output, name of the child * \param content of the child * \param unit= propertty of the child * \return 1 if there remains parameters to retrieve, 0 otherwise. */ int getNextParameter(std::string* name, std::string* content, std::string* unit=NULL); ///< Get name and value of next parameter /** * For instance a Spectrometer description looks like this * \code * 2.0e-6 2.4e-6 * \endcode * and the Spectrometer builder uses getSelfAttribute() to retrieve * the attributes "kind" and "nsamples". * * \param attrname name of the attribute * \return attrvalue */ std::string getSelfAttribute(std::string attrname) const ; ///< Get attribute of FactoryMessenger::element_ /** * For instance * \code * ParameterContent * \endcode * * \param attrname name of the attribute * \return attrvalue */ std::string getAttribute(std::string attrname) const ; ///< Get attribute of a last retrieved parameter /** * In exceptional circumstances, it may be necessary to get the * entire text content of the topmost element * FactoryMessenger::element_ instead or getting only the individual * FactoryMessenger::children_ . * * For instance a Spectrometer description looks like this: * \code * 2.0e-6 2.4e-6 * \endcode * and the Spectrometer builder uses getFullContent() to retrieve * the spectral boundaries (2.0e-6 and 2.4e-6 here). */ std::string getFullContent() const ; ///< Get full content of element_ /** * If one of the FactoryMessenger::children_ is complex (for * instance the complete description of a Gyoto::Spectrum), it is * possible to initialize a new FactoryMessenger and call the * correct subcontractor: * \code * SmartPointer spectrum = NULL; * while (messenger->getNextParameter(name, content) { * if (name=="Spectrum") { * content = messenger->getAttribute("kind"); * FactoryMessenger* child = messenger->getChild(); * deliverable->spectrum( (*Spectrum::getSubcontractor(content))(child) ); * delete child; * } * } * \endcode * The child is allocated with new and must be deleted after use. */ FactoryMessenger * getChild() const ; ///< Get another FactoryMessenger instance initialized to current child /** * This function takes a relative path (e.g. ../foo/bar.data) and * transforms it into a full path (starting with "/"). It is not * guaranteed to be portable (we assume that the path separator is * "/" and that absolute paths start with "/"). * * \param relpath path relative to the directory where the XML file * on which the Factory works is located. * * \return fullpath at full path specification to the same point pon * the file-system. */ std::string fullPath(std::string relpath) ; ///< Transform path into full path specification ///////// SET METHODS, CALLED FROM FILLELEMENT /** * At most one Metric section may be present in a give Gyoto XML file. * * When an object's fillElement() method is called, if this object * is connected to a Metric, it should call metric() with this * Metric. Very often, the Metric will already have been set * previously. The Factory will check that all the objects in the * hierarchy are attached to the same Metric instance, and save this * instance only once. Trying to set the Metric to something else * than the already set Metric instance is an error condition. * * To make things clearer: Assume "scenery" is a fully filled * Scenery. scenery->fillElement(messenger) will call: * \code * messenger->metric(Scenery::gg_) * messenger->screen(Scenery::screen_) * messenger->astrobj(Scenery::obj_); * \endcode * * The Factory will then call screen_->fillElement(child_messenger) * and obj_->fillElement(child_messenger), each of which will also * call metric(). If the same Metric is connected to the Astrobj, * to the Screen and to the Scenery, all is well. Else, you have a * bug to fix. */ void metric(SmartPointer); ///< Set the Metric /** * Same as metric(), but for the Astrobj. */ void astrobj(SmartPointer); ///< Set the Astrobj /** * Same as metric(), but for the Screen. */ void screen(SmartPointer); ///< Set the Screen /** * Create child XML element of the form * \code * * \endcode * for instance when "name" is boolean (present or absent), or only * takes attributes (see FactoryMessenger::setAttribute()). As an * example, Astrobj::Generic::fillElement() uses * setParameter() to set either Opticallythin or OpticallyThick. */ void setParameter(std::string name); ///< Output parameter /** * Convert value to striing "svalue" and create an XML child element * of the form * \code * svalue * \endcode */ void setParameter(std::string name, double value); ///< Output parameter /** * Convert value to striing "svalue" and create an XML child element * of the form * \code * svalue * \endcode */ void setParameter(std::string name, long int value); ///< Output parameter /** * Convert value to striing "svalue" and create an XML child element * of the form * \code * svalue * \endcode */ void setParameter(std::string name, unsigned int value); ///< Output parameter /** * Convert value to striing "svalue" and create an XML child element * of the form * \code * svalue * \endcode */ void setParameter(std::string name, unsigned long value); ///< Output parameter /** * Convert value to string "svalue" and create an XML child element * of the form * \code * svalue * \endcode */ void setParameter(std::string name, int value); ///< Output parameter /** * Create an XML child element of the form * \code * value * \endcode */ void setParameter(std::string name, std::string value); ///< Output parameter /** * For instance: * \code * double val[4] = {1., 2., 3., 4.}; * messenger->setParameter("MyArray", val, 4); * \endcode * will result in something like this: * \code * 1.000000 2.000000 3.000000 4.000000 * \endcode * * The exact format is unspecified, determined at compile time, and * by default, unlike in the example above, outputs a large number * of digits for each double (about 20). * * \param name the name of the parameter * \param val[] an array of doubles * \param n number of cells in val[] * \param child (optional) if not NULL, a new FactoryMessenger is * created to access the new parameter element e.g. to set * attributes in it (using setSelfAttribute()). You then need to * delete the child. */ void setParameter(std::string name, double val[], size_t n, FactoryMessenger** child= NULL); ///< Output an array of parameters void setParameter(std::string name, std::vector const &val, FactoryMessenger** child= NULL); void setParameter(std::string name, std::vector const &val, FactoryMessenger** child= NULL); ///< Output a vector of parameters /** * For instance Spectrometer::fillElement() sets its "kind" * attribute somewhat like this: * \code * messenger->setSelfAttribute("kind", "wave"); * \endcode * to produce something like this: * \code * * \endcode */ void setSelfAttribute(std::string attrname, std::string value) ; ///< Set attribute in FactoryMessenger::element_ /** * See setSelfAttribute(std::string attrname, std::string value) */ void setSelfAttribute(std::string attrname, unsigned long value) ; ///< Set attribute in FactoryMessenger::element_ /** * See setSelfAttribute(std::string attrname, std::string value) */ void setSelfAttribute(std::string attrname, unsigned int value) ; ///< Set attribute in FactoryMessenger::element_ /** * See setSelfAttribute(std::string attrname, std::string value) */ void setSelfAttribute(std::string attrname, double value) ; ///< Set attribute in FactoryMessenger::element_ /** * Exceptionnaly, a class instance may be best described by setting * the entire content of the corresponding element than by setting a * bunch of "parameters". This is the case of the spectrometer, * which sets a couple of attributes and reserves the full content * for the spectral boundaries (see Spectrometer::fillElement()). */ void setFullContent(std::string value) ; ///< Low level, prefer setParameter() /** * To be used from fillElement() methods. For instance, the * Star::fillElement() method calls makeChild() to save the Star's * Spectrum and Opacity members somewhat like this: * \code * FactoryMessenger * child; * child = messenger-> makeChild("Spectrum"); * spectrum_ -> fillElement(child); * delete child; * child = messenger-> makeChild("Opacity"); * opacity_ -> fillElement(child); * delete child; * child=NULL; * \endcode * * The child messenger is allocated with new, you need to delete it * after use. */ FactoryMessenger* makeChild(std::string name); ///< Create child FactoryMessenger /** * \brief Parse string into array * * Parse at most max_tokens tokens from string src into * pre-allocated array dst. Returns the number of tokens actually * found (interpreted using atof). dst must be at least of size * max_tokens. */ static size_t parseArray(std::string src, double dst[], size_t max_tokens); /** * \brief Parse string into array * * Parse tokens from string src, returns them into a * std::vector. */ static std::vector parseArray(std::string src); /** * \brief Parse string into array * * Parse tokens from string src, returns them into a * std::vector. */ static std::vector parseArrayULong(std::string src); }; #endif #endif Gyoto-1.2.0/include/GyotoFixedStar.h000066400000000000000000000057731302352257300173400ustar00rootroot00000000000000/** * \file GyotoFixedStar.h * \brief Fixed (i.e. non-moving) star * * The target of ray-traced Gyoto::Photon */ /* Copyright 2011 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoFixedStar_H_ #define __GyotoFixedStar_H_ #include #include #include namespace Gyoto{ namespace Astrobj { class FixedStar; } } #include #include /** * \class Gyoto::Astrobj::FixedStar. * \brief Fixed (i.e. non-moving) star (or spherical blob) * * The target of ray-traced Gyoto::Photon */ class Gyoto::Astrobj::FixedStar : public Astrobj::UniformSphere { friend class Gyoto::SmartPointer; // Data : // ----- protected: double pos_[3];///< x, y, z or r, theta, phi bool rotating_; ///< Whether the blob is rotating at Metric::circularVelocity() // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; /** * Everything is undefined, call setCoordSys(), setPos() and * radius(). */ FixedStar();///< Default constructor FixedStar(const FixedStar& orig);///< Copy constructor virtual FixedStar* clone() const; FixedStar(SmartPointer gg, double StPsn[3], double radius); ///< Standard constructor virtual ~FixedStar() ; ///< Destructor public: // Accessors // --------- public: double const * getPos() const; ///< Get const pointer to pos_ void getPos(double* dst) const; ///< Get a copy of the pos_ array std::vector position() const; ///< Get vector copy of #pos_ void position(std::vector const&); ///< Set #pos_ from vector double rMax(); bool rotating() const ; void rotating(bool) ; using Generic::metric; virtual void metric(SmartPointer metric) ; using UniformSphere::radius; virtual void radius(double radius); ///< Set radius void setPos(const double[3]); ///< Set pos_ array // void setCoordSys(int); ///< set coordinate system // Outputs // ------- protected: virtual void getCartesian(double const * const dates, size_t const n_dates, double * const x, double * const y, double * const z, double * const xprime=NULL, double * const yprime=NULL, double * const zprime=NULL) ; virtual void getVelocity(double const pos[4], double vel[4]) ; }; #endif Gyoto-1.2.0/include/GyotoFunctors.h000066400000000000000000000042611302352257300172410ustar00rootroot00000000000000/** * \file GyotoFunctors.h * \brief Classes with an operator() method */ /* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoFunctors_H_ #define __GyotoFunctors_H_ namespace Gyoto { /** * \namespace Gyoto::Functor * \brief Classes with an operator() method */ namespace Functor { class Double_constDoubleArray; class Double_Double_const; } } /** * \brief A functor like double (func) (double const data[]) */ class Gyoto::Functor::Double_constDoubleArray { public: virtual ~Double_constDoubleArray(); /** * \brief The actual function */ virtual double operator()(double const data[]) = 0; }; /** * \brief A functor like double (func) (double) const */ class Gyoto::Functor::Double_Double_const { public: virtual ~Double_Double_const(); /** * \brief Exit status code of "various" methods (at least secant() !) */ int status; /** * \brief The actual function */ virtual double operator()(double) const = 0; /** * \brief Ridder's root-finding method applied on operator()() * \param from, to boundaries for root-searching * \return the root */ double ridders(double from, double to) const; /** * \brief Secant root-finding method applied on operator()() * * Sets status to * -0 in case of convergence * -1 if two distinct inputs evaluated to the same output * -2 if maximum number of iterations (20) reached * * \param from, to boundaries for root-finding * \return the root */ double secant(double from, double to); }; #endif Gyoto-1.2.0/include/GyotoHooks.h000066400000000000000000000071151302352257300165220ustar00rootroot00000000000000/** * \file GyotoHooks.h * \brief Tellers tell Listeners when they mutate * * A Listener can hook() to a Teller. The Teller will tell it when * it mutates using Listener::tell(), usually through the highter * lever Teller::tellListeners(). The Listener can later * unhook(). The Listener must therefore implement Listener::tell() * to react when it is told. */ /* Copyright 2012-2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoHooks_h #define __GyotoHooks_h /** * \namespace Gyoto::Hook * \brief Listeners attach to Tellers * * A Listener can hook() to a Teller. The Teller will tell it when * it mutates using Listener::tell(), usually through the highter * lever Teller::tellListeners(). The Listener can later * unhook(). The Listener must therefore implement Listener::tell() * to react when it is told. */ namespace Gyoto { namespace Hook { /** * \class Teller * \brief Listen to me and I'll warn you when I change * * Listen to me by calling my hook() method. */ class Teller; /** * \class Listener * \brief I might listen to a Teller * * Whisper to my ear by using my tell() method. */ class Listener; } } class Gyoto::Hook::Listener { friend class Gyoto::Hook::Teller; public: Listener(); ///< Constructor virtual ~Listener(); ///< Destructor protected: /** * \brief This is how a Teller tells * * A teller will basically call listener->tell(this). * * \param msg Teller* the Teller who is telling... Useful if the * Listener listens to several Tellers. */ virtual void tell(Gyoto::Hook::Teller *msg); }; class Gyoto::Hook::Teller { friend class Gyoto::Hook::Listener; private: /** * \class ListenerItem * \brief Private (undocumented) class to hold listeners_ */ class ListenerItem; /** * \brief Linked list of Listener items */ ListenerItem *listeners_; public: Teller(); ///< Default constructor Teller(const Teller &); ///< Copy constructor virtual ~Teller(); ///< Destructor /** * \brief Start listening * * Use from a Hook::Listener object method: * \code * teller->hook(this) * \endcode * where "this" is a Listener and "teller" is a Teller. * * Use unhook() later to stop listening to a given Teller. * * \param listener pointer to the new listener */ virtual void hook (Listener * listener); /** * \brief Stop listening * * Use from a Hook::Listener object method: * \code * teller->unhook(this) * \endcode * where "this" is a Listener, "teller" is a Teller, and "this" has * called teller->hook(this) previously. * * \param listener pointer to the listener */ virtual void unhook (Listener * listener); protected: /** * \brief Call tell() on each hooked Listener * * Whenever a Teller mutates, it should warn any Listener hooked to * it using tellListeners(). */ virtual void tellListeners(); }; #endif Gyoto-1.2.0/include/GyotoInflateStar.h000066400000000000000000000061201302352257300176460ustar00rootroot00000000000000/** * \file GyotoStar.h * \brief Mass-less, spherical object following a timelike geodesic * * A Gyoto::InflateStar evolves in a Gyoto::Metric following time-like * geodesics and is a Gyoto::Astrobj::Generic suitable for * ray-tracing. */ /* Copyright 2011, 2013 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoInflateStar_H_ #define __GyotoInflateStar_H_ namespace Gyoto{ namespace Astrobj { class InflateStar; } } #include #include #ifdef GYOTO_USE_XERCES #include #endif #include /** * \class Gyoto::Astrobj::InflateStar * \brief An Astrobj::Star with growing size * */ class Gyoto::Astrobj::InflateStar : public Gyoto::Astrobj::Star { friend class Gyoto::SmartPointer; // Data : // ----- private: double timeinflateinit_; ///< coordinate time of starting inflation double timeinflatestop_; ///< coordinate time of stopping inflation double radiusstop_; ///< maximum radius of star // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; // This object has a (non-inherited) Property list /** * Create InflateStar object with undefined initial conditions. One needs to * set the coordinate system, the metric, and the initial position * and velocity before integrating the orbit. setInititialCondition() * can be used for that. */ InflateStar(); ///< Default constructor InflateStar(const InflateStar& orig); ///< Copy constructor virtual InflateStar * clone() const ; virtual ~InflateStar() ; ///< Destructor GYOTO_OBJECT_ACCESSORS_UNIT(timeInflateInit); GYOTO_OBJECT_ACCESSORS_UNIT(timeInflateStop); GYOTO_OBJECT_ACCESSORS_UNIT(radiusStop); using Star::radius; virtual double radiusAt(double t) const; ///< Radius at a given time virtual double radiusAt(double t, const std::string &t_unit) const; ///< Radius at a given time virtual double radiusAt(double t, const std::string &t_unit, const std::string &r_unit) const; ///< Radius at a given time // Accessors // --------- public: virtual std::string className() const ; ///< "InflateStar" virtual std::string className_l() const ; ///< "inflate_star" public: virtual int Impact(Gyoto::Photon* ph, size_t index, Astrobj::Properties *data=NULL); virtual double emission(double nu_em, double dsem, double cp[8], double co[8]=NULL) const; }; #endif Gyoto-1.2.0/include/GyotoKerrBL.h000066400000000000000000000126531302352257300165630ustar00rootroot00000000000000/** * \file GyotoKerrBL.h * \brief KerrBL metric * */ /* Copyright 2011 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoKerrBL_H_ #define __GyotoKerrBL_H_ namespace Gyoto { namespace Metric { class KerrBL; } } #include #include #ifdef GYOTO_USE_XERCES #include #endif /// Default value for difftol_ #define GYOTO_KERRBL_DEFAULT_DIFFTOL 1e-2 /** * \class Gyoto::Metric::KerrBL * \brief Metric around a Kerr black-hole in Boyer-Lindquist coordinates */ class Gyoto::Metric::KerrBL : public Metric::Generic { friend class Gyoto::SmartPointer; // Data : // ----- protected: double spin_ ; ///< Angular momentum parameter double a2_ ; ///< spin_*spin_ double a3_ ; ///< a2_*spin_ double a4_ ; ///< a2_*a2_ /// Numerical tuning parameter /** * Small values yield more accurate integration at the expanse of * computing time. */ double difftol_; double rsink_; ///< numerical horizon double drhor_; ///< horizon security bool generic_integrator_; ///< which integrator to use // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; KerrBL(); ///< Default constructor virtual KerrBL * clone () const ; // Accessors // --------- public: void spin(const double spin); ///< Set spin double spin() const ; ///< Returns spin double difftol() const; ///< Get difftol_ void difftol(double t); ///< Set difftol_ void horizonSecurity(double drhor); double horizonSecurity() const; void genericIntegrator(bool); bool genericIntegrator() const ; virtual double getRms() const; virtual double getRmb() const; virtual double getSpecificAngularMomentum(double rr) const; virtual double getPotential(double const pos[4], double l_cst) const; void gmunu(double g[4][4], const double * pos) const ; double gmunu(const double * const x, int mu, int nu) const ; /** * \brief gμ,ν */ void gmunu_up(double gup[4][4], const double * pos) const ; double gmunu_up(const double * const x, int mu, int nu) const ; using Generic::christoffel; int christoffel(double dst[4][4][4], const double pos[4]) const ; double ScalarProd(const double pos[4], const double u1[4], const double u2[4]) const ; void nullifyCoord(double coord[8], double & tdot2) const; void nullifyCoord(double coord[8]) const; // friend std::ostream& operator<<(std::ostream& , const KerrBL& ) ; // std::ostream& print(std::ostream&) const ; virtual void circularVelocity(double const pos[4], double vel [4], double dir=1.) const ; public: virtual void MakeCoord(const double coordin[8], const double cst[5], double coordout[8]) const ; ///< Inverse function of MakeMomentumAndCst ///< Computes pr, ptheta, E and L from rdot, thetadot, phidot, tdot void MakeMomentum(const double coordin[8], const double cst[5], double coordout[8]) const; ///< Transforms from Boyer-Lindquist coordinates [t,r,th,phi,tdot,rdot,thdot,phidot] to [t,r,th,phi,pt,pr,pth,pphi] where pt,pr... are generalized momenta. protected: // outside the API /* RK4 : y=[r,theta,phi,t,pr,ptheta], cst=[a,E,L,Q,1/Q],dy/dtau=F(y,cst), h=proper time step. For KerrBL geodesic computation. */ int myrk4(Worldline * line, const double coordin[8], double h, double res[8]) const; //external-use RK4 public: int myrk4(const double coor[8], const double cst[5], double h, double res[8]) const;///< Internal-use RK4 proxy int myrk4_adaptive(Gyoto::Worldline* line, const double coor[8], double lastnorm, double normref, double coor1[8], double h0, double& h1, double h1max=GYOTO_DEFAULT_DELTA_MAX) const; ///< Internal-use adaptive RK4 proxy /** * \brief Ensure conservation of the constants of motion * * Tweak thetadot if necessary. */ private: int CheckCons(const double coor_init[8], const double cst[5], double coor_fin[8]) const; /** * \brief Normalize 4-velocity * * To 0 or -1. Changes rdot to allow norm conservation. */ void Normalize4v(double coord[8], const double part_mass) const; public: /** F function such as dy/dtau=F(y,cst) */ using Metric::Generic::diff; private: /** * \brief Used in RK4 proxies. */ virtual int diff(const double y[8], const double cst[5], double res[8]) const ; /** Integrator. Computes the evolution of y (initcond=y(0)). */ virtual void computeCst(const double coord[8], double cst[5]) const; public: void setParticleProperties(Worldline* line, const double* coord) const; virtual int isStopCondition(double const * const coord) const; void observerTetrad(std::string const obskind, double const pos[4], double fourvel[4], double screen1[4], double screen2[4], double screen3[4]) const; }; #endif Gyoto-1.2.0/include/GyotoKerrKS.h000066400000000000000000000060361302352257300166010ustar00rootroot00000000000000/** * \file GyotoKerrKS.h * \brief KerrKS metric * * Warning: this metric is seldom used and may be buggy. */ /* Copyright 2011-2015 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoKerrKS_H_ #define __GyotoKerrKS_H_ namespace Gyoto { namespace Metric { class KerrKS; } } #include #include #ifdef GYOTO_USE_XERCES #include #endif /** * \class Gyoto::Metric::KerrKS * \brief Metric around a Kerr black-hole in Kerr-Schild coordinates * Warning: this metric is seldom used and may be buggy. * * By default, uses the generic integrator * (Metric::Generic::myrk4()). Use \code \endcode * to use the specific integretor which is, as of writting, buggy. */ class Gyoto::Metric::KerrKS : public Metric::Generic { friend class Gyoto::SmartPointer; // Data : // ----- protected: double spin_ ; ///< Angular momentum parameter double a2_; ///< spin_*spin_ double rsink_; ///< numerical horizon double drhor_; ///< horizon security // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; KerrKS(); ///< Default constructor virtual KerrKS* clone () const; ///< Copy constructor // Mutators / assignment // --------------------- public: // default operator= is fine void spin(const double spin); ///< Set spin // Accessors // --------- public: double spin() const ; ///< Returns spin void horizonSecurity(double drhor); double horizonSecurity() const; double gmunu(const double x[4], int alpha, int beta) const ; void gmunu(double g[4][4], const double pos[4]) const; /** *\brief The inverse matrix of gmunu */ void gmunu_up(double gup[4][4], const double pos[4]) const; /** * \brief The derivatives of gmunu * * Used in the test suite */ void jacobian(double dst[4][4][4], const double x[4]) const ; using Generic::christoffel; int christoffel(double dst[4][4][4], const double x[4]) const ; int christoffel(double dst[4][4][4], const double pos[4], double gup[4][4], double jac[4][4][4]) const ; virtual void circularVelocity(double const pos[4], double vel [4], double dir=1.) const ; virtual int isStopCondition(double const * const coord) const; virtual int setParameter(std::string name, std::string content, std::string unit); }; #endif Gyoto-1.2.0/include/GyotoMetric.h000066400000000000000000000370121302352257300166610ustar00rootroot00000000000000/** * \file GyotoMetric.h * \brief Base class for metric description * * Classes which represent a metric (e.g. Gyoto::Kerr) should inherit * from Gyoto::Metric::Generic and implement all of the virtual * methods plus at least one of the gmunu methods and one of the * christoffel methods. * */ /* Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoMetric_H_ #define __GyotoMetric_H_ #include #include #include #include #include #include #include #include #include namespace Gyoto { namespace Metric { class Generic; /// A function to build instances of a specific Metric::Generic sub-class /** * This is a more specific version of the * SmartPointee::Subcontractor_t type. A Metric::Subcontrator_t is * called by the Gyoto::Factory to build an instance of the kind * of metric specified in an XML file (see Register()). The * Factory and Subcontractor_t function communicate through a * Gyoto::FactoryMessenger. */ typedef SmartPointer Subcontractor_t(FactoryMessenger*, std::vector const &); /** * \brief Subcontractor template * * Instead of reimplementing the wheel, your subcontractor can simply be * Gyoto::Metric::Subcontractor * * \tparam T Sub-class of Metric::Generic */ template SmartPointer Subcontractor (FactoryMessenger* fmp, std::vector const &plugins) { SmartPointer gg = new T(); gg -> plugins(plugins); #ifdef GYOTO_USE_XERCES if (fmp) gg -> setParameters(fmp); #endif return gg; } /// Query the Metric register /** * Query the Metric register to get the Metric::Subcontractor_t * correspondig to a given kind name. This function is normally * called only from the Factory. If plugin is specified, only a * subcontractor matching both name and plugin will be returned, * loading the plug-in if necessary. If plugin is the empty * string, then the first subcontractor matching name will be * returned, and the name of the plug-in it belongs to will be * returned in plugin upon output. * * \param[in] name e.g. "KerrBL" * \param[inout] plugin e.g. "stdplug". * \param[in] errmode int=0. If errmode==0, failure to find a * registered Metric by that name is an error. Else, simply * return NULL pointer in that case. * \return pointer to the corresponding subcontractor. */ Gyoto::Metric::Subcontractor_t* getSubcontractor(std::string name, std::vector &plugin, int errmode=0); /// The Metric register /** * Use the Metric::initRegister() once in your program to * initiliaze it, the Metric::Register() function to fill it, and * the Metric::getSubcontractor() function to query it. */ extern Register::Entry * Register_; /// Make a Metric kind known to the Factory /** * Register a new Metric::Generic sub-class so that the * Gyoto::Factory knows it. * * \param kind The kind name which identifies this object type in * an XML file, as in <Metric kind="name"> * * \param scp A pointer to the subcontractor, which will * communicate with the Gyoto::Factory to build an instance of * the class from its XML description */ void Register(std::string kind, Gyoto::Metric::Subcontractor_t* scp); /// Empty the Metric register. /** * This must be called once. It is called by * Gyoto::Register::init(). */ void initRegister(); } /* Documented elswhere */ class Worldline; } /** * \namespace Gyoto::Metric * \brief Access to metrics * * Objects which describe space-time geometry must inherit from the * Gyoto::Metric::Generic class. * * To be usable, a Metric::Generic sub-class should register a * Metric::Subcontractor_t function using the Metric::Register() * function. See also \ref writing_plugins_page . */ /** * \class Gyoto::Metric::Generic * \brief Base class for metrics * * Example: class Gyoto::Metric::KerrBL * * See Gyoto::Metric for an introduction. * */ class Gyoto::Metric::Generic : public Gyoto::SmartPointee, public Gyoto::Object, public Gyoto::Hook::Teller { friend class Gyoto::SmartPointer; private: double mass_; ///< Mass yielding geometrical unit (in kg). int coordkind_; ///< Kind of coordinates (cartesian-like, spherical-like, unspecified) protected: double delta_min_; ///< Minimum integration step for the adaptive integrator double delta_max_; ///< Maximum integration step for the adaptive integrator /** * \brief Numerical tuning parameter * * Ensure that delta (the numerical integration step) is never * larger than a fraction of the distance between the current * location and the center of the coordinate system. * * For investigations close to the event horizon, 0.5 is usually * fine. If high accuracy is needed long after deflection (weak * lensing), then this must be smaller. A good test is to look at a * MinDistance map for a FixedStar: it must be smooth. */ double delta_max_over_r_; bool keplerian_; ///< 1 if circularVelocity should return the Newtonian Keplerian velocity, in r^-3/2 protected: /** * \brief Set kind_ * * kind(const std::string) is protected because, for most Metrics, * it should not be changed in runtime. */ void kind(const std::string); ///< Set kind_ /** * \brief Set coordkind_ * * coordkind(int coordkind) is protected because, for most Metrics, * it should not be changed in runtime. */ void coordKind(int coordkind); ///< Set coordinate kind public: GYOTO_OBJECT; const std::string kind() const; ///< Get kind_ int getRefCount(); // Constructors - Destructor // ------------------------- Generic(const int coordkind, const std::string &name); ///< Constructor setting Generic::coordkind_ and kind_ Generic(Generic const &o); ///< Copy constructor virtual ~Generic() ; ///< Destructor // Mutators / assignment // --------------------- virtual Generic * clone() const ; ///< Virtual copy constructor void mass(const double); ///< Set mass used in unitLength() void mass(const double, const std::string &unit); ///< Set mass used in unitLength() // Accessors int coordKind() const; ///< Get coordinate kind double mass() const; ///< Get mass used in unitLength() double mass(const std::string &unit) const; ///< Get mass used in unitLength() /** * Metrics implementations are free to express lengths and distances * in whatever unit they see fit (presumably most often geometrical * units). This function returns this unit in SI (meters). */ double unitLength() const ; ///< M * G / c^2, M is in kg, unitLength in meters double unitLength(const std::string &unit) const ; ///< unitLength expressed in specified unit /** * Returns the marginally bound radius * Should be implemented in derived classes if useful * If called on the base class, returns an error */ virtual double getRmb() const; /** * Returns the marginally stable (ISCO) radius * Should be implemented in derived classes if useful * If called on the base class, returns an error */ virtual double getRms() const; /** * Returns the specific angular momentum l=-u_phi/u_t * Should be implemented in derived classes if useful * If called on the base class, returns an error */ virtual double getSpecificAngularMomentum(double rr) const; /** * Returns potential W=-ln(|u_t|) for a cst specific angular momentum l_cst * Should be implemented in derived classes if useful * If called on the base class, returns an error */ virtual double getPotential(double const pos[4], double l_cst) const; /** * Get delta_min_ */ double deltaMin() const; /** * Set delta_min_ */ void deltaMin(double h1); /** * Get delta_max_ */ double deltaMax() const; /** * Get delta max at a given position * * \param pos 4-position * \param[optional] delta_max_external external constraint on delta_max * \return the smallest value between delta_max_, * delta_max_external, and R*delta_max_over_r_ where R is pos[1] in * spherical coordinates and max(x1, x2, x3) in Cartesian * coordinates. */ virtual double deltaMax(double const pos[8], double delta_max_external) const; /** * Set delta_max_ */ void deltaMax(double h1); double deltaMaxOverR() const; ///< Get delta_max_over_r_ void deltaMaxOverR(double t); ///< Set delta_max_over_r_ bool keplerian() const; ///< Get keplerian_ void keplerian(bool); ///< Set keplerian_ virtual void cartesianVelocity(double const coord[8], double vel[3]); ///< Compute xprime, yprime and zprime from 8-coordinates /** * \param coord 4-position (geometrical units); * \param v 3-velocity dx1/dx0, dx2/dx0, dx3/dx0; * \return tdot = dx0/dtau. */ virtual double SysPrimeToTdot(const double coord[4], const double v[3]) const; ///μ,ν at point x */ virtual double gmunu(double const x[4], int mu, int nu) const; /** * \brief Metric coefficients * * The default implementation calls double gmunu(const double * x, int mu, int nu) const. * * \param[out] g 4x4 array to store the coeefficients * \param[in] x 4-position at which to compute the coefficients; * \return Metric coefficient gμ,ν at point x */ virtual void gmunu(double g[4][4], double const pos[4]) const; /** * \brief Chistoffel symbol * * Value of Christoffel symbol * Γαμν at point * (x1, x2, x3). */ virtual double christoffel(const double coord[4], const int alpha, const int mu, const int nu) const; /** * \brief Chistoffel symbol * * Value of Christoffel symbol * Γαμν at point * (x1, x2, x3). * * \return 1 on error, 0 otherwise */ virtual int christoffel(double dst[4][4][4], const double coord[4]) const ; /** * \brief RK4 integrator */ virtual int myrk4(Worldline * line, const double coord[8], double h, double res[8]) const; /** * \brief RK4 integrator with adaptive step */ virtual int myrk4_adaptive(Gyoto::Worldline* line, const double coord[8], double lastnorm, double normref, double coordnew[8], double h0, double& h1, double deltamax=GYOTO_DEFAULT_DELTA_MAX) const; /** * \brief Check whether integration should stop * * The integrating loop will ask this the Metric through this method * whether or not it is happy to continue the integration. * Typically, the Metric should answer 0 when everything is fine, 1 * when too close to the event horizon, inside the BH... * * \param coord 8-coordinate vector to check. */ virtual int isStopCondition(double const coord[8]) const; /** * \brief F function such as dy/dtau=F(y,cst) */ virtual int diff(const double y[8], double res[8]) const ; /** * \brief Set Metric-specific constants of motion. Used e.g. in KerrBL. */ virtual void setParticleProperties(Gyoto::Worldline* line, double const coord[8]) const; }; #endif Gyoto-1.2.0/include/GyotoMinkowski.h000066400000000000000000000042241302352257300174100ustar00rootroot00000000000000/** * \file GyotoMinkowski.h * \brief The Minkowski flat-space metric * * Use <Cartesian> or </Spherical> to select the coordinate system * kind. */ /* Copyright 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoMinkowski_H_ #define __GyotoMinkowski_H_ #include namespace Gyoto { namespace Metric { class Minkowski; } } /** * \class Gyoto::Metric::Minkowski * \brief The Minkowski flat-space metric * * Use <Cartesian> or </Spherical> to select the coordinate system * kind. */ class Gyoto::Metric::Minkowski : public Gyoto::Metric::Generic { friend class Gyoto::SmartPointer; private: public: // Those are mere wrappers arround Generic::coordKind(), useful for // declaring a boolen property using the macro GYOTO_PROPERTY_BOOL: void spherical(bool); bool spherical() const; // This is the bare minimum of what a Metric class must implement: GYOTO_OBJECT; Minkowski(); virtual Minkowski* clone() const ; void gmunu(double g[4][4], const double x[4]) const ; int christoffel(double dst[4][4][4], const double x[4]) const ; // Those two are implemented as examples. double gmunu(const double x[4], int mu, int nu) const ; double christoffel(const double coord[4], const int alpha, const int mu, const int nu) const ; void observerTetrad(std::string const obskind, double const pos[4], double fourvel[4], double screen1[4], double screen2[4], double screen3[4]) const; }; #endif Gyoto-1.2.0/include/GyotoNumericalMetricLorene.h000066400000000000000000000176371302352257300217010ustar00rootroot00000000000000/** * \file GyotoNumericalMetricLorene.h * \brief Base class for 3+1 numerical metrics computed by LORENE * * */ /* * Copyright (c) 2014-2016 Frederic Vincent, Thibaut Paumard * * */ #ifndef __GyotoNumericalMetricLoreneMetric_H_ #define __GyotoNumericalMetricLoreneMetric_H_ #include #include namespace Gyoto { namespace Metric { class NumericalMetricLorene; } class FactoryMessenger; } // Forward declarations of Lorene classes namespace Lorene { class Scalar; class Vector; class Sym_tensor; class Valeur; } #include #include #include #ifdef GYOTO_USE_XERCES #include #endif /** * \class Gyoto::NumericalMetricLorene * \brief Class for 3+1 numerical metrics computed by LORENE. * This class can handle (so far) any kind of LORENE metric, * stars, collapsing stars, Kerr, boson star e.g. */ class Gyoto::Metric::NumericalMetricLorene : public Gyoto::Metric::Generic { friend class Gyoto::SmartPointer; private: char* filename_; ///< Lorene .d data file(s) path bool mapet_; ///< Kind of Lorene mapping: 'false' for Map_af, 'true' for Map_et bool bosonstarcircular_; ///< 1 to implement the circular velocity of a boson star int has_surface_; ///< 1 if the metric source has a surface int specify_marginalorbits_; ///< 1 if marginal orbits are specified in file double horizon_; ///< Value of horizon (or any innermost limit) double r_refine_; ///< Refine integration below this r double h0_refine_; ///< Imposed integration step for refined integration int refine_; ///< 1 if refined integration needed double initial_time_; ///< Time at which (first) metric is given Lorene::Scalar** lapse_tab_; Lorene::Vector** shift_tab_; Lorene::Sym_tensor** gamcov_tab_; Lorene::Sym_tensor** gamcon_tab_; Lorene::Sym_tensor** kij_tab_; double* times_; ///< Coordinate times at which metrics are given int nb_times_; ///< Nb of time slices Lorene::Valeur** nssurf_tab_; ///< Metric source (e.g. star) surface (if any) Lorene::Vector** vsurf_tab_; ///< 4-velocity at surface (if any) Lorene::Scalar** lorentz_tab_; ///< Lorentz factor at surface (if any) Lorene::Valeur** hor_tab_; ///< Apparent horizon (if any) double risco_; ///< ISCO coordinate radius double rico_; ///< Innermost circular orbit coordinate radius double rmb_; ///< Marginally bound orbit coordinate radius void free(); ///< deallocate memory public: GYOTO_OBJECT; GYOTO_OBJECT_THREAD_SAFETY; NumericalMetricLorene(); ///< Constructor NumericalMetricLorene(const NumericalMetricLorene&); ///< Copy constructor virtual NumericalMetricLorene* clone() const ; virtual ~NumericalMetricLorene() ; ///< Destructor /** * Access functions to get or set private attributes */ virtual void setMetricSource(); void directory(std::string const &dir) ; std::string directory() const ; double initialTime() const ; void initialTime(double t0); double horizon() const ; void horizon(double t0); double rico() const ; void rico(double r0); bool hasSurface() const; void hasSurface(bool s); bool bosonstarcircular() const; void bosonstarcircular(bool); bool specifyMarginalOrbits() const; void specifyMarginalOrbits(bool s); bool mapEt() const; void mapEt(bool s); std::vector refineIntegStep() const; void refineIntegStep(std::vector const&); Lorene::Vector** getShift_tab() const; Lorene::Scalar** getLapse_tab() const; Lorene::Sym_tensor** getGamcon_tab() const; double* getTimes() const; int getNbtimes() const; Lorene::Valeur** getNssurf_tab() const; Lorene::Vector** getVsurf_tab() const; Lorene::Scalar** getLorentz_tab() const; Lorene::Valeur** getHor_tab() const; double getRms() const; double getRmb() const; void setLapse_tab(Lorene::Scalar* lapse, int ii); void setShift_tab(Lorene::Vector* shift, int ii); void setGamcov_tab(Lorene::Sym_tensor* gamcov, int ii); void setGamcon_tab(Lorene::Sym_tensor* gamcon, int ii); void setKij_tab(Lorene::Sym_tensor* kij, int ii); void setTimes(double time,int ii); virtual double getSpecificAngularMomentum(double rr) const; virtual double getPotential(double const pos[4], double l_cst) const; /** * Runge-Kutta integrator at order 4 */ virtual int myrk4(double tt, const double coord[7], double h, double res[7]) const; virtual int myrk4(Worldline* line, const double coord[8], double h, double res[8]) const; /** * Adaptive Runge-Kutta */ int myrk4_adaptive(Gyoto::Worldline* line, const double coord[8], double lastnorm, double normref, double coordnew[8], double h0, double& h1, double h1max) const; int myrk4_adaptive(double tt, const double coor[7], double lastnorm, double normref, double coornew[7], const double cst[2], double& tdot_used, double h0, double& h1, double& hused, double h1max) const; ///< With energy integration also, coor=[E,r,th,ph,dE/dt,Vr,Vth,Vph] /** * Reverse spatial vector if going through 0, without horizon */ void reverseR(double tt, double coord[7]) const; /** * Compute lapse and shift at given coordinates */ void computeNBeta(const double coord[4],double &NN,double beta[3]) const;//Compute lapse and shift at coord /** * 4-Metric */ using Generic::gmunu; double gmunu(const double x[4], int mu, int nu) const ; double gmunu(const double x[3], int indice_time, int mu, int nu) const ; /** * \brief r derivative of contravariant 4-metric */ double gmunu_up_dr(const double x[4], int mu, int nu) const ; double gmunu_up_dr(const double x[3], int indice_time, int mu, int nu) const ; double christoffel(const double coord[4], const int alpha, const int mu, const int nu) const ; double christoffel(const double coord[4], const int alpha, const int mu, const int nu, const int indice_time) const; virtual int christoffel(double dst[4][4][4], const double coord[4]) const; int christoffel(double dst[4][4][4], const double coord[4], const int indice_time) const; /** * \brief 3-Christoffels */ double christoffel3(const double coord[3], const int indice_time, const int ii, const int jj, const int kk) const ; void setParticleProperties(Worldline * line, const double coord[8]) const; /** * \brief 3rd order interpolation routine * * Interpolation at order 3 at point tt, the considered function * taking the values "values" at time indices "indices". * */ double Interpol3rdOrder(double tt, int indice_time, double values[4]) const; /** * \brief Computation of horizon value */ double computeHorizon(const double* pos) const; double computeHorizon(const double* pos, int indice) const; /** * F function such as d(coord)/d(tau)=F(coord) */ //using Generic::diff; virtual int diff(const double coord[8], double res[8]) const; int diff(double tt, const double y[7], double res[7]) const ; virtual int diff(const double y[7], double res[7], int indice_time) const ; /** * \brief Yield circular velocity at a given position * * Give the velocity of a massive particle in circular orbit at the * given position projected onto the equatorial plane. Such a * velocity may not exist everywhere (or anywhere) for a given * metric. This method is intended to be used by Astrobj classes * such as Torus or ThinDisk. * * This circular velocity should be implemented for all specific * numerical metric used. * * If bosonstarcircular_ is set to true, this method returns the * boson star circular velocity. * * \param coor input: position, * \param vel output: velocity, * \param dir 1 for corotating, -1 for counterrotating. */ void circularVelocity(double const coor[4], double vel[3], double dir) const ; void circularVelocity(double const coor[4], double vel[3], double dir, int indice_time) const ; }; #endif Gyoto-1.2.0/include/GyotoObject.h000066400000000000000000000357241302352257300166540ustar00rootroot00000000000000/** * \file GyotoObject.h * \brief Introspectable objects */ /* Copyright 2014-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoObject_H_ #define __GyotoObject_H_ #include "GyotoConfig.h" #include "GyotoSmartPointer.h" #include #include namespace Gyoto { class Object; class Property; class Value; class FactoryMessenger; } /// Declare a pair of accessors to string member in a class declaration /** * The accessors must also be defined in the .C file * * \param method name of the accessors. */ #define GYOTO_OBJECT_ACCESSORS_STRING(method) \ virtual void method(std::string const&); \ virtual std::string method() const; /// Declare a pair of accessors to scalar member in a class declaration /** * The accessors must also be defined in the .C file, which can be * done using #GYOTO_PROPERTY_ACCESSORS * * \param type data type of the memebr beeing accessed. Any scalar * type (double, long, size_t, SmartPointer etc). * \param method name of the accessors. */ #define GYOTO_OBJECT_ACCESSORS(type, method) \ virtual void method(type); \ virtual type method() const; /// Declare a quadruplet of accessors to double member that supports unit /** * The accessors must also be defined in the .C file. * * \param method name of the accessors. */ #define GYOTO_OBJECT_ACCESSORS_UNIT(method) \ GYOTO_OBJECT_ACCESSORS(double, method) \ virtual void method(double, std::string const &); \ virtual double method(std::string const &) const; /// Declare class::properties and class::getProperties() /** * Any derived class that does define Properties (i.e. the macro * GYOTO_PROPERTY_START() is called somewhere in the .C file) must * call the #GYOTO_OBJECT macro in a "public:" section of the class * declaration. Else, the property list is inherited from the direct * parent, and calling GYOTO_PROPERTY_START() in the .C file leads to * a compile-time error. */ #define GYOTO_OBJECT \ static Property const properties[]; \ virtual Property const * getProperties() const; \ static const std::string builtinPluginValue; \ virtual void plugins(std::vector const & plugname); \ virtual std::vector plugins() const /// Declare virtual bool isThreadSafe() const /** * Use this to declare that the object is not (or not always) thread * safe. The corresponding definition of isThreadSafe() must exist. If * the object is always thread unsafe (e.g. Lorene Metrics of Python * based objects), you can simply use GYOTO_PROPERTY_THREAD_SAFETY in * the corresponding .C file. */ #define GYOTO_OBJECT_THREAD_SAFETY \ virtual bool isThreadSafe() const /// Object with properties /** * The Object API allows declaring a list of Properties that can be * set and retrieved using a common, text-based interface. This * interface simplifies a lot how to read and write XML, as well as * writing bindings for interpreted langages (e.g. the Yorick * interface). * * In fact, any class member that has an interface implemented as a * Property can be readily read and written from/to XML as well as * from the Yorick plug-in, without the need for any additional code. * * To declare a Property list: * 1. declare (in the class declaration, .h file) and define (.C * file) the pair or quadruplet of accessors for your Property * (see Property class documentation; * 2. call the #GYOTO_OBJECT macro in in a public section of the * class declaration (in the .h file): * \code * class A: public Object { * public: * GYOTO_OBJECT; * A(); * virtual ~A(); * ... * }; * \endcode * 3. call the various GYOTO_PROPERTY_* macros in the corresponding * .C file (see the documentation of the Property class). * * It is possible to get a Property by name (Assume \a A is a class * deriving from Object): * \code * A myobj(); * Property const *prop=NULL; * prop = myobj.property("PropertyName"); * if (!prop) throwError("No Property by that name in this object"); * \endcode * It then becomes possible to set or get the Property from or to a * Value: * \code * myobj.set(*prop, size_t(12)); * size_t val = myobj.get(*prop); * \endcode * Of course the type of the Value instance and of the Property * instance must match. Refer to the documentation of these to classes * for details. * */ class Gyoto::Object { protected: /// The "kind" that is output in the XML entity /** * E.g. for an Astrobj, fillElement() will ensure * \code * ... * \endcode * is written. */ std::string kind_; /// The plug-ins that needs to be loaded to access this instance's class /** * E.g. for an Astrobj, fillElement() will ensure * \code * ... * \endcode * is written. */ std::vector plugins_; public: /// Whether this class is thread-safe /** * Return True if this object is thread-safe, i.e. if an instance * and its clone can be used in parallel threads (in the context of * Scenery::raytrace()). Known objects which are not thread-safe * include Lorene metrics and everything from the Python plug-in. * * The default implementation considers that the class itself is * thread safe and recurses into the declared properties to check * whether they are safe too. Classes that abide to the * Object/Property paradigm and are themselves thread-safe have * nothing special to do. * * Objects that clone children in their copy constructor that are * not declared as properties must take these children into * account. * * Classes that are never thread-safe must declare it. It acn be * easily done using GYOTO_OBJECT_THREAD_SAFETY in the class * declaration and GYOTO_PROPERTY_THREAD_UNSAFE in the class * definition. */ virtual bool isThreadSafe() const; GYOTO_OBJECT; /** \fn virtual Property const * Object::getProperties() const * \brief Get list of properties * * This method is declared automatically by the #GYOTO_OBJECT macro * and defined automatically by the #GYOTO_PROPERTY_END macro. */ /** \property static Property const properties[] * \brief Property list * * This static member is declared automatically by the #GYOTO_OBJECT * macro and defined automatically by the #GYOTO_PROPERTY_START, * #GYOTO_PROPERTY_END and GYOTO_PROPERTY_* macros. * * The list of properties is implemented as a static array of * Property instances. The last item in a Property of type * Property::empty_t, which evaluates to false, so the list can be * considered to be NULL-terminated (it is actually rather * false-terminated). This empty_t last item can be a link to * another Property list: for instance, the last item in * Gyoto::Astrobj::Standard::properties is a link to * Gyoto::Astrobj::Generic::properties. */ /// Constructor setting kind Object (std::string const &kind) ; /// Default constructor Object () ; /// Deep copy constructor Object (Object const &orig) ; /// Virtual destructor virtual ~Object(); /// Set Value of a Property void set(Property const &p, Value val); /// Set Value (expressed in unit) of a Property void set(Property const &p, Value val, std::string const &unit); /// Set Value of a Property void set(std::string const &pname, Value val); /// Set Value (expressed in unit) of a Property void set(std::string const &pname, Value val, std::string const &unit); /// Get Value of a Property Value get(Property const &p) const; /// Get Value of a Property Value get(std::string const &pname) const; /// Get Value of a Property, converted to unit Value get(Property const &p, std::string const &unit) const; /// Get Value of a Property, converted to unit Value get(std::string const &pname, std::string const &unit) const; /// Find property by name /** * Look into the Property list for a Property whose \a name (or * \a name_false, for a boolean Property) is \a pname. Return a const * pointer to the first such property found, or NULL if none is * found. */ Property const * property(std::string const pname) const; #ifdef GYOTO_USE_XERCES /// Output a single Property to XML /** * The base implementation decides what to do based on the \a * p.type. The format matches how setParameters() an setParameter() * would interpret the XML descition. * * Overriding this method should be avoided, but makes sense in some * cases (for instance Screen::fillProperty() selects a different * unit for \a Distance based on its magnitude, so that stellar * sizes are expressed in solar radii while smaller sizes can be * expressed in meters and larger sizes in parsecs). * * Overriding implementation should fall-back on calling the * implementation in the direct parent class: * \code * class A: public Object {}; * class B: public A { * using B::setParameter; * virtual void fillProperty(Gyoto::FactoryMessenger *fmp, * Property const &p) const ; * }; * void B::fillProperty(Gyoto::FactoryMessenger *fmp, * Property const &p) const { * if (name=="Duff") fmp->doSomething(); * else A::fillProperty(fmp, p); * } * \endcode */ virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const ; /// Fill the XML element for this Object /** * The base implementation simply calls fillProperty() for each * Property defined for the Object. * * Derived classes should avoid overriding fillElement(). It may * make sense occasionally, e.g. to make sure that the metric is * output first. * * To customize how a given Property is rendered, it is better to * override fillProperty(). * * If this method is overridden, the implementation should in * general call fillElement() on the direct base. */ virtual void fillElement(Gyoto::FactoryMessenger *fmp) const ; /// \brief Main loop for parsing Properties from XML description /** * This function queries the FactoryMessenger for elements to parse, * and tries to matche each element to a Property to set it * accordingly. * * Any class that tries to be buildable from XML must supply a * subcontractor (for base classes such as Metric, Astrobj, Spectrum * and Spectrometer, it is done as a template that must be * specialized for each class). * * This subcontractor typically looks somewhat like this: \code SmartPointer Gyoto::Metric::MyKind::Subcontractor(FactoryMessenger* fmp) { SmartPointer gg = new MyKind(); gg -> setParameters(fmp); return gg; } \endcode * * Although this is discouraged, it is possible to override the * following functions to customize how XML entities are parsed: * - setParameters() if low-level access to the * FactoryMessenger is required; * - setParameter(std::string name, * std::string content, * std::string unit) * to interpret an entity that does not match a Property * (e.g. alternative name); * - setParameter(Gyoto::Property const &p, * std::string const &name, * std::string const &content, * std::string const &unit) * to change how a Property is interpreted. */ virtual void setParameters(Gyoto::FactoryMessenger *fmp) ; #endif /** * \brief Set parameter by name * * This function is used when parsing an XML description, if no * Property of this \a name is found. Overriding implementation should * fall-back on calling the direct's parent implementation: * * \code * class A: public Object {}; * class B: public A { * using B::setParameter; * virtual int setParameter(std::string name, * std::string content, * std::string unit); * }; * int B::setParameter(std::string name, * std::string content, * std::string unit) { * if (name=="Duff") doSomething(content, unit); * else return A::setParameter(name, content, unit); * return 0; // name was known * } * \endcode * * \param name XML name of the parameter (XML entity). This may have * a path component, e.g. "Astrobj::Radius", in which case a * property named "Astrobj" will be sought in the current * object, and setParameter will be called recusrively on * this Astrobj with Radius as name. * \param content string representation of the value * \param unit string representation of the unit * \return 0 if this parameter is known, 1 if it is not. */ virtual int setParameter(std::string name, std::string content, std::string unit); /** * \brief Set parameter by Property (and name) * * This function is used when parsing an XML description, if * Property (\a p) of this \a name is found (i.e. either \a p.name or * \a p.name_false is equal to \a name). Implementation should fall-back * on calling the direct's parent implementation: * * \code * class A: public Object {}; * class B: public A { * using B::setParameter; * virtual void setParameter(Gyoto::Property const &p, * std::string name, * std::string content, * std::string unit); * }; * void B::setParameter(Gyoto::Property const &p, * std::string name, * std::string content, * std::string unit) { * if (name=="Duff") doSomething(content, unit); * else A::setParameter(p, name, content, unit); * } * \endcode * * \param p Property that matches \a name (\a p.name == \a name or * \a p.name_false == \a name) * \param name XML name of the parameter (XML entity) * \param content string representation of the value * \param unit string representation of the unit */ virtual void setParameter(Gyoto::Property const &p, std::string const &name, std::string const &content, std::string const &unit); /** * \brief Format desrciption for a property * * Returns a string containing the name(s) and type of the * property, as well as whether it supports unit. */ std::string describeProperty(Gyoto::Property const &p) const ; /** * \brief Print (to stdout) some help on this class * * Describe all properties that this instance supports. */ void help() const ; }; #endif Gyoto-1.2.0/include/GyotoOscilTorus.h000066400000000000000000000062411302352257300175440ustar00rootroot00000000000000/** * \file GyotoOscilTorus.h * \brief Slender torus subject to realistic Blaes 2006 oscillation modes. * * The target of ray-traced Gyoto::Photon */ /* * Copyright (c) 2013 Frederic Vincent * * */ #ifndef __OscilTorus_h #define __OscilTorus_h #include #include #include namespace Gyoto { namespace Astrobj { class OscilTorus; }; class FactoryMessenger; namespace Spectrum { class Generic; } }; class Gyoto::Astrobj::OscilTorus : public Gyoto::Astrobj::Standard, public Hook::Listener { friend class Gyoto::SmartPointer; private: // Members corresponding to properties: /** * \brief Large Radius * * Distance from the center of the coordinate system to the center * of the torus tube. The (square of the) radius of a vertical * cross-section is stored in critical_value_. */ double c_; unsigned long mode_; double polycst_; ///< Polytropic constant double polyindex_; ///< Polytropic index double central_density_; ///< Central density enum perturb_t {Radial=1, Vertical=2, X=3, Plus=4, Breathing=5}; perturb_t perturb_kind_; std::string emitting_area_; ///< Only for mode=0, file containing time series of cross section area double perturb_intens_; ///< Perturbation intensity // Cached values: SmartPointer kerrbl_; std::vector tt_; std::vector area_; // tt_ and area_ contain area of cross section at time tt size_t nbt_; ///< numberof tt_ int with_cross_; ///< is 1 if cross section data are given double sigma_; ///< perturbation rescaled pulsation double alpha_; ///< perturbation normalization (oder-unity) double w1_; ///< factors appearing in perturbed surf func double w2_; double omr2_; ///< epicyclic freq at torus center double omth2_; double Omegac_; ///< Omega and l at torus center double lc_; double g_rr_; ///< metric coef at torus center double g_thth_; bool hold_; public: GYOTO_OBJECT; OscilTorus(); OscilTorus(const OscilTorus &o); virtual ~OscilTorus(); virtual OscilTorus * clone() const ; GYOTO_OBJECT_ACCESSORS_UNIT(largeRadius); GYOTO_OBJECT_ACCESSORS(unsigned long, mode); GYOTO_OBJECT_ACCESSORS(double, polyCst); GYOTO_OBJECT_ACCESSORS(double, polyIndex); GYOTO_OBJECT_ACCESSORS(double, centralDensity); GYOTO_OBJECT_ACCESSORS_STRING(perturbKind); GYOTO_OBJECT_ACCESSORS(double, perturbIntens); GYOTO_OBJECT_ACCESSORS_STRING(emittingArea); using Generic::metric; virtual void metric(Gyoto::SmartPointer); virtual double operator()(double const coord[4]) ; virtual void getVelocity(double const pos[4], double vel[4]) ; double emission(double nuem,double,double*,double*) const; #ifdef GYOTO_USE_XERCES virtual void setParameters(Gyoto::FactoryMessenger *fmp) ; #endif virtual void updateCachedValues(); void computeXbYb(const double * pos, double & xb, double & yb) ; // Hook::Listener API // public: /** * \brief Update cached values * * Calls updateCachedValues(). * * See Hook::Listener::tell() */ virtual void tell(Gyoto::Hook::Teller *msg); }; #endif Gyoto-1.2.0/include/GyotoPageThorneDisk.h000066400000000000000000000112061302352257300203020ustar00rootroot00000000000000/** * \file GyotoPageThorneDisk.h * \brief A geometrically thin, optically thick disk * * This class describes a disk contained in the z=0 (equatorial) * plane, extending from r=r_ISCO to r=infinity. The flux emitted * at radius r is given by Page & Thorne (1974, ApJ 191:499, * Eqs. 11b, 14, 15). * * Only bolometric flux is implemented (as quantity User4), no * spectral resolution. */ /* Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoPageThorneDisk_H_ #define __GyotoPageThorneDisk_H_ #include #include #include namespace Gyoto{ namespace Astrobj { class PageThorneDisk; } } //#include #include #include /** * \class Gyoto::Astrobj::PageThorneDisk * \brief Geometrically thin disk in Kerr metric * * This class describes a disk contained in the z=0 (equatorial) * plane, extending from r=r_ISCO to r=infinity. The flux emitted * at radius r is given by Page & Thorne (1974, ApJ 191:499, * Eqs. 11b, 14, 15). * * The metric must be either KerrBL or KerrKS. Emission, Spectrum * and BinSpectrum are not provide, the only * intensity provided is provided, as quantity User4 and it is the * default quantity returned if nothing is requested. The other * quantities implemented in ThinDisk are also provided. * */ class Gyoto::Astrobj::PageThorneDisk : public Astrobj::ThinDisk, public Hook::Listener { friend class Gyoto::SmartPointer; private: double aa_; ///< Generic::gg_ spin parameter, monitored by tell() double aa2_; ///< aa_2 double x0_; ///< Value cached for bolometricEmission() double x1_; ///< Value cached for bolometricEmission() double x2_; ///< Value cached for bolometricEmission() double x3_; ///< Value cached for bolometricEmission() int blackbody_; ///< Flag for computing BB flux (for spectra) double mdot_; ///< accretion rate (for BB spectrum computation) bool uniflux_; ///< Flag for uniform flux = 1 SmartPointer spectrumBB_; ///< disk black body ///< emission law // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; GYOTO_OBJECT_THREAD_SAFETY; PageThorneDisk(); ///< Standard constructor PageThorneDisk(const PageThorneDisk& ) ;///< Copy constructor virtual PageThorneDisk* clone () const; ///< Cloner virtual ~PageThorneDisk() ; ///< Destructor // Accessors // --------- public: using ThinDisk::metric; virtual void metric(SmartPointer); ///< Set metric, checking that it is either KerrBL or KerrKS /// Set #mdot_ to v, and #blackbody_ to true void BlackbodyMdot(double v); double BlackbodyMdot() const; void blackBody(bool t) ; bool blackBody() const ; void uniFlux(bool t) ; bool uniFlux() const ; private: virtual void updateSpin() ; ///< Get spin from metric, which must be KerrBL or KerrKS public: using ThinDisk::emission; /** * \brief Not implemented * Throws a Gyoto::Error */ virtual double emission(double nu_em, double dsem, double c_ph[8], double c_obj[8]=NULL) const; /** * \brief Bolometric emission * * Similar to Generic::emission(), but bolometric. */ virtual double bolometricEmission(double nuem, double dsem, double c_obj[8]) const; /** * \brief * processHitQuantities fills the requested data in Impact. For * PageThorneDisk, only fill User4, which corresponds to bolometric * intensity. */ virtual void processHitQuantities(Photon* ph, double* coord_ph_hit, double* coord_obj_hit, double dt, Astrobj::Properties* data) const; Gyoto::Quantity_t getDefaultQuantities(); // Hook::Listener API // public: /** * \brief Update PageThorneDisk::aa_ * * Calls updateSpin(). * * See Hook::Listener::tell() */ virtual void tell(Gyoto::Hook::Teller *msg); }; #endif Gyoto-1.2.0/include/GyotoPatternDisk.h000066400000000000000000000223471302352257300176730ustar00rootroot00000000000000/** * \file GyotoPatternDisk.h * \brief A geometrically thin, optically thick disk * * The target of ray-traced Gyoto::Photon */ /* Copyright 2011-2015 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoPatternDisk_H_ #define __GyotoPatternDisk_H_ #include #include #include namespace Gyoto{ namespace Astrobj { class PatternDisk; } } //#include #include /** * \class Gyoto::Astrobj::PatternDisk * \brief Geometrically thin disk read from FITS file * * This class describes a disk contained in the z=0 (equatorial) * plane, extending from r=r_ISCO to r=infinity. The flux emitted * at radius r and longitude phi at frequency nu is given in a FITS * file. * */ class Gyoto::Astrobj::PatternDisk : public Astrobj::ThinDisk { friend class Gyoto::SmartPointer; private: std::string filename_; ///< Optional FITS file name containing the arrays /** * An array of dimensionality double[nr_][nphi_][nnu_]. In FITS * format, the first dimension is nu, the second phi, and the third * r. */ double * emission_; ///< Iν(ν, r, φ) double * opacity_; ///< Same dimenstions as emission, or NULL /** * An array of dimensionality double[nr_][nphi_][2]. In FITS format, * the second dimension is phi, and the third r. The first plane in * the first FITS dimention is dφ/dt, the second dr/dt. */ double * velocity_; ///< velocity(r, φ) /** * In case of adaptive grid. */ double * radius_; ///< Radius vector /** * XML element: <Omega>. * FITS keyword: HIERARCH GYOTO PatternDisk Omega */ double Omega_; ///< Pattern angular velocity /** * XML element: <T0>. * FITS keyword: HIERARCH GYOTO PatternDisk t0 */ double t0_; ///< Date for which i=0 corresponds to phi=0 double dnu_; ///< Frequency scale of PatternDisk::emission_ in Hz double nu0_; ///< Lowest frequency provided in PatternDisk::emission_ in Hz size_t nnu_; ///< Number of frequencies provided in PatternDisk::emission_ double dphi_; ///< δφ between two grid columns double phimin_;///< Minimum φ in grid size_t nphi_; ///< Grid size in the φ direction double phimax_; ///< Maximum φ in grid /** * XML elment: <RepeatPhi>. * FITS keyword: HIERARCH GYOTO PatternDisk RepeatPhi */ size_t repeat_phi_; ///< Number of times the pattern should be repeated to cover [0, 2Π] double dr_; ///< Radius step size_t nr_; ///< Number of rows in the patternGrid size in the r direction // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; // fillProperty is overridden to remove leading "!" from FITS filename void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const; PatternDisk(); ///< Standard constructor PatternDisk(const PatternDisk& ) ;///< Copy constructor virtual PatternDisk* clone () const; ///< Cloner virtual ~PatternDisk() ; ///< Destructor // Accessors // --------- public: using ThinDisk::innerRadius; virtual void innerRadius(double); using ThinDisk::outerRadius; virtual void outerRadius(double); /** * Unit: radians per geometrical unit time. */ virtual void patternVelocity(double); ///< Set PatternDisk::Omega_ virtual double patternVelocity() const; ///< Get PatternDisk::Omega_ virtual void file(std::string const &f); virtual std::string file() const ; #ifdef GYOTO_USE_CFITSIO /// Read parameters and arrays from FITS file virtual void fitsRead(std::string filename_); /// Write parameters and arrays to FITS file virtual void fitsWrite(std::string filename_); #endif /// Set PatternDisk::emission_ /** * The pointer is copied directly, not the array content. * * This is a low-level function. Beware that: * - previously allocated array will not be freed automatically; * - array attached when the destructor is called will be freed. */ void setEmission(double * pattern); /// Set PatternDisk::velocity__ /** * The pointer is copied directly, not the array content. * * This is a low-level function. Beware that: * - previously allocated array will not be freed automatically; * - array attached when the destructor is called will be freed. */ void setVelocity(double * pattern); /// Set PatternDisk::radius_ /** * The pointer is copied directly, not the array content. * * This is a low-level function. Beware that: * - previously allocated array will not be freed automatically; * - array attached when the destructor is called will be freed. */ void radius(double * pattern); /// Set PatternDisk::emission_ /** * PatternDisk::emission_ is freed if not NULL, reallocated, and * pattern is copied into emission_. * * If PatternDisk::opacity_, PatternDisk::velocity_ or * PatternDisk::radius_ have been set previously with mismatching * sizes, they are deallocated too. * * Finally, PatternDisk::nnu_, PatternDisk::nphi_, and * PatternDisk::nr_ are set according to naxes. * * \param pattern Array to copy as emission_. May be NULL in which * case emission_ is simply deallocated and set to NULL. * * \param naxes { nnu_, nphi_, nr_ }. */ virtual void copyIntensity(double const * const pattern = NULL, size_t const naxes[3] = NULL); virtual double const * getIntensity() const;///< Get PatternDisk::emission_ virtual void getIntensityNaxes( size_t naxes[3] ) const ; ///< Get PatternDisk::nnu_, PatternDisk::nphi_, and PatternDisk::nr_ /** * \brief Set PatternDisk::opacity_ * * PatternDisk::opacity_ is first freed if not NULL and set to NULL. * * If pattern is not NULL, PatternDisk::emission_ must have been set * previously with matching dimensions. PatternDisk::opacity_ is * then reallocated, and pattern is copied into opacity_. * * \param pattern Array to copy as opacity_. May be NULL in which * case opacity_ is simply deallocated and set to NULL. * * \param naxes { nnu_, nphi_, nr_ }. */ virtual void copyOpacity(double const * const pattern = NULL, size_t const naxes[3] = NULL); virtual double const * opacity() const; ///< Get PatternDisk::opacity_ /// Set PatternDisk::velocity_ /** * PatternDisk::velocity_ is first freed if not NULL and set to NULL. * * If pattern is not NULL, PatternDisk::emission_ must have been set * previously with matching dimensions. PatternDisk::velocity_ is * then reallocated, and pattern is copied into velocity_. * * \param pattern Array to copy as velocity_. May be NULL in which * case velocity_ is simply deallocated and set to NULL. * * \param naxes { nphi_, nr_ }. */ virtual void copyVelocity(double const * const pattern = NULL, size_t const naxes[2] = NULL); virtual double const * getVelocity() const;///< Get PatternDisk::velocity_ /// Set PatternDisk::radius_ /** * PatternDisk::radius_ is first freed if not NULL and set to NULL. * * If pattern is not NULL, PatternDisk::emission_ must have been set * previously with matching dimensions. PatternDisk::radius_ is * then reallocated, and pattern is copied into radius_. * * \param pattern Array to copy as radius_. May be NULL in which * case radius_ is simply deallocated and set to NULL. * * \param nr size of radius array. */ virtual void copyGridRadius(double const * const pattern = NULL, size_t nr = 0 ); virtual double const * getGridRadius() const; ///< Get PatternDisk::radius_ virtual void repeatPhi(size_t n); ///< Set PatternDisk::repeat_phi_ virtual size_t repeatPhi() const; ///< Get PatternDisk::repeat_phi_ virtual void nu0(double freq); ///< Set PatternDisk::nu0_ virtual double nu0() const; ///< Get PatternDisk::nu0_ virtual void dnu(double dfreq); ///< Set PatternDisk::dnu_ virtual double dnu() const; ///< Get PatternDisk::dnu_ void phimin(double phimin); ///< Set PatternDisk::phimin_ double phimin() const; ///< Get PatternDisk::phimin_ void phimax(double phimax); ///< Set PatternDisk::phimax_ double phimax() const; ///< Get PatternDisk::phimax_ protected: void getIndices(size_t i[3], double const co[4], double nu=0.) const ; ///< Get emission_ cell corresponding to position co[4] public: using ThinDisk::emission; virtual double emission(double nu_em, double dsem, double c_ph[8], double c_obj[8]=NULL) const; virtual double transmission(double nu_em, double dsem, double coord[8]) const; virtual void getVelocity(double const pos[4], double vel[4]) ; }; #endif Gyoto-1.2.0/include/GyotoPatternDiskBB.h000066400000000000000000000056171302352257300201000ustar00rootroot00000000000000/** * \file GyotoPatternDiskBB.h * \brief A PatternDisk object with possibility to * compute a black body spectrum when * PatternDiskBB::emission_ does not yield * directly Iν but temperature. */ /* Copyright 2012-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoPatternDiskBB_H_ #define __GyotoPatternDiskBB_H_ #include #include #include namespace Gyoto{ namespace Astrobj { class PatternDiskBB; } } //#include #include #include /** * \class Gyoto::Astrobj::PatternDiskBB * \brief Geometrically thin disk read from FITS file with black body * spectrum * * This class describes a disk contained in the z=0 (equatorial) * plane, extending from r=r_ISCO to r=rmax_. The flux emitted * at radius r and longitude phi at frequency nu is given in a FITS * file. * */ class Gyoto::Astrobj::PatternDiskBB : public Astrobj::PatternDisk { friend class Gyoto::SmartPointer; protected: SmartPointer spectrumBB_; ///< disk black body ///< emission law private: /** * \brief 1 if spectral emission. * * XML: SpectralEmission * */ int SpectralEmission_; double risco_; ///< ISCO radius (if non-Kerr metric, not computable directly) // double rmax_; ///< Maximal extension of the disk !!! see Astrobj::rmax_ // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; GYOTO_OBJECT_THREAD_SAFETY; PatternDiskBB(); ///< Standard constructor PatternDiskBB(const PatternDiskBB& ) ;///< Copy constructor virtual PatternDiskBB* clone () const;///< Cloner virtual ~PatternDiskBB() ; ///< Destructor // Accessors // --------- public: bool spectralEmission() const; void spectralEmission(bool t); double risco() const; void risco(double r); public: using PatternDisk::emission; double emission(double nu_em, double dsem, double c_ph[8], double c_obj[8]=NULL) const; double const * getVelocity() const ; void getVelocity(double const pos[4], double vel[4]) ; using Generic::metric; void metric(SmartPointer gg); ///< Insures metric is KerrBL or alike }; #endif Gyoto-1.2.0/include/GyotoPhoton.h000066400000000000000000000230701302352257300167040ustar00rootroot00000000000000/** * \file GyotoPhoton.h * \brief A single light ray * * Gyoto::Photon is a class for ray-tracing. * */ /* Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoPhoton_H_ #define __GyotoPhoton_H_ #include "GyotoFunctors.h" namespace Gyoto{ class Photon; namespace Astrobj { class Generic; } } #include #include #include #include #include #include /** * \class Gyoto::Photon * \brief A null geodesic transporting light * * This is the central object for ray-tracing. */ class Gyoto::Photon : public Gyoto::Worldline, public Gyoto::SmartPointee, public Gyoto::Object { friend class Gyoto::SmartPointer; // Data : // ----- protected: /// The astronomical target /** * The (only) possible origin for this Photon. */ SmartPointer object_; /// Photon's frequency in observer's frame /** * In Hz, for quantity Emission */ double freq_obs_; /// Integrated optical transmission /** * At Photon::freq_obs_, between current position and observer. */ double transmission_freqobs_; /// Observer's spectrometer /** * Conveying observation frequencies for quantities Spectrum and * BinSpectrum. */ SmartPointer spectro_; /// Integrated optical transmissions /** * For each frequency in Photon::spectro_->getMidpoints(), between * current position and observer. */ double * transmission_; // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; GYOTO_OBJECT_THREAD_SAFETY; GYOTO_WORLDLINE; virtual std::string className() const ; ///< "Photon" virtual std::string className_l() const ; ///< "photon" /** * Allocates the default size (GYOTO_DEFAULT_X_SIZE) for x1, x2 etc. */ Photon() ; ///< Default constructor Photon(const Photon& ) ; ///< Copy constructor Photon* clone() const ; ///< Cloner protected: Photon(Photon* orig, size_t i0, int dir, double step_max); ///< Used by Photon::Refined::Refined() public: /// Same as Photon() followed by setInitialCondition(SmartPointer gg, SmartPointer obj, const double coord[8]) Photon(SmartPointer gg, SmartPointer obj, double* coord) ; /// Same as Photon() followed by setInitialCondition(SmartPointer gg, SmartPointer obj, SmartPointer screen, double d_alpha, double d_delta) Photon(SmartPointer gg, SmartPointer obj, SmartPointer screen, double d_alpha, double d_delta); virtual ~Photon() ; ///< Destructor virtual double getMass() const ; ///< Return 0. /// Set Photon::object_ void astrobj(SmartPointer); /// Get Photon::object_ SmartPointer astrobj() const ; using Worldline::metric; // Set Worldline::metric_ as well as the Astrobj metric void metric(SmartPointer); /// Set Photon::spectro_ void spectrometer(SmartPointer spr); /// Get Photon::spectro_ SmartPointer spectrometer() const ; /// Set Photon::freq_obs__ void freqObs(double); /// Get Photon::freq_obs__ double freqObs() const; // Mutators / assignment // --------------------- public: /// Set or re-set the initial condition prior to integration. /** * Set initial condition for this Photon : * * \param gg Gyoto::SmartPointer to the Gyoto::Metric in this universe; * \param obj Gyoto::SmartPointer to the target Gyoto::Astrobj; * \param coord 8-element array containing the initial condition, * i.e. the 4-position and the 4-velocity of the Photon at * the receiving end; * */ void setInitialCondition(SmartPointer gg, SmartPointer obj, const double coord[8]) ; /// Set or re-set the initial condition prior to integration. /** * Set initial condition for this Photon : * * \param gg Gyoto::SmartPointer to the Gyoto::Metric in this universe; * \param obj Gyoto::SmartPointer to the target Gyoto::Astrobj; * \param screen Observer's screen; * \param d_alpha Direction of arrival (RA offset) in radians; * \param d_delta Direction of arrival (Dec offset) in radians. */ void setInitialCondition(SmartPointer gg, SmartPointer obj, SmartPointer screen, double d_alpha, double d_delta); /// Integrate the geodesic /** * \param[in,out] data Optional Astrobj::Properties to fill with * observational quantities. * \return 1 if object was hit, else 0. */ int hit(Astrobj::Properties *data=NULL); /** * \brief Find minimum of photon--object distance * * Return the minimum of (*object)(this->getCoord()) * between t1 and t2. The date of this minimum is returned in tmin. * * \param[in] object * the distance to minimize is given by * object->operator()(). This method is in particular * implemented by the subclasses of Astrobj::Standard. * \param[in] t1 date * \param[in] t2 date * \param[out] tmin on output, date correspondig to the minimum * \param[in] threshold stop searching for a minimum if a value < * threshold is found (very often, we just want to find * a date below the threshold, not the accurate * minimum). */ double findMin(Functor::Double_constDoubleArray* object, double t1, double t2, double &tmin, double threshold = DBL_MIN) ; /// Find date for which the photon is at a given distance from the object /** * \param[in] object Object, must implement operator() * (e.g. Astrobj::Standard, ThinDisk::Standard) * \param[in] value The value to find * \param[in] tinside A date for which * object->Astrobj::operator()(Photon::getCoord()) is < value * \param[in,out] toutside On input: a date for which * object->Astrobj::operator()(Photon::getCoord()) is > * value. on output, (*object)(getCoord(toutside)) is < * value, very close to value. toutside is closer to tinside * on output than on input. */ void findValue(Functor::Double_constDoubleArray* object, double value, double tinside, double &toutside) ; #ifdef GYOTO_USE_XERCES virtual void setParameters(FactoryMessenger *fmp) ; static SmartPointer Subcontractor(Gyoto::FactoryMessenger*); #endif /* transmission stuff */ public: /// Set transmission to 1 for each channel as well as scalar transmission void resetTransmission() ; /// Get transmission /** * Get either Photon::transmission_freqobs_ (with i=-1) or * Photon::transmission_[i]. * * \param i channel number of the requested frequency, -1 for * Photon::freq_obs_. */ double getTransmission(size_t i) const ; /// Get maximum transmission; /** * Get current maximum of all the transmissions, * Photon::transmission_freqobs_ or one elements of the * Photon::transmission_ array. * */ double getTransmissionMax() const ; /// Get Photon::transmission_ /** * getTansmission()[i] == getTransmission(size_t i) */ double const * getTransmission() const ; /// Update transmission in a given channel /** * getTransmission(size_t i) *= t. * * \param i channel number. -1 for scalar Photon::transmission_freqobs_. * \param t transmission of this fluid element. */ virtual void transmit(size_t i, double t); private: /// Allocate Photon::transmission_ void _allocateTransmission(); public: class Refined; }; /** * \class Gyoto::Photon::Refined * \brief Refine last step of integration in a Photon * * The integration step of a Photon's geodesic is adaptive. This is * computationally efficient, but sometimes it is necessary to get the * position of a Photon with a finer * step. Gyoto::ComplexAstrobj::Impact() is a typical use case. * * A Refined photon is linked to its parent. In particular, care is * taken so that the parent's to update the parent's transmissions * whenever the Refined transmissions are touched. * * Don't use this class blindly: what's guaranteed to work is what is * used in Gyoto::ComplexAstrobj::Impact(). * * XML description corresponding to this class is <Photon/>. It * supports all the parameters supported by the Gyoto::Worldline class * plus an optional <Astrobj/> section to attach a instance of a * Gyoto::Astrobj::Generic sub-class. */ class Gyoto::Photon::Refined : public Gyoto::Photon { protected: Photon * parent_; ///< Parent Photon. public: Refined(Photon *parent, size_t i, int dir, double step_max); ///< Constructor virtual void transmit(size_t i, double t); ///< Update transmission both in *this and in *parent_ }; #endif Gyoto-1.2.0/include/GyotoPolishDoughnut.h000066400000000000000000000321621302352257300204130ustar00rootroot00000000000000/** * \file GyotoPolishDoughnut.h * \brief A toroïdal accretion structure * * Reference: Straub, O.; Vincent, F. H.; Abramowicz, M. A.; * Gourgoulhon, E.; & Paumard, T. 2012, Modelling the * black hole silhouette in Sagittarius A* with ion tori, * A&A 543:83. * */ /* Copyright (c) 2012-2016 Frederic Vincent, Odele Straub, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoPolishDoughnut_H_ #define __GyotoPolishDoughnut_H_ namespace Gyoto{ namespace Astrobj { class PolishDoughnut; } class FactoryMessenger; } #include #include #include #include /** * \brief A toroïdal accretion structure * * Reference: Straub, O.; Vincent, F. H.; Abramowicz, M. A.; * Gourgoulhon, E.; & Paumard, T. 2012, Modelling the * black hole silhouette in Sagittarius A* with ion tori, * A&A 543:83. * */ class Gyoto::Astrobj::PolishDoughnut : public Astrobj::Standard, protected Gyoto::Hook::Listener { friend class Gyoto::SmartPointer; // Data : // ----- protected: SmartPointer spectrumBB_; double l0_; ///< Angular momentum. Tied to PolishDoughnut::lambda_. double lambda_; ///< Adimentionned angular momentum double W_surface_; ///< Potential surface value. Tied to PolishDoughnut::lambda_. double W_centre_; ///< Potential central value. Tied to PolishDoughnut::lambda_. double r_cusp_; ///< Cusp radius in geometrical units. Tied to PolishDoughnut::lambda_. double r_centre_; ///< Central radius in geometrical units. Tied to PolishDoughnut::lambda_. double r_torusouter_ ; ///< Torus outer coordinate radius. Tied to PolishDoughnut::lambda_. double DeltaWm1_; ///< 1./(W_centre_ - W_surface_); double central_density_; ///< Central density in kg/L (same as g cm^-3) /* WARNING! so far (jan. 2014) central_density_ is density_central in standard Polish doughnut model, but it is density_central*c2+pressure_central in Komissarov model */ double centraltemp_over_virial_; ///< Tcenter/Tvirial double central_temperature_; /// Tcenter in K double beta_; ///< Pmagn/Pgas double aa_; ///< PolishDoughnut::gg_ spin, cached when setting PolishDoughnut::lambda_ double aa2_; ///< aa_2 size_t spectral_oversampling_;///< Oversampling used in integrateEmission() bool komissarov_; ///< 1 if Komissarov model is integrated bool angle_averaged_; ///< 1 if Komissarov model should be angle averaged /// fraction of thermal energy in non-thermal electrons /** * Obsiously, 0 means no non-thermal electrons at all. In this case, * the (trivial) non-thermal computations are skipped. Ther is thus * non need for an additional "nonthermal_" flag. */ double deltaPL_; double expoPL_; ///< exponent of the non-thermal powerlaw = -expoPL_ bool adaf_; ///< true to switch to an ADAF model rather tha Polish doughnut double ADAFtemperature_; ///< ADAF central temperature double ADAFdensity_; ///< ADAF central density bool changecusp_; ///< true to apply the fishy rcusp_ change (to be changed) bool rochelobefilling_; ///< true if torus filling its Roche lobe bool defangmomrinner_; ///< true if torus defined from l0 and rin double rintorus_; ///< Inner radius of the doughnut // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; // This object has Properties GYOTO_OBJECT_THREAD_SAFETY; #ifdef GYOTO_USE_XERCES // We need to filter some properties when writing XML void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const; #endif PolishDoughnut() ; ///< Default constructor PolishDoughnut(const PolishDoughnut& ) ; ///< Copy constructor virtual PolishDoughnut* clone() const; virtual ~PolishDoughnut() ; ///< Destructor // Mutators / assignment // --------------------- public: // Accessors // --------- public: double getL0() const; ///< Get PolishDoughnut::l0_ // void setL0(double l0); set by lambda_ double lambda() const; ///< Get PolishDoughnut::lambda_ void lambda(double lambda); ///< Set PolishDoughnut::lambda_ double centralDensity() const; ///< Get PolishDoughnut::central_density_ double centralDensity(std::string const &unit) const; ///< Get PolishDoughnut::central_density_ in specified unit void centralDensity(double density); ///< Set PolishDoughnut::central_density_ void centralDensity(double density, std::string const &unit); ///< Set PolishDoughnut::central_density_ in specified unit double centralTempOverVirial() const; ///< Get PolishDoughnut::centraltemp_over_virial_ void centralTempOverVirial(double val); ///< Set PolishDoughnut::centraltemp_over_virial_ double centralTemp() const; ///< Get PolishDoughnut::central_temperature_ void centralTemp(double val); ///< Set PolishDoughnut::central_temperature_ double beta() const; ///< Get PolishDoughnut::beta_ void beta(double beta);///< Set PolishDoughnut::beta_ void spectralOversampling(size_t); ///< Set PolishDoughnut::spectral_oversampling_ size_t spectralOversampling() const ; ///< Get PolishDoughnut::spectral_oversampling_ bool changeCusp() const; ///< Get PolishDoughnut::komissarov_ void changeCusp(bool t); ///< Set PolishDoughnut::komissarov_ bool komissarov() const; ///< Get PolishDoughnut::komissarov_ void komissarov(bool komis); ///< Set PolishDoughnut::komissarov_ bool angleAveraged() const; ///< Get PolishDoughnut::angle_averaged_ /** * if komis, also sets komissarov_ to true */ void angleAveraged(bool komis); ///< Set PolishDoughnut::angle_averaged_ void nonThermalDeltaExpo(std::vector const &v); std::vector nonThermalDeltaExpo() const; void angmomrinner(std::vector const &v); std::vector angmomrinner() const; void adafparams(std::vector const &v); std::vector adafparams() const; void adaf(bool t); bool adaf() const; void setParameter(Gyoto::Property const &p, std::string const & name, std::string const & content, std::string const & unit); // Read only members, depend on lambda double getWsurface() const; ///< Get PolishDoughnut::W_surface_ double getWcentre() const; ///< Get PolishDoughnut::W_centre_ double getRcusp() const; ///< Get PolishDoughnut::r_cusp_ double getRcentre() const; ///< Get PolishDoughnut::r_centre_ using Standard::metric; virtual void metric(Gyoto::SmartPointer); // ASTROBJ API // ----------- int Impact(Photon *ph, size_t index, Astrobj::Properties *data); virtual double operator()(double const coord[4]) ; // ASTROBJ processHitQuantities API // -------------------------------- protected: /** * \brief Update PolishDoughnut::aa_ * * See Hook::Listener::tell(). */ virtual void tell(Gyoto::Hook::Teller * msg); virtual void getVelocity(double const pos[4], double vel[4]) ; using Standard::integrateEmission; /** * \brief ∫ν1ν2 Iν dν (or jν) * * PolishDought::emission() is slow. Integrating it is very * slow. This implementation simply oversamples the spectrum by * PolishDoughnut::spectral_oversampling_ and sums the trapezoids. * * For general documentation, see Astrobj::Generic::integrateEmission(double * I, double const * boundaries, size_t const * chaninds, size_t nbnu, double dsem, double *cph, double *co) const . */ virtual void integrateEmission(double * I, double * boundaries, size_t* chaninds, size_t nbnu, double dsem, double *cph, double *co) const; virtual double emission(double nu_em, double dsem, double coord_ph[8], double coord_obj[8]) const; virtual void emission(double Inu[], double nu_em[], size_t nbnu, double dsem, double coord_ph[8], double coord_obj[8]=NULL) const ; virtual void radiativeQ(double Inu[], double Taunu[], double nu_em[], size_t nbnu, double dsem, double coord_ph[8], double coord_obj[8]=NULL) const ; double emissionBrems(double nu_em, double nu_crit, double numax, double T_electron, double n_e, double n_j, double amplification, double Cbrems, int comptonorder) const; ///< Bremsstrahlung proxy for emission() double emissionSynch(double nu_em, double nu_crit, double numax, double nu_0, double T_electron, double amplification, double Csynch, double alpha1, double alpha2, double alpha3, double preff, int comptonorder) const; double emissionSynchro_komissarov_direction(double Theta_elec, double number_density, double nuem, double nuc, double theta ) const; double emissionSynchro_komissarov_averaged(double Theta_elec, double number_density, double nuem, double nuc ) const; double emissionSynchro_komissarov_averaged_integ(double Theta_elec, double number_density, double nuem, double nuc ) const; double emissionSynchro_komissarov_PL_direction( double number_density_PL, double nuem, double nuc, double theta_mag) const; double emissionSynchro_komissarov_PL_averaged( double number_density_PL, double nuem, double nuc ) const; double absorptionSynchro_komissarov_PL_direction( double number_density_PL, double nuem, double nuc, double theta_mag) const ; double absorptionSynchro_komissarov_PL_averaged( double number_density_PL, double nuem, double nuc ) const; ///< Synchrotron proxy for emission() double transmission(double nuem, double dsem, double coord_ph[8]) const ; double BBapprox(double nuem, double Te) const; ///< Approximated Black-Body function static double funcxM(double alpha1, double alpha2, double alpha3, double xM); ///< Mahadevan 96 fit function // PURELY INTERNAL TO ASTROBJ // -------------------------- private: double potential(double r, double theta) const; ///< Potential defining shape, used by operator()() /** * \class Gyoto::Astrobj::PolishDoughnut::intersection_t * \brief double intersection(double) Functor class * * Implement former double intersection(double) function as a * Gyoto::Functor::Double_Double_const subclass to access generic * root-finding methods. * * This class is instantiated in a single * PolishDoughnut::intersection member. */ class intersection_t : public Gyoto::Functor::Double_Double_const { public: intersection_t(PolishDoughnut* parent); PolishDoughnut * papa; virtual double operator() (double) const; }; friend class intersection_t; /** * \class Gyoto::Astrobj::PolishDoughnut::transcendental_t * \brief double transcendental(double) Functor class * * Implement former double transcendental(double, double*) function * as a Gyoto::Functor::Double_Double_const subclass to access * generic root-finding methods. * * This class is as a local variable in PolishDoughnut::emission() */ class transcendental_t : public Gyoto::Functor::Double_Double_const { public: /** * \brief Parameter array * * \code * double rr = par[0] ; * double n_e = par[1] ; * double BB = par[2] ; * double Te = par[3] ; * double alpha1 = par[4] ; * double alpha2 = par[5] ; * double alpha3 = par[6] ; * \endcode */ double const * par; const PolishDoughnut * papa; virtual double operator() (double) const; }; intersection_t intersection; ///< double intersection(double) Functor /** * \class Gyoto::Astrobj::PolishDoughnut::outerradius_t * \brief double outerradius(double) Functor class * * To find the outer doughnut radius. * This class is as a local variable in PolishDoughnut::emission() */ class outerradius_t : public Gyoto::Functor::Double_Double_const { public: const PolishDoughnut * papa; virtual double operator() (double) const; }; public: static double bessi0(double xx);///< Modified Bessel function I0 static double bessi1(double xx);///< Modified Bessel function I1 static double bessk0(double xx);///< Modified Bessel function K0 static double bessk1(double xx);///< Modified Bessel function K1 static double bessk(int nn, double xx);///< Modified Bessel function // Outputs // ------- public: /// Display friend std::ostream& operator<<(std::ostream& , const PolishDoughnut& ) ; public: }; #endif Gyoto-1.2.0/include/GyotoPowerLawSpectrum.h000066400000000000000000000044771302352257300207320ustar00rootroot00000000000000/** * \file GyotoPowerLawSpectrum.h * \brief A power law spectrum : I_nu=constant_*nu^exponent_ * * Light emitted by an astronomical object */ /* Copyright 2011, 2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoPowerLawSpectrum_H_ #define __GyotoPowerLawSpectrum_H_ #include namespace Gyoto { namespace Spectrum { class PowerLaw; } } /** * \class Gyoto::Spectrum::PowerLaw * \brief I_nu=constant_*nu^exponent_ * * Light emitted by e.g. a Star. * * XML stanza: * \code * * 0. * 1. * * \endcode */ class Gyoto::Spectrum::PowerLaw : public Gyoto::Spectrum::Generic { friend class Gyoto::SmartPointer; protected: double constant_; ///< I_nu=constant_*nu^exponent_ double exponent_; ///< I_nu=constant_*nu^exponent_ double minfreq_; ///< Lower-frequency cutoff (emits at nu>=minfreq_) double maxfreq_; ///< Upper-frequency cutoff (emits at nu<=maxfreq_) public: GYOTO_OBJECT; PowerLaw(); /** * \brief Constructor setting exponent_ and optionally constant_ */ PowerLaw(double exponent, double constant=1.); // PowerLaw(const Spectrum &); virtual PowerLaw * clone() const; ///< Cloner double constant() const; ///< Get constant_ void constant(double); ///< Set constant_ double exponent() const; ///< Get exponent_ void exponent(double); ///< Set exponent_ std::vector cutoffinev() const; ///< Get cutoffs void cutoffinev(std::vector const &v); ///< Set cutoffs using Gyoto::Spectrum::Generic::operator(); virtual double operator()(double nu) const; }; #endif Gyoto-1.2.0/include/GyotoProperty.h000066400000000000000000001137331302352257300172670ustar00rootroot00000000000000/** * \file GyotoProperty.h * \brief Introspectable properties */ /* Copyright 2014-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoProperty_H_ #define __GyotoProperty_H_ #include "GyotoConfig.h" #include #include #ifndef GYOTO_PLUGIN #define GYOTO_PLUGIN #endif namespace Gyoto { class Object; class Property; namespace Metric { class Generic; } namespace Astrobj { class Generic; } namespace Spectrum { class Generic; } namespace Spectrometer { class Generic; } class Screen; template class SmartPointer; } /// Define the class as not beeing thread-safe /** * See also GYOTO_OBJECT_THREAD_SAFETY */ #define GYOTO_PROPERTY_THREAD_UNSAFE(class) \ bool class::isThreadSafe() const {return false;} /// Define a pair of accessors to scalar member (double, long, size_t) /** * Accessors must also be declared in the class declaration, which can * be done using #GYOTO_OBJECT_SCALAR_ACCESSORS. */ #define GYOTO_PROPERTY_ACCESSORS(class, type, member, method) \ void class::method(type v) {member=v;} \ type class::method() const {return member;} /// Define a pair of accessors to scalar member (double, long, size_t) /** * Accessors must also be declared in the class declaration, which can * be done using #GYOTO_OBJECT_SCALAR_ACCESSORS. * * This version allows performing sepcial actions in the accessors, in * addition to the usual stuff. * */ #define GYOTO_PROPERTY_ACCESSORS_SPECIAL(class, type, member, method, set, get) \ void class::method(type v) {member=v; set } \ type class::method() const {get ; return member;} /// Define 4 accessors to double scalar member in geometrical units /** * Accessors must also be declared in the class declaration, which can * be done using #GYOTO_OBJECT_ACCESSORS_UNIT. * * \param class class name * \param member member holding the value in geometrical unit * \param method name for accessors * \metric member or expression yielding metric (which defines the * geometrical unit) */ #define GYOTO_PROPERTY_ACCESSORS_GEOMETRICAL(class, member, method, metric) \ GYOTO_PROPERTY_ACCESSORS(class, double, member, method) \ void class::method(double v, std::string const &u) { \ member=Units::ToGeometrical(v, u, metric); \ } \ double class::method(std::string const &u) const { \ return Units::FromGeometrical(member, u, metric); \ } /// GYOTO_PROPERTY_ACCESSORS_GEOMETRICAL + GYOTO_PROPERTY_ACCESSORS_SPECIAL /** * Accessors must also be declared in the class declaration, which can * be done using #GYOTO_OBJECT_ACCESSORS_UNIT. * * \param class class name * \param member member holding the value in geometrical unit * \param method name for accessors * \metric member or expression yielding metric (which defines the * geometrical unit) */ #define GYOTO_PROPERTY_ACCESSORS_GEOMETRICAL_SPECIAL(class, member, method, metric, set, get) \ GYOTO_PROPERTY_ACCESSORS_SPECIAL(class, double, member, method, set, get) \ void class::method(double v, std::string const &u) { \ member=Units::ToGeometrical(v, u, metric); \ } \ double class::method(std::string const &u) const { \ return Units::FromGeometrical(member, u, metric); \ } /// Define 4 accessors to double scalar member in specified units /** * Accessors must also be declared in the class declaration, which can * be done using #GYOTO_OBJECT_ACCESSORS_UNIT. * * \param class class name * \param member member holding the value in specified unit * \param method name for accessors * \unit unit */ #define GYOTO_PROPERTY_ACCESSORS_UNIT(class, member, method, unit) \ GYOTO_PROPERTY_ACCESSORS(class, double, member, method) \ void class::method(double v, std::string const &u) { \ method(Units::Converter(u, unit)(v)); \ } \ double class::method(std::string const &u) const { \ return Units::Converter(unit, u)(method()); \ } /// Start Property list /** * \param class Class for which we are defining a Property list * \param doc Documentation for this class. Optional but recommended. */ #define GYOTO_PROPERTY_START(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ "wrong number of arguments", \ "wrong number of arguments", \ "wrong number of arguments", \ "wrong number of arguments", \ GYOTO_PROPERTY_START_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_START_NODOC(__VA_ARGS__), \ "wrong number of arguments" \ ) /// Define a new Property of type bool /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] namef Name of property if false; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_BOOL(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ "wrong number of arguments", \ GYOTO_PROPERTY_BOOL_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_BOOL_NODOC(__VA_ARGS__), \ "wrong number of arguments", \ "wrong number of arguments", \ "wrong number of arguments", \ "wrong number of arguments" \ ) /// Define a Property of type double /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_DOUBLE(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_DOUBLE_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_DOUBLE_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define a Property of type double with unit /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_DOUBLE_UNIT(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_DOUBLE_UNIT_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_DOUBLE_UNIT_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define a Property of type vector /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_VECTOR_DOUBLE(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_VECTOR_DOUBLE_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_VECTOR_DOUBLE_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define a Property of type vector with unit /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_VECTOR_DOUBLE_UNIT(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_VECTOR_DOUBLE_UNIT_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_VECTOR_DOUBLE_UNIT_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define a Property of type String /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_STRING(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_STRING_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_STRING_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define a Property of type Filename /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_FILENAME(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_FILENAME_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_FILENAME_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define a Property of type long /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_LONG(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_LONG_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_LONG_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define a Property of type unsigned long /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_UNSIGNED_LONG(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_UNSIGNED_LONG_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_UNSIGNED_LONG_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define a Property of type vector /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_VECTOR_UNSIGNED_LONG(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_VECTOR_UNSIGNED_LONG_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_VECTOR_UNSIGNED_LONG_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define a Property of type size_t /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_SIZE_T(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_SIZE_T_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_SIZE_T_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define a Property of type Gyoto::Metric::Generic /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_METRIC(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_METRIC_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_METRIC_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define a Property of type Gyoto::Spectrum::Generic /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_SPECTRUM(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_SPECTRUM_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_SPECTRUM_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define a Property of type Gyoto::Astrobj::Generic /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_ASTROBJ(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_ASTROBJ_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_ASTROBJ_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define a Property of type Gyoto::Screen /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_SCREEN(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_SCREEN_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_SCREEN_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define a Property of type Gyoto::Spectrometer::Generic /* * Declares a Property named "name". name and namef should not * be quoted. * * \param[in] class Class name * \param[in] name Name of property if true; * \param[in] fname Name of functions for setting or getting the property * \param[in] doc Document string (optional but recommended) */ #define GYOTO_PROPERTY_SPECTROMETER(...) \ GYOTO_PROPERTY_CHOOSER(,##__VA_ARGS__, \ GYOTO_NOTHING_6, \ GYOTO_NOTHING_5, \ GYOTO_PROPERTY_SPECTROMETER_DOC(__VA_ARGS__), \ GYOTO_PROPERTY_SPECTROMETER_NODOC(__VA_ARGS__), \ GYOTO_NOTHING_2, \ GYOTO_NOTHING_1, \ GYOTO_NOTHING_0 \ ) /// Define class::properties and class::getProperties() #define GYOTO_PROPERTY_END(class, next) \ Property(next)}; \ Gyoto::Property const * class::getProperties() const { \ return class::properties; \ } \ const std::string class::builtinPluginValue ( GYOTO_STRINGIFY(GYOTO_PLUGIN) ); \ std::vector class::plugins() const { \ if (plugins_.size() == 0) { \ std::vector p; \ p.push_back(class::builtinPluginValue); \ return p; \ } \ return plugins_; \ } \ void class::plugins(std::vector const & plugname) { \ plugins_=plugname; \ } /// Property that can be set and got using standard methods /** * The Property API makes it easy to declare the parameters that can * be set in a class. * * Developpers who simply write classes (deriving from * Astrobj::Generic, , Metric::Generic, Spectrum::Generic) need not * know the inners of the Property class and interact with it only * using macros to declare the parameters they need to read from XML. * * To make use of the Property framework, a class * must derive from Gyoto::Object and use the #GYOTO_OBJECT in a * public section of the class declaration (i.e. in the .h * file). Then, in the corresponding .C file, the GYOTO_PROPERTY_* * macros are used as follows (note the absence of punctuation after * the macros): * \code * GYOTO_PROPERTY_START(MyClass) * GYOTO_PROPERTY_(MyClass, PropertyName, accessor) * ... * GYOTO_PROPERTY_END(MyClass, ParentClass::properties) * \endcode * * In the above, #GYOTO_PROPERTY_START starts the definition of the * static member MyClass::properties. Each GYOTO_PROPERTY_ macro * declares a new property. #GYOTO_PROPERTY_END ends the definition of * the property list, with an optional pointer to the parent's class * Property list, and defines the MyClass::getProperties() method. * * The underlying accessors must always be defined, both to set and to * get the property. For the sake of simplicity, only a limited number * of data types are allowed: * - double: see #GYOTO_PROPERTY_DOUBLE, #GYOTO_PROPERTY_DOUBLE_UNIT; * - long: see #GYOTO_PROPERTY_LONG; * - unsigned long: see #GYOTO_PROPERTY_UNSIGNED_LONG * (a.k.a. size_t: see #GYOTO_PROPERTY_SIZE_T, this may break on * architectures where size_t is not the same as unsigned long); * - bool: see #GYOTO_PROPERTY_BOOL; * - std::vector: see #GYOTO_PROPERTY_VECTOR_DOUBLE * and #GYOTO_PROPERTY_VECTOR_DOUBLE_UNIT; * - std::vector: * see #GYOTO_PROPERTY_VECTOR_UNSIGNED_LONG; * - Gyoto::SmartPointers to various base classes: Screen, * Metric::Generic, Astrobj::Generic, Spectrum::Generic and * Spectrometer::Generic. See #GYOTO_PROPERTY_METRIC, * #GYOTO_PROPERTY_SCREEN, #GYOTO_PROPERTY_ASTROBJ, * #GYOTO_PROPERTY_SPECTRUM and #GYOTO_PROPERTY_SPECTROMETER. * * For the floating point data-types (double and vector), two * additional accessors supporting units can be provided. The * accessors must have the same name and have specific prototypes, see * the various function pointer typedefs, e.g. #set_double_t and * #get_double_t. * * The type used in these accessors may not be the same as the type of * the underlying class member. For instance, to read an array, it was * chosen to use the std::vector type because it is easy to * read such a vector from XML and to thus determine dynamically the * number of elements provided. But this type is slow, so it is * expected that the class member will rather be a C-style array * (double arr[]) or something else entirely. It is not forbidden to * have a set of high-level accessors for the Property interface on * top of lower-level, more efficient accessors to be used in * compiled, static code: * * \code * void MyClass::arrayMember(double const * const tab) { * for (int i=0; i<5; ++i) member_[i]=tab[i]; * } * void MyClass::arrayMemberVector(std::vector const &vect) { * if (vect.size()!=5) throwError("Please provide 5 elements"); * for (int i=0; i<5; ++i) member_[i]=vect[i]; * } * double const * MyClass::arrayMember() const {return member_;} * std::vector MyClass::arrayMemberVector() const { * std::vector v(5, 0.); * for (int i=0; i<5; ++i) v[i]=member_[i]; * return v; * } * \endcode * * In this example, assuming MyClass is based directly on Object and * member_ is the only parameter to read from XML, the Property list * may be defined as: * \code * GYOTO_PROPERTY_START(MyClass) * GYOTO_PROPERTY_VECTOR_DOUBLE(MyClass, ArrayMember, arrayMemberVector) * GYOTO_PROPERTY_END(MyClass, Object::properties) * \endcode * * Again, nothing more is required to read and write ArrayMember from * XML and from Yorick. */ class Gyoto::Property { private: public: /// Possible type of a Property instance /** * These are all the values that Property::type may take. */ enum type_e { /// Type is double double_t, /// Type is long long_t, /// Type is unsigned long (a.k.a. size_t) unsigned_long_t, /// Type is size_t (only if distinct from unsigned long) size_t_t, /// Type is bool bool_t, /// Type is std::string string_t, /// Type is std::string and holds a file name /** * In this case, the value may be changed to include relative or * absolute path. The prefix "`pwd`/" forces path to be * interpreted relative to the current working directory. If the * value starts with "/", it is interpreted as an absolute * path. Otherwise, when reading from XML, the path is interpreted * relative to the XML file. */ filename_t, /// Type is std::vector vector_double_t, /// Type is std::vector vector_unsigned_long_t, /// Type is Gyoto::SmartPointer metric_t, /// Type is Gyoto::SmartPointer screen_t, /// Type is Gyoto::SmartPointer astrobj_t, /// Type is Gyoto::SmartPointer spectrum_t, /// Type is Gyoto::SmartPointer spectrometer_t, /// Property is empty /** * In this case (and only in this case): * 1. #Gyoto::Property::operator bool() const return false; * 2. Property::parent may be different from NULL and point to * another array of Property instances, that should be * interpreted as appended to this list. */ empty_t}; /// Name of this instance std::string name; /// Name if false /** * Only if #type is #empty_t */ std::string name_false; /// Type of this instance int type; /// Prototype for an accessor to set a double typedef void (Object::* set_double_t)(double val); /// Prototype for an accessor to get a double typedef double (Object::* get_double_t)() const; /// Prototype for an accessor to set a double, with unit typedef void (Object::* set_double_unit_t)(double val, std::string const &unit); /// Prototype for an accessor to get a double, with unit typedef double (Object::* get_double_unit_t)(std::string const &unit) const; /// Prototype for an accessor to set a long typedef void (Object::* set_long_t)(long val); /// Prototype for an accessor to get a long typedef long (Object::* get_long_t)() const; /// Prototype for an accessor to set an unsigned long typedef void (Object::* set_unsigned_long_t)(unsigned long val); /// Prototype for an accessor to get an unsigned long typedef unsigned long (Object::* get_unsigned_long_t)() const; /// Prototype for an accessor to set a size_t typedef void (Object::* set_size_t_t)(size_t val); /// Prototype for an accessor to get a size_t typedef size_t (Object::* get_size_t_t)() const; /// Prototype for an accessor to set a bool typedef void (Object::* set_bool_t)(bool val); /// Prototype for an accessor to get a bool typedef bool (Object::* get_bool_t)() const; /// Prototype for an accessor to set a string typedef void (Object::* set_string_t)(std::string const&); /// Prototype for an accessor to get a string typedef std::string (Object::* get_string_t)() const; /// Prototype for an accessor to set a filename typedef void (Object::* set_fname_t)(std::string const&); /// Prototype for an accessor to get a filename typedef std::string (Object::* get_fname_t)() const; /// Prototype for an accessor to set a std::vector typedef void (Object::* set_vector_double_t)(std::vector const&); /// Prototype for an accessor to get a std::vector typedef std::vector (Object::* get_vector_double_t)() const; /// Prototype for an accessor to set a std::vector, with unit typedef void (Object::* set_vector_double_unit_t)(std::vector const&, std::string const &); /// Prototype for an accessor to get a std::vector, with unit typedef std::vector (Object::* get_vector_double_unit_t)(std::string const &) const; /// Prototype for an accessor to set a std::vector typedef void (Object::* set_vector_unsigned_long_t)(std::vector const&); /// Prototype for an accessor to get a std::vector typedef std::vector (Object::* get_vector_unsigned_long_t)() const; /// Prototype for an accessor to set a Gyoto::SmartPointer typedef void (Object::* set_metric_t) (Gyoto::SmartPointer); /// Prototype for an accessor to get a Gyoto::SmartPointer typedef Gyoto::SmartPointer (Object::* get_metric_t)() const; /// Prototype for an accessor to set a Gyoto::SmartPointer typedef void (Object::* set_screen_t) (Gyoto::SmartPointer); /// Prototype for an accessor to get a Gyoto::SmartPointer typedef Gyoto::SmartPointer (Object::* get_screen_t)() const; /// Prototype for an accessor to set a Gyoto::SmartPointer typedef void (Object::* set_astrobj_t) (Gyoto::SmartPointer); /// Prototype for an accessor to get a Gyoto::SmartPointer typedef Gyoto::SmartPointer (Object::* get_astrobj_t)() const; /// Prototype for an accessor to set a Gyoto::SmartPointer typedef void (Object::* set_spectrum_t) (Gyoto::SmartPointer); /// Prototype for an accessor to get a Gyoto::SmartPointer typedef Gyoto::SmartPointer (Object::* get_spectrum_t)() const; /// Prototype for an accessor to set a Gyoto::SmartPointer typedef void (Object::* set_spectrometer_t) (Gyoto::SmartPointer); /// Prototype for an accessor to get a Gyoto::SmartPointer typedef Gyoto::SmartPointer (Object::* get_spectrometer_t)() const; /// Union holding an accessor to set any type /** * Right type is stored in #type */ union setter_t { set_double_t set_double; set_long_t set_long; set_unsigned_long_t set_unsigned_long; set_size_t_t set_size_t; set_bool_t set_bool; set_string_t set_string; set_vector_double_t set_vdouble; set_vector_unsigned_long_t set_vulong; set_metric_t set_metric; set_screen_t set_screen; set_astrobj_t set_astrobj; set_spectrum_t set_spectrum; set_spectrometer_t set_spectrometer; }; /// Union holding an accessor to get any type /** * Right type is stored in #type */ union getter_t { get_double_t get_double; get_long_t get_long; get_unsigned_long_t get_unsigned_long; get_size_t_t get_size_t; get_bool_t get_bool; get_string_t get_string; get_vector_double_t get_vdouble; get_vector_unsigned_long_t get_vulong; get_metric_t get_metric; get_screen_t get_screen; get_astrobj_t get_astrobj; get_spectrum_t get_spectrum; get_spectrometer_t get_spectrometer; }; /// Union holding an accessor to set double or vector with unit /** * Right type is stored in #type */ union setter_unit_t { set_double_unit_t set_double; set_vector_double_unit_t set_vdouble; }; /// Union holding an accessor to get double or vector with unit union getter_unit_t { get_double_unit_t get_double; get_vector_double_unit_t get_vdouble; }; /// Pointer to the setter method /** * Right type is stored in #type */ setter_t setter; /// Pointer to the getter method /** * Right type is stored in #type */ getter_t getter; /// Pointer to the setter (with unit) method /** * Right type is stored in #type */ setter_unit_t setter_unit; /// Pointer to the getter (with unit) method /** * Right type is stored in #type */ getter_unit_t getter_unit; std::string doc; /// True if #Gyoto::Property::type is not #Gyoto::Property::empty_t operator bool() const ; /// If #type is #empty_t, link to another Property list Property const * const parent; /// Constructor for #type==#empty_t Property(Property const * const ancestor); /// Constructor for class name pseudo-property Property(std::string classname, std::string doc=""); /// Constructor for #type==#long_t Property(std::string name, set_long_t set_long, get_long_t get_long, std::string doc); /// Constructor for #type==#unsigned_long_t Property(std::string name, set_unsigned_long_t set_unsigned_long, get_unsigned_long_t get_unsigned_long, std::string doc); /// Constructor for #type==#size_t_t /** * The dummy int parameter is only there to differenciate from the * unsigned long constructor on platforms where size_t is a typdef * to unsigned long. */ Property(std::string name, set_size_t_t set_size_t, get_size_t_t get_size_t, int dummy, std::string doc); /// Constructor for #type==#double_t, without unit support Property(std::string name, set_double_t set_double, get_double_t get_double, std::string doc); /// Constructor for #type==#double_t, with unit support Property(std::string name, set_double_t set_double, get_double_t get_double, set_double_unit_t set_double_unit, get_double_unit_t get_double_unit, std::string doc); /// Constructor for #type==#bool_t Property(std::string name, std::string name_false, set_bool_t set_bool, get_bool_t get_bool, std::string doc); /// Constructor for #type==#string_t or #filename_t /** * \param name name of the Property * \param set_string pointer to the setter accessor * \param get_string pointer to the getter accessor * \param is_filename true means #type=#filename_t */ Property(std::string name, set_string_t set_string, get_string_t get_string, bool is_filename, std::string doc); /// Constructor for #type==#vector_double_t, without unit support Property(std::string name, set_vector_double_t set_vdouble, get_vector_double_t get_vdouble, std::string doc); /// Constructor for #type==#vector_double_t, with unit support Property(std::string name, set_vector_double_t set_vdouble, get_vector_double_t get_vdouble, set_vector_double_unit_t set_vdouble_unit, get_vector_double_unit_t get_vdouble_unit, std::string doc); /// Constructor for #type==#vector_unsigned_long_t Property(std::string name, set_vector_unsigned_long_t set_vulong, get_vector_unsigned_long_t get_vulong, std::string doc); /// Constructor for #type==#metric_t Property(std::string name, set_metric_t set_metric, get_metric_t get_metric, std::string doc); /// Constructor for #type==#screen_t Property(std::string name, set_screen_t set_screen, get_screen_t get_screen, std::string doc); /// Constructor for #type==#astrobj_t Property(std::string name, set_astrobj_t set_astrobj, get_astrobj_t get_astrobj, std::string doc); /// Constructor for #type==#spectrum_t Property(std::string name, set_spectrum_t set_spectrum, get_spectrum_t get_spectrum, std::string doc); /// Constructor for #type==#spectrometer_t Property(std::string name, set_spectrometer_t set_spectrometer, get_spectrometer_t get_spectrometer, std::string doc); }; /// \cond INTERNAL #define GYOTO_PROPERTY_CHOOSER(x, A, B, C, D, E, F, FUNC, ...) FUNC #define GYOTO_PROPERTY_START_DOC(class, doc) \ Property const class::properties[] = { \ Property (#class, doc), #define GYOTO_PROPERTY_START_NODOC(class) \ GYOTO_PROPERTY_START_DOC(class, "") #define GYOTO_PROPERTY_BOOL_DOC(class, name, namef, fname, doc) \ Gyoto::Property \ (#name, \ #namef, \ (Gyoto::Property::set_bool_t)&class :: fname, \ (Gyoto::Property::get_bool_t)&class :: fname, \ doc), #define GYOTO_PROPERTY_BOOL_NODOC(class, name, namef, fname) \ GYOTO_PROPERTY_BOOL_DOC(class, name, namef, fname, "") #define GYOTO_PROPERTY_DOUBLE_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_double_t)&class::fname, \ (Gyoto::Property::get_double_t)&class::fname, \ doc), #define GYOTO_PROPERTY_DOUBLE_NODOC(class, name, fname) \ GYOTO_PROPERTY_DOUBLE_DOC(class, name, fname, "") #define GYOTO_PROPERTY_LONG_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_long_t)&class::fname, \ (Gyoto::Property::get_long_t)&class::fname, \ doc), #define GYOTO_PROPERTY_LONG_NODOC(class, name, fname) \ GYOTO_PROPERTY_LONG_DOC(class, name, fname, "") #define GYOTO_PROPERTY_UNSIGNED_LONG_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_unsigned_long_t)&class::fname, \ (Gyoto::Property::get_unsigned_long_t)&class::fname, \ doc), #define GYOTO_PROPERTY_UNSIGNED_LONG_NODOC(class, name, fname) \ GYOTO_PROPERTY_UNSIGNED_LONG_DOC(class, name, fname, "") #define GYOTO_PROPERTY_SIZE_T_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_size_t_t)&class::fname, \ (Gyoto::Property::get_size_t_t)&class::fname, \ 1, \ doc), #define GYOTO_PROPERTY_SIZE_T_NODOC(class, name, fname) \ GYOTO_PROPERTY_SIZE_T_DOC(class, name, fname, "") #define GYOTO_PROPERTY_DOUBLE_UNIT_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_double_t)&class::fname, \ (Gyoto::Property::get_double_t)&class::fname, \ (Gyoto::Property::set_double_unit_t)&class::fname, \ (Gyoto::Property::get_double_unit_t)&class::fname, \ doc), #define GYOTO_PROPERTY_DOUBLE_UNIT_NODOC(class, name, fname) \ GYOTO_PROPERTY_DOUBLE_UNIT_DOC(class, name, fname, "") #define GYOTO_PROPERTY_FILENAME_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_string_t)&class::fname, \ (Gyoto::Property::get_string_t)&class::fname, \ true, doc), #define GYOTO_PROPERTY_FILENAME_NODOC(class, name, fname) \ GYOTO_PROPERTY_FILENAME_DOC(class, name, fname, "") #define GYOTO_PROPERTY_STRING_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_string_t)&class::fname, \ (Gyoto::Property::get_string_t)&class::fname, \ false, doc), #define GYOTO_PROPERTY_STRING_NODOC(class, name, fname) \ GYOTO_PROPERTY_STRING_DOC(class, name, fname, "") #define GYOTO_PROPERTY_VECTOR_DOUBLE_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_vector_double_t)&class::fname, \ (Gyoto::Property::get_vector_double_t)&class::fname, \ doc), #define GYOTO_PROPERTY_VECTOR_DOUBLE_NODOC(class, name, fname) \ GYOTO_PROPERTY_VECTOR_DOUBLE_DOC(class, name, fname, "") #define GYOTO_PROPERTY_VECTOR_DOUBLE_UNIT_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_vector_double_t)&class::fname, \ (Gyoto::Property::get_vector_double_t)&class::fname, \ (Gyoto::Property::set_vector_double_unit_t)&class::fname, \ (Gyoto::Property::get_vector_double_unit_t)&class::fname, \ doc), #define GYOTO_PROPERTY_VECTOR_DOUBLE_UNIT_NODOC(class, name, fname) \ GYOTO_PROPERTY_VECTOR_DOUBLE_UNIT_DOC(class, name, fname, "") #define GYOTO_PROPERTY_VECTOR_UNSIGNED_LONG_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_vector_unsigned_long_t)&class::fname, \ (Gyoto::Property::get_vector_unsigned_long_t)&class::fname, \ doc), #define GYOTO_PROPERTY_VECTOR_UNSIGNED_LONG_NODOC(class, name, fname) \ GYOTO_PROPERTY_VECTOR_UNSIGNED_LONG_DOC(class, name, fname, "") #define GYOTO_PROPERTY_METRIC_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_metric_t)&class::fname, \ (Gyoto::Property::get_metric_t)&class::fname, \ doc), #define GYOTO_PROPERTY_METRIC_NODOC(class, name, fname) \ GYOTO_PROPERTY_METRIC_DOC(class, name, fname, "") #define GYOTO_PROPERTY_SCREEN_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_screen_t)&class::fname, \ (Gyoto::Property::get_screen_t)&class::fname, \ doc), #define GYOTO_PROPERTY_SCREEN_NODOC(class, name, fname) \ GYOTO_PROPERTY_SCREEN_DOC(class, name, fname, "") #define GYOTO_PROPERTY_ASTROBJ_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_astrobj_t)&class::fname, \ (Gyoto::Property::get_astrobj_t)&class::fname, \ doc), #define GYOTO_PROPERTY_ASTROBJ_NODOC(class, name, fname) \ GYOTO_PROPERTY_ASTROBJ_DOC(class, name, fname, "") #define GYOTO_PROPERTY_SPECTRUM_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_spectrum_t)&class::fname, \ (Gyoto::Property::get_spectrum_t)&class::fname, \ doc), #define GYOTO_PROPERTY_SPECTRUM_NODOC(class, name, fname) \ GYOTO_PROPERTY_SPECTRUM_DOC(class, name, fname, "") #define GYOTO_PROPERTY_SPECTROMETER_DOC(class, name, fname, doc) \ Gyoto::Property \ (#name, \ (Gyoto::Property::set_spectrometer_t)&class::fname, \ (Gyoto::Property::get_spectrometer_t)&class::fname, \ doc), #define GYOTO_PROPERTY_SPECTROMETER_NODOC(class, name, fname) \ GYOTO_PROPERTY_SPECTROMETER_DOC(class, name, fname, "") // \endcond INTERNAL #endif Gyoto-1.2.0/include/GyotoRegister.h000066400000000000000000000127521302352257300172260ustar00rootroot00000000000000/* Copyright 2011-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoRegister_H_ #define __GyotoRegister_H_ #include #include "GyotoSmartPointer.h" /** * \file GyotoRegister.h * \brief Gyoto registers * * Gyoto::Register::Entry instances are used to map kind names to * Gyoto::SmartPointee::Subcontractor_t functions used to instantiate * objects from XML files through the Gyoto::Factory. */ namespace Gyoto { /** * \namespace Gyoto::Register * \brief Gyoto registers * * Gyoto::Register::Entry instances are used to map kind names to * Gyoto::SmartPointee::Subcontractor_t functions used to * instantiate objects from XML files through the Gyoto::Factory. */ namespace Register { /* Documented below */ class Entry; /** * \brief Initialise the various registers * * Normally called once at application start-up, Register::init() * initiaizes the registers, loads the plug-ins, and fills the * registers as appropriate. * * \param pluglist Coma-separated list of plug-ins to load. If * NULL, default to the environment variable GYOTO_PLUGINS, if it * exists. Else use GYOTO_DEFAULT_PLUGINS. Failing to load a * plug-in prepended with "nofail:" is not fatal. */ void init( char const * pluglist = NULL ); /** * \brief List the various registers */ void list(); } /** * \brief Load a plugin by name * * Uses dlopen to load the file libgyoto-<plugname>.so, looks for * the function __Gyoto<plugname>Init inside it and run it. * Plug-ins must be located in the runtime link search path, or in * GYOTO_PKGLIBDIR, or in * GYOTO_PKGLIBDIR/GYOTO_SOVERS/. * * \param plugname Plug-in name. * \param nofail Unless nofail evals to true, the inability to find * a plug-in or to run the initialization function inside it throws * an Gyoto::Error. */ void loadPlugin( char const * const plugname, int nofail = 0); bool havePlugin(std::string plugname); void requirePlugin(std::string plugname, int nofail = 0); } /** * \brief Entry in a register (or a full register) * * A register is actually a chained list of Register::Entry * instances. */ class Gyoto::Register::Entry { /** * \brief List the various registers */ friend void Gyoto::Register::list(); protected: std::string name_; ///< Kind name for the entry, as found in the "kind" XML attribute Gyoto::SmartPointee::Subcontractor_t* subcontractor_; ///< Pointer to the Gyoto::SmartPointee::Subcontractor_t function that produces an object of this kind Register::Entry* next_; ///< Next entry in the register, or NULL const std::string plugin_; ///< Plug-in from which this Entry was loaded public: /** * \brief Constructor */ Entry(std::string name, Gyoto::SmartPointee::Subcontractor_t* subcontractor, Entry* next); ~Entry(); ///< Destructor /** * \brief Get subcontractor for a given name * * Search through the register for an Entry matching name and return * the corresponding subcontractor. If plugin is specified, only a * subcontractor matching both name and plugin will be returned. * Note that Gyoto::Entry::getSubcontractor() will not load the * plug-in for you, contrary to * e.g. Gyoto::Metric::getSubcontractor(). If plugin is the empty * string, then the first subcontractor matching name will be * returned, and the name of the plug-in it belongs to will be * returned in plugin upon output. * * \param[in] name Name of the kind to look for. * \param[inout] plugin e.g. "stdplug". * \param[in] errmode 1 if getSubContractor() should return NULL upon * failure. Else a Gyoto::Error is thrown. * \return Pointer to subcontractor function. */ Gyoto::SmartPointee::Subcontractor_t* getSubcontractor(std::string name, std::string &plugin, int errmode=0); }; #define GYOTO_GETSUBCONTRACTOR(space) \ Gyoto::space::Subcontractor_t* \ Gyoto::space::getSubcontractor(std::string name, std::vector &plugin, int errmode) { \ for (size_t i=0; i getSubcontractor(name, plg, errmode); \ plugin.push_back(plg); \ } \ for (size_t i=plugin.size()-1; i>=0 && sctr == NULL; --i) { \ sctr= \ (Subcontractor_t*)Gyoto::space::Register_ \ -> getSubcontractor(name, plugin[i], 1); \ } \ if (!errmode && !sctr) throwError ("Kind not found in the specified plug-ins: "+name); \ return sctr; \ } #endif Gyoto-1.2.0/include/GyotoRezzollaZhidenko.h000066400000000000000000000044651302352257300207420ustar00rootroot00000000000000/** * \file GyotoRezzollaZhidenko.h * \brief Spherically-symmetric parametrized metric of Rezzolla\&Zhidenko 2014 * */ /* Copyright 2013 Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoRezzollaZhidenko_h #define __GyotoRezzollaZhidenko_h #include namespace Gyoto { namespace Metric { class RezzollaZhidenko; }; }; class Gyoto::Metric::RezzollaZhidenko : public Gyoto::Metric::Generic { friend class Gyoto::SmartPointer; private: double epsilon_; double rms_, rmb_; double* aparam_; double* bparam_; public: GYOTO_OBJECT; RezzollaZhidenko(); virtual ~RezzollaZhidenko(); virtual RezzollaZhidenko * clone() const ; // accessors GYOTO_OBJECT_ACCESSORS(double, epsilon); GYOTO_OBJECT_ACCESSORS(double, rms); GYOTO_OBJECT_ACCESSORS(double, rmb); void aparam(std::vector const &v); std::vector aparam() const; void bparam(std::vector const &v); std::vector bparam() const; double gmunu(const double * const x, int mu, int nu) const ; int diff(const double y[8], const double cst[5], double res[8]) const ; void circularVelocity(double const pos[4], double vel [4], double dir=1.) const ; double N2(const double rr) const; double B2(const double rr) const; double Nprime(const double rr) const; double Bprime(const double rr) const; int christoffel(double dst[4][4][4], const double * pos) const ; int isStopCondition(double const * const coord) const; double getRmb() const; double getRms() const; virtual double getPotential(double pos[4], double l_cst) const; virtual double getSpecificAngularMomentum(double rr) const; #endif }; Gyoto-1.2.0/include/GyotoRotStar3_1.h000066400000000000000000000104031302352257300173320ustar00rootroot00000000000000/** * \file GyotoRotStar3_1.h * \brief Numerical metric around a rotating star in 3+1 formalism * * */ /* Copyright 2011-2014, 2016 Frederic Vincent & Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoRotStar3_1_H_ #define __GyotoRotStar3_1_H_ #include #include namespace Lorene{ class Star_rot; } namespace Gyoto { namespace Metric { class RotStar3_1; } } #include #include #include #ifdef GYOTO_USE_XERCES #include #endif /** * \class Gyoto::Metric::RotStar3_1 * \brief Numerical metric around a rotating star in 3+1 formalism */ class Gyoto::Metric::RotStar3_1 : public Gyoto::Metric::Generic { friend class Gyoto::SmartPointer; private: char* filename_; ///< Lorene output file name Lorene::Star_rot * star_; ///< Pointer to underlying Lorene Star_rot instance int integ_kind_;///< 1 if RotStar3_1::myrk4(), 0 if Metric::myrk4() public: GYOTO_OBJECT; GYOTO_OBJECT_THREAD_SAFETY; RotStar3_1(); ///< Constructor RotStar3_1(const RotStar3_1& ) ; ///< Copy constructor virtual ~RotStar3_1() ; ///< Destructor virtual RotStar3_1* clone() const ; ///< Cloner (uses RotStar3_1(file, integ_kind)) void fileName(char const *); ///< Set filename_ char const * fileName() const; ///< Get filename_ void file(std::string const &); ///< Set filename_ std::string file() const; ///< Get filename_ void integKind(int); ///< Set integ_kind_ int integKind() const ; ///< Get integ_kind_ void genericIntegrator(bool); ///< Set !integ_kind_ bool genericIntegrator() const ;///< Get !integ_kind_ using Metric::Generic::myrk4; /** * \brief RK4 integrator * * NB: we use the 6-coordinates, here, unlike the inherited function. */ int myrk4(const double coord[6], double h, double res[6]) const; /** * \brief Adaptive RK4 integrator * * Dispatches between Generic::myrk4_adaptive() and myrk4_adaptive(const double coor[6], double lastnorm, double normref, double coornew[6], double cst[2], double& tdot_used, double h0, double& h1, double& hused) const depending on RotStar3_1::integ_kind_ */ int myrk4_adaptive(Gyoto::Worldline* line, const double coord[8], double lastnorm, double normref, double coordnew[8], double h0, double& h1, double h1max) const; /** * \brief RK4 integrator (3+1) * * NB: we use the 6-coordinates, here, unlike the inherited function. */ int myrk4_adaptive(const double coor[6], double lastnorm, double normref, double coornew[6], double cst[2], double& tdot_used, double h0, double& h1, double h1max, double& hused) const; /** * \brief F function such as dy/dtau=F(y,cst) */ int diff(const double coord[8], double res[8]) const ; /** * \brief Alternate version of diff(const double coord[8], double res[8]) const * * Using only 6 parameters. Last int is not used: it is only here to * distinguish the signature of the two methods. Could have been * done choosing another name, too, but hey... */ int diff(const double y[6], double res[6], int) const ; /** * \brief Tweak coordinates to insure conservation of cst */ void Normalize4v(const double coordin[6], double coordout[6], const double cst[2], double& tdot_used) const; double gmunu(const double * x, int mu, int nu) const ; double christoffel(const double coord[8], const int alpha, const int mu, const int nu) const ; double ScalarProd(const double pos[4], const double u1[4], const double u2[4]) const ; virtual int setParameter(std::string, std::string, std::string); }; #endif Gyoto-1.2.0/include/GyotoScenery.h000066400000000000000000000413671302352257300170560ustar00rootroot00000000000000/** * \file GyotoScenery.h * \brief Ray-tracing framework * * A Metric, an Astrobj and a Screen. */ /* Copyright 2011-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoScenery_H_ #define __GyotoScenery_H_ namespace Gyoto{ class Scenery; } #include #include #include #include #include #include #include #include #ifdef HAVE_MPI #include "GyotoFactory.h" #include #include #endif /** * \class Gyoto::Scenery * \brief Ray-tracing scene * * An Scenery contains: * - a Metric: used in Astrobj, Screen and Photon; * - a Screen: sets the field-of-view, the position of the camera, * the observation time, and the Spectrometer; * - an Astrobj: light emitter. * * * In addition, Quantities may be specified (or the default Quantity * will be produced: generally Intensity). Not all Astrobj implement * all Quantities. The order in which Quantities are listed is not * relevant (it is not stored). Possible Quantities: * * - Intensity: the intensity that reaches the object, integrated over * the line-of-sight; * - EmissionTime: date of emission; * - MinDistance: minimum distance between the Photon reaching each * pixel and the Astrobj; * - FirstDistMin: last closest approach between Photon and Astrobj; * - Redshift; * - ImpactCoords: 8-coordinates of the object and photon at impact; * - Spectrum: Iν computed at various values frequencies, * corresponding to the Screen's Spectrometer. * - BinSpectrum: * ∫ν1ν2Iνdν * computed between various (ν1, ν2 * pairs corresponding to the Screen's Spectrometer. This is what a * physical spectrometer measures. * * In addition, it is possible to ray-trace an image using several * cores on a single machine (if Gyoto has been compiled with POSIX * threads support). The number of threads can be specified using * NThreads entity. Setting NThreads to 0 is equivalent to setting it * to 1. Beware that setting NThreads to a number higher than the * actual number of cores available on the machine usually leads to a * decrease in performance. * * Finally, Scenery accepts a number of numerical tuning parameters * that are passed directly to the underlying photons (actually, the * Scenery object holds a Photon instance which stores many * parameters, including the Metric and Astrobj): * Adaptive/NonAdaptive, Delta, MinimumTime, MaxIter, PrimaryOnly. * * Thus a fully populated Scenery XML looks like that (the values are * examples, they are not necessary the default nor the best or even * good values): * \code * * * * * * * * * * * * * * Spectrum Intensity ... * * 2 * * Next come the numerical tuning parameters: * Integration step, initial in case of adaptive, reset for * for each ray being traced: * 1 * * Adaptive or NonAdaptive: * * * The integrator to use for integrating the photons: * runge_kutta_fehlberg78 * The "Legacy" integrator is coded in * Metric::Generic::myrk4_adaptive(), may be re-implemented in othe * metrics, and therefore takes its tuning parameters in the Metric * section. The other integrators (runge_kutta_fehlberg78, * runge_kutta_cash_karp54, runge_kutta_dopri5, * runge_kutta_cash_karp54_classic) accept the following tuning * parameters, directly in the Scenery section: * * Absolute and relative tolerance for the adaptive step: * 1e-11 * 1e-11 * Normally, you should not need to tune the other three. If you need * to, try using a higher order integrator: * maximum integration step: * 100 * delta_max/R where R is the current distance to the origin: * 0.1 * minimum step: * 1e-20 * * A few safe-guards to avoid infinite loops: * * Maximum number of iterations for each ray: * 1000000 * * Minimum date a photon may reach backwards in time: * 25e3 * * This one is an experimental, poorly specified feature: * * * * \endcode */ class Gyoto::Scenery : public Gyoto::SmartPointee, public Gyoto::Object { friend class Gyoto::SmartPointer; // Data : // ----- protected: /** * Screen, the camera for this scenery. */ SmartPointer screen_; /** * Default integration step for the photons */ double delta_; // default integration step for the photons /// Quantities to compute /** * Bitwise OR of quantities that will be computed, for instance: * \code * GYOTO_QUANTITY_INTENSITY | GYOTO_QUANTITY_EMISSIONTIME | ... * \endcode */ Gyoto::Quantity_t quantities_; /** * Used internally to not always reallocate memory when operator() * is called and to store all the parameters which affect the * integration, except delta_. */ Gyoto::Photon ph_; ///< Template Photon. /** * When compiled with libpthread, Scenery::rayTrace() may compute * several points of the image in parallel threads. This is the * number of threads to use. */ size_t nthreads_; ///< Number of parallel threads to use in rayTrace() int nprocesses_; ///< Number of parallel processes to use in rayTrace() # ifdef HAVE_UDUNITS /// See Astrobj::Properties::intensity_converter_ Gyoto::SmartPointer intensity_converter_; /// See Astrobj::Properties::intensity_converter_ Gyoto::SmartPointer spectrum_converter_; /// See Astrobj::Properties::intensity_converter_ Gyoto::SmartPointer binspectrum_converter_; # endif public: GYOTO_OBJECT_THREAD_SAFETY; # ifdef HAVE_MPI /// Team of processes for MPI /** * Rank 0 is the manager, other ranks are workers, instances of the * gyoto-mpi-worker executable. */ boost::mpi::communicator * mpi_team_; # endif /// True in instance of gyoto-mpi-worker, otherwise false. static bool am_worker; /// Spawn gyoto-mpi-worker processes /** * If nbchildren is -1 set #mpi_team_ to MPI_COMM_WORLD else spawn * nbchildren processes and set #nprocesses_ accordingly. If a * different number of workers are already running, terminate them * first. If nbchildren is 0, just terminate running workers. * * It is not recommended to mix usage of MPI_COMM_WORLD processes * and spawned processes in the same process. In other words: * - use only nbchlidren=-1 when the manager and workers have been * started with * \code * mpirun -np 1 manager : -np N gyoto-mpi-worker.version * \endcode * - use only nbchildren > 0 when only the manager has been * started with * \code * mpirun -np 1 manager * \endcode * * \param[in] nbchildren number of processes to spawn. */ void mpiSpawn(int nbchildren); /// Terminate gyoto-mpi-worker processes void mpiTerminate (); /// Send a copy of self to the mpi workers /** * Always call mpiClone() before ray-tracing if workers are running. */ void mpiClone(); /// Tags that may be sent to communicate with workers using MPI_Send() enum mpi_tag {give_task, read_scenery, terminate, raytrace, raytrace_done, ready, impactcoords, noimpactcoords}; /// Send a tag to workers void mpiTask(mpi_tag &tag); // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; GYOTO_WORLDLINE; Scenery(); ///< Set everything to defaults Scenery (const Scenery& o); ///< Copy constructor Scenery * clone() const; ///< Cloner /// Constructor setting Scenery::gg_, Scenery::screen_, and Scenery::obj_ /** * To ensure consistency, the Metric will be forcibly attached to * the Screen and to the Astrobj (if they are not NULL). */ Scenery(SmartPointer, SmartPointer, SmartPointer); ~Scenery(); // Mutators / assignment // --------------------- public: // Accessors // --------- SmartPointer metric() const; ///< Get ph_.Worldline::metric_ /** * The provided Metric will also be atached to the Screen and the Astrobj. */ void metric(SmartPointer); ///< Set Scenery::gg_ SmartPointer screen() const; ///< Get Scenery::screen_ /** * The Metric attached to the Scenery will be attached to the Screen */ void screen(SmartPointer);///< Set Scenery::screen_ SmartPointer astrobj() const; ///< Get ph_.obj_ /** * The Metric attached to the Scenery will be attached to the Astrobj */ void astrobj(SmartPointer); ///< Set ph_.obj_ SmartPointer clonePhoton() const; ///< Clone the internal Photon SmartPointer clonePhoton(size_t i, size_t j); ///< Clone the internal Photon SmartPointer clonePhoton(double a, double d); ///< Clone the internal Photon void updatePhoton(); ///< Update values in cached Photon double delta() const ; ///< Get default step in geometrical units double delta(const std::string &unit) const ; ///< Get default step in specified units void delta(double); ///< set default step in geometrical units void delta(double, const std::string &unit); ///< set default step in specified units void initCoord(std::vector c); std::vector initCoord() const; /// Set Scenery::quantities_ /** * \param quant Bitwise OR of desired quantities, e.g. \code GYOTO_QUANTITY_SPECTRUM | GYOTO_QUANTITY_MIN_DISTANCE \endcode */ void setRequestedQuantities(Quantity_t quant) ; /// Set Scenery::quantities_ from string /** * \param squant Coma-separated list of quantities, e.g. "Spectrum * MinDistance". The order is not relevant. */ void requestedQuantitiesString(std::string const &squant) ; /// Get Scenery::quantities_ Quantity_t getRequestedQuantities() const ; /// Get a string representation of Scenery::quantities_ std::string requestedQuantitiesString() const ; /// Get number of requested quantities of scalar nature /** * This is all quantities except Spectrum, BinSpectrum and ImpactCoords. */ size_t getScalarQuantitiesCount(Quantity_t *q=NULL) const ; /// Get ph_.tmin_ double tMin() const ; /// Get ph_.tmin_ in specified unit double tMin(const std::string &unit) const ; /// Set ph_.tmin_ void tMin(double); /// Set ph_.tmin_ in specified unit void tMin(double, const std::string &unit); void adaptive (bool mode) ; ///< Set ph_.adaptive_ bool adaptive () const ; ///< Get ph_.adaptive_ /// Passed to #ph_ void integrator(std::string type); /// Passed to #ph_ std::string integrator() const; /// Passed to #ph_ double deltaMin() const; /// Passed to #ph_ void deltaMin(double h1); /// Passed to #ph_ double deltaMax() const; /// Passed to #ph_ void deltaMax(double h1); /// Passed to #ph_ double deltaMaxOverR() const; /// Passed to #ph_ void deltaMaxOverR(double t); /// Passed to #ph_ void absTol(double); /// Passed to #ph_ double absTol()const; /// Passed to #ph_ void relTol(double); /// Passed to #ph_ double relTol()const; void secondary (bool sec) ; ///< Set ph_.secondary_ bool secondary () const ; ///< Get ph_.secondary_ void maxiter (size_t miter) ; ///< Set ph_.maxiter_ size_t maxiter () const ; ///< Get ph_.maxiter_ void nThreads(size_t); ///< Set nthreads_; size_t nThreads() const ; ///< Get nthreads_; void nProcesses(size_t); ///< Set nprocesses_; size_t nProcesses() const ; ///< Get nprocesses_; /// Set Scenery::intensity_converter_ void intensityConverter(std::string unit); /// Set Scenery::spectrum_converter_ void spectrumConverter(std::string unit); /// Set Scenery::binspectrum_converter_ void binSpectrumConverter(std::string unit); /// Copy converters to Astrobj::Properties instance /** * Copy Scenery::intensity_converter_, Scenery::spectrum_converter_ * and Scenery::binspectrum_converter_ to there alter ego in *prop. */ void setPropertyConverters(Gyoto::Astrobj::Properties *prop); // Worker: public: /// Perform ray-tracing /** * For each directions specified, launch a Photon back in time to * compute the various quantities. * * At this time, the computed quantities depend on on the pointers * in *data which are not NULL. * * rayTrace() uses * - setPropertyConverters() to set the converters in *data; * - Astrobj::Properties::init() to initialize each cell in *data; * - Astrobj::Properties::operator++() to step through the arrays in *data. * * data must have been instantiated prior to calling rayTrace and * the various pointers in *data must be NULL or point to the first * cell in an array of size at least Screen::npix_ squared. * * If MPI support is built-in, MPI_Init() has been called, and * nprocesses_ is ≥1, then rayTrace() will use several processes, * launching them using mpiSpawn() if necessary. * * Else, if Scenery::nthreads_ is ≥2 and Gyoto has been compiled with * pthreads support, rayTrace() will use Scenery::nthreads_ threads * and launch photons in parallel. This works only if the * Astrobj::Generic::clone() and Metric::Generic::clone() methods * have been properly implemented for the specific astrobj and * metric kind, and if they are both thread-safe. At the moment, * unfortunately, Lorene metrics are known to not be thread-safe. * * \param[in] ij Screen::Coord2dSet specification of rays to trace. e.g.: * * \code * Screen::Range irange(imin, imax, di); * Screen::Range jrange(jmin, jmax, dj); * Screen::Grid ij(irange, jrange); * \endcode * * \param[in, out] data Pointer to a preallocated * Astrobj::Properties instance which sets which quantities must be * computed and where to store the output. * * \param[in] impactcoords Optional pointer to an array of * pre-computed impact coordinates. If impactcoords is provided, * rayTracing is skipped and the quantities in *data are fill * assuming that the impact coordinates are correct. This only makes * sense in optically thick mode, when ray-tracing several sceneries * for which the shape of the object is identical but their emission * distributions are not. impactcoords can be computed using the * ImpactCoords quantity. */ void rayTrace( #ifdef GYOTO_SWIGIMPORTED Coord2dSet & ij, #else Screen::Coord2dSet & ij, #endif Astrobj::Properties *data, double * impactcoords=NULL); /// Ray-trace a single pixel in Scenery::screen_ /** * Almost identical to rayTrace(), but for a single pixel. * * If ph is passed, it is assumed to have been properly initialized * (with the right metric and astrobj etc.) already. Else, use * &Scenery::ph_. */ void operator() (size_t i, size_t j, Astrobj::Properties *data, double * impactcoords = NULL, Photon * ph = NULL); /// Ray-trace single direction /** * Almost identical to rayTrace(), but for a single direction. * * If ph is passed, it is assumed to have been properly initialized * (with the right metric and astrobj etc.) already. Else, use * &Scenery::ph_. */ void operator() (double alpha, double delta, Astrobj::Properties *data, Photon * ph = NULL); #ifdef GYOTO_USE_XERCES public: // Override fillProperty() to issue InitCoord only if it was set void fillProperty(FactoryMessenger *fmp, Property const &p) const ; // Override fillElement to fill metric, screen and astrobj first void fillElement(FactoryMessenger *fmp) const; /// Instanciate Scenery from an XML description. static SmartPointer Subcontractor(Gyoto::FactoryMessenger*); #endif }; #endif Gyoto-1.2.0/include/GyotoScreen.h000066400000000000000000000574511302352257300166660ustar00rootroot00000000000000/** * \file GyotoScreen.h * \brief Description of the observer screen * */ /* Copyright 2011-2016 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoScreen_H_ #define __GyotoScreen_H_ #include #include #include #if defined HAVE_BOOST_ARRAY_HPP #include #define GYOTO_ARRAY boost::array #else template class GYOTO_ARRAY { private: T buf[sz]; public: T& operator[](size_t c) { return buf[c] ; } }; #endif namespace Gyoto { class Screen; } #include #include #include #include #include #include /** * \class Gyoto::Screen * \brief The camera with which the Astrobj is observed * * In the observer-centric point-of-view, the center of the Metric's * coordinate system is positioned relatively to the observing Screen * using three Euler angles and the distance (in meters). The three * Euler angles are: * - position angle of the line of nodes (North of East); * - inclination (0 = face-on); * - argument of the X axis of the Metric's coordinate system. * We use the z-x-z convention. * See http://en.wikipedia.org/wiki/Euler_angles * * In addition, the Screen conveys: * - the observing date (in geometrical units, but expect it to * change to seconds in a future version); * - the field-of-view of the image; * - the resolution of the camera: number of pixels on each side * (the camera is square); * - the observing frequency. * * The scalar FreqObs defines the observing frequency for Scenery * quantity Intensity. * * Likewise, a Gyoto::Spectrometer defines for which frequencies * spectra are computed (when the Quantity Spectrum is requested in * the Scenery). * * For the sake of theoreticians, there is an alternate way of * specifying the relative position of the Screen and Metric, by * specifying the 4-coordinates of the Screen in the Metric's * coordinate system (in that case, eerything is specified in * geometrical units). * * So an XML stanza for a Screen may look like that: * \code * * * 0.3141592653589793 * 128 * 1e30 * 3.14159 * 2.0944 * -2.0944 * 17. 23. * 1e20 * * \endcode * * or like that: * * \code * * 1000. 1000. 0.15. 0. * 0.3141592653589793 * 128 * 17. 23. * 1e20 * * \endcode * * * Units can be specified using the unit attribute in the XML file, * for instance: * * \code * 8 * \endcode * * Possible units are (with [] noting the default): * - distance: [m], geometrical, cm, km, AU, ly, pc, kpc, Mpc; * - PALN, inclination, argument: [rad], deg. * - frequency: [Hz], µm, GeV... * * When the distance is really large and most of the ray-tracing would * happen de facto in flat space, the camera is transported to a * location at a reasonable distance from the metric and the images * are scaled accordingly. The default value for this distance should * be fine, but it can be customized using the "dmax" attribute of the * "Distance" element. "dmax" is always expressed in geometrical * units: * * \code * 8 * \endcode * * Symptoms when dmax is too large include pixelization of the image * (neighbouring photons are numerically identical) and other * numerical overflows. dmax is too small when it is apparent that * changing it yields projection effects. dmax must be large compared * to rmax in the Astrobj and ideally, changing it by an order of * magnitude should not yield significant changes in the ray-traced * image. * * A mask may be used to limit ray-tracing to only some portions of * the field. The Scenery checks whether a mask is to be used using * Screen::operator()(size_t i, size_t j). The mask can be loaded from * a FITS file as a square image of doubles: * \code * maskfile.fits * \endcode * The mask needs to be have the same size as the Screen itself, so * loading a mask also sets the resolution, and changing the * resolution after setting a mask also removes the mask. The content * of the Mask entity is parsed by Factory::fullPath(), so it can be * an absolute path, a path relative to where the XML file is stored, * or relative to the current working directory if prefixed with * "`pwd`/". * */ class Gyoto::Screen : public Gyoto::SmartPointee, public Gyoto::Object { friend class Gyoto::SmartPointer; private: double tobs_; ///< Observing date in s double fov_; ///< Field-of-view in rad // double tmin_; size_t npix_; ///< Resolution in pixels /** * \brief Mask with 0 where the ray-tracing should not be performed */ double * mask_; /** * \brief Last read or written FITS file * * Used when saving to XML: if the mask was saved or loaded from * FITS file, output this file name in the XML. */ std::string mask_filename_; double distance_; ///< Distance to the observer in m double dmax_; ///< Maximum distance from which the photons are launched (geometrical units) enum anglekind_e { equatorial_angles=0, rectilinear=1, spherical_angles=2}; typedef int anglekind_t; anglekind_t anglekind_; ///< Screen angles kind (0: equatorial, 1: spherical) /** * The angles are position angle of the line of nodes (North of * East), inclination (0 = face-on), argument of X axis. We use the * z-x-z convention. See http://en.wikipedia.org/wiki/Euler_angles */ double euler_[3]; ///< Euler angles double ex_[3]; ///< Sky coordinate of base X vector double ey_[3]; ///< Sky coordinate of base Y vector double ez_[3]; ///< Sky coordinate of base Z vector double fourvel_[4]; ///< Observer's 4-velocity double screen1_[4]; ///< Screen e1 vector double screen2_[4]; ///< Screen e2 vector double screen3_[4]; ///< Screen e3 vector (normal) double alpha0_; ///< Screen orientation (0,0) is right towards the BH double delta0_; ///< Screen orientation (0,0) is right towards the BH SmartPointer gg_; ///< The Metric in this end of the Universe /** * \brief Gyoto::Spectrometer::Generic subclass instance used for quantities Spectrum and BinSpectrum */ SmartPointer spectro_; /** * \brief Frequency at which the observer observes * * For the quantity Intensity */ double freq_obs_; /** * \brief What kind of observer are we considering? (At infinity, ZAMO...) * */ std::string observerkind_; public: GYOTO_OBJECT; GYOTO_OBJECT_THREAD_SAFETY; // Constructors - Destructor // ------------------------- Screen() ; ///< Default constructor Screen(const Screen& ) ; ///< Copy constructor Screen * clone() const; ///< Cloner virtual ~Screen() ; ///< Destructor // Mutators / assignment // --------------------- /// Set inclination etc. void setProjection(const double paln, const double inclination, const double argument); /// Set distance, inclination etc. void setProjection(const double distance, const double paln, const double inclination, const double argument); /// Set distance from observer /** * \param dist Distance in meters. */ void distance(double dist); /// Set ray-tracing maximum distance /** * \param dist Distance in geometrical units. */ void dMax(double dist); /// Set distance from observer /** * \param dist the distance expressed in the specified unit; * \param unit convertible to meters */ void distance(double dist, const std::string &unit); /// Set inclination relative to line-of-sight /** * Inclination of z-axis relative to line-of-sight, or inclination * of equatorial plane relative to plane of the sky, in radians */ void inclination(double); /// Set inclination relative to line-of-sight /** * Inclination of z-axis relative to line-of-sight, or inclination * of equatorial plane relative to plane of the sky, in specified unit. */ void inclination(double, const std::string &unit); void PALN(double); ///< Set position angle of the line of nodes void PALN(double, const std::string &unit); ///< Set position angle of the line of nodes void argument(double); ///< Set angle beetwen line of nodes and X axis of object void argument(double, const std::string &unit); ///< Set angle beetwen line of nodes and X axis of object void spectrometer(SmartPointer spectro); ///< Set Screen::spectro_ SmartPointer spectrometer() const ; ///< Get Screen::spectro_ /** * \brief Set freq_obs_ * \param fo double: observing frequency in Hz */ void freqObs(double fo); /** * \brief Set freq_obs_ * \param fo double: observing frequency (or wavelength) in "unit" * \param unit string: unit in which fo is expressed, convertable to * Herz or meters or energy. */ void freqObs(double fo, const std::string &unit); /** * \brief Get freq_obs_. */ double freqObs() const ; /** * \brief Get freq_obs_. * \param unit string: unit in which freq_obs_ should be returned is * expressed, convertable to Herz or meters or energy. */ double freqObs(const std::string &unit) const; /// Alternative way to set projection /** * Beware : paln can not be set this way, setting later other * parameters change the observer's coordinates. For observationnal * ray-tracing purposes, prefer setProjection(). * * \param[in] pos position of observer in Screen's coordinate * system. Content is copied. */ void setObserverPos(const double pos[4]); void observerKind(const std::string &kind); std::string observerKind() const; void setFourVel(const double coord[4]); ///< Sets the observer's 4-velocity void setScreen1(const double coord[4]); ///< Sets the screen vector e1 void setScreen2(const double coord[4]); ///< Sets the screen vector e2 void setScreen3(const double coord[4]); ///< Sets the screen vector e3 (normal) // Accessors // --------- /// Get coordinate kind /** * From Screen::gg_. */ int coordKind() const; /// Get distance from observer /** * In meters. */ double distance() const; /// Get distance from observer /** * In specified unit. */ double distance(const std::string&) const; ///< Get distance from observer /// Get maximum ray-tracing distance /** * In geometrical units. */ double dMax() const; /// Get inclination relative to line-of-sight /** * Inclination of z-axis relative to line-of-sight, or inclination * of equatorial plane relative to plane of the sky, in radians. */ double inclination() const; /// Get inclination relative to line-of-sight /** * Inclination of z-axis relative to line-of-sight, or inclination * of equatorial plane relative to plane of the sky, in specified unit. */ double inclination(const std::string&) const; double PALN() const; ///< Get position angle of the line of nodes double PALN(const std::string&) const; ///< Get position angle of the line of nodes double argument() const; ///< Get angle between line of nodes and X axis of object double argument(const std::string&) const; ///< Get angle between line of nodes and X axis of object SmartPointer metric() const; ///< Get Screen::gg_ void metric(SmartPointer gg); ///< Set Screen::gg_ /// Get observing date in seconds double time() const; /// Get observing date in seconds double time(const std::string &) const; /// Set observing date in specified unit void time(double, const std::string &); /// Set observing date in seconds void time(double); /// Get Screen::fov_ in radians double fieldOfView() const; /// Get Screen::fov_ in specified unit double fieldOfView(std::string const &unit) const; /// Set Screen::fov_ in radians void fieldOfView(double); /// Set Screen::fov_ in specified unit void fieldOfView(double, const std::string &unit); /// Set direction of the center of the field void alpha0(double); /// Set direction of the center of the field in specified unit void alpha0(double, const std::string &unit); /// Get direction of the center of the field double alpha0() const; /// Get direction of the center of the field in specified unit double alpha0(std::string const &unit)const; /// Set direction of the center of the field void delta0(double); /// Set direction of the center of the field in specified unit void delta0(double, const std::string &unit); /// Get direction of the center of the field double delta0() const; /// Get direction of the center of the field in specified unit double delta0(std::string const &unit)const; /// Set Screen::anglekind_ void anglekind(int); void anglekind(std::string const&); std::string anglekind() const; /// Get Screen::npix_ size_t resolution() const; /// Set Screen::npix_ void resolution(size_t); /// Set mask_ from array /** * mm will be copied. mm must be a square resolution x resolution * array. If mm==NULL, just deallocate mask_. */ void mask(double const * const mm, size_t resolution=0); /// Retrieve const pointer to mask_ double const * mask() const ; void maskFile(std::string const &fname); std::string maskFile() const; # ifdef GYOTO_USE_CFITSIO /// Read mask_ from FITS file void fitsReadMask(std::string const &fname); /// Save mask_ from FITS file void fitsWriteMask(std::string const &fname); # endif /// Whether this pixel should be ray-traced /** * If mask_ is not set, always true. Else, true for non-zero cells * in mask_. */ bool operator()(size_t, size_t); /// 4-Position of the observer relative to the metric /** * A Screen is positioned relative to the observer with four elements: * Screen::distance, Screen::inclination, Screen::paln and * Screen::argument. * * This function returns the position of the observer relative to * the metric system in Screen::gg_, using these parameters. The * output parameter is coord. * * \param[out] coord position of the observer. Must be preallocated. */ void getObserverPos(double dest[4]) const; /// Get copy of Screen::fourvel_ /** * \param[out] fourvel preallocated 4-element array */ void getFourVel(double dest[4]) const; void fourVel(std::vector const &); std::vector fourVel() const; void screenVector1(std::vector const &); std::vector screenVector1() const; void screenVector2(std::vector const &); std::vector screenVector2() const; void screenVector3(std::vector const &); std::vector screenVector3() const; /// Get copy of Screen::screen1_ /** * \param[out] dest preallocated 4-element array */ void getScreen1(double dest[4]) const; /// Get copy of Screen::screen2_ /** * \param[out] dest preallocated 4-element array */ void getScreen2(double dest[4]) const; /// Get copy of Screen::screen3_ /** * \param[out] dest preallocated 4-element array */ void getScreen3(double dest[4]) const; /// Get 8-coordinate of Photon hitting screen from a given direction /** * Similar to Screen::getObserverPos() but will return in addition * the 4-velocity of a photon corresponding to the sky direction * given by x and y. * \param[in] x RA (d_alpha*cos(delta)) offset in radians; * \param[in] y Dec offset (d_delta) in radians; * \param[out] dest position-velocity of the observer Photon. Preallocated. * */ void getRayCoord(double x, double y, double dest[8]) const; /// Get 8-coordinate of Photon hitting screen pixel /** * Similar to Screen::getObserverPos() but will return in addition * the 4-velocity of a photon corresponding to the sky direction * given by x and y. * \param[in] i, j pixel coordinates * \param[out] dest position-velocity of the Photon. Preallocated. * */ void getRayCoord(const size_t i, const size_t j, double dest[8]) const; void coordToSky(const double pos[4], double dest[3]) const; ///< Convert 4-position to 3-sky position void coordToXYZ(const double pos[4], double dest[3]) const; ///< Convert 4-position to 3-cartesian coordinates void computeBaseVectors() ; ///< Compute base vectors according to projection parameters /// Display // friend std::ostream& operator<<(std::ostream& , const Screen& ) ; std::ostream& print(std::ostream&) const ; ///< Debug helper std::ostream& printBaseVectors(std::ostream&) const ; ///< Debug helper // UDUNITS # ifdef HAVE_UDUNITS /// Map "pix" and "pixel" to angular pixel width in unit system /** * "pix" or "pixel" can then be used in units. * * There is only one unit system in Gyoto: "pix" can therefore be * registered only for one Screen at a time. See Gyoto::Units. * * The unit must later be unmapped with unmapPixUnit(). */ void mapPixUnit(); /// Unmap "pix" and "pixel" from unit system /** * See also mapPixUnit(). */ void unmapPixUnit(); # endif #ifdef GYOTO_USE_XERCES public: void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const; /// Instanciate a Screen from XML entity static SmartPointer Subcontractor(FactoryMessenger* fmp); #endif /// Enum to specify whether a coordinate set (Coord1dSet or Coord2dSet) holds pixel values or angles enum CoordType_e {angle, pixel}; /// Set of 1-d coordinates: indices or angles /** * Acts like a container (array-like) of either size_t (pixel * coordinate) or double (angle) values. This container can be * iterated-through using the operator++(), derefenced using the * operator*() (if containing pixel coordinates) or angle() (in * containing angles). */ class Coord1dSet { public: /// Whether this specifier represents angles or pixels const CoordType_e kind; public: /// Set kind during initialization Coord1dSet(CoordType_e k); /// Virtual destructor virtual ~Coord1dSet(); /// Reset specifier to point to the first value virtual void begin() =0; /// True if pointing to something, false if end has been reached. virtual bool valid() =0; /// Number of values in this container virtual size_t size()=0; /// Get size_t value currently pointed to virtual size_t operator*() const ; /// Get double value currently pointed to virtual double angle() const ; /// Increment iterator (point to next value) virtual Coord1dSet& operator++()=0; /// Get index of value currently pointed to /** * Starts at 0 and is implemented each time operator++ is * called. Depending on the implementation, this may be a real * index or computed on demand. */ virtual size_t index() const=0; }; /// Class to specify a set of points on the Screen /** * Container (array-like) holding several 2D points. Can be a 2D * grid of pixel coordinates or a vector of floating-point (alpha, * delta) pairs, for instance. */ class Coord2dSet { public: /// Whether this set holds pixels or angle specifications const CoordType_e kind; /// Set kind at initialisation Coord2dSet(CoordType_e k); /// Virtual destructor virtual ~Coord2dSet(); /// Increment pointer virtual Coord2dSet& operator++() =0; /// Get pixel coordinates virtual GYOTO_ARRAY operator* () const; /// Get angle coordinates virtual GYOTO_ARRAY angles() const ; /// Reset pointer virtual void begin() =0; /// Whether the end has not been passed virtual bool valid() =0; /// Number of positions contained virtual size_t size()=0; }; /// Class containing 2D-points organized in a grid class Grid: public Coord2dSet { protected: protected: /// If non-NULL, cout j each tims it is incremented. const char * const prefix_; Coord1dSet &iset_; Coord1dSet &jset_; public: Grid(Coord1dSet &iset, Coord1dSet &jset, const char * const p=NULL); virtual Coord2dSet& operator++(); virtual GYOTO_ARRAY operator* () const; virtual void begin(); virtual bool valid(); virtual size_t size(); }; /// Class containing arbitrary 2D-points /** * ispec_ and jspec_ must be the same size. */ class Bucket : public Coord2dSet { protected: Coord1dSet &alpha_; Coord1dSet &delta_; public: Bucket(Coord1dSet &iset, Coord1dSet &jset); virtual Coord2dSet& operator++(); virtual GYOTO_ARRAY angles() const; virtual GYOTO_ARRAY operator*() const; virtual void begin(); virtual bool valid(); virtual size_t size(); }; /// A dummy, empty 2D set. class Empty: public Coord2dSet { public: Empty(); virtual Coord2dSet& operator++(); virtual void begin(); virtual bool valid(); virtual size_t size(); }; /// 1D coordinated specifier for a range class Range : public Coord1dSet { protected: const size_t mi_, ma_, d_, sz_; size_t cur_; public: /// Specify min, max and step of this range. Range(size_t mi, size_t ma, size_t d); void begin(); bool valid(); size_t size(); Coord1dSet& operator++(); size_t operator*() const ; virtual size_t index() const ; }; /// 1D specifier for an arbitrary pixel coordinate set. class Indices : public Coord1dSet { protected: size_t const * const indices_; size_t const sz_; size_t i_; public: Indices (size_t const*const buf, size_t sz); void begin(); bool valid(); size_t size(); Coord1dSet& operator++(); size_t operator*() const ; virtual size_t index() const ; }; /// 1D specifier for an arbitrary angle coordinate set. class Angles : public Coord1dSet { protected: double const * const buf_; size_t const sz_; size_t i_; public: Angles (double const*const buf, size_t sz); void begin(); bool valid(); size_t size(); Coord1dSet& operator++(); double angle() const ; virtual size_t index() const ; }; /// 1D specifier for an angle that is repeated. class RepeatAngle : public Coord1dSet { protected: double const val_; size_t const sz_; size_t i_; public: RepeatAngle (double val, size_t sz); void begin(); bool valid(); size_t size(); Coord1dSet& operator++(); double angle() const ; virtual size_t index() const ; }; }; #endif Gyoto-1.2.0/include/GyotoSmartPointer.h000066400000000000000000000217511302352257300200700ustar00rootroot00000000000000/** * \file GyotoSmartPointer.h * \brief Reference-counting pointers Template class Gyoto::SmartPointer performs reference counting on its pointee and makes sure the pointed to object is actually deleted when the number of references to it drops to zero. The pointed-to object must inherit from Gyoto::SmartPointee for this to work and be referenced to only by SmartPointers. @code class Gyoto::Metric : public Gyoto::SmartPointee {...}; SmartPointer ObjPtr (new Gyoto::Metric(...)); @endcode */ /* Copyright 2011-2014, 2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoSmartPointer_H_ #define __GyotoSmartPointer_H_ #include "GyotoUtils.h" #ifdef HAVE_PTHREAD #include #endif namespace Gyoto { class SmartPointee; class FactoryMessenger; template class SmartPointer; } #include #include #include #include #include #include /** * \brief Can be pointed to by a SmartPointer * * A class can be pointed to by a SmartPointer when it inherits from * class SmartPointee. * * The SmartPointee methods need to be public to be accessed by all * the SmartPointer < T > classes. However, it is a bad idea to * manipulate the counter directly. To protect these methods inside * your derive object, you can do as in the following example: * * @code * class Gyoto::Metric : protected Gyoto::SmartPointee * { * friend class Gyoto::SmartPointer; * ... * }; * @endcode * */ class Gyoto::SmartPointee { private: int refCount; ///< Reference counter. # ifdef HAVE_PTHREAD /** * When compiled with libpthread */ pthread_mutex_t mutex_; ///< A mutex #endif public: SmartPointee () ; virtual ~SmartPointee() ; SmartPointee (const SmartPointee&) ; ///< Copy constructor void incRefCount () ; ///< Increment the reference counter. Warning: Don't mess with the counter. int decRefCount () ; ///< Decrement the reference counter and return current value. Warning: Don't mess with the counter. int getRefCount () ; ///< Get the current number of references /** * Various classes need to provide a subcontractor to be able to * instantiate themselves upon order from the Factory. A * subcontractor is a function (often a static member function) * which accepts a pointer to a FactoryMessenger as unique * parameter, communicates with the Factory using this messenger to * read an XML description of the object to build, and returns this * objet. SmartPointee::Subcontractor_t* is just generic enough a * typedef to cast to and from other subcontractor types: * Astrobj::Subcontractor_t, Metric::Subcontractor_t, * Spectrum::Subcontractor_t. A subcontractor needs to be registered * using the relevant Register() function: Astrobj::Register(), * Metric::Register(), Spectrum::Register(). */ typedef Gyoto::SmartPointer Subcontractor_t(Gyoto::FactoryMessenger*, std::vector const &); ///< A subcontractor builds an object upon order from the Factory }; /** * \brief Pointers performing reference counting * * Pointee must inherit from class SmartPointee. * * To create an object and a SmartPointer pointing to it: * * \code * SmartPointer ObjPtr (new Gyoto::Metric(...)); * \endcode * * \tparam T Sub-class of Gyoto::SmartPointee. */ template< class T > class Gyoto::SmartPointer { private: /** * \brief Real pointer, don't mess with it. */ T *obj; private: /** * \brief Decrement the reference counter. Warning: don't mess with it. */ void decRef () { if (obj && obj->decRefCount() == 0) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(obj); # endif delete obj; obj = NULL; } } public: /** * \brief Constructor from a standard pointer-to-class * * \param orig : a pointer to an instance of class T, created using new T(). * * Example: * \code * SmartPointer ObjPtr (new Gyoto::Metric(...)); // create SmartPointer ObjPtr * \endcode */ SmartPointer (T *orig = NULL) : obj(orig) { if (obj) obj->incRefCount(); } /** * \brief Copy constructor from same type * * \param orig : a SmartPointer to an instance of class T * * Example: * \code * SmartPointer ObjPtr (new Gyoto::Metric(...)); // create SmartPointer ObjPtr * SmartPointer ObjPtr2 = ObjPtr; // create SmartPointer ObjPtr2 * \endcode * * ObjPtr and ObjPtr2 point to the same instance of class T. Copying * increments the reference counter. */ SmartPointer (const SmartPointer< T > &orig) { obj = orig.obj; if (obj) obj->incRefCount (); } /** * \brief Copy constructor from compatible type (used for casting) * * \param orig : a SmartPointer to an instance of another class U * * Example: MetricPtr is a SmartPoiter, but really points to * an instance of the child class Gyoto::Kerr: * * \code * SmartPointer KerrPtr (MetricPtr); * \endcode * * MetricPtr and KerrPtr point to the same instance of class * Kerr. The methods specific to class Kerr are available only to * KerrPtr. */ template SmartPointer(const SmartPointer& orig) { obj = dynamic_cast(const_cast(orig())); if (obj) obj->incRefCount (); } /** * \brief Dereference operator "*" * * \return address of the pointed-to-object */ T& operator* () { if (!obj) Gyoto::throwError("Null Gyoto::SmartPointer dereference in operator*"); return *obj; } /** * \brief Dereference operator "*" * * \return address of the pointed-to-object */ const T& operator* () const { if (!obj) Gyoto::throwError("Null Gyoto::SmartPointer dereference in operator*"); return *obj; } /** * \brief Dereference operator "->" * * Access to the pointed-to-object's members. */ T* operator-> () { if (!obj) Gyoto::throwError("Null Gyoto::SmartPointer dereference in operator->"); return obj; } /** * \brief Dereference operator "->" (const) * * Access to the pointed-to-object's members. */ T* operator-> () const { if (!obj) Gyoto::throwError("Null Gyoto::SmartPointer dereference in operator->"); return obj; } /** * \brief Comparison operator between two SmartPointer of same kind */ bool operator== (const SmartPointer< T >&right) { return obj == right.obj; } /** * \brief Comparison operator between two SmartPointer of same kind */ bool operator!= (const SmartPointer< T >&right) { return obj != right.obj; } /** * \brief Copy a SmartPointer to another (already defined) * SmartPointer of same kind */ SmartPointer< T > &operator= (SmartPointer< T > &right) { if (this == &right) return *this; if (right.obj) right.obj->incRefCount (); decRef (); obj = right.obj; return *this; } /** * \brief Copy a normal pointer to an (already defined) * SmartPointer of same kind */ SmartPointer< T > &operator= (T* right) { if (obj == right) return *this; decRef (); obj = right; if (obj) obj->incRefCount(); return *this; } /** * \brief Cast SmartPointer to normal pointer */ // template operator U() { return obj; } operator T*() const { return obj; } #if 0 operator const T*() { return obj; } /** * \brief Check whether SmartPointer is valid * \return 0 if SmartPointer is NULL, 1 if valid. */ operator bool () const { return obj != NULL; } /** * \brief Check whether SmartPointer is valid * \return 1 if SmartPointer is NULL, 0 if valid. */ bool operator! () const { return obj == NULL; } #endif ~SmartPointer< T > () { decRef(); } public: /** * \brief Get standard, non-smart pointer to object. Use with care. * * This public method is needed to cast from a SmartPointer flavor * to another. It should almost certainly never be used in user * code, except perhaps for debugging purposes. * * \return usual pointer to object, T*. * */ // const T* address() const { return obj; } const T* operator()() const { return obj; } }; #endif Gyoto-1.2.0/include/GyotoSpectrometer.h000066400000000000000000000264521302352257300201200ustar00rootroot00000000000000/** * \file GyotoSpectrometer.h * \brief Spectroscopic capabilities of a Screen * * Describes the spectroscopic capabilites of a Screen. * */ /* Copyright 2011-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoSpectrometer_H_ #define __GyotoSpectrometer_H_ #include #include #include #include #include #include /** * \namespace Gyoto::Spectrometer * \brief Access to spectrometers * * Objects which describe spectrometers (including one-channel * devices, a.k.a cameras) must inherit from the * Gyoto::Spectrometer::Generic class. * * To be usable, a Spectrometer::Generic sub-class should register a * Spectrometer::Subcontractor_t function using the Spectrometer::Register() * function. See also \ref writing_plugins_page . */ namespace Gyoto{ namespace Register { class Entry; } class FactoryMessenger; namespace Spectrometer { /** * \class Gyoto::Spectrometer::Generic * * \brief Base class for spectrometers * * Example: class Gyoto::Spectrometer::Uniform * * See Gyoto::Spectrometer for an introduction. * * Generic inherits from Gyoto::SmartPointee so that it is * possible to create a SmartPointer to a Spectrometer. * * It also inherits from Gyoto::Hook::Teller. This allows a * consistent implementation of Spectrometer::Complex (in * particular). Any method which mutates a Spectrometer should * call tellListeners(). */ class Generic; /** * \brief Type for Spectrometer kind * * Spectrometer kindid is a unique numerical identifier for that kind, * produced as the address to a static C string variable holding the * kind's name. Most of the time, the address is the only * significant part as this is more reliable and allows for direct * numerical comparison instead of slower string comparison. The * value of the string variable can be used for printing and as * anchor name for Register(), although the anchor name could be * different. */ typedef char const * kind_t; /** * This is a more specific version of the * SmartPointee::Subcontractor_t type. A Spectrometer::Subcontrator_t * is called by the Gyoto::Factory to build an instance of the * kind of spectrometer specified in an XML file (see * Register()). The Factory and Subcontractor_t function * communicate through a Gyoto::FactoryMessenger. */ typedef SmartPointer Subcontractor_t(Gyoto::FactoryMessenger*, std::vector const &); ///< A function to build instances of a specific Astrobj::Generic sub-class /** * \brief Query the Spectrometer register * * Get the Spectrometer::Subcontractor_t correspondig to a given * kind name. This function is normally called only from the * Gyoto::Factory. If plugin is specified, only a * subcontractor matching both name and plugin will be returned, * loading the plug-in if necessary. If plugin is the empty * string, then the first subcontractor matching name will be * returned, and the name of the plug-in it belongs to will be * returned in plugin upon output. * * \param[in] name Name of the subclass to build, e.g. "Complex" * or "wave". * \param[inout] plugin e.g. "stdplug". * \param errmode[in] If name is not registered, * getSubcontractor() return NULL errmode==1, throws a * Gyoto::Error if errmode==0. * \return pointer to the corresponding subcontractor. */ Gyoto::Spectrometer::Subcontractor_t* getSubcontractor(std::string name, std::vector &plugins, int errmode = 0); /** * \brief A template for Subcontractor_t functions * * Instead of reimplementing the wheel, your subcontractor can * simply be Gyoto::Spectrometer::Subcontractor. It must * however implement setParameters(). * * \tparam T A Spectrometer::Generic sub-class. */ template SmartPointer Subcontractor (FactoryMessenger* fmp, std::vector const &plugins) { SmartPointer spectro = new T(); spectro -> plugins(plugins); #ifdef GYOTO_USE_XERCES if (fmp) spectro -> setParameters(fmp); #endif return spectro; } /** * \brief The Spectrometer register * * Use the Spectrometer::initRegister() once in your program to * initiliaze it, the Spectrometer::Register() function to fill it, and * the Spectrometer::getSubcontractor() function to query it. */ extern Gyoto::Register::Entry * Register_; /** * \brief Initialize the Spectrometer register * This must be called once. It initializes Register_ and * registers the standard kinds (Uniform and Complex). */ void initRegister(); /** * \brief Register a new Spectrometer kind * * Register a new Spectrometer::Generic sub-class so that the * Gyoto::Factory knows it. * * \param name The kind name which identifies this object type in * an XML file, as in <Spectrometer kind="name">. For * clarity, this should be the same as the value of kindid_ for this * object, but it is not mandatory. * * \param scp A pointer to the subcontractor, which will * communicate with the Gyoto::Factory to build an instance of * the class from its XML description. If all parameters can be * set using setParameter(), this can be: * \code * &(Gyoto::Spectrometer::Subcontractor) * \endcode */ void Register(std::string name, Gyoto::Spectrometer::Subcontractor_t* scp); } } class Gyoto::Spectrometer::Generic : public Gyoto::SmartPointee, public Gyoto::Object, public Gyoto::Hook::Teller { friend class Gyoto::SmartPointer; protected: /** * \brief Spectrometer kind ID * * The content is not copied. kindid_ should be set (as a parameter to * the Generic() constructor or using kindid()) to the address of a * static variable holding the name. This allows checking the kind * using pointer comparison rather than string comparison. */ kind_t kindid_; public: size_t nsamples_; ///< Number of spectral elements size_t nboundaries_; ///< Size of the boundaries_ array /** * \brief Frequency (in Hz) at the boundaries of the spectral channels * * Array of size nboundaries_ * * Spectral channel i extends from * \code * boundaries_[chanind_[2*i]] * \endcode * to * \code * boundaries_[chanind_[2*i+1]] * \endcode. * Channels may or may not be contiguous or ordered. */ double* boundaries_; /** * \brief Indices in boundaries_ * * Array of size 2*nsamples_ */ size_t* chanind_; /** * \brief Effective frequency (in Hz) of each spectral channel * * Array of size nsamples_ */ double* midpoints_; /** * \brief Width of each channel * * Array of size nsamples_ (in Hz) */ double* widths_; public: GYOTO_OBJECT; /** * \brief Default constructor * * Sets each member to 0. */ Generic(); /** * \brief Constructor setting kindid * * Sets the other members to 0. This is usually the right * constructor to use: * \code * Complex::Complex : Generic(Complex::Kindid) {} * \endcode * * Always set kindid to the address of a static variable, not to a temporary. * Usually your class should have a static member for that purpose: * \code * class MyKind : public Spectrometer::Generic * { * static kind_t Kindid; * }; * kind_t MyKind::Kindid = "MyKind"; * \endcode * */ Generic(kind_t kindid); /** * \brief Copy constructor * * Takes care of (deep) copying all the members known to the base class. */ Generic(const Generic& ) ; /** * \brief Clone an instance * * Use this to get a deep copy of an instance; * \code * SmartPointer myclone = orig->clone(); * \endcode * * Most implementations will use the copy constructor: * \code * Generic* Uniform::clone() const { return new Uniform(*this); } * \endcode */ virtual Generic * clone() const =0; /** * \brief Destructor * * Takes care of deleting the arrays (if the pointers are not NULL). */ virtual ~Generic(); /** * \brief Get kindid_ * * You can check whether the Spectrometer sp is of a given kind * MyKind with something like: * * \code * if (sp->kind()) == MyKind::Kindid; * \endcode * * See Uniform::WaveKind, Uniform::WaveLogKind, Uniform::FreqKind, * Uniform::FreqLogKind and Complex::Kind. * */ virtual kind_t kindid() const ; /** * \brief Set Generic::kindid_ * * This should rarely be used as the Generic::kindid_ attribute usually is set * in the constructor and doesn't change after that. * * Always set to the address of a static variable, not to a temporary. * Usually your class should have a static member for that purpose: * \code * class MyKind : public Spectrometer::Generic * { * static kind_t Kindid; * }; * kind_t MyKind::Kind = "MyKind"; * ... * SmartPointer sp(); * sp->kindid(MyKind::Kindid) * \endcode * */ virtual void kindid(kind_t) ; virtual size_t nSamples() const ; ///< Get Generic::nsamples_. virtual size_t getNBoundaries() const ; ///< Get Generic::nboundaries_ virtual double const * getMidpoints() const ; ///< Get Generic::midpoints_. /** * \brief Copy Generic::midpoints_, converting to unit * \param data an array of Generic::nsamples_ doubles to fill with result * \param unit a string */ virtual void getMidpoints( double data[], std::string unit); /** * \brief Copy Generic::boundaries_, converting to unit * \param data an array of Generic::nboundaries_ doubles to fill with result * \param unit a string */ virtual void getChannelBoundaries( double data[], std::string unit); virtual double const * getChannelBoundaries() const ; ///< Get Generic::boundaries_. virtual size_t const * getChannelIndices() const ; ///< Get Generic::chanind_. virtual double const * getWidths() const ; ///< Get Generic::widths_. /** * \brief Copy Generic::widths_, converting to unit * * Think carefully before using: widths are often used to convert * spectral flux density to flux. If flux density is per Herz, you * don't need to convert widths. * * \param data an array of Generic::nboundaries_ doubles to fill with result * \param unit a string */ virtual void getWidths( double data[], std::string unit); }; #endif Gyoto-1.2.0/include/GyotoSpectrum.h000066400000000000000000000142241302352257300172400ustar00rootroot00000000000000/** * \file GyotoSpectrum.h * \brief Spectrum of a simple object (e.g. Star) * * Light emitted by an astronomical object */ /* Copyright 2011-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoSpectrum_H_ #define __GyotoSpectrum_H_ #include "GyotoRegister.h" #include "GyotoObject.h" namespace Gyoto{ namespace Register { class Entry; } class FactoryMessenger; /// Spectrum of a simple object (e.g. a Gyoto::Astrobj::Star) namespace Spectrum { class Generic; /// A function to build instances of a specific Spectrum::Generic sub-class /** * This is a more specific version of the * SmartPointee::Subcontractor_t type. A Spectrum::Subcontrator_t * is called by the Gyoto::Factory to build an instance of the * kind of spectrum specified in an XML file (see * Register()). The Factory and Subcontractor_t function * communicate through a Gyoto::FactoryMessenger. A template is * provided so that you may not have to code anything. */ typedef Gyoto::SmartPointer Subcontractor_t(Gyoto::FactoryMessenger* fmp, std::vector const &); /** * \brief Subcontractor template * * Instead of reimplementing the wheel, your subcontractor can simply be * Gyoto::Spectrum::Subcontractor * * \tparam T Sub-class of Spectrum::Generic */ template SmartPointer Subcontractor (FactoryMessenger* fmp, std::vector const & plugins) { SmartPointer sp = new T(); sp -> plugins(plugins) ; #ifdef GYOTO_USE_XERCES if (fmp) sp -> setParameters(fmp); #endif return sp; } /// Make a Spectrum kind known to the Factory /** * Register a new Spectrum::Generic sub-class so that the * Gyoto::Factory knows it. * * \param kind The kind name which identifies this object type in * an XML file, as in <Spectrum kind="name"> * * \param scp A pointer to the subcontractor, which will * communicate with the Gyoto::Factory to build an instance of * the class from its XML description */ void Register(std::string kind, Gyoto::Spectrum::Subcontractor_t* scp); /// Query the Spectrum register /** * Query the Spectrum register to get the Metric::Subcontractor_t * correspondig to a given kind name. This function is normally * called only from the Factory. If plugin is specified, only a * subcontractor matching both name and plugin will be returned, * loading the plug-in if necessary. If plugin is the empty * string, then the first subcontractor matching name will be * returned, and the name of the plug-in it belongs to will be * returned in plugin upon output. * * \param[in] name e.g. "PowerLaw" * \param[inout] plugin e.g. "stdplug". * \param[in] errmode int=0. If errmode==0, failure to find a * registered Spectrum by that name is an error. Else, simply * return NULL pointer in that case. * \return pointer to the corresponding subcontractor. */ Gyoto::Spectrum::Subcontractor_t* getSubcontractor(std::string name, std::vector &plugins, int errmode=0); /// The Spectrum register /** * Use the Spectrum::initRegister() once in your program to * initiliaze it, the Spectrum::Register() function to fill it, and * the Spectrum::getSubcontractor() function to query it. */ extern Register::Entry* Register_; /// Empty the Spectrum register. /** * This must be called once. It is called by * Gyoto::Register::init(). */ void initRegister(); } } #include #include /** * \class Gyoto::Spectrum::Generic * \brief Spectrum emitted by an Astrobj * * Light emitted by e.g. a Star * */ class Gyoto::Spectrum::Generic : public Gyoto::SmartPointee, public Gyoto::Object { friend class Gyoto::SmartPointer; protected: public: GYOTO_OBJECT; Generic(const std::string kind); ///< Set kind in constructor Generic(const Spectrum::Generic &); virtual Generic * clone() const; ///< Cloner virtual ~Generic() ; ///< Destructor: does nothing. const std::string kind() const; ///< Get spectrum kind virtual double operator()(double nu) const =0; ///< I_nu = mySpectrum(nu), nu in Hz. Assumes optically thick regime. /** * Generic implementation assumes emissivity = opacity. * * \param nu frequency in Hz * \param opacity such that opacity*ds=optical thickness. * \param ds in geometrical units */ virtual double operator()(double nu, double opacity, double ds) const; ///< I_nu in optically thin regime. /** * \brief Integrate optically thick I_nu * * See operator()(double nu) const * * \param nu1, nu2 boundaries for the integration * \result I, the integral of I_nu between nu1 and nu2 */ virtual double integrate(double nu1, double nu2) ; /** * \brief Integrate optically thin I_nu * * See operator()(double nu, double opacity, double ds) const * * \param nu1, nu2 boundaries for the integration * \param opacity the frequency-dependent opacity law given as a * pointer to a Gyoto::Spectrum::Generic sub-class instance * \param ds the element length for spatial integration * \result I, the integral of I_nu between nu1 and nu2 */ virtual double integrate(double nu1, double nu2, const Spectrum::Generic * opacity, double ds) ; }; #endif Gyoto-1.2.0/include/GyotoStandardAstrobj.h000066400000000000000000000126311302352257300205230ustar00rootroot00000000000000/** * \file GyotoStandardAstrobj.h * \brief Astronomical objects defined bya a potential/distance * * Many geometrically thick objects can be defined by the value of a * function of the 4 coordinates, and their emission can often be * defined in terms of an emission law and of a transmission law. * * This is a base class for this standard case which simplifies a lot * writting new Astrobjs. */ /* Copyright 2011 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoStandardAstrobj_H_ #define __GyotoStandardAstrobj_H_ #include #include #include #include #include "GyotoAstrobj.h" #include "GyotoFunctors.h" namespace Gyoto{ namespace Astrobj { class Standard; } } /** * \class Gyoto::Astrobj::Standard * \brief Astronomical objects defined bya a potential/distance * * Many geometrically thick objects can be defined by the value of a * function of the 4 coordinates, and their emission can often be * defined in terms of an emission law and of a transmission law. * * This is a base class for this standard case which simplifies a lot * writting new Astrobjs. * * It is either to implement a sub-class of Astrobj::Standard than a * sub-class of Astrobj::Generic. In particular, there is no need to * implement the Generic::Impact() function. Instead, one needs to * implement a few much simpler functions and most of the complex * ray-tracing algorithms and heuristics is implemented in * Standard::Impact(). It is recommended to read first the * introduction in the Gyoto::Astrobj namespace documentation. * * The geometrical shape of a Gyoto::Astrobj::Standard object is * yielded by a function of the 4 position vector. This function is * implemented as operator()(). The velocity field of the fluid is * implemented in the getVelocity() method. The emission(), * integrateEmission() and transmission() methods implement the * radiative transfer primitives for this object. Finally, you may * choose to reimplement processHitQuantities() and Impact(), but * this should not be necessary (that is the all point of the * Standard class). * * Like any other Astrobj::Generic sub-classes, an Astrobj::Standard * subclass should register an Astrobj::Subcontractor_t function using * the Astrobj::Register() function. See also \ref * writing_plugins_page . */ class Gyoto::Astrobj::Standard : public Gyoto::Astrobj::Generic, public Gyoto::Functor::Double_constDoubleArray { friend class Gyoto::SmartPointer; // Data : // ----- protected: double critical_value_; ///< See operator()(double const coord[4]) double safety_value_; ///< See operator()(double const coord[4]) // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; /** * kind_ = "Default", rmax_ = 0., rmax_set_ = 0. */ Standard(); ///< Default constructor. /** * kind_ = "Default", rmax_ = radmax, rmax_set_ = 1. */ Standard(double radmax); ///< Set rmax in constructor. /** * kind_ = kind, rmax_ = 0., rmax_set_ = 0. */ Standard(std::string kind); ///< Set kind in constructor. /** * Make a deep copy of an Astrobj::Standard instance */ Standard(const Standard& ) ; ///< Copy constructor. virtual ~Standard() ; ///< Destructor: does nothing. // Accessors // --------- public: virtual void safetyValue(double val) ; ///< Set Standard::safety_value_ virtual double safetyValue() const ; ///< Get Standard::safety_value_ // Outputs // ------- public: virtual int Impact(Gyoto::Photon* ph, size_t index, Astrobj::Properties *data=NULL) ; /** * \brief Function defining the object interior * * A potential, distance, or whatever function such that * operator()(double const coord[4]) < Standard::critical_value_ if * and only if coord is inside the object. This function is used by * the default implmenetation of Impact(). If Impact() is * overloaded, it is not necessary to overload operator()(double * coord[4]). The default implementation throws an error. */ virtual double operator()(double const coord[4]) = 0; /** * \brief Fluid velocity field. * * Fill vel with the 4-vector velocity of the fluid at 4-position pos. * * \param[in] pos 4-position at which to compute velocity; * \param[out] vel 4-velocity at pos. */ virtual void getVelocity(double const pos[4], double vel[4]) = 0 ; /** * \brief Maximum δ inside object * * Gives the requested integration step δt (in * coordinate time t) between two neighbooring points along a * portion of geodesic inside an astrobj * * \param coord input coordinate at which δt is given */ virtual double giveDelta(double coord[8]); }; #endif Gyoto-1.2.0/include/GyotoStar.h000066400000000000000000000135541302352257300163540ustar00rootroot00000000000000/** * \file GyotoStar.h * \brief Mass-less, spherical object following a timelike geodesic * * A Gyoto::Star evolves in a Gyoto::Metric following time-like * geodesics and is a Gyoto::Astrobj::Generic suitable for * ray-tracing. */ /* Copyright 2011, 2013 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoStar_H_ #define __GyotoStar_H_ namespace Gyoto{ namespace Astrobj { class Star; } } #include #include #include #include #ifdef GYOTO_USE_XERCES #include #endif #include /** * \class Gyoto::Astrobj::Star * \brief Mass-less, spherical object following a timelike geodesic * * Gyoto can compute the Star's orbit in a Gyoto::Metric and perform * ray-tracing on this target. The XML description of a Star looks * like: * \code * * * 0. * * 2. * 0. 0. 0.037037 * 600. 9. 1.5707999999999999741 0 * * 6000 * * * 0 * 0.1 * * * * \endcode * * Star supports exactly the union of the parameters supported by * Gyoto::Astrobj::UniformSphere and Gyoto::Worldline. * * The Metric element can be of any kind. This Metric sets the * coordinate system. * * The Star is a coordinate sphere of radius Radius in solid motion. * * Position sets the initial 4-coordinate of the centre of the * sphere. Velocity contains its initial 3-velocity (the time * derivatives of the 3 space coordinates). * * Like many Astrobj::Generic impementations, a Star can be * OpticallyThin or OpticallyThick. * * Spectrum and Opacity (if OpticallyThin) are the descriptions of two * Gyoto::Spectrum::Generic sub-classes. * */ class Gyoto::Astrobj::Star : public Gyoto::Astrobj::UniformSphere, public Gyoto::Worldline { friend class Gyoto::SmartPointer; // Data : // ----- // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; /** * \brief Create Star object and set initial condition. * \param gg Gyoto::SmartPointer to the Gyoto::Metric in this part of the Universe * \param radius star radius * \param pos initial 4-position * \param v initial 3-velocity */ Star(SmartPointer gg, double radius, double const pos[4], double const v[3]) ; /** * Create Star object with undefined initial conditions. One needs to * set the coordinate system, the metric, and the initial position * and velocity before integrating the orbit. setInititialCondition() * can be used for that. */ Star(); ///< Default constructor Star(const Star& orig); ///< Copy constructor virtual Star * clone() const ; virtual ~Star() ; ///< Destructor // Accessors // --------- public: virtual std::string className() const ; ///< "Star" virtual std::string className_l() const ; ///< "star" virtual void metric(SmartPointer); virtual SmartPointer metric() const; /** * The mass of a Star is always 1. Stars do not perturb the * metric. The only relevant point is that Stars are massive * particules, their exact mass is of no importance. */ virtual double getMass() const ; ///< Return 1. public: using UniformSphere::rMax; virtual double rMax() ; // void setCoordSys(int); ///< Get coordinate system for integration // int getCoordSys(); ///< Set coordinate system for integration virtual void setInitialCondition(double const coord[8]); ///< Same as Worldline::setInitialCondition(gg, coord, sys,1) public: // Object / Property overloading for special needs: // Overload to interpret InitialCoordinate alias, and to interpret // Position/Velocity virtual int setParameter(std::string name, std::string content, std::string unit) ; #ifdef GYOTO_USE_XERCES // Overload to 1- get metric first and 2- interpret Position/Velocity virtual void setParameters(FactoryMessenger *fmp) ; // Overload to dispatch InitCoord into Position and Velocity // for massive particle virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const ; #endif // Declare the wrappers around the Worldline accessors GYOTO_WORLDLINE; // Both base classes have deltaMax methods: we need to explicitly // use both using Gyoto::Worldline::deltaMax; using Gyoto::Astrobj::UniformSphere::deltaMax; public: /// Get the 6 Cartesian coordinates for specific dates. /** * This method is present in both the API of UniformSphere and * Worldline. It is pure virtual in UniformSphere. The Star * reimplementation is a trivial wrapper around * Worldline::getCartesian(). */ virtual void getCartesian(double const * const dates, size_t const n_dates, double * const x, double * const y, double * const z, double * const xprime=NULL, double * const yprime=NULL, double * const zprime=NULL) ; virtual void getVelocity(double const pos[4], double vel[4]) ; }; #endif Gyoto-1.2.0/include/GyotoStarTrace.h000066400000000000000000000110301302352257300173160ustar00rootroot00000000000000/** * \file GyotoStarTrace.h * \brief Like a Star that would be on all points of its orbit at all time * * A StarTrace is a Star that is considerred to be simultaneously on * all the points of its orbit at all time. The purpose is to * precompute quickly an integrated image that can later be used as a * mask to efficiently compute many images of the underlying Star at * varying observing dates. */ /* Copyright 2013-2015 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoStarTrace_H_ #define __GyotoStarTrace_H_ namespace Gyoto{ namespace Astrobj { class StarTrace; } } #include /** * \class Gyoto::Astrobj::StarTrace * \brief Like a Star that would be on all points of its orbit at all time * * StarTrace inherits all the members and methods from Star. It has * two additional members, tmin_ and tmax_, which specify the time * interval of the Star's orbit that is to be considerred illuminated. * * A StarTrace is not (necessarily) continuous: the Star is * considerred to be present at all the locations computed by xFill(), * meaning that if the integration step is large compared to radius_, * the object will be a collection of discrete blobs. To ensure * continuity, one should use a non-adaptive step and specify a * reasonable step. Computation is also faster in optically thick * mode. * * \code * * ... * 600 * 600 * * 1 * 1 * * \endcode * */ class Gyoto::Astrobj::StarTrace : public Gyoto::Astrobj::Star { friend class Gyoto::SmartPointer; // Data : // ----- protected: double tmin_; ///< Minimum date to consider on the underlying Star orbit double tmax_; ///< Maximum date to consider on the underlying Star orbit double * x_; ///< Cartesian x double * y_; ///< Cartesian y double * z_; ///< Cartesian z // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; /** * \brief Create Star object and set initial condition. * * \param gg Gyoto::SmartPointer to the Gyoto::Metric in this part of the Universe * \param radius star radius * \param pos initial 4-position * \param v initial 3-velocity */ StarTrace(SmartPointer gg, double radius, double const pos[4], double const v[3]) ; /** * Create Star object with undefined initial conditions. One needs to * set the coordinate system, the metric, and the initial position * and velocity before integrating the orbit. setInititialCondition() * can be used for that. */ StarTrace(); ///< Default constructor StarTrace(const StarTrace& orig); ///< Copy constructor /// Build StarTrace from Star StarTrace(const Star& o, double tmin, double tmax); virtual StarTrace * clone() const ; virtual ~StarTrace() ; ///< Destructor using Star::xAllocate; void xAllocate(size_t); void xAllocateXYZ(); ///< Allocate x_, y_, z_ using Star::xExpand; size_t xExpand(int); void computeXYZ(size_t i); ///< Compute (and cache) x_, y_ and z_ for one date void computeXYZ(); ///< Compute (and cache) x_, y_ and z_ using Star::setInitCoord; virtual void setInitCoord(const double coord[8], int dir = 0); using Generic::metric; virtual void metric(SmartPointer gg); virtual void xStore(size_t ind, double const coord[8]) ; // Accessors // --------- public: virtual std::string className() const ; ///< "StarTrace" virtual std::string className_l() const ; ///< "startrace" double TMin()const; ///< Get tmin_ void TMin(double); ///< Set tmin_ double TMax()const; ///< Get tmax_ void TMax(double); ///< Set tmax_ virtual void setInitialCondition(double const coord[8]); ///< Same as Worldline::setInitialCondition(gg, coord, sys,1) virtual double operator()(double const coord[4]) ; }; #endif Gyoto-1.2.0/include/GyotoThermalBremsstrahlungSpectrum.h000066400000000000000000000056331302352257300235020ustar00rootroot00000000000000/** * \file GyotoThermalBremsstrahlungSpectrum.h * \brief Thermal brems spectrum * */ /* Copyright 2014 Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoThermalBremsstrahlungSpectrum_H_ #define __GyotoThermalBremsstrahlungSpectrum_H_ #include "GyotoSpectrum.h" #include namespace Gyoto { namespace Spectrum { class ThermalBremsstrahlung; } } /** * \class Gyoto::Spectrum::ThermalBremsstrahlung * \brief Thermal brems spectrum * * * Example XML entity: * \code * * * \endcode * */ class Gyoto::Spectrum::ThermalBremsstrahlung : public Gyoto::Spectrum::Generic { friend class Gyoto::SmartPointer; protected: SmartPointer spectrumBB_; ///< blackbody emission double cst_; ///< Scaling constant double T_; ///< Temperature double Tm1_; ///< 1/T double Tm05_; ///< 1/sqrt(T) double massdensityCGS_; ///< Mass density in CGS UNITS (careful) public: GYOTO_OBJECT; ThermalBremsstrahlung(); /** * \brief Constructor setting T_ and cst_ */ virtual ThermalBremsstrahlung * clone() const; ///< Cloner using Gyoto::Spectrum::Generic::operator(); /** * This function returns the optically thick Inu * which is not defined here, returns an error * * \param nu frequency in Hz */ virtual double operator()(double nu) const; /** * This function returns the optically thin increment * to intensity dI_nu = j_nu*ds*exp(-alpha_nu*ds) * in SI units * * \param nu frequency in Hz * \param ds length element in SI (careful to this) */ #ifndef GYOTO_SWIGIMPORTED virtual double operator()(double nu,double ,double ds) const; #endif // NB: the second argument, opacity in the Spectrum API // is useless here double temperature() const; void temperature(double tt); double massdensityCGS() const; void massdensityCGS(double rho); /** * Returns the emission coefficient j_nu in cgs units * i.e. erg cm^-3 s^-1 ster^-1 Hz^-1 * * \param nu frequency in Hz */ double jnuCGS(double nu) const; /** * Returns the absorption coefficient alpha_nu in cgs units [cm^-1] * * \param nu frequency in Hz */ double alphanuCGS(double nu) const; }; #endif Gyoto-1.2.0/include/GyotoThinDisk.h000066400000000000000000000115161302352257300171540ustar00rootroot00000000000000/** * \file GyotoThinDisk.h * \brief Geometrically thin disks and rings * * Gyoto::Astrobj::ThinDisk is a class to represent geometrically * thin, optically thick or thin disks or rings in the equatorial * plane of the object. It therefore assumes the metric has an * equatorial plane, which orresponds to z==0 in a Cartesian * coordinate system or to theta==M_PI/2 in a sperical coordinate * system. * * This calls is not abstract and can be used as is (it keeps the * very simplistic Generic::emission() and Generci::transmission()), * but it is also a base class to develop classes with more complex * emission laws. * */ /* Copyright 2011-2015 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoThinDisk_H_ #define __GyotoThinDisk_H_ namespace Gyoto{ namespace Astrobj { class ThinDisk; } } #include #include #include #include #ifdef GYOTO_USE_XERCES #include #endif #include /** * \class Gyoto::Astrobj::ThinDisk * \brief Geometrically thin disks and rings \code rin_ rout_ \endcode * ThinDisk::setParameter() also takes care of calling * Generic::setParameter(). */ class Gyoto::Astrobj::ThinDisk : public Gyoto::Astrobj::Generic, public Gyoto::Functor::Double_constDoubleArray { friend class Gyoto::SmartPointer; // Data : // ----- protected: double rin_ ; ///< disk inner radius in geometrical units double rout_ ; ///< disk outer radius in geometrical units /** * Geometrical thickness in geometrical units. Used only in the * optically thin regime (flag_radtransf_==1). Should be << * rin_. Default: 1e-3. */ double thickness_; ///< disk thickness int dir_; ///< 1 for corotating (default), -1 for counterrotating. // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; /** * Create direct ThinDisk object. When initializing a derived class, * always set kind. */ ThinDisk(std::string kind="ThinDisk"); ///< Default constructor ThinDisk(const ThinDisk& orig); ///< Copy constructor virtual ThinDisk* clone () const ; virtual ~ThinDisk() ; ///< Destructor // Accessors // --------- public: virtual double innerRadius() const ; ///< Get rin_ virtual double innerRadius(std::string const &) const ; ///< Get rin_ virtual void innerRadius(double); ///< Set rin_ virtual void innerRadius(double, std::string const &); ///< Set rin_ virtual double outerRadius() const ; ///< Get rout_ virtual double outerRadius(std::string const &) const ; ///< Get rout_ virtual void outerRadius(double); ///< Set rout_ virtual void outerRadius(double, std::string const &); ///< Set rout_ virtual double thickness() const ; ///< Get thickness_ virtual double thickness(std::string const &) const ; ///< Get thickness_ virtual void thickness(double); ///< Set thickness_ virtual void thickness(double, std::string const&); ///< Set thickness_ virtual int dir() const ; ///< Get dir_ virtual void dir(int); ///< Set dir_ virtual bool corotating() const; /// Get dir_==1 virtual void corotating(bool t); /// Set dir_=t?1:-1 /** * A function which changes sign on the equatorial plane. */ virtual double operator()(double const coord[]) ; ///< theta-pi/2 or z virtual double projectedRadius(double const coord[]) const ; ///< Projected radius of position coord on the equatorial plane virtual double sphericalPhi(double const coord[]) const; ///< Longitude /// Get fluid 4-velocity at point. /** * Fill vel with the 4-vector velocity of the fluid at 4-position * pos. getVelocity() should work at some distance from the * equatorial plane. The default implementation calls * Metric::Generic::circularVelocity(). * * \param[in] pos 4-position at which to compute velocity; * \param[out] vel 4-velocity at pos. */ virtual void getVelocity(double const pos[4], double vel[4]) ; public: virtual int Impact(Gyoto::Photon* ph, size_t index, Astrobj::Properties *data=NULL) ; }; #endif Gyoto-1.2.0/include/GyotoThinDiskIronLine.h000066400000000000000000000037161302352257300206170ustar00rootroot00000000000000/* Copyright 2013-2015 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ /** \file GyotoThinDiskIronLine.h */ #ifndef __GyotoThinDiskIronLine_h #define __GyotoThinDiskIronLine_h #include namespace Gyoto { namespace Astrobj { class ThinDiskIronLine; } } class Gyoto::Astrobj::ThinDiskIronLine : public Gyoto::Astrobj::ThinDisk { friend class Gyoto::SmartPointer; private: double plindex_; ///< power law index for line emission double linefreq_; ///< intrinsic line frequency (Hz) double cutradius_; ///< r emission = 0 public: GYOTO_OBJECT; ThinDiskIronLine(); ThinDiskIronLine(const ThinDiskIronLine &o); virtual ~ThinDiskIronLine(); virtual ThinDiskIronLine * clone() const ; using ThinDisk::emission; virtual double emission(double nu_em, double dsem, double c_ph[8], double c_obj[8]=NULL) const; void getVelocity(double const pos[4], double vel[4]); // standard pairs of accessors GYOTO_OBJECT_ACCESSORS(double, PowerLawIndex); GYOTO_OBJECT_ACCESSORS(double, LineFreq); void LineFreq(double v, std::string const &u); double LineFreq(std::string const &u)const; GYOTO_OBJECT_ACCESSORS(double, CutRadius); void CutRadius(double v, std::string const &u); double CutRadius(std::string const &u)const; }; #endif Gyoto-1.2.0/include/GyotoThinDiskPL.h000066400000000000000000000051511302352257300174060ustar00rootroot00000000000000/** * \file GyotoThinDiskPL.h * \brief A subclass of ThinDisk emitting according to a powerlaw * * The target of ray-traced Gyoto::Photon */ /* Copyright 2012-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoThinDiskPL_H_ #define __GyotoThinDiskPL_H_ #include #include #include namespace Gyoto{ namespace Astrobj { class ThinDiskPL; } } //#include #include #include /** * \class Gyoto::Astrobj::ThinDiskPL * \brief Geometrically thin disk with black-body emission * * Mass density varies with a power-law, temperature depends on density. * * ρ = ρ0 (rcur/r0)α * * XML entities: * - PLSlope: ThinDiskPL::PLSlope_ * - PLRho: ThinDiskPL::PLRho_ * - PLRadRef: ThinDiskPL::PLRadRef_ */ class Gyoto::Astrobj::ThinDiskPL : public Astrobj::ThinDisk { friend class Gyoto::SmartPointer; private: double PLSlope_; ///< Power law index double PLRho_; ///< Reference density double PLRadRef_; ///< Reference radius protected: SmartPointer spectrumBB_; ///< disk black body // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; GYOTO_OBJECT_THREAD_SAFETY; ThinDiskPL(); ///< Standard constructor ThinDiskPL(const ThinDiskPL& ) ;///< Copy constructor virtual ThinDiskPL* clone () const; ///< Cloner virtual ~ThinDiskPL() ; ///< Destructor // Accessors // --------- public: void PLSlope(double); double PLSlope()const; void PLRho(double); double PLRho()const; void PLRadRef(double); double PLRadRef()const; public: using ThinDisk::emission; virtual double emission(double nu_em, double dsem, double c_ph[8],double c_obj[8]=NULL) const; private: /** * \brief emission() helper */ double emissionBB(double nu, double co[8]) const; }; #endif Gyoto-1.2.0/include/GyotoTorus.h000066400000000000000000000076231302352257300165570ustar00rootroot00000000000000/** * \file GyotoTorus.h * \brief A simple torus * */ /* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoTorus_H_ #define __GyotoTorus_H_ #include #include #include #include namespace Gyoto{ namespace Astrobj { class Torus; } } #include #include #include /** * \class Gyoto::Astrobj::Torus * \brief Optically thin or thick torus in circular rotation * * Any Metric::Generic is acceptable as long as it implements * Metric::Generic::circularVelocity(). */ class Gyoto::Astrobj::Torus : public Gyoto::Astrobj::Standard { friend class Gyoto::SmartPointer; // Data : // ----- protected: /** * Distance from the center of the coordinate system to the center * of the torus tube. The (square of the) radius of a vertical * cross-section is stored in critical_value_. */ double c_; ///< Large Radius SmartPointer spectrum_; ///< Emission law SmartPointer opacity_; ///< Absorption law // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; /** * kind_ = "Torus", c_ = 3.5, a_=0.5 */ Torus(); ///< Default constructor. Torus(const Torus& ) ; ///< Copy constructor. virtual Torus* clone() const; ///< "Virtual" copy constructor virtual ~Torus() ; ///< Destructor: does nothing. // Accessors // --------- public: /** * Get large radius Torus::c_ in geometrical units */ double largeRadius() const; /** * Get large radius Torus::c_ in specified unit */ double largeRadius(std::string unit) const; /** * Get small radius in geometrical units */ double smallRadius() const; /** * Get small radius in specified unit */ double smallRadius(std::string unit) const; /** * \brief Set large radius Torus::c_ */ void largeRadius(double c); /** * \brief Set small radius */ void smallRadius(double a); /** * \brief Set large radius Torus::c_ in specified unit */ void largeRadius(double c, std::string unit); /** * \brief Set small radius in specified unit */ void smallRadius(double a, std::string unit); /** * \brief Set Torus::spectrum_ */ virtual void spectrum(SmartPointer); /** * \brief Get Torus::spectrum_ */ virtual SmartPointer spectrum() const; /** * \brief Set Torus::opacity_ */ virtual void opacity(SmartPointer); /** * \brief Get Torus::opacity_ */ virtual SmartPointer opacity() const; using Standard::rMax; virtual double rMax(); // Outputs // ------- public: virtual double operator()(double const coord[4]) ; virtual double deltaMax(double*); protected: virtual void getVelocity(double const pos[4], double vel[4]) ; using Standard::emission; virtual double emission(double nu_em, double dsem, double coord_ph[8], double coord_obj[8]=NULL) const ; using Standard::integrateEmission; virtual double integrateEmission(double nu1, double nu2, double dsem, double c_ph[8], double c_obj[8]=NULL) const; virtual double transmission(double nuem, double dsem, double coord[8]) const ; }; #endif Gyoto-1.2.0/include/GyotoUniformSpectrometer.h000066400000000000000000000125071302352257300214540ustar00rootroot00000000000000/** * \file GyotoUniformSpectrometer.h * \brief Uniformly spaced spectrometers * * Spectral channels are contiguous and uniformly spaced in either * wavelength, frequency or log10 of * either. Gyoto::Spectrometer::Uniform is registered four times in * the factory: as kind="wave", "wavelog", "freq" and * "freqlog". Example XML entity: * \code * * 2.0 2.4 * * \endcode * * The content of the entity yields the band pass expressed in "unit" * or in log10(unit). * */ /* Copyright 2011-2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoUniformSpectrometer_H_ #define __GyotoUniformSpectrometer_H_ #include namespace Gyoto{ namespace Spectrometer { class Uniform; } } /** * \class Gyoto::Spectrometer::Uniform * \brief Uniformly spaced spectrometers * * Spectral channels are contiguous and uniformly spaced in either * wavelength, frequency or log10 of * either. Gyoto::Spectrometer::Uniform is registered four times in * the factory: as kind="wave", "wavelog", "freq" and * "freqlog". Example XML entity: * \code * * 2.0 2.4 * * \endcode * * The content of the entity yields the band pass expressed in "unit" * or in log10(unit). */ class Gyoto::Spectrometer::Uniform : public Gyoto::Spectrometer::Generic { friend class Gyoto::SmartPointer; protected: /** * \brief boundaries of the spectro. * * Depending on the kind, band_ is stored in Hz, log10(Hz), m or log10(m). */ double band_[2]; void reset_(); ///< Computes boundaries_, midpoints_ and widths_ public: GYOTO_OBJECT; Uniform() ; ///< Default constructor Uniform(size_t nsamples, double band_min, double band_max, kind_t kind); ///< Constructor setting everything Uniform(const Uniform& ) ; ///< Copy constructor Generic * clone() const; ///< Cloner virtual ~Uniform() ; ///< Destructor using Generic::kindid; void kindid(kind_t); /** * \brief Set Generic::kind_ from a std::string * * Generic::kind_ will actually be set to one of Uniform::WaveKind, * Uniform::WaveLogKind, Uniform::FreqKind or Uniform::FreqLogKind. * * \param name std::string, one of "wave", "wavelog", "freq" or * "freqlog" */ void kind(std::string const &name); std::string kind() const; using Generic::nSamples; /** * \brief Set Generic::nsamples_ */ void nSamples(size_t n); void band(std::vector const &nu); void band(std::vector const &nu, std::string const &unit); std::vectorband() const; std::vectorband(std::string const &unit) const; /** * \brief Set Uniform::band_ * * \param nu 2-element vector, in Hz, m, log10(Hz) or log10(m) * depending on Generic::kind_ */ void band(double nu[2]); /** * \brief Set the spectral band boundaries in specified unit * * If kind is not specified, member kind_ is used. Else kind_ is updated. * * unit is actually the unit for 10^nu for freqlog and wavelog. Defaults: * - kind==freq: nu in Hz * - kind==freqlog: 10^nu in Hz * - kind==wave: nu in meters * - kind==wavelog: 10^nu in meters * */ void band(double nu[2], std::string const &unit, std::string const &kind); void band(double nu[], std::string const &unit); double const * getBand() const ; ///< Get Uniform::band_ public: void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const; #ifdef GYOTO_USE_XERCES virtual void setParameters(FactoryMessenger *fmp); #endif /** * \brief "wave" * * Use this static member attribute to check whether a Spectrometer * object spectro is of this kind: * \code * if (spectro->kind() == Uniform::WaveKind) ... ; * \endcode * */ static kind_t const WaveKind; ///< "wave" /** * \brief "wavelog" * * Use this static member attribute to check whether a Spectrometer * object spectro is of this kind: * \code * if (spectro->kind() == Uniform::WaveLogKind) ... ; * \endcode * */ static kind_t const WaveLogKind; /** * \brief "freq" * * Use this static member attribute to check whether a Spectrometer * object spectro is of this kind: * \code * if (spectro->kind() == Uniform::FreqKind) ... ; * \endcode * */ static kind_t const FreqKind; /** * \brief "freqlog" * * Use this static member attribute to check whether a Spectrometer * object spectro is of this kind: * \code * if (spectro->kind() == Uniform::FreqLogKind) ... ; * \endcode * */ static kind_t const FreqLogKind; }; #endif Gyoto-1.2.0/include/GyotoUniformSphere.h000066400000000000000000000160641302352257300202300ustar00rootroot00000000000000/** * \file GyotoUniformSphere.h * \brief Optically thick or thin, spherical objects * * Gyoto::Astrobj::UniformSphere is an abstract type from which * uniform, spherical objects inherit (in particular, the * Gyoto::Astrobj::Star and Gyoto::Astrobj::FixedStar classes). * */ /* Copyright 2011 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoUniformSphere_H_ #define __GyotoUniformSphere_H_ namespace Gyoto{ namespace Astrobj { class UniformSphere; } } #include #include #include #ifdef GYOTO_USE_XERCES #include #endif #include /** * \class Gyoto::Astrobj::UniformSphere * \brief Optically thick or thin, spherical objects * * Gyoto::Astrobj::UniformSphere is an abstract type from which * uniform, spherical objects inherit (in particular, the * Gyoto::Astrobj::Star and Gyoto::Astrobj::FixedStar classes). * * These objects are coordinate-spherical: they comprise all the * points within a given radius from a centre. The distance is the * usual Euclidian distance in a Cartesian coordinate system which is * trivially determined by the coordinate system in which the Metric * is expressed. * * The sphere is in solid motion: all the points have the same * 4-velocity. The centre of the sphere may move. This motion and the * velocity are provided by the derived classes through the * getCartesian() and getVelocity() methods. * * The spheres can be optically thick or optically thin. In the * optically thin case, the opacity law provided as a Gyoto::Spectrum * also sets both the emissivity. Another Gyoto::Spectrum provides * the emission law of the source, which is uniform. * * Gyoto::Astrobj::UniformSphere::setParameters() take care of * interpreting the XML elements describing the parameters of the * sphere: * \code * value * parameters for this spectrum kind * parameters for this spectrum kind * * The following are numerical parameters mostly usefull when the * sphere is far from the compact object. Larger values speed up * computation but may miss the sphere. * 0.1 * 0.1 * \endcode * setGenericParameters() also takes care of calling * setParameter(). */ class Gyoto::Astrobj::UniformSphere : public Gyoto::Astrobj::Standard { friend class Gyoto::SmartPointer; // Data : // ----- protected: double radius_ ; ///< sphere radius [geometrical units] bool isotropic_; ///< if 1, then emission just returns 1 double alpha_; ///< such that nu*I_nu = nu^alpha_; note that Xray photon ///< index Gamma is: alpha_ = 2-Gamma SmartPointer spectrum_; ///< sphere emission law SmartPointer opacity_; ///< if optically thin, opacity law double dltmor_; ///< see deltaMax(double*) double dltmod_; ///< see deltaMax(double*) // Constructors - Destructor // ------------------------- public: GYOTO_OBJECT; /** * Create UniformSphere object. * \param kind: specifi kind (e.g. "Star" or "FixedStar") * \param gg: Gyoto::SmartPointer to the Gyoto::Metric in this part of the Universe * \param radius: sphere radius */ UniformSphere(std::string kind, SmartPointer gg, double radius) ; ///< Standard constructor /** * Create UniformSphere object. Use metric(), radius(), * spectrum() and opacity() to set the members. * * \param kind: specify kind (e.g. "Star" or "FixedStar") */ UniformSphere(std::string kind); ///< Default constructor UniformSphere(const UniformSphere& orig); ///< Copy constructor virtual ~UniformSphere() ; ///< Destructor // Accessors // --------- public: virtual std::string className() const ; ///< "UniformSphere" virtual std::string className_l() const ; ///< "uniformsphere" virtual void spectrum(SmartPointer); ///< Set spectrum_ virtual SmartPointer spectrum() const; ///< Get spectrum_ virtual void opacity(SmartPointer); ///< Set opacity_ virtual SmartPointer opacity() const; ///< Get opacity_ double radius() const ; ///< Get radius_ in geometrical units virtual void radius(double); ///< Set radius_ in geometrical units double radius(std::string const &) const ; ///< Get radius_ in specified unit virtual void radius(double, std::string const &); ///< Set radius_ in specified unit double deltaMaxOverRadius() const ; ///< Get dltmor_ virtual void deltaMaxOverRadius(double f); ///< Set dltmor_ double deltaMaxOverDistance() const ; ///< Get dltmod_ virtual void deltaMaxOverDistance(double f); ///< Set dltmod_ bool isotropic() const; void isotropic(bool); double alpha() const ; void alpha(double); public: virtual double operator()(double const coord[4]) ; ///< Square distance to the center of the sphere ///< Ensure integration does not miss the object /** * \param[in] coord current photon position * \return max( #dltmor_*#radius_, #dltmod_*operator()(double coord[]) ) */ virtual double deltaMax(double*coord); protected: /** * If the coordinate system of the Metric object is spherical, use a * trivial conversion. */ virtual void getCartesian(double const * const dates, size_t const n_dates, double * const x, double * const y, double * const z, double * const xprime=NULL, double * const yprime=NULL, double * const zprime=NULL) =0; ///< Yield the Cartesian coordinates of the center of the sphere virtual void getVelocity(double const pos[4], double vel[4]) = 0; ///< Yield velocity of the center of the sphere. using Standard::emission; virtual double emission(double nu_em, double dsem, double cp[8], double co[8]=NULL) const; ///< Emission is determined by spectrum_ and opacity_ using Standard::integrateEmission; virtual double integrateEmission(double nu1, double nu2, double dsem, double c_ph[8], double c_obj[8]=NULL) const; virtual double transmission(double nuem, double dsem, double*) const ; ///< Transmission is determined by opacity_ void processHitQuantities(Photon* ph, double* coord_ph_hit, double* coord_obj_hit, double dt, Properties* data) const; }; #endif Gyoto-1.2.0/include/GyotoUtils.h000066400000000000000000000055541302352257300165440ustar00rootroot00000000000000/** * \file GyotoUtils.h * \brief GYOTO utilities * * Various utilities */ /* Copyright 2011, 2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoUtils_H_ #define __GyotoUtils_H_ #include "GyotoDefs.h" #include #include namespace Gyoto { /// Set debug mode /** * \param mode 1 to turn on debug mode, 0 to turn it off. */ void debug(int mode); /// Get debug mode /** * \return >=1 if debug mode is on, else 0. */ int debug(); /// Set verbosity level /** * See standard verbosity levels defined in GyotoDefs.h: * * - GYOTO_DEFAULT_DEBUG_MODE * - GYOTO_QUIET_VERBOSITY * - GYOTO_SEVERE_VERBOSITY * - GYOTO_WARNING_VERBOSITY * - GYOTO_DEFAULT_VERBOSITY * - GYOTO_INFO_VERBOSITY * - GYOTO_DEBUG_VERBOSITY */ void verbose(int mode); /// Get verbosity level /** * See verbose(int mode). */ int verbose(); /// Convert lengths (deprecated) /** * \deprecated Will be removed once it is not used anymore in Gyoto * per se. Prefer Gyoto::Units framework. * * \param[in,out] x Lengths to convert, in geometrical units on * input, in specified unit on output. * \param[in] nelem Size of x array. * \param[in] mass_sun Black-hole mass in Solar masses. * \param[in] distance_kpc Distance from observer in kiloparsecs. * \param[in] unit One of "geometrical", "m", "km", "sun radius", * "rad", "degree", "arcmin", "arcsec", "mas", "uas". */ void convert(double * const x, const std::size_t nelem, const double mass_sun, const double distance_kpc, const std::string unit); /// Interpret C string as double /** * Wrapper around std::atof() that also interprets DBL_MIN, DBL_MAX, * -DBL_MIN and -DBL_MAX. * * If str starts with "(-)DBL_M" and is not one of the four special * values, then an error is thrown. * * \param[in] str C string to interpret * \return double valu represented by str. */ double atof(const char * str); /// Print help on class /** * \param[in] class_name e.g. "Gyoto::Screen", "Gyoto::Astrobj::Torus". */ void help(std::string class_name); /// Split string std::vector split(std::string const &src, std::string const &delim); } #endif Gyoto-1.2.0/include/GyotoValue.h000066400000000000000000000121131302352257300165050ustar00rootroot00000000000000/** * \file GyotoValue.h * \brief Introspectable value */ /* Copyright 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoValue_H_ #define __GyotoValue_H_ #include "GyotoConfig.h" #include "GyotoSmartPointer.h" #include #include namespace Gyoto { class Value; namespace Metric {class Generic;} namespace Astrobj {class Generic;} namespace Spectrum {class Generic;} namespace Spectrometer {class Generic;} class Screen; } /// Container for the value of a Property /** * The Value class is very similar to the C union type (although not * as memory efficient): it can hold several type of values, but only * one at a time. Care must be taken to ensure only the member that * was set is retrieved. The purpose of the Value class is to be used * together with the Property class: code determines dynamicaly the * type of a Property, reads the corresponding value appropriateley * (e.g. from XML or from the Yorick prompt), stores the value in a * Value instance, and sets the Property using the Object::set() * method. Likewise, the Object::get() method returns a * Gyoto::Value. Property::type must be used to determine which member * of the Value is meaningful. * * Casting between Value and the various data type it can hold is * normally automatic, but the members can also be accessed * explicitly make code more easy to read and less ambiguous. */ class Gyoto::Value { public: /// Constructor Value(); /// Destructor ~Value(); /// Assignement operator Value& operator=(Value const&); /// Type of this instance int type; private: /// A double value double Double; public: /// Construct/cast from double Value(double); /// Cast to double operator double() const; private: /// A boolean value bool Bool; public: /// Construct/cast from boolean Value(bool); /// Cast to bool operator bool() const; private: /// A long value long Long; public: /// Construct/cast from long Value(long); /// Cast to long operator long() const; private: /// An unsigned long (a.k.a. size_t) unsigned long ULong; public: /// Construct/cast from unsigned long Value(unsigned long); /// Cast to unsigned long operator unsigned long() const; private: /// A size_t (only if distinct from unsigned long) size_t SizeT; public: #if !defined(GYOTO_SIZE__T_IS_UNSIGNED_LONG) /// Construct/cast from unsigned long Value(size_t); /// Cast to unsigned long operator size_t() const; #endif private: /// A string value std::string String; public: /// Construct/cast from string Value(std::string); /// Cast to string operator std::string() const; private: /// A vector of double values std::vector VDouble; public: /// Construct/cast from vector of doubles Value(std::vector); /// Cast to vector of doubles operator std::vector() const; private: /// A vector of unsigned long values std::vector VULong; public: /// Construct/cast from vector of unsigned long values Value(std::vector); /// Cast to vector of unsigned long values operator std::vector() const; private: /// A Metric object Gyoto::SmartPointer Metric; public: /// Cast from Metric object Value(Gyoto::SmartPointer); /// Cast to Metric object operator Gyoto::SmartPointer() const; private: /// An Astrobj Object Gyoto::SmartPointer Astrobj; public: /// Cast from Astrobj Value(Gyoto::SmartPointer); /// Cast to Astrobj operator Gyoto::SmartPointer() const; private: /// A Spectrum object Gyoto::SmartPointer Spectrum; public: /// Cast from Spectrum Value(Gyoto::SmartPointer); /// Cast to Spectrum operator Gyoto::SmartPointer() const; private: /// A Spectrometer object Gyoto::SmartPointer Spectrometer; public: /// Cast from Spectrometer Value(Gyoto::SmartPointer); /// Cast to Spectrometer operator Gyoto::SmartPointer() const; private: /// A Screen object Gyoto::SmartPointer Screen; public: /// Cast from Screen Value(Gyoto::SmartPointer); /// Cast to Screen operator Gyoto::SmartPointer() const; }; #endif Gyoto-1.2.0/include/GyotoWIP.h000066400000000000000000000030711302352257300160730ustar00rootroot00000000000000/** * \file GyotoWIP.h * \brief Work in progress class * * A lot of work in Gyoto is still in progress. When created, every * classe should be inherit from this class, untill considered stable * by the developpers. * */ /* Copyright 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoWIP_H_ #define __GyotoWIP_H_ #include namespace Gyoto { class WIP; } /** * \class Gyoto::WIP * \brief Base class for work in progress * * The constructors of this class simply issue a warning that the * (derived) class is work in progress. */ class Gyoto::WIP { public: /// Issue a warning WIP(); /// Issue a warning specifying the name of the derived class /** * If classname is the empty string (""), the warning is not issued. * Use this to mark that a class is no more work in progress without * breaking the ABI (i.e. in the Gyoto stable branch). */ WIP(std::string classname); }; #endif Gyoto-1.2.0/include/GyotoWorldline.h000066400000000000000000000722671302352257300174100ustar00rootroot00000000000000/** * \file GyotoWorldline.h * \brief Timelike or null geodesics */ /* Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __GyotoWorldline_H_ #define __GyotoWorldline_H_ #include #include #include #include #ifdef GYOTO_HAVE_BOOST_INTEGRATORS # include # include # include #endif namespace Gyoto { class Worldline; class FactoryMessenger; } #include #include #include #include /// Define the bunch of Properties that make up the Worldline interface /** * This macro, which is called automatically by * GYOTO_WORLDLINE_PROPERTY_END(c, a), must be inserted in the * definition of the Property list for any class derived from * Worldline. */ #define GYOTO_WORLDLINE_PROPERTIES(c) \ Gyoto::Property("Gyoto::Worldline", "Time-like or null geodesic."), \ GYOTO_PROPERTY_BOOL(c, HighOrderImages, PrimaryOnly, _secondary, \ "Whether to stop Photon integration at 180° deflection.") \ GYOTO_PROPERTY_DOUBLE(c, RelTol, _relTol, \ "Relative tolerance for the adaptive step integrators.") \ GYOTO_PROPERTY_DOUBLE(c, AbsTol, _absTol, \ "Absolute tolerance for the adaptive step integrators.") \ GYOTO_PROPERTY_DOUBLE(c, DeltaMaxOverR, _deltaMaxOverR, \ "Maximum value of step/distance from center of mass.") \ GYOTO_PROPERTY_DOUBLE(c, DeltaMax, _deltaMax, "Maximum step (geometrical units).") \ GYOTO_PROPERTY_DOUBLE(c, DeltaMin, _deltaMin, "Minimum step (geometrical units).") \ GYOTO_PROPERTY_STRING(c, Integrator, _integrator, \ "Name of integrator (\"runge_kutta_fehlberg78\").") \ GYOTO_PROPERTY_SIZE_T(c, MaxIter, _maxiter, \ "Maximum number of integration steps.") \ GYOTO_PROPERTY_BOOL(c, Adaptive, NonAdaptive, _adaptive, \ "Whether to use an adaptive step.") \ GYOTO_PROPERTY_DOUBLE_UNIT(c, MinimumTime, _tMin, \ "Do not integrate earlier than this date (geometrical_time).") \ GYOTO_PROPERTY_DOUBLE_UNIT(c, Delta, _delta, \ "Initial integration step (geometrical units).") \ GYOTO_PROPERTY_VECTOR_DOUBLE(c, InitCoord, _initCoord, \ "Initial 8-coordinate.") \ GYOTO_PROPERTY_METRIC(c, Metric, _metric, \ "The geometry of space-time at this end of the Universe.") /// Define the wrapper accessors used in GYOTO_WORLDLINE_PROPERTIES(class) /** This macro, which is called automatically by GYOTO_WORLDLINE_PROPERTY_END(c, a), must be called once with the definition of the methods (.C file) of any class that derives from Worldline. The corresponding macro GYOTO_WORLDLINE must be called in the corresponding class declaration (.h file). This is made necessary by how multiple inheritence works: directly using the accessors in the Worldline API leads to segfault at runtime (unless too much extra care is taken) and may go unnoticed. These accessors must be declared in the class declaration using the GYOTO_WORLDLINE macro. */ #define GYOTO_WORLDLINE_ACCESSORS(c) \ void c::_secondary(bool s) {secondary(s);} \ bool c::_secondary() const {return secondary();} \ void c::_adaptive(bool s) {adaptive(s);} \ bool c::_adaptive() const {return adaptive();} \ void c::_relTol(double f){relTol(f);} \ double c::_relTol()const{return relTol();} \ void c::_absTol(double f){absTol(f);} \ double c::_absTol()const{return absTol();} \ void c::_deltaMin(double f){deltaMin(f);} \ double c::_deltaMin()const{return deltaMin();} \ void c::_deltaMax(double f){deltaMax(f);} \ double c::_deltaMax()const{return deltaMax();} \ void c::_deltaMaxOverR(double f){deltaMaxOverR(f);} \ double c::_deltaMaxOverR()const{return deltaMaxOverR();} \ void c::_delta(double f){delta(f);} \ double c::_delta()const{return delta();} \ void c::_delta(double f, std::string const &u){delta(f, u);} \ double c::_delta(std::string const &u)const{return delta(u);} \ void c::_tMin(double f){tMin(f);} \ double c::_tMin()const{return tMin();} \ void c::_tMin(double f, std::string const &u){tMin(f, u);} \ double c::_tMin(std::string const &u)const{return tMin(u);} \ void c::_maxiter(size_t f){maxiter(f);} \ size_t c::_maxiter()const{return maxiter();} \ void c::_integrator(std::string const &f){integrator(f);} \ std::string c::_integrator() const {return integrator();} \ std::vector c::_initCoord()const{return initCoord();} \ void c::_initCoord(std::vector const &f){initCoord(f);} \ void c::_metric(SmartPointerf){metric(f);} \ SmartPointer c::_metric() const{return metric();} /// Drop-in replacement for GYOTO_PROPERTY_END(), which adds the Worldline interface /** * This macro replaces GYOTO_PROPERTY_END(c, a) for classes that * derive from Worldline. It calls GYOTO_WORLDLINE_PROPERTIES(a) and * GYOTO_WORLDLINE_ACCESSORS(c). If this macro is used, * GYOTO_WORLDLINE must be called in the class declaration (.h file). */ #define GYOTO_WORLDLINE_PROPERTY_END(c, a) \ GYOTO_WORLDLINE_PROPERTIES(c) \ GYOTO_PROPERTY_END(c, a) \ GYOTO_WORLDLINE_ACCESSORS(c) /// Declare the Worldline interface wrappers /** This macro must be called in the class declaration (.h file), in a public section. Its sibling GYOTO_WORLDLINE_ACCESSORS(c) must be called with the class method definition (.C file). Note that GYOTO_WORLDLINE_PROPERTY_END(c, a) calls GYOTO_WORLDLINE_ACCESSORS(c). */ #define GYOTO_WORLDLINE \ void _delta(const double delta); \ void _delta(double, const std::string &unit); \ double _delta() const ; \ double _delta(const std::string &unit) const ; \ void _tMin(const double tmin); \ void _tMin(double, const std::string &unit); \ double _tMin() const ; \ double _tMin(const std::string &unit) const ; \ void _adaptive (bool mode) ; \ bool _adaptive () const ; \ void _secondary (bool sec) ; \ bool _secondary () const ; \ void _maxiter (size_t miter) ; \ size_t _maxiter () const ; \ void _integrator(std::string const & type); \ std::string _integrator() const ; \ double _deltaMin() const; \ void _deltaMin(double h1); \ void _absTol(double); \ double _absTol()const; \ void _relTol(double); \ double _relTol()const; \ void _deltaMax(double h1); \ double _deltaMax()const; \ double _deltaMaxOverR() const; \ void _deltaMaxOverR(double t); \ std::vector _initCoord()const; \ void _initCoord(std::vector const&f); \ void _metric(SmartPointer); \ SmartPointer _metric() const; /** * \class Gyoto::Worldline * \brief Timelike or null geodesics * * Their are two derived classes: Photon and Star. A Worldline can be * integrated from an initial condition either backward or forward in * time using xFill() (Photon::hit() also integrates the * Worldline). Member #state_ holds the integration state as well as * an integrator. There are several kinds of integration states, that * derive from IntegState::Generic. * * The coordinates of the Worldline are stored in #x0_, #x1_, #x2_, * #x3_, #x0dot_, #x1dot_, #x2dot_ ans #x3dot_. Those arrays are * extended as needed using xExpand(). These coordinates can be * retrieved using get_t(), get_xyz(), getCartesian(), getCoord() etc. * * Worldline does not derive from Object, and does not instantiate a * Property list. This is because this would lead to multiple * inheritance of the Object base in derived classes. Instead, * #GyotoWorldline.h provides a few macros that can be used to include * the Worldline properties in a derived classe's Property list: * - #GYOTO_WORLDLINE is to be used in a public section of the * derived class declaration (.h file); it declares wrappers * around the Worldline property accessors; * - #GYOTO_WORLDLINE_ACCESSORS is to be used with the class * definition (.C file; it defines the accessors declared by * #GYOTO_WORLDLINE; * - #GYOTO_WORLDLINE_PROPERTIES declares the Properties that use * these accessors. It must be used like * e.g. #GYOTO_PROPERTY_DOUBLE, between #GYOTO_PROPERTY_START andf * #GYOTO_PROPERTY_END. * - Finally, #GYOTO_WORLDLINE_PROPERTY_END is a drop-in replacement * for #GYOTO_PROPERTY_END that calls #GYOTO_WORLDLINE_PROPERTIES * and #GYOTO_WORLDLINE_ACCESSORS. * */ class Gyoto::Worldline : protected Gyoto::Hook::Listener { // Data : // ----- public: int stopcond; ///< Whether and why integration is finished protected: SmartPointer metric_ ; ///< The Gyoto::Metric in this part of the universe double* x0_;///< t or T double* x1_;///< r or x double* x2_;///< θ or y double* x3_;///< φ or z double* x0dot_;///< tdot or Tdot double* x1dot_;///< rdot or xdot double* x2dot_;///< θdot or ydot double* x3dot_;///< φdot or zdot size_t x_size_;///< Size of #x0_, #x1_... arrays size_t imin_;///< Minimum index for which #x0_, #x1_... have been computed size_t i0_; ///< Index of initial condition in array size_t imax_;///< Maximum index for which #x0_, #x1_... have been computed bool adaptive_; ///< Whether integration should use adaptive delta /** * \brief Experimental: choose 0 to compute only primary image * * This feature is in development. */ bool secondary_; /** * \brief Initial integrating step * * Default: #GYOTO_DEFAULT_DELTA */ double delta_; /** * \brief Time limit for the integration (geometrical units) * * Computation does not go back before #tmin_. Default is -DBL_MAX. #tmin_ is * always expressed in geometrical units, it is essentially a tuning * parameter for the ray-tracing process. #tmin_ should be chosen to * always be longer than the distance between the screen and the * object. */ double tmin_; double * cst_; ///< Worldline's csts of motion (if any) size_t cst_n_; ///< Number of constants of motion int wait_pos_; ///< Hack in setParameters() double * init_vel_; ///< Hack in setParameters() size_t maxiter_ ; ///< Maximum number of iterations when integrating /** * \brief Minimum integration step for the adaptive integrator * * The default (#GYOTO_DEFAULT_DELTA_MIN) is usually fine. * * For IntegState::Legacy, set it in the Metric instead! */ double delta_min_; /** * \brief Maximum integration step for the adaptive integrator * * The default (#GYOTO_DEFAULT_DELTA_MAX) is usually fine. * * For IntegState::Legacy, set it in the Metric instead! */ double delta_max_; /** * \brief Numerical tuning parameter * * For IntegState::Legacy, set it in the Metric instead! * * Ensure that delta (the numerical integration step) is never * larger than a fraction of the distance between the current * location and the center of the coordinate system. * * The default (#GYOTO_DEFAULT_DELTA_MAX_OVER_R) is usually fine. */ double delta_max_over_r_; /** * \brief Absolute tolerance of the integrator * * Used by the adaptive integrators implemented in * IntegState::Boost. Refer to the boost::numeric::odeint * documentation for more details. */ double abstol_; /** * \brief Absolute tolerance of the integrator * * Used by the adaptive integrators implemented in * IntegState::Boost. Refer to the boost::numeric::odeint * documentation for more details. */ double reltol_; // Constructors - Destructor // ------------------------- public: Worldline() ; ///< Default constructor Worldline(const Worldline& ) ; ///< Copy constructor /// Refine constructor /** * Meant to instantiate a copy of orig with a smaller step to refine * integration, for instance for more accurate radiative transfer * integration. * * See Photon::Photon(Photon* orig, size_t i0, int dir, double * step_max) and Photon::Refined. * * \param orig Worldline to refine * \param i0 Index of coordinate in orig to take as initial condition * \param dir Direction of integration * \param step_max Maximum integration step */ Worldline(Worldline* orig, size_t i0, int dir, double step_max) ; virtual ~Worldline() ; ///< Destructor size_t getImin() const; ///< Get #imin_ size_t getImax() const; ///< Get #imax_ size_t getI0() const; ///< Get #i0_ virtual double getMass() const = 0; ///< Get mass of particule. void metric(SmartPointer); ///< Set metric Smartpointer SmartPointer metric() const; ///< Get metric void initCoord(std::vector const&); std::vector initCoord() const; /** * \brief Set Initial coordinate * * Set #imin_=#imax_=#i0_, and x_[i0_]=coord[]. * * If dir==1, #i0_ is set to 0. If dir==-1, #i0_ is set to #x_size_-1. * * If dir==0 and the Worldine has never been computed (#i0_==0, * #imin_==1 and #imax_==0), then dir defaults to 1 for a massive * particle and -1 for a massless particle. * * If dir==0 and the Worldine has already been computed, #i0_ is not * changed. * * \param coord new initial coordinates * \param dir direction of integration. 1 for forward integration, * -1 for backards integration, 0 for unknown or both. */ virtual void setInitCoord(const double coord[8], int dir = 0); /** * \brief Set initial coordinate * * \param pos initial 4-position * \param vel initial 3-velocity * \param dir direction of integration */ virtual void setInitCoord(double const pos[4], double const vel[3], int dir=0); virtual void setPosition(double const pos[4]); ///< Set initial 4-position virtual void setVelocity(double const vel[3]); ///< Set initial 3-velocity void reset() ; ///< Forget integration, keeping initial contition void reInit() ; ///< Reset and recompute particle properties virtual std::string className() const ; ///< "Worldline" virtual std::string className_l() const ; ///< "worldline" /** * \brief Set the integrator * * Initialize #state_ to use the required integrator. * * \param[in] type Either "Legacy" or (if GYOTO_HAVE_BOOST_INTEGRATORS) one of * "runge_kutta_cash_karp54", * "runge_kutta_fehlberg78", "runge_kutta_dopri5", * "runge_kutta_cash_karp54_classic" */ void integrator(std::string const & type); /** * \brief Describe the integrator used by #state_ */ std::string integrator() const ; /** * \brief Get #delta_min_ */ double deltaMin() const; /** * \brief Set #delta_min_ */ void deltaMin(double h1); /** * \brief Get #delta_max_ */ double deltaMax() const; void absTol(double); ///< Set #abstol_ double absTol()const; ///< Get #abstol_ void relTol(double); ///< Set #reltol_ double relTol()const; ///< Get #reltol_ /** * Get delta max at a given position * * \param[in] pos 4-position * \param[in] delta_max_external external constraint on delta_max * \return the smallest value between #delta_max_, * delta_max_external, and R*#delta_max_over_r_ where R is pos[1] in * spherical coordinates and max(x1, x2, x3) in Cartesian * coordinates. */ virtual double deltaMax(double const pos[8], double delta_max_external) const; /** * Set delta_max_ */ void deltaMax(double h1); double deltaMaxOverR() const; ///< Get #delta_max_over_r_ void deltaMaxOverR(double t); ///< Set #delta_max_over_r_ // Memory management // ----------------- protected: /** * The default size is #GYOTO_DEFAULT_X_SIZE */ virtual void xAllocate(); ///< Allocate x0, x1 etc. with default size /** * \param size : number of cells in each array x0, x1 etc. */ virtual void xAllocate(size_t size); ///< Allocate x0, x1 etc. with a specified size. /** * Double the size of arrays x0, x1 etc. and copy old version of the * array in the first half if dir =1 and in the second half if dir * =-1. * * \param dir : 1 to expand after last element, -1 to expand before * first element * * \return ind : if dir=1, new index of old last element, if dir=-1, * new index of old first element */ virtual size_t xExpand(int dir); ///< Expand x0, x1 etc... to hold more elements /** * If you need to expand more arrays than x0_ ... x3_ and the dots, * call this on your array before calling xExpand(int dir). * * \param[inout] x array to expand * \param[in] dir */ virtual void xExpand(double * &x, int dir); ///< Expand one array to hold more elements // Mutators / assignment // --------------------- public: /// Assignment to another Worldline void delta(const double delta); ///< Set #delta_ void delta(double, const std::string &unit); ///< Set #delta_ in specified units double delta() const ; ///< Get #delta_ double delta(const std::string &unit) const ; ///< Get #delta_ in specified units double tMin() const ; ///< Get #tmin_ double tMin(const std::string &unit) const ; ///< Get #tmin_ in specified unit void tMin(double tlim); ///< Set #tmin_ void tMin(double, const std::string &unit); ///< Set #tmin_ in specified unit void adaptive (bool mode) ; ///< Set #adaptive_ bool adaptive () const ; ///< Get #adaptive_ void secondary (bool sec) ; ///< Set #secondary_ bool secondary () const ; ///< Get #secondary_ void maxiter (size_t miter) ; ///< Set #maxiter_ size_t maxiter () const ; ///< Get #maxiter_ /** * Return pointer to array holding the previously set * Metric-specific constants of motion */ double const * getCst() const ; ///< Returns the worldline's cst of motion (if any) /// Set Metric-specific constants of motion /** * The will (re)allocate Worldline::cst_, copy cst into it, and set * Worldline::cst_n_. */ void setCst(double const * cst, size_t const ncsts) ; /// Set or re-set the initial condition prior to integration. /** * \param gg Gyoto::SmartPointer to the Gyoto::Metric in this universe; * \param coord 8 element array containing the initial condition, * i.e. the 4-position and the 4-velocity of the Photon at * the receiving end; * \param dir direction: 1 for future, -1 for past. */ void setInitialCondition(SmartPointer gg, const double coord[8], const int dir) ; void getInitialCoord(double dest[8]) const; ///< Get initial coordinate void getCoord(size_t index, double dest[8]) const; ///< Get coordinates corresponding to index void getCartesianPos(size_t index, double dest[4]) const; ///< Get Cartesian expression of 4-position at index. virtual void xStore(size_t ind, double const coord[8]) ; ///< Store coord at index ind virtual void xFill(double tlim) ; ///< Fill x0, x1... by integrating the Worldline from previously set inittial condition to time tlim // Accessors // --------- public: /** * \brief Get number of computed dates */ size_t get_nelements() const; /** * \brief Get computed dates */ void get_t(double *dest) const; /// Get the 6 Cartesian coordinates for specific dates. /** * The 6 coordinates (x, y, z, dx/dt, dy/dt, dz/dt) will be computed * using the integrator and interpolated if necessary, so they will * be as accurate as possible. Transforming to Cartesian coordinates * is not necessarily meaningful. * * \param[in] dates List of dates for which the coordinates are to * be computed; * * \param[in] n_dates Number of dates to compute ; * * \param[out] x, y, z, xprime, yprime, zprime Arrays in which to * store the result. These pointer may be set to NULL to retrieve * only part of the information. Else, they must be pre-allocated. * */ void getCartesian(double const * const dates, size_t const n_dates, double * const x, double * const y, double * const z, double * const xprime=NULL, double * const yprime=NULL, double * const zprime=NULL) ; /** * \brief Get 3-position in cartesian coordinates for computed dates */ void get_xyz(double* x, double *y, double *z) const; /** * \brief Get 8-coordinates for specific dates. * * The coordinates will be * computed using the integrator, so they will be as accurate as * possible. Some heuristics are used to speed up the process and it * is presumably faster to call this routine with a sorted list of * dates. The line will be integrated further as required. An error * will be thrown if it is not possible to reach a certain date. * * \param dates the list of dates for which the coordinates are to * be computed; * \param n_dates the number of dates to compute ; * \param x1dest, x2dest, x3dest, x0dot, x1dot, x2dot, x3dot arrays * in which to store the result. These pointer may be * set to NULL to retrieve only part of the * information. They must be pre-allocated. * */ void getCoord(double const * const dates, size_t const n_dates, double * const x1dest, double * const x2dest, double * const x3dest, double * const x0dot=NULL, double * const x1dot=NULL, double * const x2dot=NULL, double * const x3dot=NULL) ; /** * \brief Get all computed positions * * Get all the pre-computed 8 coordinates (e.g. thanks to a prior * call to xFill()) of this worldline. */ void getCoord(double *x0, double *x1, double *x2, double *x3) const ; /** * \brief Bring θ in [0,Π] and φ in [0,2Π] * * checkPhiTheta() Modifies coord if the corrdinates are spherical-like * so that coord[2]=theta is in [0,pi] and coord[3]=phi is in [0,2pi]. * Important to use in all astrobj in spherical coordinates * to prevent "z-axis problems". */ void checkPhiTheta(double coord[8]) const; /** * \brief Get computed positions in sky coordinates */ void getSkyPos(SmartPointer screen, double *dalpha, double *ddellta, double *dD) const; /** * \brief Get computed 4-velocities */ void get_dot(double *x0dot, double *x1dot, double *x2dot, double *x3dot) const ; /** * \brief Get computed 3-velocities */ void get_prime(double *x1prime, double *x2prime, double *x3prime) const ; // Outputs // ------- public: //virtual void sauve(FILE *) const ; ///< Save in a file void save_txyz(char * fichierxyz) const ; ///< Save in a file void save_txyz(char* const filename, double const t1, double const mass_sun, double const distance_kpc, std::string const unit, SmartPointer sc = NULL);///< Save, converted protected: virtual void tell(Gyoto::Hook::Teller*); class IntegState { public: class Generic; class Legacy; #ifdef GYOTO_HAVE_BOOST_INTEGRATORS class Boost; #endif }; /** * \brief An object to hold the integration state */ SmartPointer state_; }; #ifndef GYOTO_SWIGIMPORTED /** * \class Gyoto::Worldline::IntegState::Generic * \brief Current state of a geodesic integration */ class Gyoto::Worldline::IntegState::Generic : public SmartPointee { friend class Gyoto::SmartPointer; protected: /// Worldline that we are integrating. /** * Beware this is not a SmartPointer. Make sure line_ still exists * when calling nestStep(). */ Worldline * line_; double delta_; ///< Integration step (current in case of #adaptive_). bool adaptive_; ///< Whether to use an adaptive step double norm_; ///< Current norm of the 4-velocity. double normref_; ///< Initial norm of the 4-velocity. /// The Metric in this end of the Universe. /** * Taken from Worldline::line_, never updated. */ Gyoto::SmartPointer gg_; public: /** * \brief Normal constructor * * Sets #line_ */ Generic(Worldline *parent); /** * \brief Virtual destructor */ virtual ~Generic(); /** * \brief Deep copy * * Derived classes must implement it */ virtual Generic * clone(Worldline*newparent) const =0 ; /** * \param line The Worldline that we are integrating. Sets: * Worldline::line_, Worldline::gg_, Worldline::adaptive_. * \param coord Initial coordinate. * \param delta Integration step. Sign determines direction. */ virtual void init(Worldline * line, const double *coord, const double delta); /** * \brief Cache whatever needs to be cached * * This is called by all the methods in Worldline each time an * member that could be cached in Worldline::state_ * changes. Therefore, user code should normally not have to call * it. */ virtual void init(); /** * \brief Check norm * * Issue a warning using #GYOTO_SEVERE if norm is * drifting. nextStep() implementations should call it. */ virtual void checkNorm(double coord[8]); /** * \brief Return the integrator kind */ virtual std::string kind()=0; /// Make one step. /** * \param[out] coord Next position-velocity; * \param[in] h1max maximum step in case of adaptive integration */ virtual int nextStep(double *coord, double h1max=GYOTO_DEFAULT_DELTA_MAX)=0; /// Make one step of exactly this size. /** * doStep() is meant to refine a computation made using * nextStep(). In particular, there is no checking for norm * conservation. * * \param[in] coordin current position-velocity; * \param[in] step exact step to use. * \param[out] coordout next position-velocity; */ virtual void doStep(double const coordin[8], double step, double coordout[8])=0; }; /** * \class Gyoto::Worldline::IntegState::Legacy * \brief Home-brewed integrator * * The integrator used by this IntegState::Generic implementation is * actually implemented in Metric::Generic::myrk4_adaptive(). It does * not use most of the tuning parameters Worldline, it uses the * homonym parameters in Metric::Generic instead. to use this * integrator, pass "Legacy" to Worldline::integrator(std::string * type). */ class Gyoto::Worldline::IntegState::Legacy : public Generic { friend class Gyoto::SmartPointer; private: double coord_[8]; ///< Previously determined coordinate. public: /// Constructor Legacy(Worldline *parent); Legacy * clone(Worldline*newparent) const ; using Generic::init; void init(Worldline * line, const double *coord, const double delta); virtual std::string kind(); virtual int nextStep(double *coord, double h1max=1e6); virtual void doStep(double const coordin[8], double step, double coordout[8]); virtual ~Legacy(); }; #ifdef GYOTO_HAVE_BOOST_INTEGRATORS /** * \class Gyoto::Worldline::IntegState::Boost * \brief Boost integrator * * This Worldline::IntegState::Generic implementation provides several * integrators from the boost::numeric::odeint library. To select it, * pass one of "runge_kutta_cash_karp54", "runge_kutta_fehlberg78", * "runge_kutta_dopri5", or "runge_kutta_cash_karp54_classic" to * Worldline::integrator(std::string type). */ class Gyoto::Worldline::IntegState::Boost : public Generic { friend class Gyoto::SmartPointer; public: /** * \brief Enum to represent the integrator flavour */ enum Kind {runge_kutta_cash_karp54, runge_kutta_fehlberg78, runge_kutta_dopri5, runge_kutta_cash_karp54_classic }; private: /// Integrator flavour Kind kind_; /// Stepper used by the adaptive-step integrator std::function&, double&, double&)> try_step_; /// Stepper used by the non-adaptive-step integrator std::function&, double)> do_step_; public: /// Constructor /** * Since this IntegState::Generic implementation can actually be * used to implement several distinct integrators, it is necessary * to specify which one is meant. */ Boost(Worldline* parent, std::string type); /// Constructor /** * Since this IntegState::Generic implementation can actually be * used to implement several distinct integrators, it is necessary * to specify which one is meant. */ Boost(Worldline* parent, Kind type); Boost * clone(Worldline* newparent) const ; virtual ~Boost(); virtual void init(); virtual void init(Worldline * line, const double *coord, const double delta); virtual int nextStep(double *coord, double h1max=1e6); virtual void doStep(double const coordin[8], double step, double coordout[8]); virtual std::string kind(); }; #endif /// GYOTO_HAVE_BOOST_INTEGRATORS #endif /// GYOTO_SWIGIMPORTED #endif Gyoto-1.2.0/install-sh000077500000000000000000000332551302352257300146310ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # 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-writable 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: Gyoto-1.2.0/lib/000077500000000000000000000000001302352257300133635ustar00rootroot00000000000000Gyoto-1.2.0/lib/Astrobj.C000066400000000000000000000442361302352257300151040ustar00rootroot00000000000000/* Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ // GYOTO HEADERS #include "GyotoUtils.h" #include "GyotoAstrobj.h" #include "GyotoMetric.h" #include "GyotoPhoton.h" #include "GyotoRegister.h" #include "GyotoFactoryMessenger.h" #include "GyotoProperty.h" // SYSTEM HEADERS #include #include #include #include #include #include #include // NAMESPACES using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; Register::Entry* Gyoto::Astrobj::Register_ = NULL; GYOTO_PROPERTY_START(Gyoto::Astrobj::Generic, "Whatever emits or absorbs light.") GYOTO_PROPERTY_METRIC(Generic, Metric, metric, "The geometry of space-time at this end of the Universe.") GYOTO_PROPERTY_DOUBLE_UNIT(Generic, RMax, rMax, "Maximum distance from the centre of mass (geometrical units).") GYOTO_PROPERTY_BOOL(Generic, Redshift, NoRedshift, redshift, "Whether to take redshift into account.") GYOTO_PROPERTY_BOOL(Generic, RadiativeQ, NoRadiativeQ, radiativeQ, "Whether to use new treatement for radiative transfer (in progress).") GYOTO_PROPERTY_BOOL(Generic, ShowShadow, NoShowShadow, showshadow, "Whether to highlight the shadow region on the image.") GYOTO_PROPERTY_BOOL(Generic, OpticallyThin, OpticallyThick, opticallyThin, "Whether the object should be considered optically thin or thick.") GYOTO_PROPERTY_END(Generic, Object::properties) Generic::Generic(string kin) : SmartPointee(), Object(kin), gg_(NULL), rmax_(DBL_MAX), flag_radtransf_(0), radiativeq_(0), noredshift_(0), shadow_(0) { #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; #endif } Generic::Generic() : SmartPointee(), Object("Default"), gg_(NULL), rmax_(DBL_MAX), flag_radtransf_(0), radiativeq_(0), noredshift_(0), shadow_(0) { #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; #endif } Generic::Generic(double radmax) : SmartPointee(), Object("Default"), gg_(NULL), rmax_(radmax), flag_radtransf_(0), radiativeq_(0), noredshift_(0), shadow_(0) { #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; #endif } Generic::Generic(const Generic& orig) : SmartPointee(orig), Object(orig), gg_(NULL), rmax_(orig.rmax_), flag_radtransf_(orig.flag_radtransf_), radiativeq_(orig.radiativeq_), noredshift_(orig.noredshift_), shadow_(orig.shadow_) { #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; #endif if (orig.gg_()) { #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "orig had a metric, cloning"<< endl; #endif gg_=orig.gg_->clone(); } #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "done" << endl; #endif } Generic::~Generic() { #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; #endif } SmartPointer Generic::metric() const { return gg_; } void Generic::metric(SmartPointer gg) {gg_=gg;} const string Generic::kind() const { return kind_; } double Generic::rMax() { return rmax_; } double Generic::rMax() const { return rmax_; } double Generic::rMax(string const &unit) { return Units::FromGeometrical(rMax(), unit, gg_); } double Generic::rMax(string const &unit) const { return Units::FromGeometrical(rMax(), unit, gg_); } void Generic::rMax(double val) { rmax_=val; } void Generic::rMax(double val, string const &unit) { rMax(Units::ToGeometrical(val, unit, gg_)); } #ifdef GYOTO_USE_XERCES void Generic::setParameters(FactoryMessenger *fmp) { if (fmp) metric(fmp->metric()); Object::setParameters(fmp); } #endif void Generic::opticallyThin(bool flag) {flag_radtransf_=flag;} bool Generic::opticallyThin() const {return flag_radtransf_;} void Generic::radiativeQ(bool flag) {radiativeq_=flag;} bool Generic::radiativeQ() const {return radiativeq_;} void Generic::showshadow(bool flag) {shadow_=flag;} bool Generic::showshadow() const {return shadow_;} void Generic::redshift(bool flag) {noredshift_=!flag;} bool Generic::redshift() const {return !noredshift_;} void Generic::processHitQuantities(Photon* ph, double* coord_ph_hit, double* coord_obj_hit, double dt, Properties* data) const { #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; #endif /* NB: freqObs is the observer's frequency chosen in Screen::getRayCoord for the actual computation of the geodesic ; the physical value of nuobs will be used in spectrum computations by resorting to the xml specifications of the user (see below) ; this freqObs is used to transform the null worldline parameter dlambda (see below) */ double freqObs=ph->freqObs(); // this is a useless quantity, always 1 SmartPointer spr = ph -> spectrometer(); size_t nbnuobs = spr() ? spr -> nSamples() : 0 ; double const * const nuobs = nbnuobs ? spr -> getMidpoints() : NULL; double dlambda = dt/coord_ph_hit[4]; //dlambda = dt/tdot // cout << "freqObs="<ScalarProd(coord_ph_hit,coord_obj_hit+4, coord_ph_hit+4);// / 1.; //this is nu_em/nu_obs // for nuobs=1. Hz if (noredshift_) ggredm1=1.; double ggred = 1./ggredm1; //this is nu_obs/nu_em double dsem = dlambda*ggredm1; // * 1Hz ? double inc =0.; if (data) { #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "data requested. " << "freqObs=" << freqObs << ", ggredm1=" << ggredm1 << ", ggred=" << ggred << endl; #endif if (data->redshift) { *data->redshift=ggred; #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(*data->redshift); #endif } if (data->time) { *data->time=coord_ph_hit[0]; #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(*data->time); #endif } if (data->impactcoords && data->impactcoords[0]==DBL_MAX) { memcpy(data->impactcoords, coord_obj_hit, 8 * sizeof(double)); memcpy(data->impactcoords+8, coord_ph_hit, 8 * sizeof(double)); } #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "dlambda = (dt="<< dt << ")/(tdot="<< coord_ph_hit[4] << ") = " << dlambda << ", dsem=" << dsem << endl; #endif if (data->intensity) { /* Comment on intensity integration: Eq of radiative transfer used: dI_nu_em/ds_em = j_nu_em (assumes no absorption for simplicity) where : nu_em is measured by the emitter, ds_em is the proper length measured by the emitter corresponding to an increase dlambda of the parameter of the null worldline of the photon ; We have (see manual for demo) : ds_em = dlambda*nu_em BUT: dlambda is depending on the choice of freqObs (defined above) ; indeed we have: dlambda(freqObs) * freqObs = cst (i.e. independent of the choice of freqObs). Thus, for spectra computations where the observed frequency varies, we have to use the dlambda corresponding to the physical frequency chosen by the user, dlambda(nuobs), instead of dlambda(freqObs). The conversion is easy : dlambda(nuobs) = dlambda(freqObs)*freqObs/nuobs Thus: ds_em = dlambda(nuobs)*nu_em = dlambda(freqObs)*freqObs*ggredm1 Then, j_nu_em is computed by the emission() function of the Astrobj [NB: with rad. transfer emission() computes j_nu*dsem, without rad. transfer it computes I_nu, thus the result is always homogenous to intensity] Finally: I_nu_obs = I_nu_em*(nu_obs/nu_em)^3 */ //Intensity increment : GYOTO_DEBUG_EXPR(freqObs); GYOTO_DEBUG_EXPR(freqObs*ggredm1); inc = (emission(freqObs*ggredm1, dsem, coord_ph_hit, coord_obj_hit)) * (ph -> getTransmission(size_t(-1))) * ggred*ggred*ggred; // I_nu/nu^3 invariant # ifdef HAVE_UDUNITS if (data -> intensity_converter_) inc = (*data -> intensity_converter_)(inc); # endif *data->intensity += inc; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "intensity +=" << *data->intensity << "= emission((dsem=" << dsem << "))=" << (emission(freqObs*ggredm1,dsem,coord_ph_hit, coord_obj_hit)) << ")*(ggred=" << ggred << ")^3*(transmission=" << (ph -> getTransmission(size_t(-1))) << ")" << endl; # endif } if (data->binspectrum) { size_t nbounds = spr-> getNBoundaries(); double const * const channels = spr -> getChannelBoundaries(); size_t const * const chaninds = spr -> getChannelIndices(); double * I = new double[nbnuobs]; double * boundaries = new double[nbounds]; for (size_t ii=0; ii getTransmission(ii) * ggred*ggred*ggred*ggred; # ifdef HAVE_UDUNITS if (data -> binspectrum_converter_) inc = (*data -> binspectrum_converter_)(inc); # endif data->binspectrum[ii*data->offset] += inc ; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "nuobs[" << ii << "]="<< channels[ii] << ", nuem=" << boundaries[ii] << ", binspectrum[" << ii+data->offset << "]=" << data->binspectrum[ii*data->offset]<< endl; # endif } delete [] I; delete [] boundaries; } if (data->spectrum) { double * Inu = new double[nbnuobs]; double * Taunu = new double[nbnuobs]; double * nuem = new double[nbnuobs]; for (size_t ii=0; ii getTransmission(ii) * ggred*ggred*ggred; # ifdef HAVE_UDUNITS if (data -> spectrum_converter_) inc = (*data -> spectrum_converter_)(inc); # endif data->spectrum[ii*data->offset] += inc; if (!radiativeq_){ ph -> transmit(ii,transmission(nuem[ii],dsem,coord_ph_hit)); }else{ ph -> transmit(ii,Taunu[ii]); } # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "DEBUG: Generic::processHitQuantities(): " << "nuobs[" << ii << "]="<< nuobs[ii] << ", nuem=" << nuem[ii] << ", dsem=" << dsem << ", Inu * GM/c2=" << Inu[ii] << ", spectrum[" << ii*data->offset << "]=" << data->spectrum[ii*data->offset] << ", transmission=" << ph -> getTransmission(ii) << ", optical depth=" << -log(ph -> getTransmission(ii)) << ", redshift=" << ggred << ")\n" << endl; # endif } delete [] Inu; delete [] Taunu; delete [] nuem; } /* update photon's transmission */ ph -> transmit(size_t(-1), transmission(freqObs*ggredm1, dsem,coord_ph_hit)); } else { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "NO data requested!" << endl; # endif } } double Generic::transmission(double, double, double*) const { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(flag_radtransf_); # endif return double(flag_radtransf_); } double Generic::emission(double , double dsem, double *, double *) const { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(flag_radtransf_); # endif if (flag_radtransf_) return dsem; return 1.; } void Generic::emission(double * Inu, double * nuem , size_t nbnu, double dsem, double *cph, double *co) const { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(flag_radtransf_); # endif for (size_t i=0; i< nbnu; ++i) Inu[i]=emission(nuem[i], dsem, cph, co); } void Generic::radiativeQ(double * Inu, double * Taunu, double * nuem , size_t nbnu, double dsem, double *cph, double *co) const { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(flag_radtransf_); # endif for (size_t i=0; i< nbnu; ++i) { Inu[i]=emission(nuem[i], dsem, cph, co); Taunu[i]=transmission(nuem[i], dsem, cph); } } void Generic::integrateEmission(double * I, double const * boundaries, size_t const * chaninds, size_t nbnu, double dsem, double *cph, double *co) const { for (size_t i=0; inu2) {nu=nu1; nu1=nu2; nu2=nu;} double Inu1 = emission(nu1, dsem, coord_ph, coord_obj); double Inu2 = emission(nu2, dsem, coord_ph, coord_obj); double dnux2 = ((nu2-nu1)*2.); double Icur = (Inu2+Inu1)*dnux2*0.25; double Iprev; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(Icur); # endif do { Iprev = Icur; dnux2 *= 0.5; for (nu = nu1 + 0.5*dnux2; nu < nu2; nu += dnux2) { Icur += emission(nu, dsem, coord_ph, coord_obj) * dnux2; } Icur *= 0.5; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(Icur); # endif } while( fabs(Icur-Iprev) > (1e-2 * Icur) ); # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "dnu=" << dnux2*0.5 << "=(nu2-nu1)/" << (nu2-nu1)/(dnux2*0.5) << endl; # endif return Icur; } Quantity_t Generic::getDefaultQuantities() { return GYOTO_QUANTITY_INTENSITY; } void Astrobj::initRegister() { if (Gyoto::Astrobj::Register_) delete Gyoto::Astrobj::Register_; Gyoto::Astrobj::Register_ = NULL; } double Generic::deltaMax(double coord[8]) { double rr=0.,h1max; if (!gg_) throwError("Please set metric before calling Astrobj::Generic::deltaMax()"); switch (gg_ -> coordKind()) { case GYOTO_COORDKIND_SPHERICAL: rr=coord[1]; break; case GYOTO_COORDKIND_CARTESIAN: rr=sqrt(coord[1]*coord[1]+coord[2]*coord[2]+coord[3]*coord[3]); break; default: throwError("Incompatible coordinate kind in Astrobj.C"); } if (rr conv) { intensity_converter_ = conv ; } void Astrobj::Properties::intensityConverter(string unit) { intensity_converter_ = new Units::Converter("J.m-2.s-1.sr-1.Hz-1", unit!=""?unit:"J.m-2.s-1.sr-1.Hz-1"); } void Astrobj::Properties::spectrumConverter(SmartPointer conv) { spectrum_converter_ = conv; } void Astrobj::Properties::spectrumConverter(string unit) { spectrum_converter_ = new Units::Converter("J.m-2.s-1.sr-1.Hz-1", unit!=""?unit:"J.m-2.s-1.sr-1.Hz-1"); } void Astrobj::Properties::binSpectrumConverter(SmartPointer conv) { binspectrum_converter_ = conv; } void Astrobj::Properties::binSpectrumConverter(string unit) { binspectrum_converter_ = new Units::Converter("J.m-2.s-1.sr-1", unit!=""?unit:"J.m-2.s-1.sr-1"); } #endif Astrobj::Properties& Astrobj::Properties::operator+=(ptrdiff_t ofset) { if (intensity) intensity += ofset; if (time) time += ofset; if (distance) distance += ofset; if (first_dmin) first_dmin += ofset; if (redshift) redshift += ofset; if (spectrum) spectrum += ofset; if (binspectrum) binspectrum += ofset; if (impactcoords) impactcoords += 16*ofset; if (user1) user1 += ofset; if (user2) user2 += ofset; if (user3) user3 += ofset; if (user4) user4 += ofset; if (user5) user5 += ofset; return *this; } Astrobj::Properties& Astrobj::Properties::operator++() { (*this) += 1; return *this; } Astrobj::Properties::operator Quantity_t () const { Quantity_t res=GYOTO_QUANTITY_NONE; if (intensity) res |= GYOTO_QUANTITY_INTENSITY; if (time) res |= GYOTO_QUANTITY_EMISSIONTIME; if (distance) res |= GYOTO_QUANTITY_MIN_DISTANCE; if (first_dmin) res |= GYOTO_QUANTITY_FIRST_DMIN; if (redshift) res |= GYOTO_QUANTITY_REDSHIFT; if (spectrum) res |= GYOTO_QUANTITY_SPECTRUM; if (binspectrum) res |= GYOTO_QUANTITY_BINSPECTRUM; if (impactcoords) res |= GYOTO_QUANTITY_IMPACTCOORDS; if (user1) res |= GYOTO_QUANTITY_USER1; if (user2) res |= GYOTO_QUANTITY_USER2; if (user3) res |= GYOTO_QUANTITY_USER3; if (user4) res |= GYOTO_QUANTITY_USER4; if (user5) res |= GYOTO_QUANTITY_USER5; return res; } Gyoto-1.2.0/lib/BlackBodySpectrum.C000066400000000000000000000036421302352257300170510ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoBlackBodySpectrum.h" #include "GyotoDefs.h" #include #include /* atof */ #ifdef GYOTO_USE_XERCES #include "GyotoFactory.h" #include "GyotoFactoryMessenger.h" #endif using namespace Gyoto; /// Properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(Spectrum::BlackBody) GYOTO_PROPERTY_DOUBLE(Spectrum::BlackBody, Temperature, temperature) GYOTO_PROPERTY_DOUBLE(Spectrum::BlackBody, Scaling, scaling) GYOTO_PROPERTY_END(Spectrum::BlackBody, Generic::properties) /// Spectrum::BlackBody::BlackBody() : Spectrum::Generic("BlackBody"), T_(10000.), cst_(2.*GYOTO_PLANCK_OVER_C_SQUARE) {Tm1_=1./T_;} Spectrum::BlackBody::BlackBody(double T, double c) : Spectrum::Generic("BlackBody"), T_(T), cst_(c) {Tm1_=1./T_;} Spectrum::BlackBody * Spectrum::BlackBody::clone() const { return new Spectrum::BlackBody(*this); } double Spectrum::BlackBody::temperature() const { return T_; } void Spectrum::BlackBody::temperature(double c) { T_ = c; Tm1_=1./T_; } double Spectrum::BlackBody::scaling() const { return cst_; } void Spectrum::BlackBody::scaling(double c) { cst_ = c; } double Spectrum::BlackBody::operator()(double nu) const { return cst_*nu*nu*nu /(exp(GYOTO_PLANCK_OVER_BOLTZMANN*nu*Tm1_)-1.); } Gyoto-1.2.0/lib/ChernSimons.C000066400000000000000000000221131302352257300157160ustar00rootroot00000000000000/* Copyright 2013, 2016 Frederic Vincent & Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoChernSimons.h" #include #include #include using namespace Gyoto; using namespace Gyoto::Metric; using namespace std; /// Properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(ChernSimons, "Chern-Simons 1st order perturbation to KerrBL metric") GYOTO_PROPERTY_DOUBLE(ChernSimons, DzetaCS, dzetaCS, "Chern-Simons coupling constant") GYOTO_PROPERTY_END(ChernSimons, KerrBL::properties) // accessor void ChernSimons::dzetaCS(double d) {dzetaCS_=d;} double ChernSimons::dzetaCS() const {return dzetaCS_;} /// #define drhor 2e-1 // 1e-1 leads to problem close to horizon Gyoto::Metric::ChernSimons::ChernSimons() : KerrBL(), dzetaCS_(0.) { // The constructor should only initialize to default values, the // subcontractor will later call setParameter() to set each // parameter. kind("ChernSimons"); GYOTO_DEBUG << "Building ChernSimons" << endl; } Gyoto::Metric::ChernSimons::ChernSimons(const ChernSimons &o) : KerrBL(o), dzetaCS_(o.dzetaCS_) { // don't forget to copy each member here kind("ChernSimons"); GYOTO_DEBUG << "Copying ChernSimons" << endl; } ChernSimons * ChernSimons::clone() const { return new ChernSimons(*this); } Gyoto::Metric::ChernSimons::~ChernSimons() { // delete each member pointers or decremente smartpointers by // setting them to NULL GYOTO_DEBUG << "Destroying ChernSimons"; } double ChernSimons::gmunu(const double * pos, int mu, int nu) const { double r = pos[1]; double sth2, cth2; sincos(pos[2], &sth2, &cth2); sth2*=sth2; cth2*=cth2; double r2=r*r, r3=r2*r; double a2=spin_*spin_; double sigma=r2+a2*cth2; double delta=r2-2.*r+a2; double ff=1.-2./r; if ((mu==0) && (nu==0)) { return -ff-2.*a2/r3*cth2; } if ((mu==1) && (nu==1)) return 1./ff+a2/(ff*r2)*(cth2-1./ff); if ((mu==2) && (nu==2)) return sigma; if ((mu==3) && (nu==3)) return r2*sth2+a2*sth2*(1.+2./r*sth2); if (((mu==0) && (nu==3)) || ((mu==3) && (nu==0))){ return -2*spin_/r*sth2 +5./8.*dzetaCS_*spin_/(r2*r2)*(1.+12./7.*1./r+27./10.*1./r2)*sth2; } return 0.; } double ChernSimons::gmunu_up(const double * pos, int mu, int nu) const { double r = pos[1]; double sth2, cth2; sincos(pos[2], &sth2, &cth2); sth2*=sth2; cth2*=cth2; double r2=r*r; double a2=spin_*spin_; double sigma=r2+a2*cth2; double delta=r2-2.*r+a2; double xi=(r2+a2)*(r2+a2)-a2*delta*sth2; if ((mu==0) && (nu==0)) { double gtt=-(1.-2.*r/sigma); double gtp=-2*spin_*r*sth2/sigma+ 5./8.*dzetaCS_*spin_/(r2*r2)*(1.+12./7.*1./r+27./10.*1./r2)*sth2; double gpp=(r2+a2+2.*r*a2*sth2/sigma)*sth2; double det=gtp*gtp-gtt*gpp; return -gpp/det; } if ((mu==1) && (nu==1)) return delta/sigma; if ((mu==2) && (nu==2)) return 1./sigma; if ((mu==3) && (nu==3)) { double gtt=-(1.-2.*r/sigma); double gtp=-2*spin_*r*sth2/sigma+ 5./8.*dzetaCS_*spin_/(r2*r2)*(1.+12./7.*1./r+27./10.*1./r2)*sth2; double gpp=(r2+a2+2.*r*a2*sth2/sigma)*sth2; double det=gtp*gtp-gtt*gpp; return -gtt/det; } if (((mu==0) && (nu==3)) || ((mu==3) && (nu==0))){ double gtt=-(1.-2.*r/sigma); double gtp=-2*spin_*r*sth2/sigma+ 5./8.*dzetaCS_*spin_/(r2*r2)*(1.+12./7.*1./r+27./10.*1./r2)*sth2; double gpp=(r2+a2+2.*r*a2*sth2/sigma)*sth2; double det=gtp*gtp-gtt*gpp; return gtp/det; } return 0.; } int ChernSimons::diff(const double* coordGen, const double* cst, double* res) const{ double a2=spin_*spin_; //int width=25;//15; //int prec=15;//8; double rsink=1.+sqrt(1.-a2)+drhor; double r = coordGen[1]; if (r < 0.) { cerr << "r= " << r << endl; throwError( "ChernSimons.C: r negative!!!!! the horizon" " may have been crossed..." ); } if (r < rsink) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "Too close to horizon in ChernSimons::diff at r= " << r << endl; # endif return 1; } double r2 = r*r; double r3 = r2*r; double r4 = r2*r2; double r5=r4*r; double ff = 1.-2./r; // compute and store efficiently sin, cos, cotan double theta=coordGen[2]; double costheta, sintheta; sincos(theta, &sintheta, &costheta); double costheta2=costheta*costheta; if (sintheta==0.) throwError("sintheta==0"); double cotantheta=costheta/sintheta; double cotantheta2=cotantheta*cotantheta; double cotantheta3=cotantheta2*cotantheta; double sin2theta=2.*sintheta*costheta; double cos2theta=2.*costheta2-1.; double pr=coordGen[5]; double ptheta=coordGen[6]; double a3=a2*spin_; double Sigma=r2+a2*costheta2; if (Sigma==0) throwError("In ChernSimons::diff(): Sigma==0"); double Sigmam1=1./Sigma; double Sigmam2=Sigmam1*Sigmam1; double Delta=r2-2*r+a2; double E=cst[1]; double E2=E*E; double L=cst[2]; double L2=L*L; double tmp1=(2.*Delta*Sigma); if (tmp1==0) throwError("In ChernSimons::diff(): 2.*Delta*Sigma==0"); double tmp1m1=1./tmp1; if (Delta==0) throwError("In ChernSimons::diff(): Delta==0"); //NB: equations of motion are independent of Carter constant in this //form. However, the dependency of the dynamic on this constant //appears when transforming from principal momenta to coordinate //derivatives (e.g. p_theta -> thetadot) /* ---> Standard Kerr equations of geodesics, slow rotation approx. */ res[0] = 1./(2.*ff*r4) *(2.*( r*(-2.*spin_*L+E*r3+a2*E*(2.+r))+a2*E*(a2+r*(-2.+r))*costheta2 ) ) - 1./(2.*ff*r4)*a2/r2*(costheta2-1./ff) *(2.*( E*r4 // to order zero in a2 ) );// tdot res[1] = (ff+a2/r2*(1.-ff*costheta2))*pr; //rdot res[2] = 1./r2*(1.-a2/r2*costheta2)*ptheta; //thetadot res[3] = -1./(2.*ff*r4) *(-2.*( r*(2.*spin_*E+L*(-2.+r))+L*(a2+r*(-2.+r))*cotantheta2 ) ) +1./(2.*ff*r4)*a2/r2*(costheta2-1./ff) *(-2.*(r*(2.*spin_*E+L*(-2.+r))+L*(r*(-2.+r)) *cotantheta2) ) ; //phidot res[4] = 0.;// ptdot: pt = cst = -E double tmp2=r2+a2*costheta2; if (tmp2==0) throwError("r2+a2*costheta2==0"); double tmp2m2=1./(tmp2*tmp2); double tmp3=a2+r*(-2.+r); double tmp3_2=tmp3*tmp3; res[5] = (-1./r4*(r*(r-a2)-a2*(1.-r)*costheta2)+2.*a2*costheta2/r4)*pr*pr +1./r3*(1.-2.*a2/r2*costheta2)*ptheta*ptheta +(1./(r4*r4*ff*ff) *( costheta2*a2*E2*r3*(r-4.) -2.*r3*spin_*E*L*(4.-3.*r) -r2*a2*(L2+2*E2*r*(r-2.)) -r3*(E2*r3-L2*(r-2.)*(r-2.)) +L2*cotantheta2*r4*r*ff*ff*(1.+2*a2/(ff*r2)) ) -2.*a2/(r4*r4*r2*ff*ff)*(costheta2+1./ff) *( -r3*(E2*r3-L2*(r-2.)*(r-2.)) +L2*cotantheta2*r5*ff*ff*(1.+2.*a2/(ff*r2)) ) );// prdot res[6]= -0.5*(a2*sin2theta*ff/r2)*pr*pr -0.5*(a2*sin2theta*1./r4)*ptheta*ptheta +( 1./r4 *( L2*r2*cotantheta +0.5*L2*(a2+2.*r2+a2*cos2theta)*cotantheta3 +a2/(ff*r)*(L2*(2.-r)+2.*E2*r2)*costheta*sintheta ) -2.*a2*costheta2/(r4*r2) *( L2*r2*cotantheta+L2*r2*cotantheta3 ) ); // pthetadot res[7] = 0.;//pphidot: pphi = cst = L /* ---> Chern-Simons modifications to 1st order Checked Jul 10: OK */ res[0]+= 1./(2.*ff*r4)*spin_*L*(189.+120.*r+70.*r2)*dzetaCS_/(56.*r2*r2); //tdot res[3]+= -1./(2.*ff*r4)*spin_*E*(189.+120.*r+70.*r2)*dzetaCS_/(56.*r2*r2); //phidot res[5]+=-spin_*E*L*dzetaCS_/(56.*r4*r2*(r-2.))* ( -1323.+36.*r+70.*r2+210.*r2*r ) / ( r2*(r-2.)+2.*a2*costheta2*(r-2.)+2.*a2*r ); res[6]+=a3*E*L*dzetaCS_* (189.+120.*r+70.*r2)*costheta*sintheta / (56.*r4*r4*(a2+r*(r-2.)*(1.+2.*a2/r2*costheta2))); //pthdot return 0; } void ChernSimons::circularVelocity(double const coor[4], double vel[4], double dir) const { if (keplerian_) { // If keplerian_ is true, let the generic implementation return // the Keplerian velocity instead of the true circular velocity Generic::circularVelocity(coor, vel, dir); return; } # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG<<"coor=["< [cardinal_]; for (size_t i=0; i< cardinal_; ++i) { elements_[i] = o[i]->clone(); } } metric(gg_); // to set the same metric in all elements } Complex *Complex::clone() const {return new Complex(*this); } Complex::~Complex() { if (cardinal_) for (size_t i=0; i< cardinal_; ++i) elements_[i] = NULL; } bool Complex::isThreadSafe() const { bool safe = Generic::isThreadSafe(); for (size_t i=0; i < cardinal_; ++i) safe &= elements_[i] -> isThreadSafe(); return safe; } void Complex::metric(SmartPointer gg) { Generic::metric(gg); for (size_t i=0; ikind(); cerr << ". Setting metric." << endl; } elements_[i]->metric(gg_); } } void Complex::append(SmartPointer e) { if (debug()) cerr << "DEBUG: in Complex::append(SmartPointer e)" << endl; if (cardinal_+1 == 0) throwError("Complex::append(): OVERFLOW"); SmartPointer * orig = elements_; elements_ = new SmartPointer [cardinal_+1]; for (size_t i=0; i< cardinal_; ++i) { elements_[i] = orig[i]; orig[i] = NULL; } delete [] orig; orig = NULL; elements_[cardinal_] = e; ++cardinal_; if (gg_) e->metric(gg_); else gg_ = e->metric(); if (debug()) cerr << "DEBUG: out Complex::append(SmartPointer e)" << endl; } SmartPointer& Complex::operator[](size_t i) { if (i > cardinal_) throwError("Complex::operator[](size_t i): no such element"); return elements_[i]; } SmartPointer const& Complex::operator[](size_t i) const { if (i > cardinal_) throwError("Complex::operator[](size_t i): no such element"); return elements_[i]; } void Complex::remove(size_t i) { if (i >= cardinal_) throwError("Complex::remove(size_t i): no such element"); SmartPointer * orig = elements_; if (--cardinal_) elements_ = new SmartPointer [cardinal_]; else elements_ = NULL; size_t k, j=0; for (k=0; k<= cardinal_; ++k) { if (k != i) elements_[j++] = orig[k]; orig[k] = NULL; } delete [] orig; } size_t Complex::getCardinal() const {return cardinal_; } double Complex::deltaMax(double coord[8]) { double h1max=DBL_MAX, tmp; for (size_t i=0; i (tmp=elements_[i]->deltaMax(coord))) h1max=tmp; return h1max; } int Complex::Impact(Photon* ph, size_t index, Properties *data) { int res=0, *impact = new int[cardinal_]; size_t n_impact = 0; for (size_t i=0; i Impact(ph, index, NULL); if (debug()) cerr << "DEBUG: Complex::Impact(...): " < Impact(ph, index, data); } else if (n_impact >= 2) { res = 1; if (debug()) cerr << "DEBUG: Complex::Impact(...): refining Photon" << endl; Photon::Refined refine (ph, index, 1, step_max_); size_t n_refine = refine . get_nelements(); if (debug()) cerr << "DEBUG: Complex::Impact(...): n_refine=="<kind() << ")" << endl; elements_[i]->Impact(&refine, n, data); } } } delete [] impact; return res; } #ifdef GYOTO_USE_XERCES void Complex::fillElement(FactoryMessenger *fmp) const { FactoryMessenger * childfmp=NULL; fmp -> metric (metric()) ; for (size_t i=0; i makeChild ( "SubAstrobj" ); elements_[i] -> fillElement(childfmp); delete childfmp; } Astrobj::Generic::fillElement(fmp); } void Complex::setParameters(FactoryMessenger *fmp) { if (debug()) cerr << "DEBUG: in Complex::setParameters()" << endl; string name="", content="", unit=""; vector plugin; FactoryMessenger * child = NULL; metric( fmp->metric() ); while (fmp->getNextParameter(&name, &content, &unit)) { if (debug()) cerr << "DEBUG: Astrobj::Complex::Subcontractor(): name=" << name << endl; if (name=="SubAstrobj") { content = fmp -> getAttribute("kind"); plugin = split(fmp -> getAttribute("plugin"), ","); child = fmp -> getChild(); append ((*Astrobj::getSubcontractor(content, plugin))(child, plugin)); delete child; } else setParameter(name, content, unit); } if (debug()) cerr << "DEBUG: out Complex::setParameters()" << endl; } #endif Gyoto-1.2.0/lib/ComplexSpectrometer.C000066400000000000000000000126461302352257300175040ustar00rootroot00000000000000/* Copyright 2013-2014, 2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoComplexSpectrometer.h" #include "GyotoFactoryMessenger.h" #include "GyotoMetric.h" #include "GyotoPhoton.h" #include using namespace std; using namespace Gyoto; using namespace Gyoto::Spectrometer; kind_t const Complex::Kind = "Complex"; Complex::Complex() : Generic(Complex::Kind), cardinal_(0), elements_(NULL) { } Complex::Complex(const Complex& o) : Generic(o), cardinal_(o.cardinal_), elements_(NULL) { if (cardinal_) { elements_ = new SmartPointer [cardinal_]; for (size_t i=0; i< cardinal_; ++i) { elements_[i] = o[i]->clone(); } } } Complex *Complex::clone() const {return new Complex(*this); } bool Complex::isThreadSafe() const { bool safe = Generic::isThreadSafe(); for (size_t i=0; i < cardinal_; ++i) safe &= elements_[i] -> isThreadSafe(); return safe; } Complex::~Complex() { if (cardinal_) for (size_t i=0; i< cardinal_; ++i) elements_[i] = NULL; } void Complex::append(SmartPointer e) { GYOTO_DEBUG << "DEBUG: in Complex::append(SmartPointer e)" << endl; if (cardinal_+1 == 0) throwError("Complex::append(): OVERFLOW"); SmartPointer * orig = elements_; elements_ = new SmartPointer [cardinal_+1]; for (size_t i=0; i< cardinal_; ++i) { elements_[i] = orig[i]; orig[i] = NULL; } delete [] orig; orig = NULL; elements_[cardinal_] = e; ++cardinal_; e->hook(this); GYOTO_DEBUG << "DEBUG: out Complex::append(SmartPointer e)" << endl; tell(this); } SmartPointer & Complex::operator[](size_t i) { if (i > cardinal_) throwError("Complex::operator[](size_t i): no such element"); return elements_[i]; } SmartPointer const & Complex::operator[](size_t i) const { if (i > cardinal_) throwError("Complex::operator[](size_t i): no such element"); return elements_[i]; } void Complex::remove(size_t i) { if (i >= cardinal_) throwError("Complex::remove(size_t i): no such element"); elements_[i]->unhook(this); SmartPointer * orig = elements_; if (--cardinal_) elements_ = new SmartPointer [cardinal_]; else elements_ = NULL; size_t k, j=0; for (k=0; k<= cardinal_; ++k) { if (k != i) elements_[j++] = orig[k]; orig[k] = NULL; } delete [] orig; tell(this); // tell self! } size_t Complex::getCardinal() const {return cardinal_; } #ifdef GYOTO_USE_XERCES void Complex::fillElement(FactoryMessenger *fmp) const { FactoryMessenger * childfmp=NULL; for (size_t i=0; i makeChild ( "SubSpectrometer" ); elements_[i] -> fillElement(childfmp); delete childfmp; } Spectrometer::Generic::fillElement(fmp); } void Complex::setParameters(FactoryMessenger *fmp) { if (debug()) cerr << "DEBUG: in Complex::setParameters()" << endl; string name="", content="", unit=""; std::vector plugin; FactoryMessenger * child = NULL; while (fmp->getNextParameter(&name, &content, &unit)) { if (debug()) cerr << "DEBUG: Spectrometer::Complex::Subcontractor(): name=" << name << endl; if (name=="SubSpectrometer") { content = fmp -> getAttribute("kind"); child = fmp -> getChild(); plugin = split(fmp -> getAttribute("plugin"), ","); append ((*Spectrometer::getSubcontractor(content, plugin))(child, plugin)); delete child; } else setParameter(name, content, unit); } if (debug()) cerr << "DEBUG: out Complex::setParameters()" << endl; } #endif void Complex::tell(Gyoto::Hook::Teller *) { // This is called each time an element is added or mutated // This is suboptimal, but most straightforward nboundaries_=nsamples_=0; for (size_t i=0; inSamples(); nboundaries_ += elements_[i]->getNBoundaries(); } if (boundaries_) delete [] boundaries_; if (widths_) delete [] widths_; if (midpoints_) delete [] midpoints_; if (chanind_) delete [] chanind_; boundaries_ = new double [nboundaries_]; widths_ = new double [nsamples_]; midpoints_ = new double [nsamples_]; chanind_ = new size_t [2*nsamples_]; size_t boffset=0, offset=0; size_t const * chanind=0; for (size_t i=0; igetNBoundaries(); size_t ens = elements_[i]->nSamples(); memcpy(boundaries_+boffset, elements_[i]->getChannelBoundaries(), enb*sizeof(double)); memcpy(widths_+offset, elements_[i]->getWidths(), ens*sizeof(double)); memcpy(midpoints_+offset, elements_[i]->getMidpoints(), ens*sizeof(double)); chanind=elements_[i]->getChannelIndices(); for (size_t j=0; j<2*ens; ++j) chanind_[2*offset+j]=chanind[j]+boffset; boffset += enb; offset += ens ; } tellListeners(); } Gyoto-1.2.0/lib/Converters.C000066400000000000000000000321761302352257300156320ustar00rootroot00000000000000/* Copyright 2012-2015 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoConverters.h" #include "GyotoError.h" #include "GyotoMetric.h" using namespace Gyoto::Units ; using namespace std ; #ifdef HAVE_UDUNITS static ut_system * SI (NULL); static Gyoto::SmartPointer Meter (NULL); static Gyoto::SmartPointer Second (NULL); static Gyoto::SmartPointer KiloGram (NULL); #endif void Gyoto::Units::Init() { #ifdef HAVE_UDUNITS ut_set_error_message_handler(ut_ignore); SI = ut_read_xml(NULL); ut_unit * tmpu = NULL, * tmpu2 = NULL; /* Map pc for parsec */ tmpu = ut_get_unit_by_name(SI, "parsec"); ut_map_symbol_to_unit("pc", UT_UTF8, tmpu); ut_free(tmpu); tmpu = NULL; /* astronomical_unit aliases */ tmpu = ut_get_unit_by_name(SI, "astronomical_unit"); ut_map_symbol_to_unit("au", UT_UTF8, tmpu); ut_map_symbol_to_unit("AU", UT_UTF8, tmpu); ut_map_symbol_to_unit("ua", UT_UTF8, tmpu); ut_map_symbol_to_unit("astronomicalunit", UT_UTF8, tmpu); ut_free(tmpu); tmpu = NULL; /* as symbol for arcsec */ tmpu = ut_get_unit_by_name(SI, "arcsec"); if (!tmpu) throwError("error initializing arcsec unit"); ut_map_symbol_to_unit("as", UT_UTF8, tmpu); ut_free(tmpu); tmpu = NULL; /* sunradius */ tmpu = ut_get_unit_by_name(SI, "meter"); tmpu2 = ut_scale(GYOTO_SUN_RADIUS, tmpu); ut_map_symbol_to_unit("sunradius", UT_UTF8, tmpu2); ut_free(tmpu2); ut_free(tmpu); /* ly */ tmpu = ut_get_unit_by_name(SI, "light_year"); ut_map_symbol_to_unit("ly", UT_UTF8, tmpu); ut_free(tmpu); /* sunmass */ tmpu = ut_get_unit_by_symbol(SI, "kg"); tmpu2 = ut_scale(GYOTO_SUN_MASS, tmpu); ut_map_symbol_to_unit("sunmass", UT_UTF8, tmpu2); ut_free(tmpu2); ut_free(tmpu); /* Jansky */ tmpu = ut_parse(SI, "W.m-2.Hz-1", UT_UTF8); if (!tmpu) throwError("Cannot initialize Jansky"); tmpu2=ut_scale(1e-26, tmpu); ut_map_name_to_unit("Jansky", UT_UTF8, tmpu2); ut_map_symbol_to_unit("Jy", UT_UTF8, tmpu2); ut_free(tmpu2); ut_free(tmpu); Meter = new Unit("meter"); Second = new Unit("second"); KiloGram = new Unit("kilogram"); #endif } #ifdef HAVE_UDUNITS /* Unit class */ Unit::Unit(const string &unit) : unit_(NULL), kind_(unit) { # ifdef GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(kind_); # endif if (kind_!="") { unit_ = ut_parse(SI, unit.c_str(), UT_UTF8); # ifdef GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(unit_); # endif if (!unit_) throwError("Error initializing Unit"); } } Unit::Unit(char const * const unit) : unit_(NULL), kind_(unit) { # ifdef GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(kind_); # endif if (kind_!="") { unit_ = ut_parse(SI, unit, UT_UTF8); # ifdef GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(unit_); # endif if (!unit_) throwError("Error initializing Unit"); } } Unit::~Unit() { ut_free(unit_); } double Unit::To(double val, const Unit &from_unit) { return Converter(from_unit, *this)(val); } double Unit::From(double val, const Unit &to_unit) { return Converter(*this, to_unit)(val); } Unit::operator std::string() const { return kind_; } Unit::operator ut_unit*() const { return unit_; } /* Converter */ Converter::Converter() : converter_(cv_get_trivial()) {} Converter::Converter(const Gyoto::Units::Unit &from, const Gyoto::Units::Unit &to) : converter_(NULL) { reset(from, to); } void Converter::reset() { if (converter_) cv_free(converter_); converter_ = cv_get_trivial(); } void Converter::reset(const Gyoto::Units::Unit &from, const Gyoto::Units::Unit &to) { if (converter_) { cv_free(converter_); converter_=NULL; } if ((ut_unit*)(from) && (ut_unit*)(to)) { if (areConvertible(from, to)) converter_ = ut_get_converter(from, to); else { stringstream ss; ss << "Unsupported conversion: from \"" << string(from) << "\" to " << string(to) << "\""; throwError(ss.str()); } } else reset(); } Converter::~Converter() { if (converter_) { cv_free(converter_); converter_ = NULL; } } double Converter::operator()(double val) const { return cv_convert_double(converter_, val); } ut_system * Gyoto::Units::getSystem() { return SI; } #endif double Gyoto::Units::ToMeters(double val, const string &unit, const SmartPointer &gg) { if (unit=="" || unit=="m") return val ; if (unit=="geometrical") { if (gg) return val * gg -> unitLength(); else throwError("Metric required for geometrical -> meter conversion"); } # ifdef HAVE_UDUNITS Unit from(unit); if (areConvertible(from, *Meter)) return Meter->To(val, from); if (areConvertible(from, *Second)) return Second->To(val, from)*GYOTO_C; return GYOTO_C/ToHerz(val, unit); # else if (unit=="cm") return val * 1e-2; if (unit=="km") return val * 1e3; if (unit=="sunradius") return val * GYOTO_SUN_RADIUS; if ((unit=="astronomicalunit") || (unit=="astronomical_unit") || (unit=="AU") || (unit=="au") || (unit=="ua")) return val * GYOTO_ASTRONOMICAL_UNIT; if (unit=="ly") return val * GYOTO_LIGHT_YEAR; if (unit=="pc") return val * GYOTO_KPC * 1e-3; if (unit=="kpc") return val * GYOTO_KPC; if (unit=="Mpc") return val * GYOTO_KPC * 1e3; stringstream ss; ss << "Unsupported conversion: \"" << unit; throwError(ss.str()); return 0; # endif } double Gyoto::Units::FromMeters(double val, const string &unit, const SmartPointer &gg) { if ((unit=="") || (unit=="m")) return val ; if (unit=="geometrical") { if (gg) return val / gg -> unitLength(); else throwError("Metric required for meter -> geometrical conversion"); } # ifdef HAVE_UDUNITS Unit to (unit); if (areConvertible(to, *Meter)) return Meter->From(val, to); if (areConvertible(to, *Second)) return Second->From(val*GYOTO_C, to); return FromHerz(GYOTO_C/val, unit); # else if (unit=="cm") return val * 1e2; if (unit=="km") return val * 1e-3; if (unit=="sunradius") return val / GYOTO_SUN_RADIUS; if ((unit=="astronomicalunit") || (unit=="astronomical_unit") || (unit=="AU") || (unit=="au") || (unit=="ua")) return val / GYOTO_ASTRONOMICAL_UNIT; if (unit=="ly") return val / GYOTO_LIGHT_YEAR; if (unit=="pc") return val / GYOTO_KPC * 1e3; if (unit=="kpc") return val / GYOTO_KPC; if (unit=="Mpc") return val / GYOTO_KPC * 1e-3; stringstream ss; ss << "Unsupported conversion: \"" << unit; throwError(ss.str()); return 0; # endif } double Gyoto::Units::ToSeconds(double val, const string &unit, const SmartPointer &gg) { # ifdef GYOTO_DEBUG_ENABLED GYOTO_IF_DEBUG GYOTO_DEBUG_EXPR(val); GYOTO_DEBUG_EXPR(unit); GYOTO_DEBUG_EXPR(gg); GYOTO_ENDIF_DEBUG # endif if (unit=="" || unit=="s") ; else if (unit=="geometrical_time" || unit=="geometrical") { if (unit=="geometrical") GYOTO_WARNING << "Please use \"geometrical_time\" instead of " "\"geometrical\" for time unit, \"geometrical\" in this context " "is deprecated and will be removed soon"; if (gg) val *= gg -> unitLength() / GYOTO_C ; else throwError("Metric required for geometrical_time -> second conversion"); } # ifdef HAVE_UDUNITS else { Unit from (unit); if (areConvertible(from, *Meter)) val=Meter->To(val, from)/GYOTO_C; else val = Second->To(val, from); } # else else if (unit=="min") val *= 60. ; else if (unit=="h") val *= 3600. ; else if (unit=="d") val *= 86400. ; else if (unit=="yr") val *= 3.15576e+07; else if (unit=="kyr") val *= 3.15576e+10; else { stringstream ss; ss << "Screen::time(): unknown unit \"" << unit << "\". Accepted units: " << "[s] geometrical min h d y"; throwError (ss.str()); } # endif return val; } double Gyoto::Units::FromSeconds(double val, const string &unit, const SmartPointer &gg) { if (unit=="" || unit=="s") ; else if (unit=="geometrical_time" || unit=="geometrical") { if (unit=="geometrical") GYOTO_WARNING << "Please use \"geometrical_time\" instead of " "\"geometrical\" for time unit, \"geometrical\" in this context " "is deprecated and will be removed soon"; if (gg) val *= GYOTO_C / gg -> unitLength() ; else throwError("Metric required for second -> geometrical_time conversion"); } # ifdef HAVE_UDUNITS else { Unit to (unit); if (areConvertible(to, *Meter)) val=Meter->From(val*GYOTO_C, to); else val = Second->From(val, to); } # else else if (unit=="min") val /= 60. ; else if (unit=="h") val /= 3600. ; else if (unit=="d") val /= 86400. ; else if (unit=="yr") val /= 3.15576e+07; else if (unit=="kyr") val /= 3.15576e+10; else { stringstream ss; ss << "Screen::time(): unknown unit \"" << unit << "\". Accepted units: " << "[s] geometrical min h d y"; throwError (ss.str()); } # endif return val; } double Gyoto::Units::ToKilograms(double val, const string &unit) { # ifdef HAVE_UDUNITS if (unit=="" || unit=="kg") return val; return KiloGram->To(val, unit); # else if (unit=="" || unit=="kg") ; // do nothing ! else if (unit=="sunmass") val *= GYOTO_SUN_MASS; else if (unit=="g") val*= 1e-3; else { stringstream ss; ss << "Unsupported mass unit: \"" << unit << "\". Supported units: [kg] g sunmass"; throwError(ss.str()); } return val; # endif } double Gyoto::Units::FromKilograms(double val, const string &unit) { if (unit=="" || unit=="kg") return val; # ifdef HAVE_UDUNITS return KiloGram->From(val, unit); # else else if (unit=="sunmass") val /= GYOTO_SUN_MASS; else if (unit=="g") val*= 1e3; else { stringstream ss; ss << "Unsupported mass unit: \"" << unit << "\". Supported units: [kg] g sunmass"; throwError(ss.str()); } return val; # endif } double Gyoto::Units::ToGeometrical(double val, const string &unit, const SmartPointer &gg) { if (unit == "" || unit == "geometrical") return val; if (!gg) throwError("Need Metric to convert to geometrical units"); return ToMeters(val, unit) / gg->unitLength(); } double Gyoto::Units::FromGeometrical(double val, const string &unit, const SmartPointer &gg) { if (unit == "" || unit == "geometrical") return val; if (!gg) throwError("Need Metric to convert from geometrical units"); return FromMeters(val * gg->unitLength(), unit); } double Gyoto::Units::ToGeometricalTime(double val, const string &unit, const SmartPointer &gg) { if (unit == "" || unit == "geometrical_time") return val; if (!gg) throwError("Need Metric to convert to geometrical units"); return ToSeconds(val, unit) / gg->unitLength() * GYOTO_C; } double Gyoto::Units::FromGeometricalTime(double val, const string &unit, const SmartPointer &gg) { if (unit == "" || unit == "geometrical_time") return val; if (!gg) throwError("Need Metric to convert from geometrical units"); return FromSeconds(val * gg->unitLength() / GYOTO_C, unit); } double Gyoto::Units::ToHerz(double value, const string &unit) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "converting " << value << string(unit) << "to Herz" << endl; # endif if (unit == "" || unit == "Hz") return value; # ifdef HAVE_UDUNITS Unit from (unit), Hz("Hz"); if (areConvertible(from, Hz)) return Hz.To(value, from); if (areConvertible(from, *Meter)) return GYOTO_C/Meter->To(value, from); Unit eV("eV"); if (areConvertible(from, eV)) return eV.To(value, from) * GYOTO_eV2Hz; stringstream ss; ss << "Units::ToHerz(): unknown unit \"" << unit << "\"."; throwError (ss.str()); # else GYOTO_WARNING_UDUNITS(unit, "Hz"); return value; # endif throwError("unit conversion failed"); return 0.; } double Gyoto::Units::FromHerz(double value, const string &unit) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "converting " << value << "Hz to " << string(unit) << endl; # endif # ifdef HAVE_UDUNITS if (unit == "" || unit == "Hz") return value; Unit to(unit), Hz("Hz"); if (areConvertible(to, Hz)) return Hz.From(value, to); if (areConvertible(to, *Meter)) return Meter->From(GYOTO_C/value, to); Unit eV("eV"); if (areConvertible(to, eV)) return eV.From(value / GYOTO_eV2Hz, to); stringstream ss; ss << "Units::ToHerz(): unknown unit \"" << unit << "\"."; throwError (ss.str()); # else GYOTO_WARNING_UDUNITS(unit, "Hz"); # endif return 0.; } # ifdef HAVE_UDUNITS bool Gyoto::Units::areConvertible(const Unit &unit1, const Unit &unit2) { return ut_are_convertible(unit1, unit2); } # endif Gyoto-1.2.0/lib/DeformedTorus.C000066400000000000000000000231041302352257300162510ustar00rootroot00000000000000#include "GyotoDeformedTorus.h" #include "GyotoFactoryMessenger.h" #include "GyotoUtils.h" #include "GyotoPhoton.h" #include "GyotoDefs.h" #include "GyotoSpectrum.h" #include #include #include #include #include using namespace Gyoto; using namespace Gyoto::Astrobj; using namespace std; /// Properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(DeformedTorus, "Slender torus subject to simple time-periodic deformations") GYOTO_PROPERTY_SPECTRUM(DeformedTorus, Spectrum, spectrum) GYOTO_PROPERTY_DOUBLE(DeformedTorus, LargeRadius, largeRadius) GYOTO_PROPERTY_DOUBLE(DeformedTorus, Beta, beta) GYOTO_PROPERTY_DOUBLE(DeformedTorus, BetaSt, betaSt) GYOTO_PROPERTY_DOUBLE(DeformedTorus, Eta, eta) GYOTO_PROPERTY_UNSIGNED_LONG(DeformedTorus, Mode, mode) GYOTO_PROPERTY_STRING(DeformedTorus, PerturbKind, perturbKind) GYOTO_PROPERTY_END(DeformedTorus, Standard::properties) // Accessors GYOTO_PROPERTY_ACCESSORS(DeformedTorus, SmartPointer, spectrum_, spectrum) GYOTO_PROPERTY_ACCESSORS(DeformedTorus, double, c_, largeRadius) GYOTO_PROPERTY_ACCESSORS_SPECIAL(DeformedTorus, double, param_beta_, beta, if (param_beta_>=1.) throwError("In DeformedTorus.C: beta should be << 1"); , ) GYOTO_PROPERTY_ACCESSORS(DeformedTorus, double, param_beta_st_, betaSt) GYOTO_PROPERTY_ACCESSORS(DeformedTorus, double, param_eta_, eta) GYOTO_PROPERTY_ACCESSORS(DeformedTorus, unsigned long, mode_, mode) void DeformedTorus::perturbKind(std::string const &k) { if (k == "RadialTranslation") perturb_kind_ = RadialTranslation; else if (k == "VerticalTranslation") perturb_kind_ = VerticalTranslation; else if (k == "Rotation") perturb_kind_ = Rotation; else if (k == "Expansion") perturb_kind_ = Expansion; else if (k == "RadialShear") perturb_kind_ = RadialShear; else if (k == "VerticalShear") perturb_kind_ = VerticalShear; else if (k == "PureShear") perturb_kind_ = PureShear; else { string errmsg="unknown perturbation kind: '"; errmsg += k + "'"; throwError(errmsg.c_str()); } } std::string DeformedTorus::perturbKind() const { switch (perturb_kind_) { case RadialTranslation: return "RadialTranslation"; case VerticalTranslation: return "VerticalTranslation"; case Rotation: return "Rotation"; case Expansion: return "Expansion"; case RadialShear: return "RadialShear"; case VerticalShear: return "VerticalShear"; case PureShear: return "PureShear"; default: throwError("Unknown perturbation kind"); } return ""; } /// Gyoto::Astrobj::DeformedTorus::DeformedTorus() : Standard("DeformedTorus"), gg_(NULL), spectrum_(NULL), c_(10.8), mode_(0), param_beta_(0.01), param_beta_st_(0.01), param_eta_(0.01), perturb_kind_(RadialTranslation) { GYOTO_DEBUG << "Building DeformedTorus" << endl; } Gyoto::Astrobj::DeformedTorus::DeformedTorus(const DeformedTorus &orig) : Standard(orig), gg_(NULL), spectrum_(NULL), c_(orig.c_), mode_(orig.mode_), param_beta_(orig.param_beta_), param_beta_st_(orig.param_beta_st_), param_eta_(orig.param_eta_), perturb_kind_(orig.perturb_kind_) { if (orig.gg_()) { gg_=orig.gg_->clone(); Standard::gg_ = gg_; } if (orig.spectrum_()) spectrum_ = orig.spectrum_->clone(); GYOTO_DEBUG << "Copying DeformedTorus" << endl; } DeformedTorus * DeformedTorus::clone() const { return new DeformedTorus(*this); } Gyoto::Astrobj::DeformedTorus::~DeformedTorus() { GYOTO_DEBUG << "Destroying DeformedTorus" << endl; } double DeformedTorus::operator()(double const pos[4]) { // needed: operator()() < 0. <=> inside torus double posc[4]={0.,c_,M_PI/2.,0.};//don't care about t and phi double g_rr=gg_->gmunu(posc,1,1);// covar components double g_thth=gg_->gmunu(posc,2,2); double aa=gg_->spin(); double Omegac=1./(pow(c_,1.5)+aa); double omr2=1.-6./c_+8.*aa*pow(c_,-1.5) -3.*aa*aa/(c_*c_); double omth2=1.-4*aa*pow(c_,-1.5) +3.*aa*aa/(c_*c_); double x_bar=1./param_beta_ *sqrt(g_rr)*(pos[1]-c_)/c_; double xb2=x_bar*x_bar; double y_bar=1./param_beta_ *sqrt(g_thth)*(M_PI/2.-pos[2])/c_; double yb2=y_bar*y_bar; double a1=0., a2=0., a3=0., b1=0., b2=0., b3=0.; switch (perturb_kind_) { case 1: // Radial translation a1=1.;a3=param_eta_*sin(Omegac*pos[0]); b2=1.; break; case 2: // Vertical translation a1=1.; b2=1.;b3=param_eta_*sin(Omegac*pos[0]); break; case 3: // Rotation a1=cos(Omegac*pos[0]);a2=sin(Omegac*pos[0]); b1=-sin(Omegac*pos[0]);b2=cos(Omegac*pos[0]); break; case 4: // Expansion a1=1.+param_eta_*sin(Omegac*pos[0]); b2=1.+param_eta_*sin(Omegac*pos[0]); break; case 5: // Simple shear radial a1=1.;a2=param_eta_*sin(Omegac*pos[0]); b2=1.; break; case 6: // Simple shear vertical a1=1.; b1=param_eta_*sin(Omegac*pos[0]);b2=1.; break; case 7: // Pure shear a1=1.+param_eta_*sin(Omegac*pos[0]); b2=1./a1; break; default: throwError("In DeformedTorus.C::operator():" "Unrecognized perturbation kind"); } double deforx = a1*x_bar+a2*y_bar+a3; double defory = b1*x_bar+b2*y_bar+b3; double ff = omr2*deforx*deforx +omth2*defory*defory -1.; return ff; } void DeformedTorus::getVelocity(double const pos[4], double vel[4]) { //cout << "pos in getvel: " << pos[2] << " " << pos[3] << endl; double aa=gg_->spin(); // Computations at the torus center for Omegac, lc double posc[4]={0.,c_,M_PI/2.,0.};//don't care about t and phi double g_tt=gg_->gmunu(posc,0,0);// covar components double g_rr=gg_->gmunu(posc,1,1); double g_thth=gg_->gmunu(posc,2,2); double g_tp=gg_->gmunu(posc,0,3); double g_pp=gg_->gmunu(posc,3,3); double Omegac=1./(pow(c_,1.5)+aa); // Kepler rotation vel double lc=-(Omegac*g_pp+g_tp)/(Omegac*g_tp+g_tt); // Rescaled ang mom // Now computations at the torus surface for gmunu_up coef double gtt=gg_->gmunu_up(pos,0,0); double gthth=gg_->gmunu_up(pos,2,2); double grr=gg_->gmunu_up(pos,1,1); double gpp=gg_->gmunu_up(pos,3,3); double gtp=gg_->gmunu_up(pos,0,3); // xbar and ybar unperturbed double xbar=1./param_beta_ *sqrt(g_rr)*(pos[1]-c_)/c_; double ybar=1./param_beta_ *sqrt(g_thth)*(M_PI/2.-pos[2])/c_; // dr/dt and dtheta/dt depending on transformation double drdt=0., dthdt=0.; switch (perturb_kind_) { case 1: // Radial translation drdt=c_/sqrt(g_rr)*param_beta_*param_eta_ *Omegac*cos(Omegac*pos[0]); break; case 2: // Vertical translation dthdt=-c_/sqrt(g_thth)*param_beta_*param_eta_ *Omegac*cos(Omegac*pos[0]); break; case 3: // Rotation { double x0 = xbar*cos(Omegac*pos[0])-ybar*sin(Omegac*pos[0]), y0 = xbar*sin(Omegac*pos[0])+ybar*cos(Omegac*pos[0]); drdt = c_/sqrt(g_rr)*param_beta_*Omegac *(-sin(Omegac*pos[0])*x0+cos(Omegac*pos[0])*y0); dthdt = -c_/sqrt(g_thth)*param_beta_*Omegac *(-cos(Omegac*pos[0])*x0-sin(Omegac*pos[0])*y0); } break; case 4: // Expansion { double x0 = xbar/(1.+param_eta_*sin(Omegac*pos[0])), y0 = ybar/(1.+param_eta_*sin(Omegac*pos[0])); drdt = c_/sqrt(g_rr)*param_beta_*Omegac*param_eta_ *cos(Omegac*pos[0])*x0; dthdt = -c_/sqrt(g_thth)*param_beta_*Omegac*param_eta_ *cos(Omegac*pos[0])*y0; } break; case 5: // Simple shear radial { double y0 = ybar; drdt = c_/sqrt(g_rr)*param_beta_*Omegac*param_eta_ *cos(Omegac*pos[0])*y0; } break; case 6: // Simple shear vertical { double x0 = xbar; dthdt = -c_/sqrt(g_thth)*param_beta_*Omegac*param_eta_ *cos(Omegac*pos[0])*x0; } break; case 7: // Pure shear { double x0 = xbar/(1.+param_eta_*sin(Omegac*pos[0])), y0 = ybar*(1.+param_eta_*sin(Omegac*pos[0])); drdt = c_/sqrt(g_rr)*param_beta_*Omegac*param_eta_ *cos(Omegac*pos[0])*x0; dthdt = -c_/sqrt(g_thth)*param_beta_*Omegac*param_eta_ *( -cos(Omegac*pos[0]) /( (1.+param_eta_*sin(Omegac*pos[0]))* (1.+param_eta_*sin(Omegac*pos[0])) ) )*y0; } break; default: throwError("In DeformedTorus.C::operator():" "Unrecognized perturbation kind"); } double u_t2 = -1./ (gtt+lc*lc*gpp-2.*lc*gtp+drdt*drdt*grr+dthdt*dthdt*gthth); if (u_t2 < 0.) { stringstream ss; ss << "DeformedTorus::getVelocity(pos=["; for (int i=0; i<3; ++i) ss << pos[i] << ", "; ss << pos[3] << "]): u_t^2 is negative."; throwError(ss.str()); } double u_t=-sqrt(u_t2); double u_p=-lc*u_t; vel[0] = gtt*u_t+gtp*u_p; vel[1] = drdt*vel[0]; vel[2] = dthdt*vel[0]; vel[3] = gpp*u_p+gtp*u_t; } void DeformedTorus::metric(Gyoto::SmartPointer met) { if (met->kind() != "KerrBL") throwError("DeformedTorus::metric(): only KerrBL, please"); //if (gg_) gg_ -> unhook(this); gg_ = SmartPointer(met); Generic::gg_ = gg_; //if (gg_) gg_ -> hook(this); } /*int DeformedTorus::Impact(Gyoto::Photon* ph, size_t index, Astrobj::Properties *data) { double p1[8], p2[8]; ph->getCoord(index, p1); ph->getCoord(index+1, p2); double tmin, minval; if (gg_ -> coordKind() == GYOTO_COORDKIND_SPHERICAL){ //Allows theta and phi to be in the correct range checkPhiTheta(p1); checkPhiTheta(p2); } double t1 = p1[0], t2 = p2[0]; double val1=(*this)(p1), val2=(*this)(p2); return 0; }*/ double DeformedTorus::emission(double nu_em, double, double *, double *) const{ if (flag_radtransf_) throwError("Radiative transfer not implemented for DeformedTorus."); //cout << "in flaring emission" << endl; //return (*spectrum_)(nu_em); return 1.; } Gyoto-1.2.0/lib/DirectionalDisk.C000066400000000000000000000622261302352257300165470ustar00rootroot00000000000000/* Copyright 2014 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoPhoton.h" #include "GyotoDirectionalDisk.h" #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoProperty.h" #include "GyotoKerrBL.h" #include "GyotoKerrKS.h" #ifdef GYOTO_USE_CFITSIO #include #define throwCfitsioError(status) \ { fits_get_errstatus(status, ermsg); throwError(ermsg); } #endif #include #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; //// Properties: GYOTO_PROPERTY_START(DirectionalDisk) GYOTO_PROPERTY_FILENAME(DirectionalDisk, File, file) GYOTO_PROPERTY_DOUBLE(DirectionalDisk, LampAltitude, lampaltitude) GYOTO_PROPERTY_VECTOR_DOUBLE(DirectionalDisk, LampCutOffsIneV, lampcutoffsinev) GYOTO_PROPERTY_BOOL(DirectionalDisk, AverageOverAngle, DontAverageOverAngle, averageOverAngle) GYOTO_PROPERTY_END(DirectionalDisk, ThinDisk::properties) void DirectionalDisk::fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const { if (p.name == "File") fmp->setParameter("File", (filename_.compare(0,1,"!") ? filename_ : filename_.substr(1)) ); else ThinDisk::fillProperty(fmp, p); } //// DirectionalDisk::DirectionalDisk() : ThinDisk("DirectionalDisk"), filename_(""), emission_(NULL), radius_(NULL), cosi_(NULL), freq_(NULL), nnu_(0), ni_(0), nr_(0), lampaltitude_(10.), minfreq_computed_(DBL_MIN), maxfreq_computed_(DBL_MAX), minfreq_lampframe_(1.), maxfreq_lampframe_(1e30), average_over_angle_(0) { GYOTO_DEBUG << "DirectionalDisk Construction" << endl; } DirectionalDisk::DirectionalDisk(const DirectionalDisk& o) : ThinDisk(o), filename_(o.filename_), emission_(NULL), radius_(NULL), cosi_(NULL), freq_(NULL), nnu_(o.nnu_), ni_(o.ni_), nr_(o.nr_), lampaltitude_(o.lampaltitude_), minfreq_computed_(o.minfreq_computed_), maxfreq_computed_(o.maxfreq_computed_), minfreq_lampframe_(o.minfreq_lampframe_), maxfreq_lampframe_(o.maxfreq_lampframe_), average_over_angle_(o.average_over_angle_) { GYOTO_DEBUG << "DirectionalDisk Copy" << endl; size_t ncells = 0; if (o.emission_) { emission_ = new double[ncells = nnu_ * ni_ * nr_]; memcpy(emission_, o.emission_, ncells * sizeof(double)); } if (o.freq_) { freq_ = new double[ncells = nnu_]; memcpy(freq_, o.freq_, ncells * sizeof(double)); } if (o.cosi_) { cosi_ = new double[ncells = ni_]; memcpy(cosi_, o.cosi_, ncells * sizeof(double)); } if (o.radius_) { radius_ = new double[ncells = nr_]; memcpy(radius_, o.radius_, ncells * sizeof(double)); } } DirectionalDisk* DirectionalDisk::clone() const { return new DirectionalDisk(*this); } DirectionalDisk::~DirectionalDisk() { GYOTO_DEBUG << "DirectionalDisk Destruction" << endl; if (emission_) delete [] emission_; if (radius_) delete [] radius_; if (cosi_) delete [] cosi_; if (freq_) delete [] freq_; } void DirectionalDisk::setEmission(double * pattern) { emission_ = pattern; } void DirectionalDisk::radius(double * pattern) { radius_ = pattern; } void DirectionalDisk::copyIntensity(double const *const pattern, size_t const naxes[3]) { GYOTO_DEBUG << endl; if (emission_) { GYOTO_DEBUG << "delete [] emission_;" << endl; delete [] emission_; emission_ = NULL; } if (pattern) { size_t nel; if (nnu_ != naxes[0]) { GYOTO_DEBUG <<"nnu_ changed, freeing freq_" << endl; if (freq_) { delete [] freq_; freq_ = NULL; } } if (ni_ != naxes[1]) { GYOTO_DEBUG <<"ni_ changed, freeing freq_ and cosi_" << endl; if (freq_) { delete [] freq_; freq_ = NULL; } if (cosi_) { delete [] cosi_; cosi_= NULL; } } if (nr_ != naxes[2]) { GYOTO_DEBUG <<"nr_ changed, freeing freq_, cosi_ and radius_" << endl; if (freq_) { delete [] freq_; freq_ = NULL; } if (cosi_) { delete [] cosi_; cosi_= NULL; } if (radius_) { delete [] radius_; radius_ = NULL; } } if (!(nel=(nnu_ = naxes[0]) * (ni_=naxes[1]) * (nr_=naxes[2]))) throwError( "dimensions can't be null"); GYOTO_DEBUG << "allocate emission_;" << endl; emission_ = new double[nel]; GYOTO_DEBUG << "pattern >> emission_" << endl; memcpy(emission_, pattern, nel*sizeof(double)); } } double const * DirectionalDisk::getIntensity() const { return emission_; } void DirectionalDisk::getIntensityNaxes( size_t naxes[3] ) const { naxes[0] = nnu_; naxes[1] = ni_; naxes[2] = nr_; } void DirectionalDisk::copyGridRadius(double const *const rad, size_t nr) { GYOTO_DEBUG << endl; if (radius_) { GYOTO_DEBUG << "delete [] radius_;" << endl; delete [] radius_; radius_ = NULL; } if (rad) { if (!emission_) throwError("Please use copyIntensity() before copyGridRadius()"); if (nr_ != nr) throwError("emission_ and radius_ have inconsistent dimensions"); GYOTO_DEBUG << "allocate radius_;" << endl; radius_ = new double[nr_]; GYOTO_DEBUG << "radius >> radius_" << endl; memcpy(radius_, rad, nr_*sizeof(double)); } } double const * DirectionalDisk::getGridRadius() const { return radius_; } void DirectionalDisk::copyGridCosi(double const *const cosi, size_t ni) { GYOTO_DEBUG << endl; if (cosi_) { GYOTO_DEBUG << "delete [] cosi_;" << endl; delete [] cosi_; cosi_ = NULL; } if (cosi) { if (!emission_) throwError("Please use copyIntensity() before copyGridCosi()"); if (ni_ != ni) throwError("emission_ and cosi_ have inconsistent dimensions"); GYOTO_DEBUG << "allocate cosi_;" << endl; cosi_ = new double[ni_]; GYOTO_DEBUG << "cosi >> cosi_" << endl; memcpy(cosi_, cosi, ni_*sizeof(double)); } } double const * DirectionalDisk::getGridCosi() const { return cosi_; } void DirectionalDisk::copyGridFreq(double const *const freq, size_t nnu) { GYOTO_DEBUG << endl; if (freq_) { GYOTO_DEBUG << "delete [] freq_;" << endl; delete [] freq_; freq_ = NULL; } if (freq) { if (!emission_) throwError("Please use copyIntensity() before copyGridFreq()"); if (nnu_ != nnu) throwError("emission_ and freq_ have inconsistent dimensions"); GYOTO_DEBUG << "allocate freq_;" << endl; freq_ = new double[nnu_]; GYOTO_DEBUG << "freq >> freq_" << endl; memcpy(freq_, freq, nnu_*sizeof(double)); } } double const * DirectionalDisk::getGridFreq() const { return freq_; } void DirectionalDisk::averageOverAngle(bool t) {average_over_angle_=t;} bool DirectionalDisk::averageOverAngle()const {return average_over_angle_;} void DirectionalDisk::file(std::string const &f) { # ifdef GYOTO_USE_CFITSIO fitsRead(f); # else throwError("This Gyoto has no FITS i/o"); # endif } std::string DirectionalDisk::file() const { return filename_; } void DirectionalDisk::lampaltitude(double zz) { lampaltitude_ = zz; } double DirectionalDisk::lampaltitude() const { return lampaltitude_; } void DirectionalDisk::lampcutoffsinev(std::vector const &v) { if (v.size() != 2) throwError("In DirectionalDisk: Only 2 arguments to define lamp energy range"); minfreq_lampframe_ = v[0]*GYOTO_eV2Hz; maxfreq_lampframe_ = v[1]*GYOTO_eV2Hz; } std::vector DirectionalDisk::lampcutoffsinev() const { std::vector v (2, 0.); v[0]=minfreq_lampframe_; v[1]=maxfreq_lampframe_; return v; } #ifdef GYOTO_USE_CFITSIO void DirectionalDisk::fitsRead(string filename) { GYOTO_MSG << "DirectionalDisk reading FITS file: " << filename << endl; filename_ = filename; char* pixfile = const_cast(filename_.c_str()); fitsfile* fptr = NULL; int status = 0; int anynul = 0; long naxes [] = {1, 1, 1}; long fpixel[] = {1,1,1}; long inc [] = {1,1,1}; char ermsg[31] = ""; // ermsg is used in throwCfitsioError() GYOTO_DEBUG << "DirectionalDisk::readFile(): opening file" << endl; if (fits_open_file(&fptr, pixfile, 0, &status)) throwCfitsioError(status) ; ////// FIND MANDATORY EMISSION HDU, READ KWDS & DATA /////// GYOTO_DEBUG << "DirectionalDisk::readFile(): search emission HDU" << endl; if (fits_movnam_hdu(fptr, ANY_HDU, const_cast("GYOTO DirectionalDisk emission"), 0, &status)) throwCfitsioError(status) ; GYOTO_DEBUG << "DirectionalDisk::readFile(): get image size" << endl; if (fits_get_img_size(fptr, 3, naxes, &status)) throwCfitsioError(status) ; //update nnu_, ni_, nr_ nnu_ = naxes[0]; ni_ = naxes[1]; nr_ = naxes[2]; if (emission_) { delete [] emission_; emission_ = NULL; } emission_ = new double[nnu_ * ni_ * nr_]; if (debug()) cerr << "DirectionalDisk::readFile(): read emission: " << "nnu_=" << nnu_ << ", ni_="<("GYOTO DirectionalDisk freq"), 0, &status)) throwCfitsioError(status) ; if (fits_get_img_size(fptr, 1, naxes, &status)) throwCfitsioError(status) ; if (size_t(naxes[0]) != nnu_) throwError("DirectionalDisk::readFile(): freq array not conformable"); if (freq_) { delete [] freq_; freq_ = NULL; } freq_ = new double[nnu_]; if (fits_read_subset(fptr, TDOUBLE, fpixel, naxes, inc, 0, freq_,&anynul,&status)) { delete [] freq_; freq_=NULL; throwCfitsioError(status) ; } // Computing min and max of freq_ minfreq_computed_ = DBL_MAX; maxfreq_computed_ = DBL_MIN; for (int ii=0;iimaxfreq_computed_) maxfreq_computed_=freq_[ii]; } GYOTO_DEBUG << "Min, max freq= " << minfreq_computed_ << " " << maxfreq_computed_ << endl; ////// FIND MANDATORY COSI HDU /////// if (fits_movnam_hdu(fptr, ANY_HDU, const_cast("GYOTO DirectionalDisk cosi"), 0, &status)) throwCfitsioError(status) ; if (fits_get_img_size(fptr, 1, naxes, &status)) throwCfitsioError(status) ; if (size_t(naxes[0]) != ni_) throwError("DirectionalDisk::readFile(): cosi array not conformable"); if (cosi_) { delete [] cosi_; cosi_ = NULL; } cosi_ = new double[ni_]; if (fits_read_subset(fptr, TDOUBLE, fpixel, naxes, inc, 0, cosi_,&anynul,&status)) { delete [] cosi_; cosi_=NULL; throwCfitsioError(status) ; } ////// FIND MANDATORY RADIUS HDU /////// if (fits_movnam_hdu(fptr, ANY_HDU, const_cast("GYOTO DirectionalDisk radius"), 0, &status)) throwCfitsioError(status) ; if (fits_get_img_size(fptr, 1, naxes, &status)) throwCfitsioError(status) ; if (size_t(naxes[0]) != nr_) throwError("DirectionalDisk::readFile(): radius array not conformable"); if (radius_) { delete [] radius_; radius_ = NULL; } radius_ = new double[nr_]; if (fits_read_subset(fptr, TDOUBLE, fpixel, naxes, inc, 0, radius_,&anynul,&status)) { delete [] radius_; radius_=NULL; throwCfitsioError(status) ; } ////// CLOSING FITS ///////// if (fits_close_file(fptr, &status)) throwCfitsioError(status) ; fptr = NULL; } void DirectionalDisk::fitsWrite(string filename) { if (!emission_) throwError("DirectionalDisk::fitsWrite(filename): nothing to save!"); filename_ = filename; char* pixfile = const_cast(filename_.c_str()); fitsfile* fptr = NULL; int status = 0; long naxes [] = {long(nnu_), long(ni_), long(nr_)}; long fpixel[] = {1,1,1}; char * CNULL=NULL; char ermsg[31] = ""; // ermsg is used in throwCfitsioError() ////// CREATE FILE GYOTO_DEBUG << "creating file \"" << pixfile << "\"... "; fits_create_file(&fptr, pixfile, &status); if (debug()) cerr << "done." << endl; fits_create_img(fptr, DOUBLE_IMG, 3, naxes, &status); if (status) throwCfitsioError(status) ; ////// SAVE EMISSION IN PRIMARY HDU /////// GYOTO_DEBUG << "saving emission_\n"; fits_write_key(fptr, TSTRING, const_cast("EXTNAME"), const_cast("GYOTO DirectionalDisk emission"), CNULL, &status); fits_write_pix(fptr, TDOUBLE, fpixel, nnu_*ni_*nr_, emission_, &status); if (status) throwCfitsioError(status) ; ////// SAVE FREQ HDU /////// if (!freq_) throwError("DirectionalDisk::fitsWrite(filename): no freq to save!"); GYOTO_DEBUG << "saving freq_\n"; fits_create_img(fptr, DOUBLE_IMG, 1, naxes, &status); fits_write_key(fptr, TSTRING, const_cast("EXTNAME"), const_cast("GYOTO DirectionalDisk freq"), CNULL, &status); fits_write_pix(fptr, TDOUBLE, fpixel, nnu_, freq_, &status); if (status) throwCfitsioError(status) ; ////// SAVE COSI HDU /////// if (!cosi_) throwError("DirectionalDisk::fitsWrite(filename): no cosi to save!"); GYOTO_DEBUG << "saving cosi_\n"; fits_create_img(fptr, DOUBLE_IMG, 1, naxes+1, &status); fits_write_key(fptr, TSTRING, const_cast("EXTNAME"), const_cast("GYOTO DirectionalDisk cosi"), CNULL, &status); fits_write_pix(fptr, TDOUBLE, fpixel, ni_, cosi_, &status); if (status) throwCfitsioError(status) ; ////// SAVE RADIUS HDU /////// if (!radius_) throwError("DirectionalDisk::fitsWrite(filename): no radius to save!"); GYOTO_DEBUG << "saving radius_\n"; fits_create_img(fptr, DOUBLE_IMG, 1, naxes+2, &status); fits_write_key(fptr, TSTRING, const_cast("EXTNAME"), const_cast("GYOTO DirectionalDisk radius"), CNULL, &status); fits_write_pix(fptr, TDOUBLE, fpixel, nr_, radius_, &status); if (status) throwCfitsioError(status) ; ////// CLOSING FILE /////// GYOTO_DEBUG << "close FITS file\n"; if (fits_close_file(fptr, &status)) throwCfitsioError(status) ; fptr = NULL; } #endif void DirectionalDisk::getIndices(size_t i[3], double const co[4], double cosi, double nu) const { double rr = projectedRadius(co); if (radius_) { if (rr >= radius_[nr_-1]) i[2] = nr_-1; // emission will be 0 else { for(i[2]=0; rr > radius_[i[2]]; ++i[2]){} /* With this definition: radius_[i[2]-1] <= r < radius_[i[2]] The case i[2]=0 (if r= cosi_[ni_-1]) i[1] = ni_-1; else { for(i[1]=0; cosi > cosi_[i[1]]; ++i[1]){} /* cosi_[i[1]-1] <= cosi < cosi_[i[1]] */ } } else { throwError("In DirectionalDisk::getIndices: cosi undefined!"); } if (freq_) { if (nu <= freq_[nnu_-1]) i[0] = nnu_-1; else { for(i[0]=nnu_-1; nu > freq_[i[0]]; --i[0]){} /* Caution: freq is ordered decreasingly! freq_[i[0]+1] <= nu < freq_[i[0]] */ } } else { throwError("In DirectionalDisk::getIndices: freq undefined!"); } } double DirectionalDisk::emission(double nu, double, double cp[8], double co[8]) const{ GYOTO_DEBUG << endl; // Checking whether the current freq is outside of // the redshifted illumination range double aa = static_cast >(gg_) -> spin(); double zz = lampaltitude_; double rr = co[1]; double gg_lampdisk = (pow(rr,1.5)+aa)/sqrt(rr*rr*rr+2*aa*pow(rr,1.5)-3*rr*rr) *sqrt((zz*zz+aa*aa-2.*zz)/(zz*zz+aa*aa)); // this is the redshift factor // linking the lamp-frame and the disk-frame, it has nothing to do with the // redshift factor between the disk and the far-away-observer frames. double minfreq_diskframe = minfreq_lampframe_*gg_lampdisk, maxfreq_diskframe = maxfreq_lampframe_*gg_lampdisk; //cout << "Limits computed= " << minfreq_computed_ << " " << maxfreq_computed_<< endl; //cout << "Limits lamp= " << minfreq_lampframe_ << " " << maxfreq_lampframe_<< endl; //cout << "Limits disk= " << minfreq_diskframe << " " << maxfreq_diskframe << endl; //cout << "Local nu= " << nu << endl; if (minfreq_diskframe < minfreq_computed_ || maxfreq_diskframe > maxfreq_computed_){ throwError("In DirectionalDisk::emission(): " "bad freq value ; update LampCutOffsIneV in XML"); } // Cut-offs in disk frame: if the local freq is not inside the // redshifted illumination band, no signal if (nu < minfreq_diskframe || nu > maxfreq_diskframe) return 0.; // Compute angle between photon direction and normal double normal[4]={0.,0.,-1.,0.}; // parallel to -d_theta (upwards) double normal_norm=gg_->ScalarProd(cp,normal,normal); if (normal_norm<=0.) throwError("In DirectionalDisk::emission" " normal should be spacelike"); normal_norm=sqrt(normal_norm); double np = 1./normal_norm*gg_->ScalarProd(cp,normal,cp+4), up = gg_->ScalarProd(cp,co+4,cp+4); double cosi = fabs(-np/up); double tolcos = 0.005; if (cosi>1.){ if (fabs(cosi-1)>tolcos) throwError("In DirectionalDisk: bad cos!"); cosi=1.; } //cout << "cosi= " << cosi << endl; // Don't put a "return cosi" here, see later // cos between unit normal n and tangent to photon p // is equal -n.p/u.p (u being the emitter's 4-vel); // fabs because assuming plane symmetry // Indices of the current closest grid point size_t ind[3]; // {i_nu, i_cosi, i_r} getIndices(ind, co, cosi, nu); //cout << "r, i2, nr= " << co[1] << " " << ind[2] << " " << nr_ <=radius_[nr_-1]) return 0.; if (nu<=freq_[nnu_-1] || nu>=freq_[0]) return 0.; // So here, ind[2] should be >0 and ind[0]= cosi_[ni_-1]){ // If cosi is out of the cosi_ range, bilinear interpol in nu,r size_t i1=ind[1]; //cout << "cos value unique= " << cosi_[i1] << endl; double I00 = emission_[i2l*(ni_*nnu_)+i1*nnu_+i0l], // I_{nu,r} I01 = emission_[i2u*(ni_*nnu_)+i1*nnu_+i0l], I10 = emission_[i2l*(ni_*nnu_)+i1*nnu_+i0u], I11 = emission_[i2u*(ni_*nnu_)+i1*nnu_+i0u]; //cout << "bilin dir: " << I00 << " " << I01 << " " << I10 << " " << I11 << endl; double rationu = (nu-freq_[i0l])/(freq_[i0u]-freq_[i0l]), ratior = (rr-radius_[i2l])/(radius_[i2u]-radius_[i2l]); Iem = I00+(I10-I00)*rationu +(I01-I00)*ratior +(I11-I01-I10+I00)*rationu*ratior; //cout << "I interp= " << Iem << endl; }else{ // Trilinear interpol if (ind[1]==0){ throwError("In DirectionalDisk::emission " "bad cosi indice"); } size_t i1l=ind[1]-1, i1u=ind[1]; double I000 = emission_[i2l*(ni_*nnu_)+i1l*nnu_+i0l], // I_{nu,cosi,r} I100 = emission_[i2l*(ni_*nnu_)+i1l*nnu_+i0u], I110 = emission_[i2l*(ni_*nnu_)+i1u*nnu_+i0u], I010 = emission_[i2l*(ni_*nnu_)+i1u*nnu_+i0l], I001 = emission_[i2u*(ni_*nnu_)+i1l*nnu_+i0l], I101 = emission_[i2u*(ni_*nnu_)+i1l*nnu_+i0u], I111 = emission_[i2u*(ni_*nnu_)+i1u*nnu_+i0u], I011 = emission_[i2u*(ni_*nnu_)+i1u*nnu_+i0l]; //cout << "trilin dir: " << I000 << " " << I100 << " " << I110 << " " << I010 << " " << I001 << " " << I101 << " " << I111 << " " << I011 << endl; double rationu = (nu-freq_[i0l])/(freq_[i0u]-freq_[i0l]), ratioi = (cosi-cosi_[i1l])/(cosi_[i1u]-cosi_[i1l]), ratior = (rr-radius_[i2l])/(radius_[i2u]-radius_[i2l]); Iem = I000 + (I100-I000)*rationu + (I010-I000)*ratioi + (I001-I000)*ratior + (I110-I010-I100+I000)*rationu*ratioi + (I011-I010-I001+I000)*ratioi*ratior + (I101-I001-I100+I000)*rationu*ratior + (I111-I011-I101-I110+I100+I001+I010-I000)*rationu*ratioi*ratior; //cout << "I interp= " << Iem << endl; } }else{ // Average over cosi values // with bilinear interpol in nu,r double I00=0., I01=0., I10=0., I11=0.; double I00min=DBL_MAX, I00max=DBL_MIN, I01min=DBL_MAX, I01max=DBL_MIN, I10min=DBL_MAX, I10max=DBL_MIN, I11min=DBL_MAX, I11max=DBL_MIN; /* Using trapezoidal rule, I_integ = \int I(mu)*dmu, mu=cos(i) NB: in Garcia+14, they compute a flux because they don't raytrace, so they use F = 1/4pi * \int I(i) cos(i) di = 1/2 * \int I(mu) mu dmu, here we are not interested in the same quantity */ double dcostot = 0.; // will contain \int d\mu (~1 but not exactly) for (size_t ii=0; iiI00max) I00max=emission_[i2l*(ni_*nnu_)+(ii+1)*nnu_+i0l]; if (emission_[i2l*(ni_*nnu_)+(ii)*nnu_+i0l]>I00max) I00max=emission_[i2l*(ni_*nnu_)+(ii)*nnu_+i0l]; if (emission_[i2u*(ni_*nnu_)+(ii+1)*nnu_+i0l]>I01max) I01max=emission_[i2u*(ni_*nnu_)+(ii+1)*nnu_+i0l]; if (emission_[i2u*(ni_*nnu_)+(ii)*nnu_+i0l]>I01max) I01max=emission_[i2u*(ni_*nnu_)+(ii)*nnu_+i0l]; if (emission_[i2l*(ni_*nnu_)+(ii+1)*nnu_+i0u]>I10max) I10max=emission_[i2l*(ni_*nnu_)+(ii+1)*nnu_+i0u]; if (emission_[i2l*(ni_*nnu_)+(ii)*nnu_+i0u]>I10max) I10max=emission_[i2l*(ni_*nnu_)+(ii)*nnu_+i0u]; if (emission_[i2u*(ni_*nnu_)+(ii+1)*nnu_+i0u]>I11max) I11max=emission_[i2u*(ni_*nnu_)+(ii+1)*nnu_+i0u]; if (emission_[i2u*(ni_*nnu_)+(ii)*nnu_+i0u]>I11max) I11max=emission_[i2u*(ni_*nnu_)+(ii)*nnu_+i0u]; */ //cout << "Raw data 1 for I00= " << radius_[i2l]/2. << " " << radius_[i2u]/2. << " " << freq_[i0l]/GYOTO_eV2Hz << " " << freq_[i0u]/GYOTO_eV2Hz << " " << cosi_[ii] << " " << cosi_[ii+1] << endl; //cout << "Raw data 2 for I00= " << emission_[i2l*(ni_*nnu_)+(ii+1)*nnu_+i0l] << " " << emission_[i2l*(ni_*nnu_)+ii*nnu_+i0l] << endl; //cout << "IO in avg i= " << ii << " and I0= " << I00 << endl; } // Normalizing (int d co(i) is very close to 1 but not exactly 1) I00/=dcostot; I01/=dcostot; I10/=dcostot; I11/=dcostot; //cout << "bilin avg: " << I00 << " " << I01 << " " << I10 << " " << I11 << endl; //if (I00I00max || I01>I01max || I10>I10max || I11>I11max) throwError("test"); double rationu = (nu-freq_[i0l])/(freq_[i0u]-freq_[i0l]), ratior = (rr-radius_[i2l])/(radius_[i2u]-radius_[i2l]); Iem = I00+(I10-I00)*rationu +(I01-I00)*ratior +(I11-I01-I10+I00)*rationu*ratior; //cout << "I interp= " << Iem << endl; } //cout << "return= " << Iem << endl; return Iem; } void DirectionalDisk::metric(SmartPointer gg) { //Metric must be KerrBL (see emission function) string kin = gg->kind(); if (kin != "KerrBL") throwError("DirectionalDisk::metric(): metric must be KerrBL"); ThinDisk::metric(gg); } Gyoto-1.2.0/lib/Disk3D.C000066400000000000000000000633221302352257300145560ustar00rootroot00000000000000/* Copyright 2012-2015 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoPhoton.h" #include "GyotoDisk3D.h" #include "GyotoProperty.h" #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoKerrBL.h" #include "GyotoKerrKS.h" #ifdef GYOTO_USE_CFITSIO #include #define throwCfitsioError(status) \ { fits_get_errstatus(status, ermsg); throwError(ermsg); } #endif #include #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; GYOTO_PROPERTY_START(Disk3D) GYOTO_PROPERTY_FILENAME(Disk3D, File, file) GYOTO_PROPERTY_BOOL(Disk3D, ZsymmetrizeGrid, NoZsymmetrizeGrid, zsym) GYOTO_PROPERTY_DOUBLE(Disk3D, tPattern, tPattern) GYOTO_PROPERTY_DOUBLE(Disk3D, omegaPattern, omegaPattern) GYOTO_PROPERTY_END(Disk3D, Generic::properties) void Disk3D::fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const { if (p.name == "File") fmp->setParameter("File", (filename_.compare(0,1,"!") ? filename_ : filename_.substr(1)) ); else Generic::fillProperty(fmp, p); } void Disk3D::file(std::string const &f) { #ifdef GYOTO_USE_CFITSIO fitsRead(f); #else throwError("This Gyoto has no FITS i/o"); #endif } std::string Disk3D::file() const {return filename_;} void Disk3D::zsym(bool t) {zsym_=t;} bool Disk3D::zsym() const {return zsym_;} void Disk3D::tPattern(double t) {tPattern_=t;} double Disk3D::tPattern() const {return tPattern_;} void Disk3D::omegaPattern(double t) {omegaPattern_=t;} double Disk3D::omegaPattern() const {return omegaPattern_;} Disk3D::Disk3D() : Generic("Disk3D"), filename_(""), emissquant_(NULL), opacity_(NULL), velocity_(NULL), dnu_(1.), nu0_(0), nnu_(0), dphi_(0.), phimin_(-DBL_MAX), nphi_(0), phimax_(DBL_MAX), repeat_phi_(1), dz_(0.), zmin_(-DBL_MAX), nz_(0), zmax_(DBL_MAX), dr_(0.), rin_(-DBL_MAX), nr_(0), rout_(DBL_MAX), zsym_(1), tPattern_(0.), omegaPattern_(0.) { GYOTO_DEBUG << "Disk3D Construction" << endl; } Disk3D::Disk3D(const Disk3D& o) : Generic(o), filename_(o.filename_), emissquant_(NULL), opacity_(NULL), velocity_(NULL), dnu_(o.dnu_), nu0_(o.nu0_), nnu_(o.nnu_), dphi_(o.dphi_), phimin_(o.phimin_), nphi_(o.nphi_), phimax_(o.phimax_), repeat_phi_(o.repeat_phi_), dz_(o.dz_), zmin_(o.zmin_), nz_(o.nz_), zmax_(o.zmax_), dr_(o.dr_), rin_(o.rin_), nr_(o.nr_), rout_(o.rout_), zsym_(o.zsym_), tPattern_(o.tPattern_), omegaPattern_(o.omegaPattern_) { GYOTO_DEBUG << "Disk3D Copy" << endl; size_t ncells = 0; if (o.emissquant_) { emissquant_ = new double[ncells = nnu_ * nphi_ * nz_ * nr_]; memcpy(emissquant_, o.emissquant_, ncells * sizeof(double)); } if (o.opacity_) { opacity_ = new double[ncells = nnu_ * nphi_ * nz_ * nr_]; memcpy(opacity_, o.opacity_, ncells * sizeof(double)); } if (o.velocity_) { velocity_ = new double[ncells = 3 * nphi_ * nz_ * nr_]; memcpy(velocity_, o.velocity_, ncells * sizeof(double)); } } Disk3D* Disk3D::clone() const { return new Disk3D(*this); } Disk3D::~Disk3D() { GYOTO_DEBUG << "Disk3D Destruction" << endl; if (emissquant_) delete [] emissquant_; if (velocity_) delete [] velocity_; } void Disk3D::setEmissquant(double * pattern) { emissquant_ = pattern; } void Disk3D::opacity(double * pattern) { opacity_ = pattern; } void Disk3D::setVelocity(double * pattern) { velocity_ = pattern; } void Disk3D::copyEmissquant(double const *const pattern, size_t const naxes[4]) { GYOTO_DEBUG << endl; if (emissquant_) { GYOTO_DEBUG << "delete [] emissquant_;" << endl; delete [] emissquant_; emissquant_ = NULL; } if (pattern) { size_t nel; if (nphi_ != naxes[1]) { GYOTO_DEBUG <<"nphi_ changed, freeing velocity_" << endl; if (velocity_) { delete [] velocity_; velocity_= NULL; } } if (nz_ != naxes[2]) { GYOTO_DEBUG <<"nz_ changed, freeing velocity_" << endl; if (velocity_) { delete [] velocity_; velocity_= NULL; } } if (nr_ != naxes[3]) { GYOTO_DEBUG <<"nr_ changed, freeing velocity_" << endl; if (velocity_) { delete [] velocity_; velocity_= NULL; } } if (!(nel=(nnu_ = naxes[0]) * (nphi_=naxes[1]) * (nz_=naxes[2]) * (nr_=naxes[3]))) throwError( "dimensions can't be null"); if (nr_==1 || nz_==1 || nphi_==1) throwError("In Disk3D::CopyEmissquant: dimensions should be >1"); dr_ = (rout_ - rin_) / double(nr_-1); dz_ = (zmax_ - zmin_) / double(nz_-1); if (repeat_phi_==0.) throwError("In Disk3D::CopyEmissquant: repeat_phi is 0!"); //dphi_ = 2.*M_PI/double((nphi_-1.)*repeat_phi_); dphi_ = (phimax_-phimin_)/double((nphi_-1)*repeat_phi_); GYOTO_DEBUG << "allocate emissquant_;" << endl; emissquant_ = new double[nel]; GYOTO_DEBUG << "pattern >> emissquant_" << endl; memcpy(emissquant_, pattern, nel*sizeof(double)); } } double const * Disk3D::getEmissquant() const { return emissquant_; } void Disk3D::getEmissquantNaxes( size_t naxes[3] ) const { naxes[0] = nnu_; naxes[1] = nphi_; naxes[2] = nz_; naxes[3] = nr_; } void Disk3D::copyOpacity(double const *const opac, size_t const naxes[4]) { GYOTO_DEBUG << endl; if (opacity_) { GYOTO_DEBUG << "delete [] opacity_;" << endl; delete [] opacity_; opacity_ = NULL; flag_radtransf_=0; } if (opac) { if (nnu_ != naxes[0] || nphi_ != naxes[1] || nz_ != naxes[2] || nr_ != naxes[3]) throwError("Please set intensity before opacity. " "The two arrays must have the same dimensions."); GYOTO_DEBUG << "allocate opacity_;" << endl; opacity_ = new double[nnu_ * nphi_ * nz_ * nr_]; GYOTO_DEBUG << "opacity >> opacity_" << endl; memcpy(opacity_, opac, nnu_ * nphi_ * nz_ * nr_ * sizeof(double)); flag_radtransf_=1; } } double const * Disk3D::opacity() const { return opacity_; } void Disk3D::copyVelocity(double const *const velocity, size_t const naxes[3]) { GYOTO_DEBUG << endl; if (velocity_) { GYOTO_DEBUG << "delete [] velocity_;\n"; delete [] velocity_; velocity_ = NULL; } if (velocity) { if (!emissquant_) throwError("Please use copyEmissquant() before copyVelocity()"); if (nphi_ != naxes[0] || nz_ != naxes[1] || nr_ != naxes[2]) throwError("emissquant_ and velocity_ have inconsistent dimensions"); GYOTO_DEBUG << "allocate velocity_;" << endl; velocity_ = new double[3*nphi_*nz_*nr_]; GYOTO_DEBUG << "velocity >> velocity_" << endl; memcpy(velocity_, velocity, 3*nphi_*nz_*nr_*sizeof(double)); } } double const * Disk3D::getVelocity() const { return velocity_; } void Disk3D::repeatPhi(size_t n) { repeat_phi_ = n; if (nphi_>1 && repeat_phi_>0.) dphi_=(phimax_-phimin_)/double((nphi_-1)*repeat_phi_); //dphi_=2.*M_PI/double((nphi_-1.)*repeat_phi_); } size_t Disk3D::repeatPhi() const { return repeat_phi_; } void Disk3D::nu0(double freq) { nu0_ = freq; } double Disk3D::nu0() const { return nu0_; } void Disk3D::dnu(double dfreq) { dnu_ = dfreq; } double Disk3D::dnu() const { return dnu_; } void Disk3D::rin(double rrin) { rin_ = rrin; if (nr_>1) dr_ = (rout_-rin_) / double(nr_-1); } double Disk3D::rin() const {return rin_;} void Disk3D::rout(double rrout) { rout_ = rrout; if (nr_>1) dr_ = (rout_-rin_) / double(nr_-1); } double Disk3D::rout() const {return rout_;} void Disk3D::zmin(double zzmin) { zmin_ = zzmin; if (nz_>1) dz_ = (zmax_-zmin_) / double(nz_-1); } double Disk3D::zmin() const {return zmin_;} void Disk3D::zmax(double zzmax) { zmax_ = zzmax; if (nz_>1) dz_ = (zmax_-zmin_) / double(nz_-1); } double Disk3D::zmax() const {return zmax_;} void Disk3D::phimin(double phimn) { phimin_ = phimn; if (nphi_>1) dphi_ = (phimax_-phimin_) / double(nphi_-1); } double Disk3D::phimin() const {return phimin_;} void Disk3D::phimax(double phimx) { phimax_ = phimx; if (nphi_>1) dphi_ = (phimax_-phimin_) / double(nphi_-1); } double Disk3D::phimax() const {return phimax_;} #ifdef GYOTO_USE_CFITSIO void Disk3D::fitsRead(string filename) { GYOTO_MSG << "Disk3D reading FITS file: " << filename << endl; filename_ = filename; char* pixfile = const_cast(filename_.c_str()); fitsfile* fptr = NULL; int status = 0; int anynul = 0; long tmpl; double tmpd; long naxes [] = {1, 1, 1, 1}; long fpixel[] = {1,1,1,1}; long inc [] = {1,1,1,1}; char ermsg[31] = ""; // ermsg is used in throwCfitsioError() GYOTO_DEBUG << "Disk3D::fitsRead(): opening file" << endl; if (fits_open_file(&fptr, pixfile, 0, &status)) throwCfitsioError(status) ; ////// READ FITS KEYWORDS COMMON TO ALL TABLES /////// GYOTO_DEBUG << "Disk3D::fitsRead(): read RepeatPhi_" << endl; fits_read_key(fptr, TLONG, "GYOTO Disk3D RepeatPhi", &tmpl, NULL, &status); if (status) { if (status == KEY_NO_EXIST) status = 0; // not fatal else throwCfitsioError(status) ; } else repeat_phi_ = size_t(tmpl); // RepeatPhi found GYOTO_DEBUG << "Disk3D::fitsRead(): read Rin_" << endl; fits_read_key(fptr, TDOUBLE, "GYOTO Disk3D Rin", &tmpd, NULL, &status); if (status) { //if (status == KEY_NO_EXIST) status = 0; // not fatal -> now fatal in 3D throwCfitsioError(status) ; } else { rin_ = tmpd; // InnerRadius found } GYOTO_DEBUG << "Disk3D::fitsRead(): read Rout_" << endl; fits_read_key(fptr, TDOUBLE, "GYOTO Disk3D Rout", &tmpd, NULL, &status); if (status) { //if (status == KEY_NO_EXIST) status = 0; // not fatal -> now fatal in 3D throwCfitsioError(status) ; } else { rout_ = tmpd; // OuterRadius found } GYOTO_DEBUG << "Disk3D::fitsRead(): read Zmin_" << endl; fits_read_key(fptr, TDOUBLE, "GYOTO Disk3D Zmin", &tmpd, NULL, &status); if (status) { throwCfitsioError(status) ; } else { zmin_ = tmpd; // Zmin found } GYOTO_DEBUG << "Disk3D::fitsRead(): read Zmax_" << endl; fits_read_key(fptr, TDOUBLE, "GYOTO Disk3D Zmax", &tmpd, NULL, &status); if (status) { throwCfitsioError(status) ; } else { zmax_ = tmpd; // Zmax found } GYOTO_DEBUG << "Disk3D::fitsRead(): read Phimin_" << endl; fits_read_key(fptr, TDOUBLE, "GYOTO Disk3D Phimin", &tmpd, NULL, &status); if (status) { throwCfitsioError(status) ; } else { phimin_ = tmpd; // Phimin found } GYOTO_DEBUG << "Disk3D::fitsRead(): read Phimax_" << endl; fits_read_key(fptr, TDOUBLE, "GYOTO Disk3D Phimax", &tmpd, NULL, &status); if (status) { throwCfitsioError(status) ; } else { phimax_ = tmpd; // Phimax found } ////// FIND MANDATORY EMISSION HDU, READ KWDS & DATA /////// GYOTO_DEBUG << "Disk3D::fitsRead(): search emissquant HDU" << endl; if (fits_movnam_hdu(fptr, ANY_HDU, const_cast("GYOTO Disk3D emissquant"), 0, &status)) throwCfitsioError(status) ; GYOTO_DEBUG << "Disk3D::fitsRead(): get image size" << endl; if (fits_get_img_size(fptr, 4, naxes, &status)) throwCfitsioError(status) ; //update nu0_, nnu_, dnu_; nnu_ = naxes[0]; double CRPIX1; GYOTO_DEBUG << "Disk3D::fitsRead(): read CRPIX1, CRVAL1, CDELT1" << endl; fits_read_key(fptr, TDOUBLE, "CRVAL1", &nu0_, NULL, &status); fits_read_key(fptr, TDOUBLE, "CDELT1", &dnu_, NULL, &status); fits_read_key(fptr, TDOUBLE, "CRPIX1", &CRPIX1, NULL, &status); if (status) throwCfitsioError(status) ; if (CRPIX1 != 1) nu0_ -= dnu_*(CRPIX1 - 1.); if (naxes[1]*naxes[2]*naxes[3]==0.) throwError("In Disk3D::fitsRead: dimensions can't be null!"); // update nphi_, dphi_ nphi_ = naxes[1]; if (nphi_==1) throwError("In Disk3D::fitsRead: dimensions should be >1"); //dphi_ = 2.*M_PI/double((nphi_-1.)*repeat_phi_); dphi_ = (phimax_-phimin_)/double((nphi_-1)*repeat_phi_); // update nz_, nr_, dz_, dr_ nz_ = naxes[2]; nr_ = naxes[3]; if (nr_==1 || nz_==1) throwError("In Disk3D::fitsRead: dimensions should be >1"); dr_ = (rout_ - rin_) / double(nr_-1); dz_ = (zmax_ - zmin_) / double(nz_-1); if (emissquant_) { delete [] emissquant_; emissquant_ = NULL; } emissquant_ = new double[nnu_ * nphi_ * nz_ * nr_]; if (debug()) cerr << "Disk3D::fitsRead(): read emission: " << "nnu_=" << nnu_ << ", nphi_="<("GYOTO Disk3D opacity"), 0, &status); if (status) { if (status == BAD_HDU_NUM) { GYOTO_INFO << "FITS file does not contain opacity extension" << endl; // FITS file does not contain opacity information status = 0; if (opacity_) { delete [] opacity_; opacity_ = NULL; } } else throwCfitsioError(status) ; } else { GYOTO_INFO << "FITS file contains opacity extension" << endl; if (fits_get_img_size(fptr, 4, naxes, &status)) throwCfitsioError(status) ; if ( size_t(naxes[0]) != nnu_ || size_t(naxes[1]) != nphi_ || size_t(naxes[2]) != nz_ || size_t(naxes[3]) != nr_ ) throwError("Disk3D::readFile(): opacity array not conformable"); if (opacity_) { delete [] opacity_; opacity_ = NULL; } opacity_ = new double[nnu_ * nphi_ * nz_ * nr_]; if (fits_read_subset(fptr, TDOUBLE, fpixel, naxes, inc, 0, opacity_,&anynul,&status)) { delete [] opacity_; opacity_=NULL; throwCfitsioError(status) ; } } ////// FIND MANDATORY VELOCITY HDU /////// fits_movnam_hdu(fptr, ANY_HDU, const_cast("GYOTO Disk3D velocity"), 0, &status); if (status) { if (status == BAD_HDU_NUM) throwCfitsioError(status) ; } else { if (fits_get_img_size(fptr, 4, naxes, &status)) throwCfitsioError(status) ; if ( size_t(naxes[0]) != size_t(3) || size_t(naxes[1]) != nphi_ || size_t(naxes[2]) != nz_ || size_t(naxes[3]) != nr_) throwError("Disk3D::fitsRead(): velocity array not conformable"); if (velocity_) { delete [] velocity_; velocity_ = NULL; } velocity_ = new double[3 * nphi_ * nz_ * nr_]; if (fits_read_subset(fptr, TDOUBLE, fpixel, naxes, inc, 0, velocity_,&anynul,&status)) { delete [] velocity_; velocity_=NULL; throwCfitsioError(status) ; } } if (fits_close_file(fptr, &status)) throwCfitsioError(status) ; fptr = NULL; } void Disk3D::fitsWrite(string filename) { if (!emissquant_) throwError("Disk3D::fitsWrite(filename): nothing to save!"); filename_ = filename; char* pixfile = const_cast(filename_.c_str()); fitsfile* fptr = NULL; int status = 0; long naxes [] = {long(nnu_), long(nphi_), long(nz_), long(nr_)}; long fpixel[] = {1,1,1,1}; char * CNULL=NULL; char ermsg[31] = ""; // ermsg is used in throwCfitsioError() ////// CREATE FILE GYOTO_DEBUG << "creating file" << endl; fits_create_file(&fptr, pixfile, &status); fits_create_img(fptr, DOUBLE_IMG, 4, naxes, &status); if (status) throwCfitsioError(status) ; ////// WRITE FITS KEYWORDS COMMON TO ALL TABLES /////// if (repeat_phi_!=1) fits_write_key(fptr, TLONG, const_cast("GYOTO Disk3D RepeatPhi"), &repeat_phi_, CNULL, &status); if (rin_ > -DBL_MAX){ fits_write_key(fptr, TDOUBLE, const_cast("GYOTO Disk3D Rin"), &rin_, CNULL, &status); }else{ cout << "Disk3D::fitsWrite Error rin_ not set!" << endl; status=1; throwCfitsioError(status) } if (rout_ < DBL_MAX){ fits_write_key(fptr, TDOUBLE, const_cast("GYOTO Disk3D Rout"), &rout_, CNULL, &status); }else{ cout << "Disk3D::fitsWrite Error rout_ not set!" << endl; status=1; throwCfitsioError(status) } if (zmin_ > -DBL_MAX){ fits_write_key(fptr, TDOUBLE, const_cast("GYOTO Disk3D Zmin"), &zmin_, CNULL, &status); }else{ cout << "Disk3D::fitsWrite Error zmin_ not set!" << endl; status=1; throwCfitsioError(status) } if (zmax_ < DBL_MAX){ fits_write_key(fptr, TDOUBLE, const_cast("GYOTO Disk3D Zmax"), &zmax_, CNULL, &status); }else{ cout << "Disk3D::fitsWrite Error zmax_ not set!" << endl; status=1; throwCfitsioError(status) } if (phimin_ > -DBL_MAX){ fits_write_key(fptr, TDOUBLE, const_cast("GYOTO Disk3D Phimin"), &phimin_, CNULL, &status); }else{ cout << "Disk3D::fitsWrite Error Phimin_ not set!" << endl; status=1; throwCfitsioError(status) } if (phimax_ < DBL_MAX){ fits_write_key(fptr, TDOUBLE, const_cast("GYOTO Disk3D Phimax"), &phimax_, CNULL, &status); }else{ cout << "Disk3D::fitsWrite Error Phimax_ not set!" << endl; status=1; throwCfitsioError(status) } ////// SAVE EMISSION IN PRIMARY HDU /////// GYOTO_DEBUG << "saving emissquant_\n"; fits_write_key(fptr, TSTRING, const_cast("EXTNAME"), const_cast("GYOTO Disk3D emissquant"), CNULL, &status); fits_write_key(fptr, TDOUBLE, const_cast("CRVAL1"), &nu0_, CNULL, &status); fits_write_key(fptr, TDOUBLE, const_cast("CDELT1"), &dnu_, CNULL, &status); double CRPIX1 = 1.; fits_write_key(fptr, TDOUBLE, const_cast("CRPIX1"), &CRPIX1, CNULL, &status); fits_write_pix(fptr, TDOUBLE, fpixel, nnu_*nphi_*nz_*nr_, emissquant_, &status); if (status) throwCfitsioError(status) ; ////// SAVE OPTIONAL OPACITY HDU /////// if (opacity_) { GYOTO_DEBUG << "saving opacity_\n"; fits_create_img(fptr, DOUBLE_IMG, 4, naxes, &status); fits_write_key(fptr, TSTRING, const_cast("EXTNAME"), const_cast("GYOTO Disk3D opacity"), CNULL, &status); fits_write_pix(fptr, TDOUBLE, fpixel, nnu_*nphi_*nz_*nr_, opacity_, &status); if (status) throwCfitsioError(status) ; } ////// SAVE MANDATORY VELOCITY HDU /////// if (velocity_) { GYOTO_DEBUG << "saving velocity_\n"; naxes[0]=3; fits_create_img(fptr, DOUBLE_IMG, 4, naxes, &status); fits_write_key(fptr, TSTRING, const_cast("EXTNAME"), const_cast("GYOTO Disk3D velocity"), CNULL, &status); fits_write_pix(fptr, TDOUBLE, fpixel, 3*nphi_*nz_*nr_, velocity_, &status); if (status) throwCfitsioError(status) ; } ////// CLOSING FILE /////// GYOTO_DEBUG << "close FITS file\n"; if (fits_close_file(fptr, &status)) throwCfitsioError(status) ; fptr = NULL; } void Disk3D::getIndices(size_t i[4], double const co[4], double nu) const { GYOTO_DEBUG << "dnu_="<2.*M_PI) phi -= 2.*M_PI; if (phiphimax_) i[1]=nphi_-1; else i[1] = size_t(floor((phi-phimin_)/dphi_+0.5)) % nphi_; //z indice if (zz<0. && zmin_>=0.) zz*=-1.; //if zmin>=0, assume disk is symmetric i[2] = size_t(floor((zz-zmin_)/dz_+0.5)); if (i[2] == nz_) i[2] = nz_ - 1; else if (i[2] > nz_) throwError("In Disk3D::getIndices() impossible indice value for z"); //r indice i[3] = size_t(floor((rr-rin_)/dr_+0.5)); if (i[3] == nr_) i[3] = nr_ - 1; else if (i[3] > nr_) throwError("In Disk3D::getIndices() impossible indice value for r"); } #endif void Disk3D::getVelocity(double const pos[4], double vel[4]) { if (velocity_) { size_t i[4]; // {i_nu, i_phi, i_z, i_r} getIndices(i, pos); double phiprime=velocity_[i[3]*3*nphi_*nz_+i[2]*3*nphi_+i[1]*3+0]; double zprime=velocity_[i[3]*3*nphi_*nz_+i[2]*3*nphi_+i[1]*3+1]; double rprime=velocity_[i[3]*3*nphi_*nz_+i[2]*3*nphi_+i[1]*3+2]; switch (gg_->coordKind()) { case GYOTO_COORDKIND_SPHERICAL: { //Formula from derivation of rsph^2=rcyl^2+zz^2 //and rsph*cos(th)=zz where rsph and rcyl //are spherical and cylindrical radii double rsph=pos[1], th=pos[2], zz= rsph*cos(th), rcyl=sqrt(rsph*rsph-zz*zz); vel[1] = (rcyl*rprime+zz*zprime)/rsph; vel[2] = (vel[1]*cos(th)-zprime)/(rsph*sin(th)); vel[3] = phiprime; vel[0] = gg_->SysPrimeToTdot(pos, vel+1); vel[1] *= vel[0]; vel[2] *= vel[0]; vel[3] *= vel[0]; } break; case GYOTO_COORDKIND_CARTESIAN: throwError("Disk3D::getVelocity(): metric must be in " "spherical coordinates"); break; default: throwError("Disk3D::getVelocity(): unknown COORDKIND"); } }else throwError("In Disk3D::getVelocity(): velocity_==NULL!"); } int Disk3D::Impact(Photon *ph, size_t index, Astrobj::Properties *data) { GYOTO_DEBUG << endl; double coord_ph_hit[8], coord_obj_hit[8]; double coord1[8], coord2[8]; ph->getCoord(index, coord1); ph->getCoord(index+1, coord2); ph->checkPhiTheta(coord1); ph->checkPhiTheta(coord2); // HEURISTIC TESTS TO PREVENT TOO MANY INTEGRATION STEPS // Speeds up a lot! // Idea: no test if r1,r2 > factr*rdiskmax_ AND z1,z2 have same sign double r1=coord1[1], r2=coord2[1], z1=r1*cos(coord1[2]), z2=r2*cos(coord2[2]); double factr=2.; double rtol=factr*rout_; if (r1>rtol && r2>rtol && z1*z2>0.) return 0; double t1=coord1[0], t2=coord2[0]; double deltatmin=0.1;//, deltat12=fabs(t2-t1)*0.1; //Break the worldline in pieces of "size" deltat: //double deltat= deltat12 < deltatmin ? deltat12 : deltatmin; double deltat= deltatmin; /* IMPORTANT REMARK: putting deltat to either deltatmin or deltat12 leads to changing significantly the intensity of two nearby pixels for a very optically thick object as then the final intensity is typically 'some quantity'*deltat. Thus the value of deltat should be the same for all pixels. The value of deltatmin is thus a tricky point if one is interested in a very precise radiative transfer. */ double tcur=t2; double myrcur=coord2[1], thetacur=coord2[2], zcur=myrcur*cos(thetacur),rcur=sqrt(myrcur*myrcur-zcur*zcur); //NB: myrcur is r in spherical coord, rcur is r in cylindrical coord /*** FIND GRID ENTRY POINT BETWEEN t1 AND t2 ***/ //Following while loop determines (if any) the entry and out points //along the geodesic that goes throw the disk while (tcur>t1+deltat && ( (zsym_ && ((zmin_<0. && zcur=0. && zcur<-zmax_)) ) || (!zsym_ && zcurzmax_ || rcur>rout_ || rcur=0 tcur-=deltat; coord_ph_hit[0]=tcur; ph -> getCoord( coord_ph_hit, 1, coord_ph_hit+1, coord_ph_hit+2, coord_ph_hit+3, coord_ph_hit+4, coord_ph_hit+5, coord_ph_hit+6, coord_ph_hit+7); //Cylindrical z and r coordinates myrcur=coord_ph_hit[1]; thetacur=coord_ph_hit[2]; zcur=myrcur*cos(thetacur); rcur=sqrt(myrcur*myrcur-zcur*zcur); } /*** IF NO INTERSECTION WITH GRID, RETURN ***/ if (tcur<=t1+deltat) { //Then no point inside grid found between t1 and t2 return 0; } // Else: t1t1){ if (tcur>t1+deltat){ tcur-=deltat; }else{//this is for last step of this loop //to integrate until t1 //deltat=tcur-t1; //No: see important remark above, don't change deltat tcur=t1; } coord_ph_hit[0]=tcur; ph -> getCoord( coord_ph_hit, 1, coord_ph_hit+1, coord_ph_hit+2, coord_ph_hit+3, coord_ph_hit+4, coord_ph_hit+5, coord_ph_hit+6, coord_ph_hit+7); //Cylindrical z and r coordinates myrcur=coord_ph_hit[1]; thetacur=coord_ph_hit[2]; zcur=myrcur*cos(thetacur); rcur=sqrt(myrcur*myrcur-zcur*zcur); if ( (zsym_ && ((zmin_<0. && zcur=0. && zcur<-zmax_)) ) || (!zsym_ && zcurzmax_ || rcur>rout_ || rcurcheckPhiTheta(coord_ph_hit); for (int ii=0;ii<4;ii++) coord_obj_hit[ii]=coord_ph_hit[ii]; getVelocity(coord_obj_hit, coord_obj_hit+4); if (data) { //Store impact time in user1 if (data->user1) *data->user1=tcur; } processHitQuantities(ph, coord_ph_hit, coord_obj_hit, deltat, data); if (!flag_radtransf_) indisk=0;//not to go on integrating } } return 1; } Gyoto-1.2.0/lib/DynamicalDisk.C000066400000000000000000000260311302352257300162050ustar00rootroot00000000000000/* Copyright 2011 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoPhoton.h" #include "GyotoDynamicalDisk.h" #include "GyotoProperty.h" #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoKerrBL.h" #include "GyotoKerrKS.h" #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; /// Properties GYOTO_PROPERTY_START(DynamicalDisk) GYOTO_PROPERTY_DOUBLE(DynamicalDisk, tinit, tinit) GYOTO_PROPERTY_DOUBLE(DynamicalDisk, dt, dt) GYOTO_PROPERTY_END(DynamicalDisk, PatternDiskBB::properties) /// DynamicalDisk::DynamicalDisk() : PatternDiskBB(), dirname_(NULL), tinit_(0.), dt_(1.), nb_times_(0), emission_array_(NULL), opacity_array_(NULL), velocity_array_(NULL), radius_array_(NULL), dnu_array_(NULL), nu0_array_(NULL), nnu_array_(NULL), dphi_array_(NULL), nphi_array_(NULL), dr_array_(NULL), nr_array_(NULL) { GYOTO_DEBUG << "DynamicalDisk Construction" << endl; } DynamicalDisk::DynamicalDisk(const DynamicalDisk& o) : PatternDiskBB(o), dirname_(NULL), tinit_(o.tinit_), dt_(o.dt_), nb_times_(0), emission_array_(NULL), opacity_array_(NULL), velocity_array_(NULL), radius_array_(NULL), dnu_array_(NULL), nu0_array_(NULL), nnu_array_(NULL), dphi_array_(NULL), nphi_array_(NULL), dr_array_(NULL), nr_array_(NULL) { GYOTO_DEBUG << "DynamicalDisk Copy" << endl; #ifdef GYOTO_USE_CFITSIO if (o.dirname_) { dirname_ = new char[strlen(o.dirname_)+1]; strcpy(dirname_,o.dirname_); } if (!nb_times_) return; emission_array_ = new double*[nb_times_] ; opacity_array_ = new double*[nb_times_] ; velocity_array_ = new double*[nb_times_] ; radius_array_ = new double*[nb_times_] ; dnu_array_ = new double [nb_times_]; nu0_array_ = new double [nb_times_]; nnu_array_ = new size_t [nb_times_]; nphi_array_ = new size_t [nb_times_]; nr_array_ = new size_t [nb_times_]; memcpy(dnu_array_, o.dnu_array_, nb_times_*sizeof(double)); memcpy(nu0_array_, o.nu0_array_, nb_times_*sizeof(double)); memcpy(nnu_array_, o.nnu_array_, nb_times_*sizeof(size_t)); memcpy(nnu_array_, o.nnu_array_, nb_times_*sizeof(size_t)); memcpy(nphi_array_, o.nphi_array_, nb_times_*sizeof(size_t)); memcpy(nr_array_, o.nr_array_, nb_times_*sizeof(size_t)); for (int i=1; i<=nb_times_; i++) { size_t nnu = nnu_array_ [i-1]; size_t nphi = nphi_array_[i-1]; size_t nr = nr_array_ [i-1]; size_t nel1=nnu*nphi*nr, nel2=2*nr*nphi; emission_array_[i-1] = new double[nel1]; opacity_array_ [i-1] = new double[nel1]; velocity_array_[i-1] = new double[nel2]; radius_array_ [i-1] = new double[nr ]; memcpy(emission_array_[i-1], o.emission_array_[i-1], nel1*sizeof(double)); memcpy(opacity_array_ [i-1], o.opacity_array_ [i-1], nel1*sizeof(double)); memcpy(velocity_array_[i-1], o.velocity_array_[i-1], nel2*sizeof(double)); memcpy(radius_array_ [i-1], o.radius_array_ [i-1], nr *sizeof(double)); } #endif } DynamicalDisk* DynamicalDisk::clone() const { return new DynamicalDisk(*this); } DynamicalDisk::~DynamicalDisk() { GYOTO_DEBUG << "DynamicalDisk Destruction" << endl; for (int i=1; i<=nb_times_; i++) { if (emission_array_) delete [] emission_array_[i-1]; if (opacity_array_) delete [] opacity_array_ [i-1]; if (velocity_array_) delete [] velocity_array_[i-1]; if (radius_array_) delete [] radius_array_ [i-1]; } if (emission_array_) delete [] emission_array_; if (opacity_array_) delete [] opacity_array_ ; if (velocity_array_) delete [] velocity_array_; if (radius_array_) delete [] radius_array_ ; if (dnu_array_) delete [] dnu_array_; if (nu0_array_) delete [] nu0_array_; if (nnu_array_) delete [] nnu_array_; if (nphi_array_) delete [] nphi_array_; if (nr_array_) delete [] nr_array_; emission_array_ = NULL; opacity_array_ = NULL; velocity_array_ = NULL; radius_array_ = NULL; dnu_array_ = NULL; nu0_array_ = NULL; nnu_array_ = NULL; nphi_array_ = NULL; nr_array_ = NULL; nb_times_ = 0; if (dirname_) delete dirname_; } double const * DynamicalDisk::getVelocity() const { return PatternDiskBB::getVelocity(); } void DynamicalDisk::copyQuantities(int iq) { if (iq<1 || iq>nb_times_) throwError("In DynamicalDisk::copyQuantities: incoherent value of iq"); setEmission(emission_array_[iq-1]); setVelocity(velocity_array_[iq-1]); radius(radius_array_[iq-1]); } void DynamicalDisk::getVelocity(double const pos[4], double vel[4]) { double time = pos[0], tcomp=tinit_; int ifits=1; while(time>tcomp && ifitstcomp && ifits(this)->copyQuantities(ifits); //awful trick to avoid problems with constness of function emission -> to improve return PatternDiskBB::emission(nu,dsem,NULL,co); }else{ double I1, I2; const_cast(this)->copyQuantities(ifits-1); I1=PatternDiskBB::emission(nu,dsem,NULL,co); const_cast(this)->copyQuantities(ifits); I2=PatternDiskBB::emission(nu,dsem,NULL,co); double t1 = tinit_+(ifits-2)*dt_; return I1+(I2-I1)/dt_*(time-t1); } return 0.; } std::string DynamicalDisk::file() const {return dirname_?dirname_:"";} void DynamicalDisk::file(std::string const &fname) { #ifdef GYOTO_USE_CFITSIO if (nb_times_) { // first free current arrays, if any for (int i=1; i<=nb_times_; i++) { if (emission_array_) delete [] emission_array_[i-1]; if (opacity_array_) delete [] opacity_array_ [i-1]; if (velocity_array_) delete [] velocity_array_[i-1]; if (radius_array_) delete [] radius_array_ [i-1]; } if (emission_array_) delete [] emission_array_; if (opacity_array_) delete [] opacity_array_ ; if (velocity_array_) delete [] velocity_array_; if (radius_array_) delete [] radius_array_ ; if (dnu_array_) delete [] dnu_array_; if (nu0_array_) delete [] nu0_array_; if (nnu_array_) delete [] nnu_array_; if (nphi_array_) delete [] nphi_array_; if (nr_array_) delete [] nr_array_; emission_array_ = NULL; opacity_array_ = NULL; velocity_array_ = NULL; radius_array_ = NULL; dnu_array_ = NULL; nu0_array_ = NULL; nnu_array_ = NULL; nphi_array_ = NULL; nr_array_ = NULL; nb_times_ = 0; } if (dirname_) delete dirname_; dirname_ = new char[strlen(fname.c_str())+1]; strcpy(dirname_,fname.c_str()); DIR *dp; struct dirent *dirp; if((dp = opendir(dirname_)) == NULL) { throwError("In DynamicalDisk.C constructor : bad dirname_"); } nb_times_=0; while ((dirp = readdir(dp)) != NULL) { nb_times_++; } nb_times_-=2; //for directories . and .. /* NB: ***Caution***, here it is assumed that dirname_ contains ONLY the FITS files, nothing else. */ closedir(dp); GYOTO_DEBUG << "FITS directory, number of FITS files= " << dirname_ << " " << nb_times_ << endl; if (nb_times_<1) throwError("In DynamicalDisk.C: bad nb_times_ value"); emission_array_ = new double*[nb_times_] ; opacity_array_ = new double*[nb_times_] ; velocity_array_ = new double*[nb_times_] ; radius_array_ = new double*[nb_times_] ; dnu_array_ = new double[nb_times_]; nu0_array_ = new double[nb_times_]; nnu_array_ = new size_t[nb_times_]; nphi_array_ = new size_t[nb_times_]; nr_array_ = new size_t[nb_times_]; for (int i=1; i<=nb_times_; i++) { ostringstream stream_name ; stream_name << dirname_ << "pseudoN2D" << setw(4) << setfill('0') << i << ".fits.gz" ; string filename = stream_name.str(); GYOTO_DEBUG << "Reading FITS file: " << filename << endl ; fitsRead(filename); size_t naxes[3]; getIntensityNaxes(naxes); size_t nnu=naxes[0],nphi=naxes[1],nr=naxes[2]; // nel = (nnu=naxes[0])*(nphi=naxes[1])*(nr=naxes[2]); size_t nel1=nnu*nphi*nr, nel2=2*nr*nphi; //save emission if (getIntensity()){ double * emtemp = const_cast(getIntensity()); emission_array_[i-1] = new double[nel1]; for (size_t j=0;j(opacity()); opacity_array_[i-1] = new double[nel1]; for (size_t j=0;j(getVelocity()); velocity_array_[i-1] = new double[nel2]; for (size_t j=0;j(getGridRadius()); radius_array_[i-1] = new double[nr]; for (size_t j=0;j. */ #include "GyotoPhoton.h" #include "GyotoDynamicalDisk3D.h" #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoKerrBL.h" #include "GyotoKerrKS.h" #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; #include "GyotoProperty.h" GYOTO_PROPERTY_START(DynamicalDisk3D) GYOTO_PROPERTY_FILENAME(DynamicalDisk3D, File, file) GYOTO_PROPERTY_DOUBLE(DynamicalDisk3D, tinit, tinit) GYOTO_PROPERTY_DOUBLE(DynamicalDisk3D, dt, dt) GYOTO_PROPERTY_BOOL(DynamicalDisk3D, TemperatureGrid, IntensityGrid, temperature) GYOTO_PROPERTY_DOUBLE(DynamicalDisk3D, PLindex, PLindex) GYOTO_PROPERTY_BOOL(DynamicalDisk3D, WithVelocity, NoVelocity, withVelocity) GYOTO_PROPERTY_DOUBLE(DynamicalDisk3D, FloorTemperature, floorTemperature) GYOTO_PROPERTY_END(DynamicalDisk3D, Disk3D::properties) DynamicalDisk3D::DynamicalDisk3D() : Disk3D(), spectrumBB_(NULL), temperature_(1), dirname_(NULL), tinit_(0.), dt_(1.), nb_times_(1), PLindex_(3), novel_(0), floortemperature_(0) { GYOTO_DEBUG << "DynamicalDisk3D Construction" << endl; spectrumBB_ = new Spectrum::BlackBody(); } DynamicalDisk3D::DynamicalDisk3D(const DynamicalDisk3D& o) : Disk3D(o), spectrumBB_(NULL), temperature_(o.temperature_), dirname_(NULL), tinit_(o.tinit_), dt_(o.dt_), nb_times_(o.nb_times_), PLindex_(o.PLindex_), novel_(o.novel_), floortemperature_(o.floortemperature_) { GYOTO_DEBUG << "DynamicalDisk3D Copy" << endl; if (o.spectrumBB_()) spectrumBB_=o.spectrumBB_->clone(); if (o.dirname_){ //dirname_ copy size_t length = strlen(o.dirname_)+1; dirname_ = new char[length]; memcpy(dirname_, o.dirname_, length); } if (o.emission_array_ && o.velocity_array_){ // emission_array_ and velocity_array_ copy size_t naxes[4]; getEmissquantNaxes(naxes); size_t nnu=naxes[0], nphi=naxes[1], nz=naxes[2], nr=naxes[3]; // Allocate emission_array_ = new double*[nb_times_]; velocity_array_ = new double*[nb_times_]; // Copy size_t nel1=nnu*nphi*nz*nr, nel2=3*nphi*nz*nr, szt=nel1*sizeof(double), szv=nel2*sizeof(double); for (int i=1; i<=nb_times_; i++) { emission_array_[i-1] = new double[nel1]; velocity_array_[i-1] = new double[nel2]; memcpy(emission_array_[i-1], o.emission_array_[i-1], szt); memcpy(velocity_array_[i-1], o.velocity_array_[i-1], szv); } // If absorption is given, copy if (o.absorption_array_){ absorption_array_ = new double*[nb_times_]; for (int i=1; i<=nb_times_; i++) { absorption_array_[i-1] = new double[nel1]; memcpy(absorption_array_[i-1], o.absorption_array_[i-1], szt); } } } } DynamicalDisk3D* DynamicalDisk3D::clone() const { return new DynamicalDisk3D(*this); } bool DynamicalDisk3D::isThreadSafe() const { // spectrumBB_ is not handled by a property. return Disk3D::isThreadSafe() && (!spectrumBB_ || spectrumBB_ -> isThreadSafe()); } DynamicalDisk3D::~DynamicalDisk3D() { GYOTO_DEBUG << "DynamicalDisk3D Destruction" << endl; delete [] emission_array_; if (absorption_array_) delete [] absorption_array_; delete [] velocity_array_; } double const * DynamicalDisk3D::getVelocity() const { return Disk3D::getVelocity(); } void DynamicalDisk3D::copyQuantities(int iq) { if (iq<1 || iq>nb_times_) throwError("In DynamicalDisk3D::copyQuantities: incoherent value of iq"); setEmissquant(emission_array_[iq-1]); if (absorption_array_) opacity(absorption_array_[iq-1]); setVelocity(velocity_array_[iq-1]); } void DynamicalDisk3D::getVelocity(double const pos[4], double vel[4]) { if (novel_){ // Velocity of emitted particle is not provided (only bulk velocity // is known). Then put velocity to default, redshift factor will // be constant. vel[0]=1.;vel[1]=0.;vel[2]=0.;vel[3]=0.; }else{ double rcur=pos[1]; double risco; switch (gg_->coordKind()) { case GYOTO_COORDKIND_SPHERICAL: { string kin = gg_->kind(); if (kin == "KerrBL") risco = static_cast >(gg_) -> getRms(); else if (kin == "Minkowski") risco = 6.; else risco=0., throwError("In DynamicalDisk3D::getVelocity: bad metric"); break; } default: throwError("DynamicalDisk3D::getVelocity: bad COORDKIND"); risco=0.; } if (rcurtcomp && ifits(getEmissquant()); double risco; switch (gg_->coordKind()) { case GYOTO_COORDKIND_SPHERICAL: { string kin = gg_->kind(); if (kin == "KerrBL") risco = static_cast >(gg_) -> getRms(); else if (kin == "Minkowski") risco = 6.; else risco=0., throwError("In DynamicalDisk3D::getVelocity: bad metric"); break; } default: throwError("DynamicalDisk3D::emission1date(): bad COORDKIND" ", should be BL corrdinates"); risco=0.; } double rcur=co[1]; if (rcur*fabs(sin(co[2])) > rout() || rcur < risco) return 0.; size_t i[4]; // {i_nu, i_phi, i_z, i_r} getIndices(i,co,nu); size_t naxes[4]; getEmissquantNaxes(naxes); size_t nnu=naxes[0], nphi=naxes[1], nz=naxes[2]; double emissq = emiss[i[3]*nphi*nz*nnu+i[2]*nphi*nnu+i[1]*nnu+i[0]]; //This is a quantity from which emiss. coef. j_nu is known //this is temperature in K if temperature_=1 //or directly j_nu, up to the nu dependence, if temperature_=0 double Ires=-1.; // emitted specific intensity if (!flag_radtransf_){ // optically thick case if (temperature_){ spectrumBB_->temperature(emissq); Ires=(*spectrumBB_)(nu); //cout << "in emis: " << emissq << " " << Ires << endl; }else{ Ires=emissq; } }else{// // optically thin case if (temperature_){ // cout << "in DD3 Ires= " << rcur << " " << th << " " << emissq << " " << floortemperature_ << " "; if (emissqtemperature(emissq); Ires=(*spectrumBB_)(nu); //cout << "return " << emissq << " " << Ires << endl; // BELOW: BREMS computation for 2012 RWI paper // //SI value of cylindrical r coordinate: // double dist_unit = gg_->unitLength(); // /* // Following fact (in SI units) is defined by: // fact=RR/(Mm*kappa*gamma) // with: // RR=8.3144621; // Perfect gas constant in SI // Mm=6e-4; //This is N_avogadro*M_atomicmassunit/gamma in kg/mol // kappa=3e10; // p = kappa*density^gamma // gamma=1.66667; // [see DynaDisk3D.i] // */ // double fact=2.77149e-07; // //See DynaDisk3D.i, or paper, for relation between emissq and density // double density=pow(fact*emissq,1.5);// 1.5 is 1/(gamma-1) // //density is in SI units, kg/m^3 // /*** Computing emission coef: ***/ // //Emission coef jnu for thermal bremsstrahlung // // (see RybickiLightman 5.14a) // /* // fact2=1/4pi * 2^5*pi*e^6/(3*me*c^3) * sqrt(2pi/(3*kB*me)) * 1/mu^2 // in SI, with: me=electron mass, e=electron charge, kB=boltzman, // mu=atomic mass unit // Anyway this factor has no importance, // we are interested in relative values // */ // double fact2=7.83315e-12; // double hok=4.79924e-11; //planck cst / boltzman cst // double jnu = fact2 * 1./sqrt(emissq) * density*density // * exp(-hok*nu/emissq); // //Elementary intensity added by current dsem segment of worldline // //in SI units: // Ires=jnu*dsem*dist_unit; // usd e.g. for 3D RWI computation // //cout << "stuff: " << density << " " << fact2 << " " << emissq << " " << dsem << " " << jnu << endl; } // cout << Ires << endl; // TEST }else{ //Ires=Iem; // used e.g. for GC blob computation double dist_unit = gg_->unitLength()*100.; // unit length in cgs double jnu = emissq*pow(nu,-(PLindex_-1.)/2.); Ires=jnu*dsem*dist_unit; } } return Ires; } double DynamicalDisk3D::emission(double nu, double dsem, double *, double co[8]) const { GYOTO_DEBUG << endl; double time = co[0], tcomp=tinit_; int ifits=1; while(time>tcomp && ifits(this)->copyQuantities(ifits); //awful trick to avoid problems with constness of function emission -> to improve return emission1date(nu,dsem,NULL,co); }else{ double I1, I2; const_cast(this)->copyQuantities(ifits-1); I1=emission1date(nu,dsem,NULL,co); const_cast(this)->copyQuantities(ifits); I2=emission1date(nu,dsem,NULL,co); double t1 = tinit_+(ifits-2)*dt_; return I1+(I2-I1)/dt_*(time-t1); } return 0.; } double DynamicalDisk3D::transmission1date(double nu, double dsem, double*, double co[8]) const{ GYOTO_DEBUG << endl; if (!flag_radtransf_) return 0.; double risco; switch (gg_->coordKind()) { case GYOTO_COORDKIND_SPHERICAL: { string kin = gg_->kind(); if (kin == "KerrBL") risco = static_cast >(gg_) -> getRms(); else if (kin == "Minkowski") risco = 6.; else risco=0., throwError("In DynamicalDisk3D::getVelocity: bad metric"); break; } default: throwError("DynamicalDisk3D::emission1date(): bad COORDKIND" ", should be BL corrdinates"); risco=0.; } double rcur=co[1]; if (rcur*fabs(sin(co[2])) > rout() || rcur < risco) return 0.; size_t i[4]; // {i_nu, i_phi, i_z, i_r} getIndices(i,co,nu); size_t naxes[4]; getEmissquantNaxes(naxes); size_t nnu=naxes[0], nphi=naxes[1], nz=naxes[2]; if (temperature_){ double * emiss = const_cast(getEmissquant()); double emissq = emiss[i[3]*nphi*nz*nnu+i[2]*nphi*nnu+i[1]*nnu+i[0]]; //emissq is local temperature in K //cout << "in trans DD3: " << rcur << " " << th << " " << emissq << " " << floortemperature_ << endl; if (emissqtemperature(emissq); // double BnuT=(*spectrumBB_)(nu); //Planck function // double jnu=emission1date(nu,dsem,NULL,co); // Emission coef * ds // double alphanu=0.; //absorption coef. // if (BnuT==0.){ // /* // BnuT can be 0 in the region close to ISCO where density // decreases very fast. Then jnu should be 0 too (density~0). // If both are 0, then nothing happens (no absorption, no emission, // it's free space). Thus leave alphanu=0. // If jnu!=0 then alphanu is not defined, this should not happen. // */ // if (jnu!=0.){ // cout << "r= " << rcur << " " << emissq << " " << jnu << " " << BnuT << endl; // throwError("In DynamicalDisk3D::" // "transmission1date absorption coef. undefined!"); // } // }else{ // alphanu=jnu/BnuT; // } // //Thermal emission assumed, use Kirchhoff alphanu=jnu/Bnu // return exp(-alphanu); // the dsem factor is already included // //in alphanu via jnu=emission1date(...,dsem,...) }else{ if (absorption_array_){ double * abs = const_cast(opacity()); double absq = abs[i[3]*nphi*nz*nnu+i[2]*nphi*nnu+i[1]*nnu+i[0]]; double dist_unit = gg_->unitLength()*100.; //dist unit in cgs double alphanu=absq*pow(nu,-(PLindex_+4.)/2.); return exp(-alphanu*dsem*dist_unit); }else{ throwError("In DynamicalDisk3D: in non-BB optically thin case, " "opacity should be provided"); } } throwError("BUG: should not reach this point!"); return 0.; // avoid pedantic warning } double DynamicalDisk3D::transmission(double nuem, double dsem, double* co) const { GYOTO_DEBUG << endl; double time = co[0], tcomp=tinit_; int ifits=1; while(time>tcomp && ifits(this)->copyQuantities(ifits); //awful trick to avoid problems with constness of function transmission -> to improve return transmission1date(nuem,dsem,NULL,co); }else{ double I1, I2; const_cast(this)->copyQuantities(ifits-1); I1=transmission1date(nuem,dsem,NULL,co); const_cast(this)->copyQuantities(ifits); I2=transmission1date(nuem,dsem,NULL,co); double t1 = tinit_+(ifits-2)*dt_; return I1+(I2-I1)/dt_*(time-t1); } return double(flag_radtransf_); } void DynamicalDisk3D::metric(SmartPointer gg) { //Metric must be KerrBL (see emission function) string kin = gg->kind(); if (kin != "KerrBL" && kin != "Minkowski") throwError ("DynamicalDisk3D::metric(): metric must be KerrBL"); Disk3D::metric(gg); } void DynamicalDisk3D::file(std::string const &content) { #ifdef GYOTO_USE_CFITSIO int withopacity=0; dirname_ = new char[strlen(content.c_str())+1]; strcpy(dirname_,content.c_str()); DIR *dp; struct dirent *dirp; if((dp = opendir(dirname_)) == NULL) { throwError("In DynamicalDisk3D.C constructor : bad dirname_"); } nb_times_=0; while ((dirp = readdir(dp)) != NULL) { nb_times_++; } nb_times_-=2; //for directories . and .. /* NB: ***Caution***, here it is assumed that dirname_ contains ONLY the FITS files, nothing else. */ closedir(dp); GYOTO_DEBUG << "FITS directory, number of FITS files= " << dirname_ << " " << nb_times_ << endl; if (nb_times_<1) throwError("In DynamicalDisk3D.C: bad nb_times_ value"); //check whether absorption is provided { // make declarations local (avoid warning) ostringstream stream_name ; stream_name << dirname_ << "data3D0001.fits.gz"; string filename = stream_name.str(); fitsRead(filename); } if (opacity()) { //cout << "WITH OPACITY" << endl; withopacity=1; } //initialize emission, absorption, velocity arrays emission_array_ = new double*[nb_times_] ; if (withopacity) absorption_array_ = new double*[nb_times_] ; else absorption_array_=NULL; velocity_array_ = new double*[nb_times_] ; double nu0b=0., zminb=0., zmaxb=0., rinb=0., routb=0.; size_t nnub=0, nphib=0, nzb=0, nrb=0; //fill in the arrays for (int i=1; i<=nb_times_; i++) { ostringstream stream_name ; stream_name << dirname_ << "data3D" << setw(4) << setfill('0') << i << ".fits.gz" ; string filename = stream_name.str(); GYOTO_DEBUG << "Reading FITS file: " << filename << endl ; fitsRead(filename); size_t naxes[4]; getEmissquantNaxes(naxes); size_t nnu=naxes[0], nphi=naxes[1], nz=naxes[2], nr=naxes[3]; size_t nel1=nnu*nphi*nz*nr, nel2=3*nr*nz*nphi; //save emission if (getEmissquant()){ double * emtemp = const_cast(getEmissquant()); emission_array_[i-1] = new double[nel1]; for (size_t j=0;j(opacity()); absorption_array_[i-1] = new double[nel1]; for (size_t j=0;j(getVelocity()); velocity_array_[i-1] = new double[nel2]; for (size_t j=0;j. */ #define throwCfitsioError(status) \ { fits_get_errstatus(status, ermsg); throwError(ermsg); } #include "GyotoPhoton.h" #include "GyotoDynamicalDiskBolometric.h" #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoKerrBL.h" #include "GyotoKerrKS.h" #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; /// Properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(DynamicalDiskBolometric, "DynamicalDisk with bolometric emission") GYOTO_PROPERTY_END(DynamicalDiskBolometric, DynamicalDisk::properties) DynamicalDiskBolometric::DynamicalDiskBolometric() : DynamicalDisk() { GYOTO_DEBUG << "DynamicalDiskBolometric Construction" << endl; } DynamicalDiskBolometric::DynamicalDiskBolometric(const DynamicalDiskBolometric& o) : DynamicalDisk(o) { GYOTO_DEBUG << "DynamicalDiskBolometric Copy" << endl; } DynamicalDiskBolometric* DynamicalDiskBolometric::clone() const { return new DynamicalDiskBolometric(*this); } DynamicalDiskBolometric::~DynamicalDiskBolometric() { GYOTO_DEBUG << "DynamicalDiskBolometric Destruction" << endl; } double DynamicalDiskBolometric::emission(double nu_em, double dsem, double *, double coord_obj[8]) const{ throwError("In DynamicalDiskBolometric::emission: " "not implemented"); } double DynamicalDiskBolometric::bolometricEmission(double dsem, double coord_obj[8]) const{ // cout << "in bolometricem, will return: " << DynamicalDisk::emission(0.,dsem,coord_obj,coord_obj) << endl; return DynamicalDisk::emission(0.,dsem,coord_obj,coord_obj); //never mind about 1st and 3rd elements } void DynamicalDiskBolometric::processHitQuantities(Photon* ph, double* coord_ph_hit, double* coord_obj_hit, double dt, Properties* data) const { #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; #endif /* NB: freqObs is the observer's frequency chosen in Screen::getRayCoord for the actual computation of the geodesic ; the physical value of nuobs will be used in spectrum computations by resorting to the xml specifications of the user (see below) ; this freqObs is used to transform the null worldline parameter dlambda (see below) */ double freqObs=ph->freqObs(); // this is a useless quantity, always 1 double dlambda = dt/coord_ph_hit[4]; //dlambda = dt/tdot double ggredm1 = -gg_->ScalarProd(coord_ph_hit,coord_obj_hit+4, coord_ph_hit+4);// / 1.; //this is nu_em/nu_obs double ggred = 1./ggredm1; //this is nu_obs/nu_em double dsem = dlambda*ggredm1; // *1. double inc =0.; if (data) { #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "data requested. " << ", ggredm1=" << ggredm1 << ", ggred=" << ggred << endl; #endif if (data->redshift) { *data->redshift=ggred; #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(*data->redshift); #endif } if (data->time) { *data->time=coord_ph_hit[0]; #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(*data->time); #endif } if (data->impactcoords) { memcpy(data->impactcoords, coord_obj_hit, 8 * sizeof(double)); memcpy(data->impactcoords+8, coord_ph_hit, 8 * sizeof(double)); } #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "dlambda = (dt="<< dt << ")/(tdot="<< coord_ph_hit[4] << ") = " << dlambda << ", dsem=" << dsem << endl; #endif if (data->intensity) throwError("In DynamicalDiskBolometric::process: " "unimplemented"); else if (data->user4) { inc = (bolometricEmission(dsem, coord_obj_hit)) * (ph -> getTransmission(size_t(-1))) * ggred*ggred*ggred*ggred; // I/nu^4 invariant *data->user4 += inc; #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(*data->user4); #endif } if (data->binspectrum) throwError("In DynamicalDiskBolometric::process: " "unimplemented"); if (data->spectrum) throwError("In DynamicalDiskBolometric::process: " "unimplemented"); /* update photon's transmission */ ph -> transmit(size_t(-1), transmission(freqObs*ggredm1, dsem,coord_ph_hit)); } else { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "NO data requested!" << endl; # endif } } Gyoto-1.2.0/lib/EquatorialHotSpot.C000066400000000000000000000172721302352257300171270ustar00rootroot00000000000000/* Copyright 2013 Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoEquatorialHotSpot.h" #include "GyotoPhoton.h" #include "GyotoPageThorneDisk.h" #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoKerrBL.h" #include "GyotoKerrKS.h" #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; /// Properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(EquatorialHotSpot, "Equatorial hot spot with beaming") GYOTO_PROPERTY_DOUBLE(EquatorialHotSpot, SpotRadSize, spotRadSize) GYOTO_PROPERTY_STRING(EquatorialHotSpot, BeamingKind, beaming, "One of: IsotropicBeaming, NormalBeaming, RadialBeaming") GYOTO_PROPERTY_DOUBLE(EquatorialHotSpot, BeamAngle, beamAngle) GYOTO_WORLDLINE_PROPERTY_END(EquatorialHotSpot, ThinDisk::properties) // accessors void EquatorialHotSpot::spotRadSize(double t) {sizespot_=t;} double EquatorialHotSpot::spotRadSize() const {return sizespot_;} void EquatorialHotSpot::beaming(std::string const &b) { if (b=="IsotropicBeaming") beaming_=IsotropicBeaming; else if (b=="NormalBeaming") beaming_=NormalBeaming; else if (b=="RadialBeaming") beaming_=RadialBeaming; else throwError("Unknown beaming kind"); } std::string EquatorialHotSpot::beaming() const { string b; switch (beaming_) { case IsotropicBeaming: b="IsotropicBeaming"; break; case NormalBeaming: b="NormalBeaming"; break; case RadialBeaming: b="RadialBeaming"; break; default: throwError("Unknown beaming kind"); } return b; } void EquatorialHotSpot::beamAngle(double t) {beamangle_=t;} double EquatorialHotSpot::beamAngle() const {return beamangle_;} // Needed for legacy XML files int EquatorialHotSpot::setParameter(string name, string content, string unit) { double coord[8]; char* tc = const_cast(content.c_str()); if (name=="InitialCoordinate") { name=="InitCoord"; return ThinDisk::setParameter(name, content, unit); } else if (name=="Position") { if (FactoryMessenger::parseArray(content, coord, 4) != 4) throwError("Worldline \"Position\" requires exactly 4 tokens"); if (init_vel_) { setInitCoord(coord, init_vel_); delete[] init_vel_; init_vel_=NULL; } else setPosition(coord); wait_pos_ = 0; } else if (name=="Velocity") { if (FactoryMessenger::parseArray(content, coord, 3) != 3) throwError("Worldline \"Velocity\" requires exactly 3 tokens"); if (wait_pos_) { if (init_vel_) delete [] init_vel_; init_vel_ = new double[3]; memcpy(init_vel_, coord, 3*sizeof(double)); } else setVelocity(coord); } else if (name=="NormalBeaming") { GYOTO_WARNING << "<" << name << "/> is deprecated, please use " " " << name << " instead"; beaming(name); } else if (name=="NormalBeaming" || name=="RadialBeaming") { GYOTO_WARNING << "<" << name << "/> is deprecated, please use \n"; GYOTO_WARNING << " " << name << " " << endl; GYOTO_WARNING << " " << content << "" << endl; GYOTO_WARNING <<" instead"; beaming(name); beamangle_=atof(content.c_str()); } else return ThinDisk::setParameter(name, content, unit); return 0; } // Needed for wait_pos_ #ifdef GYOTO_USE_XERCES void EquatorialHotSpot::fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const { if (p.name == "InitCoord") { if (imin_ <= imax_) { double coord[8]; getInitialCoord(coord); // For massive particule, express initial condition with 3-velocity double vel[3] = {coord[5]/coord[4], coord[6]/coord[4], coord[7]/coord[4]}; fmp -> setParameter ("Position", coord, 4); fmp -> setParameter ("Velocity", vel, 3); } return; } ThinDisk::fillProperty(fmp, p); } void EquatorialHotSpot::setParameters(FactoryMessenger* fmp) { wait_pos_ = 1; ThinDisk::setParameters(fmp); wait_pos_ = 0; if (init_vel_) { delete[] init_vel_; init_vel_=NULL; throwError("Worldline::setParameters(): " "Velocity was found but not Position"); } } #endif /// Gyoto::Astrobj::EquatorialHotSpot::EquatorialHotSpot() : ThinDisk("EquatorialHotSpot"), Worldline(), sizespot_(0.), beaming_(IsotropicBeaming), beamangle_(0.) { GYOTO_DEBUG << "Building EquatorialHotSpot"; } Gyoto::Astrobj::EquatorialHotSpot::EquatorialHotSpot(const EquatorialHotSpot &o) : ThinDisk(o), Worldline(o), sizespot_(o.sizespot_), beaming_(o.beaming_), beamangle_(o.beamangle_) { GYOTO_DEBUG << "Copying EquatorialHotSpot"; } EquatorialHotSpot * EquatorialHotSpot::clone() const { return new EquatorialHotSpot(*this); } Gyoto::Astrobj::EquatorialHotSpot::~EquatorialHotSpot() { GYOTO_DEBUG << "Destroying EquatorialHotSpot"; } double EquatorialHotSpot::getMass() const {return 1. ;} void EquatorialHotSpot::metric(SmartPointer gg) { ThinDisk::metric(gg); Worldline::metric(gg); } void EquatorialHotSpot::setInitialCondition(double coord[8]) { if (!metric_) throwError("Please set metric before calling " "EquatorialHotSpot::setInitialCondition(double*)"); Worldline::setInitialCondition(metric_, coord, 1); } void EquatorialHotSpot::getVelocity(double const pos[4], double vel[4]) { double coord_spot[4]={pos[0]}; const_cast(this) ->getCoord(coord_spot, 1, coord_spot+1, coord_spot+2, coord_spot+3); gg_ -> circularVelocity(coord_spot, vel, dir_); } double EquatorialHotSpot::emission(double nu_em, double dsem, double coord_ph[8], double coord_obj[8]) const{ double coord_spot[4]={coord_obj[0]}; const_cast(this) ->getCartesian(coord_spot, 1, coord_spot+1, coord_spot+2, coord_spot+3); //above: nasty trick to deal with constness of emission double xspot=coord_spot[1], yspot=coord_spot[2]; double rr=coord_obj[1], phi=coord_obj[3]; double difx=(rr*cos(phi)-xspot), dify=(rr*sin(phi)-yspot); double d2 = difx*difx+dify*dify; double ds2=sizespot_*sizespot_; if (d2 < ds2){ // computing the angle (normal,photon tangent) double gthth=gg_->gmunu(coord_ph,2,2); double pth=coord_ph[6]; double uemitter[4]; const_cast(this) ->getVelocity(coord_ph,uemitter); double pscalu=fabs(gg_->ScalarProd(coord_ph,coord_ph+4, uemitter)); double cosalpha = 1./pscalu*sqrt(gthth)*fabs(pth); // = |cos(alpha)| // emission gaussian width double sigma2=ds2/16.; // then 0 emission outside sizespot_ (4 sigma dist) if (fabs(cosalpha)>1.) throwError("In EquatorialHotSpot::emission:" " impossible angle"); switch (beaming_) { case IsotropicBeaming: return exp(-d2/(2*sigma2)); case NormalBeaming: return cosalpha*cosalpha*exp(-d2/(2*sigma2)); case RadialBeaming: return (1.-cosalpha)*(1.-cosalpha)*exp(-d2/(2*sigma2)); default: throwError("In EquatorialHotSpot::emission:" " incorrect beaming argument"); } } else { return 0.; } } Gyoto-1.2.0/lib/Error.C000066400000000000000000000030561302352257300145640ustar00rootroot00000000000000/* Copyright 2011, 2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include #include using namespace Gyoto; using namespace std; Error::Error( const std::string m ) : message(m), errcode(EXIT_FAILURE) { } Error::Error( const Gyoto::Error &o): message(o.message), errcode(o.errcode) {} void Error::Report() const { cerr << message << endl; } int Error::getErrcode() const { return errcode ; } //char const * const Error::get_message() const { return message; } std::string Error::get_message() const { return message; } static Gyoto::Error::Handler_t * GyotoErrorHandler = NULL; void Gyoto::Error::setHandler( Gyoto::Error::Handler_t* handler ) { GyotoErrorHandler = handler ; } void Gyoto::throwError( const std::string m ) { if (GyotoErrorHandler) (*GyotoErrorHandler)(Error(m)); else throw Error(m); } Gyoto::Error::operator const char * () const { return message.c_str(); } Gyoto-1.2.0/lib/Factory.C000066400000000000000000001002361302352257300151000ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoConfig.h" #ifdef GYOTO_USE_XERCES #include "GyotoFactory.h" #include "GyotoFactoryMessenger.h" #include "GyotoUtils.h" #include #include #include #include #include "GyotoMetric.h" #include "GyotoAstrobj.h" #include "GyotoSpectrum.h" #include "GyotoSpectrometer.h" #include #include #include #include #include #include #include using namespace Gyoto; using namespace xercesc; using namespace std; // max length should be at least 26: " -0.1234567890123456E+123 \0" #define dvalLength 30 #define dfmt " %.16g " // support DBL_MIN, DBL_MAX, and put right format #define d2txt(txt, val) \ if (val== DBL_MAX) strcpy(txt, "DBL_MAX"); \ else if (val==-DBL_MAX) strcpy(txt, "-DBL_MAX"); \ else if (val== DBL_MIN) strcpy(txt, "DBL_MIN"); \ else if (val==-DBL_MIN) strcpy(txt, "-DBL_MIN"); \ else sprintf( txt , dfmt, val) #define ifmt " %li " #define i2txt(txt, val) sprintf( txt, ifmt, val); class XStr { public : // ----------------------------------------------------------------------- // Constructors and Destructor // ----------------------------------------------------------------------- XStr(const char* const toTranscode) : fASCIIForm(NULL) { // Call the private transcoding method fUnicodeForm = XMLString::transcode(toTranscode); } XStr(const XMLCh* const toTranscode) : fUnicodeForm(NULL) { // Call the private transcoding method fASCIIForm = XMLString::transcode(toTranscode); } ~XStr() { if (fUnicodeForm) XMLString::release(&fUnicodeForm); if (fASCIIForm) XMLString::release(&fASCIIForm); } // ----------------------------------------------------------------------- // Getter methods // ----------------------------------------------------------------------- const XMLCh* getXForm() const { return fUnicodeForm; } const char* getCForm() const { return fASCIIForm; } private : // ----------------------------------------------------------------------- // Private data members // // fUnicodeForm // This is the Unicode XMLCh format of the string. // ----------------------------------------------------------------------- XMLCh* fUnicodeForm; char* fASCIIForm; }; #define X(str) XStr(str).getXForm() string Cs (const XMLCh* str) { XStr bidule (str); string truc(bidule.getCForm()); return truc;} //#define C(str) string(XStr(str).getCForm()).c_str() #define C(str) Cs(str).c_str() ///// First setup the reporter class. It doesn't need to be in the API. namespace Gyoto { class DOMErrorReporter; } class Gyoto::DOMErrorReporter : public ErrorHandler { public: // ----------------------------------------------------------------------- // Constructors and Destructor // ----------------------------------------------------------------------- DOMErrorReporter() : fSawErrors(false) { } ~DOMErrorReporter() { } // ----------------------------------------------------------------------- // Implementation of the error handler interface // ----------------------------------------------------------------------- void warning(const SAXParseException& toCatch); void error(const SAXParseException& toCatch); void fatalError(const SAXParseException& toCatch); void resetErrors(); // ----------------------------------------------------------------------- // Getter methods // ----------------------------------------------------------------------- bool getSawErrors() const; // ----------------------------------------------------------------------- // Private data members // // fSawErrors // This is set if we get any errors, and is queryable via a getter // method. Its used by the main code to suppress output if there are // errors. // ----------------------------------------------------------------------- bool fSawErrors; }; void DOMErrorReporter::warning(const SAXParseException&) { //y_print(); } void DOMErrorReporter::error(const SAXParseException& toCatch) { fSawErrors = true; throwError(C(toCatch.getMessage())); } void DOMErrorReporter::fatalError(const SAXParseException& toCatch) { fSawErrors = true; throwError(C(toCatch.getMessage())); } void DOMErrorReporter::resetErrors() { fSawErrors = false; } //// Now for the public API Factory::Factory(char * data) : reporter_(NULL), gg_el_(NULL), obj_el_(NULL), ph_el_(NULL), scenery_(NULL), gg_(NULL), screen_(NULL), obj_(NULL), photon_(NULL), spectro_(NULL), filename_("") { // Initialize Xerces XML parser XMLPlatformUtils::Initialize(); parser_ = new XercesDOMParser(); parser_->setValidationScheme(XercesDOMParser::Val_Never); parser_->setDoNamespaces(true); // optional DOMErrorReporter *errReporter = new DOMErrorReporter(); reporter_=errReporter; parser_->setErrorHandler(errReporter); // Parse file // If data start with "parse(data); } else { filename_="Gyoto XML data (in memory)"; xercesc::MemBufInputSource xml_buf(reinterpret_cast(data), len, filename_.c_str()); parser_->parse(xml_buf); } doc_ = parser_ -> getDocument(); root_ = doc_ -> getDocumentElement(); if (!root_ ) throw(Error( "empty XML document" )); resolver_=doc_->createNSResolver(root_); kind_=(C(root_->getTagName())); } Factory::~Factory() { // XMLString::release(&kind_); if (resolver_) delete resolver_; if (reporter_) delete reporter_; if (parser_) delete parser_; else if (doc_) delete doc_; // parser_ takes care of doc_ // if (impl_) delete impl_; // Terminate takes care of that one XMLPlatformUtils::Terminate(); gg_=NULL; obj_=NULL; scenery_=NULL; photon_=NULL; spectro_=NULL; } void Factory::setReporter(ErrorHandler* eh) { reporter_=eh; parser_->setErrorHandler(eh); } DOMElement * Factory::getRoot() { return root_; } DOMDocument * Factory::getDoc() { return doc_; } SmartPointer Factory::metric() { if (!gg_) { DOMElement *MetricDOM; if (kind_.compare("Metric")){ DOMXPathResult* result; result=doc_->evaluate( X(("/"+kind_+"/Metric").c_str()), root_, resolver_, DOMXPathResult::ORDERED_NODE_SNAPSHOT_TYPE, NULL); if (!result->getSnapshotLength()) throwError("No Metric found"); MetricDOM = static_cast< xercesc::DOMElement* >(result -> getNodeValue()); delete result; } else MetricDOM = root_; vector Plugin = Gyoto::split(C(MetricDOM->getAttribute(X("plugin"))), ","); string Kind = C(MetricDOM->getAttribute(X("kind"))); FactoryMessenger fm(this, MetricDOM); gg_= (*Metric::getSubcontractor(Kind, Plugin))(&fm, Plugin); } return gg_; } SmartPointer Factory::astrobj(){ if (!obj_) { DOMXPathResult* result; DOMElement *tmpEl; if (kind_=="Astrobj") { obj_el_ = tmpEl = root_; } else { result=doc_->evaluate( X(("/"+kind_+"/Astrobj").c_str()), root_, resolver_, DOMXPathResult::ORDERED_NODE_SNAPSHOT_TYPE, NULL); if (!result->getSnapshotLength()) throwError("GYOTO error: an Astrobj MUST be specified"); tmpEl = static_cast< xercesc::DOMElement* >(result -> getNodeValue()); delete result; } vector Plugin = split(C(tmpEl->getAttribute(X("plugin"))), ","); string AstrobjKind = Cs(tmpEl->getAttribute(X("kind"))); GYOTO_DEBUG_EXPR(AstrobjKind); FactoryMessenger fm(this, tmpEl); obj_ = (*Astrobj::getSubcontractor(AstrobjKind, Plugin))(&fm, Plugin); } return obj_; } SmartPointer Factory::getPhoton(){ if (!photon_) { DOMXPathResult* result; DOMElement *tmpEl; if (kind_=="Photon") { ph_el_ = tmpEl = root_; } else { result=doc_->evaluate( X(("/"+kind_+"/Photon").c_str()), root_, resolver_, DOMXPathResult::ORDERED_NODE_SNAPSHOT_TYPE, NULL); if (!result->getSnapshotLength()) throwError("GYOTO error: an Photon MUST be specified"); tmpEl = static_cast< xercesc::DOMElement* >(result -> getNodeValue()); delete result; } FactoryMessenger fm(this, tmpEl); photon_ = Photon::Subcontractor(&fm); } return photon_; } SmartPointer Factory::spectrum(){ DOMXPathResult* result; DOMElement *tmpEl; if (kind_=="Spectrum") { tmpEl = root_; } else { result=doc_->evaluate( X(("/"+kind_+"/Spectrum").c_str()), root_, resolver_, DOMXPathResult::ORDERED_NODE_SNAPSHOT_TYPE, NULL); if (!result->getSnapshotLength()) throwError("GYOTO error: an Spectrum MUST be specified"); tmpEl = static_cast< xercesc::DOMElement* >(result -> getNodeValue()); delete result; } vector Plugin = split(C(tmpEl->getAttribute(X("plugin"))), ","); string Kind = Cs(tmpEl->getAttribute(X("kind"))); GYOTO_DEBUG_EXPR(Kind); FactoryMessenger fm(this, tmpEl); return (*Spectrum::getSubcontractor(Kind, Plugin))(&fm, Plugin); } SmartPointer Factory::spectrometer(){ DOMXPathResult* result; DOMElement *tmpEl; if (kind_=="Spectrometer") { tmpEl = root_; } else { result=doc_->evaluate( X(("/"+kind_+"/Spectrometer").c_str()), root_, resolver_, DOMXPathResult::ORDERED_NODE_SNAPSHOT_TYPE, NULL); if (!result->getSnapshotLength()) throwError("GYOTO error: an Spectrometer MUST be specified"); tmpEl = static_cast< xercesc::DOMElement* >(result -> getNodeValue()); delete result; } vector Plugin = split(C(tmpEl->getAttribute(X("plugin"))), ","); string Kind = Cs(tmpEl->getAttribute(X("kind"))); GYOTO_DEBUG_EXPR(Kind); FactoryMessenger fm(this, tmpEl); return (*Spectrometer::getSubcontractor(Kind, Plugin))(&fm, Plugin); } /// Scenery SmartPointer Factory::getScenery () { if (!scenery_) { DOMXPathResult* result; DOMElement *tmpEl; result=doc_->evaluate( X("/Scenery"), root_, resolver_, DOMXPathResult::ORDERED_NODE_SNAPSHOT_TYPE, NULL); tmpEl = static_cast< xercesc::DOMElement* >(result -> getNodeValue()); FactoryMessenger fm(this, tmpEl); scenery_ = Scenery::Subcontractor(&fm); delete result; } return scenery_; } SmartPointer Factory::screen(){ if (!screen_) { DOMXPathResult* result; DOMElement *ScreenDOM; result=doc_->evaluate( X(("/"+kind_+"/Screen").c_str()), root_, resolver_, DOMXPathResult::ORDERED_NODE_SNAPSHOT_TYPE, NULL); if (!result->getSnapshotLength()) throwError("No Screen found"); ScreenDOM = static_cast< xercesc::DOMElement* >(result -> getNodeValue()); FactoryMessenger fm ( this, ScreenDOM ); screen_ = Screen::Subcontractor(&fm); delete result; } return screen_; } const string Factory::kind() { return kind_ ; } Factory::Factory(SmartPointer sc) : reporter_(NULL), parser_(NULL), resolver_(NULL), gg_el_(NULL), obj_el_(NULL), ph_el_(NULL), scenery_(sc), gg_(sc->metric()), screen_(sc->screen()), obj_(sc->astrobj()), photon_(NULL), spectro_(NULL), filename_("") { GYOTO_DEBUG << "Initializing XML stuff" << endl; XMLPlatformUtils::Initialize(); impl_ = DOMImplementationRegistry::getDOMImplementation(X("Core")); if (!impl_) throwError("Problem initializing DOMImplementation"); doc_ = impl_->createDocument( 0, // root element namespace URI. X("Scenery"), // root element name 0); // document type object (DTD). root_ = doc_->getDocumentElement(); GYOTO_DEBUG << "Creating FactoryMessenger" << endl; FactoryMessenger fm(this, root_); GYOTO_DEBUG << "scenery_ -> fillElement(&fm);" << endl; scenery_ -> fillElement(&fm); } Factory::Factory(SmartPointer scr) : reporter_(NULL), parser_(NULL), resolver_(NULL), gg_el_(NULL), obj_el_(NULL), ph_el_(NULL), scenery_(NULL), gg_(scr->metric()), screen_(scr), obj_(), photon_(NULL), spectro_(NULL), filename_("") { XMLPlatformUtils::Initialize(); impl_ = DOMImplementationRegistry::getDOMImplementation(X("Core")); if (!impl_) throwError("Problem initializing DOMImplementation"); doc_ = impl_->createDocument( 0, // root element namespace URI. X("Screen"), // root element name 0); // document type object (DTD). root_ = doc_->getDocumentElement(); FactoryMessenger fm(this, root_); screen_ -> fillElement(&fm); } Factory::Factory(SmartPointer gg) : reporter_(NULL), parser_(NULL), resolver_(NULL), gg_el_(NULL), obj_el_(NULL), ph_el_(NULL), scenery_(NULL), gg_(gg), screen_(NULL), obj_(NULL), photon_(NULL), spectro_(NULL), filename_("") { XMLPlatformUtils::Initialize(); impl_ = DOMImplementationRegistry::getDOMImplementation(X("Core")); if (!impl_) throwError("Problem initializing DOMImplementation"); doc_ = impl_->createDocument( 0, // root element namespace URI. X("Metric"), // root element name 0); // document type object (DTD). gg_el_ = root_ = doc_->getDocumentElement(); FactoryMessenger fm(this, gg_el_); gg -> fillElement(&fm); } Factory::Factory(SmartPointer ao) : reporter_(NULL), parser_(NULL), resolver_(NULL), gg_el_(NULL), scenery_(NULL), gg_(NULL), obj_(ao), photon_(NULL), spectro_(NULL), filename_("") { XMLPlatformUtils::Initialize(); impl_ = DOMImplementationRegistry::getDOMImplementation(X("Core")); if (!impl_) throwError("Problem initializing DOMImplementation"); doc_ = impl_->createDocument( 0, // root element namespace URI. X("Astrobj"), // root element name 0); // document type object (DTD). obj_el_ = root_ = doc_->getDocumentElement(); FactoryMessenger fm(this, obj_el_); ao -> fillElement(&fm); } Factory::Factory(SmartPointer sp) : reporter_(NULL), parser_(NULL), resolver_(NULL), gg_el_(NULL), scenery_(NULL), gg_(NULL), obj_(NULL), photon_(NULL), spectro_(NULL), filename_("") { XMLPlatformUtils::Initialize(); impl_ = DOMImplementationRegistry::getDOMImplementation(X("Core")); if (!impl_) throwError("Problem initializing DOMImplementation"); doc_ = impl_->createDocument( 0, // root element namespace URI. X("Spectrum"), // root element name 0); // document type object (DTD). obj_el_ = root_ = doc_->getDocumentElement(); FactoryMessenger fm(this, obj_el_); sp -> fillElement(&fm); } Factory::Factory(SmartPointer ph) : reporter_(NULL), parser_(NULL), resolver_(NULL), gg_el_(NULL), obj_el_(NULL), ph_el_(NULL), scenery_(NULL), gg_(ph->metric()), obj_(ph->astrobj()), photon_(ph), spectro_(NULL), filename_("") { XMLPlatformUtils::Initialize(); impl_ = DOMImplementationRegistry::getDOMImplementation(X("Core")); if (!impl_) throwError("Problem initializing DOMImplementation"); doc_ = impl_->createDocument( 0, // root element namespace URI. X("Photon"), // root element name 0); // document type object (DTD). ph_el_ = root_ = doc_->getDocumentElement(); FactoryMessenger fm(this, root_); photon_ -> fillElement(&fm); } Factory::Factory(SmartPointer sp) : reporter_(NULL), parser_(NULL), resolver_(NULL), gg_el_(NULL), obj_el_(NULL), ph_el_(NULL), scenery_(NULL), gg_(NULL), obj_(NULL), photon_(NULL), spectro_(sp), filename_("") { XMLPlatformUtils::Initialize(); impl_ = DOMImplementationRegistry::getDOMImplementation(X("Core")); if (!impl_) throwError("Problem initializing DOMImplementation"); doc_ = impl_->createDocument( 0, // root element namespace URI. X("Spectrometer"), // root element name 0); // document type object (DTD). root_ = doc_->getDocumentElement(); FactoryMessenger fm(this, root_); spectro_ -> fillElement(&fm); } void Factory::metric(SmartPointer gg, DOMElement *el) { if (!gg && !gg_) return; if (gg_ && gg && gg!= gg_) throwError("Inconsistent use of Metrics"); if (gg && !gg_el_) { gg_ = gg; gg_el_ = doc_->createElement(X("Metric")); el->appendChild(gg_el_); FactoryMessenger fm(this, gg_el_); gg -> fillElement(&fm); } } void Factory::astrobj(SmartPointer ao, DOMElement *el) { GYOTO_DEBUG << endl; if (!ao && !obj_) return; if (obj_ && ao && ao!= obj_) throwError("Inconsistent use of Astrobjs"); if (ao && !obj_el_) { GYOTO_DEBUG <<"obj_ = ao;" << endl; obj_ = ao; GYOTO_DEBUG <<"XML stuff" << endl; obj_el_ = doc_->createElement(X("Astrobj")); el->appendChild(obj_el_); GYOTO_DEBUG <<"XML stuffnew FactoryMessenger" << endl; FactoryMessenger fm(this, obj_el_); GYOTO_DEBUG <<"ao -> fillElement(&fm);" << endl; ao -> fillElement(&fm); } } void Factory::screen(SmartPointer scr, DOMElement *el) { if (!scr && !screen_) return; if (screen_ && scr && scr!= screen_) throwError("Inconsistent use of Screens"); screen_ = scr; DOMElement * scr_el = doc_->createElement(X("Screen")); el->appendChild(scr_el); FactoryMessenger fm(this, scr_el); scr -> fillElement(&fm); } void Factory::write(const char* const goutputfile) { filename_ = goutputfile; // write file DOMLSSerializer *theSerializer = (static_cast(impl_))->createLSSerializer(); DOMConfiguration *serializerConfig = theSerializer->getDomConfig(); DOMLSOutput *theOutputDesc = (static_cast(impl_))->createLSOutput(); XMLFormatTarget *myFormTarget; if (serializerConfig->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint,true)) serializerConfig->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true); if (goutputfile) myFormTarget=new LocalFileFormatTarget(goutputfile); else myFormTarget=new StdOutFormatTarget(); theOutputDesc->setByteStream(myFormTarget); theSerializer->write(doc_, theOutputDesc); delete myFormTarget; theOutputDesc->release(); theSerializer->release(); } string Factory::format() { // write file DOMLSSerializer *theSerializer = (static_cast(impl_))->createLSSerializer(); DOMConfiguration *serializerConfig = theSerializer->getDomConfig(); DOMLSOutput *theOutputDesc = (static_cast(impl_))->createLSOutput(); MemBufFormatTarget *myFormTarget = new MemBufFormatTarget(); if (serializerConfig->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint,true)) serializerConfig->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true); theOutputDesc->setByteStream(myFormTarget); theSerializer->write(doc_, theOutputDesc); string res=(const char*) myFormTarget->getRawBuffer(); delete myFormTarget; theOutputDesc->release(); theSerializer->release(); return res; } void Factory::setParameter(std::string name, DOMElement *pel) { DOMElement* el = doc_->createElement(X(name.c_str())); pel -> appendChild(el); } void Factory::setParameter(std::string name, double value, DOMElement *pel) { DOMElement* el = doc_->createElement(X(name.c_str())); pel -> appendChild(el); char val_string[dvalLength]; d2txt(val_string,value); el->appendChild(doc_->createTextNode(X(val_string))); } void Factory::setParameter(std::string name, int value, DOMElement *pel) { DOMElement* el = doc_->createElement(X(name.c_str())); pel -> appendChild(el); char val_string[dvalLength]; sprintf( val_string, " %i ", value); el->appendChild(doc_->createTextNode(X(val_string))); } void Factory::setParameter(std::string name, unsigned int value, DOMElement *pel) { DOMElement* el = doc_->createElement(X(name.c_str())); pel -> appendChild(el); char val_string[dvalLength]; sprintf( val_string, " %u ", value); el->appendChild(doc_->createTextNode(X(val_string))); } void Factory::setParameter(std::string name, long value, DOMElement *pel) { DOMElement* el = doc_->createElement(X(name.c_str())); pel -> appendChild(el); char val_string[dvalLength]; sprintf( val_string, " %li ", value); el->appendChild(doc_->createTextNode(X(val_string))); } void Factory::setParameter(std::string name, unsigned long int value, DOMElement *pel) { DOMElement* el = doc_->createElement(X(name.c_str())); pel -> appendChild(el); char val_string[dvalLength]; sprintf( val_string, " %lu ", value); el->appendChild(doc_->createTextNode(X(val_string))); } void Factory::setParameter(std::string name, std::string val, DOMElement *pel) { DOMElement* el = doc_->createElement(X(name.c_str())); pel -> appendChild(el); el->appendChild(doc_->createTextNode(X(val.c_str()))); } void Factory::setParameter(std::string name, double val[], size_t n, DOMElement *pel, FactoryMessenger **child){ ostringstream ss; ss << setprecision(GYOTO_PREC) << setw(GYOTO_WIDTH) << val[0]; for (size_t i=1; icreateElement(X(name.c_str())); pel -> appendChild(el); el->appendChild( doc_->createTextNode(X(ss.str().c_str())) ); if (child) *child = new FactoryMessenger(this, el); } void Factory::setParameter(std::string name, std::vector const &val, DOMElement *pel, FactoryMessenger **child){ DOMElement* el = doc_->createElement(X(name.c_str())); pel -> appendChild(el); size_t n=val.size(); if (n) { ostringstream ss; ss << setprecision(GYOTO_PREC) << setw(GYOTO_WIDTH) << val[0]; for (size_t i=1; iappendChild( doc_->createTextNode(X(ss.str().c_str())) ); } if (child) *child = new FactoryMessenger(this, el); } void Factory::setParameter(std::string name, std::vector const &val, DOMElement *pel, FactoryMessenger **child){ DOMElement* el = doc_->createElement(X(name.c_str())); pel -> appendChild(el); size_t n=val.size(); if (n) { ostringstream ss; ss << val[0]; for (size_t i=1; iappendChild( doc_->createTextNode(X(ss.str().c_str())) ); } if (child) *child = new FactoryMessenger(this, el); } void Factory::setContent(std::string content, DOMElement *el) { el -> appendChild( doc_->createTextNode( X( content.c_str() ) ) ); } ///////// Factory Messenger Class /////////// FactoryMessenger::FactoryMessenger(Gyoto::Factory* emp, xercesc::DOMElement* el) : employer_(emp), element_(el), curNodeIndex_(0) { children_ = element_->getChildNodes(); nodeCount_ = children_->getLength(); } FactoryMessenger::FactoryMessenger(const FactoryMessenger& fm, std::string name) : employer_(fm.employer_), element_(NULL), curNodeIndex_(0) { element_ = employer_ -> doc_ -> createElement(X(name.c_str())); fm.element_ -> appendChild (element_) ; children_ = element_->getChildNodes(); nodeCount_ = children_->getLength(); } void FactoryMessenger::reset() { curNodeIndex_=0; } int FactoryMessenger::getNextParameter(std::string* namep, std::string* contp, std::string* unitp) { GYOTO_DEBUG << "namep=" << namep << ", contp=" << contp << ": " << "*namep=" << *namep << ", *contp=" << *contp << endl; if (curNodeIndex_ >= nodeCount_) return 0; DOMNode *currentNode = children_->item(curNodeIndex_++); if( currentNode->getNodeType() && // true is not NULL currentNode->getNodeType() == DOMNode::ELEMENT_NODE ) // is element { // Found node which is an Element. Re-cast node as element DOMElement *currentElement = static_cast< xercesc::DOMElement* >( currentNode ); *namep = C(currentElement->getTagName()); *contp = C(currentElement->getTextContent()); if (unitp) *unitp = C(currentElement->getAttribute(X("unit"))); return 1; } return getNextParameter(namep, contp, unitp); } FactoryMessenger* FactoryMessenger::makeChild(std::string name) { return new FactoryMessenger(*this, name); } void FactoryMessenger::setSelfAttribute(std::string attrname, std::string attrvalue) { element_->setAttribute(X(attrname.c_str()), X(attrvalue.c_str())); } void FactoryMessenger::setSelfAttribute(std::string attrname, unsigned long attrvalue) { char val_string[dvalLength]; sprintf( val_string, "%lu", attrvalue); element_->setAttribute(X(attrname.c_str()), X(val_string)); } void FactoryMessenger::setSelfAttribute(std::string attrname, unsigned int attrvalue) { setSelfAttribute(attrname, (unsigned long)(attrvalue)); } void FactoryMessenger::setSelfAttribute(std::string attrname, double attrvalue) { char val_string[dvalLength]; d2txt(val_string, attrvalue); element_->setAttribute(X(attrname.c_str()), X(val_string)); } string FactoryMessenger::getAttribute(std::string attrname) const { DOMNode *currentNode = children_->item(curNodeIndex_-1); DOMElement *currentElement = static_cast< xercesc::DOMElement* >( currentNode ); return Cs(currentElement->getAttribute(X(attrname.c_str()))); } string FactoryMessenger::getSelfAttribute(std::string attrname) const { return Cs(element_->getAttribute(X(attrname.c_str()))); } string FactoryMessenger::getFullContent() const { return Cs(element_->getTextContent()); } void FactoryMessenger::setFullContent(std::string content) { employer_ -> setContent (content, element_) ; } FactoryMessenger* FactoryMessenger::getChild() const { DOMNode *currentNode = children_->item(curNodeIndex_-1); DOMElement *currentElement = static_cast< xercesc::DOMElement* >( currentNode ); return new FactoryMessenger(employer_, currentElement); } void FactoryMessenger::astrobj(SmartPointer gg) { employer_ -> astrobj (gg, element_); } void FactoryMessenger::screen(SmartPointer gg) { employer_ -> screen (gg, element_); } void FactoryMessenger::metric(SmartPointer gg) { employer_ -> metric (gg, element_); } SmartPointer FactoryMessenger::metric() { return employer_ -> metric (); } SmartPointer FactoryMessenger::screen() { return employer_ -> screen (); } SmartPointer FactoryMessenger::getPhoton() { return employer_ -> getPhoton (); } SmartPointer FactoryMessenger::astrobj() { return employer_ -> astrobj (); } void FactoryMessenger::setParameter(std::string name){ employer_ -> setParameter(name, element_); } void FactoryMessenger::setParameter(std::string name, double value){ employer_ -> setParameter(name, value, element_); } void FactoryMessenger::setParameter(std::string name, int value){ employer_ -> setParameter(name, value, element_); } void FactoryMessenger::setParameter(std::string name, long value){ employer_ -> setParameter(name, value, element_); } void FactoryMessenger::setParameter(std::string name, unsigned int value){ employer_ -> setParameter(name, value, element_); } void FactoryMessenger::setParameter(std::string name, unsigned long value){ employer_ -> setParameter(name, value, element_); } void FactoryMessenger::setParameter(std::string name, std::string value){ employer_ -> setParameter(name, value, element_); } void FactoryMessenger::setParameter(std::string name, double val[], size_t n, FactoryMessenger **child){ employer_ -> setParameter(name, val, n, element_, child); } void FactoryMessenger::setParameter(std::string name, std::vector const &val, FactoryMessenger **child){ employer_ -> setParameter(name, val, element_, child); } void FactoryMessenger::setParameter(std::string name, std::vector const &val, FactoryMessenger **child){ employer_ -> setParameter(name, val, element_, child); } size_t FactoryMessenger::parseArray(std::string content, double val[], size_t max_tokens) { char const * const delim = " \t\n" ; char const * const c_content=content.c_str(); size_t len=strlen(c_content); if (len==0) return 0; size_t n=0; char * const tc = new char[len+1]; memcpy(tc, c_content, len+1); char * sub = strtok(tc, delim); while (sub && n FactoryMessenger::parseArray(std::string content) { std::vector result; char const * const delim = " \t\n" ; char const * const c_content=content.c_str(); size_t len=strlen(c_content); if (len==0) return result; char * const tc = new char[len+1]; memcpy(tc, c_content, len+1); char * sub = strtok(tc, delim); while (sub) { result.push_back(Gyoto::atof(sub)); sub = strtok(NULL, delim); } delete [] tc; return result; } std::vector FactoryMessenger::parseArrayULong(std::string content) { std::vector result; char const * const delim = " \t\n" ; char const * const c_content=content.c_str(); size_t len=strlen(c_content); if (len==0) return result; char * const tc = new char[len+1]; memcpy(tc, c_content, len+1); char * sub = strtok(tc, delim); while (sub) { result.push_back(atol(sub)); sub = strtok(NULL, delim); } delete [] tc; return result; } std::string FactoryMessenger::fullPath(std::string fname) { return employer_ -> fullPath(fname); } std::string Factory::fullPath(std::string fname) { GYOTO_DEBUG << endl; if (!fname.compare(0, 1, "/")) return fname; // fname is already absolute string fpath = ""; string xmlpath="", curwd=""; { // Make sure we call dirname and getcwd correctly and free memory. // We do this in a block to scope the temporary variables. char * xmlfile = strdup(filename_.c_str()); // why strdup? because xmlpath = dirname(xmlfile); // dirname may modify xmlfile. free (xmlfile); xmlfile = NULL; char * cwd = getcwd(NULL, 0); curwd = cwd; free (cwd); cwd = NULL; } string prefix="`pwd`/"; if (fname.compare(0, prefix.size(), prefix)) { // fname does not start with "`pwd`/": // it is relative to xmlpath if (xmlpath.compare(0, 1, "/")) fpath = curwd + "/" ; fpath += xmlpath + "/"; fpath += fname; } else { // fname starts with "`pwd`/": relative to working directory fpath = curwd + "/"; fpath += fname.substr(prefix.size()); } GYOTO_DEBUG << "returns " << fpath << endl; return fpath; } #endif Gyoto-1.2.0/lib/FixedStar.C000066400000000000000000000117021302352257300153610ustar00rootroot00000000000000/* Copyright 2011 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include "GyotoPhoton.h" #include "GyotoFixedStar.h" #include "GyotoProperty.h" #include "GyotoFactoryMessenger.h" #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; GYOTO_PROPERTY_START(FixedStar, "Coordinate-spherical blob with fixed centre coordinates.") GYOTO_PROPERTY_VECTOR_DOUBLE(FixedStar, Position, position, "Space coordinates (3 components).") GYOTO_PROPERTY_BOOL(FixedStar, Rotating, NonRotating, rotating, "Is fluid at rest or in circular rotation in coordinate system.") GYOTO_PROPERTY_END(FixedStar, UniformSphere::properties) FixedStar::FixedStar() : UniformSphere("FixedStar"), rotating_(false) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif for (int i=0;i<3;++i) pos_[i]=0.; } FixedStar::FixedStar(SmartPointer gg, double StPsn[3], double rad) : UniformSphere("FixedStar", gg, rad), rotating_(false) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "(metric, pos, rad)" << endl; # endif for (int i=0;i<3;++i) pos_[i] = StPsn[i]; radius(rad); # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "done" << endl; # endif } FixedStar::FixedStar(const FixedStar& orig) : UniformSphere(orig), rotating_(orig.rotating_) { for (int i=0; i<3; ++i) pos_[i] = orig.pos_[i]; } FixedStar* FixedStar::clone() const { return new FixedStar(*this); } FixedStar::~FixedStar() { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif } void FixedStar::getCartesian(double const * const , size_t const n_dates, double * const x, double * const y, double * const z, double * const xprime, double * const yprime, double * const zprime) { double xs, ys, zs; switch (gg_->coordKind()) { case GYOTO_COORDKIND_CARTESIAN: xs= pos_[0]; ys= pos_[1]; zs= pos_[2]; break; case GYOTO_COORDKIND_SPHERICAL: { double rs=pos_[0]; double ths=pos_[1]; double phs=pos_[2]; double st, ct, sp, cp; sincos(ths, &st, &ct); sincos(phs, &sp, &cp); xs= rs*st*cp; ys= rs*st*sp; zs= rs*ct; } break; default: throwError("unsupported coordkind"); xs=ys=zs=0.; } for (size_t i=0; icircularVelocity(pos, vel); else { for (size_t i=0; i<4; ++i) vel[i]=0.; vel[0]=gg_->SysPrimeToTdot(pos, vel+1); } } void FixedStar::rotating(bool rot) {rotating_=rot;} bool FixedStar::rotating() const { return rotating_; } double const * FixedStar::getPos() const { return pos_; } void FixedStar::getPos(double dst[3]) const { for (int i=0; i<3;++i) dst[i]=pos_[i]; } void FixedStar::metric(SmartPointer gg) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif Generic::metric(gg); radius(radius_); } void FixedStar::radius(double r) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(r) ; # endif UniformSphere::radius(r); if (!gg_()) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "metric is not set yet" << endl; # endif return; } } double FixedStar::rMax() { if (rmax_==DBL_MAX) { switch (gg_ -> coordKind()) { case GYOTO_COORDKIND_SPHERICAL: rmax_=3.*(pos_[0]+radius_); break; case GYOTO_COORDKIND_CARTESIAN: rmax_=3.*(sqrt(pos_[0]*pos_[0]+pos_[1]*pos_[1]+pos_[2]*pos_[2])+radius_); break; default: throwError("unimplemented coordinate system in FixedStar"); } } return rmax_; } void FixedStar::setPos(const double p[3]) { for (int i=0; i<3; ++i) pos_[i]=p[i]; radius(radius_);} void FixedStar::position(std::vector const &v) { GYOTO_DEBUG_EXPR(v.size()); if (v.size() !=3) throwError("FixedStar position needs exactly 3 tokens"); for (int i=0; i<3; ++i) pos_[i]=v[i]; radius(radius_); } std::vector FixedStar::position() const { std::vector res(3, 0.); for (int i=0; i<3; ++i) res[i]=pos_[i]; return res; } Gyoto-1.2.0/lib/Functors.C000066400000000000000000000046741302352257300153050ustar00rootroot00000000000000/* Copyright 2012 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoFunctors.h" #include "GyotoError.h" #include #include #include #define dr_tol 1e-5 #define f_tol 1e-9 #define sign(a) (a>=0?1:-1) Gyoto::Functor::Double_constDoubleArray::~Double_constDoubleArray() {} Gyoto::Functor::Double_Double_const::~Double_Double_const() {} double Gyoto::Functor::Double_Double_const::ridders(double r1, double r2) const { // Ridders' root-finding method applied to operator() double val1 = operator()(r1); double val2 = operator()(r2); double r3, r4, val3, val4; do { r3 = 0.5*(r1+r2); val3 = operator()(r3); r4 = r3+(r3-r1) * sign(val1-val2)*val3/sqrt(val3*val3-val1*val2); val4 = operator()(r4); if (sign(val3)!=sign(val4)) { // use r3 and r4 for next iteration r1=r3; val1=val3; r2=r4; val2=val4; } else if (sign(val1) != sign(val4)) { // use r1 and r4 for next iteration r2=r4; val2=val4; } else { // use r4 and r2 for next iteration r1=r4; val1=val4; } } while (fabs(r1-r2) >= dr_tol && fabs(val4) > f_tol) ; return r4; } double Gyoto::Functor::Double_Double_const::secant(double r1, double r2) { // Secant root-finding method applied to operator() double val1 = operator()(r1); double val2 = operator()(r2); double r3, val3=DBL_MAX; unsigned int maxiter=20, iter; for (iter = 0; iter < maxiter; ++iter) { r3=r1-val1*(r2-r1)/(val2-val1); val3 = operator()(r3); if (fabs(r2-r3) <= fabs(r1-r3)) { r1=r3; val1=val3; } else { r2=r3; val2=val3; } if ( (fabs(r1-r2) < dr_tol) || (fabs(val3) < f_tol) ) break; if (val2==val1) { status=1; return r3; } } if (iter==maxiter) { status=2; return r3; } status=0; return r3; } Gyoto-1.2.0/lib/Hooks.C000066400000000000000000000051141302352257300145530ustar00rootroot00000000000000/* Copyright 2012 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoHooks.h" #include "GyotoDefs.h" #include "GyotoUtils.h" #include #include using namespace Gyoto; using namespace Gyoto::Hook; //////// LOCAL TO THIS FILE //////// /* LISTENER LIST */ class Gyoto::Hook::Teller::ListenerItem { friend class Gyoto::Hook::Teller; friend class Gyoto::Hook::Listener; protected: Listener * listener; ListenerItem * next; public: ListenerItem(Listener*, ListenerItem*); virtual ~ListenerItem(); virtual void tell(Gyoto::Hook::Teller *); size_t len() const; }; Teller::ListenerItem::ListenerItem(Listener*hear, ListenerItem * nxt) : listener(hear), next(nxt) {} Teller::ListenerItem::~ListenerItem() {if (next) delete next;} void Teller::ListenerItem::tell(Teller * teller) { GYOTO_DEBUG<tell(teller); if (next) next->tell(teller); } size_t Teller::ListenerItem::len() const { size_t l = 1; if (next) l += next->len(); return l; } ///////////////////////////////////// /* LISTENER */ Listener::Listener() {} Listener::~Listener() {} void Listener::tell(Teller *) {} /* TELLER */ Teller::Teller() : listeners_(0) {} Teller::Teller(const Teller &) : listeners_(0) {} Teller::~Teller() {if (listeners_) delete listeners_;} void Teller::hook(Listener * hear) { GYOTO_DEBUG <<"new hook: "<< hear <<" for Teller " << this << std::endl; listeners_ = new ListenerItem(hear, listeners_); } void Teller::unhook(Listener * hear) { GYOTO_DEBUG <<"removing hook: "<< hear <<" from Teller " << this << std::endl; ListenerItem * item = listeners_; ListenerItem ** parent = &listeners_; while (item) { if (item->listener==hear) { *parent=item->next; item->next=0; delete item; item=*parent; } else { parent=&(item->next); item=item->next; } } } void Teller::tellListeners() { if (listeners_) listeners_->tell(this); } Gyoto-1.2.0/lib/InflateStar.C000066400000000000000000000105751302352257300157130ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include "GyotoInflateStar.h" #include "GyotoPhoton.h" #include "GyotoPowerLawSpectrum.h" #include "GyotoBlackBodySpectrum.h" #include "GyotoFactoryMessenger.h" #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; /// Properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(InflateStar, "Star with inflation") GYOTO_PROPERTY_DOUBLE_UNIT(InflateStar, TimeInflateInit, timeInflateInit, "Start time of inflation (geometrical units)") GYOTO_PROPERTY_DOUBLE_UNIT(InflateStar, TimeInflateStop, timeInflateStop, "End time of inflation (geometrical units)") GYOTO_PROPERTY_DOUBLE_UNIT(InflateStar, RadiusStop, radiusStop, "End radius (geometrical units)") GYOTO_PROPERTY_END(InflateStar, Star::properties) GYOTO_PROPERTY_ACCESSORS(InflateStar, double, timeinflateinit_, timeInflateInit) double InflateStar::timeInflateInit(const string &unit) const { return Units::FromGeometricalTime(timeInflateInit(), unit, gg_); } void InflateStar::timeInflateInit(double t, const string &unit) { timeInflateInit(Units::ToGeometricalTime(t, unit, gg_)); } GYOTO_PROPERTY_ACCESSORS(InflateStar, double, timeinflatestop_, timeInflateStop) double InflateStar::timeInflateStop(const string &unit) const { return Units::FromGeometricalTime(timeInflateStop(), unit, gg_); } void InflateStar::timeInflateStop(double t, const string &unit) { timeInflateStop(Units::ToGeometricalTime(t, unit, gg_)); } GYOTO_PROPERTY_ACCESSORS_GEOMETRICAL(InflateStar, radiusstop_, radiusStop, gg_) double InflateStar::radiusAt(double time) const { double radinit = radius(); double radcur=radinit; if (time>=timeinflatestop_) radcur=radiusstop_; else if (time>timeinflateinit_){ // linear increase of radius in between extreme times radcur = radinit+(time-timeinflateinit_)/(timeinflatestop_-timeinflateinit_) *(radiusstop_-radinit); } return radcur; } double InflateStar::radiusAt(double time, const string &t_unit) const { return radiusAt(Units::ToGeometricalTime(time, t_unit, gg_)); } double InflateStar::radiusAt(double time, const string &t_unit, const string &r_unit) const { return Units::FromGeometrical(radiusAt(time, t_unit), r_unit, gg_); } InflateStar::InflateStar() : Star(), timeinflateinit_(0.), timeinflatestop_(0.), radiusstop_(DBL_MAX) { kind_="InflateStar"; # ifdef GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "done." << endl; # endif } InflateStar::InflateStar(const InflateStar& orig) : Star(orig), timeinflateinit_(orig.timeinflateinit_), timeinflatestop_(orig.timeinflatestop_), radiusstop_(orig.radiusstop_) { } InflateStar* InflateStar::clone() const { return new InflateStar(*this); } InflateStar::~InflateStar() { if (debug()) cerr << "DEBUG: InflateStar::~InflateStar()\n"; } string InflateStar::className() const { return string("InflateStar"); } string InflateStar::className_l() const { return string("inflate_star"); } int InflateStar::Impact(Gyoto::Photon* ph, size_t index, Astrobj::Properties *data) { double p1[8]; ph->getCoord(index, p1); double time = p1[0]; double radinit = radius(); double radcur=radiusAt(time); critical_value_=radcur*radcur; return UniformSphere::Impact(ph,index,data); } double InflateStar::emission(double nu_em, double dsem, double coord_ph[8], double coord_obj[8]) const { double time = coord_ph[0]; double radinit = radius(); double radcur=radiusAt(time); double volume=radcur*radcur*radcur; double volumei=radinit*radinit*radinit; return volumei/volume * UniformSphere::emission(nu_em, dsem, coord_ph, coord_obj); } Gyoto-1.2.0/lib/KerrBL.C000066400000000000000000001103531302352257300146130ustar00rootroot00000000000000/* Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoKerrBL.h" #include "GyotoWorldline.h" #include "GyotoError.h" #include "GyotoProperty.h" #include #include #include #include #include #include #include using namespace std ; using namespace Gyoto ; using namespace Gyoto::Metric ; GYOTO_PROPERTY_START(KerrBL, "Metric around a rotating black-hole, in spherical Boyer-Lindquist coordinates.") GYOTO_PROPERTY_DOUBLE(KerrBL, Spin, spin, "Spin parameter (adimensioned, 0).") GYOTO_PROPERTY_DOUBLE(KerrBL, HorizonSecurity, horizonSecurity, "Thickness of sink layer around horizon (geometrical units, 0.01).") GYOTO_PROPERTY_BOOL(KerrBL, GenericIntegrator, SpecificIntegrator, genericIntegrator, "Which version of the Legacy integrator should be used (specific).") GYOTO_PROPERTY_DOUBLE(KerrBL, DiffTol, difftol, "Tuning parameter for the specific Legacy integrator (0.01).") GYOTO_PROPERTY_END(KerrBL, Generic::properties) /* NB: points delicats de KerrBL: - z-axis problems (d'ou interet de KS? a creuser) - probleme pres de l'horizon (d'ou interet de KS? a creuser) - changement de thetadot dans CheckCons (mais: test dans RK4ada pour eviter de "trop" changer) - changement de rdot dans Normalize4v (mais: test dans RK4ada pour eviter de "trop" changer) */ /* Comment on z-axis problem: z-axis pb is never launched by the condition theta 50 && zaxis)....) which should never be read : the integration is stopped brutally if it's read. A message is printed on the screen and the case must be investigated. The parameter 50 (=countbis_max) can also be changed (put higher) in order to try to avoid the manu militari stop. [*] see also the same .C just changing delta to pi/4N. With same value of i. */ //#define GYOTO_MIN_THETA 1e-5 //seems too big #define GYOTO_MIN_THETA 1e-10 KerrBL::KerrBL() : Generic(GYOTO_COORDKIND_SPHERICAL, "KerrBL"), spin_(0.), a2_(0.), a3_(0.), a4_(0.), difftol_(GYOTO_KERRBL_DEFAULT_DIFFTOL), rsink_(2.+GYOTO_KERR_HORIZON_SECURITY), drhor_(GYOTO_KERR_HORIZON_SECURITY), generic_integrator_(false) {} // default copy constructor should be fine KerrBL * KerrBL::clone () const { return new KerrBL(*this); } // Mutators void KerrBL::spin(const double a) { spin_=a; a2_=spin_*spin_; a3_=a2_*spin_; a4_=a2_*a2_; rsink_=1.+sqrt(1.-a2_)+drhor_; tellListeners(); } // Accessors double KerrBL::spin() const { return spin_ ; } double KerrBL::difftol() const { return difftol_;} void KerrBL::difftol(double t) {difftol_=t;} void KerrBL::horizonSecurity(const double drhor) { drhor_=drhor; rsink_=1.+sqrt(1.-a2_)+drhor_; tellListeners(); } double KerrBL::horizonSecurity() const {return drhor_; } void KerrBL::genericIntegrator(bool t) { generic_integrator_=t; tellListeners(); } bool KerrBL::genericIntegrator() const {return generic_integrator_;} int KerrBL::isStopCondition(double const * const coord) const { return coord[1] < rsink_ ; } //Prograde marginally stable orbit double KerrBL::getRms() const { double aa=spin_; double z1 = 1. + pow((1. - a2_),1./3.)*(pow((1. + aa),1./3.) + pow((1. - aa),1./3.)); double z2 = pow(3.*a2_ + z1*z1,1./2.); return (3. + z2 - pow((3. - z1)*(3. + z1 + 2.*z2),1./2.)); } //Prograde marginally bound orbit double KerrBL::getRmb() const { return 2.-spin_+2.*sqrt(1.-spin_); } double KerrBL::getSpecificAngularMomentum(double rr) const { // this is l = -u_phi/u_t for a circular equatorial 4-velocity double aa=spin_, sqrtr=sqrt(rr); return (rr*rr-2.*aa*sqrtr+aa*aa)/(pow(rr,1.5)-2.*sqrtr+aa); } double KerrBL::getPotential(double const pos[4], double l_cst) const { // this is W = -ln(|u_t|) for a circular equatorial 4-velocity double gtt = gmunu(pos,0,0); double gtp = gmunu(pos,0,3); double gpp = gmunu(pos,3,3); double Omega = -(gtp + l_cst * gtt)/(gpp + l_cst * gtp) ; double W = 0.5 * log(abs(gtt + 2. * Omega * gtp + Omega*Omega * gpp)) - log(abs(gtt + Omega * gtp)) ; return W ; } //Computation of metric coefficients in covariant form void KerrBL::gmunu(double g[4][4], const double * pos) const { double r = pos[1]; double sth2, cth2; sincos(pos[2], &sth2, &cth2); sth2*=sth2; cth2*=cth2; double r2=r*r; double sigma=r2+a2_*cth2; double delta=r2-2.*r+a2_; int mu, nu; for (mu=0; mu<4; ++mu) for (nu=0; nu<4; ++nu) g[mu][nu]=0.; g[0][0] = -1.+2.*r/sigma; g[1][1] = sigma/delta; g[2][2] = sigma; g[3][3] = (r2+a2_+2.*r*a2_*sth2/sigma)*sth2; g[0][3] = g[3][0] = -2*spin_*r*sth2/sigma; } double KerrBL::gmunu(const double * pos, int mu, int nu) const { double r = pos[1]; double sth2, cth2; sincos(pos[2], &sth2, &cth2); sth2*=sth2; cth2*=cth2; double r2=r*r; double sigma=r2+a2_*cth2; double delta=r2-2.*r+a2_; if ((mu==0) && (nu==0)) return -(1.-2.*r/sigma); if ((mu==1) && (nu==1)) return sigma/delta; if ((mu==2) && (nu==2)) return sigma; if ((mu==3) && (nu==3)) return (r2+a2_+2.*r*a2_*sth2/sigma)*sth2; if (((mu==0) && (nu==3)) || ((mu==3) && (nu==0))){ return -2*spin_*r*sth2/sigma; } return 0.; } //Computation of metric coefficients in contravariant form void KerrBL::gmunu_up(double gup[4][4], const double * pos) const { double r = pos[1]; double sth2, cth2; sincos(pos[2], &sth2, &cth2); sth2*=sth2; cth2*=cth2; double r2=r*r; double sigma=r2+a2_*cth2; double delta=r2-2.*r+a2_; double xi=(r2+a2_)*(r2+a2_)-a2_*delta*sth2; int mu, nu; for (mu=0; mu<4; ++mu) for (nu=0; nu<4; ++nu) gup[mu][nu]=0.; gup[0][0]=-xi/(delta*sigma); gup[1][1]=delta/sigma; gup[2][2]=1./sigma; gup[3][3]=(delta-a2_*sth2)/(sigma*delta*sth2); gup[0][3] = gup[3][0] = -2*spin_*r/(sigma*delta); } double KerrBL::gmunu_up(const double * pos, int mu, int nu) const { double r = pos[1]; double sth2, cth2; sincos(pos[2], &sth2, &cth2); sth2*=sth2; cth2*=cth2; double r2=r*r; double sigma=r2+a2_*cth2; double delta=r2-2.*r+a2_; double xi=(r2+a2_)*(r2+a2_)-a2_*delta*sth2; if ((mu==0) && (nu==0)) { return -xi/(delta*sigma); } if ((mu==1) && (nu==1)) return delta/sigma; if ((mu==2) && (nu==2)) return 1./sigma; if ((mu==3) && (nu==3)) { return (delta-a2_*sth2)/(sigma*delta*sth2); } if (((mu==0) && (nu==3)) || ((mu==3) && (nu==0))){ return -2*spin_*r/(sigma*delta); } return 0.; } int KerrBL::christoffel(double dst[4][4][4], double const pos[4]) const { int a, mu, nu; for (a=0; a<4; ++a) for(mu=0; mu<4; ++mu) for(nu=0; nu<4; ++nu) dst[a][mu][nu]=0.; double r = pos[1]; double sth, cth; sincos(pos[2], &sth, &cth); double sth2 = sth*sth, cth2 = cth*cth, sth4=sth2*sth2, s2th = 2.*sth*cth, c2th=cth2-sth2, s4th = 2.*s2th*c2th, s2th2= s2th*s2th, ctgth=cth/sth; double r2=r*r, r4=r2*r2, r6=r4*r2; double Sigma=r2+a2_*cth2, Sigma2=Sigma*Sigma; double Delta=r2-2.*r+a2_; double Deltam1=1./Delta, Sigmam1=1./Sigma, Sigmam2=Sigmam1*Sigmam1, Sigmam3=Sigmam2*Sigmam1, a2cthsth=a2_*cth*sth, rSigmam1=r*Sigmam1, Deltam1Sigmam2=Deltam1*Sigmam2; double term1=(a2_+2.*r2+a2_*c2th), term1m1=1./term1; dst[1][1][1]=(1.-r)*Deltam1+rSigmam1; dst[1][2][1]=dst[1][1][2]=-a2cthsth*Sigmam1; dst[1][2][2]=-Delta*rSigmam1; dst[1][3][3]=-Delta*sth2*(r+(a2_*(-2.*r2+Sigma)*sth2)/Sigma2)/Sigma; dst[1][3][0]=dst[1][0][3]=spin_*Delta*(-2*r2+Sigma)*sth2*Sigmam3; dst[1][0][0]=-Delta*(-2.*r2+Sigma)*Sigmam3; dst[2][1][1]=a2cthsth/(Delta*(r2+a2_*cth2)); dst[2][2][1]=dst[2][1][2]=rSigmam1; dst[2][2][2]=-a2cthsth*Sigmam1; dst[2][3][3]= -((a2_+r2)*Sigma2+4.*a2_*r*Sigma*sth2+2.*a4_*r*sth4)*s2th*0.5*Sigmam3; dst[2][0][3]=dst[2][3][0]=spin_*r*(Sigma+a2_*sth2)*s2th*Sigmam3; dst[2][0][0]=-2.*a2cthsth*r*Sigmam3; dst[3][3][1]=dst[3][1][3]= (2.*r*Sigma*((-2.+r)*r+a2_*cth2)+2.*a2_*(-2.*r2+Sigma)*sth2) *Deltam1*Sigmam1*term1m1; dst[3][3][2]=dst[3][2][3]= (2.*(a2_+r2)*Sigma2*(term1-4.*r)*ctgth+ a2_*r*s2th*(8.*(-1.+r)*r*Sigma+a2_*(8.*Sigma*cth2+4.*r2*sth2+a2_*s2th2))) *0.5*Deltam1Sigmam2*term1m1; dst[3][0][1]=dst[3][1][0]=spin_*(2.*r2-Sigma)*Deltam1Sigmam2; dst[3][0][2]=dst[3][2][0]= -4.*spin_*r*(a2_+(-2.+r)*r)*ctgth*Deltam1*Sigmam1*term1m1; dst[0][3][1]=dst[0][1][3]= (spin_*(-4.*r6+2.*r4*Sigma-4.*r2*Sigma2+a4_*(-2.*r2+Sigma)+ 3.*a2_*r2*(-2.*r2+Sigma)-a2_*(a2_+r2)*(2.*r2-Sigma)*c2th)*sth2) *Deltam1Sigmam2*term1m1; dst[0][3][2]=dst[0][2][3]= (spin_*r*(2.*(a4_+2.*r*(2.+r)*Sigma+a2_*(r2+2*Sigma)- (4.*(a2_+r2)*Sigma*(2.*r+Sigma))*term1m1 )*s2th-a2_*(a2_+r2)*s4th)) *0.25*Deltam1Sigmam2; dst[0][0][1]=dst[0][1][0]=(a2_+r2)*(2.*r2-Sigma)*Deltam1Sigmam2; dst[0][0][2]=dst[0][2][0]= (a2_*r*(-a2_+r*(-r+(4.*Sigma)*term1m1))*s2th)*Deltam1Sigmam2; return 0; } // Optimized version double KerrBL::ScalarProd(const double* pos, const double* u1, const double* u2) const { double g[4][4]; gmunu(g, pos); double res= g[0][0]*u1[0]*u2[0]+ g[1][1]*u1[1]*u2[1]+ g[2][2]*u1[2]*u2[2]+ g[3][3]*u1[3]*u2[3]+ g[0][3]*u1[0]*u2[3]+ g[3][0]*u1[3]*u2[0]; # if GYOTO_DEBUG_ENABLED GYOTO_IF_DEBUG GYOTO_DEBUG_ARRAY(pos, 4); GYOTO_DEBUG_ARRAY(u1, 4); GYOTO_DEBUG_ARRAY(u2, 4); GYOTO_DEBUG << "ScalarProd(pos, u1, u2)=" << res << endl; GYOTO_ENDIF_DEBUG # endif return res; } /*For integration of KerrBL geodesics. diff is such that : y_dot=diff(y,cst) where cst are constants of motion (mu,E,L,Q in KerrBL) and y contains [r,theta,phi,t,pr,ptheta] (pr and ptheta are canonical momentum) and y_dot is [rdot,thetadot,phidot,tdot,prdot,pthetadot] */ int KerrBL::diff(const double* coordGen, const double* cst, double* res) const{ double a=spin_; //int width=25;//15; //int prec=15;//8; double r = coordGen[1] ; if (r < 0.) { cerr << "r= " << r << endl; throwError( "KerrBL.C : r negative!!!!! the horizon may have been crossed..." ); } if (r < rsink_) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "Too close to horizon in KerrBL::diff at r= " << r << endl; # endif return 1; } double r2 = r*r ; double r3 = r2*r ; // compute and store efficiently sin, cos, cotan double theta=coordGen[2]; double costheta, sintheta; sincos(theta, &sintheta, &costheta); double costheta2=costheta*costheta; if (sintheta==0.) throwError("sintheta==0"); double cotantheta=costheta/sintheta; double cotantheta2=cotantheta*cotantheta; double cotantheta3=cotantheta2*cotantheta; double sin2theta=2.*sintheta*costheta; double cos2theta=2.*costheta2-1.; double pr=coordGen[5]; double ptheta=coordGen[6]; double Sigma=r2+a2_*costheta2; if (Sigma==0) throwError("In KerrBL::diff(): Sigma==0"); double Sigmam1=1./Sigma; double Sigmam2=Sigmam1*Sigmam1; double Delta=r2-2*r+a2_; double E=cst[1]; double E2=E*E; double L=cst[2]; double L2=L*L; double tmp1=(2.*Delta*Sigma); if (tmp1==0) throwError("In KerrBL::diff(): 2.*Delta*Sigma==0"); double tmp1m1=1./tmp1; if (Delta==0) throwError("In KerrBL::diff(): Delta==0"); //NB: equations of motion are independent of Carter constant in this //form. However, the dependency of the dynamic on this constant //appears when transforming from principal momenta to coordinate //derivatives (e.g. p_theta -> thetadot) /* ---> Standard Kerr equations of geodesics */ res[0] = tmp1m1*(2.*(r*(-2.*a*L+E*r3+a2_*E*(2.+r))+a2_*E*(a2_+r*(-2.+r)) *costheta2));// tdot res[1] = Delta*Sigmam1*pr; //rdot res[2] = Sigmam1*ptheta; //thetadot res[3] = -tmp1m1*(-2.*(r*(2.*a*E+L*(-2.+r))+L*(a2_+r*(-2.+r)) *cotantheta2)); //phidot res[4] = 0.;// ptdot: pt = cst = -E double tmp2=r2+a2_*costheta2; if (tmp2==0) throwError("r2+a2*costheta2==0"); double tmp2m2=1./(tmp2*tmp2); double tmp3=a2_+r*(-2.+r); double tmp3_2=tmp3*tmp3; res[5] = -0.5*(2.*(r*(r-a2_)-a2_*(1.-r)*costheta2)*tmp2m2)*pr*pr -0.5*(-2.*r*tmp2m2)*ptheta*ptheta +(tmp2m2/tmp3_2 *(a2_*(a4_*E2-2.*a3_*E*L+2.*a*E*L*r2+E2*r3*(-4.+r) +a2_*(L2*(1.-r)+2*E2*r2))*costheta2 +r*(-r*(a4_*E2-2.*a3_*E*L+2.*a*E*L*(4.-3.*r)*r +a2_*(L2+2.*E2*r*(-2.+r))+r*(E2*r3-L2*(-2.+r)*(-2.+r))) +L2*tmp3_2*cotantheta2)));// prdot res[6]= -0.5*(a2_*Delta*sin2theta*Sigmam2)*pr*pr -0.5*(a2_*sin2theta*Sigmam2)*ptheta*ptheta +( Sigmam2 *( L2*r2*cotantheta +0.5*L2*(a2_+2.*r2+a2_*cos2theta)*cotantheta3 +a2_*r*(2.*a2_*E2-4.*a*E*L+L2*(2.-r)+2.*E2*r2)*costheta*sintheta/Delta ) ); // pthetadot res[7] = 0.;//pphidot: pphi = cst = L return 0; } void KerrBL::circularVelocity(double const coor[4], double vel[4], double dir) const { if (keplerian_) { // If keplerian_ is true, let the generic implementation return // the Newtonian Keplerian (i.e. r^-3/2, no spin) velocity // instead of the true circular velocity Generic::circularVelocity(coor, vel, dir); return; } # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG<<"coor=["< throw z-axis pb by // returning 1; if ( (thetacompare < thetatol) && (fabs(k1[5]) > derlim || fabs(k1[6]) > derlim) ){ return 1; } for (int i=0;i<8;i++) { k1[i]=h*k1[i]; coor_plus_halfk1[i]=coor[i]+0.5*k1[i]; sixth_k1[i]=1./6.*k1[i]; } if (diff(coor_plus_halfk1,cst,k2)) return 2; if ( (thetacompare < thetatol) && (fabs(k2[5]) > derlim || fabs(k2[6]) > derlim) ){ return 1; } for (int i=0;i<8;i++) { k2[i]=h*k2[i]; coor_plus_halfk2[i]=coor[i]+0.5*k2[i]; third_k2[i]=1./3.*k2[i]; } if (diff(coor_plus_halfk2,cst,k3)) return 2 ; if ( (thetacompare < thetatol) && (fabs(k3[5]) > derlim || fabs(k3[6]) > derlim) ){ return 1; } for (int i=0;i<8;i++) { k3[i]=h*k3[i]; coor_plus_k3[i]=coor[i]+k3[i]; third_k3[i]=1./3.*k3[i]; } if (diff(coor_plus_k3,cst,k4)) return 2 ; if ( (thetacompare < thetatol) && (fabs(k4[5]) > derlim || fabs(k4[6]) > derlim) ){ return 1; } for (int i=0;i<8;i++) { k4[i]=h*k4[i]; sixth_k4[i]=1./6.*k4[i]; } for (int i=0;i<8;i++) res[i]=coor[i]+sixth_k1[i]+third_k2[i]+third_k3[i]+sixth_k4[i]; return 0; } int KerrBL::myrk4_adaptive(Worldline * line, const double coordin[8], double lastnorm, double normref, double coordout1[8], double h0, double& h1, double h1max) const { if (generic_integrator_) return Generic::myrk4_adaptive(line, coordin, lastnorm, normref, coordout1, h0, h1, h1max); /*Switch BL -> principal momenta*/ double coor[8], coor1[8], cstest[5], coorhalf[8], coor2[8], coor1bis[8], mycoor[8], delta1[8]; double const * const cst = line -> getCst(); MakeMomentum(coordin,cst,coor); double delta0[8], dcoor[8]; double delta0min=1e-15, eps=0.0001, S=0.9, errmin=1e-6, hbis=0.5*h0, err, diffr, diffth, normtemp, cstol_gen=1e-3, cstol_hor=1e-2, cstol, div, QCarter; int countbis=0, countbislim=50, zaxis=0; // for z-axis problem in myrk4 //int norm1=0, normhalf=0, norm2=0, rk1=0, rkhalf=0, rk2=0, update, makerr=0.; int norm1=0, rk1=0, rkhalf=0, rk2=0, update, makerr=0; double a=spin_, factrtol=3., rtol=factrtol*(1.+sqrt(1.-a*a)), rlimitol=10.; h1max=deltaMax(coor, h1max); if (coor[1] < rtol) cstol = cstol_hor; // for tests of cst of motion conservation; don't ask too much // if near horizon... else cstol = cstol_gen; //NB: following test ok only if theta is 0-pi // coz -pi/2[pi]=-pi/2 ... /*if (fabs(fmod(coor[2]+M_PI/2, M_PI)-M_PI/2) < GYOTO_MIN_THETA) { cout << "in kerr th= " << coor[2] << endl; GYOTO_WARNING << "Too close to Z axis: stopping integration"<< endl; return 1; }*/ //Fred: Test removed Feb 2013, seems not necessary if (diff(coor,cst,dcoor)) return 1 ; for (int i = 0;i<8;i++) delta0[i]=delta0min+eps*(fabs(h0*dcoor[i])); while (1){ err=0.; countbis++; //*** z-axis problem *** /* This while loop tests whether theta is too close to zero (coordinate singularity in BL) and whether we are outside horizon. */ double hinit=h0, steptol=1e3; while ( (( (rk1 =myrk4(coor,cst,h0,coor1) ) == 1) || (rk1 == 2)) || (( (rkhalf=myrk4(coor,cst,hbis,coorhalf) ) == 1) || (rkhalf == 2)) || (( (rk2 =myrk4(coorhalf,cst,hbis,coor2)) == 1) || (rk2 == 2)) ) { if (rk1==2 || rkhalf==2 || rk2==2){ //if any of rks is 2, stop integration, we're inside horizon return 1; } zaxis=1; h0*=1.1; hbis*=1.1; GYOTO_INFO << "NOTE: Passing close to z-axis at theta= " << coor[2] << " and r= " << coor[1] << ", jumping ahead with h0= " << h0 << endl; if (h0/hinit>steptol){ GYOTO_SEVERE << "In KerrBL::myrk4_adaptive: " "stop integration because unsolved z-axis problem" << endl; return 1; } } if (countbis > countbislim && zaxis) { // If the "jumping ahead" trick above does not work and leads to // infinite jumping ahead behavior (should never happen of // course) GYOTO_INFO << "WARNING: " << endl << "in KerrBL.C couldn't solve z-axis problem ; stopping..." << endl; return 1; } //*** Error determination: *** for (int i = 0;i<8;i++){ delta1[i]=coor2[i]-coor1[i]; if ((err1) { h0=S*h0*pow(err,-0.25); hbis=0.5*h0; }else{ h1=(err > errmin ? S*h0*pow(err,-0.2) : 4.*h0);//pour éviter les explosions if (fabs(h1)0)?delta_min_:-delta_min_; } if (fabs(h1)>h1max) h1=(h1>0.)?h1max:-h1max; //*** Normalizing *** update=1; norm1=CheckCons(coor1,cst,coor1bis); // pr and ptheta relative difference (NB: only pr and ptheta are modified in CheckCons) if (coor1[5]) diffr = fabs(coor1[5]-coor1bis[5])/fabs(coor1[5]); else if (coor1bis[5]) diffr = fabs(coor1[5]-coor1bis[5])/fabs(coor1[5]); else diffr = 0.; if (coor1[6]) diffth = fabs(coor1[6]-coor1bis[6])/fabs(coor1[6]); else if (coor1bis[6]) diffth = fabs(coor1[6]-coor1bis[6])/fabs(coor1[6]); else diffth = 0.; if ((diffr > difftol_ || diffth > difftol_)) { // don't update coordinates if the relative differences are // more than 1% --> consequence = norm and Carter cst // won't be exactly the same for this step --> below, // test to be sure they're not "too much violated"; NB: // if this test is not performed, the "corrected" // worldline can diverge from the "true" one after a long // time of integration. update=0; MakeCoord(coor1,cst,mycoor); normtemp = ScalarProd(mycoor, mycoor+4, mycoor+4); computeCst(mycoor,cstest); if (cst[3]>cstol) { QCarter=cst[3]; div = cst[4]; // cst[4] = cst[3]==0? 1. : 1./cst[3] } else { QCarter=0.; div=1.; } if ( fabs(normtemp+cst[0])>cstol ) makerr=1; // cst[0] == -real_norm if ( makerr && (fabs(cstest[3]-QCarter)*div>cstol) ) makerr=3; if ( fabs(cstest[3]-QCarter)*div>cstol ) makerr=2; if (makerr) { if (verbose() >= GYOTO_SEVERE_VERBOSITY) { cerr << "WARNING: at r=" << coordin[1] << endl; if (makerr==1) cerr << "Real norm, current norm= " << (cst[0]?-1.:0.) << " " << normtemp << endl; else if (makerr==2){ cerr << "Carter cst error= (" << QCarter << "-" << cstest[3] << ")*" << div << "*100.= " << fabs(QCarter-cstest[3])*div*100. << " %, cstol=" << cstol << endl; }else{ cerr << "Real norm, current norm= " << (cst[0]?-1.:0.) << " " << normtemp << endl << "Carter cst error= (" << QCarter << "-" << cstest[3] << ")*" << div << "*100.= " << fabs(QCarter-cstest[3])*div*100. << " %" << endl; } } if (coor1[1] to be investigated" << ", or maybe increase parameter cstol" << "in KerrBL.C" << endl; } } } //Update coord if (update && !norm1){ // norm1=1 if impossible to normalize in CheckCons due to z-axis pb for (int i=0;i<8;i++) coor1[i]=coor1bis[i]; } // cout << "KerrBL Used h0= " << h0 << endl; //*** Switch principal momenta -> BL: *** MakeCoord(coor1,cst,coordout1); break; } //err>1 if-loop end } // while loop end //line -> checkPhiTheta(coordout1); //for some reason the above line leads to infinite iteration with fixed star return 0; } int KerrBL::CheckCons(const double coor_init[8], const double cst[5], double coor_fin[8]) const { /* Ensures that the cst of motion are conserved. E and L always are (see diff). But Q and norm may not be. */ double mycoor[8]; //int thetalert=0; /* *** From momenta to normal BL coordinates *** */ MakeCoord(coor_init,cst,mycoor); //Computes mycoor=[t,r,theta,phi,tdot,rdot,thetadot,phidot] from coor_init=[t,r,theta,phi,pt=-E,pr,ptheta,pphi=L] and cst /* *** Carter constant's check *** As the equations of motion (cf diff) are independent of Q, it is necessary to check whether this constant is conserved. */ double costh, sinth; sincos(mycoor[2], &sinth, &costh); double sinthm2=1./(sinth*sinth), costh2=costh*costh; double mu=cst[0], EE=cst[1], LL=cst[2], QQ=cst[3], QQm1=cst[4]; double argsqrt, limarg=1e-6*QQ, limargbis=0.1*QQ; double mu2=mu*mu, EE2=EE*EE, LL2=LL*LL; double Sigma=mycoor[1]*mycoor[1]+a2_*costh2; double Sigma2=Sigma*Sigma; double Qtest= Sigma2*mycoor[6]*mycoor[6]+costh2*(a2_*(mu2-EE2)+LL2*sinthm2); //this should be equal to constant QQ int thdotpos=1; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "mu="<limarg) {//if it is <0 and "big", two cases: either we are too close to z-axis which causes theta coordinate to behave badly (then return 1: "z-axis problem" in RK4 adaptive); or Error if (fabs(fmod(coor_init[2]+M_PI/2, M_PI)-M_PI/2) < M_PI/50.) { return 1; // z-axis problem }else{ if (fabs(argsqrt)>limargbis) throwError("In KerrBL::CheckCons Impossible to determine thetadot; " "maybe try to increase parameter limarg"); GYOTO_INFO << "KerrBL::CheckCons argsqrt= " << argsqrt << " at theta= " << coor_init[2] << ". Putting it to 0..." << endl; argsqrt=0.; } } mycoor[6]=sqrt(argsqrt)/Sigma;//update thetadot to impose QQ constant if (!thdotpos) mycoor[6]*=-1.; } //*** Normalizing 4v: *** Normalize4v(mycoor,mu); //*** Back to generalized momenta: *** MakeMomentum(mycoor,cst,coor_fin); return 0; } void KerrBL::Normalize4v(double coord[8], const double part_mass) const { /* Changes rdot to allow norm conservation. */ double aa=spin_; double rhor=1.+sqrt(1.-aa*aa); double g[4][4]; gmunu(g, coord); double gtt=g[0][0], gtph=g[0][3], grr=g[1][1], gthth=g[2][2], gphph=g[3][3]; double rr=coord[1], tdot=coord[4], rdot=coord[5], thdot=coord[6], phdot=coord[7]; int valuepos;//to preserve rdot sign if (rdot>0.) valuepos=1; else valuepos=0; if (part_mass==0.){// *** ZERO - NORM CASE *** double argrac=-(gtt*tdot*tdot+2.*gtph*phdot*tdot+gthth*thdot*thdot+gphph*phdot*phdot)/grr;//rdot should be equal to the sqrt of this quantity double arglim=1e-4;//generates lots of warning with argrac /approx 1e-5... if (argrac<0 && fabs(argrac) put it to 0 argrac=0.; } if (argrac<0 && fabs(argrac)>arglim) { if (rr/rhor < 2.) {//A AFFINER?? //if the quantity is <0 and "big", but we are close to horizon --> put it to zero with Warning message if (verbose() >= GYOTO_WARNING_VERBOSITY) { GYOTO_WARNING << "0-NORM CLOSE TO HORIZON : " << "in KerrBL::Normalize4v impossible to normalize 0-mass " << "particule next to horizon. Putting argrac to 0. " << "Effective value of argrac= " << argrac << endl << "with coord= "; for (int myind=0;myind<8;myind++) cerr << coord[myind] << " "; cerr << endl; } argrac=0.; }else{//if the quantity is <0 and "big", and we are not close to horizon --> error throwError( "In KerrBL::Normalize4v impossible to normalize 0-mass particle outside horizon!" ); } } coord[5]=sqrt(argrac);//update rdot if (!valuepos) coord[5]*=-1.; }else if (part_mass>0.){ // *** -1 - NORM CASE *** double argrac=-(1.+gtt*tdot*tdot+2.*gtph*phdot*tdot+gthth*thdot*thdot+gphph*phdot*phdot)/grr; double arglim=1e-7; GYOTO_DEBUG_ARRAY(coord, 8); GYOTO_DEBUG_EXPR(argrac); GYOTO_DEBUG_EXPR(rr/rhor); if (argrac<0 && fabs(argrac)arglim) { if (rr/rhor < 2.) {//A AFFINER?? if (verbose()>=GYOTO_WARNING_VERBOSITY) { cerr << "WARNING -1 - NORM CLOSE TO HORIZON : " << "in KerrBL::Normalize4v impossible to normalize massive " << "particle next to horizon. Putting argrac to 0. " << "Effective value of argrac= " << argrac << endl << "with coord= "; for (int myind=0;myind<8;myind++) cerr << coord[myind] << " "; cerr << endl; } argrac=0.; }else{ throwError( "In KerrBL::Normalize4v impossible to normalize massive particule outside horizon!" ); } } coord[5]=sqrt(argrac);//update rdot if (!valuepos) coord[5]*=-1.; }else{ throwError("In KerrBL::Normalize4v: negative mass!"); } } void KerrBL::MakeCoord(const double coordin[8], const double cst[5], double coord[8]) const { double tt=coordin[0], rr = coordin[1], theta=coordin[2], phi=coordin[3], pr=coordin[5], ptheta=coordin[6]; double g[4][4]; gmunu(g, coordin); double gtt=g[0][0], gtp=g[0][3], gpp =g[3][3], det=gtp*gtp-gtt*gpp, detm1=1./det, guprr=gmunu_up(coordin,1,1), gupthth=gmunu_up(coordin,2,2); double EE=cst[1], LL=cst[2]; double rdot=guprr*pr, thetadot = gupthth*ptheta, phidot=-(gtt*LL+gtp*EE)*detm1, tdot=(gtp*LL+gpp*EE)*detm1; coord[0]=tt;coord[1]=rr;coord[2]=theta;coord[3]=phi;coord[4]=tdot; coord[5]=rdot;coord[6]=thetadot;coord[7]=phidot; } void KerrBL::MakeMomentum(const double coord[8], const double cst[5], double coordout[8]) const{ double EE=cst[1], LL=cst[2]; double tt=coord[0], rr = coord[1], theta=coord[2], phi=coord[3], rdot=coord[5], thetadot=coord[6]; double g[4][4]; gmunu(g, coord); double pr=g[1][1]*rdot, ptheta=g[2][2]*thetadot; coordout[0]=tt;coordout[1]=rr;coordout[2]=theta; coordout[3]=phi;coordout[4]=-EE;coordout[5]=pr; coordout[6]=ptheta;coordout[7]=LL; } void KerrBL::nullifyCoord(double coord[8]) const { double tdot2; nullifyCoord(coord,tdot2); } void KerrBL::nullifyCoord(double coord[4], double & tdot2) const { int i; double a, b=0., c=0.; double g[4][4]; gmunu(g, coord); a=g[0][0]; b=g[0][3]*coord[7]; for (i=1;i<=3;++i){ c+=g[i][i]*coord[4+i]*coord[4+i]; } double sDelta=sqrt(b*b-a*c), am1=1./a; tdot2=(-b+sDelta)*am1; coord[4]=(-b-sDelta)*am1; } void KerrBL::computeCst(const double coord[8], double cst[5]) const{ double norm=ScalarProd(coord, coord+4, coord+4); double mu;//Particule mass: 0 or 1 if (fabs(norm) setCst(cst,5); } void KerrBL::observerTetrad(string const obskind, double const pos[4], double fourvel[4], double screen1[4], double screen2[4], double screen3[4]) const{ double gtt = gmunu(pos,0,0), grr = gmunu(pos,1,1), gthth = gmunu(pos,2,2), gpp = gmunu(pos,3,3), gtp = gmunu(pos,0,3); if (obskind=="ZAMO"){ double fact = gtt*gpp - gtp*gtp; if (fact == 0.){ throwError("In KerrBL::observerTetrad: " "bad values"); } double ut2 = -gpp/fact; if (grr==0. || gthth==0. || gpp==0. || ut2<=0.){ throwError("In KerrBL::observerTetrad: " "bad values"); } double omega = -gtp/gpp; double ut = sqrt(ut2); double fourv[4]={ut,0.,0.,omega*ut}; double e3[4] = {0.,-1./sqrt(grr),0.,0.}; double e2[4] = {0.,0.,-1./sqrt(gthth),0.}; double e1[4] = {0.,0.,0.,-1/sqrt(gpp)}; for (int ii=0;ii<4;ii++){ fourvel[ii]=fourv[ii]; screen1[ii]=e1[ii]; screen2[ii]=e2[ii]; screen3[ii]=e3[ii]; } }else if (obskind=="KeplerianObserver"){ double omega = 1./(pow(pos[1],1.5)+spin_); double ut2 = -1/(gtt+gpp*omega*omega+2.*gtp*omega); if (ut2 <= 0. || grr<=0. || gthth <=0.) { throwError("In KerrBL::observerTetrad: " "bad values"); } double ut = sqrt(ut2); double fourv[4]={ut,0.,0.,omega*ut}; double e3[4] = {0.,-1./sqrt(grr),0.,0.}; double e2[4] = {0.,0.,-1./sqrt(gthth),0.}; double fact1 = (gtp+gpp*omega)/(gtt+gtp*omega), fact2 = gtt*fact1*fact1+gpp-2.*gtp*fact1; if (fact2 <= 0.) throwError("In KerrBL::observerTetrad: " "bad values"); double a2 = 1./sqrt(fact2), a1 = -a2*fact1; double e1[4] = {-a1,0.,0.,-a2}; for (int ii=0;ii<4;ii++){ fourvel[ii]=fourv[ii]; screen1[ii]=e1[ii]; screen2[ii]=e2[ii]; screen3[ii]=e3[ii]; } }else{ throwError("In KerrBL::observerTetrad " "unknown observer kind"); } Generic::observerTetrad(obskind,pos,fourvel,screen1,screen2,screen3); } Gyoto-1.2.0/lib/KerrKS.C000066400000000000000000000201261302352257300146310ustar00rootroot00000000000000/* Copyright 2011-2015 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoKerrKS.h" #include "GyotoWorldline.h" #include "GyotoError.h" #include "GyotoProperty.h" #include #include #include #include #include #include #include using namespace std ; using namespace Gyoto ; using namespace Gyoto::Metric ; GYOTO_PROPERTY_START(KerrKS, "Metric around a rotating black-hole, in Cartesian Kerr-Schild coordinates.") GYOTO_PROPERTY_DOUBLE(KerrKS, Spin, spin, "Spin parameter (adimensioned, 0).") GYOTO_PROPERTY_DOUBLE(KerrKS, HorizonSecurity, horizonSecurity, "Thickness of sink layer around horizon (geometrical units, 0.01).") GYOTO_PROPERTY_END(KerrKS, Generic::properties) KerrKS::KerrKS(): Generic(GYOTO_COORDKIND_CARTESIAN, "KerrKS"), spin_(0.), a2_(0.), rsink_(2.+GYOTO_KERR_HORIZON_SECURITY), drhor_(GYOTO_KERR_HORIZON_SECURITY) {} KerrKS * KerrKS::clone () const { return new KerrKS(*this); } // Mutators void KerrKS::spin(const double a) { spin_=a; a2_=spin_*spin_; rsink_=1.+sqrt(1.-a2_)+drhor_; tellListeners(); } void KerrKS::horizonSecurity(const double drhor) { drhor_=drhor; rsink_=1.+sqrt(1.-a2_)+drhor_; tellListeners(); } // Accessors double KerrKS::spin() const { return spin_ ; } double KerrKS::horizonSecurity() const {return drhor_; } int KerrKS::setParameter(std::string name, std::string content, std::string unit) { if (name=="GenericIntegrator") { GYOTO_WARNING << "Specifying GenericIntegrator is useless and obsolete\n"; } else if (name=="SpecificIntegrator") { GYOTO_SEVERE << "SpecificIntegrator is not supported anymore\n"; } else return Metric::Generic::setParameter(name, content, unit); return 0; } void KerrKS::gmunu(double g[4][4], const double * pos) const { double x=pos[1], y=pos[2], z=pos[3], x2=x*x, y2=y*y, z2=z*z, tau=x2+y2+z2-a2_, r2=0.5*(tau+sqrt(tau*tau+4*a2_*z2)), r=sqrt(r2), r3=r2*r, r4=r2*r2, r2_a2=r2+a2_, f=2.*r3/(r4+a2_*z2); double k[4]= { 1., (r*x+spin_*y)/r2_a2, (r*y-spin_*x)/r2_a2, z/r }; for (int mu=0; mu<4; ++mu) for (int nu=0; nu<=mu;++nu) g[mu][nu]=g[nu][mu]=f*k[mu]*k[nu]; g[0][0] -= 1.; for (int mu=1; mu<4; ++mu) g[mu][mu]+=1.; } void KerrKS::gmunu_up(double gup[4][4], const double * pos) const { double jac[4][4][4], dst[4][4][4]; christoffel(dst, pos, gup, jac); } void KerrKS::jacobian(double jac[4][4][4], const double * pos) const { double gup[4][4], dst[4][4][4]; christoffel(dst, pos, gup, jac); } int KerrKS::christoffel(double dst[4][4][4], const double * pos) const { double gup[4][4], jac[4][4][4]; return christoffel(dst, pos, gup, jac); } int KerrKS::christoffel(double dst[4][4][4], const double * pos, double gup[4][4], double jac[4][4][4]) const { size_t a, mu, nu, i; double x=pos[1], y=pos[2], z=pos[3], x2=x*x, y2=y*y, z2=z*z, a2z2=a2_*z2, x2_y2_z2=x2+y2+z2, tau=x2_y2_z2-a2_, rho2=tau*tau+4.*a2z2, rho=sqrt(rho2), r2=0.5*(tau+rho), r=sqrt(r2), r3=r2*r, r4=r2*r2, r2_a2=r2+a2_, rx_ay=r*x+spin_*y, ry_ax=r*y-spin_*x, f=2.*r3/(r4+a2_*z2), fr2=f*r2; // computing gup[mu][up]=g^mu^nu { double frac = f/ (-fr2*(rx_ay*rx_ay + ry_ax*ry_ax)+ r2_a2*r2_a2 *(-r2 +fr2 -f*z2)); double kup[4]= { -r*r2_a2, r*rx_ay, r*ry_ax, r2_a2*z }; for (mu=0; mu<4; ++mu) { for (nu=0; nu<=mu;++nu) { gup[mu][nu]=gup[nu][mu]=frac*kup[mu]*kup[nu]; } } gup[0][0] -= 1.; for (mu=1; mu<4; ++mu) gup[mu][mu] += 1.; } // computing jac[a][mu][nu]=dg_mu_nu/dx^a { double k[4]= { 1., rx_ay/r2_a2, ry_ax/r2_a2, z/r }; double a4=a2_*a2_, r4_a2z2=r4+a2z2, temp=-(2.*r3*(r4-3.*a2z2))/(r4_a2z2*r4_a2z2*rho), temp2=(a4+2.*r2*x2_y2_z2 - a2_* (x2_y2_z2 - 4.* z2 + rho)); double df[4]= { 0., x*temp, y*temp, -((4.*r*z*(2.* a4*a2_ + (a2_ + 2.*r2)*x2_y2_z2*x2_y2_z2 + a4*(-3.*x2 - 3.*y2 + z2 - 2.*rho) + a2_*(x2 + y2 - z2)*rho))/(rho*temp2*temp2)) }; double frac1=1./(r2_a2*r2_a2*rho), frac2=z/(r2_a2*r*rho), frac3=-z/(r*rho); double dk[4][4]= { // d/dt {0., 0., 0., 0.}, // d/dx { 0., (r3*(x2+rho)-rx_ay*x*(x2+y2+z2+rho)+a2_*(rx_ay*x+r*(x2+rho)))*frac1, (x*(r3*y+a2_*(ry_ax+r*y)-ry_ax*(x2+y2+z2))-(spin_*r2_a2+ry_ax*x)*rho)*frac1, x*frac3 }, // d/dy { 0., (a2_*(rx_ay+r*x)*y+r2_a2*spin_*rho-y*(-r3*x+rx_ay*(x2+y2+z2+rho)))*frac1, (r3*(y2+rho)-ry_ax*y*(x2+y2+z2+rho)+a2_*(ry_ax*y+r*(y2+rho)))*frac1, y*frac3 }, // d/dz { 0., ((a2_-r2)*x-2*spin_*r*y)*frac2, ((a2_-r2)*y+2*spin_*r*x)*frac2, (2.*r2- (z2*(a2_ + x2 + y2 + z2 + rho))/rho)/(2.*r3) } }; for(a=0; a<4; ++a) for (mu=0; mu<4; ++mu) for (nu=0; nu<=mu;++nu) jac[a][mu][nu]=jac[a][nu][mu]=df[a]*k[mu]*k[nu]+f*dk[a][mu]*k[nu]+f*k[mu]*dk[a][nu]; } // computing Gamma^a_mu_nu for (a=0; a<4; ++a) { for (mu=0; mu<4; ++mu) { for (nu=0; nu<4; ++nu) { dst[a][mu][nu]=0.; for (i=0; i<4; ++i) { dst[a][mu][nu]+=0.5*gup[i][a]* (jac[mu][i][nu]+jac[nu][mu][i]-jac[i][mu][nu]); } } } } return 0; } double KerrKS::gmunu(const double * pos, int mu, int nu) const { if (mu<0 || nu<0 || mu>3 || nu>3) throwError ("KerrKS::gmunu: incorrect value for mu or nu"); //double x=pos[0], y=pos[1], z=pos[2]; double x=pos[1], y=pos[2], z=pos[3]; double x2=x*x; double y2=y*y; double z2=z*z; double temp=x2+y2+z2-a2_; double rr=sqrt(0.5*(temp+sqrt(temp*temp+4*a2_*z2))); double r2=rr*rr; double r3=rr*r2; double r4=rr*r3; double fact=2.*r3/(r4+a2_*z2); double res=0.; if (mu==nu) { if ((mu==0) && (nu==0)) res=fact-1.; if ((mu==1) && (nu==1)) res= 1.+fact*pow((rr*x+spin_*y)/(r2+a2_),2); if ((mu==2) && (nu==2)) res= 1.+fact*pow((rr*y-spin_*x)/(r2+a2_),2); if ((mu==3) && (nu==3)) res= 1.+fact*z2/r2; } if (nu0 && Tdot>0); return (r. */ // include Metric headers #include "GyotoRotStar3_1.h" #include "GyotoNumericalMetricLorene.h" /* namespace Gyoto { void __StdLibInit(); } */ extern "C" void __GyotoloreneInit() { Gyoto::Metric::Register("RotStar3_1", &(Gyoto::Metric::Subcontractor )); Gyoto::Metric::Register("NumericalMetricLorene", &(Gyoto::Metric::Subcontractor )); } Gyoto-1.2.0/lib/Makefile.am000066400000000000000000000052501302352257300154210ustar00rootroot00000000000000ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -I@top_srcdir@/include $(XERCES_CFLAGS) $(UDUNITS_CFLAGS) $(BOOST_CPPFLAGS) $(CFITSIO_CFLAGS) AM_LDFLAGS = $(XERCES_LIBS) -export-dynamic $(PTHREAD_LIBS) \ $(UDUNITS_LIBS) $(CFITSIO_LIBS) AM_CXXFLAGS = $(PTHREAD_CFLAGS) -DGYOTO_PKGLIBDIR=\"${pkglibdir}\" if HAVE_LOCALPKGLIBDIR AM_CXXFLAGS += -DGYOTO_LOCALPKGLIBDIR=\"${localpkglibdir}\" endif if HAVE_MPI AM_LDFLAGS += $(BOOST_MPI_LDFLAGS) $(BOOST_MPI_LIBS) \ $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) endif # HEADERS: where they are, where to install them library_includedir=$(includedir)/Gyoto library_include_HEADERS=$(top_srcdir)/include/*.h $(top_builddir)/include/*.h # MAIN LIBRARY lib_LTLIBRARIES = libgyoto@FEATURES@.la libgyoto@FEATURES@_la_SOURCES = \ Value.C Property.C Object.C \ Astrobj.C Factory.C Register.C SmartPointer.C Utils.C Metric.C \ WIP.C Worldline.C Photon.C Scenery.C \ WorldlineIntegState.C Error.C Screen.C Spectrum.C \ Spectrometer.C ComplexSpectrometer.C UniformSpectrometer.C \ StandardAstrobj.C ThinDisk.C Converters.C Functors.C Hooks.C libgyoto@FEATURES@_la_LIBS = $(XERCES_LIBS) libgyoto@FEATURES@_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(VERSINFO) # STANDARD PLUGIN soverdir=$(pkglibdir)/@sovers@ sover_LTLIBRARIES = libgyoto-stdplug.la libgyoto_stdplug_la_CPPFLAGS = $(AM_CPPFLAGS) -DGYOTO_PLUGIN=stdplug libgyoto_stdplug_la_SOURCES = KerrBL.C KerrKS.C Minkowski.C \ ChernSimons.C RezzollaZhidenko.C \ Star.C StarTrace.C FixedStar.C InflateStar.C \ Torus.C OscilTorus.C \ PowerLawSpectrum.C BlackBodySpectrum.C \ ThermalBremsstrahlungSpectrum.C \ ComplexAstrobj.C UniformSphere.C \ PageThorneDisk.C \ ThinDiskPL.C PolishDoughnut.C ThinDiskIronLine.C\ DeformedTorus.C EquatorialHotSpot.C \ StdPlug.C # those files need cfitsio for some functionality cfitsio_stdplug_sources = PatternDisk.C PatternDiskBB.C \ DynamicalDisk.C DynamicalDiskBolometric.C \ Disk3D.C DynamicalDisk3D.C DirectionalDisk.C EXTRA_libgyoto_stdplug_la_SOURCES = $(cfitsio_stdplug_sources) libgyoto_stdplug_la_SOURCES += $(cfitsio_stdplug_sources) libgyoto_stdplug_la_LDFLAGS = -module -export-dynamic $(AM_LDFLAGS) -avoid-version # LORENE PLUGIN if HAVE_LORENE sover_LTLIBRARIES += libgyoto-lorene.la endif libgyoto_lorene_la_SOURCES = RotStar3_1.C NumericalMetricLorene.C LorenePlug.C libgyoto_lorene_la_LDFLAGS = -module -export-dynamic $(LORENELDFLAGS) $(AM_LDFLAGS) -avoid-version libgyoto_lorene_la_CPPFLAGS = $(AM_CPPFLAGS) $(LORENECPPFLAGS) -DGYOTO_PLUGIN=lorene # pkg-config file pkgconfigdir=$(libdir)/pkgconfig pkgconfig_DATA=gyoto.pc uninstall-hook: -rmdir $(DESTDIR)$(soverdir) -rmdir $(DESTDIR)$(pkglibdir) -rmdir $(DESTDIR)$(library_includedir) Gyoto-1.2.0/lib/Makefile.in000066400000000000000000002302311302352257300154310ustar00rootroot00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ @HAVE_LOCALPKGLIBDIR_TRUE@am__append_1 = -DGYOTO_LOCALPKGLIBDIR=\"${localpkglibdir}\" @HAVE_MPI_TRUE@am__append_2 = $(BOOST_MPI_LDFLAGS) $(BOOST_MPI_LIBS) \ @HAVE_MPI_TRUE@ $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) # LORENE PLUGIN @HAVE_LORENE_TRUE@am__append_3 = libgyoto-lorene.la subdir = lib DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/gyoto.pc.in $(srcdir)/gyoto-uninstalled.pc.in \ $(top_srcdir)/depcomp $(library_include_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_append_compile_flags.m4 \ $(top_srcdir)/m4/ax_append_flag.m4 \ $(top_srcdir)/m4/ax_append_link_flags.m4 \ $(top_srcdir)/m4/ax_check_compile_flag.m4 \ $(top_srcdir)/m4/ax_check_link_flag.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ $(top_srcdir)/m4/ax_pkg_swig.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/ax_require_defined.m4 \ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/python.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 \ $(top_builddir)/include/GyotoConfig.h CONFIG_CLEAN_FILES = gyoto.pc gyoto-uninstalled.pc 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)$(soverdir)" \ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(library_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(sover_LTLIBRARIES) libgyoto_lorene_la_LIBADD = am_libgyoto_lorene_la_OBJECTS = libgyoto_lorene_la-RotStar3_1.lo \ libgyoto_lorene_la-NumericalMetricLorene.lo \ libgyoto_lorene_la-LorenePlug.lo libgyoto_lorene_la_OBJECTS = $(am_libgyoto_lorene_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libgyoto_lorene_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(libgyoto_lorene_la_LDFLAGS) \ $(LDFLAGS) -o $@ @HAVE_LORENE_TRUE@am_libgyoto_lorene_la_rpath = -rpath $(soverdir) libgyoto_stdplug_la_LIBADD = am__objects_1 = libgyoto_stdplug_la-PatternDisk.lo \ libgyoto_stdplug_la-PatternDiskBB.lo \ libgyoto_stdplug_la-DynamicalDisk.lo \ libgyoto_stdplug_la-DynamicalDiskBolometric.lo \ libgyoto_stdplug_la-Disk3D.lo \ libgyoto_stdplug_la-DynamicalDisk3D.lo \ libgyoto_stdplug_la-DirectionalDisk.lo am_libgyoto_stdplug_la_OBJECTS = libgyoto_stdplug_la-KerrBL.lo \ libgyoto_stdplug_la-KerrKS.lo libgyoto_stdplug_la-Minkowski.lo \ libgyoto_stdplug_la-ChernSimons.lo \ libgyoto_stdplug_la-RezzollaZhidenko.lo \ libgyoto_stdplug_la-Star.lo libgyoto_stdplug_la-StarTrace.lo \ libgyoto_stdplug_la-FixedStar.lo \ libgyoto_stdplug_la-InflateStar.lo \ libgyoto_stdplug_la-Torus.lo libgyoto_stdplug_la-OscilTorus.lo \ libgyoto_stdplug_la-PowerLawSpectrum.lo \ libgyoto_stdplug_la-BlackBodySpectrum.lo \ libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.lo \ libgyoto_stdplug_la-ComplexAstrobj.lo \ libgyoto_stdplug_la-UniformSphere.lo \ libgyoto_stdplug_la-PageThorneDisk.lo \ libgyoto_stdplug_la-ThinDiskPL.lo \ libgyoto_stdplug_la-PolishDoughnut.lo \ libgyoto_stdplug_la-ThinDiskIronLine.lo \ libgyoto_stdplug_la-DeformedTorus.lo \ libgyoto_stdplug_la-EquatorialHotSpot.lo \ libgyoto_stdplug_la-StdPlug.lo $(am__objects_1) libgyoto_stdplug_la_OBJECTS = $(am_libgyoto_stdplug_la_OBJECTS) libgyoto_stdplug_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(libgyoto_stdplug_la_LDFLAGS) \ $(LDFLAGS) -o $@ libgyoto@FEATURES@_la_LIBADD = am_libgyoto@FEATURES@_la_OBJECTS = Value.lo Property.lo Object.lo \ Astrobj.lo Factory.lo Register.lo SmartPointer.lo Utils.lo \ Metric.lo WIP.lo Worldline.lo Photon.lo Scenery.lo \ WorldlineIntegState.lo Error.lo Screen.lo Spectrum.lo \ Spectrometer.lo ComplexSpectrometer.lo UniformSpectrometer.lo \ StandardAstrobj.lo ThinDisk.lo Converters.lo Functors.lo \ Hooks.lo libgyoto@FEATURES@_la_OBJECTS = $(am_libgyoto@FEATURES@_la_OBJECTS) libgyoto@FEATURES@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(libgyoto@FEATURES@_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libgyoto_lorene_la_SOURCES) $(libgyoto_stdplug_la_SOURCES) \ $(EXTRA_libgyoto_stdplug_la_SOURCES) \ $(libgyoto@FEATURES@_la_SOURCES) DIST_SOURCES = $(libgyoto_lorene_la_SOURCES) \ $(libgyoto_stdplug_la_SOURCES) \ $(EXTRA_libgyoto_stdplug_la_SOURCES) \ $(libgyoto@FEATURES@_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) HEADERS = $(library_include_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BIBTEX = @BIBTEX@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_MPI_LDFLAGS = @BOOST_MPI_LDFLAGS@ BOOST_MPI_LDPATH = @BOOST_MPI_LDPATH@ BOOST_MPI_LIBS = @BOOST_MPI_LIBS@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SERIALIZATION_LDFLAGS = @BOOST_SERIALIZATION_LDFLAGS@ BOOST_SERIALIZATION_LDPATH = @BOOST_SERIALIZATION_LDPATH@ BOOST_SERIALIZATION_LIBS = @BOOST_SERIALIZATION_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXFLAGS_EXEC = @CXXFLAGS_EXEC@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYLIB_VAR = @DYLIB_VAR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FEATURES = @FEATURES@ FGREP = @FGREP@ GREP = @GREP@ GYOTO_PLUGIN_SFX = @GYOTO_PLUGIN_SFX@ HAVE_CXX11 = @HAVE_CXX11@ HOME_LORENE = @HOME_LORENE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPSEWHICH = @KPSEWHICH@ LD = @LD@ LDFLAGS = @LDFLAGS@ LDFLAGS_EXEC = @LDFLAGS_EXEC@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LORENECPPFLAGS = @LORENECPPFLAGS@ LORENELDFLAGS = @LORENELDFLAGS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAKE_S = @MAKE_S@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MPICXX = @MPICXX@ NM = @NM@ NMEDIT = @NMEDIT@ 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@ PDFLATEX = @PDFLATEX@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POW_LIB = @POW_LIB@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTENSION_SUFFIX = @PYTHON_EXTENSION_SUFFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ SYS = @SYS@ UDUNITS_CFLAGS = @UDUNITS_CFLAGS@ UDUNITS_LIBS = @UDUNITS_LIBS@ VERBATIM = @VERBATIM@ VERSINFO = @VERSINFO@ VERSION = @VERSION@ VIRTUALENV = @VIRTUALENV@ VIRTUALENV_FLAGS = @VIRTUALENV_FLAGS@ XERCES_CFLAGS = @XERCES_CFLAGS@ XERCES_LIBS = @XERCES_LIBS@ YORICK = @YORICK@ Y_INST_HOME = @Y_INST_HOME@ Y_INST_SITE = @Y_INST_SITE@ 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__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ 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@ localpkglibdir = @localpkglibdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ mySUBDIRS = @mySUBDIRS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkg_cflags = @pkg_cflags@ pkg_libs = @pkg_libs@ pkg_requires = @pkg_requires@ pkgpythondir = @pkgpythondir@ plugin_sfx = @plugin_sfx@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sovers = @sovers@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -I@top_srcdir@/include $(XERCES_CFLAGS) $(UDUNITS_CFLAGS) $(BOOST_CPPFLAGS) $(CFITSIO_CFLAGS) AM_LDFLAGS = $(XERCES_LIBS) -export-dynamic $(PTHREAD_LIBS) \ $(UDUNITS_LIBS) $(CFITSIO_LIBS) $(am__append_2) AM_CXXFLAGS = $(PTHREAD_CFLAGS) -DGYOTO_PKGLIBDIR=\"${pkglibdir}\" \ $(am__append_1) # HEADERS: where they are, where to install them library_includedir = $(includedir)/Gyoto library_include_HEADERS = $(top_srcdir)/include/*.h $(top_builddir)/include/*.h # MAIN LIBRARY lib_LTLIBRARIES = libgyoto@FEATURES@.la libgyoto@FEATURES@_la_SOURCES = \ Value.C Property.C Object.C \ Astrobj.C Factory.C Register.C SmartPointer.C Utils.C Metric.C \ WIP.C Worldline.C Photon.C Scenery.C \ WorldlineIntegState.C Error.C Screen.C Spectrum.C \ Spectrometer.C ComplexSpectrometer.C UniformSpectrometer.C \ StandardAstrobj.C ThinDisk.C Converters.C Functors.C Hooks.C libgyoto@FEATURES@_la_LIBS = $(XERCES_LIBS) libgyoto@FEATURES@_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(VERSINFO) # STANDARD PLUGIN soverdir = $(pkglibdir)/@sovers@ sover_LTLIBRARIES = libgyoto-stdplug.la $(am__append_3) libgyoto_stdplug_la_CPPFLAGS = $(AM_CPPFLAGS) -DGYOTO_PLUGIN=stdplug libgyoto_stdplug_la_SOURCES = KerrBL.C KerrKS.C Minkowski.C \ ChernSimons.C RezzollaZhidenko.C Star.C StarTrace.C \ FixedStar.C InflateStar.C Torus.C OscilTorus.C \ PowerLawSpectrum.C BlackBodySpectrum.C \ ThermalBremsstrahlungSpectrum.C ComplexAstrobj.C \ UniformSphere.C PageThorneDisk.C ThinDiskPL.C PolishDoughnut.C \ ThinDiskIronLine.C DeformedTorus.C EquatorialHotSpot.C \ StdPlug.C $(cfitsio_stdplug_sources) # those files need cfitsio for some functionality cfitsio_stdplug_sources = PatternDisk.C PatternDiskBB.C \ DynamicalDisk.C DynamicalDiskBolometric.C \ Disk3D.C DynamicalDisk3D.C DirectionalDisk.C EXTRA_libgyoto_stdplug_la_SOURCES = $(cfitsio_stdplug_sources) libgyoto_stdplug_la_LDFLAGS = -module -export-dynamic $(AM_LDFLAGS) -avoid-version libgyoto_lorene_la_SOURCES = RotStar3_1.C NumericalMetricLorene.C LorenePlug.C libgyoto_lorene_la_LDFLAGS = -module -export-dynamic $(LORENELDFLAGS) $(AM_LDFLAGS) -avoid-version libgyoto_lorene_la_CPPFLAGS = $(AM_CPPFLAGS) $(LORENECPPFLAGS) -DGYOTO_PLUGIN=lorene # pkg-config file pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gyoto.pc all: all-am .SUFFIXES: .SUFFIXES: .C .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gyoto.pc: $(top_builddir)/config.status $(srcdir)/gyoto.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gyoto-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/gyoto-uninstalled.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-soverLTLIBRARIES: $(sover_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(sover_LTLIBRARIES)'; test -n "$(soverdir)" || 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)$(soverdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(soverdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(soverdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(soverdir)"; \ } uninstall-soverLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(sover_LTLIBRARIES)'; test -n "$(soverdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(soverdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(soverdir)/$$f"; \ done clean-soverLTLIBRARIES: -test -z "$(sover_LTLIBRARIES)" || rm -f $(sover_LTLIBRARIES) @list='$(sover_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgyoto-lorene.la: $(libgyoto_lorene_la_OBJECTS) $(libgyoto_lorene_la_DEPENDENCIES) $(EXTRA_libgyoto_lorene_la_DEPENDENCIES) $(AM_V_CXXLD)$(libgyoto_lorene_la_LINK) $(am_libgyoto_lorene_la_rpath) $(libgyoto_lorene_la_OBJECTS) $(libgyoto_lorene_la_LIBADD) $(LIBS) libgyoto-stdplug.la: $(libgyoto_stdplug_la_OBJECTS) $(libgyoto_stdplug_la_DEPENDENCIES) $(EXTRA_libgyoto_stdplug_la_DEPENDENCIES) $(AM_V_CXXLD)$(libgyoto_stdplug_la_LINK) -rpath $(soverdir) $(libgyoto_stdplug_la_OBJECTS) $(libgyoto_stdplug_la_LIBADD) $(LIBS) libgyoto@FEATURES@.la: $(libgyoto@FEATURES@_la_OBJECTS) $(libgyoto@FEATURES@_la_DEPENDENCIES) $(EXTRA_libgyoto@FEATURES@_la_DEPENDENCIES) $(AM_V_CXXLD)$(libgyoto@FEATURES@_la_LINK) -rpath $(libdir) $(libgyoto@FEATURES@_la_OBJECTS) $(libgyoto@FEATURES@_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Astrobj.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ComplexSpectrometer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Converters.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Factory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Functors.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Hooks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Metric.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Object.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Photon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Property.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Register.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Scenery.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Screen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SmartPointer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Spectrometer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Spectrum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StandardAstrobj.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ThinDisk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UniformSpectrometer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WIP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Worldline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WorldlineIntegState.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_lorene_la-LorenePlug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_lorene_la-NumericalMetricLorene.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_lorene_la-RotStar3_1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-BlackBodySpectrum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-ChernSimons.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-ComplexAstrobj.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-DeformedTorus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-DirectionalDisk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-Disk3D.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk3D.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-DynamicalDiskBolometric.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-EquatorialHotSpot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-FixedStar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-InflateStar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-KerrBL.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-KerrKS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-Minkowski.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-OscilTorus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-PageThorneDisk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-PatternDisk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-PatternDiskBB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-PolishDoughnut.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-PowerLawSpectrum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-RezzollaZhidenko.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-Star.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-StarTrace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-StdPlug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-ThinDiskIronLine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-ThinDiskPL.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-Torus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-UniformSphere.Plo@am__quote@ .C.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .C.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .C.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< libgyoto_lorene_la-RotStar3_1.lo: RotStar3_1.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_lorene_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_lorene_la-RotStar3_1.lo -MD -MP -MF $(DEPDIR)/libgyoto_lorene_la-RotStar3_1.Tpo -c -o libgyoto_lorene_la-RotStar3_1.lo `test -f 'RotStar3_1.C' || echo '$(srcdir)/'`RotStar3_1.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_lorene_la-RotStar3_1.Tpo $(DEPDIR)/libgyoto_lorene_la-RotStar3_1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='RotStar3_1.C' object='libgyoto_lorene_la-RotStar3_1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_lorene_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_lorene_la-RotStar3_1.lo `test -f 'RotStar3_1.C' || echo '$(srcdir)/'`RotStar3_1.C libgyoto_lorene_la-NumericalMetricLorene.lo: NumericalMetricLorene.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_lorene_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_lorene_la-NumericalMetricLorene.lo -MD -MP -MF $(DEPDIR)/libgyoto_lorene_la-NumericalMetricLorene.Tpo -c -o libgyoto_lorene_la-NumericalMetricLorene.lo `test -f 'NumericalMetricLorene.C' || echo '$(srcdir)/'`NumericalMetricLorene.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_lorene_la-NumericalMetricLorene.Tpo $(DEPDIR)/libgyoto_lorene_la-NumericalMetricLorene.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='NumericalMetricLorene.C' object='libgyoto_lorene_la-NumericalMetricLorene.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_lorene_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_lorene_la-NumericalMetricLorene.lo `test -f 'NumericalMetricLorene.C' || echo '$(srcdir)/'`NumericalMetricLorene.C libgyoto_lorene_la-LorenePlug.lo: LorenePlug.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_lorene_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_lorene_la-LorenePlug.lo -MD -MP -MF $(DEPDIR)/libgyoto_lorene_la-LorenePlug.Tpo -c -o libgyoto_lorene_la-LorenePlug.lo `test -f 'LorenePlug.C' || echo '$(srcdir)/'`LorenePlug.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_lorene_la-LorenePlug.Tpo $(DEPDIR)/libgyoto_lorene_la-LorenePlug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='LorenePlug.C' object='libgyoto_lorene_la-LorenePlug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_lorene_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_lorene_la-LorenePlug.lo `test -f 'LorenePlug.C' || echo '$(srcdir)/'`LorenePlug.C libgyoto_stdplug_la-KerrBL.lo: KerrBL.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-KerrBL.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-KerrBL.Tpo -c -o libgyoto_stdplug_la-KerrBL.lo `test -f 'KerrBL.C' || echo '$(srcdir)/'`KerrBL.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-KerrBL.Tpo $(DEPDIR)/libgyoto_stdplug_la-KerrBL.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='KerrBL.C' object='libgyoto_stdplug_la-KerrBL.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-KerrBL.lo `test -f 'KerrBL.C' || echo '$(srcdir)/'`KerrBL.C libgyoto_stdplug_la-KerrKS.lo: KerrKS.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-KerrKS.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-KerrKS.Tpo -c -o libgyoto_stdplug_la-KerrKS.lo `test -f 'KerrKS.C' || echo '$(srcdir)/'`KerrKS.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-KerrKS.Tpo $(DEPDIR)/libgyoto_stdplug_la-KerrKS.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='KerrKS.C' object='libgyoto_stdplug_la-KerrKS.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-KerrKS.lo `test -f 'KerrKS.C' || echo '$(srcdir)/'`KerrKS.C libgyoto_stdplug_la-Minkowski.lo: Minkowski.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-Minkowski.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-Minkowski.Tpo -c -o libgyoto_stdplug_la-Minkowski.lo `test -f 'Minkowski.C' || echo '$(srcdir)/'`Minkowski.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-Minkowski.Tpo $(DEPDIR)/libgyoto_stdplug_la-Minkowski.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Minkowski.C' object='libgyoto_stdplug_la-Minkowski.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-Minkowski.lo `test -f 'Minkowski.C' || echo '$(srcdir)/'`Minkowski.C libgyoto_stdplug_la-ChernSimons.lo: ChernSimons.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-ChernSimons.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-ChernSimons.Tpo -c -o libgyoto_stdplug_la-ChernSimons.lo `test -f 'ChernSimons.C' || echo '$(srcdir)/'`ChernSimons.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-ChernSimons.Tpo $(DEPDIR)/libgyoto_stdplug_la-ChernSimons.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ChernSimons.C' object='libgyoto_stdplug_la-ChernSimons.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-ChernSimons.lo `test -f 'ChernSimons.C' || echo '$(srcdir)/'`ChernSimons.C libgyoto_stdplug_la-RezzollaZhidenko.lo: RezzollaZhidenko.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-RezzollaZhidenko.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-RezzollaZhidenko.Tpo -c -o libgyoto_stdplug_la-RezzollaZhidenko.lo `test -f 'RezzollaZhidenko.C' || echo '$(srcdir)/'`RezzollaZhidenko.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-RezzollaZhidenko.Tpo $(DEPDIR)/libgyoto_stdplug_la-RezzollaZhidenko.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='RezzollaZhidenko.C' object='libgyoto_stdplug_la-RezzollaZhidenko.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-RezzollaZhidenko.lo `test -f 'RezzollaZhidenko.C' || echo '$(srcdir)/'`RezzollaZhidenko.C libgyoto_stdplug_la-Star.lo: Star.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-Star.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-Star.Tpo -c -o libgyoto_stdplug_la-Star.lo `test -f 'Star.C' || echo '$(srcdir)/'`Star.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-Star.Tpo $(DEPDIR)/libgyoto_stdplug_la-Star.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Star.C' object='libgyoto_stdplug_la-Star.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-Star.lo `test -f 'Star.C' || echo '$(srcdir)/'`Star.C libgyoto_stdplug_la-StarTrace.lo: StarTrace.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-StarTrace.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-StarTrace.Tpo -c -o libgyoto_stdplug_la-StarTrace.lo `test -f 'StarTrace.C' || echo '$(srcdir)/'`StarTrace.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-StarTrace.Tpo $(DEPDIR)/libgyoto_stdplug_la-StarTrace.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='StarTrace.C' object='libgyoto_stdplug_la-StarTrace.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-StarTrace.lo `test -f 'StarTrace.C' || echo '$(srcdir)/'`StarTrace.C libgyoto_stdplug_la-FixedStar.lo: FixedStar.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-FixedStar.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-FixedStar.Tpo -c -o libgyoto_stdplug_la-FixedStar.lo `test -f 'FixedStar.C' || echo '$(srcdir)/'`FixedStar.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-FixedStar.Tpo $(DEPDIR)/libgyoto_stdplug_la-FixedStar.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='FixedStar.C' object='libgyoto_stdplug_la-FixedStar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-FixedStar.lo `test -f 'FixedStar.C' || echo '$(srcdir)/'`FixedStar.C libgyoto_stdplug_la-InflateStar.lo: InflateStar.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-InflateStar.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-InflateStar.Tpo -c -o libgyoto_stdplug_la-InflateStar.lo `test -f 'InflateStar.C' || echo '$(srcdir)/'`InflateStar.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-InflateStar.Tpo $(DEPDIR)/libgyoto_stdplug_la-InflateStar.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='InflateStar.C' object='libgyoto_stdplug_la-InflateStar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-InflateStar.lo `test -f 'InflateStar.C' || echo '$(srcdir)/'`InflateStar.C libgyoto_stdplug_la-Torus.lo: Torus.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-Torus.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-Torus.Tpo -c -o libgyoto_stdplug_la-Torus.lo `test -f 'Torus.C' || echo '$(srcdir)/'`Torus.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-Torus.Tpo $(DEPDIR)/libgyoto_stdplug_la-Torus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Torus.C' object='libgyoto_stdplug_la-Torus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-Torus.lo `test -f 'Torus.C' || echo '$(srcdir)/'`Torus.C libgyoto_stdplug_la-OscilTorus.lo: OscilTorus.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-OscilTorus.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-OscilTorus.Tpo -c -o libgyoto_stdplug_la-OscilTorus.lo `test -f 'OscilTorus.C' || echo '$(srcdir)/'`OscilTorus.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-OscilTorus.Tpo $(DEPDIR)/libgyoto_stdplug_la-OscilTorus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='OscilTorus.C' object='libgyoto_stdplug_la-OscilTorus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-OscilTorus.lo `test -f 'OscilTorus.C' || echo '$(srcdir)/'`OscilTorus.C libgyoto_stdplug_la-PowerLawSpectrum.lo: PowerLawSpectrum.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-PowerLawSpectrum.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-PowerLawSpectrum.Tpo -c -o libgyoto_stdplug_la-PowerLawSpectrum.lo `test -f 'PowerLawSpectrum.C' || echo '$(srcdir)/'`PowerLawSpectrum.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-PowerLawSpectrum.Tpo $(DEPDIR)/libgyoto_stdplug_la-PowerLawSpectrum.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='PowerLawSpectrum.C' object='libgyoto_stdplug_la-PowerLawSpectrum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-PowerLawSpectrum.lo `test -f 'PowerLawSpectrum.C' || echo '$(srcdir)/'`PowerLawSpectrum.C libgyoto_stdplug_la-BlackBodySpectrum.lo: BlackBodySpectrum.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-BlackBodySpectrum.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-BlackBodySpectrum.Tpo -c -o libgyoto_stdplug_la-BlackBodySpectrum.lo `test -f 'BlackBodySpectrum.C' || echo '$(srcdir)/'`BlackBodySpectrum.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-BlackBodySpectrum.Tpo $(DEPDIR)/libgyoto_stdplug_la-BlackBodySpectrum.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BlackBodySpectrum.C' object='libgyoto_stdplug_la-BlackBodySpectrum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-BlackBodySpectrum.lo `test -f 'BlackBodySpectrum.C' || echo '$(srcdir)/'`BlackBodySpectrum.C libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.lo: ThermalBremsstrahlungSpectrum.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.Tpo -c -o libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.lo `test -f 'ThermalBremsstrahlungSpectrum.C' || echo '$(srcdir)/'`ThermalBremsstrahlungSpectrum.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.Tpo $(DEPDIR)/libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ThermalBremsstrahlungSpectrum.C' object='libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.lo `test -f 'ThermalBremsstrahlungSpectrum.C' || echo '$(srcdir)/'`ThermalBremsstrahlungSpectrum.C libgyoto_stdplug_la-ComplexAstrobj.lo: ComplexAstrobj.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-ComplexAstrobj.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-ComplexAstrobj.Tpo -c -o libgyoto_stdplug_la-ComplexAstrobj.lo `test -f 'ComplexAstrobj.C' || echo '$(srcdir)/'`ComplexAstrobj.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-ComplexAstrobj.Tpo $(DEPDIR)/libgyoto_stdplug_la-ComplexAstrobj.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ComplexAstrobj.C' object='libgyoto_stdplug_la-ComplexAstrobj.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-ComplexAstrobj.lo `test -f 'ComplexAstrobj.C' || echo '$(srcdir)/'`ComplexAstrobj.C libgyoto_stdplug_la-UniformSphere.lo: UniformSphere.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-UniformSphere.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-UniformSphere.Tpo -c -o libgyoto_stdplug_la-UniformSphere.lo `test -f 'UniformSphere.C' || echo '$(srcdir)/'`UniformSphere.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-UniformSphere.Tpo $(DEPDIR)/libgyoto_stdplug_la-UniformSphere.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='UniformSphere.C' object='libgyoto_stdplug_la-UniformSphere.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-UniformSphere.lo `test -f 'UniformSphere.C' || echo '$(srcdir)/'`UniformSphere.C libgyoto_stdplug_la-PageThorneDisk.lo: PageThorneDisk.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-PageThorneDisk.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-PageThorneDisk.Tpo -c -o libgyoto_stdplug_la-PageThorneDisk.lo `test -f 'PageThorneDisk.C' || echo '$(srcdir)/'`PageThorneDisk.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-PageThorneDisk.Tpo $(DEPDIR)/libgyoto_stdplug_la-PageThorneDisk.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='PageThorneDisk.C' object='libgyoto_stdplug_la-PageThorneDisk.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-PageThorneDisk.lo `test -f 'PageThorneDisk.C' || echo '$(srcdir)/'`PageThorneDisk.C libgyoto_stdplug_la-ThinDiskPL.lo: ThinDiskPL.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-ThinDiskPL.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-ThinDiskPL.Tpo -c -o libgyoto_stdplug_la-ThinDiskPL.lo `test -f 'ThinDiskPL.C' || echo '$(srcdir)/'`ThinDiskPL.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-ThinDiskPL.Tpo $(DEPDIR)/libgyoto_stdplug_la-ThinDiskPL.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ThinDiskPL.C' object='libgyoto_stdplug_la-ThinDiskPL.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-ThinDiskPL.lo `test -f 'ThinDiskPL.C' || echo '$(srcdir)/'`ThinDiskPL.C libgyoto_stdplug_la-PolishDoughnut.lo: PolishDoughnut.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-PolishDoughnut.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-PolishDoughnut.Tpo -c -o libgyoto_stdplug_la-PolishDoughnut.lo `test -f 'PolishDoughnut.C' || echo '$(srcdir)/'`PolishDoughnut.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-PolishDoughnut.Tpo $(DEPDIR)/libgyoto_stdplug_la-PolishDoughnut.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='PolishDoughnut.C' object='libgyoto_stdplug_la-PolishDoughnut.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-PolishDoughnut.lo `test -f 'PolishDoughnut.C' || echo '$(srcdir)/'`PolishDoughnut.C libgyoto_stdplug_la-ThinDiskIronLine.lo: ThinDiskIronLine.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-ThinDiskIronLine.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-ThinDiskIronLine.Tpo -c -o libgyoto_stdplug_la-ThinDiskIronLine.lo `test -f 'ThinDiskIronLine.C' || echo '$(srcdir)/'`ThinDiskIronLine.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-ThinDiskIronLine.Tpo $(DEPDIR)/libgyoto_stdplug_la-ThinDiskIronLine.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ThinDiskIronLine.C' object='libgyoto_stdplug_la-ThinDiskIronLine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-ThinDiskIronLine.lo `test -f 'ThinDiskIronLine.C' || echo '$(srcdir)/'`ThinDiskIronLine.C libgyoto_stdplug_la-DeformedTorus.lo: DeformedTorus.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-DeformedTorus.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-DeformedTorus.Tpo -c -o libgyoto_stdplug_la-DeformedTorus.lo `test -f 'DeformedTorus.C' || echo '$(srcdir)/'`DeformedTorus.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-DeformedTorus.Tpo $(DEPDIR)/libgyoto_stdplug_la-DeformedTorus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='DeformedTorus.C' object='libgyoto_stdplug_la-DeformedTorus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-DeformedTorus.lo `test -f 'DeformedTorus.C' || echo '$(srcdir)/'`DeformedTorus.C libgyoto_stdplug_la-EquatorialHotSpot.lo: EquatorialHotSpot.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-EquatorialHotSpot.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-EquatorialHotSpot.Tpo -c -o libgyoto_stdplug_la-EquatorialHotSpot.lo `test -f 'EquatorialHotSpot.C' || echo '$(srcdir)/'`EquatorialHotSpot.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-EquatorialHotSpot.Tpo $(DEPDIR)/libgyoto_stdplug_la-EquatorialHotSpot.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='EquatorialHotSpot.C' object='libgyoto_stdplug_la-EquatorialHotSpot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-EquatorialHotSpot.lo `test -f 'EquatorialHotSpot.C' || echo '$(srcdir)/'`EquatorialHotSpot.C libgyoto_stdplug_la-StdPlug.lo: StdPlug.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-StdPlug.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-StdPlug.Tpo -c -o libgyoto_stdplug_la-StdPlug.lo `test -f 'StdPlug.C' || echo '$(srcdir)/'`StdPlug.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-StdPlug.Tpo $(DEPDIR)/libgyoto_stdplug_la-StdPlug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='StdPlug.C' object='libgyoto_stdplug_la-StdPlug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-StdPlug.lo `test -f 'StdPlug.C' || echo '$(srcdir)/'`StdPlug.C libgyoto_stdplug_la-PatternDisk.lo: PatternDisk.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-PatternDisk.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-PatternDisk.Tpo -c -o libgyoto_stdplug_la-PatternDisk.lo `test -f 'PatternDisk.C' || echo '$(srcdir)/'`PatternDisk.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-PatternDisk.Tpo $(DEPDIR)/libgyoto_stdplug_la-PatternDisk.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='PatternDisk.C' object='libgyoto_stdplug_la-PatternDisk.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-PatternDisk.lo `test -f 'PatternDisk.C' || echo '$(srcdir)/'`PatternDisk.C libgyoto_stdplug_la-PatternDiskBB.lo: PatternDiskBB.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-PatternDiskBB.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-PatternDiskBB.Tpo -c -o libgyoto_stdplug_la-PatternDiskBB.lo `test -f 'PatternDiskBB.C' || echo '$(srcdir)/'`PatternDiskBB.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-PatternDiskBB.Tpo $(DEPDIR)/libgyoto_stdplug_la-PatternDiskBB.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='PatternDiskBB.C' object='libgyoto_stdplug_la-PatternDiskBB.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-PatternDiskBB.lo `test -f 'PatternDiskBB.C' || echo '$(srcdir)/'`PatternDiskBB.C libgyoto_stdplug_la-DynamicalDisk.lo: DynamicalDisk.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-DynamicalDisk.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk.Tpo -c -o libgyoto_stdplug_la-DynamicalDisk.lo `test -f 'DynamicalDisk.C' || echo '$(srcdir)/'`DynamicalDisk.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk.Tpo $(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='DynamicalDisk.C' object='libgyoto_stdplug_la-DynamicalDisk.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-DynamicalDisk.lo `test -f 'DynamicalDisk.C' || echo '$(srcdir)/'`DynamicalDisk.C libgyoto_stdplug_la-DynamicalDiskBolometric.lo: DynamicalDiskBolometric.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-DynamicalDiskBolometric.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-DynamicalDiskBolometric.Tpo -c -o libgyoto_stdplug_la-DynamicalDiskBolometric.lo `test -f 'DynamicalDiskBolometric.C' || echo '$(srcdir)/'`DynamicalDiskBolometric.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-DynamicalDiskBolometric.Tpo $(DEPDIR)/libgyoto_stdplug_la-DynamicalDiskBolometric.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='DynamicalDiskBolometric.C' object='libgyoto_stdplug_la-DynamicalDiskBolometric.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-DynamicalDiskBolometric.lo `test -f 'DynamicalDiskBolometric.C' || echo '$(srcdir)/'`DynamicalDiskBolometric.C libgyoto_stdplug_la-Disk3D.lo: Disk3D.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-Disk3D.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-Disk3D.Tpo -c -o libgyoto_stdplug_la-Disk3D.lo `test -f 'Disk3D.C' || echo '$(srcdir)/'`Disk3D.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-Disk3D.Tpo $(DEPDIR)/libgyoto_stdplug_la-Disk3D.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Disk3D.C' object='libgyoto_stdplug_la-Disk3D.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-Disk3D.lo `test -f 'Disk3D.C' || echo '$(srcdir)/'`Disk3D.C libgyoto_stdplug_la-DynamicalDisk3D.lo: DynamicalDisk3D.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-DynamicalDisk3D.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk3D.Tpo -c -o libgyoto_stdplug_la-DynamicalDisk3D.lo `test -f 'DynamicalDisk3D.C' || echo '$(srcdir)/'`DynamicalDisk3D.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk3D.Tpo $(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk3D.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='DynamicalDisk3D.C' object='libgyoto_stdplug_la-DynamicalDisk3D.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-DynamicalDisk3D.lo `test -f 'DynamicalDisk3D.C' || echo '$(srcdir)/'`DynamicalDisk3D.C libgyoto_stdplug_la-DirectionalDisk.lo: DirectionalDisk.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-DirectionalDisk.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-DirectionalDisk.Tpo -c -o libgyoto_stdplug_la-DirectionalDisk.lo `test -f 'DirectionalDisk.C' || echo '$(srcdir)/'`DirectionalDisk.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-DirectionalDisk.Tpo $(DEPDIR)/libgyoto_stdplug_la-DirectionalDisk.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='DirectionalDisk.C' object='libgyoto_stdplug_la-DirectionalDisk.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-DirectionalDisk.lo `test -f 'DirectionalDisk.C' || echo '$(srcdir)/'`DirectionalDisk.C mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || 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_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(library_includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(library_includedir)" || 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)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(library_includedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(soverdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(library_includedir)"; 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 \ clean-soverLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -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-library_includeHEADERS install-pkgconfigDATA \ install-soverLTLIBRARIES 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS uninstall-pkgconfigDATA \ uninstall-soverLTLIBRARIES @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-strip uninstall-am .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool clean-soverLTLIBRARIES \ cscopelist-am ctags ctags-am 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-library_includeHEADERS install-man install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-soverLTLIBRARIES 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 tags-am uninstall uninstall-am uninstall-hook \ uninstall-libLTLIBRARIES uninstall-library_includeHEADERS \ uninstall-pkgconfigDATA uninstall-soverLTLIBRARIES uninstall-hook: -rmdir $(DESTDIR)$(soverdir) -rmdir $(DESTDIR)$(pkglibdir) -rmdir $(DESTDIR)$(library_includedir) # 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: Gyoto-1.2.0/lib/Metric.C000066400000000000000000000375241302352257300147250ustar00rootroot00000000000000/* Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include #include #include "GyotoMetric.h" #include "GyotoFactoryMessenger.h" #include "GyotoConverters.h" #include "GyotoProperty.h" #include #include #include using namespace std ; using namespace Gyoto; Register::Entry* Metric::Register_ = NULL; //// Gyoto::Object API GYOTO_PROPERTY_START(Metric::Generic, "The geometry of space-time at this end of the Universe.") GYOTO_PROPERTY_DOUBLE_UNIT(Metric::Generic, Mass, mass, "Mass for scaling geometrical units to meters (kg, 1.).") GYOTO_PROPERTY_BOOL(Metric::Generic, Keplerian, NonKeplerian, keplerian, "Whether to use the Keplerian approximation in circularVelocity().") GYOTO_PROPERTY_DOUBLE(Metric::Generic, DeltaMin, deltaMin, "Minimum step for Legacy integrator (geometrical units, DBL_MIN).") GYOTO_PROPERTY_DOUBLE(Metric::Generic, DeltaMax, deltaMax, "Maximum step for Legacy integrator (geometrical units, DBL_MAX).") GYOTO_PROPERTY_DOUBLE(Metric::Generic, DeltaMaxOverR, deltaMaxOverR, "Max of step/r coordinate for Legacy integrator (geometrical units, 1)") GYOTO_PROPERTY_END(Metric::Generic, Object::properties) /// Metric::Generic::Generic(const int coordkind, const std::string &name) : SmartPointee(), Object(name), mass_(1.), coordkind_(coordkind), delta_min_(GYOTO_DEFAULT_DELTA_MIN), delta_max_(GYOTO_DEFAULT_DELTA_MAX), delta_max_over_r_(GYOTO_DEFAULT_DELTA_MAX_OVER_R), keplerian_(false) { # if GYOTO_DEBUG_ENABLED GYOTO_IF_DEBUG GYOTO_DEBUG_EXPR(coordkind_); GYOTO_DEBUG_EXPR(kind_); GYOTO_ENDIF_DEBUG # endif } Metric::Generic::Generic(Generic const &o): SmartPointee(o), Object(o), mass_(o.mass_), coordkind_(o.coordkind_), delta_min_(o.delta_min_), delta_max_(o.delta_max_), delta_max_over_r_(o.delta_max_over_r_), keplerian_(o.keplerian_) {} Metric::Generic * Metric::Generic::clone() const { string msg = "Metric::Generic::clone() called: cloning not supported for metric kind "; msg += kind(); throwError (msg); return const_cast(this); // to avoid warning } Metric::Generic::~Generic(){ # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif } // Output const string Metric::Generic::kind() const {return kind_;} void Metric::Generic::kind(const string src) { kind_ = src;} /***************Definition of the physical scene**************/ void Metric::Generic::mass(const double mas) { mass_=mas; tellListeners(); } void Metric::Generic::mass(const double mas, const string &unit) { # ifdef GYOTO_DEBUG_ENABLED GYOTO_IF_DEBUG GYOTO_DEBUG_EXPR(mas); GYOTO_DEBUG_EXPR(unit); GYOTO_ENDIF_DEBUG # endif mass(Units::ToKilograms(mas, unit)); # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "(mass="<h1max_at_r) h1max_at_r=abs(pos[2]); if (abs(pos[3])>h1max_at_r) h1max_at_r=abs(pos[3]); } h1max_at_r *= delta_max_over_r_; if (h1max > h1max_at_r) h1max = h1max_at_r; if (h1max>delta_max_) h1max=delta_max_; if (h1max=0) { GYOTO_WARNING << "v>c\n"; return 0.; } return pow(-sum, -0.5); } void Metric::Generic::nullifyCoord(double coord[8]) const { double tdot2; nullifyCoord(coord, tdot2); } void Metric::Generic::nullifyCoord(double coord[8], double& tdot2) const { int i, j; double a, b=0., c=0.; double g[4][4]; gmunu(g, coord); a=g[0][0]; for (i=1;i<=3;++i) { b+=g[0][i]*coord[4+i]; for (j=1;j<=3;++j) { c+=g[i][j]*coord[4+i]*coord[4+j]; } } double sDelta=sqrt(b*b-a*c), am1=1./a; tdot2=(-b+sDelta)*am1; coord[4]=(-b-sDelta)*am1; } double Metric::Generic::ScalarProd(const double pos[4], const double u1[4], const double u2[4]) const { double res=0.; double g[4][4]; gmunu(g, pos); for (int i=0;i<4;i++) { for (int j=0;j<4;j++) { res+=g[i][j]*u1[i]*u2[j]; } } return res; } /***************Geodesic most general integration**************/ double Metric::Generic::gmunu(const double x[4], int mu, int nu) const { double g[4][4]; gmunu(g, x); return g[mu][nu]; } void Metric::Generic::gmunu(double g[4][4], const double x[4]) const { int mu, nu; for (mu=0; mu<4; ++mu) { g[mu][mu]=gmunu(x, mu, mu); for (nu=mu+1; nu<4; ++nu) g[mu][nu]=g[nu][mu]=gmunu(x, mu, nu); } } double Metric::Generic::christoffel(const double * x, int alpha, int mu, int nu) const { double dst[4][4][4]; christoffel(dst, x); return dst[alpha][mu][nu]; } int Metric::Generic::christoffel(double dst[4][4][4], const double * x) const { int alpha, mu, nu; for (alpha=0; alpha<4; ++alpha) { for (mu=0; mu<4; ++mu) { dst[alpha][mu][mu]=christoffel(x, alpha, mu, mu); for (nu=mu+1; nu<4; ++nu) dst[alpha][mu][nu]=dst[alpha][nu][mu]=christoffel(x, alpha, mu, nu); } } return 0; } /* Let : Y=[x0,x1,x2,x3,x0_dot,x1_dot,x2_dot,x3_dot] (dot=d/dtau, tau=proper time) diff is such as : Y_dot=diff(Y) The general equation of geodesics is used. */ int Metric::Generic::diff(const double coord[8], double res[8]) const{ if (coord[4]<1e-6) return 1; res[0]=coord[4]; res[1]=coord[5]; res[2]=coord[6]; res[3]=coord[7]; double dst[4][4][4]; int retval=christoffel(dst, coord); if (retval) return retval; for(int alpha=0; alpha<4; ++alpha) { res[alpha+4]=0.; for (int i=0;i<4;i++) for (int j=0;j<4;j++) res[alpha+4] -= dst[alpha][i][j]*coord[4+i]*coord[4+j]; } return 0; } /*Runge Kutta to order 4 */ //int Metric::Generic::myrk4(const double y[6], const double* cst , double h, double* res) const{ int Metric::Generic::myrk4(Worldline * /* line */ , const double coord[8], double h, double res[8]) const{ //cout << "In Metric::Generic::myrk4" << endl; double k1[8] ; double k2[8] ; double k3[8] ; double k4[8] ; double coord_plus_halfk1[8] ; double sixth_k1[8] ; double coord_plus_halfk2[8] ; double third_k2[8] ; double coord_plus_k3[8] ; double third_k3[8] ; double sixth_k4[8] ; if (diff(coord, k1)) return 1 ; for (int i=0;i<8;i++) { k1[i]=h*k1[i]; coord_plus_halfk1[i]=coord[i]+0.5*k1[i]; sixth_k1[i]=1./6.*k1[i]; } if (diff(coord_plus_halfk1,k2)) return 1 ; for (int i=0;i<8;i++) { k2[i]=h*k2[i]; coord_plus_halfk2[i]=coord[i]+0.5*k2[i]; third_k2[i]=1./3.*k2[i]; } if (diff(coord_plus_halfk2,k3)) return 1 ; for (int i=0;i<8;i++) { k3[i]=h*k3[i]; coord_plus_k3[i]=coord[i]+k3[i]; third_k3[i]=1./3.*k3[i]; } if (diff(coord_plus_k3,k4)) return 1 ; for (int i=0;i<8;i++) { k4[i]=h*k4[i]; sixth_k4[i]=1./6.*k4[i]; } for (int i=0;i<8;i++) { res[i]=coord[i]+sixth_k1[i]+third_k2[i]+third_k3[i]+sixth_k4[i]; } return 0; } void Metric::Generic::circularVelocity(double const * coor, double* vel, double dir) const { if (!keplerian_) { stringstream ss; ss << kind_ << "::circularVelocity() is not implemented. " <<"Use \"\" for the Keplerian approximation."; throwError(ss.str()); } if (coordkind_==GYOTO_COORDKIND_SPHERICAL) { double sinth = sin(coor[2]); double coord[4] = {coor[0], coor[1]*sinth, M_PI*0.5, coor[3]}; vel[1] = vel[2] = 0.; vel[3] = 1./(dir*pow(coord[1], 1.5)); vel[0] = SysPrimeToTdot(coor, vel+1); vel[3] *= vel[0]; } else if (coordkind_==GYOTO_COORDKIND_CARTESIAN) { double rcross=sqrt ( coor[1]*coor[1] + coor[2]*coor[2] ); double Omega=dir*pow(rcross*rcross*rcross, -0.5); //angular Keplerian velocity vel[1] = -coor[2]*Omega; vel[2] = coor[1]*Omega; vel[3] = 0.; vel[0] = SysPrimeToTdot(coor, vel+1); vel[1] *= vel[0]; vel[2] *= vel[0]; } else throwError("Unknownn COORDKIND"); } void Metric::Generic::cartesianVelocity(double const coord[8], double vel[3]) { double tauprime; switch(coordkind_) { case GYOTO_COORDKIND_SPHERICAL: { double r = coord[1]; double costheta = cos(coord[2]), sintheta = sin(coord[2]); double cosphi = cos(coord[3]), sinphi = sin(coord[3]); tauprime = 1./coord[4]; double rprime = coord[5]*tauprime; double thetaprime = coord[6]*tauprime; double phiprime = coord[7]*tauprime; vel[0] = rprime * sintheta * cosphi + r * thetaprime * costheta * cosphi - r * phiprime * sintheta * sinphi; vel[1] = rprime * sintheta * sinphi + r * thetaprime * costheta * sinphi + r * phiprime * cosphi; vel[2] = rprime * costheta - r * thetaprime * sintheta ; } break; case GYOTO_COORDKIND_CARTESIAN: tauprime = 1./coord[4]; vel[0] = coord[5]*tauprime; vel[1] = coord[6]*tauprime; vel[2] = coord[7]*tauprime; break; default: Gyoto::throwError ("Metric::Generic::cartesianVelocity: unknown coordinate kind"); } } int Metric::Generic::myrk4_adaptive(Worldline* line, const double * coord, double lastnorm , double normref, double* coordnew , double h0, double& h1, double h1max) const{ double delta0[8]; double delta0min=1e-15; double dcoord[8]; double eps=0.0001; double S=0.9; double errmin=1e-6; double factnorm=2.; h1max=deltaMax(coord, h1max); //cout << "1st diff" << endl; diff(coord,dcoord) ; for (int i = 0;i<8;i++) delta0[i]=delta0min+eps*(fabs(h0*dcoord[i])); double hbis=0.5*h0; double coordhalf[8]; double coord2[8]; double delta1[8]; double err; int count=0; double newnorm; /*cout << "coord= "; for (int jj=0;jj<8;jj++) { cout << coord[jj] << " " ; } cout << endl;*/ while (1){ count++; //cout << "count in rk Met= " << count << endl; err=0.; //cout << "then diff" << endl; if ( myrk4(line,coord,h0,coordnew) | myrk4(line,coord,hbis,coordhalf)| myrk4(line,coordhalf,hbis,coord2) ) return 1; //cout << "end then diff" << endl; /* cout << "coordnew= "; for (int jj=0;jj<8;jj++) { cout << coordnew[jj] << " " ; } cout << endl;*/ for (int i = 0;i<8;i++){ delta1[i]=coord2[i]-coordnew[i]; double err_i=fabs(delta1[i]/delta0[i]); if (err1) { h0=S*h0*pow(err,-0.25); hbis=0.5*h0; }else{ h1=(err > errmin ? S*h0*pow(err,-0.2) : 4.*h0);//pour éviter les explosions if (fabs(h1)0.)?delta_min_:-delta_min_; if (fabs(h1)>h1max) h1=(h0>0.)?h1max:-h1max; //Testing tangent vector norm stays next to 0 : newnorm=ScalarProd(coordnew, coordnew+4, coordnew+4); if ( fabs(newnorm-normref) > factnorm*fabs(lastnorm-normref) ) { //cout << "norm big!" << endl; //cout << "newnorm= " << newnorm << endl; //myrk4(coord,h0/10.,coordnew); //h1/=10.; } GYOTO_DEBUG << "step used= " << h0 << endl; break; } } return 0; } double Metric::Generic::unitLength() const { return mass_ * GYOTO_G_OVER_C_SQUARE; } double Metric::Generic::unitLength(const string &unit) const { return Units::FromMeters(unitLength(), unit); } int Metric::Generic::isStopCondition(double const * const ) const { return 0; } void Metric::Generic::setParticleProperties(Worldline*, const double*) const { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif } void Metric::Generic::observerTetrad(string const obskind, double const coord[4], double fourvel[4], double screen1[4], double screen2[4], double screen3[4]) const{ // No general way to define the tetrad, should be defined // in specific metrics. Test below will obviously fail for // a machine-initialized tetrad. double normtol=1e-10; if (fabs(ScalarProd(coord,fourvel,fourvel)+1.)>normtol || fabs(ScalarProd(coord,screen1,screen1)-1.)>normtol || fabs(ScalarProd(coord,screen2,screen2)-1.)>normtol || fabs(ScalarProd(coord,screen3,screen3)-1.)>normtol){ cout << "norm= " << ScalarProd(coord,fourvel,fourvel) << " " << ScalarProd(coord,screen1,screen1) << " " << ScalarProd(coord,screen2,screen2) << " " << ScalarProd(coord,screen3,screen3) << endl; throwError("In Metric:observerTetrad: observer's local" " basis is not properly normalized"); } if (fabs(ScalarProd(coord,fourvel,screen1))>normtol || fabs(ScalarProd(coord,fourvel,screen2))>normtol || fabs(ScalarProd(coord,fourvel,screen3))>normtol || fabs(ScalarProd(coord,screen1,screen2))>normtol || fabs(ScalarProd(coord,screen1,screen3))>normtol || fabs(ScalarProd(coord,screen2,screen3))>normtol){ throwError("In Metric:observerTetrad: observer's local" " basis is not orthogonal"); } } double Metric::Generic::getRmb() const{ throwError("In Metric::getRmb: should be implemented " "in the derived metric"); return 0.; // silence warning } double Metric::Generic::getRms() const{ throwError("In Metric::getRms: should be implemented " "in the derived metric"); return 0.; // silence warning } double Metric::Generic::getSpecificAngularMomentum(double rr) const{ throwError("In Metric::getSpecificAngularMomentum: should be implemented " "in the derived metric"); return 0.; // silence warning } double Metric::Generic::getPotential(double const pos[4], double l_cst) const{ throwError("In Metric::getPotential: should be implemented " "in the derived metric"); return 0.; // silence warning } /***************For SmartPointers**************/ int Metric::Generic::getRefCount() { return SmartPointee::getRefCount(); } void Metric::initRegister() { if (Gyoto::Metric::Register_) delete Gyoto::Metric::Register_; Gyoto::Metric::Register_ = NULL; } void Gyoto::Metric::Register(std::string name, Metric::Subcontractor_t* scp) { Register::Entry* ne = new Register::Entry(name, (Gyoto::SmartPointee::Subcontractor_t*) scp, Gyoto::Metric::Register_); Gyoto::Metric::Register_ = ne; } GYOTO_GETSUBCONTRACTOR(Metric) Gyoto-1.2.0/lib/Minkowski.C000066400000000000000000000154361302352257300154530ustar00rootroot00000000000000/* Copyright 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoMinkowski.h" #include "GyotoError.h" #include "GyotoProperty.h" #include using namespace std ; using namespace Gyoto ; using namespace Gyoto::Metric ; //// Property list: // // Note that none of those lines ends with punctation. "," and ";" are // added by the macros where needed. Three steps: // 1- GYOTO_PROPERTY_START() // 2- For each Property we want to support, a line such as: // GYOTO_PROPERTY_(, , ) // Note that the BOOL type is a bit special: the argument // is replaced by two arguments: and // . // 3- GYOTO_PROPERTY_END(, ) // //// GYOTO_PROPERTY_START(Minkowski, "Flat space-time.") GYOTO_PROPERTY_BOOL(Minkowski, Spherical, Cartesian, spherical, "Whether to use spherical or Cartesian coordinates.") GYOTO_PROPERTY_END(Minkowski, Generic::properties) // This is the minimal constructor: it just sets the coordinate kind and // the metric kind name. Minkowski::Minkowski() : Generic(GYOTO_COORDKIND_CARTESIAN, "Minkowski") {} // The cloner is necessary. If the metric class is not trivial (e.g. contains // arrays), it may be necessary to implement the copy constructor as well. Minkowski* Minkowski::clone() const { return new Minkowski(*this); } void Minkowski::gmunu(double g[4][4], const double * pos) const { GYOTO_DEBUG<3 || nu>3) throwError ("Minkowski::gmunu: incorrect value for mu or nu"); if (mu!=nu) return 0.; if (mu==0) return -1.; double tmp; switch (coordKind()) { case GYOTO_COORDKIND_CARTESIAN: return 1.; case GYOTO_COORDKIND_SPHERICAL: switch (mu) { case 1: return 1.; case 2: return pos[1]*pos[1]; case 3: tmp=pos[1]*sin(pos[2]); return tmp*tmp; } } throwError("BUG: this point should not be reached."); return 0.; } double Minkowski::christoffel(const double pos[8], const int alpha, const int mmu, const int nnu) const { if (coordKind()==GYOTO_COORDKIND_CARTESIAN) return 0.; if (alpha==0) return 0; double tmp, tmp2; int mu, nu; if (nnu. */ // Lorene headers #include "metric.h" #include "nbr_spx.h" #include "utilitaires.h" #include "graphique.h" #include "cmp.h" using namespace Lorene; //Gyoto headers #include "GyotoUtils.h" #include "GyotoNumericalMetricLorene.h" #include "GyotoError.h" #include "GyotoFactoryMessenger.h" #include "GyotoProperty.h" //Std headers #include #include #include #include #include #include #include #include #include using namespace Gyoto; using namespace Gyoto::Metric; GYOTO_PROPERTY_START(NumericalMetricLorene) GYOTO_PROPERTY_BOOL(NumericalMetricLorene, MapEt, MapAf, mapEt) GYOTO_PROPERTY_BOOL(NumericalMetricLorene, SpecifyMarginalOrbits, DontSpecifyMarginalOrbits, specifyMarginalOrbits) GYOTO_PROPERTY_BOOL(NumericalMetricLorene, HasSurface, HasNoSurface, hasSurface) GYOTO_PROPERTY_BOOL(NumericalMetricLorene, BosonStarCircular, NonBosonStarCircular, bosonstarcircular) GYOTO_PROPERTY_DOUBLE(NumericalMetricLorene, Horizon, horizon) GYOTO_PROPERTY_DOUBLE(NumericalMetricLorene, Time, initialTime) GYOTO_PROPERTY_DOUBLE(NumericalMetricLorene, Rico, rico) GYOTO_PROPERTY_VECTOR_DOUBLE(NumericalMetricLorene, RefineIntegStep, refineIntegStep) // Keep File last here, so it is processed last in fillElement() // (just before the generic Properties, that is GYOTO_PROPERTY_FILENAME(NumericalMetricLorene, File, directory) GYOTO_PROPERTY_END(NumericalMetricLorene, Generic::properties) // Lorene Metrics are not thread-safe GYOTO_PROPERTY_THREAD_UNSAFE(NumericalMetricLorene) #define GYOTO_NML_PPHI_TOL 5 // tolerance on p_phi drift, percentage NumericalMetricLorene::NumericalMetricLorene() : Generic(GYOTO_COORDKIND_SPHERICAL, "NumericalMetricLorene"), filename_(NULL), mapet_(true), bosonstarcircular_(false), has_surface_(0), specify_marginalorbits_(0), horizon_(0.), r_refine_(0.), h0_refine_(0.), refine_(0), initial_time_(0.), lapse_tab_(NULL), shift_tab_(NULL), gamcov_tab_(NULL), gamcon_tab_(NULL), kij_tab_(NULL), times_(NULL), nb_times_(0), nssurf_tab_(NULL), vsurf_tab_(NULL), lorentz_tab_(NULL), hor_tab_(NULL), risco_(0.), rico_(0.), rmb_(0.) { GYOTO_DEBUG << endl; } NumericalMetricLorene::NumericalMetricLorene(const NumericalMetricLorene&o) : Generic(GYOTO_COORDKIND_SPHERICAL,"NumericalMetricLorene"), filename_(NULL), mapet_(o.mapet_), bosonstarcircular_(o.bosonstarcircular_), has_surface_(o.has_surface_), specify_marginalorbits_(o.specify_marginalorbits_), horizon_(o.horizon_), r_refine_(o.r_refine_), h0_refine_(o.h0_refine_), refine_(o.refine_), initial_time_(o.initial_time_), lapse_tab_(NULL), shift_tab_(NULL), gamcov_tab_(NULL), gamcon_tab_(NULL), kij_tab_(NULL), times_(NULL), nb_times_(0), nssurf_tab_(NULL), vsurf_tab_(NULL), lorentz_tab_(NULL), hor_tab_(NULL), risco_(o.risco_), rico_(o.rico_), rmb_(o.rmb_) { GYOTO_DEBUG << endl; if (o.filename_) directory(o.filename_); } NumericalMetricLorene* NumericalMetricLorene::clone() const{ GYOTO_DEBUG << endl; return new NumericalMetricLorene(*this); } NumericalMetricLorene::~NumericalMetricLorene() { GYOTO_DEBUG<< endl; free(); } void NumericalMetricLorene::free() { GYOTO_DEBUG << "freeing memory\n"; if (filename_) { delete [] filename_; filename_=NULL; } if (lapse_tab_) { delete [] lapse_tab_; lapse_tab_=NULL; } if (shift_tab_) { delete [] shift_tab_; shift_tab_=NULL; } if (gamcov_tab_) { delete [] gamcov_tab_; gamcov_tab_=NULL;} if (gamcon_tab_) { delete [] gamcon_tab_; gamcon_tab_=NULL;} if (kij_tab_) { delete [] kij_tab_; kij_tab_=NULL; } if (times_) { delete [] times_; times_=NULL; } if (nssurf_tab_) { delete [] nssurf_tab_; nssurf_tab_=NULL; } if (vsurf_tab_) { delete [] vsurf_tab_; vsurf_tab_=NULL; } if (lorentz_tab_) { delete [] lorentz_tab_; lorentz_tab_=NULL; } if (hor_tab_) { delete [] hor_tab_; hor_tab_=NULL; } } void NumericalMetricLorene::setMetricSource() { GYOTO_DEBUG << endl; DIR *dp; struct dirent *dirp; if((dp = opendir(filename_)) == NULL) { throwError("In NumericalMetricLorene.C constructor : bad filename_"); } nb_times_=0; while ((dirp = readdir(dp)) != NULL) { nb_times_++; } nb_times_-=2; //for directories . and .. GYOTO_DEBUG << "Nb of metric files= " << nb_times_ << endl; /* NB: ***Caution***, here it is assumed that filename_ contains ONLY the .d Lorene result files, nothing else. */ closedir(dp); if (nb_times_<1) throwError("In NumericalMetricLorene.C: bad nb_times_ value"); lapse_tab_ = new Scalar*[nb_times_] ; shift_tab_ = new Vector*[nb_times_] ; gamcov_tab_ = new Sym_tensor*[nb_times_] ; gamcon_tab_ = new Sym_tensor*[nb_times_] ; kij_tab_ = new Sym_tensor*[nb_times_] ; times_ = new double[nb_times_]; if (has_surface_){ nssurf_tab_ = new Valeur*[nb_times_] ; vsurf_tab_ = new Vector*[nb_times_] ; lorentz_tab_ = new Scalar*[nb_times_] ; hor_tab_ = new Valeur*[nb_times_] ; } if (debug()) { cout << "In NumericalMetricLorene" << endl; cout << "File name=" << filename_ << endl; cout << "Number of time slices=" << nb_times_ << endl; } if (debug()) cout << "NumericalMetricLorene.C: " "initializing geometrical quantities..." << endl; for (int i=1; i<=nb_times_; i++) { ostringstream stream_name ; stream_name << filename_ << "metric" << setw(6) << setfill('0') << i << ".d" ; if (debug()) cout << "Reading file: " << stream_name.str() << endl ; FILE* resu = fopen(stream_name.str().data(), "r") ; if (resu == 0x0) { cerr << "With file name: " << stream_name.str() << endl ; throwError("NumericalMetricLorene.C: Problem opening file!"); } if (debug()) cout << "File read normally." << endl ; double cLor = GYOTO_C*1e-3*1e-4; /* this is c in Lorene units, allows to translate between Lorene times and Gyoto times (Lorene speaks in ms, 10^4 m; Gyoto speaks in natural units): t(Gyoto) = t(Lorene)*cLor */ double time ; fread_be(&time, sizeof(double), 1, resu) ; //cout << "Lorene time= " << setprecision(15) << i << " " << time << endl; //cout << "Gyoto time = " << i-1 << " " << initial_time_+time*cLor << endl; setTimes(initial_time_+time*cLor,i-1); // ***COLLAPSE TIME A GERER Mg3d* grid = new Mg3d(resu) ; Map* map; /* Use Map_af for collapse + Kerr + BS, Map_et for star imaging */ if (mapet_) { // Map_et case //Map_et* map = new Map_et(*grid, resu) ; map = new Map_et(*grid, resu) ; } else { // Map_af case // Map_af* map = new Map_af(*grid, resu) ; map = new Map_af(*grid, resu) ; } Scalar* lapse = new Scalar(*map, *grid, resu) ; (*lapse).std_spectral_base() ; setLapse_tab(lapse,i-1); Vector* shift = new Vector(*map, (*map).get_bvect_spher(), resu) ; setShift_tab(shift,i-1); Sym_tensor* g_ij = new Sym_tensor(*map, (*map).get_bvect_spher(), resu) ; Sym_tensor* g_up_ij = new Sym_tensor(*map, (*map).get_bvect_spher(), resu) ; setGamcov_tab(g_ij,i-1); setGamcon_tab(g_up_ij,i-1); Sym_tensor* kij = new Sym_tensor(*map, (*map).get_bvect_spher(), resu) ; if (has_surface_){ // This seems to be only necessary for collapsing or not collapsing star // --> F.V. October 2015: seems outdated, now produces a bug on dzpuis for (int l=1; l<=3; l++) for (int c=l; c<=3; c++) (*kij).set(l,c).dec_dzpuis(2) ; } setKij_tab(kij,i-1); if (has_surface_){ Scalar* lorentz_factor = new Scalar(*map, *grid, resu) ; lorentz_tab_[i-1] = lorentz_factor; Vector* v_i = new Vector(*map, (*map).get_bvect_spher(), resu) ; vsurf_tab_[i-1] = v_i; Mg3d* grid_surf = new Mg3d(resu) ; Valeur* ns_surf = new Valeur(*grid_surf, resu) ; nssurf_tab_[i-1] = ns_surf; Mg3d* grid_ah = new Mg3d(resu) ; Valeur* horizon = new Valeur(*grid_ah, resu) ; hor_tab_[i-1] = horizon; } if (specify_marginalorbits_){ double r_isco ; fread_be(&r_isco, sizeof(double), 1, resu) ; risco_ = r_isco ; if (debug()) cout << "DEBUG: READ Risco = " << r_isco << endl ; double r_mb ; fread_be(&r_mb, sizeof(double), 1, resu) ; rmb_ = r_mb; if (debug()) cout << "DEBUG: READ Rmb = " << r_mb << endl ; } fclose(resu) ; } if (debug()) cout << "NumericalMetricLorene.C constructor: " "geometrical quantities initialized." << endl; } Sym_tensor** NumericalMetricLorene::getGamcon_tab() const { GYOTO_DEBUG << endl; return gamcon_tab_;} Vector** NumericalMetricLorene::getShift_tab() const { GYOTO_DEBUG << endl; return shift_tab_;} Scalar** NumericalMetricLorene::getLapse_tab() const { GYOTO_DEBUG << endl; return lapse_tab_;} double* NumericalMetricLorene::getTimes() const { GYOTO_DEBUG << endl; return times_;} int NumericalMetricLorene::getNbtimes() const { GYOTO_DEBUG << endl; return nb_times_;} Valeur** NumericalMetricLorene::getNssurf_tab() const { GYOTO_DEBUG << endl; return nssurf_tab_;} Vector** NumericalMetricLorene::getVsurf_tab() const { GYOTO_DEBUG << endl; return vsurf_tab_;} Scalar** NumericalMetricLorene::getLorentz_tab() const { GYOTO_DEBUG << endl; return lorentz_tab_;} Valeur** NumericalMetricLorene::getHor_tab() const { GYOTO_DEBUG << endl; return hor_tab_;} double NumericalMetricLorene::getRms() const { GYOTO_DEBUG << endl; if (rico()!=0.) return rico(); else return risco_; } double NumericalMetricLorene::getRmb() const { GYOTO_DEBUG << endl; return rmb_;} double NumericalMetricLorene::getSpecificAngularMomentum(double rr) const { // Computes the Keplerian specific angular momentum \ell = -u_phi / u_t // for circular geodesics, // for a general axisym metric in the equatorial plane /* // Standard formula: leads to problem at least in Kerr where // gphph_dr goes to zero outside horizon. double pos[4]={0., rr, M_PI/2., 0.}; double gtt_dr =gmunu_up_dr(pos, 0, 0), gtph_dr =gmunu_up_dr(pos, 0, 3), gphph_dr=gmunu_up_dr(pos, 3, 3); double lKep = gtph_dr/gphph_dr + sqrt(gtph_dr/gphph_dr * gtph_dr/gphph_dr - gtt_dr/gphph_dr); if (lKep!=lKep || lKep==lKep+1.){ cerr << "At r= " << rr << endl; throwError("In NML::getSpecificAngMom: lKep not defined here!" " You are probably below the innermost circular orbit."); } */ if (nb_times_>1) throwError("In NML::getSpecificAngularMomentum:" "so far only stationary metric implemented"); int indice_time=0; double th=M_PI/2., ph=0.; // in equatorial plane double rm1 = 1./rr, rsm1 = rm1, rm2 = rm1*rm1, sm1 = 1.; // NB: sinth=1 const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; double B2 = g_ij(3,3).val_point(rr,th,ph); // no mistake here, B2 is g_pp_Lorene, but g_pp_Gyoto/(r2sinth2) if (B2<=0.) throwError("In NML::getSpecificAngMom: bad B2"); double BB = sqrt(B2); double Br = g_ij(3,3).dsdr().val_point(rr,th,ph)/(2.*BB); const Vector& shift = *(shift_tab_[indice_time]); double beta_p = rsm1*shift(3).val_point(rr,th,ph), beta_p_r = rsm1*shift(3).dsdr().val_point(rr,th,ph) -rm2*sm1*shift(3).val_point(rr,th,ph); Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph); if (NN==0.) throwError("In NML::getSpecificAngMom: bad N"); double Nr = lapse->dsdr().val_point(rr,th,ph); double DD = B2*rr*rr/(NN*NN)*beta_p_r*beta_p_r + 4.*Nr/NN*(Br/BB+rm1); if (DD<0.) throwError("In NML::getSpecificAngMom: bad D"); double Vzamo = 0.5*(-BB*rr/NN*beta_p_r+sqrt(DD))/(rm1+Br/BB); // 3+1 l_Kep for any circular QI-coord spacetime: double lKep = BB*rr*Vzamo/(NN-beta_p*BB*rr*Vzamo); return lKep; } double NumericalMetricLorene::getPotential(double const pos[4], double l_cst) const { // returns W= -log(abs(u_t)), so that PD::operator, returning Wsurf-W, // is negative inside doughnut double gtt=gmunu(pos,0,0); double gtph=gmunu(pos,0,3); double gphph=gmunu(pos,3,3); double u_t_squared = (gtph*gtph-gtt*gphph) /(gtt*l_cst*l_cst+2.*l_cst*gtph+gphph); if (u_t_squared<0.) return -DBL_MAX; // so Wsurf-W is always >0, not hit, // 4-velocity not defined return -log(sqrt(u_t_squared)) ; } void NumericalMetricLorene::setLapse_tab(Scalar* lapse, int ii) { GYOTO_DEBUG << endl; lapse_tab_[ii]=lapse;} void NumericalMetricLorene::setShift_tab(Vector* shift, int ii) { GYOTO_DEBUG << endl; shift_tab_[ii]=shift;} void NumericalMetricLorene::setGamcov_tab(Sym_tensor* gamcov, int ii) { GYOTO_DEBUG << endl; gamcov_tab_[ii]=gamcov;} void NumericalMetricLorene::setGamcon_tab(Sym_tensor* gamcon, int ii) { GYOTO_DEBUG << endl; gamcon_tab_[ii]=gamcon;} void NumericalMetricLorene::setKij_tab(Sym_tensor* kij, int ii) { GYOTO_DEBUG << endl; kij_tab_[ii]=kij;} void NumericalMetricLorene::setTimes(double time, int ii) { GYOTO_DEBUG << endl; times_[ii]=time;} int NumericalMetricLorene::diff(const double coord[8], double res[8]) const{ double tt=coord[0], rr=coord[1], th=coord[2], phi=coord[3]; double pos[4]={tt,rr,th,phi}; double rhor=computeHorizon(pos); if (rr0.) { GYOTO_DEBUG << "rr, rhor= " << rr << " " << rhor << endl; GYOTO_DEBUG << "Sub-horizon r, stop" << endl; return 1; } return Generic::diff(coord,res); } int NumericalMetricLorene::diff(double tt, const double y[7], double res[7]) const { GYOTO_DEBUG << endl; /* 3+1 diff called by RK4 WITH ENERGY INTEG, that itself calls the correct diff(double*,double*,int indice_time) with indice_time indicating which metric to consider This diff then returns the simple linear interpolation between the 2 metrics such that t(metric1)>t>=t(metric2) */ double rr=y[1], th=y[2], phi=y[3]; double pos[4]={tt,rr,th,phi}; double rhor=computeHorizon(pos); //cout << endl; //cout << "current t,r,rhoriz= " << setprecision(10) << tt << " " << rr << " " << th << " " << rhor << endl; if (rr0.) { //horizon: stop integration if (debug()){ cout << "In NumericalMetricLorene::diff() "; cout << "rr, rhor= " << rr << " " << rhor << endl; cout << "Sub-horizon r, stop" << endl; } return 1; } int it=nb_times_-1; while(tt=0){ //ASSUMES backward integration, to generalize it--; } //if (it==0) it=-1; //TEST!!! // if (rr<0.187) it=1305; // TEST!!!! // if (rr<1.) return 1; // TEST!!!! //if (it!=4056) return 1; // TEST if (debug()){ cout << "**** metric number= " << it << endl; } if (it==nb_times_-1) { return diff(y,res,nb_times_-1); //use metric nb nb_times_-1 //for all times > max(metric times) } if (it==-1) { return diff(y,res,0); //use metric nb 0 for all times < min(metric times) } if (it==nb_times_-2 || it==0){ // Linear interp for extremal-1 points double res1[7], res2[7]; double t1=times_[it], t2=times_[it+1]; if (diff(y,res1,it) || diff(y,res2,it+1)) return 1; for (int ii=0;ii<7;ii++) res[ii] = (res2[ii]-res1[ii])/(t2-t1)*(tt-t1) + res1[ii]; return 0; } //Else: use 3rd order interp double res1[7], res2[7], res3[7], res4[7]; if (diff(y,res1,it-1) || diff(y,res2,it) || diff(y,res3,it+1) || diff(y,res4,it+2)) return 1; double values[4]; for (int ii=0;ii<7;ii++) { values[0]=res1[ii]; values[1]=res2[ii]; values[2]=res3[ii]; values[3]=res4[ii]; res[ii] = Interpol3rdOrder(tt,it,values); } return 0; } int NumericalMetricLorene::diff(const double y[7], double res[7], int indice_time) const { GYOTO_DEBUG << endl; /* 3+1 diff function WITH ENERGY INTEG, computing the derivatives of the 7-vector : y=[E,r,th,ph,Vr,Vth,Vph] (see CQG 3+1 paper for definition) Calls metric nb indice_time among the various Lorene metric at hand ASSUMED: AXISYMMETRY */ /* clock_t time1, time2; double diftime, clocks = CLOCKS_PER_SEC; time1 = clock(); */ if (indice_time<0 || indice_time>nb_times_-1) { throwError("NumericalMetricLorene::diff: incoherent value of indice_time"); } //NB: here t=theta, not time! double EE=y[0], rr=y[1], th=y[2], phi=y[3], sth=0, cth=0; sincos(th, &sth, &cth); double rsinth = rr*sth, r2sinth2 = rsinth*rsinth, sinth2 = sth*sth; if (rr==0.) throwError("In NumericalMetricLorene.C::diff r is 0!"); if (rsinth==0.) throwError("In NumericalMetricLorene.C::diff on z axis!"); double rm1 = 1./rr, rm2 = rm1*rm1, r2 = rr*rr, rsm1 = 1./rsinth, sm1 = 1./sth, sm2 = sm1*sm1, Vr=y[4], Vth=y[5], Vph=y[6]; /* Important remark! Lorene uses the orthonormal spherical tetrad d/dr, 1/r d/dtheta, 1/(r*sin(theta)) d/dphi, and not the natural basis d/dr, d/dtheta, d/dphi There's thus a change of basis to come back to the natural basis of spherical coordinates. This is why there are plenty of factors r2, 1/r2, 1/rsinth2, ... everywhere */ //clock_t t1=clock(); double myth=th; // TEST //LAPSE Scalar* lapse = lapse_tab_[indice_time]; //double NN = lapse -> val_point(rr,th,phi), NNm1 = 1./NN, double NN = lapse -> val_point(rr,myth,phi), NNm1 = 1./NN, Nr = lapse->dsdr().val_point(rr,th,phi), Nt = lapse->dsdt().val_point(rr,th,phi); //SHIFT const Vector& shift = *(shift_tab_[indice_time]); //double beta_r = shift(1).val_point(rr,th,phi), double beta_r = shift(1).val_point(rr,myth,phi), beta_t = rm1*shift(2).val_point(rr,th,phi), beta_r_r = shift(1).dsdr().val_point(rr,th,phi), beta_r_t = shift(1).dsdt().val_point(rr,th,phi), beta_t_r = rm1*shift(2).dsdr().val_point(rr,th,phi) -rm2*shift(2).val_point(rr,th,phi), beta_t_t = rm1*shift(2).dsdt().val_point(rr,th,phi), beta_p = rsm1*shift(3).val_point(rr,th,phi), beta_p_r = rsm1*shift(3).dsdr().val_point(rr,th,phi) -rm2*sm1*shift(3).val_point(rr,th,phi), beta_p_t = rsm1*shift(3).dsdt().val_point(rr,th,phi) -cth*sm2*rm1*shift(3).val_point(rr,th,phi); //cout << "betar= " << beta_r << endl; //3-METRIC (assumed diagonal) const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]); double g_rt=g_ij(1,2).val_point(rr,th,phi), g_rp=g_ij(1,3).val_point(rr,th,phi), g_tp=g_ij(2,3).val_point(rr,th,phi); if (g_rt!=0. || g_rp!=0. || g_tp!=0.){ throwError("In NumericalMetricLorene.C: 3-metric should be diagonal"); } //cout << "r= " << rr << endl; //cout << "metric= " << NN << " " << beta_r << " " << beta_t << " " << beta_p << endl; //cout << "betar= " << beta_r << " " << NN << " " << Vr << " " << NN*Vr-beta_r << endl; //cout << rr << " " << NN*Vr-beta_r << endl; //cout << g_ij(1,1).val_point(rr,th,phi) << " " << g_ij(2,2).val_point(rr,th,phi) << " " << g_ij(3,3).val_point(rr,th,phi) << endl; // Metrics for christoffels double g_rrr = g_ij(1,1).dsdr().val_point(rr,th,phi), g_rrt = g_ij(1,1).dsdt().val_point(rr,th,phi), g_tt = g_ij(2,2).val_point(rr,th,phi), g_ttr = r2*g_ij(2,2).dsdr().val_point(rr,th,phi)+2.*rr*g_tt, g_ttt = r2*g_ij(2,2).dsdt().val_point(rr,th,phi), g_pp = g_ij(3,3).val_point(rr,th,phi), g_ppr = r2sinth2*g_ij(3,3).dsdr().val_point(rr,th,phi)+2.*rr*sinth2*g_pp, g_ppt = r2sinth2*g_ij(3,3).dsdt().val_point(rr,th,phi) +2.*cth*sth*r2*g_pp; //INVERSE 3-METRIC const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); // double grr=g_up_ij(1,1).val_point(rr,th,phi), double grr=g_up_ij(1,1).val_point(rr,myth,phi), gtt=rm2*g_up_ij(2,2).val_point(rr,th,phi), gpp=rm2*sm2*g_up_ij(3,3).val_point(rr,th,phi); //NB: these are gamma^ij, not g^ij //rr=0.19;th=M_PI/2.;phi=0.; //cout << setprecision(10) << "coef met= " << " " << lapse -> val_point(rr,th,phi) << " " << shift(1).val_point(rr,th,phi) << " " << g_up_ij(1,1).val_point(rr,th,phi) << " " << shift(3).val_point(rr,th,phi) << endl; //EXTRINSIC CURVATURE const Sym_tensor& kij = *(kij_tab_[indice_time]); double Krr = kij(1,1).val_point(rr,th,phi), Ktt = r2*kij(2,2).val_point(rr,th,phi), Kpp = rsinth*rsinth*kij(3,3).val_point(rr,th,phi), Krt = rr*kij(1,2).val_point(rr,th,phi), Krp = rsinth*kij(1,3).val_point(rr,th,phi), Ktp = rr*rsinth*kij(2,3).val_point(rr,th,phi); // cout << Krr << " " << Ktt << " " << Kpp << " " << Krt << " " << Krp << " " << Ktp << endl; //3-CHRISTOFFELS double Grrr = 0.5*grr*g_rrr, Grrt = 0.5*grr*g_rrt, Grtt = -0.5*grr*g_ttr, Grpp = -0.5*grr*g_ppr, Gttt = 0.5*gtt*g_ttt, Gtpp = -0.5*gtt*g_ppt, Gtrr = -0.5*gtt*g_rrt, Gtrt = 0.5*gtt*g_ttr, Gprp = 0.5*gpp*g_ppr, Gptp = 0.5*gpp*g_ppt; double factor = NNm1*(Vr*Nr+Vth*Nt)-Krr*Vr*Vr-Ktt*Vth*Vth-Kpp*Vph*Vph - 2.*Krt*Vr*Vth-2.*Krp*Vr*Vph-2.*Ktp*Vth*Vph; res[0] = EE*NN*(Krr*Vr*Vr+Ktt*Vth*Vth+Kpp*Vph*Vph +2.*(Krt*Vr*Vth+Krp*Vr*Vph+Ktp*Vth*Vph)) - EE*(Vr*Nr+Vth*Nt); res[1] = NN*Vr-beta_r; res[2] = NN*Vth-beta_t; res[3] = NN*Vph-beta_p; res[4] = NN*(Vr*factor+2.*grr*(Krr*Vr+Krt*Vth+Krp*Vph) - Grrr*Vr*Vr-2.*Grrt*Vr*Vth-Grtt*Vth*Vth-Grpp*Vph*Vph) - grr*Nr-Vr*beta_r_r-Vth*beta_r_t; res[5] = NN*(Vth*factor+2.*gtt*(Krt*Vr+Ktt*Vth+Ktp*Vph) - Gttt*Vth*Vth-Gtpp*Vph*Vph-Gtrr*Vr*Vr-2.*Gtrt*Vr*Vth) - gtt*Nt-Vr*beta_t_r-Vth*beta_t_t; res[6] = NN*(Vph*factor+2.*gpp*(Krp*Vr+Ktp*Vth+Kpp*Vph) - 2*Vph*(Vr*Gprp+Vth*Gptp)) - Vr*beta_p_r-Vth*beta_p_t; // cout << beta_p << endl; for (int ii=0;ii<7;ii++){ if (res[ii]!=res[ii]){ cout << "i, res[i]= " << ii << " " << res[ii] << endl; throwError("In NumericalMetricLorene::diff(): " "derivatives are nan"); } if (res[ii]==res[ii]+1.){ cout << "i, res[i]= " << ii << " " << res[ii] << endl; throwError("In NumericalMetricLorene::diff(): " "derivatives are inf"); } } /* time2 = clock(); diftime = time2 - time1; cout << "Time elapsed in 3+1 diff (in sec)= " << setprecision(GYOTO_PREC) << setw(GYOTO_WIDTH) << diftime/clocks << endl; */ /* Homogeneize equations by multiplying by c in Lorene units eg: dX^i/dt = N*V^i-beta^i -> dX^i/cdt = N*V^i-beta^i which is homogeneous (no units on both sides -- in Lorene units, V^i homogeneous to dX^i/cdt, see def of 4-vel with c!=1). Thus, just multiply res by c in Lorene units. Lorene units : time in 10^-3 s, length in 10^4 m So: c_lorene = c_SI*1e-3*1e-4 NB: this is not necessary if time has been recast to Gyoto units in NumericalMetricLorene.C (for collapsing NS, for other metrics, no pb) so that t(Gyoto) = t(Lorene)*c_lorene. Then time is in Gyoto units (natural) and r is in Lorene units (10^4 m), and this mix of units is OK. for (int ii=0;ii<=6;ii++) res[ii]*=GYOTO_C*1e-3*1e-4; */ return 0; } int NumericalMetricLorene::myrk4(double tt, const double coorin[7], double h, double res[7]) const { GYOTO_DEBUG << endl; /* 3+1 RK4, WITH ENERGY INTEG. Called by the 3+1 RK4_ada. */ double k1[7], k2[7], k3[7], k4[7], coor_plus_halfk1[7], sixth_k1[7], coor_plus_halfk2[7], third_k2[7], coor_plus_k3[7], third_k3[7], sixth_k4[7]; if(diff(tt,coorin,k1)) return 1; /* cout << "res diff= " ; for (int ii=0;ii<7;ii++) cout << k1[ii] << " "; cout << endl;*/ for (int i=0;i<7;i++) { k1[i]=h*k1[i]; coor_plus_halfk1[i]=coorin[i]+0.5*k1[i]; reverseR(tt+0.5*h,coor_plus_halfk1); sixth_k1[i]=1./6.*k1[i]; } if(diff(tt+h/2.,coor_plus_halfk1,k2)) return 1; for (int i=0;i<7;i++) { k2[i]=h*k2[i]; coor_plus_halfk2[i]=coorin[i]+0.5*k2[i]; reverseR(tt+0.5*h,coor_plus_halfk2); third_k2[i]=1./3.*k2[i]; } if(diff(tt+h/2.,coor_plus_halfk2,k3)) return 1; for (int i=0;i<7;i++) { k3[i]=h*k3[i]; coor_plus_k3[i]=coorin[i]+k3[i]; reverseR(tt+h,coor_plus_k3); third_k3[i]=1./3.*k3[i]; } if(diff(tt+h,coor_plus_k3,k4)) return 1; for (int i=0;i<7;i++) { k4[i]=h*k4[i]; sixth_k4[i]=1./6.*k4[i]; } for (int i=0;i<7;i++) { res[i]=coorin[i]+sixth_k1[i]+third_k2[i]+third_k3[i]+sixth_k4[i]; } reverseR(tt+h,res); return 0; } //Non adaptive Runge Kutta (called by WorldlineIntegState if fixed step) int NumericalMetricLorene::myrk4(Worldline * line, const double coord[8], double h, double res[8]) const{ GYOTO_DEBUG << endl; double tt=coord[0], rr=coord[1], th=coord[2],rsinth = rr*sin(th), ph=coord[3], tdot=coord[4], rdot=coord[5],thdot=coord[6],phdot=coord[7]; //Check p_phi conservation: double const * const cst = line -> getCst(); double cst_p_ph = cst[1]; double pphi_err=fabs(cst_p_ph-(gmunu(coord,0,3)*tdot + gmunu(coord,3,3) *phdot))/fabs(cst_p_ph)*100.; double pphi_err_tol=GYOTO_NML_PPHI_TOL; /* Next test done on pphi/tdot as pphi propto tdot and tdot can diverge close to horizon. Just check that pphi/tdot is close to zero. */ if (pphi_err/fabs(tdot)>pphi_err_tol){ GYOTO_SEVERE << "tdot: " << fabs(tdot) << endl; if (verbose() >= GYOTO_SEVERE_VERBOSITY){ cerr << "***WARNING: in NumericalMetricLorene::myrk4: p_phi is drifting" " - with error p_phi,x1,x2,x3= " << pphi_err << " %, at " << rr << " " << th << " " << ph << endl; } } //Check p_t conservation if stationary if (nb_times_==1){ double cst_p_t = cst[2]; double pt_err=fabs(cst_p_t-(gmunu(coord,0,0)*tdot + gmunu(coord,0,3) *phdot))/fabs(cst_p_t)*100.; double pt_err_tol=1.;//in percent if (pt_err>pt_err_tol){ if (verbose() >= GYOTO_SEVERE_VERBOSITY){ cout << "***WARNING: in NumericalMetricLorene::myrk4: p_t is drifting" " - with error p_t,x1,x2,x3= " << pt_err << " %, at " << rr << " " << th << " " << ph << endl; } } } if (tdot==0.) throwError("In NumericalMetricLorene.C::myrk4_ada tdot is 0!"); double rprime=rdot/tdot, thprime=thdot/tdot,phprime=phdot/tdot; if (rr==0.) throwError("In NumericalMetricLorene.C::myrk4_ada r is 0!"); if (rsinth==0.) throwError("In NumericalMetricLorene.C::myrk4_ada on z axis!"); // Lapse and shift at tt: double NN, beta[3]; computeNBeta(coord,NN,beta); double beta_r=beta[0], beta_t=beta[1], beta_p=beta[2]; double Vr = 1./NN*(rprime+beta_r), Vth = 1./NN*(thprime+beta_t), Vph = 1./NN*(phprime+beta_p); // Photon's energy as measured by Eulerian observer: double EE = tdot*NN; double coor[7]={EE,rr,th,ph,Vr,Vth,Vph}; double coornew[7]; double tdot_used=tdot;//, tdot_bef=tdot; if (myrk4(tt,coor,h,coornew)) return 1; double tnow = tt+h, rnow=coornew[1], thnow=coornew[2], phnow=coornew[3]; double posend[4]={tnow,rnow,thnow,phnow}; //Lapse and shift at tnow: computeNBeta(posend,NN,beta); beta_r=beta[0]; beta_t=beta[1]; beta_p=beta[2]; rprime=NN*coornew[4]-beta_r; thprime=NN*coornew[5]-beta_t; phprime=NN*coornew[6]-beta_p; double EEend = coornew[0]; tdot_used = EEend/NN; if (tdot_used<0.) GYOTO_SEVERE << "In NumericalMetricLorene.C: WARNING TDOT IS <0" << endl; rdot=rprime*tdot_used; thdot=thprime*tdot_used; phdot=phprime*tdot_used; res[0]=tnow; res[1]=coornew[1]; res[2]=coornew[2]; res[3]=coornew[3]; res[4]=tdot_used; res[5]=rdot; res[6]=thdot; res[7]=phdot; return 0; } //3+1 SPATIAL ADAPTIVE RK4 WITH ENERGY INTEGRATION int NumericalMetricLorene::myrk4_adaptive(double tt, const double coord[7], double, double normref, double coordnew[7], const double cst[2], double& tdot_used, double h0, double& h1, double& hused, double h1max) const{ GYOTO_DEBUG << endl; /* 3+1 RK4_ada, for internal use only (not called directly by WorldlineIntegState). coord=[E,r,th,ph,Vr,Vth,Vph] This function is called by the 4D RK4_ada below. */ double delta0[7], dcoord[7]; //Standard RK4 parameters: double delta0min=1e-15; double S=0.9; double errmin=1e-6; double sigh1=1.; h1max=deltaMax(coord, h1max); /* ***Parameter to fine tuned (mainly for spacetimes with horizon) *** */ /* eps: defines the quality of RK4 integration it must be low enough to ensure proper integration but high enough to prevent from too long integration stepmin: minimum allowed RK4 step, below which integration is stopped important parameter for spacetimes with horizon must be low enough to prevent stopping before hitting and high enough to prevent from too long integration rhormax: is above the largest value of apparent horizon radius for all envolved metrics the stepmin condition is only read for r 100){ throwError("NumericalMetricLorene: too many iterations in RK4"); } err=0.; int step1=myrk4(tt,coord,h0,coordnew); int step21=myrk4(tt,coord,hbis,coordhalf); int step22=myrk4(tt+hbis,coordhalf,hbis,coord2); while (step1 || step21 || step22) { /* If here, then NumColStar::myrk4 returned 1, which means that one step of integration computed above leads to sub-app. horizon location. Divide integration step by 10. Stop condition if step less than stepmin value. */ h0/=10.;hbis/=10.; //Update delta0 with new h0 for (int i = 0;i<7;i++) { delta0[i]=delta0min+eps*(fabs(h0*dcoord[i])); } if (debug()){ cout << "Step divided to " << h0 << endl; } if (fabs(h0) errmin ? S*h0*pow(err,-0.2) : 4.*h0); if (h1<0.) sigh1=-1.;//why sigh1 and fabs(h1)? because otherwise //if h1<0 (possible here if backwards //integration), h1 is < h1min, so h1 is //always set to h1min... if (fabs(h1)h1max) h1=sigh1*h1max; hused=h0; break; } } /* END OF WHILE LOOP FOR STEP DETERMINATION */ return 0; } //End spatial ada RK with E integ //Main adaptive RK4 int NumericalMetricLorene::myrk4_adaptive(Worldline* line, const double coord[8], double lastnorm, double normref, double coordnew[8], double h0, double& h1, double h1max) const { GYOTO_DEBUG << endl; double tt=coord[0], rr=coord[1],th=coord[2],rsinth = rr*sin(th),ph=coord[3], tdot=coord[4], rdot=coord[5],thdot=coord[6],phdot=coord[7]; //Check p_phi conservation: double const * const cst = line -> getCst(); double cst_p_ph = cst[1]; double pphi_err=fabs(cst_p_ph-(gmunu(coord,0,3)*tdot + gmunu(coord,3,3) *phdot))/fabs(cst_p_ph)*100.; double pphi_err_tol=GYOTO_NML_PPHI_TOL; /* Next test done on pphi/tdot as pphi propto tdot and tdot can diverge close to horizon. Just check that pphi/tdot is close to zero. */ if (pphi_err/fabs(tdot)>pphi_err_tol){ if (verbose() >= GYOTO_SEVERE_VERBOSITY){ cerr << "***WARNING: in NumericalMetricLorene::myrk4_adaptive:" " p_phi is drifting" " - with error p_phi,x1,x2,x3= " << pphi_err << " %, at " << rr << " " << th << " " << ph << endl; } } //Check p_t conservation if stationary if (nb_times_==1){ double cst_p_t = cst[2]; double pt_err=fabs(cst_p_t-(gmunu(coord,0,0)*tdot + gmunu(coord,0,3) *phdot))/fabs(cst_p_t)*100.; double pt_err_tol=1.;//in percent if (pt_err>pt_err_tol){ if (verbose() >= GYOTO_SEVERE_VERBOSITY){ cerr << "***WARNING: in NumericalMetricLorene::myrk4: p_t is drifting" " - with error p_t,x1,x2,x3= " << pt_err << " %, at " << rr << " " << th << " " << ph << endl; } } } if (tdot==0.) throwError("In NumericalMetricLorene.C::myrk4_ada tdot is 0!"); double rprime=rdot/tdot, thprime=thdot/tdot,phprime=phdot/tdot; if (rr==0.) throwError("In NumericalMetricLorene.C::myrk4_ada r is 0!"); if (rsinth==0.) throwError("In NumericalMetricLorene.C::myrk4_ada on z axis!"); // Lapse and shift at tt: double NN, beta[3]; computeNBeta(coord,NN,beta); double beta_r=beta[0], beta_t=beta[1], beta_p=beta[2]; double Vr = 1./NN*(rprime+beta_r), Vth = 1./NN*(thprime+beta_t), Vph = 1./NN*(phprime+beta_p); // Photon's energy as measured by Eulerian observer: double EE = tdot*NN; double coor[7]={EE,rr,th,ph,Vr,Vth,Vph}; double coornew[7]; double hused=1000.; if (tdot<0. && h0>0.) h0*=-1.;//to integrate backwards if tdot<0 double tdot_used=tdot;//, tdot_bef=tdot; //to debug: int it=nb_times_-1; while(tt=0){ //ASSUMES backward integration, to generalize it--; } if (refine_){ /* Refined integration: if asked in the XML, the integration step is imposed below the value h0_refine_. */ double h0tmp=h0; if (rrfabs(h0_refine_)) h0=h0_refine_; if (h0*h0tmp<0.) h0*=-1; } if (myrk4_adaptive(tt,coor,lastnorm,normref,coornew, cst,tdot_used,h0,h1,hused, h1max)) { return 1; } double tnow = tt+hused, rnow=coornew[1], thnow=coornew[2], phnow=coornew[3]; double posend[4]={tnow,rnow,thnow,phnow}; //Lapse and shift at tnow: computeNBeta(posend,NN,beta); beta_r=beta[0]; beta_t=beta[1]; beta_p=beta[2]; rprime=NN*coornew[4]-beta_r; thprime=NN*coornew[5]-beta_t; phprime=NN*coornew[6]-beta_p; double EEend = coornew[0]; tdot_used = EEend/NN; if (tdot_used<0.) GYOTO_SEVERE << "In NumericalMetricLorene.C: WARNING TDOT IS <0" << endl; rdot=rprime*tdot_used; thdot=thprime*tdot_used; phdot=phprime*tdot_used; coordnew[0]=tnow; coordnew[1]=coornew[1]; coordnew[2]=coornew[2]; coordnew[3]=coornew[3]; coordnew[4]=tdot_used; coordnew[5]=rdot; coordnew[6]=thdot; coordnew[7]=phdot; return 0; } void NumericalMetricLorene::reverseR(double tt, double coord[7]) const{ GYOTO_DEBUG << endl; if (coord[1]<0.) { double rhor=computeHorizon(coord); if (rhor==0.){ // then no horizon, r=0 is allowed, e.g. boson star case // r vector -> - itself //reverse spatial vector coord[1]*=-1.; coord[2]=M_PI-coord[2]; coord[3]=M_PI+coord[3]; //reverse derivative double pos[4]={tt,coord[1],coord[2],coord[3]}; double NN, beta[3]; computeNBeta(pos,NN,beta); double beta_r=beta[0], beta_t=beta[1]; coord[4]=-coord[4]+2.*beta_r/NN; coord[5]=-coord[5]+2.*beta_t/NN; } } } void NumericalMetricLorene::computeNBeta(const double coord[4], double &NN,double beta[3]) const { GYOTO_DEBUG << endl; double tt=coord[0], rr=coord[1],th=coord[2],rsinth = rr*sin(th),ph=coord[3]; if (rr==0.) throwError("In NumericalMetricLorene.C::computeNBeta r is 0!"); if (rsinth==0.) throwError("In NumericalMetricLorene.C::computeNBeta " "on z axis!"); double rm1 = 1./rr, rsm1 = 1./rsinth; int it=nb_times_-1; while(tt=0){ //ASSUMES backward integration, to generalize it--; } // if (rr<0.187) it=1305; // TEST!!! int ind_nb=it; if (it==-1) ind_nb=0; Scalar* lapse = (lapse_tab_[ind_nb]); NN = lapse->val_point(rr,th,ph); const Vector& shift = *(shift_tab_[ind_nb]); double beta_r = shift(1).val_point(rr,th,ph), beta_t = rm1*shift(2).val_point(rr,th,ph), beta_p = rsm1*shift(3).val_point(rr,th,ph); if ((it==nb_times_-2 && it!=-1) || (it==0 && it!=nb_times_-1)){ // linear interpol //NB: the && conditions are made for the very special case of //nb_times_=1... //Lapse: Scalar* lapse1 = (lapse_tab_[it]); double NN1 = lapse1->val_point(rr,th,ph); Scalar* lapse2 = (lapse_tab_[it+1]); double NN2 = lapse2->val_point(rr,th,ph); double t1=times_[it], t2=times_[it+1]; NN = (NN2-NN1)/(t2-t1)*(tt-t1)+NN1; //Shift: const Vector& shift1 = *(shift_tab_[it]); double beta_r1 = shift1(1).val_point(rr,th,ph), beta_t1 = rm1*shift1(2).val_point(rr,th,ph), beta_p1 = rsm1*shift1(3).val_point(rr,th,ph); const Vector& shift2 = *(shift_tab_[it+1]); double beta_r2 = shift2(1).val_point(rr,th,ph), beta_t2 = rm1*shift2(2).val_point(rr,th,ph), beta_p2 = rsm1*shift2(3).val_point(rr,th,ph); beta_r = (beta_r2-beta_r1)/(t2-t1)*(tt-t1)+beta_r1; beta_t = (beta_t2-beta_t1)/(t2-t1)*(tt-t1)+beta_t1; beta_p = (beta_p2-beta_p1)/(t2-t1)*(tt-t1)+beta_p1; }else if (it > 0 && it < nb_times_-2){ // 3rd order interpo // Lapse: Scalar* lapse1 = (lapse_tab_[it-1]); double NN1 = lapse1->val_point(rr,th,ph); Scalar* lapse2 = (lapse_tab_[it]); double NN2 = lapse2->val_point(rr,th,ph); Scalar* lapse3 = (lapse_tab_[it+1]); double NN3 = lapse3->val_point(rr,th,ph); Scalar* lapse4 = (lapse_tab_[it+2]); double NN4 = lapse4->val_point(rr,th,ph); double values[4]={NN1,NN2,NN3,NN4}; NN = Interpol3rdOrder(tt,it,values); // Shift: const Vector& shift1 = *(shift_tab_[it-1]); const Scalar& betar1=shift1(1), betat1=shift1(2), betap1=shift1(3) ; double beta_r1 = shift1(1).val_point(rr,th,ph), beta_t1 = rm1*shift1(2).val_point(rr,th,ph), beta_p1 = rsm1*shift1(3).val_point(rr,th,ph); const Vector& shift2 = *(shift_tab_[it]); double beta_r2 = shift2(1).val_point(rr,th,ph), beta_t2 = rm1*shift2(2).val_point(rr,th,ph), beta_p2 = rsm1*shift2(3).val_point(rr,th,ph); const Vector& shift3 = *(shift_tab_[it+1]); double beta_r3 = shift3(1).val_point(rr,th,ph), beta_t3 = rm1*shift3(2).val_point(rr,th,ph), beta_p3 = rsm1*shift3(3).val_point(rr,th,ph); const Vector& shift4 = *(shift_tab_[it+2]); double beta_r4 = shift4(1).val_point(rr,th,ph), beta_t4 = rm1*shift4(2).val_point(rr,th,ph), beta_p4 = rsm1*shift4(3).val_point(rr,th,ph); double values_r[4]={beta_r1,beta_r2,beta_r3,beta_r4}; double values_t[4]={beta_t1,beta_t2,beta_t3,beta_t4}; double values_p[4]={beta_p1,beta_p2,beta_p3,beta_p4}; beta_r = Interpol3rdOrder(tt,it,values_r); beta_t = Interpol3rdOrder(tt,it,values_t); beta_p = Interpol3rdOrder(tt,it,values_p); } beta[0]=beta_r; beta[1]=beta_t; beta[2]=beta_p; } double NumericalMetricLorene::gmunu(const double pos[4], int mu, int nu) const { GYOTO_DEBUG << endl; double tt=pos[0]; int it=nb_times_-1; while(tt=0){ //ASSUMES backward integration, to generalize it--; } // it=-1; //DEBUGIT // if (pos[1]<0.187) it=1305; // TEST!!!! double pos3[3]={pos[1],pos[2],pos[3]}; if (it==nb_times_-1) return gmunu(pos3,nb_times_-1,mu,nu); //use metric nb nb_times_-1 //for all times > max(metric times) if (it==-1) return gmunu(pos3,0,mu,nu); //use metric nb 0 for all //times < min(metric times) if (it==nb_times_-2 || it==0){ //linear inter for extremal-1 points double t1=times_[it], t2=times_[it+1]; return (gmunu(pos3,it,mu,nu) -gmunu(pos3,it+1,mu,nu))/(t1-t2)*(tt-t1) + gmunu(pos3,it,mu,nu); } //Else : use 3rd order interp double y1=gmunu(pos3,it-1,mu,nu), y2=gmunu(pos3,it,mu,nu), y3=gmunu(pos3,it+1,mu,nu), y4=gmunu(pos3,it+2,mu,nu); double values[4]={y1,y2,y3,y4}; return Interpol3rdOrder(tt,it,values); } double NumericalMetricLorene::gmunu(const double pos[3], int indice_time, int mu, int nu) const { GYOTO_DEBUG << endl; /* 4D metric. NB: 3-metric supposed to be conformally flat */ if (indice_time<0 || indice_time>nb_times_-1) throwError("NumericalMetricLorene::gmunu: incoherent value of indice_time"); if ( mu<0 || mu>3 || nu<0 || nu>3) throwError("In NumericalMetricLorene::gmunu bad indice value"); double rr=pos[0], r2=rr*rr, th=pos[1], rsinth=rr*sin(th); if (rr==0.) throwError("In NumericalMetricLorene.C::gmunu r is 0!"); if (rsinth==0.) throwError("In NumericalMetricLorene.C::gmunu on z axis!"); double rm1=1./rr, r2sinth2=r2*sin(th)*sin(th), ph=pos[2]; Scalar* lapse = (lapse_tab_[indice_time]); double lapse_val = lapse->val_point(rr,th,ph); const Vector& shift = *(shift_tab_[indice_time]); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]); double res=0.; if ((mu==0) && (nu==0)) { res = -lapse_val*lapse_val // NB: no correction factors due to // change of basis because they // cancel each other +g_ij(1,1).val_point(rr,th,ph) *shift(1).val_point(rr,th,ph) *shift(1).val_point(rr,th,ph) +g_ij(2,2).val_point(rr,th,ph) *shift(2).val_point(rr,th,ph) *shift(2).val_point(rr,th,ph) +g_ij(3,3).val_point(rr,th,ph) *shift(3).val_point(rr,th,ph) *shift(3).val_point(rr,th,ph); }else if ((mu==1) && (nu==1)) { res = g_ij(1,1).val_point(rr,th,ph); }else if ((mu==2) && (nu==2)) { res = r2*g_ij(2,2).val_point(rr,th,ph); }else if ((mu==3) && (nu==3)) { res = r2sinth2*g_ij(3,3).val_point(rr,th,ph); }else if (((mu==0) && (nu==1)) || ((mu==1) && (nu==0)) ) { res = g_ij(1,1).val_point(rr,th,ph)*shift(1).val_point(rr,th,ph); }else if (((mu==0) && (nu==2)) || ((mu==2) && (nu==0)) ) { res = r2*g_ij(2,2).val_point(rr,th,ph)*rm1*shift(2).val_point(rr,th,ph); }else if (((mu==0) && (nu==3)) || ((mu==3) && (nu==0)) ) { res = rsinth*g_ij(3,3).val_point(rr,th,ph)*shift(3).val_point(rr,th,ph); } if (res!=res) throwError("NumericalMetricLorene::gmunu is nan!"); if (res==res+1.) { //cout << "r,th,ph= " << rr << " " << th << " " << ph << endl; //cout << "mu,nu,res= " << mu << " " << nu << " " << res << endl; //throwError("NumericalMetricLorene::gmunu is inf!"); } return res; } double NumericalMetricLorene::gmunu_up_dr(const double pos[4], int mu, int nu) const { GYOTO_DEBUG << endl; double tt=pos[0]; int it=nb_times_-1; while(tt=0){ //ASSUMES backward integration, to generalize it--; } double pos3[3]={pos[1],pos[2],pos[3]}; if (it==nb_times_-1) return gmunu_up_dr(pos3,nb_times_-1,mu,nu); //use metric nb nb_times_-1 //for all times > max(metric times) if (it==-1) return gmunu_up_dr(pos3,0,mu,nu); //use metric nb 0 for all //times < min(metric times) if (it==nb_times_-2 || it==0){ //linear inter for extremal-1 points double t1=times_[it], t2=times_[it+1]; return (gmunu_up_dr(pos3,it,mu,nu) -gmunu_up_dr(pos3,it+1,mu,nu))/(t1-t2)*(tt-t1) + gmunu_up_dr(pos3,it,mu,nu); } //Else : use 3rd order interp double y1=gmunu_up_dr(pos3,it-1,mu,nu), y2=gmunu_up_dr(pos3,it,mu,nu), y3=gmunu_up_dr(pos3,it+1,mu,nu), y4=gmunu_up_dr(pos3,it+2,mu,nu); double values[4]={y1,y2,y3,y4}; return Interpol3rdOrder(tt,it,values); } double NumericalMetricLorene::gmunu_up_dr(const double pos[3], int indice_time, int mu, int nu) const { GYOTO_DEBUG << endl; /* gmunu contravariant, derived wrt r. NB: 3-metric supposed to be conformally flat */ if (indice_time<0 || indice_time>nb_times_-1) throwError("NumericalMetricLorene::gmunu_up_dr: " "incoherent value of indice_time"); if ( (mu!=0 && mu!=3) || (nu!=0 && nu!=3)) throwError("In NumericalMetricLorene::gmunu_up_dr bad indice value"); // NB: so far only t and phi components are coded double rr=pos[0], th=pos[1], rsinth=rr*sin(th), ph=pos[2]; if (rr==0.) throwError("In NumericalMetricLorene.C::gmunu_up_dr r is 0!"); if (rsinth==0.) throwError("In NumericalMetricLorene.C::gmunu_up_dr " "on z axis!"); double rm1=1./rr, rsinthm1=1./(rsinth), rsinthm2=rsinthm1*rsinthm1; Scalar* lapse = (lapse_tab_[indice_time]); double lapse_val = lapse->val_point(rr,th,ph), lapse_valm1=1./lapse_val, lapse_valm2=lapse_valm1*lapse_valm1, lapse_valm3=lapse_valm2*lapse_valm1, lapsedr = lapse->dsdr().val_point(rr,th,ph); const Vector& shift = *(shift_tab_[indice_time]); double betap = shift(3).val_point(rr,th,ph), betapdr = shift(3).dsdr().val_point(rr,th,ph); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]); double g_pp = g_ij(3,3).val_point(rr,th,ph), g_ppdr = g_ij(3,3).dsdr().val_point(rr,th,ph); double res=0.; if ((mu==0) && (nu==0)) { res = 2.*lapsedr*lapse_valm3; }else if ((mu==1) && (nu==1)) { res = 0.; }else if ((mu==2) && (nu==2)) { res = 0.; }else if ((mu==3) && (nu==3)) { res = rsinthm2*(-2.*rm1*(1./g_pp-betap*betap*lapse_valm2) -(g_ppdr/(g_pp*g_pp) +2.*betap*(betapdr*lapse_valm2 -betap*lapsedr*lapse_valm3))); }else if (((mu==0) && (nu==1)) || ((mu==1) && (nu==0)) ) { res = 0.; }else if (((mu==0) && (nu==2)) || ((mu==2) && (nu==0)) ) { res = 0.; }else if (((mu==0) && (nu==3)) || ((mu==3) && (nu==0)) ) { res = lapse_valm2*rsinthm1*(-rm1*betap+betapdr-2.*betap*lapsedr*lapse_valm1); } if (res!=res) throwError("NumericalMetricLorene::gmunu_up_dr is nan!"); if (res==res+1.) throwError("NumericalMetricLorene::gmunu_up_dr is inf!"); return res; } ///////// double NumericalMetricLorene::christoffel(const double coord[4], const int alpha, const int mu, const int nu) const { // 4D christoffels: time interpolation GYOTO_DEBUG << endl; if (nb_times_>1) throwError("In NML::christoffel:" "so far only stationary metric implemented"); double tt = coord[0]; int it=nb_times_-1; while(tt=0) it--; if (it==nb_times_-1) { return christoffel(coord,alpha,mu,nu,nb_times_-1); //use metric nb nb_times_-1 for all times > max(metric times) } if (it==-1) { return christoffel(coord,alpha,mu,nu,0); //use metric nb 0 for all times < min(metric times) } if (it==nb_times_-2 || it==0){ // LINEAR interp for extremal-1 points double t1=times_[it], t2=times_[it+1]; double chris1 = christoffel(coord,alpha,mu,nu,it), chris2 = christoffel(coord,alpha,mu,nu,it+1); double chris = (chris2-chris1)/(t2-t1)*(tt-t1)+chris1; return chris; } //Else: use THIRD ORDER interp double chris1 = christoffel(coord,alpha,mu,nu,it-1), chris2 = christoffel(coord,alpha,mu,nu,it), chris3 = christoffel(coord,alpha,mu,nu,it+1), chris4 = christoffel(coord,alpha,mu,nu,it+2); double values[4]={chris1,chris2,chris3,chris4}; double chris = Interpol3rdOrder(tt,it,values); return chris; } double NumericalMetricLorene::christoffel(const double coord[4], const int alpha, const int mu, const int nu, const int indice_time) const { // 4D christoffels: actual computation on a given time slice // CAUTION: here it assumed that the metric is stationary, axisymmetric, // and that the spacetime is circular (typically, rotating relativistic // stars framework) if (coord[1]==0. || sin(coord[2])==0.) throwError("NML::christoffel:" " bad location"); double rr=coord[1], th=coord[2], ph=coord[3], sinth=0., costh=0.; sincos(th, &sinth, &costh); double r2=rr*rr, rsinth=rr*sinth, sm1=1./sinth, rm1=1./rr, rsm1 = rm1*sm1, sinth2=sinth*sinth, r2sinth2=r2*sinth2, rm2 = rm1*rm1; if ((alpha==0 && mu==0 && nu==1) || (alpha==0 && mu==1 && nu==0)){ Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph), Nr = lapse->dsdr().val_point(rr,th,ph); if (NN==0.) throwError("In NML::christoffel: bad lapse value"); const Vector& shift = *(shift_tab_[indice_time]); double beta_p = rsm1*shift(3).val_point(rr,th,ph); const Sym_tensor& kij = *(kij_tab_[indice_time]); double Krp = rsinth*kij(1,3).val_point(rr,th,ph); return 1./NN*(Nr-Krp*beta_p); }else if ((alpha==0 && mu==0 && nu==2) || (alpha==0 && mu==2 && nu==0)){ Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph), Nt = lapse->dsdt().val_point(rr,th,ph); if (NN==0.) throwError("In NML::christoffel: bad lapse value"); const Vector& shift = *(shift_tab_[indice_time]); double beta_p = rsm1*shift(3).val_point(rr,th,ph); const Sym_tensor& kij = *(kij_tab_[indice_time]); double Ktp = rr*rsinth*kij(2,3).val_point(rr,th,ph); return 1./NN*(Nt-Ktp*beta_p); } else if ((alpha==0 && mu==1 && nu==3) || (alpha==0 && mu==3 && nu==1)) { Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph); if (NN==0.) throwError("In NML::christoffel: bad laspe value"); const Sym_tensor& kij = *(kij_tab_[indice_time]); double Krp = rsinth*kij(1,3).val_point(rr,th,ph); return -Krp/NN; } else if ((alpha==0 && mu==2 && nu==3) || (alpha==0 && mu==3 && nu==2)) { Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph); if (NN==0.) throwError("In NML::christoffel: bad lapse value"); const Sym_tensor& kij = *(kij_tab_[indice_time]); double Ktp = rr*rsinth*kij(2,3).val_point(rr,th,ph); return -Ktp/NN; } else if (alpha==1 && mu==0 && nu==0) { Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph), Nr = lapse->dsdr().val_point(rr,th,ph); const Vector& shift = *(shift_tab_[indice_time]); double beta_p = rsm1*shift(3).val_point(rr,th,ph); const Sym_tensor& kij = *(kij_tab_[indice_time]); double Krp = rsinth*kij(1,3).val_point(rr,th,ph); const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); double grr=g_up_ij(1,1).val_point(rr,th,ph); return NN*grr*(Nr - 2.*Krp*beta_p); } else if (alpha==2 && mu==0 && nu==0) { Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph), Nt = lapse->dsdt().val_point(rr,th,ph); const Vector& shift = *(shift_tab_[indice_time]); double beta_p = rsm1*shift(3).val_point(rr,th,ph); const Sym_tensor& kij = *(kij_tab_[indice_time]); double Ktp = rr*rsinth*kij(1,3).val_point(rr,th,ph); const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); double gtt=1./r2*g_up_ij(1,1).val_point(rr,th,ph); return NN*gtt*(Nt - 2.*Ktp*beta_p); } else if ((alpha==1 && mu==0 && nu==3) || (alpha==1 && mu==3 && nu==0)) { Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph); const Sym_tensor& kij = *(kij_tab_[indice_time]); double Krp = rsinth*kij(1,3).val_point(rr,th,ph); const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); double grr=g_up_ij(1,1).val_point(rr,th,ph); return -NN*grr*Krp; } else if ((alpha==2 && mu==0 && nu==3) || (alpha==2 && mu==3 && nu==0)) { Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph); const Sym_tensor& kij = *(kij_tab_[indice_time]); double Ktp = rr*rsinth*kij(2,3).val_point(rr,th,ph); const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); double gtt=1./r2*g_up_ij(2,2).val_point(rr,th,ph); return -NN*gtt*Ktp; } else if ((alpha==3 && mu==1 && nu==0) || (alpha==3 && mu==0 && nu==1)) { Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph), Nr = lapse->dsdr().val_point(rr,th,ph); const Vector& shift = *(shift_tab_[indice_time]); double beta_p = rsm1*shift(3).val_point(rr,th,ph); double beta_pr = rsm1*shift(3).dsdr().val_point(rr,th,ph) -1./(r2*sinth)*beta_p; const Sym_tensor& kij = *(kij_tab_[indice_time]); double Krp = rsinth*kij(1,3).val_point(rr,th,ph); const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); double gpp=rsm1*rsm1*g_up_ij(3,3).val_point(rr,th,ph); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; double gamma_prp = 0.5*gpp *(r2sinth2*g_ij(3,3).dsdr().val_point(rr,th,ph) +2.*rr*sinth2*g_ij(3,3).val_point(rr,th,ph)); if (NN==0.) throwError("In NML::christoffel: bad lapse value"); return beta_pr + gamma_prp*beta_p -NN*gpp*Krp+beta_p/NN*(Krp*beta_p-Nr); } else if ((alpha==3 && mu==2 && nu==0) || (alpha==3 && mu==0 && nu==2)) { Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph), Nt = lapse->dsdt().val_point(rr,th,ph); const Vector& shift = *(shift_tab_[indice_time]); double beta_p = rsm1*shift(3).val_point(rr,th,ph); double beta_pt = rsm1*shift(3).dsdt().val_point(rr,th,ph) -costh*rsm1*sm1*beta_p; const Sym_tensor& kij = *(kij_tab_[indice_time]); double Ktp = rr*rsinth*kij(2,3).val_point(rr,th,ph); const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); double gpp=rsm1*rsm1*g_up_ij(3,3).val_point(rr,th,ph); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; double gamma_ptp = 0.5*gpp *(r2sinth2*g_ij(3,3).dsdt().val_point(rr,th,ph) +2.*costh*sinth*r2*g_ij(3,3).val_point(rr,th,ph)); if (NN==0.) throwError("In NML::christoffel: bad lapse value"); return beta_pt + gamma_ptp*beta_p -NN*gpp*Ktp+beta_p/NN*(Ktp*beta_p-Nt); } else if (alpha==1 && mu==1 && nu==1) { const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; return 0.5*g_up_ij(1,1).val_point(rr,th,ph) *g_ij(1,1).dsdr().val_point(rr,th,ph); } else if (alpha==1 && mu==3 && nu==3) { const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; return -0.5*g_up_ij(1,1).val_point(rr,th,ph) *(r2sinth2*g_ij(3,3).dsdr().val_point(rr,th,ph) +2.*rr*sinth2*g_ij(3,3).val_point(rr,th,ph)); } else if ((alpha==1 && mu==1 && nu==2) || (alpha==1 && mu==2 && nu==1)) { const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; return 0.5*g_up_ij(1,1).val_point(rr,th,ph) *g_ij(1,1).dsdt().val_point(rr,th,ph); } else if (alpha==1 && mu==2 && nu==2) { const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; return -0.5*g_up_ij(1,1).val_point(rr,th,ph) *(r2*g_ij(2,2).dsdr().val_point(rr,th,ph) + 2.*rr*g_ij(2,2).val_point(rr,th,ph)); } else if (alpha==2 && mu==3 && nu==3) { const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; return -0.5*rm2*g_up_ij(2,2).val_point(rr,th,ph) *(r2sinth2*g_ij(3,3).dsdt().val_point(rr,th,ph) +2.*costh*sinth*r2*g_ij(3,3).val_point(rr,th,ph)); } else if (alpha==2 && mu==1 && nu==1) { const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; return -0.5*rm2*g_up_ij(2,2).val_point(rr,th,ph) *g_ij(1,1).dsdt().val_point(rr,th,ph); } else if (alpha==2 && mu==2 && nu==2) { const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; return 0.5*rm2*g_up_ij(2,2).val_point(rr,th,ph) *(r2*g_ij(2,2).dsdt().val_point(rr,th,ph)); } else if ((alpha==2 && mu==1 && nu==2) || (alpha==2 && mu==2 && nu==1)) { const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; return 0.5*rm2*g_up_ij(2,2).val_point(rr,th,ph) *(r2*g_ij(2,2).dsdr().val_point(rr,th,ph) +2.*rr*g_ij(2,2).val_point(rr,th,ph)); } else if ((alpha==3 && mu==1 && nu==3) || (alpha==3 && mu==3 && nu==1)) { const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph); if (NN==0.) throwError("In NML::christoffel: bad lapse value"); const Vector& shift = *(shift_tab_[indice_time]); double beta_p = rsm1*shift(3).val_point(rr,th,ph); const Sym_tensor& kij = *(kij_tab_[indice_time]); double Krp = rsinth*kij(1,3).val_point(rr,th,ph); return 0.5*rsm1*rsm1*g_up_ij(3,3).val_point(rr,th,ph) *(r2sinth2*g_ij(3,3).dsdr().val_point(rr,th,ph) +2.*rr*sinth2*g_ij(3,3).val_point(rr,th,ph)) + beta_p/NN*Krp; } else if ((alpha==3 && mu==2 && nu==3) || (alpha==3 && mu==3 && nu==2)) { const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph); if (NN==0.) throwError("In NML::christoffel: bad lapse value"); const Vector& shift = *(shift_tab_[indice_time]); double beta_p = rsm1*shift(3).val_point(rr,th,ph); const Sym_tensor& kij = *(kij_tab_[indice_time]); double Ktp = rr*rsinth*kij(1,3).val_point(rr,th,ph); return 0.5*rsm1*rsm1*g_up_ij(3,3).val_point(rr,th,ph) *(r2sinth2*g_ij(3,3).dsdt().val_point(rr,th,ph) +2.*costh*sinth*r2*g_ij(3,3).val_point(rr,th,ph)) + beta_p/NN*Ktp; } // Other christo are zero return 0.; } int NumericalMetricLorene::christoffel(double dst[4][4][4], const double coord[4]) const { // all at once computation of christoffel 4D: time interpolation GYOTO_DEBUG << endl; double tt = coord[0]; if (nb_times_>1) throwError("In NML::christoffel all at once:" "so far only stationary metric implemented"); int it=nb_times_-1; while(tt=0) it--; if (it==nb_times_-1) { return christoffel(dst,coord,nb_times_-1); //use metric nb nb_times_-1 for all times > max(metric times) } if (it==-1) { return christoffel(dst,coord,0); //use metric nb 0 for all times < min(metric times) } if (it==nb_times_-2 || it==0){ // LINEAR interp for extremal-1 points double t1=times_[it], t2=times_[it+1]; double dst1[4][4][4], dst2[4][4][4]; if (christoffel(dst1,coord,it) || christoffel(dst2,coord,it+1)) return 1; int alpha, mu, nu; for (alpha=0; alpha<4; ++alpha) { for (mu=0; mu<4; ++mu) { double dst1c = dst1[alpha][mu][mu], dst2c = dst2[alpha][mu][mu]; dst[alpha][mu][mu]=(dst2c-dst1c)/(t2-t1)*(tt-t1)+dst1c; for (nu=mu+1; nu<4; ++nu){ double dst1c = dst1[alpha][mu][nu], dst2c = dst2[alpha][mu][nu]; dst[alpha][mu][nu]=dst[alpha][nu][mu]= (dst2c-dst1c)/(t2-t1)*(tt-t1)+dst1c; } } } return 0; } //Else: use THIRD ORDER interp double dst1[4][4][4], dst2[4][4][4], dst3[4][4][4], dst4[4][4][4]; if (christoffel(dst1,coord,it-1) || christoffel(dst2,coord,it) || christoffel(dst3,coord,it+1) || christoffel(dst4,coord,it+2)) return 1; int alpha, mu, nu; for (alpha=0; alpha<4; ++alpha) { for (mu=0; mu<4; ++mu) { double values[4]={dst1[alpha][mu][mu],dst2[alpha][mu][mu], dst3[alpha][mu][mu],dst4[alpha][mu][mu]}; dst[alpha][mu][mu]=Interpol3rdOrder(tt,it,values); for (nu=mu+1; nu<4; ++nu){ double values[4]={dst1[alpha][mu][nu],dst2[alpha][mu][nu], dst3[alpha][mu][nu],dst4[alpha][mu][nu]}; dst[alpha][mu][nu]=dst[alpha][nu][mu]=Interpol3rdOrder(tt,it,values); } } } return 0; } int NumericalMetricLorene::christoffel(double dst[4][4][4], const double coord[4], const int indice_time) const { // all at once computation of christoffel 4D: actual computation GYOTO_DEBUG << endl; double sinth=0., costh=0, rr=coord[1], th=coord[2], ph=coord[3]; sincos(th, &sinth, &costh); if (rr==0. || sinth==0.) throwError("NML::christoffel:" " bad location"); double r2=rr*rr, rsinth=rr*sinth, rm1=1./rr, sm1=1./sinth, rsm1 = rm1*sm1, sinth2=sinth*sinth, r2sinth2=r2*sinth2, rm2 = rm1*rm1; Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph), Nr = lapse->dsdr().val_point(rr,th,ph), Nt = lapse->dsdt().val_point(rr,th,ph); if (NN==0.) throwError("In NML::christoffel: bad laspe value"); const Vector& shift = *(shift_tab_[indice_time]); double beta_p = rsm1*shift(3).val_point(rr,th,ph); double beta_pr = rsm1*shift(3).dsdr().val_point(rr,th,ph) -rm1*rsm1*shift(3).val_point(rr,th,ph); double beta_pt = rsm1*shift(3).dsdt().val_point(rr,th,ph) -costh*rsm1*sm1*shift(3).val_point(rr,th,ph); const Sym_tensor& kij = *(kij_tab_[indice_time]); double Krp = rsinth*kij(1,3).val_point(rr,th,ph); double Ktp = rr*rsinth*kij(2,3).val_point(rr,th,ph); const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]); // contravariant 3-metric double grr=g_up_ij(1,1).val_point(rr,th,ph), gtt=rm2*g_up_ij(2,2).val_point(rr,th,ph), gpp=rsm1*rsm1*g_up_ij(3,3).val_point(rr,th,ph); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; // derivation of covariant 3-metric double g_rr_r = g_ij(1,1).dsdr().val_point(rr,th,ph), g_rr_t = g_ij(1,1).dsdt().val_point(rr,th,ph), g_tt_r = r2*g_ij(2,2).dsdr().val_point(rr,th,ph) + 2.*rr*g_ij(2,2).val_point(rr,th,ph), g_tt_t = r2*g_ij(2,2).dsdt().val_point(rr,th,ph), g_pp_r = r2sinth2*g_ij(3,3).dsdr().val_point(rr,th,ph) +2.*rr*sinth2*g_ij(3,3).val_point(rr,th,ph), g_pp_t = r2sinth2*g_ij(3,3).dsdt().val_point(rr,th,ph) +2.*costh*sinth*r2*g_ij(3,3).val_point(rr,th,ph); dst[0][0][1]=dst[0][1][0]=1./NN*(Nr-Krp*beta_p); //checked dst[0][0][2]=dst[0][2][0]=1./NN*(Nt-Ktp*beta_p); //checked dst[0][1][3]=dst[0][3][1]=-Krp/NN; //checked dst[0][2][3]=dst[0][3][2]=-Ktp/NN; //checked dst[1][0][0]=NN*grr*(Nr - 2.*Krp*beta_p - beta_p*beta_p/(2.*NN)*g_pp_r); //checked dst[2][0][0]=NN*gtt*(Nt - 2.*Ktp*beta_p - beta_p*beta_p/(2.*NN)*g_pp_t); //checked dst[1][0][3]=dst[1][3][0]=-grr*(NN*Krp+0.5*beta_p*g_pp_r); //checked dst[2][0][3]=dst[2][3][0]=-gtt*(NN*Ktp+0.5*beta_p*g_pp_t); //checked dst[3][1][0]=dst[3][0][1]=beta_pr + 0.5*gpp*g_pp_r*beta_p -NN*gpp*Krp+beta_p/NN*(Krp*beta_p-Nr); //checked dst[3][2][0]=dst[3][0][2]=beta_pt + 0.5*gpp*g_pp_t*beta_p -NN*gpp*Ktp+beta_p/NN*(Ktp*beta_p-Nt); //checked dst[1][1][1]=0.5*grr*g_rr_r; //checked dst[1][3][3]=-0.5*grr*g_pp_r; //checked dst[1][1][2]=dst[1][2][1]=0.5*grr*g_rr_t; //checked dst[1][2][2]=-0.5*grr*g_tt_r; //checked dst[2][3][3]=-0.5*gtt*g_pp_t; //checked dst[2][1][1]=-0.5*gtt*g_rr_t; //checked dst[2][2][2]=0.5*gtt*g_tt_t; //checked dst[2][1][2]=dst[2][2][1]=0.5*gtt*g_tt_r; //checked dst[3][1][3]=dst[3][3][1]=0.5*gpp*g_pp_r + beta_p/NN*Krp; //checked dst[3][2][3]=dst[3][3][2]=0.5*gpp*g_pp_t + beta_p/NN*Ktp; //checked dst[0][0][0]=0.; dst[0][0][3]=0.; dst[0][3][0]=0.; dst[0][1][1]=0.; dst[0][2][2]=0.; dst[0][3][3]=0.; dst[0][1][2]=0.; dst[0][2][1]=0.; dst[3][0][0]=0.; dst[1][0][1]=0.; dst[1][1][0]=0.; dst[1][0][2]=0.; dst[1][2][0]=0.; dst[2][0][1]=0.; dst[2][1][0]=0.; dst[2][0][2]=0.; dst[2][2][0]=0.; dst[3][0][3]=0.; dst[3][3][0]=0.; dst[1][1][3]=0.; dst[1][3][1]=0.; dst[1][2][3]=0.; dst[1][3][2]=0.; dst[2][1][3]=0.; dst[2][3][1]=0.; dst[2][2][3]=0.; dst[2][3][2]=0.; dst[3][1][1]=0.; dst[3][2][2]=0.; dst[3][3][3]=0.; dst[3][1][2]=0.; dst[3][2][1]=0.; // Oh yeah, this makes 64 christoffels return 0; } double NumericalMetricLorene::christoffel3(const double coord[3], const int indice_time, const int ii, const int jj, const int kk) const { GYOTO_DEBUG << endl; //Computation of 3D Christoffels from the metric : \Gamma^{ii}_{jj kk} //NB: 3-metric supposed to be conformally flat if (indice_time<0 || indice_time>nb_times_-1) throwError("NumericalMetricLorene::christoffel3: " "incoherent value of indice_time"); if ( ii<1 || ii>3 || jj<1 || jj>3 || kk<1 || kk>3 ) throwError("In NumericalMetricLorene::christoffel3 bad indice value"); double rr=coord[0], r2=rr*rr, th=coord[1], sinth=0., costh=0.; sincos(th, &sinth, &costh); double rsinth=rr*sinth; if (rr==0.) throwError("In NumericalMetricLorene.C::christoffel3 r is 0!"); if (rsinth==0.) throwError("In NumericalMetricLorene.C::christoffel3 " "on z axis!"); double rm2=1./r2, rsm1 = 1./rsinth, sinth2=sinth*sinth, r2sinth2=r2*sinth2, ph=coord[2]; Scalar* lapse = (lapse_tab_[indice_time]); Scalar lapseder = lapse->dsdr() ; lapseder.std_spectral_base() ; const Vector& shift = *(shift_tab_[indice_time]); const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; const Sym_tensor& g_up_ij = *(gamcon_tab_[indice_time]) ; double res=0.; if ((ii==1) && (jj==1) && (kk==1)) { res = 0.5*g_up_ij(1,1).val_point(rr,th,ph) *g_ij(1,1).dsdr().val_point(rr,th,ph); }else if(((ii==1) && (jj==1) && (kk==2)) || ((ii==1) && (jj==2) && (kk==1))){ res = 0.5*g_up_ij(1,1).val_point(rr,th,ph) *g_ij(1,1).dsdt().val_point(rr,th,ph); }else if((ii==1) && (jj==2) && (kk==2)){ res = -0.5*g_up_ij(1,1).val_point(rr,th,ph) *(r2*g_ij(2,2).dsdr().val_point(rr,th,ph) + 2.*rr*g_ij(2,2).val_point(rr,th,ph)); }else if((ii==1) && (jj==3) && (kk==3)){ res = -0.5*g_up_ij(1,1).val_point(rr,th,ph) *(r2sinth2*g_ij(3,3).dsdr().val_point(rr,th,ph) +2.*rr*sinth2*g_ij(3,3).val_point(rr,th,ph)); }else if((ii==2) && (jj==2) && (kk==2)){ res = 0.5*rm2*g_up_ij(2,2).val_point(rr,th,ph) *(r2*g_ij(2,2).dsdt().val_point(rr,th,ph)); }else if((ii==2) && (jj==3) && (kk==3)){ res = -0.5*rm2*g_up_ij(2,2).val_point(rr,th,ph) *(r2sinth2*g_ij(3,3).dsdt().val_point(rr,th,ph) +2.*costh*sinth*r2*g_ij(3,3).val_point(rr,th,ph)); }else if((ii==2) && (jj==1) && (kk==1)){ res = -0.5*rm2*g_up_ij(2,2).val_point(rr,th,ph) *g_ij(1,1).dsdt().val_point(rr,th,ph); }else if(((ii==2) && (jj==1) && (kk==2)) || ((ii==2) && (jj==2) && (kk==1))){ res = 0.5*rm2*g_up_ij(2,2).val_point(rr,th,ph) *(r2*g_ij(2,2).dsdr().val_point(rr,th,ph) +2.*rr*g_ij(2,2).val_point(rr,th,ph)); }else if(((ii==3) && (jj==1) && (kk==3)) || ((ii==3) && (jj==3) && (kk==1))){ res = 0.5*rsm1*rsm1*g_up_ij(3,3).val_point(rr,th,ph) *(r2sinth2*g_ij(3,3).dsdr().val_point(rr,th,ph) +2.*rr*sinth2*g_ij(3,3).val_point(rr,th,ph)); }else if(((ii==3) && (jj==2) && (kk==3)) || ((ii==3) && (jj==3) && (kk==2))){ res = 0.5*rsm1*rsm1*g_up_ij(3,3).val_point(rr,th,ph) *(r2sinth2*g_ij(3,3).dsdt().val_point(rr,th,ph) +2.*costh*sinth*r2*g_ij(3,3).val_point(rr,th,ph)); } //Other Christoffels are 0 if (res!=res) { throwError("NumericalMetricLorene::christoffel3 is nan!"); } if (res==res+1.) throwError("NumericalMetricLorene::christoffel3 is inf!"); return res; } double NumericalMetricLorene::computeHorizon(const double* pos) const{ GYOTO_DEBUG << endl; if (!hor_tab_ && !horizon_) return 0.; if (horizon_ && !hor_tab_) return horizon_; if (hor_tab_ && !horizon_){ int it=nb_times_-1; double tt=pos[0]; double* times=getTimes(); while(tt=0){ //ASSUMES backward integration, to generalize it--; } // if (pos[1]<0.187) it=1305; // TEST!!!! double rhor; if (it==nb_times_-1){ return computeHorizon(pos,nb_times_-1); } if (it==-1) return computeHorizon(pos,0); if (it==nb_times_-2 || it==0){ double t1=times[it], t2=times[it+1]; double rhor1=computeHorizon(pos,it), rhor2=computeHorizon(pos,it+1); rhor=(rhor2-rhor1)/(t2-t1)*(tt-t1)+rhor1; return rhor; } double rhor1=computeHorizon(pos,it-1), rhor2=computeHorizon(pos,it), rhor3=computeHorizon(pos,it+1), rhor4=computeHorizon(pos,it+2); double values[4]={rhor1,rhor2,rhor3,rhor4}; rhor=Interpol3rdOrder(tt,it,values); return rhor; } throwError("In NumericalMetricLorene::computeHorizon: " "impossible case"); return 0.; } double NumericalMetricLorene::computeHorizon(const double* pos, int indice_time) const{ GYOTO_DEBUG << endl; if (indice_time<0 || indice_time>nb_times_-1){ throwError("NumericalMetricLorene::computeHorizon" ": incoherent value of indice_time"); } double th=pos[2], phi=pos[3]; Valeur* horizon = (hor_tab_[indice_time]); horizon->std_base_scal(); return horizon->val_point(0,0.,th,phi); } double NumericalMetricLorene::Interpol3rdOrder(double tt, int indice_time, double values[4]) const { GYOTO_DEBUG << endl; //Interpolation at order 3 at point tt, the considered function //taking the values "values" at time indices: indice_time-1,+0,+1,+2. double t1=times_[indice_time-1], t2=times_[indice_time], t3=times_[indice_time+1], t4=times_[indice_time+2]; double y1=values[0], y2=values[1], y3=values[2], y4=values[3]; //Neuville's algorithm //3 first order poly double P12=((tt-t2)*y1+(t1-tt)*y2)/(t1-t2), P23=((tt-t3)*y2+(t2-tt)*y3)/(t2-t3), P34=((tt-t4)*y3+(t3-tt)*y4)/(t3-t4); //2 second order poly double P123=((tt-t3)*P12+(t1-tt)*P23)/(t1-t3), P234=((tt-t4)*P23+(t2-tt)*P34)/(t2-t4); //1 third order poly : the solution double P1234=((tt-t4)*P123+(t1-tt)*P234)/(t1-t4); return P1234; } void NumericalMetricLorene::setParticleProperties(Worldline * line, const double* coord) const { GYOTO_DEBUG << endl; double cst[3]; //norm (ALWAYS conserved here) cst[0]=ScalarProd(coord,coord+4,coord+4); double tdot=coord[4], phdot=coord[7]; //p_phi (ALWAYS conserved here) cst[1]=gmunu(coord,0,3)*tdot + gmunu(coord,3,3)*phdot; if (nb_times_==1){ //p_t (ONLY conserved for stationary case) cst[2]=gmunu(coord,0,0)*tdot + gmunu(coord,0,3)*phdot; } else{ // p_t is never 0, put it to 0 when not conserved cst[2]=0.; } line -> setCst(cst,3); } void NumericalMetricLorene::directory(std::string const &dir) { char const * const cdir=dir.c_str(); filename_ = new char[strlen(cdir)+1]; strcpy(filename_, cdir); setMetricSource(); } std::string NumericalMetricLorene::directory() const { return filename_?string(filename_):string(""); } bool NumericalMetricLorene::hasSurface() const {return has_surface_;} void NumericalMetricLorene::hasSurface(bool s) { has_surface_ = s; if (filename_!=NULL){ throwError("In NumericalMetricLorene::hasSurface " "please provide Surface information before File in XML"); } } bool NumericalMetricLorene::bosonstarcircular() const { return bosonstarcircular_;} void NumericalMetricLorene::bosonstarcircular(bool t) {bosonstarcircular_=t;} bool NumericalMetricLorene::specifyMarginalOrbits() const { return specify_marginalorbits_; } void NumericalMetricLorene::specifyMarginalOrbits(bool s) { specify_marginalorbits_=s; if (filename_!=NULL){ throwError("In NumericalMetricLorene::specifyMarginalOrbits " "please provide Marginal orbits information " "before File in XML"); } } double NumericalMetricLorene::rico() const {return rico_;} void NumericalMetricLorene::rico(double r0) {rico_=r0;} bool NumericalMetricLorene::mapEt() const {return mapet_;} void NumericalMetricLorene::mapEt(bool s) { mapet_ = s; if (filename_!=NULL){ throwError("In NumericalMetricLorene::mapEt " "please provide MapET/MapAF information before File in XML"); } } double NumericalMetricLorene::initialTime() const {return initial_time_;} void NumericalMetricLorene::initialTime(double t0) {initial_time_=t0;} double NumericalMetricLorene::horizon() const {return horizon_;} void NumericalMetricLorene::horizon(double r0) {horizon_=r0;} vector NumericalMetricLorene::refineIntegStep() const { vector v (2, r_refine_); // set both elements to r_refine_ v[1] = h0_refine_; // then set the second one to h0_refine_ return v; } void NumericalMetricLorene::refineIntegStep(vector const &v) { if (v.size() != 2) throwError("NumericalMetricLorene \"RefineIntegStep\" requires exactly 2 tokens"); r_refine_ = v[0]; h0_refine_ = v[1]; } void NumericalMetricLorene::circularVelocity(double const * coord, double* vel, double dir) const { GYOTO_DEBUG << endl; // return Generic::circularVelocity(coord,vel,dir); // TEST!! double tt = coord[0]; int it=nb_times_-1; while(tt=0) it--; if (it==nb_times_-1) { return circularVelocity(coord,vel,dir,nb_times_-1); } if (it==-1) { return circularVelocity(coord,vel,dir,0); } // Linear interp for extremal-1 points if (it==nb_times_-2 || it==0){ double vel1[4], vel2[4]; double t1=times_[it], t2=times_[it+1]; circularVelocity(coord,vel1,dir,it); circularVelocity(coord,vel2,dir,it+1); for (int ii=0;ii<4;ii++) vel[ii] = (vel2[ii]-vel1[ii])/(t2-t1)*(tt-t1) + vel1[ii]; return; } //Else: use 3rd order interp double vel1[4], vel2[4], vel3[4], vel4[4]; circularVelocity(coord,vel1,dir,it-1); circularVelocity(coord,vel2,dir,it); circularVelocity(coord,vel3,dir,it+1); circularVelocity(coord,vel4,dir,it+2); double values[4]; for (int ii=0;ii<4;ii++) { values[0]=vel1[ii]; values[1]=vel2[ii]; values[2]=vel3[ii]; values[3]=vel4[ii]; vel[ii] = Interpol3rdOrder(tt,it,values); } return; } void NumericalMetricLorene::circularVelocity(double const * coor, double* vel, double dir, int indice_time) const { //cout << "IN CIRCULAR" << endl; if (bosonstarcircular_){ // This expression is related to the ZAMO 3-velocity derived // in Grandclement+14 boson star paper //for (int ii=1;ii<=5000;ii++){ //double coorbis[4]={0.,double(ii*0.01),M_PI/2.,0.}; double rr=coor[1], th=coor[2], sinth=sin(th), ph=coor[3]; //double rr=coorbis[1], th=coorbis[2], sinth=sin(th), ph=coorbis[3]; if (rr<=0. || sinth==0.) throwError("In NML::circularv: bad coor"); double rsm1 = 1./(rr*sinth), rm2 = 1/(rr*rr), sm1 = 1./sinth; const Sym_tensor& g_ij = *(gamcov_tab_[indice_time]) ; double B2 = g_ij(3,3).val_point(rr,th,ph); if (B2<=0.) throwError("In NML::circularv: bad B2"); double BB = sqrt(B2); double Br = g_ij(3,3).dsdr().val_point(rr,th,ph)/(2.*BB); const Vector& shift = *(shift_tab_[indice_time]); double beta_p = rsm1*shift(3).val_point(rr,th,ph), beta_p_r = rsm1*shift(3).dsdr().val_point(rr,th,ph) -rm2*sm1*shift(3).val_point(rr,th,ph); Scalar* lapse = lapse_tab_[indice_time]; double NN = lapse -> val_point(rr,th,ph); if (NN==0.) throwError("In NML::circularv: bad N"); double Nr = lapse->dsdr().val_point(rr,th,ph); double DD = B2*rr*rr/(NN*NN)*beta_p_r*beta_p_r + 4.*Nr/NN*(Br/BB+1./rr); if (DD<0.) throwError("In NML::circularv: bad D"); // double g_tt = gmunu(coor,0,0), g_tp = gmunu(coor,0,3); double g_pp = gmunu(coor,3,3); //double g_tt = gmunu(coorbis,0,0), g_tp = gmunu(coorbis,0,3), //g_pp = gmunu(coorbis,3,3); if (g_pp<=0.) throwError("In NML::circularv: bad g_pp"); double Vzamo = 0.5*(-BB*rr/NN*beta_p_r+sqrt(DD))/(1./rr+Br/BB); double Omega = NN*Vzamo/sqrt(g_pp) - beta_p; double ut = 1./(NN*sqrt(1.-Vzamo*Vzamo)); vel[0] = ut; vel[1] = 0.; vel[2] = 0.; vel[3] = Omega*ut; // double ell=2.5; // double pot = 0.5*log((g_tp*g_tp-g_tt*g_pp) // /(g_tt*ell*ell+2.*ell*g_tp+g_pp)); //cout << rr << " " << g_tp*g_tp-g_tt*g_pp << " " << g_tt*ell*ell+2.*ell*g_tp+g_pp << " " << pot << endl; //} double normtol = 1e-6; double norm = ScalarProd(coor,vel,vel); if (fabs(norm+1.)>normtol) { cerr << "At rr=" << coor[1] << endl; throwError("In NML::circularv: bad norm"); } return; } throwError("In NML::circularVelocity: circular velocity not implemented" " for this particular metric"); } Gyoto-1.2.0/lib/Object.C000066400000000000000000000417451302352257300147100ustar00rootroot00000000000000/* Copyright 2014-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoObject.h" #include "GyotoProperty.h" #include "GyotoValue.h" #include "GyotoError.h" #include "GyotoFactoryMessenger.h" #include "GyotoMetric.h" #include "GyotoAstrobj.h" #include "GyotoSpectrum.h" #include "GyotoSpectrometer.h" #include "GyotoScreen.h" #include #include using namespace std ; using namespace Gyoto ; // We do have a propert list. In contains a single item, wich is a // link to the NULL pointer, meaning end-of-the list. This is used to // terminate the property list of our descendents in a // forward-compatible manner, i.e., we may well add very generic // Properties in the future. GYOTO_PROPERTY_START(Gyoto::Object, "Object with properties.") GYOTO_PROPERTY_END(Object, NULL) Gyoto::Object::Object(std::string const &name):kind_(name), plugins_() {} Gyoto::Object::Object():kind_(""), plugins_() {} Gyoto::Object::Object(Object const &o):kind_(o.kind_), plugins_(o.plugins_) {} Gyoto::Object::~Object() {} bool Object::isThreadSafe() const { /** * The default behaviour is to consider that everything is * thread-safe (for the purpose of threads in * Gyoto::Scenery::rayTrace()). * * For Objects that have other Object as children, we need to * recursively ask those children whether they are thread-safe and * accumulate the answer. It can be done in a generic manner as long * as the Object declares its children as properties, this is what * we do here. * * Objects that are never thread-safe must reimplement this function * to simply return "false", which can be done with the pair of * macros GYOTO_OBJECT_THREAD_SAFETY/GYOTO_PROPERTY_THREAD_UNSAFE * respectively in the class declaration and definition. * * Objects that need to clone children that are not declared as * properties in their copy constructors need to reimplement this * method to take care of those children. */ bool safe = true; Property const * prop = getProperties(); SmartPointer child=NULL; while (prop) { if (*prop) { switch (prop -> type) { case Property::metric_t: child=SmartPointer(get(*prop)); break; case Property::screen_t: child=SmartPointer(get(prop)); break; case Property::astrobj_t: child=SmartPointer(get(*prop)); break; case Property::spectrum_t: child=SmartPointer(get(*prop)); break; case Property::spectrometer_t: child=SmartPointer(get(*prop)); break; default: child=NULL; } if (child) safe &= dynamic_cast(child()) -> isThreadSafe(); ++prop; } else { prop=prop->parent; } } GYOTO_DEBUG_EXPR(safe); return safe; } void Object::set(Property const &p, Value val, std::string const &unit) { GYOTO_DEBUG_EXPR(p.type); switch (p.type) { case Property::empty_t: throwError("Attempt to set empty_t Property"); return; case Property::double_t: { Property::set_double_unit_t setu = p.setter_unit.set_double; if (setu) { GYOTO_DEBUG << "double Property which supports unit" << endl; (this->*setu)(val, unit); } else { GYOTO_DEBUG << "double Property which does not support unit" << endl; if (unit != "") throwError("Can't set this property with unit"); set(p, val); } } return; case Property::vector_double_t: { Property::set_vector_double_unit_t setu = p.setter_unit.set_vdouble; if (setu) { GYOTO_DEBUG << "vector Property which supports unit" << endl; (this->*setu)(val, unit); } else { GYOTO_DEBUG << "vector Property which does not support unit" << endl; if (unit != "") throwError("Can't set this property with unit"); set(p, val); } } return; default: GYOTO_DEBUG<< "Not a double_t, vector_double_t or empty_t Property" << endl; if (unit != "") throwError("Can't set this property with unit (not a double)"); set(p, val); return; } } void Object::set(Property const &p, Value val) { # define ___local_case(type) \ case Property::type##_t: \ { \ GYOTO_DEBUG <<"Setting property of type " #type << endl; \ Property::set_##type##_t set = p.setter.set_##type; \ GYOTO_DEBUG_EXPR(set); \ if (!set) throwError("Can't set this Property"); \ (this->*set)(val); \ } \ break switch (p.type) { case Property::empty_t: return; ___local_case(double); ___local_case(bool); ___local_case(long); ___local_case(unsigned_long); ___local_case(size_t); case Property::filename_t: ___local_case(string); case Property::vector_double_t: { Property::set_vector_double_t set = p.setter.set_vdouble; if (!set) throwError("Can't set this Property"); (this->*set)(val); } break; case Property::vector_unsigned_long_t: { Property::set_vector_unsigned_long_t set = p.setter.set_vulong; if (!set) throwError("Can't set this Property"); (this->*set)(val); } break; ___local_case(metric); ___local_case(astrobj); ___local_case(spectrum); ___local_case(spectrometer); ___local_case(screen); default: throwError("Unimplemented Property type in Object::set"); } # undef ___local_case } void Object::set(std::string const &pname, Value val) { Property const * p = property(pname); if (!p) throwError("No Property by that name"); set(*p, ((p->type == Property::bool_t && pname == p->name_false)? Value(!val):val)); } void Object::set(std::string const &pname, Value val, std::string const &unit) { Property const * p = property(pname); if (!p) throwError("No Property by that name"); set(*p, ((p->type == Property::bool_t && pname == p->name_false)? Value(!val):val), unit); } Value Object::get(Property const &p, std::string const &unit) const { if (p.type == Property::double_t) { Property::get_double_unit_t getu = p.getter_unit.get_double; if (getu) return (this->*getu)(unit); if (unit != "") throwError("Can't get this property with unit"); return get(p); } if (p.type == Property::vector_double_t) { Property::get_vector_double_unit_t getu = p.getter_unit.get_vdouble; if (getu) return (this->*getu)(unit); if (unit != "") throwError("Can't get this property with unit"); return get(p); } if (unit != "") throwError("Can't set this property with unit (not a double)"); return get(p); } Value Object::get(Property const &p) const { # define ___local_case(type) \ case Property::type##_t: \ { \ Property::get_##type##_t get = p.getter.get_##type; \ if (!get) throwError("Can't get this Property"); \ val = Value((this->*get)()); \ } \ break Gyoto::Value val; switch (p.type) { case Property::empty_t: throwError("Can't get empty property"); ___local_case(bool); ___local_case(double); ___local_case(long); ___local_case(unsigned_long); ___local_case(size_t); case Property::filename_t: ___local_case(string); case Property::vector_double_t: { Property::get_vector_double_t get = p.getter.get_vdouble; if (!get) throwError("Can't get this Property"); val = (this->*get)(); } break; case Property::vector_unsigned_long_t: { Property::get_vector_unsigned_long_t get = p.getter.get_vulong; if (!get) throwError("Can't get this Property"); val = (this->*get)(); } break; ___local_case(metric); ___local_case(astrobj); ___local_case(spectrum); ___local_case(spectrometer); ___local_case(screen); default: throwError("Unimplemented Property type in Object::get"); } return val; # undef ___local_case } Value Object::get(std::string const &pname) const { Property const * p = property(pname); if (!p) throwError("No Property by that name"); Value res = get(*p); if (p->type == Property::bool_t && pname == p->name_false) return !bool(res); return res; } Value Object::get(std::string const &pname, std::string const &unit) const{ Property const * p = property(pname); if (!p) throwError("No Property by that name"); Value res = get(*p, unit); if (p->type == Property::bool_t && pname == p->name_false) return !bool(res); return res; } Property const * Object::property(std::string const pname) const { Property const * prop = getProperties(); while (prop) { if (*prop) { GYOTO_DEBUG_EXPR(prop->name); if (prop->name == pname || (prop->type==Property::bool_t && prop->name_false == pname)) return prop; ++prop; } else prop=prop->parent; } return NULL; } #ifdef GYOTO_USE_XERCES void Object::fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const { FactoryMessenger * childfmp=NULL; string name=p.name; switch (p.type) { case Property::empty_t: break; case Property::bool_t: fmp->setParameter(get(p)?name:p.name_false); break; case Property::long_t: fmp->setParameter(name, long(get(p))); break; case Property::unsigned_long_t: fmp->setParameter(name, (unsigned long)(get(p))); break; case Property::size_t_t: fmp->setParameter(name, (unsigned long)(size_t(get(p)))); break; case Property::double_t: fmp->setParameter(name, double(get(p))); break; case Property::string_t: case Property::filename_t: fmp->setParameter(name, std::string(get(p))); break; case Property::vector_double_t: fmp->setParameter(name, get(p).operator std::vector()); break; case Property::vector_unsigned_long_t: fmp->setParameter(name, get(p).operator std::vector()); break; case Property::metric_t: fmp->metric(get(p)); break; case Property::astrobj_t: fmp->astrobj(get(p)); break; case Property::screen_t: fmp->screen(get(p)); break; case Property::spectrum_t: { SmartPointer sp=get(p); if (!sp) return; childfmp = fmp -> makeChild ( name ); sp -> fillElement(childfmp); delete childfmp; } break; case Property::spectrometer_t: { SmartPointer spr=get(p); if (!spr) return; childfmp = fmp -> makeChild ( name ); spr -> fillElement(childfmp); delete childfmp; } break; default: throwError("Property type unimplemented in Object::fillProperty()"); } } void Object::fillElement(Gyoto::FactoryMessenger *fmp) const { std::vector const plgs=plugins(); size_t np=plgs.size(); if (np) { std::string plg(plgs[0]); for (size_t i=1; i setSelfAttribute("plugin", plg); } if (kind_ != "") fmp -> setSelfAttribute("kind", kind_); Property const * prop = getProperties(); while (prop) { if (*prop) { if (prop->type != Property::empty_t) fillProperty(fmp, *prop); ++prop; } else prop=prop->parent; } } void Object::setParameters(Gyoto::FactoryMessenger *fmp) { string name="", content="", unit=""; FactoryMessenger * child = NULL; if (fmp) while (fmp->getNextParameter(&name, &content, &unit)) { GYOTO_DEBUG << "Setting '" << name << "' to '" << content << "' (unit='"< plugins; switch (prop->type) { case Property::metric_t: set(*prop, fmp->metric()); break; case Property::astrobj_t: set(*prop, fmp->astrobj()); break; case Property::screen_t: set(*prop, fmp->screen()); break; case Property::spectrum_t: content = fmp -> getAttribute("kind"); child = fmp -> getChild(); plugins = Gyoto::split(fmp -> getAttribute("plugin"), ","); set(*prop, (*Spectrum::getSubcontractor(content, plugins))(child, plugins) ); delete child; break; case Property::spectrometer_t: content = fmp -> getAttribute("kind"); child = fmp -> getChild(); plugins = Gyoto::split(fmp -> getAttribute("plugin"), ","); set(*prop, (*Spectrometer::getSubcontractor(content, plugins))(child, plugins) ); delete child; break; case Property::filename_t: content = fmp->fullPath(content); // no 'break;' here, we need to proceed default: setParameter(*prop, name, content, unit); } } } GYOTO_DEBUG << "Done processing parameters" << endl; } #endif void Object::setParameter(Property const &p, string const &name, string const & content, string const & unit) { Value val; switch (p.type) { case Property::bool_t: val = (name==p.name); break; case Property::long_t: val = strtol(content.c_str(), NULL, 0); break; case Property::unsigned_long_t: val = strtoul(content.c_str(), NULL, 0); break; case Property::size_t_t: val = size_t(strtoul(content.c_str(), NULL, 0)); break; case Property::double_t: val = atof(content.c_str()); set(p, val, unit); return; case Property::filename_t: case Property::string_t: val = content; break; case Property::vector_double_t: val = FactoryMessenger::parseArray(content); set(p, val, unit); return; case Property::vector_unsigned_long_t: val = FactoryMessenger::parseArrayULong(content); break; case Property::metric_t: throwError("Metric can't be set using setParameter()"); default: throwError("Property type unimplemented in Object::setParameter()"); } set(p, val); } int Object::setParameter(string name, string content, string unit) { Property const * prop = property(name); if (!prop) { size_t pos=name.find("::"); if (pos != string::npos) { string childname = name.substr(0,pos); name=name.substr(pos+2); prop=property(childname); if (!prop) return 1; Object * obj=NULL; Value val=get(*prop); switch (prop->type) { case Property::screen_t: obj = SmartPointer(val); break; case Property::metric_t: obj = SmartPointer(val); break; case Property::astrobj_t: obj = SmartPointer(val); break; case Property::spectrum_t: obj = SmartPointer(val); break; case Property::spectrometer_t: obj = SmartPointer(val); break; default: throwError(childname+" is not an object"); } if (obj) return obj -> setParameter(name, content, unit); throwError(childname+" not set yet"); } return 1; } setParameter(*prop, name, content, unit); return 0; } std::string Object::describeProperty(Property const &p) const { string out=p.name+": "; switch (p.type) { case Property::empty_t: return ""; case Property::bool_t: out = p.name + "/" + p.name_false + ": bool"; break; case Property::long_t: out += "long"; break; case Property::unsigned_long_t: out += "unsigned long"; break; case Property::size_t_t: out += "size_t"; break; case Property::double_t: out += "double"; if (p.setter_unit.set_double) out += " with unit"; break; case Property::string_t: out += "string"; break; case Property::filename_t: out += "filename"; break; case Property::vector_double_t: out += "vector"; if (p.setter_unit.set_vdouble) out += " with unit"; break; case Property::vector_unsigned_long_t: out += "vector long"; break; case Property::metric_t: out += "Gyoto::Metric::Generic"; break; case Property::astrobj_t: out += "Gyoto::Astrobj::Generic"; break; case Property::screen_t: out += "Gyoto::Screen"; break; case Property::spectrum_t: out += "Gyoto::Spectrum"; break; case Property::spectrometer_t: out += "Gyoto::Spectrometer"; break; default: throwError("Property type unimplemented in Object::fillProperty()"); } return out; } void Object::help() const { Property const * prop = getProperties(); while (prop) { if (*prop) { if (prop->type==Property::empty_t) { cout << prop->name << endl; if (prop->doc != "") cout << " " << prop->doc << endl; } else { cout << "\t"<< describeProperty(*prop) << endl; if (prop->doc != "") cout << "\t " << prop->doc << endl; } ++prop; } else prop=prop->parent; } } Gyoto-1.2.0/lib/OscilTorus.C000066400000000000000000000336121302352257300156020ustar00rootroot00000000000000#include "GyotoOscilTorus.h" #include "GyotoFactoryMessenger.h" #include "GyotoUtils.h" #include "GyotoPhoton.h" #include "GyotoDefs.h" #include "GyotoProperty.h" #include #include #include #include #include #include #include #include using namespace Gyoto; using namespace Gyoto::Astrobj; using namespace std; GYOTO_PROPERTY_START(OscilTorus, "Geometrical Torus with oscillations.") GYOTO_PROPERTY_DOUBLE(OscilTorus, LargeRadius, largeRadius, "Major radius, distance from centre of tube to centre of torus.") GYOTO_PROPERTY_UNSIGNED_LONG(OscilTorus, Mode, mode, "Mode number of oscillations m.") GYOTO_PROPERTY_DOUBLE(OscilTorus,PolyCst, polyCst, "Polytropic constant kappa.") GYOTO_PROPERTY_DOUBLE(OscilTorus,PolyIndex, polyIndex, "Polytropic index n.") GYOTO_PROPERTY_DOUBLE(OscilTorus,CentralDensity, centralDensity, "Central density.") GYOTO_PROPERTY_STRING(OscilTorus,PerturbKind, perturbKind, "One of: Radial Vertical X Plus Breathing") GYOTO_PROPERTY_DOUBLE(OscilTorus, PerturbIntens, perturbIntens, "Perturbations intensity.") GYOTO_PROPERTY_FILENAME(OscilTorus, EmittingArea, emittingArea, "Only for mode=0, file containing time series of cross section area") GYOTO_PROPERTY_END(OscilTorus, Standard::properties) GYOTO_PROPERTY_ACCESSORS_GEOMETRICAL_SPECIAL(OscilTorus, c_, largeRadius, gg_, updateCachedValues(); , ) GYOTO_PROPERTY_ACCESSORS(OscilTorus, unsigned long, mode_, mode) GYOTO_PROPERTY_ACCESSORS(OscilTorus, double, polycst_, polyCst) GYOTO_PROPERTY_ACCESSORS_SPECIAL(OscilTorus, double, polyindex_, polyIndex, updateCachedValues(); , ) GYOTO_PROPERTY_ACCESSORS(OscilTorus, double, central_density_, centralDensity) GYOTO_PROPERTY_ACCESSORS(OscilTorus, double, perturb_intens_, perturbIntens) void OscilTorus::perturbKind(std::string const &k) { if (k == "Radial") perturb_kind_ = Radial; else if (k == "Vertical") perturb_kind_ = Vertical; else if (k == "X") perturb_kind_ = X; else if (k == "Plus") perturb_kind_ = Plus; else if (k == "Breathing") perturb_kind_ = Breathing; else { string errmsg="unknown perturbation kind: '"; errmsg += k + "'"; throwError(errmsg.c_str()); } updateCachedValues(); } std::string OscilTorus::perturbKind() const { switch (perturb_kind_) { case Radial: return "Radial"; case Vertical: return "Vertical"; case X: return "X"; case Plus: return "Plus"; case Breathing: return "Breathing"; } } std::string OscilTorus::emittingArea() const {return emitting_area_;} void OscilTorus::emittingArea(std::string const &f) { if (f=="" || f.substr(f.size()-1) == "/") { emitting_area_ = ""; with_cross_=0; tt_.clear(); area_.clear(); return; } ifstream file(f, ios::in); if (file) { with_cross_=1; double tt, area; tt_.clear(); area_.clear(); while (!file.eof()) { file >> tt >> area; if (area) { tt_.push_back(tt); area_.push_back(area); } else { //this means that last line of file was blank, area is //never 0, so just forget last line of data break; } file.ignore(numeric_limits::max(), '\n');//next line } nbt_=tt_.size(); emitting_area_ = f; } else throwError("Unable to read " + f); } Gyoto::Astrobj::OscilTorus::OscilTorus() : Standard("OscilTorus"), c_(10.8), mode_(0), polycst_(0.01), polyindex_(0.01), central_density_(0.01), perturb_kind_(Radial), perturb_intens_(0.1), kerrbl_(NULL), tt_(), area_(), nbt_(0), with_cross_(0), sigma_(0.), alpha_(0.), w1_(0.), w2_(0.), omr2_(0.), omth2_(0.), Omegac_(0.), lc_(0.), g_rr_(0.), g_thth_(0.), hold_(false) { GYOTO_DEBUG << "Building OscilTorus" << endl; } Gyoto::Astrobj::OscilTorus::OscilTorus(const OscilTorus &orig) : Standard(orig), c_(orig.c_), mode_(orig.mode_), polycst_(orig.polycst_), polyindex_(orig.polyindex_), central_density_(orig.central_density_), perturb_kind_(orig.perturb_kind_), perturb_intens_(orig.perturb_intens_), kerrbl_(NULL), tt_(orig.tt_), area_(orig.area_), nbt_(orig.nbt_), with_cross_(orig.with_cross_), sigma_(orig.sigma_), alpha_(orig.alpha_), w1_(orig.w1_), w2_(orig.w2_), omr2_(orig.omr2_), omth2_(orig.omth2_), Omegac_(orig.Omegac_), lc_(orig.lc_), g_rr_(orig.g_rr_), g_thth_(orig.g_thth_), hold_(orig.hold_) { GYOTO_DEBUG << "Copying OscilTorus" << endl; if (gg_) kerrbl_=SmartPointer(gg_); gg_->hook(this); } OscilTorus * OscilTorus::clone() const { return new OscilTorus(*this); } Gyoto::Astrobj::OscilTorus::~OscilTorus() { GYOTO_DEBUG << "Destroying OscilTorus" << endl; if (gg_) gg_->unhook(this); } double OscilTorus::operator()(double const pos[4]) { // cout << "pos= " << pos[1] << " " << pos[2] << " " << pos[3] << endl; // if far from the torus center, return any >0 value, // no hit // if (fabs(pos[1]-c_)/c_*100. > 50.) return 100.; // USE RMax IN XML INSTEAD double x_bar=0., y_bar=0.; computeXbYb(pos,x_bar,y_bar); // cout << "xb,yb= " << x_bar << " " << y_bar << endl; double uu=0.; // perturbation-dependent factor of surface function switch (perturb_kind_) { case Radial: uu = x_bar; break; case Vertical: uu = y_bar; break; case X: uu = x_bar*y_bar; break; case Plus: case Breathing: uu = 1+w1_*x_bar*x_bar+w2_*y_bar*y_bar; break; default: throwError("In OscilTorus.C::operator():" "Unrecognized perturbation kind"); } // non-perturbed torus f double fnoperturb = omr2_*x_bar*x_bar + omth2_*y_bar*y_bar - 1.; // correction double correc=perturb_intens_*sigma_*alpha_*uu *cos(mode_*pos[3] - Omegac_*(sigma_+mode_)*pos[0]); double ff = fnoperturb + correc; // perturbed torus f //cout << "ff= " << ff << endl; return ff; } void OscilTorus::getVelocity(double const pos[4], double vel[4]) { //cout << "in getveloc" << endl; double gtt=kerrbl_->gmunu_up(pos,0,0); double gthth=kerrbl_->gmunu_up(pos,2,2); double grr=kerrbl_->gmunu_up(pos,1,1); double gpp=kerrbl_->gmunu_up(pos,3,3); double gtp=kerrbl_->gmunu_up(pos,0,3); // Beta parameter double poly=(polyindex_+1.)/polyindex_; double centralp = polycst_*pow(central_density_,poly); double x_bar=0., y_bar=0.; computeXbYb(pos,x_bar,y_bar); double vr=0., vth=0.; switch (perturb_kind_) { case Radial: vr = 1.; break; case Vertical: vth = 1.; break; case X: vr = y_bar; vth = x_bar; break; case Plus: case Breathing: vr = 2.*w1_*x_bar; vth = 2.*w2_*y_bar; break; default: throwError("In OscilTorus.C::operator():" "Unrecognized perturbation kind"); } double u_r = -perturb_intens_*sqrt(centralp/central_density_)*sqrt(g_rr_) *alpha_*vr *sin(mode_*pos[3] - Omegac_*(sigma_+mode_)*pos[0]); double u_th = perturb_intens_*sqrt(centralp/central_density_)*sqrt(g_thth_) *alpha_*vth *sin(mode_*pos[3] - Omegac_*(sigma_+mode_)*pos[0]); double u_t2 = (-1.-grr*u_r*u_r-gthth*u_th*u_th)/ (gtt+lc_*lc_*gpp-2.*lc_*gtp); //cout << "num,deno= " << -1.-grr*u_r*u_r-gthth*u_th*u_th << " " << gtt+lc_*lc_*gpp-2.*lc_*gtp << endl; if (u_t2 < 0.) { stringstream ss; ss << "OscilTorus::getVelocity(pos=["; for (int i=0; i<3; ++i) ss << pos[i] << ", "; ss << pos[3] << "]): u_t^2 is negative."; throwError(ss.str()); } double u_t=-sqrt(u_t2); double u_p=-lc_*u_t; vel[0] = gtt*u_t+gtp*u_p; vel[1] = grr*u_r; vel[2] = gthth*u_th; vel[3] = gpp*u_p+gtp*u_t; } void OscilTorus::computeXbYb(const double * pos, double & xb, double & yb){ double aa=kerrbl_->spin(); // Computations at the torus center for Omegac_, lc_ double posc[4]={0.,c_,M_PI/2.,0.};//don't care about t and phi double g_tt=gg_->gmunu(posc,0,0);// covar components double g_rr_=gg_->gmunu(posc,1,1); double g_thth_=gg_->gmunu(posc,2,2); double g_tp=gg_->gmunu(posc,0,3); double g_pp=gg_->gmunu(posc,3,3); double Omegac_=1./(pow(c_,1.5)+aa); // Kepler rotation vel double lc_=-(Omegac_*g_pp+g_tp)/(Omegac_*g_tp+g_tt); // Rescaled ang mom // Now computations at the torus surface for gmunu_up coef double gtt=kerrbl_->gmunu_up(pos,0,0); double gthth=kerrbl_->gmunu_up(pos,2,2); double grr=kerrbl_->gmunu_up(pos,1,1); double gpp=kerrbl_->gmunu_up(pos,3,3); double gtp=kerrbl_->gmunu_up(pos,0,3); // Beta parameter double poly=(polyindex_+1.)/polyindex_; double centralp = polycst_*pow(central_density_,poly); double cs2 = poly*centralp/central_density_; double ut_central2 = -1/(g_tt+g_pp*Omegac_*Omegac_+2.*g_tp*Omegac_); double beta2 = 2.*polyindex_*cs2 /(c_*c_*ut_central2*Omegac_*Omegac_); if (beta2<=0.) { throwError("In OscilTorus::computeXbYb(): " "bad beta parameter"); } double beta=sqrt(beta2); xb=1./beta *sqrt(g_rr_)*(pos[1]-c_)/c_; yb=1./beta *sqrt(g_thth_)*(M_PI/2.-pos[2])/c_; } void OscilTorus::metric(Gyoto::SmartPointer met) { if (!met) { if (gg_) gg_->unhook(this); kerrbl_=NULL; gg_=NULL; return; } kerrbl_ = Gyoto::SmartPointer(met); if (!kerrbl_) throwError("OscilTorus::metric(): only KerrBL, please"); if (gg_) gg_->unhook(this); Standard::metric(met); gg_->hook(this); updateCachedValues(); } void OscilTorus::tell(Hook::Teller* msg) { if (msg==gg_) updateCachedValues(); } void OscilTorus::updateCachedValues() { if (hold_ || !gg_ || !c_) return; double aa=kerrbl_->spin(); double posc[4]={0.,c_,M_PI/2.,0.};//don't care about t and phi double g_tt=gg_->gmunu(posc,0,0);// covar components g_rr_=gg_->gmunu(posc,1,1); g_thth_=gg_->gmunu(posc,2,2); double g_tp=gg_->gmunu(posc,0,3); double g_pp=gg_->gmunu(posc,3,3); Omegac_=1./(pow(c_,1.5)+aa); // Kepler rotation vel lc_=-(Omegac_*g_pp+g_tp)/(Omegac_*g_tp+g_tt); // Rescaled ang mom // Epicyclic pulsation omr2_=1.-6./c_+8.*aa*pow(c_,-1.5) -3.*aa*aa/(c_*c_); omth2_=1.-4*aa*pow(c_,-1.5) +3.*aa*aa/(c_*c_); if (omr2_<=0. || omth2_<=0.) { throwError("In OscilTorus::updateCachedValues(): " "bad epicyclic freq"); } double alpha0 = sqrt(polyindex_*sqrt(omr2_)*sqrt(omth2_)/M_PI); switch (perturb_kind_) { case Radial: // Radial oscillation { sigma_ = sqrt(omr2_); alpha_ = alpha0*sqrt(2*(polyindex_+1)*omr2_); break; } case Vertical: // Vertical oscillation { sigma_ = sqrt(omth2_); alpha_ = alpha0*sqrt(2*(polyindex_+1)*omth2_); break; } case X: // X mode { sigma_ = sqrt(omr2_+omth2_); alpha_ = alpha0*sqrt(4*(polyindex_+1)*(polyindex_+2)*omr2_*omth2_); break; } case Plus: // + mode { double sigmaminus2 = ( (2.*polyindex_+1)*(omr2_+omth2_) - sqrt( 4.*polyindex_*(polyindex_+1) *(omr2_-omth2_)*(omr2_-omth2_) +(omr2_+omth2_)*(omr2_+omth2_) ) ) / (2.*polyindex_); sigma_ = sqrt(sigmaminus2); w1_ = - (omr2_ *(2.*omth2_+2.*polyindex_*omth2_-polyindex_*sigmaminus2) ) / (omth2_-omr2_); w2_ = (omth2_ *(2.*omr2_+2.*polyindex_*omr2_-polyindex_*sigmaminus2) ) / (omth2_-omr2_); alpha_ = alpha0* sqrt( (polyindex_+2)*(sigmaminus2-(omr2_+omth2_)) / (2.*polyindex_*sigmaminus2-(2.*polyindex_+1)*(omr2_+omth2_)) ); break; } case Breathing: // breathing mode { double sigmaplus2 = ( (2.*polyindex_+1)*(omr2_+omth2_) + sqrt( 4.*polyindex_*(polyindex_+1) *(omr2_-omth2_)*(omr2_-omth2_) +(omr2_+omth2_)*(omr2_+omth2_) ) ) / (2.*polyindex_); sigma_ = sqrt(sigmaplus2); w1_ = - (omr2_ *(2.*omth2_+2.*polyindex_*omth2_-polyindex_*sigmaplus2) ) / (omth2_-omr2_); w2_ = (omth2_ *(2.*omr2_+2.*polyindex_*omr2_-polyindex_*sigmaplus2) ) / (omth2_-omr2_); alpha_ = alpha0* sqrt( (polyindex_+2)*(sigmaplus2-(omr2_+omth2_)) / (2.*polyindex_*sigmaplus2-(2.*polyindex_+1)*(omr2_+omth2_)) ); break; } default: throwError("In OscilTorus.C::setParameter():" "Unrecognized perturbation kind"); } } double OscilTorus::emission(double nu_em, double, double * cp, double *) const{ //cout << "r,theta,rcosth= " << cp[1] << " " << cp[2] << " " << cp[1]*cos(cp[2]) << endl; if (flag_radtransf_) throwError("Radiative transfer not implemented for OscilTorus."); if (with_cross_){ /* If the torus mode under consideration (breathing - and +) leads to change of volume, surface emitted intensity must be modulated accordingly. Simple assumption: I_nu \propto 1/volume ie: \propto 1/(cross-section area) if mode number m=0 So here the area of the cross-section is determined at impact time to modulate the emitted intensity. */ if (mode_!=0) { throwError("In OscilTorus.C::emission:" "mode=0 is required for area determination"); } if (perturb_kind_==Vertical || perturb_kind_==X) throwError("In OscilTorus::setParamter: bad perturbation kind"); // Rescaled time and area determination double AA = Omegac_*sigma_; // cos modulation is 2pi/AA periodic double tt=cp[0],tmax=tt_[0], area=-1.; double myt = tt; while (myt>2.*M_PI/AA) myt-=2.*M_PI/AA; // myt is in ]0,2pi/AA] int ii=0; while (myt>tmax && ii < nbt_-1){ ii++; tmax=tt_[ii]; } if (ii==0 || ii==nbt_-1){ area=area_[ii]; }else{ area= area_[ii-1]+(myt-tt_[ii-1])*(area_[ii]-area_[ii-1])/(tt_[ii-1]-tt_[ii]); } if (area<=0. || area!=area) throwError("In OscilTorus::emission:" "bad area value"); return 1./area; }else{ return 1.; } } #ifdef GYOTO_USE_XERCES void OscilTorus::setParameters(Gyoto::FactoryMessenger *fmp) { hold_=true; Standard::setParameters(fmp); hold_=false; updateCachedValues(); } #endif Gyoto-1.2.0/lib/PageThorneDisk.C000066400000000000000000000233621302352257300163440ustar00rootroot00000000000000/* Copyright 2011-2014, 2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoPhoton.h" #include "GyotoPageThorneDisk.h" #include "GyotoProperty.h" #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoKerrBL.h" #include "GyotoKerrKS.h" #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; GYOTO_PROPERTY_START(PageThorneDisk) // Since BlackbodyMdot also sets BlackBody, it's important to keep the // later after the former GYOTO_PROPERTY_DOUBLE(PageThorneDisk, BlackbodyMdot, BlackbodyMdot) GYOTO_PROPERTY_BOOL(PageThorneDisk, BlackBody, NonBlackBody, blackBody) GYOTO_PROPERTY_BOOL(PageThorneDisk, UniFlux, NonUniFlux, uniFlux) GYOTO_PROPERTY_END(PageThorneDisk, ThinDisk::properties) void PageThorneDisk::BlackbodyMdot(double v) { blackbody_=true; mdot_=v; } double PageThorneDisk::BlackbodyMdot() const { return mdot_; } void PageThorneDisk::blackBody(bool t) {blackbody_=t;} bool PageThorneDisk::blackBody() const {return blackbody_;} void PageThorneDisk::uniFlux(bool t) {uniflux_=t;} bool PageThorneDisk::uniFlux() const {return uniflux_;} PageThorneDisk::PageThorneDisk() : ThinDisk("PageThorneDisk"), aa_(0.), aa2_(0.), x0_(0.), x1_(0.), x2_(0.), x3_(0.), blackbody_(0), mdot_(0), uniflux_(0), spectrumBB_(NULL) { if (debug()) cerr << "DEBUG: PageThorneDisk Construction" << endl; spectrumBB_ = new Spectrum::BlackBody(); } PageThorneDisk::PageThorneDisk(const PageThorneDisk& o) : ThinDisk(o), aa_(o.aa_), aa2_(o.aa2_), x0_(o.x0_), x1_(o.x1_), x2_(o.x2_), x3_(o.x3_), blackbody_(o.blackbody_), mdot_(o.mdot_), uniflux_(o.uniflux_), spectrumBB_(NULL) { if (o.spectrumBB_()) spectrumBB_=o.spectrumBB_->clone(); gg_->hook(this); } PageThorneDisk* PageThorneDisk::clone() const { return new PageThorneDisk(*this); } bool PageThorneDisk::isThreadSafe() const { // spectrumBB_ is not a Property return ThinDisk::isThreadSafe() && (!spectrumBB_ || spectrumBB_->isThreadSafe()); } PageThorneDisk::~PageThorneDisk() { GYOTO_DEBUG<unhook(this); } void PageThorneDisk::updateSpin() { if (!gg_) return; switch (gg_->coordKind()) { case GYOTO_COORDKIND_SPHERICAL: aa_ = static_cast >(gg_) -> spin(); break; case GYOTO_COORDKIND_CARTESIAN: aa_ = static_cast >(gg_) -> spin(); break; default: throwError("PageThorneDisk::getSpin(): unknown COORDKIND"); } aa2_=aa_*aa_; double z1 =1.+pow((1.-aa2_),1./3.)*(pow((1.+ aa_),1./3.)+pow((1.-aa_),1./3.)); double z2 = pow(3.*aa2_ + z1*z1,0.5); double acosaao3= acos(aa_)/3.; x0_ = sqrt((3. + z2 - pow((3. - z1)*(3. + z1 + 2.*z2),0.5))); x1_ = 2.*cos(acosaao3 - M_PI/3.); x2_ = 2.*cos(acosaao3 + M_PI/3.); x3_ = -2.*cos(acosaao3); if (rin_==0.) rin_=(3.+z2-sqrt((3.-z1)*(3.+z1+2.*z2))); } void PageThorneDisk::metric(SmartPointer gg) { if (gg_) gg_->unhook(this); string kin = gg->kind(); if (kin != "KerrBL" && kin != "KerrKS" && kin != "ChernSimons") throwError ("PageThorneDisk::metric(): metric must be KerrBL or KerrKS"); ThinDisk::metric(gg); updateSpin(); gg->hook(this); } double PageThorneDisk::emission(double nu_em, double dsem, double *, double coord_obj[8]) const{ if (!blackbody_) { throwError("In PageThorneDisk::emission: " "blackbody is necessary to compute emission, " "else, use bolometricEmission"); } double Ibolo=bolometricEmission(nu_em,dsem,coord_obj); /* From Ibolo, find T, then Bnu(T) */ double mass=gg_->mass()*1e3; // in cgs double c6=GYOTO_C_CGS*GYOTO_C_CGS*GYOTO_C_CGS *GYOTO_C_CGS*GYOTO_C_CGS*GYOTO_C_CGS; double g2m2=GYOTO_G_CGS*GYOTO_G_CGS*mass*mass; Ibolo*=mdot_*c6/g2m2; // Ibolo in cgs //F = sigma * T^4 (and F=pi*I) double TT=pow(Ibolo*M_PI/GYOTO_STEFANBOLTZMANN_CGS,0.25); spectrumBB_->temperature(TT); double Iem=(*spectrumBB_)(nu_em); //cout << "r T nu Iem = " << coord_obj[1] << " " << TT << " " << nu_em << " " << Iem << endl; if (Iem < 0.) throwError("In PageThorneDisk::emission" " blackbody emission is negative!"); return Iem; } Quantity_t PageThorneDisk::getDefaultQuantities() { return GYOTO_QUANTITY_USER4; } double PageThorneDisk::bolometricEmission(double /* nuem */, double dsem, double coord_obj[8]) const{ //See Page & Thorne 74 Eqs. 11b, 14, 15. This is F(r). // Important remark: this emision function gives I(r), // not I_nu(r). And I(r)/nu^4 is conserved. // cout << "r hit= " << coord_obj[1] << endl; if (uniflux_) return 1; double xx; switch (gg_->coordKind()) { case GYOTO_COORDKIND_SPHERICAL: xx=sqrt(coord_obj[1]); break; case GYOTO_COORDKIND_CARTESIAN: xx=pow(coord_obj[1]*coord_obj[1]+coord_obj[2]*coord_obj[2]-aa2_, 0.25); break; default: throwError("Unknown coordinate system kind"); xx=0; } // the above formula assume M=1 (x=sqrt(r/M)=sqrt(r)) double x2=xx*xx; double ff= 3./(2.)*1./(xx*xx*(xx*xx*xx-3.*xx+2.*aa_)) *( xx-x0_-3./2.*aa_*log(xx/x0_) -3.*(x1_-aa_)*(x1_-aa_)/(x1_*(x1_-x2_)*(x1_-x3_))*log((xx-x1_) /(x0_-x1_)) -3.*(x2_-aa_)*(x2_-aa_)/(x2_*(x2_-x1_)*(x2_-x3_))*log((xx-x2_) /(x0_-x2_)) -3.*(x3_-aa_)*(x3_-aa_)/(x3_*(x3_-x1_)*(x3_-x2_))*log((xx-x3_) /(x0_-x3_)) ); // f of Page&Thorne, in units M=1 double Iem=ff/(4.*M_PI*M_PI*x2); /* with Mdot=1 (NB: Mdot is a constant) Assuming isotropic emission: flux at r = (I at r)* \int cos\theta dOmega = pi*I thus intensity is only: 1/pi * flux NB: this is frequency integrated (bolometric) intensity, not I_nu NBB: the cgs value of I is c^6/G^2*Mdot/M^2 * Iem, it can be recovered from the dimensionless Iem a posteriori if needed */ if (flag_radtransf_) Iem *= dsem; GYOTO_DEBUG_EXPR(Iem); return Iem; } void PageThorneDisk::processHitQuantities(Photon* ph, double* coord_ph_hit, double* coord_obj_hit, double dt, Properties* data) const { #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; #endif /* NB: freqObs is the observer's frequency chosen in Screen::getRayCoord for the actual computation of the geodesic ; the physical value of nuobs will be used in spectrum computations by resorting to the xml specifications of the user (see below) ; this freqObs is used to transform the null worldline parameter dlambda (see below) */ double freqObs=ph->freqObs(); // this is a useless quantity, always 1 SmartPointer spr = ph -> spectrometer(); size_t nbnuobs = spr() ? spr -> nSamples() : 0 ; double const * const nuobs = nbnuobs ? spr -> getMidpoints() : NULL; double dlambda = dt/coord_ph_hit[4]; //dlambda = dt/tdot double ggredm1 = -gg_->ScalarProd(coord_ph_hit,coord_obj_hit+4, coord_ph_hit+4);// / 1.; //this is nu_em/nu_obs double ggred = 1./ggredm1; //this is nu_obs/nu_em if (uniflux_) ggred=1.; double dsem = dlambda*ggredm1; // *1. double inc =0.; if (data) { #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "data requested. " << ", ggredm1=" << ggredm1 << ", ggred=" << ggred << endl; #endif if (data->redshift) { *data->redshift=ggred; #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(*data->redshift); #endif } if (data->time) { *data->time=coord_ph_hit[0]; #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(*data->time); #endif } if (data->impactcoords) { memcpy(data->impactcoords, coord_obj_hit, 8 * sizeof(double)); memcpy(data->impactcoords+8, coord_ph_hit, 8 * sizeof(double)); } #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "dlambda = (dt="<< dt << ")/(tdot="<< coord_ph_hit[4] << ") = " << dlambda << ", dsem=" << dsem << endl; #endif if (data->intensity) throwError("unimplemented"); if (data->user4) { inc = (bolometricEmission(freqObs*ggredm1, dsem, coord_obj_hit)) * (ph -> getTransmission(size_t(-1))) * ggred*ggred*ggred*ggred; // I/nu^4 invariant *data->user4 += inc; #if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(*data->user4); #endif } if (data->binspectrum) throwError("unimplemented"); if (data->spectrum) { if (!blackbody_) { throwError("In PageThorneDisk::process: " "blackbody is necessary to compute spectrum"); } for (size_t ii=0; ii getTransmission(size_t(-1))) * ggred*ggred*ggred; // Inu/nu^3 invariant data->spectrum[ii*data->offset] += inc; //cout << "in spec stored= " << ggred << " " << inc << endl; } } /* update photon's transmission */ ph -> transmit(size_t(-1), transmission(freqObs*ggredm1, dsem,coord_ph_hit)); } else { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "NO data requested!" << endl; # endif } } void PageThorneDisk::tell(Hook::Teller* msg) { if (msg==gg_) updateSpin(); } Gyoto-1.2.0/lib/PatternDisk.C000066400000000000000000000633101302352257300157220ustar00rootroot00000000000000/* Copyright 2011 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoPhoton.h" #include "GyotoPatternDisk.h" #include "GyotoProperty.h" #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoKerrBL.h" #include "GyotoKerrKS.h" #ifdef GYOTO_USE_CFITSIO #include #define throwCfitsioError(status) \ { fits_get_errstatus(status, ermsg); throwError(ermsg); } #endif #include #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; /// Properties GYOTO_PROPERTY_START(PatternDisk) GYOTO_PROPERTY_FILENAME(PatternDisk, File, file) GYOTO_PROPERTY_DOUBLE(PatternDisk, PatternVelocity, patternVelocity) GYOTO_PROPERTY_END(PatternDisk, ThinDisk::properties) void PatternDisk::fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const { if (p.name == "File") fmp->setParameter("File", (filename_.compare(0,1,"!") ? filename_ : filename_.substr(1)) ); else ThinDisk::fillProperty(fmp, p); } /// PatternDisk::PatternDisk() : ThinDisk("PatternDisk"), filename_(""), emission_(NULL), opacity_(NULL), velocity_(NULL), radius_(NULL), Omega_(0.), t0_(0.), dnu_(1.), nu0_(0), nnu_(0), dphi_(0.), phimin_(0.), nphi_(0), phimax_(2*M_PI), repeat_phi_(1), dr_(0.), nr_(0) { GYOTO_DEBUG << "PatternDisk Construction" << endl; } PatternDisk::PatternDisk(const PatternDisk& o) : ThinDisk(o), filename_(o.filename_), emission_(NULL), opacity_(NULL), velocity_(NULL), radius_(NULL), Omega_(o.Omega_), t0_(o.t0_), dnu_(o.dnu_), nu0_(o.nu0_), nnu_(o.nnu_), dphi_(o.dphi_), phimin_(o.phimin_), nphi_(o.nphi_), phimax_(o.phimax_), repeat_phi_(o.repeat_phi_), dr_(o.dr_), nr_(o.nr_) { GYOTO_DEBUG << "PatternDisk Copy" << endl; size_t ncells = 0; if (o.emission_) { emission_ = new double[ncells = nnu_ * nphi_ * nr_]; memcpy(emission_, o.emission_, ncells * sizeof(double)); } if (o.opacity_) { opacity_ = new double[ncells = nnu_ * nphi_ * nr_]; memcpy(opacity_, o.opacity_, ncells * sizeof(double)); } if (o.velocity_) { velocity_ = new double[ncells = 2 * nphi_ * nr_]; memcpy(velocity_, o.velocity_, ncells * sizeof(double)); } if (o.radius_) { radius_ = new double[ncells = 2 * nphi_ * nr_]; memcpy(radius_, o.radius_, ncells * sizeof(double)); } } PatternDisk* PatternDisk::clone() const { return new PatternDisk(*this); } PatternDisk::~PatternDisk() { GYOTO_DEBUG << "PatternDisk Destruction" << endl; if (emission_) delete [] emission_; if (opacity_) delete [] opacity_; if (velocity_) delete [] velocity_; if (radius_) delete [] radius_; } void PatternDisk::setEmission(double * pattern) { emission_ = pattern; } void PatternDisk::setVelocity(double * pattern) { velocity_ = pattern; } void PatternDisk::radius(double * pattern) { radius_ = pattern; } void PatternDisk::copyIntensity(double const *const pattern, size_t const naxes[3]) { GYOTO_DEBUG << endl; if (emission_) { GYOTO_DEBUG << "delete [] emission_;" << endl; delete [] emission_; emission_ = NULL; } if (pattern) { size_t nel; if (nnu_ != naxes[0]) { if (opacity_) { delete [] opacity_; opacity_ = NULL; } } if (nphi_ != naxes[1]) { GYOTO_DEBUG <<"nphi_ changed, freeing velocity_" << endl; if (opacity_) { delete [] opacity_; opacity_ = NULL; } if (velocity_) { delete [] velocity_; velocity_= NULL; } } if (nr_ != naxes[2]) { GYOTO_DEBUG <<"nr_ changed, freeing velocity_ and radius_" << endl; if (opacity_) { delete [] opacity_; opacity_ = NULL; } if (velocity_) { delete [] velocity_; velocity_= NULL; } if (radius_) { delete [] radius_; radius_ = NULL; } } if (!(nel=(nnu_ = naxes[0]) * (nphi_=naxes[1]) * (nr_=naxes[2]))) throwError( "dimensions can't be null"); if (nr_==1 || nphi_==1) throwError("In PatternDisk::copyIntensity: dimensions should be >1"); dr_ = (rout_ - rin_) / double(nr_-1); if (repeat_phi_==0.) throwError("In PatternDisk::copyIntensity: repeat_phi is 0!"); dphi_ = (phimax_-phimin_)/double((nphi_-1)*repeat_phi_); GYOTO_DEBUG << "allocate emission_;" << endl; emission_ = new double[nel]; GYOTO_DEBUG << "pattern >> emission_" << endl; memcpy(emission_, pattern, nel*sizeof(double)); } } double const * PatternDisk::getIntensity() const { return emission_; } void PatternDisk::getIntensityNaxes( size_t naxes[3] ) const { naxes[0] = nnu_; naxes[1] = nphi_; naxes[2] = nr_; } void PatternDisk::copyOpacity(double const *const opac, size_t const naxes[3]) { GYOTO_DEBUG << endl; if (opacity_) { GYOTO_DEBUG << "delete [] opacity_;" << endl; delete [] opacity_; opacity_ = NULL; flag_radtransf_=0; } if (opac) { if (nnu_ != naxes[0] || nphi_ != naxes[1] || nr_ != naxes[2]) throwError("Please set intensity before opacity. " "The two arrays must have the same dimensions."); GYOTO_DEBUG << "allocate opacity_;" << endl; opacity_ = new double[nnu_ * nphi_ * nr_]; GYOTO_DEBUG << "opacity >> opacity_" << endl; memcpy(opacity_, opac, nnu_ * nphi_ * nr_ * sizeof(double)); flag_radtransf_=1; } } double const * PatternDisk::opacity() const { return opacity_; } void PatternDisk::copyVelocity(double const *const velocity, size_t const naxes[2]) { GYOTO_DEBUG << endl; if (velocity_) { GYOTO_DEBUG << "delete [] velocity_;\n"; delete [] velocity_; velocity_ = NULL; } if (velocity) { if (!emission_) throwError("Please use copyIntensity() before copyVelocity()"); if (nphi_ != naxes[0] || nr_ != naxes[1]) throwError("emission_ and velocity_ have inconsistent dimensions"); GYOTO_DEBUG << "allocate velocity_;" << endl; velocity_ = new double[2*nphi_*nr_]; GYOTO_DEBUG << "velocity >> velocity_" << endl; memcpy(velocity_, velocity, 2*nphi_*nr_*sizeof(double)); } } double const * PatternDisk::getVelocity() const { return velocity_; } void PatternDisk::copyGridRadius(double const *const rad, size_t nr) { GYOTO_DEBUG << endl; if (radius_) { GYOTO_DEBUG << "delete [] radius_;" << endl; delete [] radius_; radius_ = NULL; } if (rad) { if (!emission_) throwError("Please use copyIntensity() before copyGridRadius()"); if (nr_ != nr) throwError("emission_ and radius_ have inconsistent dimensions"); GYOTO_DEBUG << "allocate velocity_;" << endl; radius_ = new double[nr_]; GYOTO_DEBUG << "velocity >> velocity_" << endl; memcpy(radius_, rad, nr_*sizeof(double)); rin_=radius_[0]; rout_=radius_[nr_-1]; } } double const * PatternDisk::getGridRadius() const { return radius_; } void PatternDisk::repeatPhi(size_t n) { repeat_phi_ = n; if ((nphi_-1)*repeat_phi_>0) dphi_=(phimax_-phimin_)/double((nphi_-1)*repeat_phi_); } size_t PatternDisk::repeatPhi() const { return repeat_phi_; } void PatternDisk::nu0(double freq) { nu0_ = freq; } double PatternDisk::nu0() const { return nu0_; } void PatternDisk::dnu(double dfreq) { dnu_ = dfreq; } double PatternDisk::dnu() const { return dnu_; } void PatternDisk::phimin(double phimn) { phimin_ = phimn; if (nphi_>1) dphi_ = (phimax_-phimin_) / double(nphi_-1); } double PatternDisk::phimin() const {return phimin_;} void PatternDisk::phimax(double phimx) { phimax_ = phimx; if (nphi_>1) dphi_ = (phimax_-phimin_) / double(nphi_-1); } double PatternDisk::phimax() const {return phimax_;} #ifdef GYOTO_USE_CFITSIO void PatternDisk::fitsRead(string filename) { GYOTO_MSG << "PatternDisk reading FITS file: " << filename << endl; filename_ = filename; int rin_set=0, rout_set=0; char* pixfile = const_cast(filename_.c_str()); fitsfile* fptr = NULL; int status = 0; int anynul = 0; long tmpl; double tmpd; long naxes [] = {1, 1, 1}; long fpixel[] = {1,1,1}; long inc [] = {1,1,1}; char ermsg[31] = ""; // ermsg is used in throwCfitsioError() GYOTO_DEBUG << "PatternDisk::readFile(): opening file" << endl; if (fits_open_file(&fptr, pixfile, 0, &status)) throwCfitsioError(status) ; ////// READ FITS KEYWORDS COMMON TO ALL TABLES /////// //get Omega and t0; GYOTO_DEBUG << "PatternDisk::readFile(): read Omega_" << endl; fits_read_key(fptr, TDOUBLE, "GYOTO PatternDisk Omega", &tmpd, NULL, &status); if (status) { if (status == KEY_NO_EXIST) status = 0; // not fatal else throwCfitsioError(status) ; } else Omega_ = tmpd; // Omega_ found GYOTO_DEBUG << "PatternDisk::readFile(): read t0_" << endl; fits_read_key(fptr, TDOUBLE, "GYOTO PatternDisk t0", &tmpd, NULL, &status); if (status) { if (status == KEY_NO_EXIST) status = 0; // not fatal else throwCfitsioError(status) ; } else t0_ = tmpd; // T0_ found GYOTO_DEBUG << "PatternDisk::readFile(): read RepeatPhi_" << endl; fits_read_key(fptr, TLONG, "GYOTO PatternDisk RepeatPhi", &tmpl, NULL, &status); if (status) { if (status == KEY_NO_EXIST) status = 0; // not fatal else throwCfitsioError(status) ; } else repeat_phi_ = size_t(tmpl); // RepeatPhi found GYOTO_DEBUG << "PatternDisk::readFile(): read InnerRadius_" << endl; fits_read_key(fptr, TDOUBLE, "GYOTO ThinDisk InnerRadius", &tmpd, NULL, &status); if (status) { if (status == KEY_NO_EXIST) status = 0; // not fatal else throwCfitsioError(status) ; } else { rin_ = tmpd; // InnerRadius found rin_set=1; } GYOTO_DEBUG << "PatternDisk::readFile(): read OuterRadius_" << endl; fits_read_key(fptr, TDOUBLE, "GYOTO ThinDisk OuterRadius", &tmpd, NULL, &status); if (status) { if (status == KEY_NO_EXIST) status = 0; // not fatal else throwCfitsioError(status) ; } else { rout_ = tmpd; // OuterRadius found rout_set=1; } GYOTO_DEBUG << "PatternDisk::fitsRead(): read Phimin_" << endl; fits_read_key(fptr, TDOUBLE, "GYOTO PatternDisk Phimin", &tmpd, NULL, &status); if (status) { if (status == KEY_NO_EXIST) { status = 0; // not fatal phimin_=0.; //phimin defaults to 0 } else throwCfitsioError(status) ; } else { phimin_ = tmpd; // Phimin found } GYOTO_DEBUG << "PatternDisk::fitsRead(): read Phimax_" << endl; fits_read_key(fptr, TDOUBLE, "GYOTO PatternDisk Phimax", &tmpd, NULL, &status); if (status) { if (status == KEY_NO_EXIST) { status = 0; // not fatal phimax_=2.*M_PI; //phimin defaults to 0 } else throwCfitsioError(status) ; } else { phimax_ = tmpd; // Phimax found } ////// FIND MANDATORY EMISSION HDU, READ KWDS & DATA /////// GYOTO_DEBUG << "PatternDisk::readFile(): search emission HDU" << endl; if (fits_movnam_hdu(fptr, ANY_HDU, const_cast("GYOTO PatternDisk emission"), 0, &status)) throwCfitsioError(status) ; GYOTO_DEBUG << "PatternDisk::readFile(): get image size" << endl; if (fits_get_img_size(fptr, 3, naxes, &status)) throwCfitsioError(status) ; //update nu0_, nnu_, dnu_; nnu_ = naxes[0]; double CRPIX1; GYOTO_DEBUG << "PatternDisk::readFile(): read CRPIX1, CRVAL1, CDELT1" << endl; fits_read_key(fptr, TDOUBLE, "CRVAL1", &nu0_, NULL, &status); fits_read_key(fptr, TDOUBLE, "CDELT1", &dnu_, NULL, &status); fits_read_key(fptr, TDOUBLE, "CRPIX1", &CRPIX1, NULL, &status); if (status) throwCfitsioError(status) ; if (CRPIX1 != 1) nu0_ -= dnu_*(CRPIX1 - 1.); // update repeat_phi_, nphi_, dphi_ nphi_ = naxes[1]; if (nphi_==1 || repeat_phi_==0) throwError("In PatternDisk::fitsRead: nphi is 1 or repeat_phi is 0!"); dphi_ = (phimax_-phimin_)/double((nphi_-1)*repeat_phi_); // update rin_, rout_, nr_, dr_ nr_ = naxes[2]; if (emission_) { delete [] emission_; emission_ = NULL; } emission_ = new double[nnu_ * nphi_ * nr_]; if (debug()) cerr << "PatternDisk::readFile(): read emission: " << "nnu_=" << nnu_ << ", nphi_="<("GYOTO PatternDisk opacity"), 0, &status); if (status) { if (status == BAD_HDU_NUM) { // FITS file does not contain opacity information status = 0; if (opacity_) { delete [] opacity_; opacity_ = NULL; } } else throwCfitsioError(status) ; } else { if (fits_get_img_size(fptr, 3, naxes, &status)) throwCfitsioError(status) ; if ( size_t(naxes[0]) != nnu_ || size_t(naxes[1]) != nphi_ || size_t(naxes[2]) != nr_) throwError("PatternDisk::readFile(): opacity array not conformable"); if (opacity_) { delete [] opacity_; opacity_ = NULL; } opacity_ = new double[nnu_ * nphi_ * nr_]; if (fits_read_subset(fptr, TDOUBLE, fpixel, naxes, inc, 0, opacity_,&anynul,&status)) { delete [] opacity_; opacity_=NULL; throwCfitsioError(status) ; } } ////// FIND OPTIONAL VELOCITY HDU /////// fits_movnam_hdu(fptr, ANY_HDU, const_cast("GYOTO PatternDisk velocity"), 0, &status); if (status) { if (status == BAD_HDU_NUM) { // FITS file does not contain velocity information status = 0; if (velocity_) { delete [] velocity_; velocity_ = NULL; } } else throwCfitsioError(status) ; } else { if (fits_get_img_size(fptr, 3, naxes, &status)) throwCfitsioError(status) ; if ( size_t(naxes[0]) != size_t(2) || size_t(naxes[1]) != nphi_ || size_t(naxes[2]) != nr_) throwError("PatternDisk::readFile(): velocity array not conformable"); if (velocity_) { delete [] velocity_; velocity_ = NULL; } velocity_ = new double[2 * nphi_ * nr_]; if (fits_read_subset(fptr, TDOUBLE, fpixel, naxes, inc, 0, velocity_,&anynul,&status)) { delete [] velocity_; velocity_=NULL; throwCfitsioError(status) ; } } ////// FIND OPTIONAL RADIUS HDU /////// fits_movnam_hdu(fptr, ANY_HDU, const_cast("GYOTO PatternDisk radius"), 0, &status); if (status) { if (status == BAD_HDU_NUM) { // FITS file does not contain explicit radius information status = 0; if (radius_) { delete [] radius_; radius_ = NULL; } } else throwCfitsioError(status) ; } else { if (fits_get_img_size(fptr, 1, naxes, &status)) throwCfitsioError(status) ; if (size_t(naxes[0]) != nr_) throwError("PatternDisk::readFile(): radius array not conformable"); if (radius_) { delete [] radius_; radius_ = NULL; } radius_ = new double[nr_]; if (fits_read_subset(fptr, TDOUBLE, fpixel, naxes, inc, 0, radius_,&anynul,&status)) { delete [] radius_; radius_=NULL; throwCfitsioError(status) ; } if (!rin_set) rin_=radius_[0]; if (!rout_set) rout_=radius_[nr_-1]; } if (nr_ == 1.) throwError("In PatternDisk::fitsRead: nr_ should not be 0 here!"); dr_ = (rout_-rin_) / double(nr_-1); if (fits_close_file(fptr, &status)) throwCfitsioError(status) ; fptr = NULL; } void PatternDisk::fitsWrite(string filename) { if (!emission_) throwError("PatternDisk::fitsWrite(filename): nothing to save!"); filename_ = filename; char* pixfile = const_cast(filename_.c_str()); fitsfile* fptr = NULL; int status = 0; long naxes [] = {long(nnu_), long(nphi_), long(nr_)}; long fpixel[] = {1,1,1}; char * CNULL=NULL; char ermsg[31] = ""; // ermsg is used in throwCfitsioError() ////// CREATE FILE GYOTO_DEBUG << "creating file \"" << pixfile << "\"... "; fits_create_file(&fptr, pixfile, &status); if (debug()) cerr << "done." << endl; fits_create_img(fptr, DOUBLE_IMG, 3, naxes, &status); if (status) throwCfitsioError(status) ; ////// WRITE FITS KEYWORDS COMMON TO ALL TABLES /////// //set Omega and t0; if (Omega_!=0) fits_write_key(fptr, TDOUBLE, const_cast("GYOTO PatternDisk Omega"), &Omega_, CNULL, &status); if (t0_!=0) fits_write_key(fptr, TDOUBLE, const_cast("GYOTO PatternDisk t0"), &t0_, CNULL, &status); if (repeat_phi_!=1) fits_write_key(fptr, TLONG, const_cast("GYOTO PatternDisk RepeatPhi"), &repeat_phi_, CNULL, &status); if ((radius_ && rin_ != radius_[0]) || (!radius_ && rin_ != 0.)) fits_write_key(fptr, TDOUBLE, const_cast("GYOTO ThinDisk InnerRadius"), &rin_, CNULL, &status); if ((radius_ && rout_ != radius_[nr_-1]) || (!radius_ && rout_ != DBL_MAX)) fits_write_key(fptr, TDOUBLE, const_cast("GYOTO ThinDisk OuterRadius"), &rout_, CNULL, &status); if (phimin_ > -DBL_MAX) fits_write_key(fptr, TDOUBLE, const_cast("GYOTO PatternDisk Phimin"), &phimin_, CNULL, &status); if (phimax_ < DBL_MAX) fits_write_key(fptr, TDOUBLE, const_cast("GYOTO PatternDisk Phimax"), &phimax_, CNULL, &status); ////// SAVE EMISSION IN PRIMARY HDU /////// GYOTO_DEBUG << "saving emission_\n"; fits_write_key(fptr, TSTRING, const_cast("EXTNAME"), const_cast("GYOTO PatternDisk emission"), CNULL, &status); fits_write_key(fptr, TDOUBLE, const_cast("CRVAL1"), &nu0_, CNULL, &status); fits_write_key(fptr, TDOUBLE, const_cast("CDELT1"), &dnu_, CNULL, &status); double CRPIX1 = 1.; fits_write_key(fptr, TDOUBLE, const_cast("CRPIX1"), &CRPIX1, CNULL, &status); fits_write_pix(fptr, TDOUBLE, fpixel, nnu_*nphi_*nr_, emission_, &status); if (status) throwCfitsioError(status) ; ////// SAVE OPTIONAL OPACITY HDU /////// if (opacity_) { GYOTO_DEBUG << "saving opacity_\n"; fits_create_img(fptr, DOUBLE_IMG, 3, naxes, &status); fits_write_key(fptr, TSTRING, const_cast("EXTNAME"), const_cast("GYOTO PatternDisk opacity"), CNULL, &status); fits_write_pix(fptr, TDOUBLE, fpixel, nnu_*nphi_*nr_, opacity_, &status); if (status) throwCfitsioError(status) ; } ////// SAVE OPTIONAL VELOCITY HDU /////// if (velocity_) { GYOTO_DEBUG << "saving velocity_\n"; naxes[0]=2; fits_create_img(fptr, DOUBLE_IMG, 3, naxes, &status); fits_write_key(fptr, TSTRING, const_cast("EXTNAME"), const_cast("GYOTO PatternDisk velocity"), CNULL, &status); fits_write_pix(fptr, TDOUBLE, fpixel, 2*nphi_*nr_, velocity_, &status); if (status) throwCfitsioError(status) ; } ////// SAVE OPTIONAL RADIUS HDU /////// if (radius_) { GYOTO_DEBUG << "saving velocity_\n"; fits_create_img(fptr, DOUBLE_IMG, 1, naxes+2, &status); fits_write_key(fptr, TSTRING, const_cast("EXTNAME"), const_cast("GYOTO PatternDisk radius"), CNULL, &status); fits_write_pix(fptr, TDOUBLE, fpixel, nr_, radius_, &status); if (status) throwCfitsioError(status) ; } ////// CLOSING FILE /////// GYOTO_DEBUG << "close FITS file\n"; if (fits_close_file(fptr, &status)) throwCfitsioError(status) ; fptr = NULL; } #endif void PatternDisk::getIndices(size_t i[3], double const co[4], double nu) const { GYOTO_DEBUG << "dnu_="<phimax_) i[1]=nphi_-1; else i[1] = size_t(floor((phi-phimin_)/dphi_)+1) % nphi_; /* With this definition: phimin_+(i[1]-1)*dphi_ <= phi < phimin_+i[1]*dphi_ provided phi is not bigger than phimax_ nor smaller than phimin_ */ if (radius_) { GYOTO_DEBUG <<"radius_ != NULL" << endl; // if the radius_ vector is set, find closest value if (r >= radius_[nr_-1]) i[2] = nr_-1; else { for(i[2]=0; r > radius_[i[2]]; ++i[2]){} /* With this definition: radius_[i[2]-1] <= r < radius_[i[2]] provided r0 && r-radius_[i[2]-1] < radius_[i[2]]) { --i[2]; }*/ } } else { GYOTO_DEBUG <<"radius_ == NULL, dr_==" << dr_ << endl; // radius_ is not set: assume linear repartition if (dr_==0.) throwError("In PatternDisk::getIndices: dr_ should not be 0 here!"); i[2] = size_t(floor((r-rin_)/dr_+0.5)); if (i[2] >= nr_) i[2] = nr_ - 1; } } void PatternDisk::getVelocity(double const pos[4], double vel[4]) { if (velocity_) { if (dir_ != 1) throwError("PatternDisk::getVelocity(): " "dir_ should be 1 if velocity_ is provided"); size_t i[3]; // {i_nu, i_phi, i_r} getIndices(i, pos); double rr = projectedRadius(pos); double phi = sphericalPhi(pos); double phiprime=0., rprime=0.; if (i[1]==0 || i[1]==nphi_-1 || i[2]==nr_-1){ // Extreme cases no interpolation phiprime=velocity_[i[2]*(nphi_*2)+i[1]*2+0]; rprime=velocity_[i[2]*(nphi_*2)+i[1]*2+1]; }else{ // Bilinear interpolation double phip0=velocity_[(i[2]-1)*(nphi_*2)+(i[1]-1)*2+0]; double phip1=velocity_[(i[2]-1)*(nphi_*2)+i[1]*2+0]; double phip2=velocity_[i[2]*(nphi_*2)+i[1]*2+0]; double phip3=velocity_[i[2]*(nphi_*2)+(i[1]-1)*2+0]; double rp0=velocity_[(i[2]-1)*(nphi_*2)+(i[1]-1)*2+1]; double rp1=velocity_[(i[2]-1)*(nphi_*2)+i[1]*2+1]; double rp2=velocity_[i[2]*(nphi_*2)+i[1]*2+1]; double rp3=velocity_[i[2]*(nphi_*2)+(i[1]-1)*2+1]; double rinf=radius_[i[2]-1], rsup=radius_[i[2]], phiinf=phimin_+double(i[1]-1)*dphi_, phisup=phiinf+dphi_; if (phiphisup || rrrsup){ throwError("In PatternDisk::getVelocity: " "bad interpolation"); } double cr = (rr-rinf)/(rsup-rinf), cp = (phi-phiinf)/(phisup-phiinf); rprime=(1-cr)*(1-cp)*rp0 +cr*(1-cp)*rp1 +cr*cp*rp2 +(1-cr)*cp*rp3; phiprime=(1-cr)*(1-cp)*phip0 +cr*(1-cp)*phip1 +cr*cp*phip2 +(1-cr)*cp*phip3; } switch (gg_->coordKind()) { case GYOTO_COORDKIND_SPHERICAL: { double pos2[4] = {pos[0], pos[1], pos[2], pos[3]}; pos2[1] = radius_ ? radius_[i[2]] : rin_+double(i[2])*dr_; vel[1] = rprime; vel[2] = 0.; vel[3] = phiprime; vel[0] = gg_->SysPrimeToTdot(pos2, vel+1); vel[1] *= vel[0]; vel[3] *= vel[0]; } break; case GYOTO_COORDKIND_CARTESIAN: throwError("PatternDisk::getVelocity(): metric must be in " "spherical coordinaites if velocity field is provided"); break; default: throwError("PatternDisk::getVelocity(): unknown COORDKIND"); } }else ThinDisk::getVelocity(pos, vel); } double PatternDisk::emission(double nu, double dsem, double *, double co[8]) const{ //See Page & Thorne 74 Eqs. 11b, 14, 15. This is F(r). GYOTO_DEBUG << endl; size_t i[3]; // {i_nu, i_phi, i_r} getIndices(i, co, nu); double rr = projectedRadius(co); double phi = sphericalPhi(co); double Iem=0.; if (i[1]==0 || i[1]==nphi_-1 || i[2]==nr_-1){ // Extreme cases no interpolation Iem=emission_[i[2]*(nphi_*nnu_)+i[1]*nnu_+i[0]]; }else{ // Bilinear interpolation double Iem0=emission_[(i[2]-1)*(nphi_*nnu_)+(i[1]-1)*nnu_+i[0]]; double Iem1=emission_[(i[2]-1)*(nphi_*nnu_)+i[1]*nnu_+i[0]]; double Iem2=emission_[i[2]*(nphi_*nnu_)+i[1]*nnu_+i[0]]; double Iem3=emission_[i[2]*(nphi_*nnu_)+(i[1]-1)*nnu_+i[0]]; double rinf=radius_[i[2]-1], rsup=radius_[i[2]], phiinf=phimin_+double(i[1]-1)*dphi_, phisup=phiinf+dphi_; if (phiphisup || rrrsup){ throwError("In PatternDisk::emission: " "bad interpolation"); } double cr = (rr-rinf)/(rsup-rinf), cp = (phi-phiinf)/(phisup-phiinf); Iem = (1-cr)*(1-cp)*Iem0 +cr*(1-cp)*Iem1 +cr*cp*Iem2 +(1-cr)*cp*Iem3; } if (!flag_radtransf_) return Iem; double thickness; // NB: thickness is not interpolated so far if (opacity_ && (thickness=opacity_[i[2]*(nphi_*nnu_)+i[1]*nnu_+i[0]]*dsem)) return Iem * (1. - exp (-thickness)) ; return 0.; } double PatternDisk::transmission(double nu, double dsem, double*co) const { GYOTO_DEBUG << endl; if (!flag_radtransf_) return 0.; if (!opacity_) return 1.; size_t i[3]; // {i_nu, i_phi, i_r} getIndices(i, co, nu); // NB: opacity is not interpolated so far double opac = opacity_[i[2]*(nphi_*nnu_)+i[1]*nnu_+i[0]]; GYOTO_DEBUG << "nu="<. */ #include "GyotoPhoton.h" #include "GyotoPatternDiskBB.h" #include "GyotoProperty.h" #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoKerrBL.h" #include "GyotoKerrKS.h" #include #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; GYOTO_PROPERTY_START(PatternDiskBB) GYOTO_PROPERTY_BOOL(PatternDiskBB, SpectralEmission, BolometricEmission, spectralEmission) GYOTO_PROPERTY_DOUBLE(PatternDiskBB, Risco, risco) GYOTO_PROPERTY_END(PatternDiskBB, PatternDisk::properties) bool PatternDiskBB::spectralEmission() const {return SpectralEmission_;} void PatternDiskBB::spectralEmission(bool t) {SpectralEmission_=t;} double PatternDiskBB::risco() const { if (risco_>0.) return risco_; switch (gg_->coordKind()) { case GYOTO_COORDKIND_SPHERICAL: return static_cast >(gg_) -> getRms(); default: throwError("PatternDiskBB::getVelocity: bad COORDKIND"); } return 0.; // avoid warning, never reached } void PatternDiskBB::risco(double r) {risco_=r;} PatternDiskBB::PatternDiskBB() : PatternDisk(), spectrumBB_(NULL), SpectralEmission_(0), risco_(0.) { GYOTO_DEBUG << "PatternDiskBB Construction" << endl; spectrumBB_ = new Spectrum::BlackBody(); } PatternDiskBB::PatternDiskBB(const PatternDiskBB& o) : PatternDisk(o), spectrumBB_(NULL), SpectralEmission_(o.SpectralEmission_), risco_(o.risco_) { GYOTO_DEBUG << "PatternDiskBB Copy" << endl; if (o.spectrumBB_()) spectrumBB_=o.spectrumBB_->clone(); } PatternDiskBB* PatternDiskBB::clone() const { return new PatternDiskBB(*this); } bool PatternDiskBB::isThreadSafe() const { // spectrumBB_ is not a Property return PatternDisk::isThreadSafe() && (!spectrumBB_ || spectrumBB_->isThreadSafe()); } PatternDiskBB::~PatternDiskBB() { GYOTO_DEBUG << "PatternDiskBB Destruction" << endl; } double const * PatternDiskBB::getVelocity() const { return PatternDisk::getVelocity(); } void PatternDiskBB::getVelocity(double const pos[4], double vel[4]) { // The only use of this reimplementation: ensure nothing happens below ISCO double const * const rad=getGridRadius(); size_t i[3]; // {i_nu, i_phi, i_r} getIndices(i, pos, 0.); //NB: last arg should be nu, don't care here double rgrid=rad[i[2]-1]; // this is the smallest radius used // when dealing with the current r value if (rgrid rmax_ || rgrid < risco()) return 0.; double Iem=0.; size_t naxes[3]; getIntensityNaxes(naxes); size_t nnu=naxes[0], nphi=naxes[1]; if (!SpectralEmission_){ /* Here the intensity is assumed to be given by the emission function of PatternDisk */ Iem = PatternDisk::emission(nu,dsem,co,co);//NB: 3rd argument is not used }else{ //Spectral emission /* Here the temperature is assumed to be given by the emission function of PatternDisk, intensity is computed assuming BB */ double TT; TT = PatternDisk::emission(nu,dsem,co,co); spectrumBB_->temperature(TT); Iem=(*spectrumBB_)(nu); } if (!flag_radtransf_) return Iem; double thickness; double const * const op = opacity(); if (op && (thickness=op[i[2]*(nphi*nnu)+i[1]*nnu+i[0]]*dsem)) return Iem * (1. - exp (-thickness)) ; return 0.; } void PatternDiskBB::metric(SmartPointer gg) { //Metric must be KerrBL or alike string kin = gg->kind(); if ((kin != "KerrBL") && (kin != "ChernSimons")) throwError ("PatternDiskBB::metric(): metric must be KerrBL or CS"); ThinDisk::metric(gg); } Gyoto-1.2.0/lib/Photon.C000066400000000000000000000415421302352257300147440ustar00rootroot00000000000000/* Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoPhoton.h" #include "GyotoScreen.h" #include "GyotoDefs.h" #include "GyotoError.h" #include "GyotoProperty.h" #include #include #include #include #include #include #include #include #define GYOTO_LIMIT_TRANSMISSION 1e-6 //0.36788 // NB: 0.36788=exp(-1), 1e-6 transmission is well thicker // than the standard optical depth = 1 using namespace std; using namespace Gyoto; GYOTO_PROPERTY_START(Photon) GYOTO_PROPERTY_ASTROBJ(Photon, Astrobj, astrobj) GYOTO_WORLDLINE_PROPERTY_END(Photon, Object::properties) Photon::Photon() : Worldline(), Object("Photon"), object_(NULL), freq_obs_(1.), transmission_freqobs_(1.), spectro_(NULL), transmission_(NULL) {} Photon::Photon(const Photon& o) : Worldline(o), SmartPointee(o), object_(NULL), freq_obs_(o.freq_obs_), transmission_freqobs_(o.transmission_freqobs_), spectro_(NULL), transmission_(NULL) { if (o.object_()) { object_ = o.object_ -> clone(); object_ -> metric(metric_); } if (o.spectro_()) { spectro_ = o.spectro_ -> clone(); _allocateTransmission(); if (size_t nsamples = spectro_->nSamples()) memcpy(transmission_, o.getTransmission(), nsamples*sizeof(double)); } } Photon * Photon::clone() const { return new Photon(*this); } bool Photon::isThreadSafe() const { // spectro_ is not a Property return Object::isThreadSafe() && (!spectro_ || spectro_ -> isThreadSafe()); } Photon::Photon(Photon* orig, size_t i0, int dir, double step_max) : Worldline(orig, i0, dir, step_max), SmartPointee(), object_(orig->object_), freq_obs_(orig->freq_obs_), transmission_freqobs_(orig->transmission_freqobs_), spectro_(orig->spectro_), transmission_(orig->transmission_) { } Photon::Refined::Refined(Photon* orig, size_t i0, int dir, double step_max) : Photon(orig, i0, dir, step_max), parent_(orig) { freqObs(orig->freqObs()); } Photon::Photon(SmartPointer met, SmartPointer obj, double* coord): Worldline(), freq_obs_(1.), transmission_freqobs_(1.), spectro_(NULL), transmission_(NULL) { setInitialCondition(met, obj, coord); } Photon::Photon(SmartPointer met, SmartPointer obj, SmartPointer screen, double d_alpha, double d_delta): Worldline(), object_(obj), freq_obs_(screen->freqObs()), transmission_freqobs_(1.), spectro_(NULL), transmission_(NULL) { double coord[8]; screen -> getRayCoord(d_alpha, d_delta, coord); Worldline::setInitialCondition(met, coord, -1); spectrometer(screen); } Photon::~Photon() {} /* TRANSMISSION STUFF */ void Photon::_allocateTransmission() { if (transmission_) { delete [] transmission_; transmission_ = NULL; } if (spectro_()) { size_t nsamples = spectro_->nSamples(); if (nsamples) { transmission_ = new double[nsamples]; resetTransmission(); } } } void Photon::resetTransmission() { transmission_freqobs_ = 1.; if (spectro_() && transmission_) { size_t nsamples = spectro_->nSamples(); for (size_t i = 0; i < nsamples; ++i) transmission_[i] = 1.; } } double Photon::getMass() const { return 0.; } void Photon::astrobj(SmartPointer ao) { if (object_!=ao) { if (imin_<=imax_) imin_=imax_=i0_; object_=ao; if (metric_) object_->metric(metric_); } } void Photon::metric(SmartPointer met) { Worldline::metric(met); if (object_) object_->metric(met); } void Photon::spectrometer(SmartPointer spr) { spectro_=spr; _allocateTransmission(); } SmartPointer Photon::spectrometer() const { return spectro_; } string Photon::className() const { return string("Photon"); } string Photon::className_l() const { return string("photon"); } SmartPointer Photon::astrobj() const { return object_; } void Photon::setInitialCondition(SmartPointer met, SmartPointer obj, SmartPointer screen, const double d_alpha, const double d_delta) { double coord[8]; screen -> getRayCoord(d_alpha, d_delta, coord); Worldline::setInitialCondition(met, coord, -1); if (obj) object_=obj; } void Photon::setInitialCondition(SmartPointer met, SmartPointer obj, const double coord[8]) { if (!met) met = metric_; Worldline::setInitialCondition(met, coord, -1); if (obj) object_=obj; } int Photon::hit(Astrobj::Properties *data) { /* Ray-tracing of the photon until the object_ is hit. Radiative transfer inside the object_ may then be performed depending on flag_radtransf. Final result (observed flux for instance, depending on object_'s Astrobj::Properties) will be stored in data. */ //tmin_=-1000.;//DEBUG //NB: integration stops when t < Worldline::tmin_ transmission_freqobs_=1.; size_t nsamples; if (spectro_() && (nsamples = spectro_->nSamples())) for (size_t ii=0; ii rMax(); int coordkind = metric_ -> coordKind(); int hitt=0; //hitted=1 if object is hitted at least one time (hitt can be 0 even //if the object was hit if cross_max>0) ; hitt_crude=1 if the object //is not yet hit with adaptive integration step. A second integration //with small fixed step will be performed to determine more precisely //the surface point. double coord[8]; int dir=(tmin_>x0_[i0_])?1:-1; size_t ind=i0_; stopcond=0; double rr=DBL_MAX, rr_prev=DBL_MAX; //------------------------------------------------- /* 1- Call object_->Impact on the already computed part of the geodesic to check whether the object_ was hit. */ for (ind=i0_+dir; ((dir==1)? (ind<=imax_ && x0_[ind]<=tmin_): // conditions if dir== 1 (ind>=imin_ && x0_[ind]>=tmin_)) // conditions if dir==-1 && !hitt; // condition in all cases ind+=dir) { switch (coordkind) { case GYOTO_COORDKIND_SPHERICAL: rr=x1_[ind]; break; case GYOTO_COORDKIND_CARTESIAN: rr=sqrt(x1_[ind]*x1_[ind]+x2_[ind]*x2_[ind]+x3_[ind]*x3_[ind]); break; default: throwError("Incompatible coordinate kind in Photon.C"); } if (rr Impact(this, ind, data); } if (hitt) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "DEBUG: Photon.C: Hit for already computed position; " << "Warning: radiative transfer not implemented " << "for that case" << endl; # endif return hitt; } else if (((dir==1)? (ind==imax_ && x0_[ind]>=tmin_): // conditions if dir== 1 (ind>=imin_ && x0_[ind]<=tmin_)) // conditions if dir==-1 && !hitt) return hitt; if (ind!=i0_) ind-=dir; //------------------------------------------------- //------------------------------------------------- /* 2- Need to compute geodesic further. Set up integration. */ // Check whether the arrays need to be expanded first if (dir==1 && ind==x_size_) ind=xExpand(1); else if (dir==-1 && ind==0) ind=xExpand(-1); // Set up integration getCoord(ind, coord); switch (coordkind) { case GYOTO_COORDKIND_SPHERICAL: rr=coord[1]; break; case GYOTO_COORDKIND_CARTESIAN: rr=sqrt(coord[1]*coord[1]+coord[2]*coord[2]+coord[3]*coord[3]); break; default: throwError("Incompatible coordinate kind in Photon.C"); } state_->init(this, coord, delta_* dir); //delta_ = initial integration step (defaults to 0.01) size_t count=0;// Must remain below count_max (prevents infinite integration) //------------------------------------------------- //------------------------------------------------- /* 3- Integration loop: integrate the geodesic until stopcond is 1. Possible stopping conditions: - transmission_freqobs_ low [see transmission() function in astrobjs, which defaults to 0 (optically thick) or 1 (optically thin) in Astrobj.C] - t < tmin_ (if dir=-1), [NB: tmin_ defaults to -DBL_MAX in Worldline.C] - photon is at r>rmax (defined for each object) and goes even further - metric tells it's time to stop (eg horizon crossing) - t does not evolve [to investigate, metric should have stopped integration before, see above] - count>count_max [should never be used, just to prevent infinite integration in case of a bug] */ double h1max=DBL_MAX; while (!stopcond) { // Next step along photon's worldline h1max=object_ -> deltaMax(coord); stopcond = state_ -> nextStep(coord, h1max); if (!secondary_){ // to compute only primary image double sign = x1_[i0_]*cos(x2_[i0_]); if (coord[1]*cos(coord[2])*sign<0. && x1_[ind]*cos(x2_[ind])*sign<0.) return 0; } if (stopcond) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "stopcond set by integrator\n"; # endif int shadow=object_->showshadow(); if (shadow && data && data->spectrum){ SmartPointer spr = spectrometer(); size_t nbnuobs = spr() ? spr -> nSamples() : 0 ; for (size_t ii=0; iispectrum[ii*data->offset] = 1e10; // something very big } } break; } if (coord[0] == x0_[ind]) { // here, ind denotes previous step stopcond=1; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "time did not evolve, break." << endl; # endif break; } if((stopcond=metric_->isStopCondition(coord))) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "stopcond step by metric"< maxiter_ ) { GYOTO_SEVERE << "Photon::hit: too many iterations ("< Impact */ // Check if we can reach the object_ switch (coordkind) { case GYOTO_COORDKIND_SPHERICAL: rr = x1_[ind]; break; case GYOTO_COORDKIND_CARTESIAN: rr=sqrt(x1_[ind]*x1_[ind]+x2_[ind]*x2_[ind]+x3_[ind]*x3_[ind]); break; default: throwError("Incompatible coordinate kind in Photon.C"); } # if GYOTO_DEBUG_ENABLED GYOTO_IF_DEBUG GYOTO_DEBUG_EXPR(rmax); GYOTO_DEBUG_EXPR(rr); GYOTO_ENDIF_DEBUG # endif if (rr Impact(this, ind, data); if (hitt && !data) stopcond=1; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(transmission_freqobs_); # endif if ( getTransmissionMax() < GYOTO_LIMIT_TRANSMISSION ) { stopcond=1; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "stopping because we are optically thick\n"; # endif } } else { if ( rr > rr_prev ) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "Stopping because " << "1) we are far from this object and " << "2) we are flying away" << endl; # endif // store coordinates of outgoing photon in impactcoords if (data && data->impactcoords && data->impactcoords[0]==DBL_MAX) { for (size_t i=0; i<8; ++i) data->impactcoords[i]=DBL_MAX; memcpy(data->impactcoords+8, coord, 8 * sizeof(double)); } stopcond=1; break; } } rr_prev=rr; //************************************ //************************************ /* 3-c Checks whether t < tmin_ (with dir=-1) and expands arrays if necessary to be able to store next step's results */ switch (dir) { case 1: if (coord[0]>tmin_) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "stopping because time goes beyond time limit\n"; # endif stopcond=1; } if ((!stopcond) && (ind==x_size_)) { imax_=x_size_-1; ind=xExpand(1); } break; default: if (coord[0]GYOTO_T_TOL) && (curval>threshold) ) { pcur[0] = 0.5*(t1+t2); if ((pcur[0]==t1) ||pcur[0]==t2) { GYOTO_SEVERE << "Photon::findMin(): dt still above GYOTO_T_TOL (t2-t1=" << t2-t1 << ")"; break; } getCoord(pcur, 1, pcur+1, pcur+2, pcur+3, pcur+4, pcur+5, pcur+6, pcur+7); curval=(*object)(pcur); if (val1 GYOTO_T_TOL) { pcur[0] = 0.5*(tinside+toutside); getCoord(pcur, 1, pcur+1, pcur+2, pcur+3, pcur+4, pcur+5, pcur+6, pcur+7); if ( (*object)(pcur) < value ) tinside = pcur[0]; else toutside = pcur[0]; } toutside = tinside; } void Photon::freqObs(double fo) { freq_obs_=fo; GYOTO_DEBUG_EXPR(freq_obs_); } double Photon::freqObs() const { GYOTO_DEBUG_EXPR(freq_obs_); return freq_obs_; } double Photon::getTransmission(size_t i) const { if (i==size_t(-1)) return transmission_freqobs_; if (!spectro_() || i>=spectro_->nSamples()) throwError("Photon::getTransmission(): i > nsamples"); return transmission_[i]; } double Photon::getTransmissionMax() const { double transmax=transmission_freqobs_; if (spectro_()) { transmax=0.; size_t i=0, imax= spectro_->nSamples(); for (i=0; i < imax; ++i) if (transmission_[i] > transmax) transmax = transmission_[i]; } # ifdef GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(transmax); # endif return transmax; } double const * Photon::getTransmission() const { return transmission_; } void Photon::transmit(size_t i, double t) { if (i==size_t(-1)) { transmission_freqobs_ *= t; return; } if (!spectro_() || i>=spectro_->nSamples()) throwError("Photon::getTransmission(): i > nsamples"); transmission_[i] *= t; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "(i="<transmit(i, t); if (i==size_t(-1)) transmission_freqobs_ = parent_->transmission_freqobs_; } #ifdef GYOTO_USE_XERCES void Photon::setParameters(FactoryMessenger* fmp) { wait_pos_ = 1; metric(fmp->metric()); Object::setParameters(fmp); wait_pos_ = 0; if (init_vel_) { delete[] init_vel_; init_vel_=NULL; throwError("Worldline::setParameters(): " "Velocity was found but not Position"); } } SmartPointer Gyoto::Photon::Subcontractor(FactoryMessenger* fmp) { SmartPointer ph = new Photon(); ph -> setParameters(fmp); return ph; } #endif Gyoto-1.2.0/lib/PolishDoughnut.C000066400000000000000000001650561302352257300164600ustar00rootroot00000000000000/* Copyright (c) 2012-2016 Frederic Vincent, Odele Straub, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include "GyotoPolishDoughnut.h" #include "GyotoProperty.h" #include "GyotoPhoton.h" #include "GyotoFactoryMessenger.h" #include "GyotoDefs.h" #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; GYOTO_PROPERTY_START(PolishDoughnut) GYOTO_PROPERTY_DOUBLE(PolishDoughnut, Lambda, lambda) GYOTO_PROPERTY_VECTOR_DOUBLE(PolishDoughnut, AngMomRinner, angmomrinner) GYOTO_PROPERTY_DOUBLE_UNIT(PolishDoughnut, CentralDensity, centralDensity) GYOTO_PROPERTY_DOUBLE(PolishDoughnut, CentralTempOverVirial, centralTempOverVirial) GYOTO_PROPERTY_DOUBLE(PolishDoughnut, CentralTemperature, centralTemp) GYOTO_PROPERTY_DOUBLE(PolishDoughnut, Beta, beta) GYOTO_PROPERTY_SIZE_T(PolishDoughnut, SpectralOversampling, spectralOversampling) // Since also sets , it's // important to keep the later after the former. GYOTO_PROPERTY_BOOL(PolishDoughnut, KomissarovAngleAveraged, NoKomissarovAngleAveraged, angleAveraged) GYOTO_PROPERTY_BOOL(PolishDoughnut, Komissarov, NoKomissarov, komissarov) GYOTO_PROPERTY_VECTOR_DOUBLE(PolishDoughnut, NonThermalDeltaExpo, nonThermalDeltaExpo) // Since adafparams(vector) sets adaf_ to true, ADAF must come after // ADAFParameters GYOTO_PROPERTY_VECTOR_DOUBLE(PolishDoughnut, ADAFParameters, adafparams) GYOTO_PROPERTY_BOOL(PolishDoughnut, ADAF, NonADAF, adaf) GYOTO_PROPERTY_BOOL(PolishDoughnut, ChangeCusp, KeepCusp, changeCusp) GYOTO_PROPERTY_END(PolishDoughnut, Standard::properties) #ifdef GYOTO_USE_XERCES /* Either lambda_ or rintorus_ is defined. Filter out the other one when writing properties to XML. */ void PolishDoughnut::fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const { if ((p.name == "Lambda" && !rochelobefilling_) || (p.name == "AngMomRinner" && !defangmomrinner_)) return; // do nothing else Standard::fillProperty(fmp, p); } #endif #define CST_POLY_INDEX 1.5//polytropic index n (gamma=1+1/n=5/3) #define CST_POLY_INDEX_M1 0.666666666666666666666666666666666666666667 #define CST_HYDRO_FRAC 0.75//hydrogen fraction #define CST_Z_1 1.//atomic number #define CST_Z_2 2. #define CST_MU_ION 1.2307692307692308375521861 //(4./(1. + 3. * CST_HYDRO_FRAC)) #define CST_MU_ELEC 1.1428571428571427937015414 //(2./(1. + CST_HYDRO_FRAC)) #define GYOTO_C2_CGS 8.98755178736817668096e+20 //c^2 in cgs #define GYOTO_C2_CGS_M1 1.1126500560536184087938986e-21 // 1./GYOTO_C2_CGS #define w_tol 1e-9 #define nstep_angint 10 // for angle-averaging integration #define DEFAULT_L0 10. #define DEFAULT_RIN 10. PolishDoughnut::PolishDoughnut() : Standard("PolishDoughnut"), spectrumBB_(NULL), l0_(DEFAULT_L0), lambda_(0.5), W_surface_(0.), W_centre_(0.), r_cusp_(0.), r_centre_(0.), r_torusouter_(0.), //DeltaWm1_(), central_density_(1.), central_temperature_(1e10), centraltemp_over_virial_(1.), beta_(0.), spectral_oversampling_(10), komissarov_(0), angle_averaged_(0), deltaPL_(0.), expoPL_(0.), adaf_(0), ADAFtemperature_(0.), ADAFdensity_(0.), changecusp_(0), rochelobefilling_(0), defangmomrinner_(0), rintorus_(DEFAULT_RIN), intersection(this) { #ifdef GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; #endif critical_value_=0.; safety_value_=.1; //rmax_=25.; spectrumBB_ = new Spectrum::BlackBody(); } PolishDoughnut::PolishDoughnut(const PolishDoughnut& orig) : Standard(orig), spectrumBB_(NULL), l0_(orig.l0_), lambda_(orig.lambda_), W_surface_(orig.W_surface_), W_centre_(orig.W_centre_), r_cusp_(orig.r_cusp_), r_centre_(orig.r_centre_), r_torusouter_(orig.r_torusouter_), DeltaWm1_(orig.DeltaWm1_), central_density_(orig.central_density_), central_temperature_(orig.central_temperature_), centraltemp_over_virial_(orig.centraltemp_over_virial_), beta_(orig.beta_), spectral_oversampling_(orig.spectral_oversampling_), komissarov_(orig.komissarov_), angle_averaged_(orig.angle_averaged_), deltaPL_(orig.deltaPL_), expoPL_(orig.expoPL_), adaf_(orig.adaf_), ADAFtemperature_(orig.ADAFtemperature_), ADAFdensity_(orig.ADAFdensity_), changecusp_(orig.changecusp_), rochelobefilling_(orig.rochelobefilling_), defangmomrinner_(orig.defangmomrinner_), rintorus_(orig.rintorus_), intersection(orig.intersection) { intersection.papa=this; if (gg_) gg_ -> hook(this); if (orig.spectrumBB_()) spectrumBB_=orig.spectrumBB_->clone(); } PolishDoughnut* PolishDoughnut::clone() const {return new PolishDoughnut(*this);} bool PolishDoughnut::isThreadSafe() const { // spectrumBB_ is not a Property return Standard::isThreadSafe() && (!spectrumBB_ || spectrumBB_->isThreadSafe()); } double PolishDoughnut::getL0() const { return l0_; } //void PolishDoughnut::setL0(double l0) { l0_ = l0; } double PolishDoughnut::getWsurface() const { return W_surface_; } double PolishDoughnut::getWcentre() const { return W_centre_; } double PolishDoughnut::getRcusp() const { return r_cusp_; } double PolishDoughnut::getRcentre() const { return r_centre_; } double PolishDoughnut::lambda() const { if (!rochelobefilling_) { if (defangmomrinner_) throwError("Lambda is not set because AngMomRinner is."); else throwError("Lambda is not set yet."); } return lambda_; } void PolishDoughnut::lambda(double lam) { rochelobefilling_=1; // if here, the torus fills its Roche lobe if (defangmomrinner_){ GYOTO_WARNING << "Setting Lambda overrides AngMomRinner previously set\n"; defangmomrinner_=0; } if (!gg_) throwError("Metric but be set before lambda in PolishDoughnut"); //Computing marginally stable and marginally bound radii: lambda_=lam; double rms = gg_->getRms(); double rmb = gg_->getRmb(); // marginally stable & marginally bound keplerian angular momentum // (Polish doughnut l is rescaled) double l_ms = gg_->getSpecificAngularMomentum(rms); double l_mb = gg_->getSpecificAngularMomentum(rmb); l0_ = lambda_*(l_mb-l_ms)+l_ms ;//torus angular momentum //Computing the potential at the photon position: double r1_min = rmb ; double r1_max = rms ; double r2_min = rms ; double r2_max = 1000. ; r_cusp_ = intersection.ridders(r1_min, r1_max) ; rintorus_ = r_cusp_; r_centre_ = intersection.ridders(r2_min, r2_max) ; double poss[4]={0.,r_cusp_,M_PI/2.,0.}; double posc[4]={0.,r_centre_,M_PI/2.,0.}; W_surface_ = gg_->getPotential(poss,l0_); W_centre_ = gg_->getPotential(posc,l0_); DeltaWm1_ = 1./(W_centre_ - W_surface_); //cout << "r W= " << r_centre_ << " " << r_cusp_ << " " << W_centre_ << " " << W_surface_ << endl; //if (aa_ > 0.8 && lambda_ > 0.3){ if (changecusp_){ /* CUSP PROBLEM For both large spin and large lambda, the potential line w=0 can leak out of the tube r=rcusp in the funnel zone (i.e. in the zone which is not taken into account for a doughnut, and which should be considered as a target for photons). Thus, the surface of the torus can be badly defined for big a and lambda. Using mma, I checked that this problem only arises for a>0.8 and lambda>0.3. In this range, rcusp is multiplied by 1.25 to encompass the w=0 line in the funnel, and to be sure not to ray-trace any part of he funnel. This is a crude solution: it allows to get rid of the funnel, but it will also remove a small part of the proper torus for a>~0.8 and lambda>~0.3. However this "forgotten part of the torus" being small, I do not think this should be a serious problem. Moreover, this removal of part of the torus only affects very slender tori (typically few r_g wide). But it would be nice to solve this problem in a more elegant way... */ r_cusp_*=1.25; } // Find torus outer radius double r3_min=r_centre_, r3_max=5000.; if (lambda_>0.99){ throwError("In PolishDoughnut: please use a value of" " lambda < 0.99, or else the outer radius" " finding algorithm may crash"); } outerradius_t outerradius; outerradius.papa = this; r_torusouter_ = outerradius.ridders(r3_min,r3_max); GYOTO_IF_DEBUG; GYOTO_DEBUG_EXPR(r_cusp_); GYOTO_DEBUG_EXPR(r_torusouter_); GYOTO_ENDIF_DEBUG; if (r_torusouter_!=r_torusouter_ || r_torusouter_==r_torusouter_+1) throwError("In PolishDoughnut::lambda(): bad r_torusouter_"); GYOTO_IF_DEBUG GYOTO_DEBUG_EXPR(lambda_); GYOTO_DEBUG_EXPR(l0_); GYOTO_DEBUG_EXPR(r_cusp_); GYOTO_DEBUG_EXPR(r_centre_); GYOTO_DEBUG_EXPR(W_surface_); GYOTO_DEBUG_EXPR(W_centre_); GYOTO_ENDIF_DEBUG } double PolishDoughnut::centralDensity() const {return central_density_;} double PolishDoughnut::centralDensity(string const &unit) const { double dens = centralDensity(); if (unit != "") { # ifdef HAVE_UDUNITS dens = Units::Converter("kg/L", unit)(dens); # else GYOTO_WARNING << "Units ignored, please recompile Gyoto with --with-udunits" << endl ; # endif } return dens; } void PolishDoughnut::centralDensity(double dens) { central_density_=dens; } void PolishDoughnut::centralDensity(double dens, string const &unit) { if (unit != "") { # ifdef HAVE_UDUNITS dens = Units::Converter(unit, "kg/L")(dens); # else GYOTO_WARNING << "Units ignored, please recompile Gyoto with --with-udunits" << endl ; # endif } centralDensity(dens); } double PolishDoughnut::centralTempOverVirial() const {return centraltemp_over_virial_;} void PolishDoughnut::centralTempOverVirial(double val) {centraltemp_over_virial_=val;} double PolishDoughnut::centralTemp() const {return central_temperature_;} void PolishDoughnut::centralTemp(double val) {central_temperature_=val;} double PolishDoughnut::beta() const { return beta_; } void PolishDoughnut::beta(double b) { beta_ = b; } size_t PolishDoughnut::spectralOversampling() const { return spectral_oversampling_; } void PolishDoughnut::spectralOversampling(size_t val) { spectral_oversampling_ = val; } bool PolishDoughnut::changeCusp() const {return changecusp_;} void PolishDoughnut::changeCusp(bool t) {changecusp_=t;} bool PolishDoughnut::komissarov() const {return komissarov_;} void PolishDoughnut::komissarov(bool komis) {komissarov_=komis;} bool PolishDoughnut::angleAveraged() const {return angle_averaged_;} void PolishDoughnut::angleAveraged(bool komis) {angle_averaged_=komis; if (komis) komissarov(true); } void PolishDoughnut::nonThermalDeltaExpo(std::vector const &v) { if (v.size() != 2) throwError("nonThermalDeltaExpo must have exactly 2 elements"); deltaPL_= v[0]; expoPL_ = v[1]; } std::vector PolishDoughnut::nonThermalDeltaExpo() const { std::vector v (2, deltaPL_); v[1]=expoPL_; return v; } void PolishDoughnut::angmomrinner(std::vector const &v) { defangmomrinner_=1; if (rochelobefilling_){ GYOTO_WARNING << "Setting AngMomRinner overrides Lambda previously set\n"; rochelobefilling_=0; } if (v.size() != 2) throwError("Only 2 arguments to define l0 and rin"); l0_ = v[0]; rintorus_ = v[1]; r_cusp_=rintorus_; // NB: the cusp is most probably not at this radius; however we need to define it to avoid having cases where operator() returns "inside torus" when the photon actually is in the funnel at rgetPotential(posin,l0_); double rmin; double rico = gg_->getRms(); if (rico>0.) rmin=rico; else rmin=rintorus_; double rmax = 1000.; //cout << "rmin max= " << rmin << " " << rmax << endl; r_centre_ = intersection.ridders(rmin, rmax) ; double posc[4]={0.,r_centre_,M_PI/2.,0.}; W_centre_ = gg_->getPotential(posc,l0_); DeltaWm1_ = 1./(W_centre_ - W_surface_); //cout << "Ws Wc rc= " << W_surface_ << " " << W_centre_ << " " << r_centre_ << endl; outerradius_t outerradius; outerradius.papa = this; rmin=r_centre_; r_torusouter_ = outerradius.ridders(rmin,rmax); //cout << "Torus rinner, rcen, router= " << rintorus_ << " " << r_centre_ << " " << r_torusouter_ << endl; GYOTO_IF_DEBUG; GYOTO_DEBUG_EXPR(l0_); GYOTO_DEBUG_EXPR(r_centre_); GYOTO_DEBUG_EXPR(rintorus_); GYOTO_DEBUG_EXPR(W_surface_); GYOTO_DEBUG_EXPR(W_centre_); GYOTO_ENDIF_DEBUG } std::vector PolishDoughnut::angmomrinner() const { if (!defangmomrinner_) { if (rochelobefilling_) throwError("AngMomRinner is not set because Lambda has been set."); else throwError("AngMomRinner is not set yet."); } std::vector v (2, 0.); v[0]=l0_; v[1]=rintorus_; return v; } void PolishDoughnut::adafparams(std::vector const &v) { if (v.size() != 2) throwError("ADAF must have exactly 2 elements"); adaf(true); ADAFtemperature_ = v[0]; ADAFdensity_ = v[1]; } std::vector PolishDoughnut::adafparams() const { std::vector v (2, ADAFtemperature_); v[1]=ADAFdensity_; return v; } void PolishDoughnut::adaf(bool t) {adaf_=t;} bool PolishDoughnut::adaf() const {return adaf_;} void PolishDoughnut::setParameter(Property const &p, string const & name, string const & content, string const & unit) { // Override default behaviour to support obsolete format where // ADAFParameters was in ADAF if (name=="ADAF") { std::vector v=FactoryMessenger::parseArray(content); if (v.size()) adafparams(v); return ; } Standard::setParameter(p, name, content, unit); } PolishDoughnut::~PolishDoughnut() { GYOTO_DEBUG << "PolishDoughnut Destruction" << endl; if (gg_) gg_ -> unhook(this); } void PolishDoughnut::metric(Gyoto::SmartPointer met) { if (gg_) gg_ -> unhook(this); Standard::metric(met); if (gg_) gg_ -> hook(this); GYOTO_DEBUG << "Metric set, calling lambda\n"; // Initialize other members only if lambda(val) or // angmomrinner(vect) has been called already. Mutually exclusive. if (defangmomrinner_) angmomrinner(angmomrinner()); else if (rochelobefilling_) lambda(lambda()); GYOTO_DEBUG << "done\n"; } void PolishDoughnut::tell(Hook::Teller * met) { if (met == gg_) { // Initialize other members only if lambda(val) or // angmomrinner(vect) has been called already. Mutually exclusive. if (defangmomrinner_) angmomrinner(angmomrinner()); else if (rochelobefilling_) lambda(lambda()); } else throwError("BUG: PolishDoughnut::tell(Hook::Teller * met) called with" "wrong metric"); } int PolishDoughnut::Impact(Photon *ph, size_t index, Astrobj::Properties *data) { if (beta_==1.) throwError("Please set beta to != 1."); if (adaf_){ // This is the Impact function for the Yuan+, Broderick+ // ADAF model, this is actually no longer a Polish doughnut // -> only for comparison //cout << "ICI1" << endl; double coord[8]; ph->getCoord(index, coord); double rr = coord[1], th = coord[2]; // The outer boundary of the ADAF is simply RMax_ in xml // Setting an inner boundary at the ISCO (in projection) if (rr*sin(th) < gg_->getRms()) return 0; // This allows to reject the points close to the axis // such that the cylindrical radius is smaller than Sch ISCO ; // there, the Keplerian velocity is not defined double p1[8], p2[8]; ph->getCoord(index, p1); ph->getCoord(index+1, p2); double t1 = p1[0], t2=p2[0]; double cph[8] = { t2 }; ph -> getCoord(&t2, 1, cph+1, cph+2, cph+3, cph+4, cph+5, cph+6, cph+7); double delta=giveDelta(cph); double coh[8]; while (cph[0]>t1){ ph -> getCoord(cph, 1, cph+1, cph+2, cph+3, cph+4, cph+5, cph+6, cph+7); for (int ii=0;ii<4;ii++) coh[ii] = cph[ii]; getVelocity(coh, coh+4); processHitQuantities(ph, cph, coh, delta, data); cph[0]-=delta; } return 1; } return Standard::Impact(ph, index, data); } double PolishDoughnut::operator()(double const coord[4]) { // w1 = ((potential(r1, theta1, aa) - W_surface_) // /(W_centre_ - W_surface_)); // // w1 < 0. outside polishdoughnut, anything inside funnel, 0 inside PolishDoughnut. double pos[4]; for (int ii=0;ii<4;ii++) pos[ii]=coord[ii]; double tmp = W_surface_ - gg_->getPotential(pos,l0_); double rproj = coord[1] * sin(coord[2]); if (rprojcircularVelocity(pos,vel,1); } double gtt=gg_->gmunu(pos,0,0); double gtph=gg_->gmunu(pos,0,3); double gphph=gg_->gmunu(pos,3,3); double Omega=-(l0_*gtt+gtph)/(l0_*gtph+gphph); double ut2=-1./(gtt+2.*gtph*Omega+gphph*Omega*Omega); if (ut2 < 0.) { stringstream ss; ss << "PolishDoughnut::getVelocity(pos=["; for (int i=0; i<3; ++i) ss << pos[i] << ", "; ss << pos[3] << "]): ut^2 is negative."; throwError(ss.str()); } vel[0] = sqrt(ut2); vel[1] = vel[2] = 0.; vel[3] = Omega*sqrt(ut2); } void PolishDoughnut::integrateEmission (double * I, double * boundaries, size_t * chaninds, size_t nbnu, double dsem, double *cph, double *co) const { // The original channels may or may not be contiguous. We split // each original channels into spectral_oversampling_ subchannels. // All we know is that each chunk of spectral_oversampling_ // subchannels are contiguous. Don't try to recover contiguousness // in the original channels, it's too hard for now. double som1=1./double(spectral_oversampling_); size_t onbnu=nbnu*spectral_oversampling_; // number of subchannels size_t onbb = onbnu+nbnu; // number of subchannel boundaries : most // are used twice as subchannels are // contiguous in each channel. double * Inu = new double[onbnu+1]; double * bo = new double[onbb]; size_t * ii = new size_t[2*onbnu]; // two indices for each subchannel double dnu; size_t k=0; for (size_t i=0; i(this)->getVelocity(coord_obj, vel); //double Omega=vel[3]/vel[0]; double Msgr = gg_->mass()*1e3; // Gyoto speaks in SI --> here we // switch to cgs units double rr = coord_ph[1], theta = coord_ph[2];//NB: rr is units of GM/c^2 double rcgs = rr * gg_ -> unitLength() * 100.;//rr in cgs //r_centre_ in cgs: double r_centre_cgs = r_centre_ * gg_ -> unitLength() * 100.; double pos[4]={0.,rr,theta,0.}; double ww = (gg_->getPotential(pos,l0_) - W_surface_)*DeltaWm1_; if (ww<=0.){//Will generate nan in computations w must be strictly positive if (fabs(ww)0.){ xmax*=10.; } xM_crit = transcendental.ridders(xmin, xmax) ; } double nu_crit = 3./2. * nu_0 * temp_e * temp_e * xM_crit ; if (usecompton){ // nu_em-independent part /* DOUGHNUT HEIGHT */ //compute H(r), doughnut's height at given value of r int inside=1;//will be 0 when getting out of doughnut double newr=rr,newth=theta,rsth=rr*sin(theta),neww,wbef=ww,rbef=rr; double dr=1e-2;//crude, but there will be a linear interpolation later // TO CHANGE!!!! put in the non-nu part above while (inside){ newr+=dr; newth=asin(rsth/newr);//NB: no pb with asin, even if it's //defined between -pi/2 and pi/2 and theta //is between 0 and pi; we just want one of //the 2 points at the surface of the //doughnut with same value of x and y as //the rr,theta point and one of them will //be found by this asin (which one we //don't care) double newpos[4]={0.,newr,newth,0.}; neww=(gg_->getPotential(newpos,l0_) - W_surface_)*DeltaWm1_; if (neww>1. || neww<0.) inside=0; else {wbef=neww;rbef=newr;} } double lina=(neww-wbef)/(newr-rbef), linb=neww-lina*newr; //linear interpolation to find surface if (neww>1.) newr=(1-linb)/lina; else newr=-linb/lina; newth=asin(rsth/newr); double Hofr = newr*cos(newth); /* COMPTON ENHANCEMENT */ double x_crit = GYOTO_PLANCK_CGS * nu_crit / (GYOTO_ELECTRON_MASS_CGS * GYOTO_C2_CGS) ; double tau_es = 2.*(n_e * GYOTO_THOMSON_CGS) *Hofr*GYOTO_G_CGS * Msgr*GYOTO_C2_CGS_M1; // See Narayan&Yi 95 eq. 2.15 double probability = 1. - exp(-tau_es) ; amplification = 1. + 4. * temp_e + 16. * temp_e * temp_e ; double eta1 = probability * (amplification - 1.) /(1. - probability * amplification) ; double eta3 = -1. - log(probability) / log(amplification) ; double eta2 = pow(1./3.,eta3) * eta1 ; //Formula for NY95 Eq. 3.23 corrected Cbrems = 3. * eta1 * temp_e * ((1./3. - x_crit/(3.*temp_e)) - 1./(eta3 + 1.) * (pow(1./3.,eta3 + 1.) - pow(x_crit/(3.*temp_e),eta3 + 1.))) ; //NY95 Eq. 3.24 Csynch = (eta1 - eta2 * pow(x_crit/temp_e,eta3)) ; } double nu_em; for (size_t i=0; i 0 nu_crit shifted brems (NB not shifted if comptonorder=0, in this case amplinu=nu) nu_em>numax -> wien tail smoothly connected to previous brems */ double temp_e = GYOTO_BOLTZMANN_CGS * T_electron / (GYOTO_ELECTRON_MASS_CGS*GYOTO_C2_CGS) ; double Fee, Fei; if (temp_e < 1.) { Fee = 20./(9.*sqrt(M_PI))*(44.- 3.*M_PI*M_PI)*pow(temp_e,3./2.) *(1.+1.1*temp_e+temp_e*temp_e - 1.25*pow(temp_e,5./2.)); Fei = 4.*sqrt(2.*temp_e / (M_PI*M_PI*M_PI))*(1.+1.781*pow(temp_e,1.34)); }else{ Fee = 24.*temp_e*(log(2.*exp(-GYOTO_EULER_MASCHERONI)*temp_e)+1.28); Fei = 9.*temp_e / (2.*M_PI)*(log(1.123*temp_e + 0.48) + 1.5); } double fee = n_e*n_e*GYOTO_C_CGS*GYOTO_ELECTRON_CLASSICAL_RADIUS_CGS *GYOTO_ELECTRON_CLASSICAL_RADIUS_CGS *GYOTO_ELECTRON_MASS_CGS*GYOTO_C2_CGS*GYOTO_ALPHA_F*Fee; double fei = n_e*n_j*GYOTO_THOMSON_CGS*GYOTO_C_CGS *GYOTO_ALPHA_F*GYOTO_ELECTRON_MASS_CGS *GYOTO_C2_CGS*Fei; double f_brems = fee + fei ; if (nu_em > nu_crit){ if (nu_em < numax) { /* Brems at shifted freq between nu_crit and numax */ double Gaunt; // Gaunt factor at shifted frequency if ( GYOTO_BOLTZMANN_CGS*T_electron/ (GYOTO_PLANCK_CGS*nu_em) < 1.){ Gaunt = sqrt( 3./M_PI*GYOTO_BOLTZMANN_CGS*T_electron /(GYOTO_PLANCK_CGS*amplinu) ) ; }else{ Gaunt = sqrt(3.) / M_PI * log( 4./GYOTO_EULER_MASCHERONI * GYOTO_BOLTZMANN_CGS*T_electron /(GYOTO_PLANCK_CGS*amplinu) ) ; } //Brems emission at shifted freq: double emissbrems = 1./(4.*M_PI)*f_brems*Gaunt *exp(-GYOTO_PLANCK_CGS*amplinu/(GYOTO_BOLTZMANN_CGS*T_electron)) * GYOTO_PLANCK_CGS/(GYOTO_BOLTZMANN_CGS*T_electron); //NB: the 1/4pi factor is just to have the per steradian //dependency, the emission being assumed isotropic in //emitter's frame return emissbrems*Cbrems; } else { /* Wien tail above numax */ double MaxGaunt; // Gaunt factor with max frequency if ( GYOTO_BOLTZMANN_CGS*T_electron/ (GYOTO_PLANCK_CGS*numax) < 1.){ MaxGaunt = sqrt( 3./M_PI*GYOTO_BOLTZMANN_CGS*T_electron /(GYOTO_PLANCK_CGS*numax) ) ; }else{ MaxGaunt = sqrt(3.) / M_PI * log( 4./GYOTO_EULER_MASCHERONI * GYOTO_BOLTZMANN_CGS*T_electron /(GYOTO_PLANCK_CGS*numax) ) ; } //Wien tail smoothly connected to brems emission below numax: double WienEm=BBapprox(nu_em,T_electron); double WienEmMax = BBapprox(numax,T_electron); double emissbremsmax = 1./(4.*M_PI)*f_brems*MaxGaunt *exp(-GYOTO_PLANCK_CGS*numax/(GYOTO_BOLTZMANN_CGS*T_electron)) * GYOTO_PLANCK_CGS/(GYOTO_BOLTZMANN_CGS*T_electron); double emiss_bremsmax = Cbrems*emissbremsmax; double fact = WienEmMax/emiss_bremsmax; return WienEm/fact; } }else{ return 0.; } } double PolishDoughnut::emissionSynch(double nu_em, double nu_crit, double numax, double nu_0, double T_electron, double amplification, double Csynch, double alpha1, double alpha2, double alpha3, double preff, int comptonorder) const{ double amplinu=nu_em; if (comptonorder>0){ amplinu/=pow(amplification,comptonorder); Csynch=pow(Csynch,comptonorder); }else if (Csynch!=1.) throwError("In PolishDoughnut::emissionSynch: Csynch should be 1" "if no Compton amplification"); /* Cases: nu_em Rayleigh-Jeans emission smoothly connected to following synch emission nu_crit shifted synchrotron (NB not shifted if comptonorder=0, in this case amplinu=nu) nu_em>numax -> 0 */ double temp_e = GYOTO_BOLTZMANN_CGS * T_electron / (GYOTO_ELECTRON_MASS_CGS*GYOTO_C2_CGS) ; if (nu_emmass()*1e3; // Gyoto speaks in SI --> here cgs double T_electron=0., number_density=0., bnorm = 0., theta_mag=0.; if (adaf_){ if (!angle_averaged_){ throwError("In PolishDoughnut: ADAF should be called" " only with angle averaging"); } double zz = rr * fabs(cos(theta)), rcyl = rr * sin(theta); // fabs in zz: it is a distance, not an altitude if (zz>10.*rcyl) { // then exp factor will be // vanishingly small, can lead to bad behavior for (size_t ii=0; iigetPotential(pos, l0_) - W_surface_)*DeltaWm1_; if (ww<=0.){//Will generate nan in computations w must be strictly positive if (fabs(ww)gmunu(coord_ph,0,0), g_pp=gg_->gmunu(coord_ph,3,3), g_tp=gg_->gmunu(coord_ph,0,3), LL=g_tp*g_tp-g_tt*g_pp; double posc[4]={0.,r_centre_,M_PI/2.,0.}; double g_ttc=gg_->gmunu(posc,0,0), g_ppc=gg_->gmunu(posc,3,3), g_tpc=gg_->gmunu(posc,0,3), LLc=g_tpc*g_tpc-g_ttc*g_ppc; double kappa = 0., kappam=0.; if (!angle_averaged_){ kappa= pow(enthalpy_c,-CST_POLY_INDEX_M1)*(W_centre_-W_surface_) /((CST_POLY_INDEX+1)*(1+1./beta_)); kappam = pow(LLc,-CST_POLY_INDEX_M1)/beta_*kappa; }else{ kappa = pow(enthalpy_c,-CST_POLY_INDEX_M1)*(W_centre_-W_surface_) /(CST_POLY_INDEX+1); } double enthalpy = enthalpy_c* pow( ww* (kappa+kappam*pow(LLc,CST_POLY_INDEX_M1)) /(kappa+kappam*pow(LL,CST_POLY_INDEX_M1)) ,CST_POLY_INDEX ); number_density = (enthalpy-kappa*pow(enthalpy,1.+CST_POLY_INDEX_M1)) /(GYOTO_C2_CGS*CST_MU_ELEC*GYOTO_ATOMIC_MASS_UNIT_CGS); double number_density_central = (enthalpy_c-kappa*pow(enthalpy_c,1.+CST_POLY_INDEX_M1)) /(GYOTO_C2_CGS*CST_MU_ELEC*GYOTO_ATOMIC_MASS_UNIT_CGS); double magnetic_pressure = 0., fact_b=1.; // pm = b^2/fact_b if (!angle_averaged_){ magnetic_pressure = kappam*pow(LL,CST_POLY_INDEX_M1) *pow(enthalpy,1.+CST_POLY_INDEX_M1); fact_b = 8.*M_PI; }else{ double gas_pressure = kappa*pow(enthalpy,1.+CST_POLY_INDEX_M1); magnetic_pressure = gas_pressure/beta_; fact_b = 24.*M_PI; } bnorm = sqrt(fact_b*magnetic_pressure); double bphi = bnorm/sqrt(g_pp+2*l0_*g_tp+l0_*l0_*g_tt); //NB: in Komissarov it is 2 p_mag in the numerator, but he uses // p_mag = B^2/2, and here we use the cgs p_mag = B^2/24pi double b4vec[4]={bphi*l0_,0,0,bphi}; // B 4-vector in BL frame // this vector is orthogonal to the fluid 4-vel, so it already // leaves in the comoving rest space, no need to project double vel[4]; // 4-velocity of emitter const_cast(this)->getVelocity(coord_obj, vel); double photon_emframe[4]; // photon tgt vector projected in comoving frame for (int ii=0;ii<4;ii++){ photon_emframe[ii]=coord_ph[ii+4] +vel[ii]*gg_->ScalarProd(coord_ph,coord_ph+4,vel); } double lnorm = gg_->ScalarProd(coord_ph,photon_emframe,photon_emframe); if (lnorm<=0.) throwError("In PolishDoughnut::radiativeq" " photon_emframe should be spacelike"); lnorm=sqrt(lnorm); double lscalb = gg_->ScalarProd(coord_ph,photon_emframe,b4vec); theta_mag = acos(lscalb/(lnorm*bnorm)); double sth = sin(theta_mag);//, cth = cos(theta_mag); if (sth==0.) throwError("In PolishDoughnut::radiativeq: " "theta_mag is zero leads to undefined emission"); // The virial temperature at doughnut's centre, // derived at energy equipartition from : 3/2*k*T = G*M*mp/r_centre //double Tvir = 2./3. * GYOTO_G_CGS * Msgr * GYOTO_PROTON_MASS_CGS // / (GYOTO_BOLTZMANN_CGS * r_centre_cgs) ; // NB: this depends on r_centre, which depends on both spin // and lambda; however, r_centre is always a few r_g (~2 to 10) // so it does not vary so much // doughnut's central temperature double T0 = central_temperature_;//centraltemp_over_virial_*Tvir; double kappabis = T0*pow(number_density_central,-CST_POLY_INDEX_M1); T_electron = kappabis*pow(number_density,CST_POLY_INDEX_M1); } // End of the switch between doughnut and adaf double Theta_elec = GYOTO_BOLTZMANN_CGS*T_electron /(GYOTO_ELECTRON_MASS_CGS*GYOTO_C2_CGS); double coef_ther=0.; // coef_ther: see e.g. Ozel+2000, eq. 6 // here multiplied by Theta_elec coz there would be later // a multiplication by Theta_elec anyway if (Theta_elec > 0.01){ coef_ther = (3.*bessk(3,1./Theta_elec)+bessk1(1./Theta_elec)) / (4.*bessk(2,1./Theta_elec)) -1.; }else if (Theta_elec > 1e-5){ // For small Theta_elec, Bessel functions become // very small, so I use a linear fit, correct to 1% // at theta_e=0.01, and even better for smaller values coef_ther=1.5*Theta_elec; }else{ // too low Theta_e leads to Bnu being nan... for (size_t ii=0; iitemperature(T_electron); double Bnu =(*spectrumBB_)(nuem)/GYOTO_INU_CGS_TO_SI; // BB in cgs // cout << "Te= " << T_electron << " " << Theta_elec << endl; // ***Synchrotron emission coef. if (!angle_averaged_){ emis_synch_ther= emissionSynchro_komissarov_direction(Theta_elec,number_density, nuem,nuc,theta_mag); abs_synch_ther=emis_synch_ther/Bnu; if (deltaPL_!=0.){ emis_synch_PL= emissionSynchro_komissarov_PL_direction(number_density_PL, nuem,nuc,theta_mag); abs_synch_PL= absorptionSynchro_komissarov_PL_direction(number_density_PL, nuem,nuc,theta_mag); } }else{ emis_synch_ther= emissionSynchro_komissarov_averaged(Theta_elec,number_density, nuem,nuc); abs_synch_ther=emis_synch_ther/Bnu; if (deltaPL_!=0.){ emis_synch_PL= emissionSynchro_komissarov_PL_averaged(number_density_PL, nuem,nuc); abs_synch_PL= absorptionSynchro_komissarov_PL_averaged(number_density_PL, nuem,nuc); } } emis_synch = emis_synch_ther+emis_synch_PL; abs_synch = abs_synch_ther+abs_synch_PL; // emis_synch = emis_synch_PL; // abs_synch = abs_synch_PL; if (abs_synch!=abs_synch || abs_synch==abs_synch+1.) { throwError("In PolishDoughnut::radiativeq: " "abs coef is nan or infinite"); // NB: emission coef always checked in other functions // but anu may be nan only here if e.g. Bnu=nan } // ***Final increment to intensity (in SI units) double delta_s = dsem*GYOTO_G_CGS*Msgr*GYOTO_C2_CGS_M1; Inu[ii]= emis_synch * GYOTO_INU_CGS_TO_SI * delta_s * exp(- abs_synch * delta_s); Taunu[ii]=exp(- abs_synch * delta_s); // NB: abs_synch is in cgs (cm^-1) as well as delta_s (cm) } } double PolishDoughnut::transmission(double nuem, double dsem, double * coord) const { if (!flag_radtransf_) return 0.; //Complete absorption for optically thick return 1.;//NO ABSORPTION FOR OPTICALLY THIN } double PolishDoughnut::BBapprox(double nuem, double Te) const{ double HnuOverKt=GYOTO_PLANCK_CGS*nuem/(GYOTO_BOLTZMANN_CGS*Te); double tol=1e-2; if (HnuOverKt1./tol) //Wien return 2.*GYOTO_PLANCK_CGS*nuem*nuem*nuem*GYOTO_C2_CGS_M1 *exp(-HnuOverKt); else //Planck return 2.*GYOTO_PLANCK_CGS*nuem*nuem*nuem*GYOTO_C2_CGS_M1 *1./(exp(HnuOverKt)-1.); } double PolishDoughnut::funcxM(double alpha1, double alpha2, double alpha3, double xM) { //Mahadevan 96 fit function return 4.0505*alpha1/pow(xM,1./6.) *(1.+0.4*alpha2/pow(xM,1./4.)+0.5316*alpha3/sqrt(xM)) *exp(-1.8899*pow(xM,1./3.)); } // Intersection of the constant angular momentum l0 with the Keplerian one //double PolishDoughnut::intersection(double rr) const PolishDoughnut::intersection_t::intersection_t(PolishDoughnut*parent) : papa(parent) { } double PolishDoughnut::intersection_t::operator()(double rr) const { double y = papa->gg_->getSpecificAngularMomentum(rr) - papa->l0_; return y ; // y = 0 gives 2 intersections, //the cusp and the central radius of the torus } // Solving the transcendental equation for "xM" numerically at each r double PolishDoughnut::transcendental_t::operator()(double xM) const { double rr = par[0] ; double n_e = par[1] ; double BB = par[2] ; double Te = par[3] ; double alpha1 = par[4] ; double alpha2 = par[5] ; double alpha3 = par[6] ; double y=0.; double temp_e = GYOTO_BOLTZMANN_CGS*Te /(GYOTO_ELECTRON_MASS_CGS*GYOTO_C_CGS*GYOTO_C_CGS); double nu_0 = GYOTO_ELEMENTARY_CHARGE_CGS* BB / (2. * M_PI * GYOTO_ELECTRON_MASS_CGS * GYOTO_C_CGS); double nuem = 3./2.*xM*nu_0*temp_e*temp_e; // cout << "nuem: " << xM << " " << nu_0 << " " << temp_e << " " << nuem << endl; double Bnu = 2.*nuem*nuem/(GYOTO_C_CGS*GYOTO_C_CGS)*GYOTO_BOLTZMANN_CGS*Te; if (alpha1==0. && alpha2==0. && alpha3==0.){ // Using directional emission ; up-to-date double theta_mag = par[7]; double alphanu_synch = 0.; int isPL=par[8]; // cout << "isPL= " << isPL << endl; double conv = papa -> gg_ -> unitLength() * 100.; double rcarac=(papa->r_torusouter_ - papa->r_cusp_) * conv; // cgs caracteristic length // cout << papa->r_centre_ << " " << papa->r_cusp_ << endl; if (rcarac!=rcarac || rcarac==rcarac+1. || rcarac<0.) throwError("In transcendental::operator:" " bad rcarac value"); if (theta_mag!=0.){ if (!isPL){ //Note: here n_e is the thermal nb density double emis_synch = papa->emissionSynchro_komissarov_direction(temp_e,n_e, nuem,nu_0, theta_mag); alphanu_synch = emis_synch / Bnu; }else{ //Note: here n_e is the PL nb density //cout << "feed alpha with: " << n_e << " " << nuem << " " << nu_0 << " " << theta_mag << endl; alphanu_synch = papa->absorptionSynchro_komissarov_PL_direction(n_e,nuem, nu_0,theta_mag); } }else{ throwError("In doughnut operator: not ready yet"); } y = alphanu_synch*rcarac - 1.; //cout << "nu alpha r= " << xM << " " << nuem << " " << alphanu_synch << " " << rcarac << " " << y << endl; //y = 4./3.*M_PI*rr*rr*rr*jnu_sync_dir - M_PI*Bnu*4.*M_PI*rr*rr; }else{ // This uses Mahadevan et al. 1996 formulation double func_xM = PolishDoughnut::funcxM(alpha1,alpha2,alpha3,xM); double BesselK2 = bessk(2,1./temp_e); y = GYOTO_ELEMENTARY_CHARGE_CGS*GYOTO_ELEMENTARY_CHARGE_CGS /(sqrt(3.)*GYOTO_C_CGS) * (4.*M_PI*n_e)/BesselK2 * nuem * func_xM * 4./3.*M_PI*rr*rr*rr - M_PI * Bnu * 4.*M_PI*rr*rr; //This is j_nu_synch * 4/3pi*r3 - pi*B_Planck(Te)*4pi*r2 } return y ; // y = 0 gives 1 intersection for each radius } // Solving the transcendental equation for "xM" numerically at each r double PolishDoughnut::outerradius_t::operator()(double rr) const { double theta = M_PI/2.; double pos[4]={0.,rr,theta,0.}; double ww = (papa->gg_->getPotential(pos,papa->l0_) - papa->W_surface_)*papa->DeltaWm1_; return ww; } double PolishDoughnut::bessi0(double xx) { double ax,ans,y; if((ax=fabs(xx))< 3.75){ y=xx/3.75; y*=y; ans=1.0+y*(3.5156229+y*(3.0899424+y*(1.2067492 +y*(0.2659732 +y*(0.360768e-1 +y*0.45813e-2))))); }else{ y=3.75/ax; ans=(exp(ax)/sqrt(ax)) *(0.39894228 +y*(0.1328592e-1 +y*(0.225319e-2 +y*(-0.157565e-2 +y*(0.916281e-2 +y*(-0.2057706e-1 +y*(0.2635537e-1 +y*(-0.1647633e-1 +y*0.392377e-2)))))))); } return ans; } double PolishDoughnut::bessk0(double xx) { double ans,y; if(xx<=2.0){ y=xx*xx/4.0; ans=(-log(xx/2.0)*bessi0(xx)) +(-0.57721566 +y*(0.42278420 +y*(0.23069756+y*(0.3488590e-1 +y*(0.262698e-2 +y*(0.10750e-3+y*0.74e-5)))))); }else{ y=2.0/xx; ans=(exp(-xx)/sqrt(xx))*(1.25331414 +y*(-0.7832358e-1 +y*(0.2189568e-1 +y*(-0.1062446e-1 +y*(0.587872e-2 +y*(-0.251540e-2 +y*0.53208e-3)))))); } return ans; } double PolishDoughnut::bessi1(double xx) { double ax,ans,y; if((ax=fabs(xx))< 3.75){ y=xx/3.75; y*=y; ans=ax*(0.5+y*(0.87890594 +y*(0.51498869 +y*(0.15084934 +y*(0.2658733e-1 +y*(0.301532e-2+y*0.32411e-3)))))); }else{ y=3.75/ax; ans=0.2282967e-1+y*(-0.2895312e-1+y*(0.1787654e-1 -y*0.420059e-2)); ans=0.39894228+y*(-0.3988024e-1+y*(-0.362018e-2 +y*(0.163801e-2 +y*(-0.1031555e-1+y*ans)))); ans*=(exp(ax)/sqrt(ax)); } return xx<0.0 ? -ans : ans; } double PolishDoughnut::bessk1(double xx) { double yy,ans; if(xx<=2.0){ yy=xx*xx/4.0; ans=(log(xx/2.0)*bessi1(xx)) +(1.0/xx)*(1.0+yy*(0.15443144 +yy*(-0.67278579 +yy*(-0.18156897 +yy*(-0.1919402e-1 +yy*(-0.110404e-2 +yy*(-0.4686e-4))))))); }else{ yy=2.0/xx; ans=(exp(-xx)/sqrt(xx))*(1.25331414 +yy*(0.23498619 +yy*(-0.3655620e-1 +yy*(0.1504268e-1 +yy*(-0.780353e-2 +yy*(0.325614e-2 +yy*(-0.68245e-3))))))); } return ans; } double PolishDoughnut::bessk(int nn,double xx) { double bk,bkm,bkp,tox; if(nn< 2) throwError("PolishDoughnut::besselk n>2!"); tox=2.0/xx; bkm=bessk0(xx); bk=bessk1(xx); for(int j=1;j. */ #include "GyotoPowerLawSpectrum.h" #include "GyotoFactoryMessenger.h" #include "GyotoUtils.h" #include #include #ifdef GYOTO_USE_XERCES #include "GyotoFactory.h" #endif using namespace Gyoto; /// Properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(Spectrum::PowerLaw) GYOTO_PROPERTY_DOUBLE(Spectrum::PowerLaw, Exponent, exponent) GYOTO_PROPERTY_DOUBLE(Spectrum::PowerLaw, Constant, constant) GYOTO_PROPERTY_VECTOR_DOUBLE(Spectrum::PowerLaw, CutOffIneV, cutoffinev) GYOTO_PROPERTY_END(Spectrum::PowerLaw, Generic::properties) /// Spectrum::PowerLaw::PowerLaw() : Spectrum::Generic("PowerLaw"), constant_(1.), exponent_(0.), minfreq_(DBL_MIN), maxfreq_(DBL_MAX){} Spectrum::PowerLaw::PowerLaw(double p, double c) : Spectrum::Generic("PowerLaw"), constant_(c), exponent_(p), minfreq_(DBL_MIN), maxfreq_(DBL_MAX){} Spectrum::PowerLaw * Spectrum::PowerLaw::clone() const { return new Spectrum::PowerLaw(*this); } double Spectrum::PowerLaw::constant() const { return constant_; } void Spectrum::PowerLaw::constant(double c) { constant_ = c; } double Spectrum::PowerLaw::exponent() const { return exponent_; } void Spectrum::PowerLaw::exponent(double c) { exponent_ = c; } void Spectrum::PowerLaw::cutoffinev(std::vector const &v) { if (v.size() != 2) throwError("In PowerLawSpectrum: Only 2 arguments to define" " cutoffs"); minfreq_ = v[0]*GYOTO_eV2Hz; maxfreq_ = v[1]*GYOTO_eV2Hz; } std::vector Spectrum::PowerLaw::cutoffinev() const { std::vector v (2, 0.); v[0]=minfreq_; v[1]=maxfreq_; return v; } double Spectrum::PowerLaw::operator()(double nu) const { if (numaxfreq_) return 0.; // cutoffs return constant_ * pow(nu, exponent_); } Gyoto-1.2.0/lib/Property.C000066400000000000000000000053651302352257300153240ustar00rootroot00000000000000#include "GyotoProperty.h" using namespace std ; using namespace Gyoto ; Property::Property(Property const * const ancestors) : name(""), type(empty_t), parent(ancestors) {} Property::Property(std::string classname, std::string doc) : name(classname), type(empty_t), parent(NULL), doc(doc){} #define GYOTO_LOCAL(T) \ Property::Property(string n, set_##T##_t set, get_##T##_t get, string d) \ : name(n), type(T##_t), parent(NULL), doc(d) { \ setter.set_##T=set; \ getter.get_##T=get; \ } GYOTO_LOCAL(long) GYOTO_LOCAL(unsigned_long) GYOTO_LOCAL(metric) GYOTO_LOCAL(spectrum) GYOTO_LOCAL(astrobj) GYOTO_LOCAL(screen) GYOTO_LOCAL(spectrometer) #undef GYOTO_LOCAL Property::Property(string n, set_size_t_t set, get_size_t_t get, int, string d) : name(n), type(size_t_t), parent(NULL), doc(d) { setter.set_size_t=set; getter.get_size_t=get; } Property::Property(string n, set_double_t set, get_double_t get, string d) : name(n), type(double_t), parent(NULL), doc(d) { setter.set_double=set; getter.get_double=get; setter_unit.set_double=NULL; getter_unit.get_double=NULL; } Property::Property(string n, set_double_t set, get_double_t get, set_double_unit_t setu, get_double_unit_t getu, string d) : name(n), type(double_t), parent(NULL), doc(d) { setter.set_double=set; getter.get_double=get; setter_unit.set_double=setu; getter_unit.get_double=getu; } Property::Property(string n, string nf, set_bool_t set, get_bool_t get, string d) : name(n), name_false(nf), type(bool_t), parent(NULL), doc(d) { setter.set_bool=set; getter.get_bool=get; } Property::Property(string n, set_string_t set, get_string_t get, bool is_filename, string d) : name(n), type(is_filename?filename_t:string_t), parent(NULL), doc(d) { setter.set_string=set; getter.get_string=get; } Property::Property(string n, set_vector_double_t set, get_vector_double_t get, string d) : name(n), type(vector_double_t), parent(NULL), doc(d) { setter.set_vdouble=set; getter.get_vdouble=get; setter_unit.set_vdouble=NULL; getter_unit.get_vdouble=NULL; } Property::Property(string n, set_vector_double_t set, get_vector_double_t get, set_vector_double_unit_t setu, get_vector_double_unit_t getu, string d) : name(n), type(vector_double_t), parent(NULL), doc(d) { setter.set_vdouble=set; getter.get_vdouble=get; setter_unit.set_vdouble=setu; getter_unit.get_vdouble=getu; } Property::Property(string n, set_vector_unsigned_long_t set, get_vector_unsigned_long_t get, string d) : name(n), type(vector_unsigned_long_t), parent(NULL), doc(d) { setter.set_vulong=set; getter.get_vulong=get; } Property::operator bool() const { return type != empty_t || name != ""; } Gyoto-1.2.0/lib/Register.C000066400000000000000000000213011302352257300152500ustar00rootroot00000000000000/* Copyright 2011-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoRegister.h" #include "GyotoUtils.h" #include "GyotoAstrobj.h" #include "GyotoMetric.h" #include "GyotoSpectrum.h" #include "GyotoSpectrometer.h" #include "GyotoConverters.h" #include #include #include #include #include #include using namespace Gyoto; using namespace std; static std::string GyotoRegisterCurrentPlugin ("built-in"); static std::vector GyotoRegisteredPlugins; typedef void GyotoInitFcn(); bool Gyoto::havePlugin(std::string name) { for (size_t i=0; i < GyotoRegisteredPlugins.size(); ++i) if (GyotoRegisteredPlugins[i]==name) return true; return false; } void Gyoto::requirePlugin(std::string name, int nofail) { if (!havePlugin(name)) loadPlugin(name.c_str(), nofail); } void Gyoto::loadPlugin(char const*const nam, int nofail) { string name(nam); // Determine file name string dlfile = "libgyoto-" ; dlfile += name ; dlfile += "." ; dlfile += GYOTO_PLUGIN_SFX ; // If nam _is_ a file name, retrieve plug-in name string marker="/libgyoto-"; if (strstr(nam, marker.c_str())) { dlfile = name; name=name.substr(0, name.rfind("." GYOTO_PLUGIN_SFX)); name=name.substr(name.rfind(marker)+marker.size()); GYOTO_DEBUG << name << endl; } // Prepare name of init function string dlfunc = "__Gyoto"; dlfunc += name ; dlfunc += "Init"; void* handle = NULL; GyotoInitFcn* initfcn = NULL; char * err = NULL; // Keep track of all dlopen() errors string errors("Failed loading plug-in '"); errors += name; errors += "'.\n The following attempts were made:"; // Try first without path (i.e. in default linker locations) GYOTO_DEBUG << "Loading plug-in: " << name < plug_path; plug_path.push_back(GYOTO_PKGLIBDIR "/"); plug_path.insert(plug_path.begin(), plug_path[0] + GYOTO_SOVERS "/"); # if defined GYOTO_LOCALPKGLIBDIR plug_path.insert(plug_path.begin(), GYOTO_LOCALPKGLIBDIR "/"); plug_path.insert(plug_path.begin(), plug_path[0] + GYOTO_SOVERS "/"); # endif std::vector::iterator cur = plug_path.begin(); std::vector::iterator end = plug_path.end(); std::string dlfull= dlfile; while (!handle && cur != end) { dlfull = *cur + dlfile; GYOTO_DEBUG << "Trying to dlopen " << dlfull << "...\n"; handle = dlopen(dlfull.c_str(), RTLD_LAZY | RTLD_GLOBAL); ++cur; if (!handle && (err=dlerror())) { errors += "\n * Error loading "; errors += dlfull + ":\n "; errors += err; } } // Check for success if (handle) { GYOTO_DEBUG << "Successfully loaded " << dlfull << ".\n"; } else { GYOTO_DEBUG << "Failed loading " << dlfull << ".\n"; if (nofail) { if (verbose() >= GYOTO_DEFAULT_VERBOSITY) cerr << "WARNING: unable to load optional plug-in " << dlfile << endl; return; } throwError(errors.c_str()); } // Find and execute init function GYOTO_DEBUG << "Searching plug-in init function " << dlfunc << endl; initfcn = (GyotoInitFcn*)dlsym(handle, dlfunc.c_str()); if ( (err=dlerror()) || !initfcn) { dlfunc = "__GyotoPluginInit"; initfcn = (GyotoInitFcn*)dlsym(handle, dlfunc.c_str()); } if ( (err=dlerror()) ) throwError(err); GYOTO_DEBUG << "Calling plug-in init function " << dlfunc << endl; std::string tmp_name(GyotoRegisterCurrentPlugin); // In case nam is a file name, that's what we wan't to store GyotoRegisterCurrentPlugin = nam; (*initfcn)(); GyotoRegisterCurrentPlugin = tmp_name; // In case nam is a file name, that's what we wan't to store GyotoRegisteredPlugins.insert(GyotoRegisteredPlugins.begin(), nam); GYOTO_DEBUG << "Done." << endl; } void Gyoto::Register::init(char const * cpluglist) { // Clean registers Metric::initRegister(); Astrobj::initRegister(); Spectrum::initRegister(); // This cleans and fills Spectometer::Register_ Spectrometer::initRegister(); GyotoRegisteredPlugins.push_back(GyotoRegisterCurrentPlugin); // Init units system Units::Init(); // Init built-in plug-ins #ifdef GYOTO_BUILTIN_STDPLUG __GyotostdplugInit(); #endif #ifdef GYOTO_BUILTIN_LORENEPLUG __GyotoloreneInit(); #endif // Load DL plug-ins if (!cpluglist) cpluglist = getenv("GYOTO_PLUGINS"); if (!cpluglist) cpluglist = GYOTO_DEFAULT_PLUGINS; std::string pluglist = cpluglist; if (pluglist.length()) { size_t first=0, last=0; string curplug=""; int nofail=0; while (pluglist.length()) { last=pluglist.find(","); nofail=0; curplug=pluglist.substr(0, last); if (debug()) cerr << "DEBUG: first: " << first << ", last: " << last << ", pluglist: |" << pluglist << "|" << ", curplug: |" << curplug << "|" << endl; if (last <= pluglist.length()) pluglist=pluglist.substr(last+1); else pluglist=""; if (!curplug.compare(0, 7, "nofail:")) { curplug = curplug.substr(7); nofail=1; } Gyoto::loadPlugin(curplug.c_str(), nofail); nofail=0; } } if (debug()) Register::list(); } Register::Entry::Entry(std::string name, Gyoto::SmartPointee::Subcontractor_t* subcontractor, Register::Entry* next) : name_(name), subcontractor_(subcontractor), next_(next), plugin_(GyotoRegisterCurrentPlugin) {} Register::Entry::~Entry() { if (next_) delete next_; } #ifndef GYOTO_NO_DEPRECATED #warning Embedding deprecated method.\ Define GYOTO_NO_DEPRECATED to disable. Gyoto::SmartPointee::Subcontractor_t* Register::Entry::getSubcontractor(std::string name, int errmode) { std::string plugin(""); return getSubcontractor(name, plugin, errmode); } #endif Gyoto::SmartPointee::Subcontractor_t* Register::Entry::getSubcontractor(std::string name, std::string &plugin, int errmode) { # if GYOTO_DEBUG_ENABLED GYOTO_IF_DEBUG GYOTO_DEBUG_EXPR(name); GYOTO_DEBUG_EXPR(errmode); GYOTO_ENDIF_DEBUG # endif bool any_plugin = (plugin == ""); if (name_==name && (any_plugin || (plugin_ == plugin))) { if (any_plugin) plugin=plugin_; return subcontractor_; } if (next_) return next_ -> getSubcontractor(name, plugin, errmode); if (errmode) return NULL; throwError ("Unregistered kind: "+name); return NULL; // will never get there, avoid compilation warning } void Gyoto::Register::list() { Register::Entry* entry = NULL; cout << "Gyoto will look for plug-ins first in the run-time linker default locations\n" "(typically includes directories listed in e.g. $LD_LIBRARY_PATH), then in the\n" "following locations:" << endl; # if defined GYOTO_LOCALPKGLIBDIR cout << " " << GYOTO_LOCALPKGLIBDIR "/" GYOTO_SOVERS "/" << endl; cout << " " << GYOTO_LOCALPKGLIBDIR "/" << endl; # endif cout << " " << GYOTO_PKGLIBDIR "/" GYOTO_SOVERS "/" << endl; cout << " " << GYOTO_PKGLIBDIR "/" << endl << endl; cout << "List of loaded plug-ins:" << endl; for (size_t i=0; i < GyotoRegisteredPlugins.size(); ++i) cout << " " << GyotoRegisteredPlugins[i] << endl; cout << "List of available Metrics:" << endl; for (entry = Metric::Register_; entry; entry = entry -> next_) cout << " " << entry -> name_ << " (in plug-in: " << entry -> plugin_ << ")" << endl; cout << "List of available Astrobjs:" << endl; for (entry = Astrobj::Register_; entry; entry = entry -> next_) cout << " " << entry -> name_ << " (in plug-in: " << entry -> plugin_ << ")" << endl; cout << "List of available Spectra:" << endl; for (entry = Spectrum::Register_; entry; entry = entry -> next_) cout << " " << entry -> name_ << " (in plug-in: " << entry -> plugin_ << ")" << endl; cout << "List of available Spectrometers:" << endl; for (entry = Spectrometer::Register_; entry; entry = entry -> next_) cout << " " << entry -> name_ << " (in plug-in: " << entry -> plugin_ << ")" << endl; } Gyoto-1.2.0/lib/RezzollaZhidenko.C000066400000000000000000000252611302352257300167730ustar00rootroot00000000000000/* Copyright 2014 Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoRezzollaZhidenko.h" #include #include #include #define STRINGIFY(foo) #foo using namespace Gyoto; using namespace Gyoto::Metric; using namespace std; #define GYOTO_DRHOR 0.1 #define GYOTO_NBPARAM_MAX 4 // only this number of parameters is allowed, e.g. a0, a1, a2, a3 and not more for the time being; assumed the same for a and b. /// Properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(RezzollaZhidenko, "Spherically-symmetric parametrized metric of Rezzolla & Zhidenko 2014") GYOTO_PROPERTY_DOUBLE(RezzollaZhidenko, Epsilon, epsilon) GYOTO_PROPERTY_DOUBLE(RezzollaZhidenko, Rms, rms) GYOTO_PROPERTY_DOUBLE(RezzollaZhidenko, Rmb, rmb) GYOTO_PROPERTY_VECTOR_DOUBLE(RezzollaZhidenko, AParam, aparam, "At most 4 elements") GYOTO_PROPERTY_VECTOR_DOUBLE(RezzollaZhidenko, BParam, bparam, "At most 4 elements") GYOTO_PROPERTY_END(RezzollaZhidenko, Generic::properties) // accessors GYOTO_PROPERTY_ACCESSORS(RezzollaZhidenko, double, epsilon_, epsilon) GYOTO_PROPERTY_ACCESSORS(RezzollaZhidenko, double, rms_, rms) GYOTO_PROPERTY_ACCESSORS(RezzollaZhidenko, double, rmb_, rmb) void RezzollaZhidenko::aparam(std::vector const &v) { size_t n = v.size(); if (n>GYOTO_NBPARAM_MAX) throwError("In RezzollaZhidenko: choose at most " STRINGIFY(GYOTO_NBPARAM_MAX) " parameters"); for (size_t i=0; i RezzollaZhidenko::aparam() const { std::vector v(GYOTO_NBPARAM_MAX, 0.); for (size_t i=0; i const &v) { size_t n = v.size(); if (n>GYOTO_NBPARAM_MAX) throwError("In RezzollaZhidenko: choose at most " STRINGIFY(GYOTO_NBPARAM_MAX) " parameters"); for (size_t i=0; i RezzollaZhidenko::bparam() const { std::vector v(GYOTO_NBPARAM_MAX, 0.); for (size_t i=0; i1e-3) { cout << "at r,th= " << rr << " " << pos[2] << endl; cout << setprecision(20)<< a << " " << mu << " " << nu << " " << dst[a][mu][nu] << " " << dstS[a][mu][nu]<< endl; throwError("test RZ"); } } } } } return 0; } int RezzollaZhidenko::isStopCondition(double const * const coord) const { double r0 = 2./(1.+epsilon_); double rsink = r0 + GYOTO_KERR_HORIZON_SECURITY; return coord[1] < rsink ; } int RezzollaZhidenko::diff(const double* coordGen, const double* cst, double* res) const{ // OUTDATED TO BE CHECKED double rsink=2.+GYOTO_DRHOR; double r = coordGen[1] ; if (r < 0.) { cerr << "r= " << r << endl; throwError( "RezzollaZhidenko.C : r negative!!!!! the horizon" " may have been crossed..." ); } if (r < rsink) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "Too close to horizon in RezzollaZhidenko::diff at r= " << r << endl; # endif return 1; } double r2 = r*r ; double r3 = r2*r ; double ff = 1.+r2*1.*(1.-sqrt(1.+4./(1.*r3))); if (ff==0.) throwError("In RezzollaZhidenko::gmunu: ff is zero"); double fprime = 6./(r2*sqrt(1.+4./(1.*r3))) +2.*r*1.*(1.-sqrt(1.+4./(1.*r3))), fprimef2 = fprime/(ff*ff); double pr=coordGen[5]; double EE=cst[1]; double E2=EE*EE; double LL=cst[2]; double L2=LL*LL; /* ---> Spherically symmetric EOM */ res[0] = EE/ff; // tdot res[1] = ff*pr; // rdot res[2] = 0.; // thdot (planar motion) res[3] = LL/r2; // phidot res[4] = 0.; // ptdot: pt = cst = -E res[5] = 0.5*fprime*pr*pr-L2/r3+0.5*E2*fprimef2;// prdot res[6]= 0.; // pthetadot res[7] = 0.; // pphidot: pphi = cst = L return 0; } void RezzollaZhidenko::circularVelocity(double const coor[4], double vel[4], double dir) const { if (keplerian_) { // If keplerian_ is true, let the generic implementation return // the Keplerian velocity instead of the true circular velocity Generic::circularVelocity(coor, vel, dir); return; } # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG<<"coor=["< #include #include #include #include #include #include using namespace Gyoto; using namespace Gyoto::Metric; GYOTO_PROPERTY_START(RotStar3_1) GYOTO_PROPERTY_BOOL(RotStar3_1, GenericIntegrator, SpecificIntegrator, genericIntegrator) GYOTO_PROPERTY_FILENAME(RotStar3_1, File, file) GYOTO_PROPERTY_END(RotStar3_1, Generic::properties) // Lorene Metrics are not thread-safe GYOTO_PROPERTY_THREAD_UNSAFE(RotStar3_1) RotStar3_1::RotStar3_1() : Generic(GYOTO_COORDKIND_SPHERICAL, "RotStar3_1"), filename_(NULL), star_(NULL), integ_kind_(1) {} RotStar3_1::RotStar3_1(const RotStar3_1& o) : Generic(o), filename_(NULL), star_(NULL), integ_kind_(o.integ_kind_) { kind("RotStar3_1"); fileName(o.fileName()); } RotStar3_1* RotStar3_1::clone() const { return new RotStar3_1(*this); } RotStar3_1::~RotStar3_1() { const Map& mp=star_ -> get_mp(); const Mg3d* mg=mp.get_mg(); const Map* mpp=∓ delete star_; delete mpp; delete mg; delete [] filename_; if (debug()) cout << "RotStar3_1 Destruction" << endl; } void RotStar3_1::file(std::string const &fname) { cerr << "Setting file name to '" << fname << "'" << endl; fileName(fname.c_str()); } std::string RotStar3_1::file() const { if (!filename_) return ""; return filename_; } void RotStar3_1::fileName(char const * lorene_res) { if (filename_) { delete[] filename_; filename_=NULL; } if (star_) { const Map& mp=star_ -> get_mp(); const Mg3d* mg=mp.get_mg(); const Map* mpp=∓ delete star_; star_=NULL; delete mpp; delete mg; } filename_ = new char[strlen(lorene_res)+1]; strcpy(filename_,lorene_res); FILE* resfile=fopen(lorene_res,"r"); if (!resfile) throwError(string("No such file or directory: ")+lorene_res); Mg3d* mg = new Mg3d(resfile); Map_et* mps = new Map_et(*mg,resfile); Eos* p_eos = Eos::eos_from_file(resfile); star_ = new Lorene::Star_rot(*mps,*p_eos,resfile); star_ -> equation_of_state(); star_ -> update_metric(); star_ -> hydro_euler(); tellListeners(); } char const * RotStar3_1::fileName() const { return filename_; } void RotStar3_1::integKind(int ik) { integ_kind_ = ik; } int RotStar3_1::integKind() const { return integ_kind_; } bool RotStar3_1::genericIntegrator() const {return !integ_kind_;} void RotStar3_1::genericIntegrator(bool t) {integ_kind_=!t;} int RotStar3_1::diff(const double coord[8], double res[8]) const { //4-DIMENSIONAL INTEGRATION //NB: this diff is only called by Generic::RK4 //if (debug()) cout << "In 4D RotStar diff [8]..." << endl; //clock_t time1, time2; //double diftime, clocks = CLOCKS_PER_SEC; //time1 = clock(); double rr=coord[1],r2=rr*rr,th=coord[2],sinth2=sin(th)*sin(th),ph=coord[3]; //LAPSE const Scalar & NNscal=star_ -> get_nn(); double NN=NNscal.val_point(rr,th,ph), N2=NN*NN; double N_r=NNscal.dsdr().val_point(rr,th,ph); double N_th=NNscal.dsdt().val_point(rr,th,ph); //SHIFT (OMEGA) const Scalar & omega_scal=star_ -> get_nphi();//NB: avoid using star_ -> get_beta(), it is very time-consuming double omega=omega_scal.val_point(rr,th,ph), omega2=omega*omega; double omega_r=omega_scal.dsdr().val_point(rr,th,ph); double omega_th=omega_scal.dsdt().val_point(rr,th,ph); //METRIC POTENTIALS const Scalar & A2scal=star_ -> get_a_car(); const Scalar & B2scal=star_ -> get_b_car(); double A2=A2scal.val_point(rr,th,ph), B2=B2scal.val_point(rr,th,ph); double A2_r=A2scal.dsdr().val_point(rr,th,ph), B2_r=B2scal.dsdr().val_point(rr,th,ph); double A2_th=A2scal.dsdt().val_point(rr,th,ph), B2_th=B2scal.dsdt().val_point(rr,th,ph); /* time2 = clock(); diftime = time2 - time1; if (debug()) cout << "Time elapsed in temp 4D diff (in sec)= " << setprecision(GYOTO_PREC) << setw(GYOTO_WIDTH) << diftime/clocks << endl;*/ //METRIC COEF double gtt=-1./N2, grr=1./A2, gthth=1./(A2*r2), gpp=1./(B2*r2*sinth2)-omega2/N2, gtp=-omega/N2; double g_ttr=-2.*NN*N_r+B2_r*omega2*r2*sinth2+2.*omega*omega_r*B2*r2*sinth2+2.*rr*B2*omega2*sinth2, g_ttth=-2.*NN*N_th+B2_th*omega2*r2*sinth2+2.*omega*omega_th*B2*r2*sinth2+2.*cos(th)*sin(th)*r2*B2*omega2; double g_rrr=A2_r, g_rrth=A2_th; double g_ththr=r2*A2_r+2.*rr*A2, g_ththth=r2*A2_th; double g_ppr=sinth2*(r2*B2_r+2.*rr*B2), g_ppth=r2*(sinth2*B2_th+2.*cos(th)*sin(th)*B2); double g_tpr=-omega_r*B2*r2*sinth2-omega*B2_r*r2*sinth2-2.*rr*omega*B2*sinth2, g_tpth=-omega_th*B2*r2*sinth2-omega*B2_th*r2*sinth2-2.*cos(th)*sin(th)*omega*B2*r2; //4D CHRISTOFFELS in stationnary axisym spacetime double ch001=1./2.*gtt*g_ttr+1./2.*gtp*g_tpr, ch002=1./2.*gtt*g_ttth+1./2.*gtp*g_tpth, ch031=1./2.*gtt*g_tpr+1./2.*gtp*g_ppr, ch032=1./2.*gtt*g_tpth+1./2.*gtp*g_ppth, ch331=1./2.*gpp*g_ppr+1./2.*gtp*g_tpr, ch332=1./2.*gpp*g_ppth+1./2.*gtp*g_tpth, ch301=1./2.*gpp*g_tpr+1./2.*gtp*g_ttr, ch302=1./2.*gpp*g_tpth+1./2.*gtp*g_ttth, ch122=-1./2.*grr*g_ththr, ch133=-1./2.*grr*g_ppr, ch100=-1./2.*grr*g_ttr, ch111=1./2.*grr*g_rrr, ch112=1./2.*grr*g_rrth, ch103=-1./2.*grr*g_tpr, ch200=-1./2.*gthth*g_ttth, ch211=-1./2.*gthth*g_rrth, ch233=-1./2.*gthth*g_ppth, ch222=1./2.*gthth*g_ththth, ch221=1./2.*gthth*g_ththr, ch203=-1./2.*gthth*g_tpth; //RESULT: Derivatives res[0]=coord[4]; res[1]=coord[5]; res[2]=coord[6]; res[3]=coord[7]; //From the 4D equation of geodesics: res[4]=-2.*ch001*coord[4]*coord[5]-2.*ch002*coord[4]*coord[6]-2.*ch031*coord[7]*coord[5] - 2.*ch032*coord[7]*coord[6];//added 2011-02-27 ch032 term forgotten! to be checked res[5]=-ch111*coord[5]*coord[5]-ch122*coord[6]*coord[6]-ch133*coord[7]*coord[7]-ch100*coord[4]*coord[4]-2.*ch112*coord[5]*coord[6]-2.*ch103*coord[4]*coord[7]; res[6]=-ch211*coord[5]*coord[5]-ch222*coord[6]*coord[6]-ch233*coord[7]*coord[7]-ch200*coord[4]*coord[4]-2.*ch221*coord[5]*coord[6]-2.*ch203*coord[4]*coord[7]; res[7]=-2.*ch301*coord[4]*coord[5]-2.*ch302*coord[4]*coord[6]-2.*ch331*coord[7]*coord[5]-2.*ch332*coord[7]*coord[6]; /* time2 = clock(); diftime = time2 - time1; if (debug()) cout << "TOTAL Time elapsed in 4D diff (in sec)= " << setprecision(GYOTO_PREC) << setw(GYOTO_WIDTH) << diftime/clocks << endl;*/ return 0; } int RotStar3_1::diff(const double y[6], double res[6], int) const { //3+1 INTEGRATION //NB: this diff is only called by RotStar::RK4 //NBB: here t=theta, not time! //if (debug()) cout << "In 3+1 D RotStar::diff" << endl; // clock_t time1, time2; //double diftime, clocks = CLOCKS_PER_SEC; //time1 = clock(); //NB: all the computations used here are detailed in my 3+1 notes. //NB: Lorene coordinates are spherical-like //Variables: y=[r,theta,phi,Vr,Vtheta,Vphi] see definitions 3+1 geod paper double rr=y[0], r2=rr*rr, th=y[1], sinth2=sin(th)*sin(th), phi=y[2]; /* Important remark! [actually it is not used because the metric coef are known in function of A, B, N... ; but interesting to keep this in mind] Lorene gcon and gcov function return metric coef expressed in the orthonormal spherical tetrad d/dr, 1/r d/dtheta, 1/(r*sin(theta)) d/dphi There's thus a change of basis to come back to the natural basis of spherical coordinates. */ //LAPSE const Scalar & NNscal=star_ -> get_nn(); double NN=NNscal.val_point(rr,th,phi);//, NN2=NN*NN; if (NN == 0.) throwError("In RotStar3_1.C: NN==0!!"); double Nr=NNscal.dsdr().val_point(rr,th,phi); double Nt=NNscal.dsdt().val_point(rr,th,phi); //SHIFT (OMEGA) const Scalar & omega_scal=star_ -> get_nphi(); double omega=omega_scal.val_point(rr,th,phi); double omega_r=omega_scal.dsdr().val_point(rr,th,phi); double omega_t=omega_scal.dsdt().val_point(rr,th,phi); //METRIC POTENTIALS const Scalar & A2scal=star_ -> get_a_car(); const Scalar & B2scal=star_ -> get_b_car(); double A2=A2scal.val_point(rr,th,phi), B2=B2scal.val_point(rr,th,phi); double A2_r=A2scal.dsdr().val_point(rr,th,phi), B2_r=B2scal.dsdr().val_point(rr,th,phi); double A2_th=A2scal.dsdt().val_point(rr,th,phi),B2_th=B2scal.dsdt().val_point(rr,th,phi); /* time2 = clock(); diftime = time2 - time1; if (debug()) cout << "Time elapsed in 3+1 diff (in sec)= " << setprecision(GYOTO_PREC) << setw(GYOTO_WIDTH) << diftime/clocks << endl;*/ //METRIC COEF double grr=1./A2, gtt=1./(A2*r2), gpp=1./(B2*r2*sinth2), g_rrr=A2_r, g_rrt=A2_th, g_ttr=r2*A2_r+2.*rr*A2, g_ttt=r2*A2_th, g_ppr=r2*sinth2*B2_r+2.*rr*B2*sinth2, g_ppt=r2*sinth2*B2_th+2.*sin(th)*cos(th)*r2*B2; /* //Change of basis [Not used] gtt_=1./r2*gtt_;gpp_=1./(r2*sinth2)*gpp_;//natural basis contrav metric g_ttr_=2.*rr*g_tt_+r2*g_ttr;g_ttt_=r2*g_ttt_;g_ppr_=sinth2*(2.*rr*g_pp_+r2*g_ppr_);g_ppt_=r2*(2.*cos(th)*sin(th)*g_pp_+sinth2*g_ppt_);//natural basis derived covar metric (NB: the cov metric ceof that appear here must be in the orthonormal basis) */ //EXTRINSIC CURVATURE double Krp=-1./(2.*NN)*B2*r2*sinth2*omega_r; double Ktp=-1./(2.*NN)*B2*r2*sinth2*omega_t; //3-CHRISTOFFELS double Grrr=1./2.*grr*g_rrr, Grrt=1./2.*grr*g_rrt, Gttr=1./2.*gtt*g_ttr, Gttt=1./2.*gtt*g_ttt, Gppr=1./2.*gpp*g_ppr, Gptp=1./2.*gpp*g_ppt, Grtt=-1./2.*grr*g_ttr, Grpp=-1./2.*grr*g_ppr, Gtrr=-1./2.*gtt*g_rrt, Gtpp=-1./2.*gtt*g_ppt;//these are the only non-0 Christo /* OBSOLETE VERSION */ // //Christoffel terms (xdot^j+beta^j)(xdot^k+beta^k)Gamma^i_jk in geodesic eq.: // double Christo_r=rdot*rdot*Grrr+2.*rdot*thdot*Grrt+thdot*thdot*Grtt+(phidot-omega)*(phidot-omega)*Grpp, // Christo_th=2.*rdot*thdot*Gttr+thdot*thdot*Gttt+rdot*rdot*Gtrr+(phidot-omega)*(phidot-omega)*Gtpp, // Christo_ph=2.*rdot*(phidot-omega)*Gppr+2.*thdot*(phidot-omega)*Gptp; // double kappa=1./NN2*(rdot*Nr+thdot*Nt)-2./NN2*rdot*(phidot-omega)*Krp-2./NN2*thdot*(phidot-omega)*Ktp; // //RESULT: derivatives (see geodesic equation in 3+1) // res[0]=rdot; // res[1]=thdot; // res[2]=phidot; // res[3]=kappa*NN*rdot-NN*grr*Nr+1./NN*(Nr*rdot+Nt*thdot)*rdot+2.*NN*grr*(phidot-omega)*Krp-Christo_r;//-Grtt*thdot*thdot-Grpp*phidot*phidot; // res[4]=kappa*NN*thdot-NN*gtt*Nt+1./NN*(Nr*rdot+Nt*thdot)*thdot+2.*NN*gtt*(phidot-omega)*Ktp-Christo_th;//-2.*Gttr*rdot*thdot-Gtpp*phidot*phidot; // res[5]=kappa*NN*(phidot-omega)+1./NN*(Nr*rdot+Nt*thdot)*(phidot-omega)+2.*rdot*omega_r+2.*thdot*omega_t+2.*NN*gpp*(rdot*Krp+thdot*Ktp)-Christo_ph;//-2.*Gppr*rdot*phidot-2.*Gptp*thdot*phidot; // /* NEW VERSION JULY 2011 */ double Vr = y[3], Vth = y[4], Vph = y[5]; double Christo_r=Vr*Vr*Grrr+2.*Grrt*Vr*Vth+Grtt*Vth*Vth+Grpp*Vph*Vph, Christo_th=Gtrr*Vr*Vr+2.*Gttr*Vr*Vth+Gttt*Vth*Vth+Gtpp*Vph*Vph, Christo_ph=2.*Gppr*Vr*Vph+2.*Gptp*Vth*Vph; //See 3+1 equation of geodesics double prefact=1./NN*Vr*Nr+1./NN*Vth*Nt-2.*Krp*Vr*Vph-2.*Ktp*Vth*Vph; double Vrdot = NN*(Vr*prefact+2.*grr*Krp*Vph-Christo_r)-grr*Nr, Vthdot = NN*(Vth*prefact+2.*gtt*Ktp*Vph-Christo_th)-gtt*Nt, Vphdot = NN*(Vph*prefact+2.*gpp*(Krp*Vr+Ktp*Vth)-Christo_ph) +Vr*omega_r+Vth*omega_t; //NB: dot = wrt coordinate time t res[0]=NN*Vr; //dr/dt res[1]=NN*Vth; //dtheta/dt res[2]=NN*Vph+omega; //dphi/dt res[3]=Vrdot; //dVr/dt res[4]=Vthdot; //dVtheta/dt res[5]=Vphdot; //dVphi/dt /* time2 = clock(); diftime = time2 - time1; if (debug()) cout << "TOTAL Time elapsed in 3+1 diff (in sec)= " << setprecision(GYOTO_PREC) << setw(GYOTO_WIDTH) << diftime/clocks << endl;*/ return 0; } int RotStar3_1::myrk4(const double coorin[6], double h, double res[6]) const { //if (debug()) cout << "In RotStar::rk4" << endl; //Here the integration must be 3+1: if (!integ_kind_) throwError("In RotStar3_1::myrk4: Impossible case"); double k1[6], k2[6], k3[6], k4[6], coor_plus_halfk1[6], sixth_k1[6], coor_plus_halfk2[6], third_k2[6], coor_plus_k3[6], third_k3[6], sixth_k4[6]; if(diff(coorin,k1,1)) return 1; for (int i=0;i<6;i++) { k1[i]=h*k1[i]; coor_plus_halfk1[i]=coorin[i]+0.5*k1[i]; sixth_k1[i]=1./6.*k1[i]; } if(diff(coor_plus_halfk1,k2,1)) return 1; for (int i=0;i<6;i++) { k2[i]=h*k2[i]; coor_plus_halfk2[i]=coorin[i]+0.5*k2[i]; third_k2[i]=1./3.*k2[i]; } if(diff(coor_plus_halfk2,k3,1)) return 1; for (int i=0;i<6;i++) { k3[i]=h*k3[i]; coor_plus_k3[i]=coorin[i]+k3[i]; third_k3[i]=1./3.*k3[i]; } if(diff(coor_plus_k3,k4,1)) return 1; for (int i=0;i<6;i++) { k4[i]=h*k4[i]; sixth_k4[i]=1./6.*k4[i]; } for (int i=0;i<6;i++) { res[i]=coorin[i]+sixth_k1[i]+third_k2[i]+third_k3[i]+sixth_k4[i]; } return 0; } //int RotStar3_1::myrk4_adaptive(const double coord[8], double lastnorm, double normref, double coordnew[8], double h0, double& h1, int &) const int RotStar3_1::myrk4_adaptive(const double coord[6], double, double normref, double coordnew[6], double cst[2], double& tdot_used, double h0, double& h1, double h1max, double& hused) const { // if (debug()) cout << "In Rotstar::adaptive [6]" << endl; double delta0[6]; double delta0min=1e-15; double dcoord[6]; double eps=0.0001; double S=0.9; double errmin=1e-6; // double factnorm=2.; double sigh1=1.; h1max=deltaMax(coord, h1max); /*if (debug()) cout << "RotStar.C: coord in rk="; for (int ii=0;ii<8;ii++) if (debug()) cout << coord[ii] << " " ; if (debug()) cout << endl;*/ diff(coord,dcoord,1); for (int i = 0;i<6;i++) { delta0[i]=delta0min+eps*(fabs(h0*dcoord[i])); //if (debug()) cout << "Rot: delta0[i]=" << delta0[i] << endl; } double hbis=0.5*h0; double coordhalf[6]; double coord2[6]; double delta1[6]; double err; int count=0; // double newnorm; while (1){ count++; //if (debug()) cout << "count in rk Rot= " << count << endl; if (count > 100){ throwError("RotStar: bad rk"); } err=0.; myrk4(coord,h0,coordnew); myrk4(coord,hbis,coordhalf); myrk4(coordhalf,hbis,coord2); double coordnewbis[6], coordhalfbis[6], coord2bis[6], tdot_unused; int normalize=1; /* NB: for the time being (2011-03-11), normalize=1 imposes to update phprime and tdot to insure conservation of cst of motion; In order to insure norm conservation, there is an other flag in Normalize4v: consnorm, to be put to the desired value Caution: be sure it is really needed before putting consnorm to 1, it slows down A LOT the computation */ if (normalize){ Normalize4v(coordnew,coordnewbis,cst,tdot_used); Normalize4v(coordhalf,coordhalfbis,cst,tdot_unused); Normalize4v(coord2,coord2bis,cst,tdot_unused); for (int ii=0;ii<6;ii++){ coordnew[ii]=coordnewbis[ii]; coordhalf[ii]=coordhalfbis[ii]; coord2[ii]=coord2bis[ii]; } }else{ if (fabs(normref)0) throwError("In RotStar3_1.C: impossible to compute timelike norm!"); if (tdot_used<=0.){//NB: default value of tdot_used has correct sign tdot_used=-sqrt(-1./ds2); }else{ tdot_used=sqrt(-1./ds2); } } } for (int i = 0;i<6;i++){ delta1[i]=coord2[i]-coordnew[i]; if (err1) { h0=S*h0*pow(err,-0.25); hbis=0.5*h0; }else{ h1=(err > errmin ? S*h0*pow(err,-0.2) : 4.*h0);//pour éviter les explosions if (h1<0.) sigh1=-1.;//why sigh1 and fabs(h1)? because otherwise if h1<0 (possible here if backwards integration), h1 is < delta_min_, so h1 is always set to delta_min_... if (fabs(h1)h1max) h1=sigh1*h1max; hused=h0; break; } } return 0; } int RotStar3_1::myrk4_adaptive(Worldline* line, const double coord[8], double lastnorm, double normref, double coordnew[8], double h0, double& h1, double h1max) const { // if (debug()) cout << "In Rotstar::adaptive [8]" << endl; if (coord[1] < 2.5) {//inside rotating star -> a ameliorer if (debug()) cout << "In RotStar3_1.C: Particle has reached the rotating star. Stopping integration." << endl; return 1; } if (!integ_kind_) { /* To use 4D integration Here, the integration is performed by the most general Generic::myrk4 + Generic::diff functions that only call the christoffels (basic geodesic equation). The function christoffel being defined here in RotStar3_1, it is the 4D-christo computed thanks to 3+1 quantities that are used. */ if (Generic::myrk4_adaptive(line,coord,lastnorm,normref,coordnew,h0,h1,h1max)) { return 1; }else{ return 0; } } //Below: 3+1 integration //Variables used: [r,theta,phi,Vr,Vtheta,Vphi] for definition see 3+1 geod paper double rr=coord[1],th=coord[2],ph=coord[3],tdot=coord[4],rdot=coord[5],thdot=coord[6],phdot=coord[7],rprime=rdot/tdot,thprime=thdot/tdot,phprime=phdot/tdot; const Scalar & NNscal=star_ -> get_nn(); double NN=NNscal.val_point(rr,th,ph);//, NN2=NN*NN; if (NN == 0.) throwError("In RotStar3_1.C: NN==0!!"); const Scalar & omega_scal=star_ -> get_nphi(); double omega=omega_scal.val_point(rr,th,ph); double Vr = 1./NN*rprime, Vth=1./NN*thprime, Vph=1./NN*(phprime-omega); double g_tt=gmunu(coord,0,0), g_tp=gmunu(coord,0,3), g_pp=gmunu(coord,3,3); double cst_p_t=g_tt*tdot+g_tp*phdot, cst_p_ph=g_pp*phdot+g_tp*tdot;//Cst of motion because the vectors d/dt and d/dphi are Killing //if (debug()) cout << "Rot: cst= " << cst_p_t << " " << cst_p_ph << endl; double cst[2]={cst_p_t,cst_p_ph}; //cout << "3+1 Cst of motion= " << cst_p_t << " " << cst_p_ph << endl; double coor[6]={rr,th,ph,Vr,Vth,Vph}; double coornew[6]; double hused=1000.; if (tdot<0. && h0>0.) h0*=-1.;//to integrate backwards if tdot<0 double tdot_used=tdot; /*if (tdot<=0.){ tdot_used=-1000.; }else{ tdot_used=1000.; }//tdot_used thus has the correct sign*/ if (myrk4_adaptive(coor,lastnorm,normref,coornew,cst,tdot_used,h0,h1,delta_max_,hused)) return 1; // if (debug()) cout << "tdot_used in rk-8= " << tdot_used << endl; //phdot=coornew[5]*tdot_used;rdot=coornew[3]*tdot_used;thdot=coornew[4]*tdot_used; NN=NNscal.val_point(coornew[0],coornew[1],coornew[2]); omega=omega_scal.val_point(coornew[0],coornew[1],coornew[2]); phdot=(NN*coornew[5]+omega)*tdot_used;rdot=NN*coornew[3]*tdot_used;thdot=NN*coornew[4]*tdot_used; coordnew[0]=coord[0]+hused;coordnew[1]=coornew[0];coordnew[2]=coornew[1];coordnew[3]=coornew[2];coordnew[4]=tdot_used;coordnew[5]=rdot;coordnew[6]=thdot;coordnew[7]=phdot; // if (debug()) cout << "Rot: norm at end rk-8= " << ScalarProd(coordnew,coordnew+4,coordnew+4) << endl; return 0; } void RotStar3_1::Normalize4v(const double coordin[6], double coordout[6], const double cst[2], double& tdot_used) const{ //Here coordin=[r,theta,phi,Vr,Vtheta,Vphi] double posin[4]={0.,coordin[0],coordin[1],coordin[2]};//posin={t,rr,th,ph} with t=anything (g_munu are independent of t), {rr,th,ph}=cf coordin double g_tt=gmunu(posin,0,0), g_rr=gmunu(posin,1,1), g_thth=gmunu(posin,2,2), g_tp=gmunu(posin,0,3), g_pp=gmunu(posin,3,3), cst_p_t=cst[0], cst_p_ph=cst[1]; double phdot,phprime; //double phprime_init=coordin[5],dphpr=0.01; const Scalar & NNscal=star_ -> get_nn(); double NN=NNscal.val_point(coordin[0],coordin[1],coordin[2]);//, NN2=NN*NN; if (NN == 0.) throwError("In RotStar3_1.C: NN==0!!"); const Scalar & omega_scal=star_ -> get_nphi(); double omega=omega_scal.val_point(coordin[0],coordin[1],coordin[2]); double phprime_init=NN*coordin[5]+omega,dphpr=0.01; // Changing phdot and tdot (thus phprime) to insure conservation of cst of motion if (g_tt != 0. && (g_tt*g_pp != g_tp*g_tp)){ phdot=(cst_p_ph - g_tp/g_tt*cst_p_t)/(g_pp-g_tp*g_tp/g_tt); tdot_used=(cst_p_t - g_tp*phdot)/g_tt; phprime=phdot/tdot_used;//cf constants of motion // if (debug()) cout << "tdot use in Normalize= " << tdot_used << endl; }else{ throwError("RotStar3_1.C: special case metric coef=0 to handle in Normalize4v..."); } if (fabs(phprime-phprime_init)>dphpr*fabs(phprime_init)){ if (verbose() >= GYOTO_SEVERE_VERBOSITY) cerr << "WARNING (severe):" << endl << "Too big change in phprime: " << phprime_init << " " << phprime << endl; } /*double fourvel[4]={tdot_used,NN*coordin[3]*tdot_used,NN*coordin[4]*tdot_used,phprime*tdot_used}; //4-velocity with correct value of tdot and phdot cout << "DEBUT AFFICHE" << endl; cout << "Vr= " << coordin[3] << " " << NN << " " << tdot_used << " " << NN*coordin[3]*tdot_used << endl; cout << "fourvel= " ; for (int ii=0;ii<4;ii++) cout << fourvel[ii] << " " ; cout << endl; cout << "-------> tdot= " << tdot_used << endl; double normaffich=ScalarProd(posin,fourvel,fourvel); cout << "cst motion in Normalize= " << normaffich << " " << cst_p_t << " " << cst_p_ph << endl; if (fabs(normaffich)>1000. || normaffich!=normaffich) throwError("testrotstar --"); */ // double rprime=coordin[3], thprime=coordin[4]; double rprime=NN*coordin[3], thprime=NN*coordin[4]; double rprime_new=rprime, thprime_new=thprime; int consnorm=0; if (consnorm){ // Changing rprime and thprime to insure norm conservation double norminit=tdot_used*tdot_used*(g_tt+2.*g_tp*phprime+g_rr*rprime*rprime+g_thth*thprime*thprime+g_pp*phprime*phprime);//ScalarProd(tempvec,tempvec+4,tempvec+4);// double normref; if (fabs(norminit) get_nn(); double NN=NNtemp.val_point(rr,th,ph), N2=NN*NN; const Scalar & omega_scal=star_ -> get_nphi(); double omega=omega_scal.val_point(rr,th,ph); double B2=(star_ -> get_b_car()).val_point(rr,th,ph); double A2=(star_ -> get_a_car()).val_point(rr,th,ph); double g_tt=(B2*r2*sinth2*omega*omega-N2), g_tp=-omega*B2*r2*sinth2, g_rr=A2, g_thth=A2*r2, g_pp=B2*r2*sinth2; //DEBUG!!!! flat metric *************** //g_tt=-1.;g_tp=0.;g_rr=1.;g_thth=r2;g_pp=r2*sinth2; //************************************* if ((mu==0) && (nu==0)) return g_tt; if ((mu==1) && (nu==1)) return g_rr; if ((mu==2) && (nu==2)) return g_thth; if ((mu==3) && (nu==3)) return g_pp; if (((mu==0) && (nu==3)) || ((mu==3) && (nu==0))) return g_tp; return 0.; } //double RotStar3_1::christoffel(const double coord[8], const int alpha, const int mu, // const int nu) const double RotStar3_1::christoffel(const double coord[8], const int alpha, const int mu, const int nu) const { /* The computation of the christo is easy since we know the expression of gmunu as a function of 3+1 quantities, and since Lorene allows to perform derivatives on quantities. So gmunu,sigma is computable. */ //if (debug()) cout << "In RotStar::christo" << endl; //Gyoto::throwError("RotStar3_1::christoffel: Not implemented yet"); //24/05/10: stationary axisymmetric version double rr=coord[1],r2=rr*rr,th=coord[2],sinth2=sin(th)*sin(th),ph=coord[3]; const Scalar & NNscal=star_ -> get_nn(); double NN=NNscal.val_point(rr,th,ph), N2=NN*NN; const Scalar & NNrscal = NNscal.dsdr(); const Scalar & NNthscal = NNscal.dsdt(); double N_r=NNrscal.val_point(rr,th,ph); double N_th=NNthscal.val_point(rr,th,ph); const Scalar & omega_scal=star_ -> get_nphi(); double omega=omega_scal.val_point(rr,th,ph), omega2=omega*omega; double omega_r=omega_scal.dsdr().val_point(rr,th,ph); double omega_th=omega_scal.dsdt().val_point(rr,th,ph); const Scalar & A2scal=star_ -> get_a_car(); const Scalar & B2scal=star_ -> get_b_car(); const Scalar & A2rscal = A2scal.dsdr(); const Scalar & A2thscal = A2scal.dsdt(); const Scalar & B2rscal = B2scal.dsdr(); const Scalar & B2thscal = B2scal.dsdt(); double B2=B2scal.val_point(rr,th,ph); double A2=A2scal.val_point(rr,th,ph); double A2_r=A2rscal.val_point(rr,th,ph); double A2_th=A2thscal.val_point(rr,th,ph); double B2_r=B2rscal.val_point(rr,th,ph); double B2_th=B2thscal.val_point(rr,th,ph); double gtt=-1./N2, grr=1./A2, gthth=1./(A2*r2), gpp=1./(B2*r2*sinth2)-omega2/N2, gtp=-omega/N2; double g_ttr=-2.*NN*N_r+B2_r*omega2*r2*sinth2+2.*omega*omega_r*B2*r2*sinth2+2.*rr*B2*omega2*sinth2, g_ttth=-2.*NN*N_th+B2_th*omega2*r2*sinth2+2.*omega*omega_th*B2*r2*sinth2+2.*cos(th)*sin(th)*r2*B2*omega2; double g_rrr=A2_r, g_rrth=A2_th; double g_ththr=r2*A2_r+2.*rr*A2, g_ththth=r2*A2_th; double g_ppr=sinth2*(r2*B2_r+2.*rr*B2), g_ppth=r2*(sinth2*B2_th+2.*cos(th)*sin(th)*B2); double g_tpr=-omega_r*B2*r2*sinth2-omega*B2_r*r2*sinth2-2.*rr*omega*B2*sinth2, g_tpth=-omega_th*B2*r2*sinth2-omega*B2_th*r2*sinth2-2.*cos(th)*sin(th)*omega*B2*r2; // if (debug()) cout << "at r t p= " << rr << " " << th << " " << ph << endl; //if (debug()) cout << "gthth, g_ppr= " << gthth << " " << g_ppr << endl; //32 non-0 christo if ((alpha==0 && mu==0 && nu==1) || (alpha==0 && mu==1 && nu==0)) return 1./2.*gtt*g_ttr+1./2.*gtp*g_tpr; if ((alpha==0 && mu==0 && nu==2) || (alpha==0 && mu==2 && nu==0)) return 1./2.*gtt*g_ttth+1./2.*gtp*g_tpth; if ((alpha==0 && mu==3 && nu==1) || (alpha==0 && mu==1 && nu==3)) return 1./2.*gtt*g_tpr+1./2.*gtp*g_ppr; if ((alpha==0 && mu==3 && nu==2) || (alpha==0 && mu==2 && nu==3)) return 1./2.*gtt*g_tpth+1./2.*gtp*g_ppth; if ((alpha==3 && mu==3 && nu==1) || (alpha==3 && mu==1 && nu==3)) return 1./2.*gpp*g_ppr+1./2.*gtp*g_tpr; if ((alpha==3 && mu==3 && nu==2) || (alpha==3 && mu==2 && nu==3)) return 1./2.*gpp*g_ppth+1./2.*gtp*g_tpth; if ((alpha==3 && mu==0 && nu==1) || (alpha==3 && mu==1 && nu==0)) return 1./2.*gpp*g_tpr+1./2.*gtp*g_ttr; if ((alpha==3 && mu==0 && nu==2) || (alpha==3 && mu==2 && nu==0)) return 1./2.*gpp*g_tpth+1./2.*gtp*g_ttth; if (alpha==1 && mu==2 && nu==2) return -1./2.*grr*g_ththr; if (alpha==1 && mu==3 && nu==3) return -1./2.*grr*g_ppr; if (alpha==1 && mu==0 && nu==0) return -1./2.*grr*g_ttr; if (alpha==1 && mu==1 && nu==1) return 1./2.*grr*g_rrr; if ((alpha==1 && mu==1 && nu==2) || (alpha==1 && mu==2 && nu==1)) return 1./2.*grr*g_rrth; if ((alpha==1 && mu==0 && nu==3) || (alpha==1 && mu==3 && nu==0)) return -1./2.*grr*g_tpr; if (alpha==2 && mu==0 && nu==0) return -1./2.*gthth*g_ttth; if (alpha==2 && mu==1 && nu==1) return -1./2.*gthth*g_rrth; if (alpha==2 && mu==3 && nu==3) return -1./2.*gthth*g_ppth; if (alpha==2 && mu==2 && nu==2) return 1./2.*gthth*g_ththth; if ((alpha==2 && mu==2 && nu==1) || (alpha==2 && mu==1 && nu==2)) return 1./2.*gthth*g_ththr; if ((alpha==2 && mu==0 && nu==3) || (alpha==2 && mu==3 && nu==0)) return -1./2.*gthth*g_tpth; return 0.;//all other christo are 0 } double RotStar3_1::ScalarProd(const double pos[4], const double u1[4], const double u2[4]) const { //cout << "in RotStar ScalarProd" << endl; if (debug()) cout << "u1,u2 in Scal= " ; for (int ii=0;ii<4;ii++) { if (debug()) cout << u1[ii] << " " << u2[ii] << " "; } if (debug()) cout << endl; double g_tt=gmunu(pos,0,0), g_tp=gmunu(pos,0,3), g_rr=gmunu(pos,1,1), g_thth=gmunu(pos,2,2), g_pp=gmunu(pos,3,3); //if (debug()) //cout << "metrics in rotstar scalar prod= " << g_tt << " " << g_rr << " " << g_thth << " " << g_pp << " " << g_tp << endl; //cout << "norm sub-terms in rotstar scalar prod= " << g_tt*u1[0]*u2[0] << " " < or instead\n"; integKind(atoi(content.c_str())); } else return Generic::setParameter(name, content, unit); return 0; } Gyoto-1.2.0/lib/Scenery.C000066400000000000000000000733721302352257300151130ustar00rootroot00000000000000/* Copyright 2011-2016 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include "GyotoScenery.h" #include "GyotoPhoton.h" #include "GyotoFactoryMessenger.h" #include #include #include #include #ifdef HAVE_MPI #include "GyotoFactory.h" #include #include #include #include #include #include #include namespace mpi = boost::mpi; #endif #ifdef HAVE_PTHREAD #include #endif #include /* for benchmarking */ using namespace Gyoto; using namespace std; /// Properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(Gyoto::Scenery, "Container with a Gyoto::Metric, a Gyoto::Astrobj and a Gyoto::Screen.") GYOTO_PROPERTY_METRIC(Scenery, Metric, metric, "The geometry of space-time at this end of the Universe.") GYOTO_PROPERTY_SCREEN(Scenery, Screen, screen, "Where light rays are detected.") GYOTO_PROPERTY_ASTROBJ(Scenery, Astrobj, astrobj, "Whatever emits (or absorbs) light.") GYOTO_PROPERTY_SIZE_T(Scenery, NThreads, nThreads, "Number of threads to use (using POSIX threads).") GYOTO_PROPERTY_SIZE_T(Scenery, NProcesses, nProcesses, "Number of MPI worker processes to spawn.") GYOTO_PROPERTY_STRING(Scenery, Quantities, requestedQuantitiesString, "Physical quantities to evaluate for each light ray.") GYOTO_WORLDLINE_PROPERTY_END(Scenery, Object::properties) bool Scenery::isThreadSafe() const { bool safe=true; if (metric() ) safe &= metric() -> isThreadSafe(); if (screen_ ) safe &= screen_ -> isThreadSafe(); if (astrobj()) safe &= astrobj() -> isThreadSafe(); return safe; } #ifdef GYOTO_USE_XERCES void Scenery::fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const { if (p.name == "InitCoord") { std::vector v=initCoord(); if (v[4] != 0) fmp -> setParameter(p.name, v); } else Object::fillProperty(fmp, p); } void Scenery::fillElement(FactoryMessenger *fmp) const { if (metric()) fmp -> metric (metric()) ; if (screen_) fmp -> screen (screen_) ; if (astrobj()) fmp -> astrobj (astrobj()) ; Object::fillElement(fmp); } SmartPointer Gyoto::Scenery::Subcontractor(FactoryMessenger* fmp) { if (!fmp) return new Scenery(); std::string name="", content="", unit=""; SmartPointer gg = NULL; SmartPointer scr = NULL; SmartPointer ao = NULL; Property const *prop=NULL; gg = fmp->metric(); scr= fmp->screen(); ao = fmp->astrobj(); SmartPointer sc = new Scenery(gg, scr, ao); while (fmp->getNextParameter(&name, &content, &unit)) { if (name=="Metric" || name=="Screen" || name=="Astrobj") ; else if ((prop = sc->property(name))) sc -> setParameter(*prop, name, content, unit); else GYOTO_WARNING << "Unrecognized XML entity in Scenery section: '" << name << "'" << endl; } return sc; } #endif /// Scenery::Scenery() : screen_(NULL), delta_(GYOTO_DEFAULT_DELTA), quantities_(0), ph_(), nthreads_(0), nprocesses_(0) #ifdef HAVE_MPI , mpi_team_(NULL) #endif {} Scenery::Scenery(SmartPointer met, SmartPointer scr, SmartPointer obj) : screen_(scr), delta_(GYOTO_DEFAULT_DELTA), quantities_(0), ph_(), nthreads_(0), nprocesses_(0) #ifdef HAVE_MPI , mpi_team_(NULL) #endif { metric(met); if (screen_) screen_->metric(met); astrobj(obj); } Scenery::Scenery(const Scenery& o) : SmartPointee(o), screen_(NULL), delta_(o.delta_), quantities_(o.quantities_), ph_(o.ph_), nthreads_(o.nthreads_), nprocesses_(0) #ifdef HAVE_MPI , mpi_team_(NULL) #endif { if (o.screen_()) { screen_=o.screen_->clone(); screen_->metric(ph_.metric()); } } Scenery * Scenery::clone() const { return new Scenery(*this); } Scenery::~Scenery() { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "freeing screen\n"; # endif screen_ = NULL; # ifdef HAVE_MPI if (!Scenery::am_worker) mpiTerminate(); # endif } SmartPointer Scenery::metric() const { return ph_.metric(); } void Scenery::metric(SmartPointer met) { ph_.metric(met); if (!screen_) screen_ = new Screen (); screen_ -> metric(met); } SmartPointer Scenery::screen() const { return screen_; } void Scenery::screen(SmartPointer scr) { screen_ = scr; if (metric()) screen_ -> metric (metric()) ; } SmartPointer Scenery::astrobj() const {return ph_.astrobj();} void Scenery::astrobj(SmartPointer obj) { ph_.astrobj(obj); } double Scenery::delta() const { return delta_; } double Scenery::delta(const string &unit) const { return Units::FromGeometrical(delta(), unit, metric()); } void Scenery::delta(double d) { delta_ = d; } void Scenery::delta(double d, const string &unit) { delta(Units::ToGeometrical(d, unit, metric())); } void Scenery::initCoord(std::vector c) { ph_ . initCoord(c); } std::vector Scenery::initCoord() const { return ph_.initCoord();} void Scenery::nThreads(size_t n) { nthreads_ = n; } size_t Scenery::nThreads() const { return nthreads_; } void Scenery::nProcesses(size_t n) { nprocesses_ = n; } size_t Scenery::nProcesses() const { return nprocesses_; } typedef struct SceneryThreadWorkerArg { #ifdef HAVE_PTHREAD pthread_mutex_t * mutex; pthread_t * parent; #endif Screen::Coord2dSet & ij; size_t cnt, npix; Scenery *sc; Photon * ph; Astrobj::Properties *data; double * impactcoords; SceneryThreadWorkerArg(Screen::Coord2dSet & ijin); bool is_pixel; } SceneryThreadWorkerArg ; SceneryThreadWorkerArg::SceneryThreadWorkerArg(Screen::Coord2dSet & ijin) :ij(ijin) { } static void * SceneryThreadWorker (void *arg) { /* This is the real ray-tracing loop. It may be called by multiple threads in parallel, launched from ::rayTrace */ SceneryThreadWorkerArg *larg = static_cast(arg); // Each thread needs its own Photon, clone cached Photon // it is assumed to be already initialized with spectrometer et al. Photon * ph = larg -> ph; #ifdef HAVE_PTHREAD if (larg->mutex) { pthread_mutex_lock(larg->mutex); ph = larg -> ph -> clone(); pthread_mutex_unlock(larg->mutex); } #endif // local variables to store our parameters GYOTO_ARRAY ijb; GYOTO_ARRAY ad; Astrobj::Properties data; double * impactcoords = NULL; size_t count=0; while (1) { /////// 1- get input and output parameters and update them for next access //// i and j are input, data and impactcoords are where to store //// output. we must get them and increase them so that another //// thread can get the next values while we integrate. #ifdef HAVE_PTHREAD // lock mutex so we can safely read and update i, j et al. if (larg->mutex) pthread_mutex_lock(larg->mutex); #endif // copy i & j or alpha and delta if (larg->is_pixel) ijb = *(larg->ij); else ad = larg->ij.angles(); if (!larg->ij.valid()) { // terminate, but first... #ifdef HAVE_PTHREAD // ...unlock mutex so our siblings can access i & j and terminate too if (larg->mutex) pthread_mutex_unlock(larg->mutex); #endif break; } size_t lcnt = larg->cnt++; ++(larg->ij); #ifdef HAVE_PTHREAD // unlock mutex so our siblings can can access i, j et al. and procede if (larg->mutex) pthread_mutex_unlock(larg->mutex); #endif // Store current cell data = *larg->data; size_t cell=lcnt; if (larg->is_pixel && data.alloc) cell=(ijb[1]-1)*larg->npix+ijb[0]-1; data += cell; impactcoords=larg->impactcoords?larg->impactcoords+16*cell:NULL; if (larg->is_pixel) (*larg->sc)(ijb[0], ijb[1], &data, impactcoords, ph); else (*larg->sc)(ad[0], ad[1], &data, ph); ++count; } #ifdef HAVE_PTHREAD if (larg->mutex) { delete ph; pthread_mutex_lock(larg->mutex); } GYOTO_MSG << "\nThread terminating after integrating " << count << " photons"; if (larg->mutex) pthread_mutex_unlock(larg->mutex); # endif return NULL; } void Scenery::updatePhoton(){ if (screen_) { ph_.spectrometer(screen_->spectrometer()); ph_.freqObs(screen_->freqObs()); } ph_ . delta(delta_); } SmartPointer Scenery::clonePhoton(size_t i, size_t j) { updatePhoton(); double coord[8]; screen_ -> getRayCoord(size_t(1),size_t(1), coord); ph_ . setInitCoord(coord, 0); return ph_.clone(); } SmartPointer Scenery::clonePhoton(double a, double b) { updatePhoton(); double coord[8]; screen_ -> getRayCoord(a, b, coord); ph_ . setInitCoord(coord, 0); return ph_.clone(); } void Scenery::rayTrace(Screen::Coord2dSet & ij, Astrobj::Properties *data, double * impactcoords) { GYOTO_DEBUG_EXPR(am_worker); #if defined HAVE_MPI if (nprocesses_ && !mpi_team_) { mpiSpawn(nprocesses_); mpiClone(); } #endif /* Ray-trace now is multi-threaded. What it does is - some initialization - launch nthreads_ - 1 thread working on of SceneryThreadWorker - call SceneryThreadWorker itself rather than sleeping - wait for the other threads to be terminated - some housekeeping */ if (!screen_) { if (am_worker) throwError("No screen, have you called mpiClone()?"); else throwError("Scenery::rayTrace() needs a Screen to work on"); } screen_->computeBaseVectors(); // Necessary for KS integration, computes relation between // observer's x,y,z coord and KS X,Y,Z coord. Will be used to // compute photon's initial tangent vector. // Note : this is a BUG if this is required, should be done automagically. /// initialize photon once. It will be cloned. updatePhoton(); SmartPointer spr = screen_ -> spectrometer(); // delta is reset in operator() if (data) setPropertyConverters(data); GYOTO_ARRAY ijb; GYOTO_ARRAY ad; bool alloc=data?data->alloc:false; size_t npix=screen_->resolution(); #ifdef HAVE_MPI if (mpi_team_) { // We are in an MPI content, either the manager or a worker. // dispatch over workers and monitor if (!am_worker) { mpi_tag tag=raytrace; mpiTask(tag); } size_t nbnuobs=0; Quantity_t quantities = (am_worker || !data)?GYOTO_QUANTITY_NONE:*data; bool has_ipct=am_worker?false:bool(impactcoords); bool is_pixel=(ij.kind==Screen::pixel); mpi::broadcast(*mpi_team_, quantities, 0); mpi::broadcast(*mpi_team_, has_ipct, 0); mpi::broadcast(*mpi_team_, is_pixel, 0); if (quantities & (GYOTO_QUANTITY_SPECTRUM | GYOTO_QUANTITY_BINSPECTRUM)) { if (!spr) throwError("Spectral quantity requested but " "no spectrometer specified!"); nbnuobs = spr -> nSamples(); } size_t nelt= getScalarQuantitiesCount(&quantities); if (quantities & GYOTO_QUANTITY_SPECTRUM) nelt += nbnuobs; if (quantities & GYOTO_QUANTITY_BINSPECTRUM) nelt += nbnuobs; if (quantities & GYOTO_QUANTITY_IMPACTCOORDS) nelt += 16; double * vect = new double[nelt]; Astrobj::Properties *locdata = new Astrobj::Properties(); size_t offset=1; size_t curquant=0; # ifdef GYOTO_USE_UDUNITS if (Scenery::am_worker) { // set all converters to the trivial one, conversion is // performed in the manager. intensity_converter_ = NULL; spectrum_converter_ = NULL; binspectrum_converter_ = NULL; setPropertyConverters(locdata); } # endif if (quantities & GYOTO_QUANTITY_INTENSITY) { locdata->intensity=vect+offset*(curquant++); } if (quantities & GYOTO_QUANTITY_EMISSIONTIME) { locdata->time=vect+offset*(curquant++); } if (quantities & GYOTO_QUANTITY_MIN_DISTANCE) { locdata->distance=vect+offset*(curquant++); } if (quantities & GYOTO_QUANTITY_FIRST_DMIN) { locdata->first_dmin=vect+offset*(curquant++); } if (quantities & GYOTO_QUANTITY_REDSHIFT) { locdata->redshift=vect+offset*(curquant++); } if (quantities & GYOTO_QUANTITY_IMPACTCOORDS) { locdata->impactcoords=vect+offset*curquant; curquant+=16; } if (quantities & GYOTO_QUANTITY_USER1) { locdata->user1=vect+offset*(curquant++); } if (quantities & GYOTO_QUANTITY_USER2) { locdata->user2=vect+offset*(curquant++); } if (quantities & GYOTO_QUANTITY_USER3) { locdata->user3=vect+offset*(curquant++); } if (quantities & GYOTO_QUANTITY_USER4) { locdata->user4=vect+offset*(curquant++); } if (quantities & GYOTO_QUANTITY_USER5) { locdata->user5=vect+offset*(curquant++); } if (quantities & GYOTO_QUANTITY_SPECTRUM) { locdata->spectrum=vect+offset*(curquant++); locdata->offset=int(offset); } if (quantities & GYOTO_QUANTITY_BINSPECTRUM) { locdata->binspectrum=vect+offset*(curquant++); locdata->offset=int(offset); } mpi::status s; if (!am_worker) { // We are the manager int working = mpi_team_->size()-1; // First tell the workers to join our task force // The corresponding recv is in gyoto-scenery-worker.c vector cell(working+1); size_t cnt=0; while (working) { // receive one result, need to track back where it belongs and // store it there int w; // Wait for worker to ask for task. // tag may be raytrace_done if worker has result to report, // give_task if worker has no data yet. s = mpi_team_ -> recv(mpi::any_source, mpi::any_tag, vect, nelt); w = s.source(); size_t cs=cell[w]; // remember where to store results // give new task or decrease working counter if (ij.valid()) { cell[w]=cnt++; if (is_pixel) { ijb=*ij; if (alloc) cell[w]=(ijb[1]-1)*npix+ijb[0]-1; mpi_team_ -> send(w, raytrace, ijb); } else { ad = ij.angles(); mpi_team_ -> send(w, raytrace, ad); } if (impactcoords) { mpi_team_ -> send(w, Scenery::impactcoords, impactcoords+cell[w]*16, 16); } ++ij; } else { if (is_pixel) mpi_team_ -> send(w, raytrace_done, ijb); else mpi_team_ -> send(w, raytrace_done, ad); --working; } // Now that the worker is back to work, triage data it has just delivered if (s.tag()==Scenery::raytrace_done && data) { // Copy each relevant quantity, performing conversion if needed if (data->intensity) data->intensity[cs]= # ifdef GYOTO_USE_UDUNITS data->intensity_converter_? (*data->intensity_converter_)(*locdata->intensity): # endif *locdata->intensity; if (data->time) data->time[cs]=*locdata->time; if (data->distance) data->distance[cs]=*locdata->distance; if (data->first_dmin) data->first_dmin[cs]=*locdata->first_dmin; if (data->redshift) data->redshift[cs]=*locdata->redshift; if (data->impactcoords) for (size_t k=0; k<16; ++k) data->impactcoords[cs*16+k]=locdata->impactcoords[k]; if (data->user1) data->user1[cs]=*locdata->user1; if (data->user2) data->user2[cs]=*locdata->user2; if (data->user3) data->user3[cs]=*locdata->user3; if (data->user4) data->user4[cs]=*locdata->user4; if (data->user5) data->user5[cs]=*locdata->user5; if (data->spectrum) for (size_t c=0; cspectrum[cs+c*data->offset]= # ifdef GYOTO_USE_UDUNITS data->spectrum_converter_? (*data->spectrum_converter_)(locdata->spectrum[c]): # endif locdata->spectrum[c]; if (data->binspectrum) for (size_t c=0; cbinspectrum[cs+c*data->offset]= # ifdef GYOTO_USE_UDUNITS data->binspectrum_converter_? (*data->binspectrum_converter_)(locdata->binspectrum[c]): # endif locdata->binspectrum[c]; } } if (verbose()) cout << endl; } else { // We are a worker, do we need to query for impactcoords? double ipct[16]; if (has_ipct) impactcoords=&ipct[0]; // First send dummy result, using tag "give_tag". // Manager will ignore the results and send first coordinates. mpi_team_->send(0, give_task, vect, nelt); while (true) { // Receive new coordinates to work on. if (is_pixel) s = mpi_team_->recv(0, mpi::any_tag, ijb); else s = mpi_team_->recv(0, mpi::any_tag, ad); if (s.tag()==raytrace_done) { break; } // Receive impactcoords if needed if (has_ipct) s = mpi_team_->recv(0, Scenery::impactcoords, impactcoords, 16); locdata->init(nbnuobs); if (is_pixel) (*this)(ijb[0], ijb[1], locdata, impactcoords, &ph_); else (*this)(ad[0], ad[1], locdata, &ph_); // send result mpi_team_->send(0, raytrace_done, vect, nelt); } } delete locdata; delete [] vect; return; } #endif SceneryThreadWorkerArg larg(ij); larg.sc=this; larg.ph=&ph_; larg.data=data; larg.cnt=0; larg.npix=npix; larg.impactcoords=impactcoords; larg.is_pixel= (ij.kind==Screen::pixel); struct timeval tim; double start, end; gettimeofday(&tim, NULL); start=double(tim.tv_sec)+(double(tim.tv_usec)/1000000.0); #ifdef HAVE_PTHREAD larg.mutex = NULL; pthread_mutex_t mumu = PTHREAD_MUTEX_INITIALIZER; pthread_t * threads = NULL; pthread_t pself = pthread_self(); larg.parent = &pself; bool thread_safe = isThreadSafe(); if (nthreads_ >= 2) { if (!thread_safe) { GYOTO_WARNING << "Something in this Scenery is not thread-safe: running single-threaded" << endl; } else { threads = new pthread_t[nthreads_-1]; larg.mutex = &mumu; for (size_t th=0; th < nthreads_-1; ++th) { if (pthread_create(threads+th, NULL, SceneryThreadWorker, static_cast(&larg)) < 0) throwError("Error creating thread"); } } } #endif // Call worker on the parent thread (*SceneryThreadWorker)(static_cast(&larg)); #ifdef HAVE_PTHREAD // Wait for the child threads if (thread_safe && nthreads_>=2) for (size_t th=0; th < nthreads_-1; ++th) pthread_join(threads[th], NULL); #endif gettimeofday(&tim, NULL); end=double(tim.tv_sec)+(double(tim.tv_usec)/1000000.0); GYOTO_MSG << "\nRaytraced "<< ij.size() << " photons in " << end-start << "s using " << (thread_safe?nthreads_:1) << " thread" << (thread_safe && nthreads_>1)?"s\n":"\n"; } void Scenery::operator() ( size_t i, size_t j, Astrobj::Properties *data, double * impactcoords, Photon *ph ) { double coord[8]; SmartPointer spr = screen_->spectrometer(); size_t nbnuobs = spr() ? spr -> nSamples() : 0; if (data) data -> init(nbnuobs); // Initialize requested quantities to 0. or DBL_MAX if (!(*screen_)(i,j)) return; // return if pixel is masked out if (!ph) { // if Photon was passed, assume it was initiliazed already. Don't // touch its metric and astrobj. Else, update cached photon. Photon // is passed in particular when called in a multi-threaded // environment: it may really need to work on a given copy of the object. ph = &ph_; updatePhoton(); } // Always reset delta # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "reset delta" << endl; # endif ph -> delta(delta_); # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "init nbnuobs" << endl; # endif if (impactcoords) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "impactcoords set" << endl; # endif if(impactcoords[0] != DBL_MAX) { ph -> setInitCoord(impactcoords+8, 0); ph -> resetTransmission(); astrobj() -> processHitQuantities(ph,impactcoords+8,impactcoords,0.,data); } } else { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "impactcoords not set" << endl; # endif screen_ -> getRayCoord(i,j, coord); ph -> setInitCoord(coord, 0); ph -> hit(data); } } void Scenery::operator() ( double a, double d, Astrobj::Properties *data, Photon *ph ) { double coord[8]; SmartPointer spr = screen_->spectrometer(); size_t nbnuobs = spr() ? spr -> nSamples() : 0; if (data) data -> init(nbnuobs); if (!ph) { ph = &ph_; updatePhoton(); } // Always reset delta ph -> delta(delta_); screen_ -> getRayCoord(a, d, coord); ph -> setInitCoord(coord, 0); ph -> hit(data); } SmartPointer Scenery::clonePhoton() const { return ph_.clone(); } void Scenery::setRequestedQuantities(Gyoto::Quantity_t quant) {quantities_=quant;} void Scenery::requestedQuantitiesString(std::string const &squant) { quantities_=0; char * tk = strtok(const_cast(squant.c_str()), " \t\n"); string tkk="", quant="", unit = ""; size_t first = 0, last = 0; # ifdef HAVE_UDUNITS if (screen_) screen_ -> mapPixUnit(); # endif while (tk != NULL) { tkk = tk; first = tkk.find("["); last = tkk.size() - 1; if (first < last) { unit = tkk.substr(first+1, last-first-1); quant = tkk.substr(0, first); } else { unit=""; quant=tkk; } # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "quant=" << quant << ", unit=" << unit << "." << endl; # endif tk=const_cast(quant.c_str()); if (!strcmp(tk, "Intensity")) { quantities_ |= GYOTO_QUANTITY_INTENSITY; intensityConverter(unit); } else if (!strcmp(tk, "EmissionTime")) quantities_ |= GYOTO_QUANTITY_EMISSIONTIME; else if (!strcmp(tk, "MinDistance")) quantities_ |= GYOTO_QUANTITY_MIN_DISTANCE; else if (!strcmp(tk, "FirstDistMin")) quantities_ |= GYOTO_QUANTITY_FIRST_DMIN; else if (!strcmp(tk, "Redshift")) quantities_ |= GYOTO_QUANTITY_REDSHIFT; else if (!strcmp(tk, "ImpactCoords")) quantities_ |= GYOTO_QUANTITY_IMPACTCOORDS; else if (!strcmp(tk, "Spectrum")) { quantities_ |= GYOTO_QUANTITY_SPECTRUM; spectrumConverter(unit); } else if (!strcmp(tk, "BinSpectrum")) { quantities_ |= GYOTO_QUANTITY_BINSPECTRUM; binSpectrumConverter(unit); } else if (!strcmp(tk, "User1")) quantities_ |= GYOTO_QUANTITY_USER1; else if (!strcmp(tk, "User2")) quantities_ |= GYOTO_QUANTITY_USER2; else if (!strcmp(tk, "User3")) quantities_ |= GYOTO_QUANTITY_USER3; else if (!strcmp(tk, "User4")) quantities_ |= GYOTO_QUANTITY_USER4; else if (!strcmp(tk, "User5")) quantities_ |= GYOTO_QUANTITY_USER5; else throwError("ScenerySubcontractor(): unknown quantity"); tk = strtok(NULL, " \t\n"); } # ifdef HAVE_UDUNITS if (screen_) screen_ -> unmapPixUnit(); # endif # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "("< intensityConverter(intensity_converter_); data -> spectrumConverter(spectrum_converter_); data -> binSpectrumConverter(binspectrum_converter_); # endif } void Scenery::spectrumConverter(string unit) { # ifdef HAVE_UDUNITS // default is SI if (unit=="") unit="J.m-2.s-1.sr-1.Hz-1"; spectrum_converter_ = new Units::Converter("J.m-2.s-1.sr-1.Hz-1", unit); # else if (unit!="") GYOTO_WARNING << "Unit ignored, please recompile gyoto with --with-udunits" << endl; # endif } void Scenery::binSpectrumConverter(string unit) { # ifdef HAVE_UDUNITS // default is SI if (unit=="") unit="J.m-2.s-1.sr-1"; binspectrum_converter_ = new Units::Converter("J.m-2.s-1.sr-1", unit); # else if (unit!="") GYOTO_WARNING << "Unit ignored, please recompile gyoto with --with-udunits" << endl; # endif } std::string Scenery::requestedQuantitiesString() const { string squant = ""; Quantity_t quantities = quantities_?quantities_:(astrobj()?astrobj()->getDefaultQuantities():0); if (quantities & GYOTO_QUANTITY_INTENSITY ) squant+="Intensity "; if (quantities & GYOTO_QUANTITY_EMISSIONTIME) squant+="EmissionTime "; if (quantities & GYOTO_QUANTITY_MIN_DISTANCE) squant+="MinDistance "; if (quantities & GYOTO_QUANTITY_FIRST_DMIN ) squant+="FirstDistMin "; if (quantities & GYOTO_QUANTITY_REDSHIFT ) squant+="Redshift "; if (quantities & GYOTO_QUANTITY_IMPACTCOORDS) squant+="ImpactCoords "; if (quantities & GYOTO_QUANTITY_SPECTRUM ) squant+="Spectrum "; if (quantities & GYOTO_QUANTITY_BINSPECTRUM ) squant+="BinSpectrum "; if (quantities & GYOTO_QUANTITY_USER1 ) squant+="User1 "; if (quantities & GYOTO_QUANTITY_USER2 ) squant+="User2 "; if (quantities & GYOTO_QUANTITY_USER3 ) squant+="User3 "; if (quantities & GYOTO_QUANTITY_USER4 ) squant+="User4 "; if (quantities & GYOTO_QUANTITY_USER5 ) squant+="User5 "; return squant; } size_t Scenery::getScalarQuantitiesCount(Quantity_t *q) const { size_t nquant=0; Quantity_t quantities; if (q) quantities=*q; else quantities=quantities_? quantities_: (astrobj()?astrobj()->getDefaultQuantities():GYOTO_QUANTITY_NONE); if (quantities & GYOTO_QUANTITY_INTENSITY ) ++nquant; if (quantities & GYOTO_QUANTITY_EMISSIONTIME) ++nquant; if (quantities & GYOTO_QUANTITY_MIN_DISTANCE) ++nquant; if (quantities & GYOTO_QUANTITY_FIRST_DMIN ) ++nquant; if (quantities & GYOTO_QUANTITY_REDSHIFT ) ++nquant; // SPECTRUM is not a SCALAR, don't add the following: // if (quantities & GYOTO_QUANTITY_SPECTRUM ) ++nquant; // if (quantities & GYOTO_QUANTITY_BINSPECTRUM ) ++nquant; // Idem IMPACTCOORDS: // if (quantities & GYOTO_QUANTITY_IMPACTCOORDS) ++nquant; if (quantities & GYOTO_QUANTITY_USER1 ) ++nquant; if (quantities & GYOTO_QUANTITY_USER2 ) ++nquant; if (quantities & GYOTO_QUANTITY_USER3 ) ++nquant; if (quantities & GYOTO_QUANTITY_USER4 ) ++nquant; if (quantities & GYOTO_QUANTITY_USER5 ) ++nquant; return nquant; } double Scenery::tMin() const { return ph_.tMin(); } double Scenery::tMin(const string &unit) const { return ph_.tMin(unit); } void Scenery::tMin(double tmin) { ph_.tMin(tmin); } void Scenery::tMin(double tmin, const string &unit) { ph_.tMin(tmin, unit); } void Scenery::adaptive(bool mode) { ph_.adaptive(mode); } bool Scenery::adaptive() const { return ph_.adaptive(); } void Scenery::integrator(std::string type) {ph_.integrator(type);} std::string Scenery::integrator() const { return ph_.integrator();} double Scenery::deltaMin() const {return ph_.deltaMin();} double Scenery::deltaMax() const {return ph_.deltaMax();} void Scenery::deltaMin(double h1) {ph_.deltaMin(h1);} void Scenery::deltaMax(double h1) {ph_.deltaMax(h1);} double Scenery::deltaMaxOverR() const { return ph_.deltaMaxOverR();} void Scenery::deltaMaxOverR(double t) {ph_.deltaMaxOverR(t);} double Scenery::absTol() const {return ph_.absTol();} void Scenery::absTol(double t) {ph_.absTol(t);} double Scenery::relTol() const {return ph_.relTol();} void Scenery::relTol(double t) {ph_.relTol(t);} void Scenery::secondary(bool sec) { ph_.secondary(sec); } bool Scenery::secondary() const { return ph_.secondary(); } void Scenery::maxiter(size_t miter) { ph_.maxiter(miter); } size_t Scenery::maxiter() const { return ph_.maxiter(); } bool Gyoto::Scenery::am_worker=false; void Gyoto::Scenery::mpiSpawn(int nbchildren) { GYOTO_DEBUG_EXPR(nbchildren); nprocesses_=nbchildren; #ifdef HAVE_MPI int flagi=0, flagt=0; if (MPI_Initialized(&flagi)) throwError("Error running MPI_Initialized()"); if (!flagi) { GYOTO_WARNING << "MPI_Init not called yet: " << "not spawning processes" << endl; return; } if (MPI_Finalized(&flagt)) throwError("Error running MPI_Finalized()"); if (flagt) { GYOTO_WARNING << "MPI_Finalize already called: " << "not spawning processes" << endl; return; } if (mpi_team_) { if (mpi_team_->size()==nbchildren+1) return; // Resizing the team: need to terminate the old team mpiTerminate(); } if (nbchildren && nbchildren != -1) { // Actually requesting to spawn processes char * exec = const_cast("gyoto-mpi-worker." GYOTO_SOVERS); MPI_Comm children_c; MPI_Comm_spawn(exec, MPI_ARGV_NULL, nbchildren, MPI_INFO_NULL, 0, MPI_COMM_SELF, &children_c, MPI_ERRCODES_IGNORE); mpi_team_ = new mpi::communicator(mpi::intercommunicator (children_c, mpi::comm_take_ownership).merge(false)); } if (nbchildren == -1) { // Requesting to use processes already exising in WORLD int wsize=0; MPI_Comm_size(MPI_COMM_WORLD, &wsize); if (wsize > 1) { nprocesses_ = wsize-1; mpi_team_ = new boost::mpi::communicator(); } } #else GYOTO_WARNING << "No MPI in this Gyoto" << endl; #endif } void Gyoto::Scenery::mpiTerminate() { #ifdef HAVE_MPI if (mpi_team_) { mpi_tag tag=terminate; mpiTask(tag); mpi_team_->barrier(); delete mpi_team_; mpi_team_=NULL; } #endif } void Gyoto::Scenery::mpiClone() { #ifdef HAVE_MPI if (!mpi_team_) return; std::string xmldata= Gyoto::Factory(this).format(); mpi_tag tag=read_scenery; mpiTask(tag); broadcast(*mpi_team_, xmldata, 0); #endif } void Gyoto::Scenery::mpiTask(mpi_tag &tag) { #ifdef HAVE_MPI if (!mpi_team_) return; mpi::broadcast(*mpi_team_, tag, 0); #endif } Gyoto-1.2.0/lib/Screen.C000066400000000000000000001361751302352257300147230ustar00rootroot00000000000000/* Copyright 2011-2016 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoScreen.h" #include "GyotoConverters.h" #include "GyotoKerrBL.h" #include #include #include #include #include #include #ifdef GYOTO_USE_CFITSIO #include #define throwCfitsioError(status) \ { fits_get_errstatus(status, ermsg); throwError(ermsg); } #endif #ifdef HAVE_BOOST_MULTIPRECISION_CPP_DEC_FLOAT_HPP #include #endif using namespace std ; using namespace Gyoto; /// Properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(Screen, "Pin-hole camera with spectrometer.") GYOTO_PROPERTY_METRIC(Screen, Metric, metric, "It surrounds us and penetrates us; it binds the galaxy together.") GYOTO_PROPERTY_SPECTROMETER(Screen, Spectrometer, spectrometer, "Spectrometric capabilities.") GYOTO_PROPERTY_DOUBLE_UNIT(Screen, Time, time, "Observing date (seconds).") GYOTO_PROPERTY_DOUBLE_UNIT(Screen, FieldOfView, fieldOfView, "Field-of-view of the camera, in angle or length (radians).") GYOTO_PROPERTY_DOUBLE_UNIT(Screen, PALN, PALN, "Position angle of the line of nodes of the equatorial plane (radians).") GYOTO_PROPERTY_DOUBLE_UNIT(Screen, Inclination, inclination, "Angle between the equatorial and sky planes (radians).") GYOTO_PROPERTY_DOUBLE_UNIT(Screen, Argument, argument, "Angle between the line of nodes and the Ox axis (radians).") GYOTO_PROPERTY_DOUBLE_UNIT(Screen, Alpha0, alpha0, "(radians)") GYOTO_PROPERTY_DOUBLE_UNIT(Screen, Delta0, delta0, "(radians)") GYOTO_PROPERTY_SIZE_T(Screen, Resolution, resolution, "Number of rows and columns.") GYOTO_PROPERTY_DOUBLE_UNIT(Screen, Distance, distance, "Distance from observer to centre of metric (meters).") GYOTO_PROPERTY_DOUBLE(Screen, DMax, dMax, "If DMaxclone(); if (o.spectro_()) spectro_ = o.spectro_ -> clone(); int i; for (i=0; i<3; ++i) { euler_[i] = o.euler_[i]; ex_[i]=o.ex_[i]; ey_[i]=o.ey_[i]; ez_[i]=o.ez_[i]; } for (int ii=0;ii<4;ii++) { fourvel_[ii]=o.fourvel_[ii]; screen1_[ii]=o.screen1_[ii]; screen2_[ii]=o.screen2_[ii]; screen3_[ii]=o.screen3_[ii]; } if (o.mask_) { mask_=new double[npix_*npix_]; memcpy(mask_, o.mask_, npix_*npix_*sizeof(double)); } } Screen * Screen::clone() const { return new Screen(*this); } bool Screen::isThreadSafe() const { return Object::isThreadSafe() && (!gg_ || gg_ -> isThreadSafe()) && (!spectro_ || spectro_ -> isThreadSafe()); } Screen::~Screen(){if (mask_) delete [] mask_;} std::ostream& Screen::print( std::ostream& o) const { o << "distance=" << distance_ << ", " ; o << "paln=" << euler_[0] << ", " ; o << "inclination=" << euler_[1] << ", " ; o << "argument=" << euler_[2] << "." << endl; return o; } /***************Definition of the physical scene**************/ void Screen::setProjection(const double paln, const double incl, const double arg) { euler_[0]=paln; euler_[1]=incl; euler_[2]=arg; computeBaseVectors(); } void Screen::setProjection(const double dist, const double paln, const double incl, const double arg) { distance_=dist; setProjection(paln, incl, arg); } void Screen::distance(double dist, const string &unit) { distance(Units::ToMeters(dist, unit, gg_)); } void Screen::distance(double dist) { distance_=dist; computeBaseVectors(); } void Screen::dMax(double dist) { dmax_ = dist; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(dmax_); # endif } double Screen::dMax() const { return dmax_; } void Screen::PALN(double paln, const string &unit) { if ((unit=="") || (unit=="rad")); # ifdef HAVE_UDUNITS else paln = Units::Converter(unit, "rad")(paln); # else else if (unit=="degree" || unit=="°") paln *= GYOTO_DEGRAD; # endif PALN(paln); } void Screen::PALN(double paln) { euler_[0]=paln; computeBaseVectors(); } void Screen::inclination(double incl, const string &unit) { if ((unit=="") || (unit=="rad")); # ifdef HAVE_UDUNITS else incl = Units::Converter(unit, "rad")(incl); # else else if (unit=="degree" || unit=="°") incl *= GYOTO_DEGRAD; # endif inclination(incl); } void Screen::inclination(double incl) { euler_[1]=incl; computeBaseVectors(); } void Screen::argument(double arg, const string &unit) { if (unit=="" || unit=="rad"); # ifdef HAVE_UDUNITS else arg = Units::Converter(unit, "rad")(arg); # else else if (unit=="degree" || unit=="°") arg *= GYOTO_DEGRAD; # endif argument(arg); } void Screen::argument(double arg) { euler_[2]=arg; computeBaseVectors(); } void Screen::freqObs(double fo, const string &unit) { freqObs(Units::ToHerz(fo, unit)); } void Screen::freqObs(double fo) { freq_obs_=fo; GYOTO_DEBUG_EXPR(freq_obs_); } double Screen::freqObs() const { return freq_obs_; } double Screen::freqObs(const string &unit) const { return Units::FromHerz(freq_obs_, unit); } void Screen::metric(SmartPointer gg) { gg_ = gg; computeBaseVectors(); } int Screen::coordKind() const { return gg_ -> coordKind(); } double Screen::distance() const { return distance_; } double Screen::distance(const std::string& unit) const { return Units::FromMeters(distance(), unit, gg_); } double Screen::PALN() const { return euler_[0]; } double Screen::PALN(const string &unit) const { double paln = PALN(); if (unit != "" && unit != "rad" ) { # ifdef HAVE_UDUNITS paln = Units::Converter("rad", unit)(paln); #else GYOTO_WARNING << "unit ignored, please recompile with --with-udunits\n"; #endif } return paln; } double Screen::inclination() const { return euler_[1]; } double Screen::inclination(const string &unit) const { double incl = inclination(); if (unit != "" && unit != "rad" ) { # ifdef HAVE_UDUNITS incl = Units::Converter("rad", unit)(incl); #else GYOTO_WARNING << "unit ignored, please recompile with --with-udunits\n"; #endif } return incl; } double Screen::argument() const { return euler_[2]; } double Screen::argument(const string &unit) const { double arg = argument(); if (unit != "" && unit != "rad" ) { # ifdef HAVE_UDUNITS arg = Units::Converter("rad", unit)(arg); #else GYOTO_WARNING << "unit ignored, please recompile with --with-udunits\n"; #endif } return arg; } SmartPointer Screen::metric() const { return gg_; } void Screen::setObserverPos(const double coord[4]) { tobs_ = coord[0] * gg_ -> unitLength() / GYOTO_C; euler_[0]=M_PI;//Par défaut, A CHANGER SI BESOIN //dans le cas standard ex=-ephi et ephi dirige la ligne des noeuds d'où le pi //NB: c'est -pi dans mes notes, donc OK [2pi] //NB : ne décrit que la rotation de la caméra dans le plan x,y int coordkind=gg_ -> coordKind(); switch (coordkind) { case GYOTO_COORDKIND_SPHERICAL: distance_=coord[1]* gg_ -> unitLength(); //distance_=coord[1]; DEBUG euler_[1]=M_PI-coord[2]; euler_[2]=-M_PI/2-coord[3]; break; case GYOTO_COORDKIND_CARTESIAN: { double rks=sqrt(coord[1]*coord[1]+coord[2]*coord[2]+coord[3]*coord[3]); double thetaks=acos(coord[3]/rks); double phiks=atan2(coord[2],coord[1]); distance_=rks * gg_ -> unitLength(); euler_[1]=M_PI-thetaks; euler_[2]=-M_PI/2-phiks; } break; default: throwError("Incompatible coordinate kind in Screen::setObserverCoord"); } computeBaseVectors(); } void Screen::observerKind(const string &kind) { observerkind_=kind; } string Screen::observerKind() const { return observerkind_; } void Screen::setFourVel(const double coord[4]) { for (int ii=0;ii<4;ii++) fourvel_[ii]=coord[ii]; } void Screen::fourVel(std::vector const &coord) { if (coord.size() != 4) throwError("base screen vectors require 4 elements"); for (int ii=0;ii<4;ii++) fourvel_[ii]=coord[ii]; } std::vector Screen::fourVel() const { std::vector output(4, 0.); for (int ii=0;ii<4;ii++) output[ii]=fourvel_[ii]; return output; } void Screen::screenVector1(std::vector const &coord) { if (coord.size() != 4) throwError("base screen vectors require 4 elements"); for (int ii=0;ii<4;ii++) screen1_[ii]=coord[ii]; } std::vector Screen::screenVector1() const { std::vector output(4, 0.); for (int ii=0;ii<4;ii++) output[ii]=screen1_[ii]; return output; } void Screen::screenVector2(std::vector const &coord) { if (coord.size() != 4) throwError("base screen vectors require 4 elements"); for (int ii=0;ii<4;ii++) screen2_[ii]=coord[ii]; } std::vector Screen::screenVector2() const { std::vector output(4, 0.); for (int ii=0;ii<4;ii++) output[ii]=screen2_[ii]; return output; } void Screen::screenVector3(std::vector const &coord) { if (coord.size() != 4) throwError("base screen vectors require 4 elements"); for (int ii=0;ii<4;ii++) screen3_[ii]=coord[ii]; } std::vector Screen::screenVector3() const { std::vector output(4, 0.); for (int ii=0;ii<4;ii++) output[ii]=screen3_[ii]; return output; } void Screen::setScreen1(const double coord[4]) { for (int ii=0;ii<4;ii++) screen1_[ii]=coord[ii]; } void Screen::setScreen2(const double coord[4]) { for (int ii=0;ii<4;ii++) screen2_[ii]=coord[ii]; } void Screen::setScreen3(const double coord[4]) { for (int ii=0;ii<4;ii++) screen3_[ii]=coord[ii]; } void Screen::getObserverPos(double coord[]) const { double r0 = distance_ / gg_ -> unitLength(); //remark : Pb here if mass=0 (unitLength=0...) -> pb for flat metric //if (debug()) cout << "distance_ in screen= " << distance_ << endl; //double r0 = distance_ ;DEBUG double theta0 = M_PI-euler_[1]; double phi0 = -M_PI/2-euler_[2]; int coordkind = gg_ -> coordKind(); stringstream ss; switch (coordkind) { case GYOTO_COORDKIND_CARTESIAN: coord[0] = tobs_ * GYOTO_C / gg_ -> unitLength(); coord[1] = r0*cos(phi0)*sin(theta0); coord[2] = r0*sin(phi0)*sin(theta0); coord[3] = r0*cos(theta0); break; case GYOTO_COORDKIND_SPHERICAL: coord[0] = tobs_ * GYOTO_C / gg_ -> unitLength(); coord[1] = r0; coord[2] = theta0; coord[3] = phi0; break; default: ss << "Incompatible coordinate kind in Screen::getObserverPos: " << coordkind; throwError(ss.str()); } } void Screen::getFourVel(double fourvel[]) const{ for (int ii=0;ii<4;ii++) fourvel[ii]=fourvel_[ii]; } void Screen::getScreen1(double output[]) const{ for (int ii=0;ii<4;ii++) output[ii]=screen1_[ii]; } void Screen::getScreen2(double output[]) const{ for (int ii=0;ii<4;ii++) output[ii]=screen2_[ii]; } void Screen::getScreen3(double output[]) const{ for (int ii=0;ii<4;ii++) output[ii]=screen3_[ii]; } /* SPECTROMETER */ void Screen::spectrometer(SmartPointer spr) { spectro_=spr; } SmartPointer Screen::spectrometer() const { return spectro_; } void Screen::getRayCoord(const size_t i, const size_t j, double coord[]) const { double xscr, yscr; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "(i=" << i << ", j=" << j << ", coord)" << endl; # endif switch (anglekind_) { case Screen::spherical_angles: /* GYOTO screen labelled by spherical angles a and b (see Fig. in user guide) */ xscr = double(i-1)*fov_/(2.*double(npix_-1)); yscr = M_PI-(double(j-1)*2.*M_PI/double(npix_-1)); // NB: here xscr and yscr are the spherical angles // a and b ; the b->pi-b transformation boils down // to performing X->-X, just as below for equat angles. break; case Screen::equatorial_angles:{ /* GYOTO screen labelled by equatorial angles alpha and delta (see Fig. in user guide) */ const double delta= fov_/double(npix_); yscr=delta*(double(j)-double(npix_+1)/2.); xscr=-delta*(double(i)-double(npix_+1)/2.); break; } // transforming X->-X (X being coord along e_1 observer vector) // this is due to the orientation convention of the screen // (cf InitialConditions.pdf) case Screen::rectilinear: { if (fov_ >= M_PI) throwError("Rectilinear projection requires fov_ < M_PI"); const double xfov=2.*tan(fov_*0.5); const double delta= xfov/double(npix_); yscr=delta*(double(j)-double(npix_+1)/2.); xscr=-delta*(double(i)-double(npix_+1)/2.); break; } default: xscr=yscr=0.; throwError("Unrecognized anglekind_"); } getRayCoord(xscr, yscr, coord); } void Screen::getRayCoord(double alpha, double delta, double coord[]) const { alpha+=alpha0_; delta+=delta0_; // Screen orientation double normtol=1e-10; int i; // dimension : 0, 1, 2 double pos[4]; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "(alpha="< dmax_) { // scale coord[0] -= coord[1] - dmax_; double scale = coord[1] / dmax_; coord[1] = dmax_; alpha *= scale; delta *= scale; } coord[4]=coord[5]=coord[6]=coord[7]=0.;//initializing 4-velocity double spherical_angle_a, spherical_angle_b; switch (anglekind_) { case spherical_angles: /* GYOTO screen labelled by spherical angles a and b (see Fig. in user guide) */ spherical_angle_a = alpha; spherical_angle_b = delta; break; case rectilinear: spherical_angle_a = atan(sqrt(alpha*alpha+delta*delta)); spherical_angle_b = atan2(delta, alpha); break; case equatorial_angles: /* GYOTO screen labelled by equatorial angles alpha and delta (see Fig. in user guide) Must compute spherical angles a and b from these. */ /* NB: spherical_angles = spherical angles associated with the orthonormal 3-frame of the observer's local rest space */ /* NBB: for spherical_angle_a, the relation comes from the spherical law of cosines of spherical trigonometry, the arcs spherical_angle_a, alpha and delta forming a spherical triangle, with alpha othogonal to delta. NBBB: for spherical_angle_b, the relation also comes from the spherical law of cosine. --> Following transformations are OK even for non-small alpha, delta */ #ifdef HAVE_BOOST_MULTIPRECISION_CPP_DEC_FLOAT_HPP // using boost multiprecision to avoid information loss in trigonometry { boost::multiprecision::cpp_dec_float_100 alpha100=alpha, delta100=delta, a, b; a=acos(cos(alpha100)*cos(delta100)); b=atan2(tan(delta100),sin(alpha100)); spherical_angle_a=a.convert_to(); spherical_angle_b=b.convert_to(); } #else if (abs(alpha)<1e-6 || abs(delta) < 1e-6) { spherical_angle_a = sqrt(alpha*alpha+delta*delta); } else { spherical_angle_a = acos(cos(alpha)*cos(delta)); } spherical_angle_b = (alpha==0. && delta==0.) ? 0. : atan2(tan(delta),sin(alpha)); #endif break; default: spherical_angle_a=spherical_angle_b=0.; throwError("Unknown angle type"); } // Move these two angles to [0,pi], [0,2pi] double s1tmp=spherical_angle_a, s2tmp=spherical_angle_b; while (s1tmp>M_PI) s1tmp-=2.*M_PI; while (s1tmp<-M_PI) s1tmp+=2.*M_PI;//then s1 in [-pi,pi] if (s1tmp<0.) { s1tmp=-s1tmp;//then s1 in [0,pi] s2tmp+=M_PI;//thus, same direction } while (s2tmp>=2.*M_PI) s2tmp-=2.*M_PI; while (s2tmp<0.) s2tmp+=2.*M_PI;//then s2 in [0,2pi[ spherical_angle_a=s1tmp; spherical_angle_b=s2tmp; /* Tangent vector of incident photon in observer's local frame vel is thus orthogonal to observer's 4-velocity vel = vel[0]*screen1_+vel[1]*screen2_+vel[2]*screen3_ where screen1,2,3_ is a triad in observer's rest space */ //NB: following minus signs because the photon doesn't leave the screen, but //is heading towards it! double vel[3]={-sin(spherical_angle_a)*cos(spherical_angle_b), -sin(spherical_angle_a)*sin(spherical_angle_b), -cos(spherical_angle_a)}; // 4-vector tangent to photon geodesic if (fourvel_[0]==0. && observerkind_=="ObserverAtInfinity"){ /* ---> Observer local frame not given in XML <--- Assume observer static at infinity ("standard Gyoto") Treatment depending on coordinate system */ switch (gg_ -> coordKind()) { case GYOTO_COORDKIND_CARTESIAN: { double rr=coord[1]*coord[1]+ coord[2]*coord[2]+ coord[3]*coord[3], rinf=20.; // this rinf is just a very crude test // I take rinf=10*rhor in Sch metric if (rrgmunu(pos,1,1), gthth=gg_->gmunu(pos,2,2), gphph=gg_->gmunu(pos,3,3); coord[5]=-vel[2]/sqrt(grr); double sp=sin(euler_[0]); double cp=cos(euler_[0]); coord[6]=(-sp*vel[0]+cp*vel[1])/sqrt(gthth); coord[7]=( cp*vel[0]+sp*vel[1])/sqrt(gphph); } break; default: throwError("Incompatible coordinate kind in Screen::getRayCoord()"); break; } // 0-component of photon tangent 4-vector found by normalizing gg_ -> nullifyCoord(coord); }else{ /* ---> Observer local frame given in XML <--- Express photon tangent 4-vector in the observer basis Treatment is coordinate independent (except for z-axis check right below) */ if (gg_ -> coordKind() == GYOTO_COORDKIND_SPHERICAL){ if (coord[2]==0. || coord[2]==M_PI) throwError("Please move Screen away from z-axis"); } if (fourvel_[0]!=0. && observerkind_!="ObserverAtInfinity"){ throwError("In Screen:getRayCoord: " " choose an implemented observer kind OR" " explicitly give the local tetrad in the XML"); } if (fourvel_[0]==0){ // Implemented observer specifid in XML, local tetrad computed by Metric const double fourpos[4]={coord[0],coord[1],coord[2],coord[3]}; double fourvel[4], screen1[4], screen2[4], screen3[4]; gg_ -> observerTetrad(observerkind_,fourpos,fourvel,screen1, screen2,screen3); /*cout << "Vectors in Screen: " << setprecision(17) << endl; for (int ii=0;ii<4;ii++) cout << fourvel[ii] << " "; cout << endl; for (int ii=0;ii<4;ii++) cout << screen1[ii] << " "; cout << endl; for (int ii=0;ii<4;ii++) cout << screen2[ii] << " "; cout << endl; for (int ii=0;ii<4;ii++) cout << screen3[ii] << " "; cout << endl;*/ /* Photon tagent 4-vector l defined by: l = p + fourvel_ where p gives the direction of the photon in the observer's rest space (orthogonal to fourvel). Here we choose the particular tangent 4-vector l that satisfies l.fourvel_=-1 Then l = fourvel_ + (orthogonal proj of l onto rest space) = fourvel_ + p and p = vel[0]*screen1_ + vel[1]*screen2_ + vel[2]*screen3_ with p.p = 1, thus l.l = 0 as it should */ coord[4]=vel[0]*screen1[0] +vel[1]*screen2[0] +vel[2]*screen3[0] +fourvel[0]; coord[5]=vel[0]*screen1[1] +vel[1]*screen2[1] +vel[2]*screen3[1] +fourvel[1]; coord[6]=vel[0]*screen1[2] +vel[1]*screen2[2] +vel[2]*screen3[2] +fourvel_[2]; coord[7]=vel[0]*screen1[3] +vel[1]*screen2[3] +vel[2]*screen3[3] +fourvel[3]; }else{ // Local tetrad given by the user in the XML file. Check it. if (fabs(gg_->ScalarProd(coord,fourvel_,fourvel_)+1.)>normtol || fabs(gg_->ScalarProd(coord,screen1_,screen1_)-1.)>normtol || fabs(gg_->ScalarProd(coord,screen2_,screen2_)-1.)>normtol || fabs(gg_->ScalarProd(coord,screen3_,screen3_)-1.)>normtol){ cout << "norm= " << gg_->ScalarProd(coord,fourvel_,fourvel_) << " " << gg_->ScalarProd(coord,screen1_,screen1_) << " " << gg_->ScalarProd(coord,screen2_,screen2_) << " " << gg_->ScalarProd(coord,screen3_,screen3_) << endl; throwError("In Screen:getRayCoord: observer's local" " basis is not properly normalized"); } if (fabs(gg_->ScalarProd(coord,fourvel_,screen1_))>normtol || fabs(gg_->ScalarProd(coord,fourvel_,screen2_))>normtol || fabs(gg_->ScalarProd(coord,fourvel_,screen3_))>normtol || fabs(gg_->ScalarProd(coord,screen1_,screen2_))>normtol || fabs(gg_->ScalarProd(coord,screen1_,screen3_))>normtol || fabs(gg_->ScalarProd(coord,screen2_,screen3_))>normtol) throwError("In Screen:getRayCoord: observer's local" " basis is not orthogonal"); coord[4]=vel[0]*screen1_[0] +vel[1]*screen2_[0] +vel[2]*screen3_[0] +fourvel_[0]; coord[5]=vel[0]*screen1_[1] +vel[1]*screen2_[1] +vel[2]*screen3_[1] +fourvel_[1]; coord[6]=vel[0]*screen1_[2] +vel[1]*screen2_[2] +vel[2]*screen3_[2] +fourvel_[2]; coord[7]=vel[0]*screen1_[3] +vel[1]*screen2_[3] +vel[2]*screen3_[3] +fourvel_[3]; } if (fabs(gg_->ScalarProd(coord,coord+4,coord+4))>normtol){ throwError("In Screen::getRayCoord: " " tangent 4-vector to photon not properly normalized"); } } } /************** MASK ******************/ void Screen::mask(double const * const mm, size_t res) { if (res) npix_=res; if (mask_) { delete[] mask_; mask_=NULL; mask_filename_=""; } if (mm) { mask_ = new double[npix_*npix_]; memcpy(mask_, mm, npix_*npix_*sizeof(double)); } } double const * Screen::mask() const { return mask_; } void Screen::maskFile(std::string const &fname) { # ifdef GYOTO_USE_CFITSIO if (fname != "") fitsReadMask(fname); # else GYOTO_WARNING << "No FITS i/o, Screen mask file ignored" << endl; # endif } std::string Screen::maskFile() const {return mask_filename_;} #ifdef GYOTO_USE_CFITSIO void Screen::fitsReadMask(std::string const &filename) { GYOTO_DEBUG << "Screen::fitsReadMask(\"" << filename << "\")"<(filename.c_str()); fitsfile* fptr = NULL; int status = 0; int anynul = 0; long naxes [] = {1, 1, 1}; long fpixel[] = {1, 1, 1}; long inc [] = {1, 1, 1}; char ermsg[31] = ""; // ermsg is used in throwCfitsioError() if (fits_open_file(&fptr, pixfile, 0, &status)) { GYOTO_WARNING << "Unable to read Screen mask file '" << filename << "', ignoring." << endl; return; } if (fits_get_img_size(fptr, 3, naxes, &status)) throwCfitsioError(status) ; if (naxes[0] != naxes[1]) throwError("Screen::fitsReadMask(): mask must be square"); // if (naxes[2] > 1) // throwError("Screen::fitsReadMask(): mask must have only one plane"); npix_=naxes[0]; if (mask_) { delete[] mask_; mask_=NULL; mask_filename_="";} mask_ = new double[npix_*npix_]; inc[2]=naxes[2]; // read only first plane! if (fits_read_subset(fptr, TDOUBLE, fpixel, naxes, inc, 0, mask_,&anynul,&status)) { GYOTO_DEBUG << " error, trying to free pointer" << endl; delete [] mask_; mask_=NULL; throwCfitsioError(status) ; } if (fits_close_file(fptr, &status)) throwCfitsioError(status) ; mask_filename_=filename; fptr = NULL; } void Screen::fitsWriteMask(string const &fname) { std::string filename = fname==""?mask_filename_:fname; if (filename=="") filename=mask_filename_; if (filename=="") throwError("no filename specified"); if (!mask_) throwError("Screen::fitsWriteMask(filename): nothing to save!"); char* pixfile = const_cast(filename.c_str()); fitsfile* fptr = NULL; int status = 0; long naxes [] = {long(npix_), long(npix_)}; long fpixel[] = {1,1}; char ermsg[31] = ""; // ermsg is used in throwCfitsioError() ////// CREATE FILE GYOTO_DEBUG << "creating file \"" << pixfile << "\"... "; fits_create_file(&fptr, pixfile, &status); if (debug()) cerr << "done." << endl; fits_create_img(fptr, DOUBLE_IMG, 2, naxes, &status); if (status) throwCfitsioError(status) ; ////// SAVE EMISSION IN PRIMARY HDU /////// GYOTO_DEBUG << "saving emission_\n"; fits_write_pix(fptr, TDOUBLE, fpixel, npix_*npix_, mask_, &status); if (status) throwCfitsioError(status) ; ////// CLOSING FILE /////// GYOTO_DEBUG << "close FITS file\n"; if (fits_close_file(fptr, &status)) throwCfitsioError(status) ; mask_filename_=filename; fptr = NULL; } #endif bool Screen::operator()(size_t i, size_t j) { if ( i<=0 || i> npix_ || j>npix_ || j<=0) throwError("wrong index"); if (!mask_) return true; return mask_[i-1+npix_*(j-1)]; } void Screen::computeBaseVectors() { // See http://en.wikipedia.org/wiki/Euler_angles // if (debug()) cout << "In compute base vectore" << endl; double ca, sa; sincos(euler_[0], &sa, &ca); // paln double cb, sb; sincos(euler_[1], &sb, &cb); // inclination double cc, sc; sincos(euler_[2], &sc, &cc); // argument double unit = 1.;//1./distance_; //NB: here x,y,z are KS coordinates ex_[0] = unit*( ca*cc - sa*cb*sc);//component of KS vector eX along observer East direction ex ex_[1] = unit*( sa*cc + ca*cb*sc);//component of KS vector eX along observer North direction ey ex_[2] = unit*( sb*sc);//etc... ey_[0] = unit*(-ca*sc - sa*cb*cc); ey_[1] = unit*(-sa*sc + ca*cb*cc); ey_[2] = unit*( sb*cc); ez_[0] = unit*( sb*sa); ez_[1] = unit*(-sb*ca); ez_[2] = unit*( cb); } void Screen::coordToSky(const double pos[4], double skypos[3]) const { double xyz[3]; coordToXYZ(pos, xyz); double ul = gg_ -> unitLength(); skypos[0]=(xyz[0]*ex_[0]+xyz[1]*ey_[0]+xyz[2]*ez_[0]) * ul; skypos[1]=(xyz[0]*ex_[1]+xyz[1]*ey_[1]+xyz[2]*ez_[1]) * ul; skypos[2]=(xyz[0]*ex_[2]+xyz[1]*ey_[2]+xyz[2]*ez_[2]) * ul; } std::ostream & Screen::printBaseVectors(std::ostream &o) const { o << endl; o << setprecision(3) << setw(8) << ex_[0] << ", " << setprecision(3) << setw(8) << ey_[0] << ", " << setprecision(3) << setw(8) << ez_[0] << endl; o << setprecision(3) << setw(8) << ex_[1] << ", " << setprecision(3) << setw(8) << ey_[1] << ", " << setprecision(3) << setw(8) << ez_[1] << endl; o << setprecision(3) << setw(8) << ex_[2] << ", " << setprecision(3) << setw(8) << ey_[2] << ", " << setprecision(3) << setw(8) << ez_[2] << endl; return o ; } /***************Useful functions**************/ void Screen::coordToXYZ(const double pos[4], double xyz[3]) const { int coordkind = gg_ -> coordKind(); switch(coordkind) { case GYOTO_COORDKIND_SPHERICAL: xyz[0] = pos[1]*sin(pos[2])*cos(pos[3]); xyz[1] = pos[1]*sin(pos[2])*sin(pos[3]); xyz[2] = pos[1]*cos(pos[2]); break; case GYOTO_COORDKIND_CARTESIAN: xyz[0] = pos[1]; xyz[1] = pos[2]; xyz[2] = pos[3]; break; default: throwError("Incompatible coordinate kind in Screen::coordToXYZ"); break; } } double Screen::time() const { return tobs_ ; } double Screen::time(const string &unit) const { return Units::FromSeconds(time(), unit, gg_) ; } void Screen::time(double tobs, const string &unit) { # ifdef GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(tobs); GYOTO_DEBUG_EXPR(unit); # endif time(Units::ToSeconds(tobs, unit, gg_)); } void Screen::time(double tobs) { tobs_ = tobs; # ifdef GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(tobs_); # endif } //double Screen::getMinimumTime() { return tmin_; } //void Screen::setMinimumTime(double tmin) { tmin_ = tmin; } double Screen::fieldOfView() const { return fov_; } double Screen::fieldOfView(string const &unit) const { double fov = fieldOfView(); if (unit=="" || unit=="rad") ; else if (unit=="geometrical") fov *= distance_ / gg_ -> unitLength(); # ifdef HAVE_UDUNITS else if (Units::areConvertible(unit, "m")) fov = Units::FromMeters(fov*distance_, unit) ; else fov = Units::Converter("rad", unit)(fov); # else else if (unit=="degree") fov /= GYOTO_DEGRAD; else if (unit=="arcmin") fov /= GYOTO_MINRAD; else if (unit=="arcsec") fov /= GYOTO_SECRAD; else if (unit=="milliarcsec") fov /= GYOTO_MASRAD; else if (unit=="microarcsec") fov /= GYOTO_MUASRAD; else { stringstream ss; ss << "Screen::fieldOfView(): unknown unit: \"" << unit << "\"" << " (you may have more chance compiling gyoto with --with-udunits)"; throwError(ss.str()); } # endif return fov; } void Screen::fieldOfView(double fov, const string &unit) { if (unit=="" || unit=="rad") ; else if (unit=="geometrical") fov *= gg_ -> unitLength() / distance_ ; # ifdef HAVE_UDUNITS else { Units::Unit from (unit); if (Units::areConvertible(from, "m")) fov = Units::ToMeters(fov, from) / distance_; else fov = Units::Converter(from, "rad")(fov); } # else else if (unit=="degree" || unit=="°") fov *= GYOTO_DEGRAD; else if (unit=="arcmin") fov *= GYOTO_MINRAD; else if (unit=="arcsec" || unit=="as") fov *= GYOTO_SECRAD; else if (unit=="milliarcsec" || unit=="mas") fov *= GYOTO_MASRAD; else if (unit=="microarcsec" || unit=="µas" || unit=="uas") fov *= GYOTO_MUASRAD; else { stringstream ss; ss << "Screen::fieldOfView(): unknown unit: \"" << unit << "\"" << " (you may have more chance compiling gyoto with --with-udunits)"; throwError(ss.str()); } # endif fieldOfView(fov); } void Screen::fieldOfView(double fov) { fov_ = fov; } void Screen::alpha0(double alpha) { alpha0_ = alpha; } double Screen::alpha0() const { return alpha0_; } void Screen::delta0(double delta) { delta0_ = delta; } double Screen::delta0() const { return delta0_; } double Screen::alpha0(string const &unit) const { double fov = alpha0(); if (unit=="" || unit=="rad") ; else if (unit=="geometrical") fov *= distance_ / gg_ -> unitLength(); # ifdef HAVE_UDUNITS else if (Units::areConvertible(unit, "m")) fov = Units::FromMeters(fov*distance_, unit) ; else fov = Units::Converter("rad", unit)(fov); # else else if (unit=="degree") fov /= GYOTO_DEGRAD; else if (unit=="arcmin") fov /= GYOTO_MINRAD; else if (unit=="arcsec") fov /= GYOTO_SECRAD; else if (unit=="milliarcsec") fov /= GYOTO_MASRAD; else if (unit=="microarcsec") fov /= GYOTO_MUASRAD; else { stringstream ss; ss << "Screen::alpha0(): unknown unit: \"" << unit << "\"" << " (you may have more chance compiling gyoto with --with-udunits)"; throwError(ss.str()); } # endif return fov; } double Screen::delta0(string const &unit) const{ double fov = delta0(); if (unit=="" || unit=="rad") ; else if (unit=="geometrical") fov *= distance_ / gg_ -> unitLength(); # ifdef HAVE_UDUNITS else if (Units::areConvertible(unit, "m")) fov = Units::FromMeters(fov*distance_, unit) ; else fov = Units::Converter("rad", unit)(fov); # else else if (unit=="degree") fov /= GYOTO_DEGRAD; else if (unit=="arcmin") fov /= GYOTO_MINRAD; else if (unit=="arcsec") fov /= GYOTO_SECRAD; else if (unit=="milliarcsec") fov /= GYOTO_MASRAD; else if (unit=="microarcsec") fov /= GYOTO_MUASRAD; else { stringstream ss; ss << "Screen::delta0(): unknown unit: \"" << unit << "\"" << " (you may have more chance compiling gyoto with --with-udunits)"; throwError(ss.str()); } # endif return fov; } void Screen::alpha0(double fov, const string &unit) { if (unit=="" || unit=="rad") ; else if (unit=="geometrical") fov *= gg_ -> unitLength() / distance_ ; # ifdef HAVE_UDUNITS else { Units::Unit from (unit); if (Units::areConvertible(from, "m")) fov = Units::ToMeters(fov, from) / distance_; else fov = Units::Converter(from, "rad")(fov); } # else else if (unit=="degree" || unit=="°") fov *= GYOTO_DEGRAD; else if (unit=="arcmin") fov *= GYOTO_MINRAD; else if (unit=="arcsec" || unit=="as") fov *= GYOTO_SECRAD; else if (unit=="milliarcsec" || unit=="mas") fov *= GYOTO_MASRAD; else if (unit=="microarcsec" || unit=="µas" || unit=="uas") fov *= GYOTO_MUASRAD; else { stringstream ss; ss << "Screen::fieldOfView(): unknown unit: \"" << unit << "\"" << " (you may have more chance compiling gyoto with --with-udunits)"; throwError(ss.str()); } # endif alpha0(fov); } void Screen::delta0(double fov, const string &unit) { if (unit=="" || unit=="rad") ; else if (unit=="geometrical") fov *= gg_ -> unitLength() / distance_ ; # ifdef HAVE_UDUNITS else { Units::Unit from (unit); if (Units::areConvertible(from, "m")) fov = Units::ToMeters(fov, from) / distance_; else fov = Units::Converter(from, "rad")(fov); } # else else if (unit=="degree" || unit=="°") fov *= GYOTO_DEGRAD; else if (unit=="arcmin") fov *= GYOTO_MINRAD; else if (unit=="arcsec" || unit=="as") fov *= GYOTO_SECRAD; else if (unit=="milliarcsec" || unit=="mas") fov *= GYOTO_MASRAD; else if (unit=="microarcsec" || unit=="µas" || unit=="uas") fov *= GYOTO_MUASRAD; else { stringstream ss; ss << "Screen::fieldOfView(): unknown unit: \"" << unit << "\"" << " (you may have more chance compiling gyoto with --with-udunits)"; throwError(ss.str()); } # endif delta0(fov); } void Screen::anglekind(int kind) { anglekind_ = kind; } void Screen::anglekind(std::string const &skind) { if (skind=="EquatorialAngles") anglekind_=equatorial_angles; else if (skind=="SphericalAngles") anglekind_=spherical_angles; else if (skind=="Rectilinear") anglekind_=rectilinear; else throwError("Invalid string value for anglekind_"); } std::string Screen::anglekind() const { switch (anglekind_) { case equatorial_angles: return "EquatorialAngles"; break; case spherical_angles: return "SphericalAngles"; break; case rectilinear: return "Rectilinear"; break; default: throwError("Invalid integer value for Screen::anglekind_"); } return ""; // silence warning } size_t Screen::resolution() const { return npix_; } void Screen::resolution(size_t n) { if (mask_ && n != npix_) { GYOTO_INFO << "Changing resolution: deleting mask" << endl; delete[] mask_; mask_=NULL; } npix_ = n; } #ifdef HAVE_UDUNITS void Gyoto::Screen::mapPixUnit() { Units::Unit radian ("radian"); double delta = fov_/double(npix_); ut_unit * pix = ut_scale(delta, radian); ut_status status = UT_BAD_ARG; status = ut_map_name_to_unit("pixel", UT_ASCII, pix); switch (status) { case UT_SUCCESS: break; case UT_EXISTS: throwError("name \"pixel\" already registered"); break; default: throwError("error initializing \"pixel\" unit"); } status = ut_map_symbol_to_unit("pix", UT_ASCII, pix); switch (status) { case UT_SUCCESS: break; case UT_EXISTS: throwError("symbol \"pix\" already registered"); break; default: throwError("error initializing \"pixel\" unit"); } ut_free(pix); # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "\"pix\" unit mapped\n"; # endif } void Gyoto::Screen::unmapPixUnit() { ut_system * sys = Units::getSystem(); if ((ut_unmap_name_to_unit(sys, "pixel", UT_ASCII) != UT_SUCCESS) || (ut_unmap_symbol_to_unit(sys, "pix", UT_ASCII) != UT_SUCCESS)) throwError("Error unmapping \"pixel\" unit"); # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "\"pix\" unit unmapped\n"; # endif } #endif #ifdef GYOTO_USE_XERCES void Screen::fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const { if (p.name=="Distance") { FactoryMessenger* child = NULL; double d = distance(); if (gg_() && (gg_->mass() == 1.)) { d /= gg_->unitLength(); fmp -> setParameter ("Distance", &d, 1, &child); child -> setSelfAttribute("unit", "geometrical"); } else { string unit = "m"; if ( d >= GYOTO_KPC*1e3 ) { d /= (1000.*GYOTO_KPC); unit = "Mpc"; } else if (d >= GYOTO_KPC ) { d /= GYOTO_KPC; unit = "kpc"; } else if (d >= GYOTO_KPC*1e-3 ) { d /= (GYOTO_KPC*1e-3); unit = "pc"; } else if (d >= GYOTO_LIGHT_YEAR) { d /= GYOTO_LIGHT_YEAR; unit = "ly"; } else if (d >= GYOTO_ASTRONOMICAL_UNIT) { d /= GYOTO_ASTRONOMICAL_UNIT; unit = "AU"; } else if (d >= GYOTO_SUN_RADIUS) { d /= GYOTO_SUN_RADIUS; unit = "sunradius"; } else if (d >= 1e3) { d *= 1e-3; unit = "km";} else if (d >= 1.) ;// { d *= 1.; unit = "m";} else if (d >= 1e-2) { d *= 1e2; unit = "cm";} //else ; { d *= 1.; unit = "m";} fmp -> setParameter ("Distance", &d, 1, &child); child -> setSelfAttribute("unit", unit); } child -> setSelfAttribute("dmax", dmax_); delete child; child = NULL; } else if (p.name=="DMax") ; // do nothing else if (p.name=="Mask" && mask_filename_!="") fmp->setParameter("Mask", (mask_filename_.compare(0,1,"!") ? mask_filename_ : mask_filename_.substr(1))); else Object::fillProperty(fmp, p); } SmartPointer Screen::Subcontractor(FactoryMessenger* fmp) { string name="", content="", unit="", tunit="", aunit="", dunit=""; vector plugin; SmartPointer scr = new Screen(); if (!fmp) return scr; scr -> metric(fmp->metric()); int tobs_found=0; double tobs_tmp, pos[4] ; char * tc; // Deal with fov later as we need Inclination double fov; string fov_unit; int fov_found=0; double alpha0=0.; int alpha0_found=0; double delta0=0.; int delta0_found=0; while (fmp->getNextParameter(&name, &content, &unit)) { tc = const_cast(content.c_str()); # ifdef GYOTO_DEBUG_ENABLED GYOTO_IF_DEBUG GYOTO_DEBUG_EXPR(name); GYOTO_DEBUG_EXPR(content); GYOTO_DEBUG_EXPR(unit); GYOTO_ENDIF_DEBUG # endif if (name=="Time") {tobs_tmp = atof(tc); tunit=unit; tobs_found=1;} else if (name=="Position") { if (FactoryMessenger::parseArray(content, pos, 4) != 4) throwError("Screen \"Position\" requires exactly 4 tokens"); scr -> setObserverPos (pos); } else if (name=="KeplerianObserver" || name=="ZAMO" || name=="ObserverAtInfinity") { scr -> observerKind(name); } else if (name=="Distance") { scr -> distance ( atof(tc), unit ); string dmax = fmp -> getAttribute("dmax"); if (dmax != "") scr -> dMax(atof(dmax.c_str())); } else if (name=="FieldOfView") { fov = atof(tc); fov_unit=unit; fov_found=1; } else if (name=="Spectrometer") { scr -> spectrometer((Spectrometer::getSubcontractor(fmp->getAttribute("kind"), plugin)) (fmp->getChild(), plugin)); } else if (name=="Alpha0"){ alpha0 = atof(tc); alpha0_found=1; aunit=unit; } else if (name=="Delta0"){ delta0 = atof(tc); delta0_found=1; dunit=unit; } else if (name=="SphericalAngles" || name=="EquatorialAngles" || name=="Rectilinear") scr -> anglekind(name); else if (name=="Mask") scr -> maskFile(content==""?"":fmp->fullPath(content)); else if (scr->setParameter(name, content, unit)) throwError("no such Screen Property"); } // Must be processed after Position if (tobs_found) scr -> time ( tobs_tmp, tunit ); // Must be processed after Position and Distance so pix_unit is // defined if (fov_found) scr -> fieldOfView ( fov, fov_unit ); if (alpha0_found) scr -> alpha0(alpha0, aunit); if (delta0_found) scr -> delta0(delta0, dunit); # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(scr->dMax()); # endif return scr; } #endif //////// COORD2DSET Screen::Coord2dSet::Coord2dSet(CoordType_e k) : kind(k) {} Screen::Coord2dSet::~Coord2dSet() {} GYOTO_ARRAY Screen::Coord2dSet::operator* () const { if (kind==pixel) throwError("BUG: Coord2dSet of kind pixel should implement operator*"); else throwError("Coord2dSet of kind angle should not be dereferenced"); // avoid warning GYOTO_ARRAY a; return a; } GYOTO_ARRAY Screen::Coord2dSet::angles () const { if (kind==Screen::angle) throwError("BUG: Coord2dSet of kind angle should implement angles()"); else throwError("angles() should not be called on Coord2dSet of kind pixel"); // avoid warning GYOTO_ARRAY a; return a; } //////// GRID Screen::Grid::Grid(Coord1dSet &iset, Coord1dSet &jset, const char * const p) : Coord2dSet(pixel), prefix_(p), iset_(iset), jset_(jset) {} GYOTO_ARRAY Screen::Grid::operator* () const { #if defined HAVE_BOOST_ARRAY_HPP GYOTO_ARRAY ij = {*iset_, *jset_}; #else GYOTO_ARRAY ij; ij[0]=*iset_; ij[1]=*jset_; #endif return ij; } void Screen::Grid::begin() {iset_.begin(); jset_.begin();} bool Screen::Grid::valid() {return iset_.valid() && jset_.valid();} size_t Screen::Grid::size() {return (iset_.size())*(jset_.size());} Screen::Coord2dSet& Screen::Grid::operator++() { if (!valid()) return *this; ++iset_; if (!iset_.valid()) { iset_.begin(); ++jset_; if (prefix_ && verbose() >= GYOTO_QUIET_VERBOSITY && jset_.valid()) cout << prefix_ << jset_.index()+1 << "/" << jset_.size() << flush; } return *this; } //////// COORD1DSET Screen::Coord1dSet::Coord1dSet(CoordType_e k) : kind(k) {} Screen::Coord1dSet::~Coord1dSet() {} size_t Screen::Coord1dSet::operator* () const { if (kind==pixel) throwError("BUG: Coord1dSet of kind pixel should implement operator*"); else throwError("Coord1dSet of kind angle should not be dereferenced"); // avoid warning return 0; } double Screen::Coord1dSet::angle () const { if (kind==Screen::angle) throwError("BUG: Coord1dSet of kind angle should implement angle()"); else throwError("angle() should not be called on Coord1dSet of kind pixel"); // avoid warning return 0.; } /////// Screen::Range::Range(size_t mi, size_t ma, size_t d) : Coord1dSet(pixel), mi_(mi), ma_(ma), d_(d), sz_((ma-mi)/d+1), cur_(mi) {} void Screen::Range::begin() {cur_=mi_;} Screen::Coord1dSet& Screen::Range::operator++() { cur_ += d_; return *this; } bool Screen::Range::valid() {return cur_ <= ma_;} size_t Screen::Range::size() {return sz_;} size_t Screen::Range::operator*() const {return cur_;} size_t Screen::Range::index() const {return (cur_-mi_) / d_;} ////// Screen::Indices::Indices (size_t const*const buf, size_t sz) : Coord1dSet(pixel), indices_(buf), sz_(sz), i_(0) {} void Screen::Indices::begin() {i_=0;} bool Screen::Indices::valid() {return i_ < sz_;} size_t Screen::Indices::size(){return sz_;} Screen::Coord1dSet& Screen::Indices::operator++() {++i_; return *this;} size_t Screen::Indices::operator*() const {return indices_[i_];} size_t Screen::Indices::index() const {return i_;} ///// Screen::Angles::Angles (double const*const buf, size_t sz) : Coord1dSet(Screen::angle), buf_(buf), sz_(sz), i_(0) {} void Screen::Angles::begin() {i_=0;} bool Screen::Angles::valid() {return i_ Screen::Bucket::angles() const { #if defined HAVE_BOOST_ARRAY_HPP GYOTO_ARRAY out {alpha_.angle(), delta_.angle()}; #else GYOTO_ARRAY out; out[0]=alpha_.angle(); out[1]=delta_.angle(); #endif return out; } GYOTO_ARRAY Screen::Bucket::operator* () const { #if defined HAVE_BOOST_ARRAY_HPP GYOTO_ARRAY ij = {*alpha_, *delta_}; #else GYOTO_ARRAY ij; ij[0]=*alpha_; ij[1]=*delta_; #endif return ij; } ///// Empty Screen::Empty::Empty () : Coord2dSet(pixel) {} Screen::Coord2dSet& Screen::Empty::operator++() {return *this;} void Screen::Empty::begin() {} bool Screen::Empty::valid() {return false;} size_t Screen::Empty::size() {return 0;} Gyoto-1.2.0/lib/SmartPointer.C000066400000000000000000000032141302352257300161160ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include #include #include #include Gyoto::SmartPointee::SmartPointee() : refCount (0) { #ifdef HAVE_PTHREAD pthread_mutex_init(&mutex_, NULL); #endif } Gyoto::SmartPointee::~SmartPointee() {} Gyoto::SmartPointee::SmartPointee(const SmartPointee&o) : refCount (0) { #ifdef HAVE_PTHREAD pthread_mutex_init(&mutex_, NULL); #endif } void Gyoto::SmartPointee::incRefCount () { #ifdef HAVE_PTHREAD pthread_mutex_lock(&mutex_); #endif refCount++; #ifdef HAVE_PTHREAD pthread_mutex_unlock(&mutex_); #endif } int Gyoto::SmartPointee::decRefCount () { #ifdef HAVE_PTHREAD pthread_mutex_lock(&mutex_); int n = --refCount; pthread_mutex_unlock(&mutex_); return n; #else return --refCount; #endif } int Gyoto::SmartPointee::getRefCount() { #ifdef HAVE_PTHREAD pthread_mutex_lock(&mutex_); int n = refCount; pthread_mutex_unlock(&mutex_); return n; #else return refCount; #endif } Gyoto-1.2.0/lib/Spectrometer.C000066400000000000000000000113331302352257300161440ustar00rootroot00000000000000/* Copyright 2011-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoSpectrometer.h" #include "GyotoUniformSpectrometer.h" #include "GyotoComplexSpectrometer.h" #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoConverters.h" #include "GyotoMetric.h" #include #include #include #include #include #include #include // DBL_MAX using namespace Gyoto; using namespace Gyoto::Spectrometer; using namespace std; /// Properties // There is no generic properties for spectrometers. Nevertheless, we // define this to derived classes can point to // Spectrometer::Generic::properties rather than Object::properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(Spectrometer::Generic, "Spectrometric capabilities of a Gyoto::Screen.") GYOTO_PROPERTY_END(Spectrometer::Generic, Object::properties) /// Register::Entry* Gyoto::Spectrometer::Register_ = NULL; void Spectrometer::initRegister() { if (Gyoto::Spectrometer::Register_) delete Gyoto::Spectrometer::Register_; Gyoto::Spectrometer::Register_ = NULL; // statically fill the register Gyoto::Spectrometer::Register("wave", &(Subcontractor)); Gyoto::Spectrometer::Register("wavelog", &(Subcontractor)); Gyoto::Spectrometer::Register("freq", &(Subcontractor)); Gyoto::Spectrometer::Register("freqlog", &(Subcontractor)); Gyoto::Spectrometer::Register("Complex", &(Subcontractor)); } void Gyoto::Spectrometer::Register(std::string name, Subcontractor_t* scp){ Register::Entry* ne = new Register::Entry(name, (SmartPointee::Subcontractor_t*)scp, Gyoto::Spectrometer::Register_); Gyoto::Spectrometer::Register_ = ne; } GYOTO_GETSUBCONTRACTOR(Spectrometer) Generic::Generic() : SmartPointee(), Object(), Teller(), kindid_(NULL), nsamples_(0), nboundaries_(0), boundaries_(NULL), chanind_(NULL), midpoints_(NULL), widths_(NULL) {} Generic::Generic(kind_t kin) : SmartPointee(), Object(kin), Teller(), kindid_(kin), nsamples_(0), nboundaries_(0), boundaries_(NULL), chanind_(NULL), midpoints_(NULL), widths_(NULL) {} Generic::Generic(const Generic& o) : SmartPointee(o), Object(o), Teller(o), kindid_(o.kindid_), nsamples_(o.nsamples_), nboundaries_(o.nboundaries_), boundaries_(NULL), chanind_(NULL), midpoints_(NULL), widths_(NULL) { if (o.boundaries_) boundaries_=new double[nboundaries_]; memcpy(boundaries_, o.boundaries_, nboundaries_*sizeof(double)); if (o.widths_) widths_=new double[nsamples_]; memcpy(widths_, o.widths_, nsamples_*sizeof(double)); if (o.midpoints_) midpoints_=new double[nsamples_]; memcpy(midpoints_, o.midpoints_, nsamples_*sizeof(double)); if (o.chanind_) chanind_=new size_t[2*nsamples_]; memcpy(chanind_, o.chanind_, 2*nsamples_*sizeof(size_t)); } Generic::~Generic() { if (boundaries_) delete [] boundaries_; if (widths_) delete [] widths_; if (midpoints_) delete [] midpoints_; if (chanind_) delete [] chanind_; } char const * Generic::kindid() const {return kindid_;} void Generic::kindid(char const * k) {kindid_=k; kind_=k; tellListeners();} size_t Generic::nSamples() const { return nsamples_; } size_t Generic::getNBoundaries() const { return nboundaries_; } double const * Generic::getMidpoints() const { return midpoints_; } void Generic::getMidpoints( double data[], std::string unit) { for (size_t i=0; i. */ #include "GyotoSpectrum.h" #include "GyotoRegister.h" #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include #include using namespace Gyoto; using namespace std; /// Properties // There is no generic properties for spectra. Nevertheless, we define // this to derived classes can point to Spectrum::Generic::properties // rather than Object::properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(Spectrum::Generic) GYOTO_PROPERTY_END(Spectrum::Generic, Object::properties) /// Spectrum::Generic::Generic(const string kin) : SmartPointee(), Object(kin) {} Spectrum::Generic::Generic(const Generic& o) : SmartPointee(o), Object(o) {} Spectrum::Generic * Spectrum::Generic::clone() const { string msg = "Spectrum::clone() called: " "cloning unimplemented for Spectrum kind "; msg += kind_; throwError(msg); return const_cast(this); // avoid warning, we won't get to that point } Spectrum::Generic::~Generic() { GYOTO_DEBUG << endl; } const string Spectrum::Generic::kind() const { return kind_; } double Spectrum::Generic::integrate(double nu1, double nu2) { double nu; if (nu1>nu2) {nu=nu1; nu1=nu2; nu2=nu;} double Inu1 = operator()(nu1), Inu2=operator()(nu2); double dnux2 = ((nu2-nu1)*2.); double Icur = (Inu2+Inu1)*dnux2*0.25; double Iprev; if (debug()) cerr << "DEBUG: Spectrum::Generic::integrate(): " << "Icur=" << Icur << endl; do { Iprev = Icur; dnux2 *= 0.5; for (nu = nu1 + 0.5*dnux2; nu < nu2; nu += dnux2) { Icur += operator()(nu) * dnux2; } Icur *= 0.5; if (debug()) cerr << "DEBUG: Spectrum::Generic::integrate(): " << "Icur=" << Icur << endl; } while( fabs(Icur-Iprev) > (1e-2 * Icur) ); if (debug()) cerr << "DEBUG: Spectrum::Generic::integrate(): " << "dnu=" << dnux2*0.5 << "=(nu2-nu1)/" << (nu2-nu1)/(dnux2*0.5) << endl; return Icur; } double Spectrum::Generic::integrate(double nu1, double nu2, const Spectrum::Generic * opacity, double dsem) { double nu; if (nu1>nu2) {nu=nu1; nu1=nu2; nu2=nu;} double Inu1 = operator()(nu1, (*opacity)(nu1), dsem), Inu2=operator()(nu2, (*opacity)(nu2), dsem); double dnux2 = ((nu2-nu1)*2.); double Icur = (Inu2+Inu1)*dnux2*0.25; double Iprev; if (debug()) cerr << "DEBUG: Spectrum::Generic::integrate(): " << "Icur=" << Icur << endl; do { Iprev = Icur; dnux2 *= 0.5; for (nu = nu1 + 0.5*dnux2; nu < nu2; nu += dnux2) { Icur += operator()(nu, (*opacity)(nu), dsem) * dnux2; } Icur *= 0.5; if (debug()) cerr << "DEBUG: Spectrum::Generic::integrate(): " << "Icur=" << Icur << endl; } while( fabs(Icur-Iprev) > (1e-2 * Icur) ); if (debug()) cerr << "DEBUG: Spectrum::Generic::integrate(): " << "dnu=" << dnux2*0.5 << "=(nu2-nu1)/" << (nu2-nu1)/(dnux2*0.5) << endl; return Icur; } double Spectrum::Generic::operator()(double nu, double opacity, double ds) const { double thickness; // assume emissivity = opacity if ((thickness=(opacity*ds))) return operator()(nu) * (1. - exp (-thickness)) ; return 0.; } Register::Entry* Gyoto::Spectrum::Register_ = NULL; void Gyoto::Spectrum::Register(std::string name, Gyoto::Spectrum::Subcontractor_t* scp) { Register::Entry* ne = new Register::Entry(name, (Gyoto::SmartPointee::Subcontractor_t*)scp, Gyoto::Spectrum::Register_); Gyoto::Spectrum::Register_ = ne; } GYOTO_GETSUBCONTRACTOR(Spectrum) void Gyoto::Spectrum::initRegister() { if (Gyoto::Spectrum::Register_) delete Gyoto::Spectrum::Register_; Gyoto::Spectrum::Register_ = NULL; } Gyoto-1.2.0/lib/StandardAstrobj.C000066400000000000000000000106521302352257300165600ustar00rootroot00000000000000/* Copyright 2011 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ // GYOTO HEADERS #include "GyotoUtils.h" #include "GyotoStandardAstrobj.h" #include "GyotoMetric.h" #include "GyotoPhoton.h" #include "GyotoRegister.h" #include "GyotoFactoryMessenger.h" #include "GyotoProperty.h" // SYSTEM HEADERS #include #include #include #include #include #include #include // NAMESPACES using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; GYOTO_PROPERTY_START(Gyoto::Astrobj::Standard, "Gyoto::Astrobj whose shape is defined by a scalar function.") GYOTO_PROPERTY_DOUBLE(Standard, SafetyValue, safetyValue, "Value of the function below which to look more carefully.") GYOTO_PROPERTY_END(Standard, Generic::properties) Standard::Standard(string kin) : Generic(kin), critical_value_(DBL_MIN), safety_value_(DBL_MAX) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif } Standard::Standard() : Generic(), critical_value_(DBL_MIN), safety_value_(DBL_MAX) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif } Standard::Standard(double radmax) : Generic(radmax), critical_value_(DBL_MIN), safety_value_(DBL_MAX) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif } Standard::Standard(const Standard& orig) : Generic(orig), Functor::Double_constDoubleArray(orig), critical_value_(orig.critical_value_), safety_value_(orig.safety_value_) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif } Standard::~Standard() { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif } int Standard::Impact(Photon* ph, size_t index, Properties *data){ # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(kind()); # endif double p1[8], p2[8]; ph->getCoord(index, p1); ph->getCoord(index+1, p2); double tmin, minval; if (gg_ -> coordKind() == GYOTO_COORDKIND_SPHERICAL){ //Allows theta and phi to be in the correct range ph->checkPhiTheta(p1); ph->checkPhiTheta(p2); } double t1 = p1[0], t2=p2[0]; double val1=(*this)(p1), val2=(*this)(p2); if (val1 > critical_value_) { if (val2 > critical_value_) { if ( val1 > safety_value_ && val2 > safety_value_) { if (val1 < val2) { minval = val1; tmin = t1; } else { minval = val2; tmin = t2; } } else minval = ph -> findMin(this, p1[0], p2[0], tmin, critical_value_) ; if (minval>critical_value_) { if (data) { /* EmissionTime */ if (data->time) *data->time=tmin; /* MinDistance */ if ((data->distance) && (*(data->distance)>minval) ) *data->distance=minval; /* FirstMinDist */ if (data->first_dmin) { if (!data->first_dmin_found) { if (*(data->first_dmin)>minval) *(data->first_dmin)=minval; else data->first_dmin_found=1; } } } return 0; } ph -> findValue(this, critical_value_, tmin, t2); } ph -> findValue(this, critical_value_, t2, t1); } else if (val2 > critical_value_) ph -> findValue(this, critical_value_, t1, t2); double cph[8] = { t2 }; ph -> getCoord(&t2, 1, cph+1, cph+2, cph+3, cph+4, cph+5, cph+6, cph+7); double delta=giveDelta(cph); double coh[8]; while (cph[0]>t1){ ph -> getCoord(cph, 1, cph+1, cph+2, cph+3, cph+4, cph+5, cph+6, cph+7); for (int ii=0;ii<4;ii++) coh[ii] = cph[ii]; getVelocity(coh, coh+4); //Next test to insure every point given to process //is inside objetc. Not obvious as the worldline between //t1 and t2 is not necessarily straight (at small r in particular) if ((*this)(coh). */ #include "GyotoUtils.h" #include "GyotoWorldline.h" #include "GyotoStar.h" #include "GyotoProperty.h" #include "GyotoPhoton.h" #include "GyotoPowerLawSpectrum.h" #include "GyotoBlackBodySpectrum.h" #include "GyotoFactoryMessenger.h" #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; /// Properties GYOTO_PROPERTY_START(Gyoto::Astrobj::Star, "UniformSphere following a time-like Gyoto::Worldline.") // Star only need to implement the Worldline interface on top of the // UniformSphere interface, which is trivially tone with this macro: GYOTO_WORLDLINE_PROPERTY_END(Star, UniformSphere::properties) // XML I/O // We also need to parse and write Position+Velocity in addition to // InitCoord, which is done by overriding setParameter(), setParameters() // and fillProperty() int Star::setParameter(std::string name, std::string content, std::string unit) { double coord[8]; if (name=="InitialCoordinate") { name="InitCoord"; return UniformSphere::setParameter(name, content, unit); } else if (name=="Position") { if (FactoryMessenger::parseArray(content, coord, 4) != 4) throwError("Worldline \"Position\" requires exactly 4 tokens"); if (init_vel_) { setInitCoord(coord, init_vel_); delete[] init_vel_; init_vel_=NULL; } else setPosition(coord); wait_pos_ = 0; } else if (name=="Velocity") { if (FactoryMessenger::parseArray(content, coord, 3) != 3) throwError("Worldline \"Velocity\" requires exactly 3 tokens"); if (wait_pos_) { if (init_vel_) delete [] init_vel_; init_vel_ = new double[3]; memcpy(init_vel_, coord, 3*sizeof(double)); } else setVelocity(coord); } else return UniformSphere::setParameter(name, content, unit); return 0; } #ifdef GYOTO_USE_XERCES void Star::fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const { if (p.name == "InitCoord") { if (imin_ <= imax_) { double coord[8]; getInitialCoord(coord); // For massive particule, express initial condition with 3-velocity double vel[3] = {coord[5]/coord[4], coord[6]/coord[4], coord[7]/coord[4]}; fmp -> setParameter ("Position", coord, 4); fmp -> setParameter ("Velocity", vel, 3); } return; } UniformSphere::fillProperty(fmp, p); } void Star::setParameters(FactoryMessenger* fmp) { wait_pos_ = 1; metric(fmp->metric()); UniformSphere::setParameters(fmp); wait_pos_ = 0; if (init_vel_) { delete[] init_vel_; init_vel_=NULL; throwError("Worldline::setParameters(): " "Velocity was found but not Position"); } } #endif /// Star::Star() : UniformSphere("Star"), Worldline() { # ifdef GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "done." << endl; # endif } Star::Star(SmartPointer met, double rad, double const pos[4], double const v[3]) : UniformSphere("Star"), Worldline() { if (debug()) { cerr << "DEBUG: Star Construction " << endl << " POS=[" << pos[0]; for (int i=1; i<4; ++i) cerr << ", " << pos[i]; cerr << "]\n VEL=[" << v[0] ; for (int i=1; i<3; ++i) cerr << ", " << v[i]; cerr << "]\n RADIUS=" << rad << endl; } metric(met); setInitCoord(pos, v); radius(rad); } Star::Star(const Star& orig) : UniformSphere(orig), Worldline(orig) { GYOTO_DEBUG << endl; // we have two distinct clones of the metric, not good... Worldline::metric(UniformSphere::metric()); } Star* Star::clone() const { return new Star(*this); } Star::~Star() { if (debug()) cerr << "DEBUG: Star::~Star()\n"; } string Star::className() const { return string("Star"); } string Star::className_l() const { return string("star"); } SmartPointer Star::metric() const { return gg_; } void Star::metric(SmartPointer gg) { UniformSphere::metric(gg); Worldline::metric(gg); } void Star::setInitialCondition(double const coord[8]) { if (!metric_) throwError("Please set metric before calling Star::setInitialCondition(double*)"); Worldline::setInitialCondition(metric_, coord, 0); } double Star::getMass() const {return 1. ;} void Star::getVelocity(double const pos[4], double vel[4]) { getCoord(pos, 1, NULL, NULL, NULL, vel, vel+1, vel+2, vel+3); } void Star::getCartesian(double const * const t, size_t const n, double* const x, double*const y, double*const z, double*const xp, double*const yp, double*const zp) { Worldline::getCartesian(t, n, x, y, z, xp, yp, zp); } double Star::rMax() { if (rmax_==DBL_MAX && i0_>=imin_ && i0_<=imax_) { size_t i; rmax_=x1_[i0_]; int ck=gg_->coordKind(); for (i=imin_;i<=imax_;++i) { if (x1_[i]>rmax_) rmax_=x1_[i]; if (ck==GYOTO_COORDKIND_CARTESIAN) { if (x2_[i]>rmax_) rmax_=x2_[i]; if (x3_[i]>rmax_) rmax_=x3_[i]; } } rmax_ *= 3.; } return rmax_; } Gyoto-1.2.0/lib/StarTrace.C000066400000000000000000000132131302352257300153570ustar00rootroot00000000000000/* Copyright 2013 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include "GyotoStarTrace.h" #include "GyotoProperty.h" #include "GyotoFactoryMessenger.h" #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; GYOTO_PROPERTY_START(StarTrace, "All the points that would be inside a Star at any date between TMin and TMax.") GYOTO_PROPERTY_DOUBLE(StarTrace, TMin, TMin, "Date defining start of the trace (geometrical_time).") GYOTO_PROPERTY_DOUBLE(StarTrace, TMax, TMax, "Date defining end of the trace (geometrical_time).") GYOTO_PROPERTY_END(StarTrace, Star::properties) StarTrace::StarTrace() : Star() { Generic::kind_="StarTrace"; xAllocateXYZ(); # ifdef GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "done." << endl; # endif } StarTrace::StarTrace(SmartPointer met, double rad, double const pos[4], double const v[3]) : Star(met, rad, pos, v) { Generic::kind_="StarTrace"; xAllocateXYZ(); computeXYZ(i0_); } StarTrace::StarTrace(const StarTrace& o) : Star(o), tmin_(o.tmin_), tmax_(o.tmax_) { Generic::kind_="StarTrace"; xAllocateXYZ(); size_t sz = get_nelements()*sizeof(double); memcpy(x_+imin_, o.x_+imin_, sz); memcpy(y_+imin_, o.y_+imin_, sz); memcpy(z_+imin_, o.z_+imin_, sz); } StarTrace::StarTrace(const Star& o, double tmin, double tmax) : Star(o), tmin_(tmin), tmax_(tmax) { Generic::kind_="StarTrace"; xAllocateXYZ(); computeXYZ(); } StarTrace* StarTrace::clone() const { return new StarTrace(*this); } StarTrace::~StarTrace() { GYOTO_DEBUG << endl; delete[] x_; delete[] y_; delete[] z_; } void StarTrace::xAllocateXYZ() { x_ = new double[x_size_]; y_ = new double[x_size_]; z_ = new double[x_size_]; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(x_size_); # endif } void StarTrace::xAllocate(size_t sz) { Star::xAllocate(sz); xAllocateXYZ(); } size_t StarTrace::xExpand(int dir) { xExpand(x_, dir); xExpand(y_, dir); xExpand(z_, dir); return Star::xExpand(dir); # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(x_size_); # endif } void StarTrace::computeXYZ(size_t i) { if (!gg_) throwError("Please set metric before calling computeXYZ"); switch (gg_->coordKind()) { case GYOTO_COORDKIND_SPHERICAL: x_[i]=x1_[i]*sin(x2_[i])*cos(x3_[i]); y_[i]=x1_[i]*sin(x2_[i])*sin(x3_[i]); z_[i]=x1_[i]*cos(x2_[i]); break; case GYOTO_COORDKIND_CARTESIAN: x_[i]=x1_[i]; y_[i]=x2_[i]; z_[i]=x3_[i]; break; default: Gyoto::throwError("in StarTrace::computeXYZ: Incompatible coordinate kind"); } } void StarTrace::computeXYZ() { size_t n; int coordkind = gg_ -> coordKind(); switch(coordkind) { case GYOTO_COORDKIND_SPHERICAL: for (n=imin_;n<=imax_;++n) { x_[n]=x1_[n]*sin(x2_[n])*cos(x3_[n]); y_[n]=x1_[n]*sin(x2_[n])*sin(x3_[n]); z_[n]=x1_[n]*cos(x2_[n]); } break; case GYOTO_COORDKIND_CARTESIAN: for (n=imin_;n<=imax_;++n) { x_[n]=x1_[n]; y_[n]=x2_[n]; z_[n]=x3_[n]; } break; default: Gyoto::throwError("in StarTrace::computeXYZ(): Incompatible coordinate kind"); } } void StarTrace::xStore(size_t ind, double const coord[8]) { Star::xStore(ind, coord); computeXYZ(ind); } void StarTrace::setInitCoord(const double coord[8], int dir) { Star::setInitCoord(coord, dir); computeXYZ(); } void StarTrace::metric(SmartPointer gg) { Star::metric(gg); computeXYZ(); } string StarTrace::className() const { return string("StarTrace"); } string StarTrace::className_l() const { return string("startrace"); } void StarTrace::setInitialCondition(double const coord[8]) { Star::setInitialCondition(coord); } double StarTrace::TMin() const { return tmin_; } void StarTrace::TMin(double t) { if (t>tmax_) { tmin_=tmax_; tmax_=t; } else tmin_=t; GYOTO_DEBUG_EXPR(tmin_); GYOTO_DEBUG_EXPR(tmax_); } double StarTrace::TMax() const { return tmax_; } void StarTrace::TMax(double t) { if (tcoordKind()) { case GYOTO_COORDKIND_SPHERICAL: x=coord[1]*sin(coord[2])*cos(coord[3]); y=coord[1]*sin(coord[2])*sin(coord[3]); z=coord[1]*cos(coord[2]); break; case GYOTO_COORDKIND_CARTESIAN: x=coord[1]; y=coord[2]; z=coord[3]; break; default: Gyoto::throwError("in StarTrace::operator()(): Incompatible coordinate kind"); } double tmp1; for (size_t i=imin_; i<=imax_; ++i) { if (x0_[i]tmax_) continue; tmp1 = x-x_[i]; tmp = tmp1 * tmp1; tmp1 = y-y_[i]; tmp += tmp1 * tmp1; tmp1 = z-z_[i]; tmp += tmp1 * tmp1; if (tmp < d2) d2=tmp; } return d2; } Gyoto-1.2.0/lib/StdPlug.C000066400000000000000000000105411302352257300150520ustar00rootroot00000000000000/* Copyright 2011-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ // include Metric headers #include "GyotoKerrBL.h" #include "GyotoKerrKS.h" #include "GyotoMinkowski.h" #include "GyotoChernSimons.h" #include "GyotoRezzollaZhidenko.h" // include Astrobj headers #include "GyotoComplexAstrobj.h" #include "GyotoStar.h" #include "GyotoStarTrace.h" #include "GyotoFixedStar.h" #include "GyotoInflateStar.h" #include "GyotoTorus.h" #include "GyotoDeformedTorus.h" #include "GyotoOscilTorus.h" #include "GyotoThinDisk.h" #include "GyotoPageThorneDisk.h" #include "GyotoThinDiskPL.h" #include "GyotoPolishDoughnut.h" #include "GyotoThinDiskIronLine.h" #include "GyotoEquatorialHotSpot.h" #include "GyotoPatternDisk.h" #include "GyotoPatternDiskBB.h" #include "GyotoDynamicalDisk.h" #include "GyotoDynamicalDiskBolometric.h" #include "GyotoDisk3D.h" #include "GyotoDynamicalDisk3D.h" #include "GyotoDirectionalDisk.h" // include Spectrum headers #include "GyotoPowerLawSpectrum.h" #include "GyotoBlackBodySpectrum.h" #include "GyotoThermalBremsstrahlungSpectrum.h" using namespace Gyoto; extern "C" void __GyotostdplugInit() { // Register Metrics Metric::Register("KerrBL", &(Metric::Subcontractor)); Metric::Register("KerrKS", &(Metric::Subcontractor)); Metric::Register("Minkowski", &(Metric::Subcontractor)); Metric::Register("ChernSimons", &(Metric::Subcontractor)); Metric::Register("RezzollaZhidenko", &(Metric::Subcontractor)); // Register Astrobjs Astrobj::Register("Complex", &(Astrobj::Subcontractor)); Astrobj::Register("Star", &(Astrobj::Subcontractor)); Astrobj::Register("StarTrace", &(Astrobj::Subcontractor)); Astrobj::Register("FixedStar", &(Astrobj::Subcontractor)); Astrobj::Register("InflateStar", &(Astrobj::Subcontractor)); Astrobj::Register("Torus", &(Astrobj::Subcontractor)); Astrobj::Register("OscilTorus", &(Astrobj::Subcontractor)); Astrobj::Register("DeformedTorus", &(Astrobj::Subcontractor)); Astrobj::Register("ThinDisk", &(Astrobj::Subcontractor)); Astrobj::Register("PageThorneDisk", &(Astrobj::Subcontractor)); Astrobj::Register("ThinDiskPL", &(Astrobj::Subcontractor)); Astrobj::Register("PolishDoughnut", &(Astrobj::Subcontractor)); Astrobj::Register("ThinDiskIronLine", &(Astrobj::Subcontractor)); Astrobj::Register("EquatorialHotSpot", &(Astrobj::Subcontractor)); Astrobj::Register("PatternDisk", &(Astrobj::Subcontractor)); Astrobj::Register("PatternDiskBB", &(Astrobj::Subcontractor)); Astrobj::Register("DynamicalDisk", &(Astrobj::Subcontractor)); Astrobj::Register("DynamicalDiskBolometric", &(Astrobj::Subcontractor)); Astrobj::Register("Disk3D", &(Astrobj::Subcontractor)); Astrobj::Register("DynamicalDisk3D", &(Astrobj::Subcontractor)); Astrobj::Register("DirectionalDisk", &(Astrobj::Subcontractor)); // Register Spectra Spectrum::Register("PowerLaw", &(Spectrum::Subcontractor)); Spectrum::Register("BlackBody", &(Spectrum::Subcontractor)); Spectrum::Register("ThermalBremsstrahlung", &(Spectrum::Subcontractor)); } Gyoto-1.2.0/lib/ThermalBremsstrahlungSpectrum.C000066400000000000000000000062361302352257300215360ustar00rootroot00000000000000/* Copyright 2014 Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoThermalBremsstrahlungSpectrum.h" #include "GyotoDefs.h" #include #include /* atof */ #ifdef GYOTO_USE_XERCES #include "GyotoFactory.h" #include "GyotoFactoryMessenger.h" #endif using namespace Gyoto; /// Properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(Spectrum::ThermalBremsstrahlung) GYOTO_PROPERTY_DOUBLE(Spectrum::ThermalBremsstrahlung, Temperature, temperature) GYOTO_PROPERTY_END(Spectrum::ThermalBremsstrahlung, Generic::properties) /// Spectrum::ThermalBremsstrahlung::ThermalBremsstrahlung() : Spectrum::Generic("ThermalBremsstrahlung"), spectrumBB_(NULL), T_(10000.), massdensityCGS_(0.) { Tm1_=1./T_; Tm05_=sqrt(Tm1_); // This awful constant is the constant part of the thermal brems j_nu cst_ = 1/(4.*M_PI) *(pow(2.,5)*M_PI*pow(GYOTO_ELEMENTARY_CHARGE_CGS,6)) /(3.*GYOTO_ELECTRON_MASS_CGS*pow(GYOTO_C_CGS,3)) *sqrt(2*M_PI/(3.*GYOTO_BOLTZMANN_CGS*GYOTO_ELECTRON_MASS_CGS)) *1./pow(GYOTO_ATOMIC_MASS_UNIT_CGS,2); // A BB spectrum is needed to compute alpha_nu=j_nu/BB spectrumBB_ = new Spectrum::BlackBody(); } double Spectrum::ThermalBremsstrahlung::temperature() const { return T_; } void Spectrum::ThermalBremsstrahlung::temperature(double tt) { T_ = tt; Tm1_=1./T_; Tm05_=sqrt(Tm1_); spectrumBB_->temperature(T_); } double Spectrum::ThermalBremsstrahlung::massdensityCGS() const { return massdensityCGS_; } void Spectrum::ThermalBremsstrahlung::massdensityCGS(double rho) { massdensityCGS_ = rho; } Spectrum::ThermalBremsstrahlung * Spectrum::ThermalBremsstrahlung::clone() const { return new Spectrum::ThermalBremsstrahlung(*this); } double Spectrum::ThermalBremsstrahlung::operator()(double nu) const { throwError("In ThermalBrems: " "Bremsstrahlung emission not defined for optically thick case"); return 0.; } double Spectrum::ThermalBremsstrahlung::operator()(double nu, double , double ds) const{ double dsCGS = ds*100.; // ds should be given in SI // Returns intensity increment in SI: return jnuCGS(nu)*dsCGS*exp(-alphanuCGS(nu)*dsCGS)*GYOTO_INU_CGS_TO_SI; } double Spectrum::ThermalBremsstrahlung::jnuCGS(double nu) const{ return cst_*Tm05_*massdensityCGS_*massdensityCGS_ *exp(-GYOTO_PLANCK_OVER_BOLTZMANN*nu*Tm1_); } double Spectrum::ThermalBremsstrahlung::alphanuCGS(double nu) const{ double BB=(*spectrumBB_)(nu)/GYOTO_INU_CGS_TO_SI; // B_nu in cgs if (BB==0.){ throwError("In ThermalBrems: " "bad temperature"); } // Kirchhoff's law: return jnuCGS(nu)/BB; } Gyoto-1.2.0/lib/ThinDisk.C000066400000000000000000000150671302352257300152150ustar00rootroot00000000000000/* Copyright 2011-2012, 2014-2015 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ /* The subcontractor is registered by the stdplug plugin */ #define GYOTO_PLUGIN stdplug #include "GyotoPhoton.h" #include "GyotoThinDisk.h" #include "GyotoProperty.h" #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include #include #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; GYOTO_PROPERTY_START(ThinDisk, "Geometrically thin disk.") GYOTO_PROPERTY_DOUBLE_UNIT(ThinDisk, InnerRadius, innerRadius, "Inner radius (geometrical units, 0).") GYOTO_PROPERTY_DOUBLE_UNIT(ThinDisk, OuterRadius, outerRadius, "Outer radius (geometrical units, DBL_MAX).") GYOTO_PROPERTY_DOUBLE_UNIT(ThinDisk, Thickness, thickness, "Geometrical thickness (geometrical units, 1e-3, for optical depth).") GYOTO_PROPERTY_BOOL(ThinDisk, CoRotating, CounterRotating, corotating, "Direction of rotation.") GYOTO_PROPERTY_END(ThinDisk, Generic::properties) ThinDisk::ThinDisk(std::string kin) : Generic(kin), rin_(0.), rout_(DBL_MAX), thickness_(1e-3), dir_(1) { GYOTO_DEBUG << "ThinDisk Construction" << endl; } ThinDisk::ThinDisk(const ThinDisk& o) : Generic(o), Functor::Double_constDoubleArray(o), rin_(o.rin_), rout_(o.rout_), thickness_(o.thickness_), dir_(o.dir_) { GYOTO_DEBUG << "ThinDisk Copy" << endl; } ThinDisk* ThinDisk::clone() const { return new ThinDisk(*this); } ThinDisk::~ThinDisk() { GYOTO_DEBUG << "ThinDisk Destruction" << endl; } double ThinDisk::innerRadius() const { return rin_; } double ThinDisk::innerRadius(string const &unit) const { return Units::FromGeometrical(innerRadius(), unit, gg_); } void ThinDisk::innerRadius(double r) { rin_ = r; } void ThinDisk::innerRadius(double r, string const &unit) { innerRadius(Units::ToGeometrical(r, unit, gg_)); } double ThinDisk::outerRadius() const { return rout_;} double ThinDisk::outerRadius(string const &unit) const { return Units::FromGeometrical(outerRadius(), unit, gg_); } void ThinDisk::outerRadius(double r) { rout_ = r; } void ThinDisk::outerRadius(double r, string const &unit) { outerRadius(Units::ToGeometrical(r, unit, gg_)); } double ThinDisk::thickness() const { return thickness_;} double ThinDisk::thickness(string const &unit) const { return Units::FromGeometrical(thickness(), unit, gg_); } void ThinDisk::thickness(double h) { thickness_ = h; } void ThinDisk::thickness(double h, string const &unit) { thickness(Units::ToGeometrical(h, unit, gg_)); } int ThinDisk::dir() const { return dir_; } void ThinDisk::dir(int dir) { dir_ = dir; } void ThinDisk::corotating(bool t) { dir_ = (t?1:-1);} bool ThinDisk::corotating() const { return dir_ == 1; } double ThinDisk::operator()(double const coord[4]) { double theta; switch (gg_ -> coordKind()) { case GYOTO_COORDKIND_SPHERICAL: theta = coord[2]; theta -= M_PI*0.5; while (theta < -M_PI) theta += 2.*M_PI; while (theta >= M_PI) theta -= 2.*M_PI; return theta; case GYOTO_COORDKIND_CARTESIAN: return coord[3]; default: throwError("ThinDisk::Impact(): unknown COORDKIND"); return 0.; } } double ThinDisk::projectedRadius(double const coord[4]) const { switch (gg_ -> coordKind()) { case GYOTO_COORDKIND_SPHERICAL: return coord[1]; case GYOTO_COORDKIND_CARTESIAN: return sqrt(coord[1]*coord[1]+coord[2]*coord[2]); default: throwError("ThinDisk::projectedRadius(): unknown COORDKIND"); return 0.; } } double ThinDisk::sphericalPhi(double const coord[4]) const { switch (gg_ -> coordKind()) { case GYOTO_COORDKIND_SPHERICAL: return coord[3]; case GYOTO_COORDKIND_CARTESIAN: return atan2(coord[2], coord[1]); default: throwError("ThinDisk::sphericalPhi(): unknown COORDKIND"); return 0.; } } void ThinDisk::getVelocity(double const pos[4], double vel[4]) { gg_ -> circularVelocity(pos, vel, dir_); } int ThinDisk::Impact(Photon *ph, size_t index, Astrobj::Properties *data) { double coord_ph_hit[8], coord_obj_hit[8]; double rcross; double coord1[8], coord2[8]; double dt=0.; ph->getCoord(index, coord1); ph->getCoord(index+1, coord2); if (gg_ -> coordKind() == GYOTO_COORDKIND_SPHERICAL){ //Allows theta and phi to be in the correct range ph->checkPhiTheta(coord1); ph->checkPhiTheta(coord2); } if (gg_ -> coordKind() == GYOTO_COORDKIND_SPHERICAL && fabs(coord2[2]-coord1[2]) > M_PI) throwError ("ThinDisk::Impact: fishy heuristic"); double h1=operator()(coord1), h2=operator()(coord2); double r1=projectedRadius(coord1), r2=projectedRadius(coord2); if ( 0.5*r1 > rout_ && 0.5*r2 > rout_) return 0; if ( h1 == h2 && h2 != 0 ) return 0; if ( (h1 > 0.) == (h2 > 0.) && h1 != 0. && h2 != 0. ) return 0; double tlow, thigh; if (h1 < h2) { tlow = coord1[0]; thigh = coord2[0]; } else { tlow = coord2[0]; thigh = coord1[0]; } ph -> findValue(this, 0., tlow, thigh); coord_ph_hit[0]=thigh; ph -> getCoord(coord_ph_hit, 1, coord_ph_hit+1, coord_ph_hit+2, coord_ph_hit+3, coord_ph_hit+4, coord_ph_hit+5, coord_ph_hit+6, coord_ph_hit+7); if ((rcross=projectedRadius(coord_ph_hit)) < rin_ || rcross > rout_) return 0; for (int i=0;i<4;i++) coord_obj_hit[i]=coord_ph_hit[i]; getVelocity(coord_obj_hit, coord_obj_hit+4); if (flag_radtransf_) { double vel[3]; gg_->cartesianVelocity(coord_ph_hit, vel); dt = (vel[2]==0.) ? (coord2[0] - coord1[0]) : sqrt(1.+(vel[0]*vel[0]+vel[1]*vel[1])/(vel[2]*vel[2]))*thickness_; } if (data) { //Store impact time in user1 if (data->user1) *data->user1=coord_ph_hit[0]; if (data->user2) *data->user2=coord_ph_hit[1]; if (data->user3) *data->user3=coord_ph_hit[3]; } processHitQuantities(ph, coord_ph_hit, coord_obj_hit, dt, data); return 1; } Gyoto-1.2.0/lib/ThinDiskIronLine.C000066400000000000000000000071771302352257300166600ustar00rootroot00000000000000/* Copyright 2013 Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoThinDiskIronLine.h" #include "GyotoConverters.h" #include #include #include #include using namespace Gyoto; using namespace Gyoto::Astrobj; using namespace std; /// Properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(ThinDiskIronLine) GYOTO_PROPERTY_DOUBLE(ThinDiskIronLine, PowerLawIndex, PowerLawIndex) GYOTO_PROPERTY_DOUBLE_UNIT(ThinDiskIronLine, LineFreq, LineFreq) GYOTO_PROPERTY_DOUBLE_UNIT(ThinDiskIronLine, CutRadius, CutRadius) GYOTO_PROPERTY_END(ThinDiskIronLine, ThinDisk::properties) // ACCESSORS GYOTO_PROPERTY_ACCESSORS(ThinDiskIronLine, double, plindex_, PowerLawIndex) GYOTO_PROPERTY_ACCESSORS(ThinDiskIronLine, double, cutradius_, CutRadius) // Define the accessors with unit manually void ThinDiskIronLine::CutRadius(double v, std::string const &u) { CutRadius(Units::ToGeometrical(v, u, gg_)); } double ThinDiskIronLine::CutRadius(std::string const &u)const{ return Units::FromGeometrical(CutRadius(), u, gg_); } // The following is not completely standard, let's implement it manually: #define ___local_f 2.417989579752276e+17 //(1e3*1.60217657e-19/GYOTO_PLANCK); void ThinDiskIronLine::LineFreq(double v) {linefreq_=v*___local_f;} double ThinDiskIronLine::LineFreq()const{return linefreq_/___local_f;} void ThinDiskIronLine::LineFreq(double v, std::string const &u) { LineFreq(Units::ToHerz(v, u)); } double ThinDiskIronLine::LineFreq(std::string const &u)const{ return Units::FromHerz(LineFreq(), u); } #undef ___local_f /// Gyoto::Astrobj::ThinDiskIronLine::ThinDiskIronLine() : ThinDisk("ThinDiskIronLine"), plindex_(0.), linefreq_(0.), cutradius_(-DBL_MAX) { GYOTO_DEBUG << "Building ThinDiskIronLine" << endl; } Gyoto::Astrobj::ThinDiskIronLine::ThinDiskIronLine(const ThinDiskIronLine &o) : ThinDisk(o), plindex_(o.plindex_), linefreq_(o.linefreq_), cutradius_(o.cutradius_) { GYOTO_DEBUG << "Copying ThinDiskIronLine" << endl; } ThinDiskIronLine * ThinDiskIronLine::clone() const { return new ThinDiskIronLine(*this); } Gyoto::Astrobj::ThinDiskIronLine::~ThinDiskIronLine() { GYOTO_DEBUG << "Destroying dummy ThinDiskIronLine" << endl; } double ThinDiskIronLine::emission(double nu_em, double /* dsem */, double *, double coord_obj[8]) const{ double rr=projectedRadius(coord_obj); if (rrdfreq) return 0.; double Iem = pow(rr,-plindex_); return Iem; } void ThinDiskIronLine::getVelocity(double const pos[4], double vel[4]) { if (projectedRadius(pos)SysPrimeToTdot(pos, vel+1); // leads to v>c if a>0... }else{ ThinDisk::getVelocity(pos,vel); } } Gyoto-1.2.0/lib/ThinDiskPL.C000066400000000000000000000072721302352257300154500ustar00rootroot00000000000000/* Copyright 2012, 2014, 2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoPhoton.h" #include "GyotoThinDiskPL.h" #include "GyotoProperty.h" #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoKerrBL.h" #include "GyotoKerrKS.h" #include #include #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; GYOTO_PROPERTY_START(ThinDiskPL) GYOTO_PROPERTY_DOUBLE(ThinDiskPL, PLSlope, PLSlope) GYOTO_PROPERTY_DOUBLE(ThinDiskPL, PLRho, PLRho) GYOTO_PROPERTY_DOUBLE(ThinDiskPL, PLRadRef, PLRadRef) GYOTO_PROPERTY_END(ThinDiskPL, ThinDisk::properties) // ACCESSORS void ThinDiskPL::PLSlope(double v) {PLSlope_=v;} double ThinDiskPL::PLSlope()const{return PLSlope_;} void ThinDiskPL::PLRho(double v) {PLRho_=v;} double ThinDiskPL::PLRho()const{return PLRho_;} void ThinDiskPL::PLRadRef(double v) {PLRadRef_=v;} double ThinDiskPL::PLRadRef()const{return PLRadRef_;} // ThinDiskPL::ThinDiskPL() : ThinDisk("ThinDiskPL"), PLSlope_(0.), PLRho_(1.), PLRadRef_(1.), spectrumBB_(NULL) { if (debug()) cerr << "DEBUG: ThinDiskPL Construction" << endl; spectrumBB_ = new Spectrum::BlackBody(); } ThinDiskPL::ThinDiskPL(const ThinDiskPL& o) : ThinDisk(o), PLSlope_(o.PLSlope_), PLRho_(o.PLRho_), PLRadRef_(o.PLRadRef_), spectrumBB_(NULL) { if (o.gg_()) gg_=o.gg_->clone(); if (o.spectrumBB_()) spectrumBB_=o.spectrumBB_->clone(); Generic::gg_=gg_; } ThinDiskPL* ThinDiskPL::clone() const { return new ThinDiskPL(*this); } bool ThinDiskPL::isThreadSafe() const { return ThinDisk::isThreadSafe() && (!spectrumBB_ || spectrumBB_ -> isThreadSafe()); } ThinDiskPL::~ThinDiskPL() { if (debug()) cerr << "DEBUG: ThinDiskPL Destruction" << endl; } double ThinDiskPL::emission(double nu, double, double *, double coord_obj[8]) const{ //cout << "param= " << PLSlope_ << " " << PLRho_ << " " << PLRadRef_ // << " " << getInnerRadius() << " " << getOuterRadius() << endl; double Iem = emissionBB(nu,coord_obj); /* Only BB emission so far, other ways of computing emission from rho can be added */ /*if (flag_radtransf_) throwError("In ThinDiskPL::emission() " "optically thin integration not provided");*/ return Iem; } double ThinDiskPL::emissionBB(double nu, double co[8]) const{ double rcur=projectedRadius(co); double rho_si = PLRho_*pow(rcur/PLRadRef_,PLSlope_); //Assuming: pressure = kappa*(mass density)^gamma, gamma=5/3 (eq of state) // and: pressure = (mass density)*R/Mm*T (Mm = molar mass) double gamma=5./3.; double Mm=6e-4;//Navogadro*Munit/gamma double kappa=3e10;//pressure coef: p = kappa*rho^gamma, rho=mass density double cs2=kappa*gamma*pow(rho_si,gamma-1.); double TT=Mm/GYOTO_GAS_CST*cs2;//Temperature in SI //cout << "TT after rl= " << TT << endl; //cout << "r,rho,T= " << rcross << " " << rho_si << " " << TT << endl; spectrumBB_->temperature(TT); return (*spectrumBB_)(nu); } Gyoto-1.2.0/lib/Torus.C000066400000000000000000000115711302352257300146100ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoTorus.h" #include "GyotoStandardAstrobj.h" #include "GyotoUtils.h" #include "GyotoBlackBodySpectrum.h" #include "GyotoPowerLawSpectrum.h" #include "GyotoMetric.h" #include "GyotoProperty.h" #include "GyotoFactoryMessenger.h" #include #include #include #include using namespace Gyoto; using namespace Gyoto::Astrobj; using namespace std; GYOTO_PROPERTY_START(Torus, "Geometrical Torus in circular rotation.") GYOTO_PROPERTY_SPECTRUM(Torus, Spectrum, spectrum, "Emission law.") GYOTO_PROPERTY_SPECTRUM(Torus, Opacity, opacity, "Absorption law.") GYOTO_PROPERTY_DOUBLE(Torus, SmallRadius, smallRadius, "Minor radius, radius of a meridian circle.") GYOTO_PROPERTY_DOUBLE(Torus, LargeRadius, largeRadius, "Major radius, distance from centre of tube to centre of torus. ") GYOTO_PROPERTY_END(Torus, Standard::properties) Torus::Torus() : Standard("Torus"), c_(3.5) { critical_value_ = 0.25; // 0.5*0.5 safety_value_ = 0.3; spectrum_ = new Spectrum::BlackBody(1000000.); opacity_ = new Spectrum::PowerLaw(0., 1.); } Torus::Torus(const Torus& o) : Standard(o), c_(o.c_), spectrum_(o.spectrum_()?o.spectrum_->clone():NULL), opacity_(o.opacity_()?o.opacity_->clone():NULL) {} Torus::~Torus() {} Torus* Torus::clone() const { return new Torus(*this); } double Torus::largeRadius() const { return c_; } double Torus::largeRadius(string unit) const { return Units::FromGeometrical(largeRadius(), unit, gg_); } double Torus::smallRadius() const { return sqrt(critical_value_); } double Torus::smallRadius(string unit) const { return Units::FromGeometrical(smallRadius(), unit, gg_); } void Torus::largeRadius(double c) { c_ = c; } void Torus::largeRadius(double c, string unit) { largeRadius(Units::ToGeometrical(c, unit, gg_)); } void Torus::smallRadius(double a) { critical_value_ = a*a; safety_value_ = critical_value_ * 1.1; } void Torus::smallRadius(double c, string unit) { smallRadius(Units::ToGeometrical(c, unit, gg_)); } SmartPointer Torus::spectrum() const { return spectrum_; } void Torus::spectrum(SmartPointer sp) {spectrum_=sp;} SmartPointer Torus::opacity() const { return opacity_; } void Torus::opacity(SmartPointer sp) {opacity_=sp;} double Torus::rMax() { if (rmax_==DBL_MAX) { rmax_ = 3.*(c_+sqrt(critical_value_)); } return rmax_ ; } double Torus::emission(double nu_em, double dsem, double *, double *) const { if (flag_radtransf_) return (*spectrum_)(nu_em, (*opacity_)(nu_em), dsem); return (*spectrum_)(nu_em); } double Torus::transmission(double nuem, double dsem, double*) const { if (!flag_radtransf_) return 0.; double opac = (*opacity_)(nuem); if (debug()) cerr << "DEBUG: Torus::transmission(nuem="<integrate(nu1, nu2, opacity_(), dsem); return spectrum_->integrate(nu1, nu2); } double Torus::operator()(double const pos[4]) { double drproj, h; switch (gg_->coordKind()) { case GYOTO_COORDKIND_SPHERICAL: drproj = pos[1]*sin(pos[2])-c_; h = pos[1]*cos(pos[2]); break; case GYOTO_COORDKIND_CARTESIAN: h = pos[3]; drproj = sqrt(pos[1]*pos[1]+pos[2]*pos[2])-c_; break; default: throwError("Torus::distance(): unknown coordinate system kind"); h=0.,drproj=0.; } return drproj*drproj + h*h; } double Torus::deltaMax(double * coord) { double d2 = (*this)(coord); if (d2 coordKind()) { case GYOTO_COORDKIND_CARTESIAN: pos2[1] = pos[1]; pos2[2] = pos[2]; pos2[3] = 0.; break; case GYOTO_COORDKIND_SPHERICAL: pos2[1] = pos[1] * sin(pos[2]); pos2[2] = M_PI*0.5; pos2[3] = pos[3]; break; default: throwError("Torus::getVelocity(): unknown coordkind"); } gg_ -> circularVelocity(pos2, vel); } Gyoto-1.2.0/lib/UniformSpectrometer.C000066400000000000000000000204361302352257300175100ustar00rootroot00000000000000/* Copyright 2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUniformSpectrometer.h" #include "GyotoUtils.h" #include "GyotoFactoryMessenger.h" #include "GyotoConverters.h" #include "GyotoMetric.h" #include #include #include #include #include #include #include // DBL_MAX using namespace Gyoto; using namespace Gyoto::Spectrometer; using namespace std; /// Properties #include "GyotoProperty.h" GYOTO_PROPERTY_START(Uniform, "Spectrometer with uniform spacing (log or linear, wave. of freq.).") GYOTO_PROPERTY_VECTOR_DOUBLE_UNIT(Uniform, Band, band, "Spectral band (default unit: Hz, m, Log(Hz) or Log(m)).") GYOTO_PROPERTY_STRING(Uniform, Kind, kind, "\"freq\", \"wave\", \"freqlog\" or \"wavelog\".") GYOTO_PROPERTY_SIZE_T(Uniform, NSamples, nSamples, "Number of spectral channels.") GYOTO_PROPERTY_END(Uniform, Generic::properties) void Uniform::fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const { if (p.type == Property::size_t_t && p.name == "NSamples") fmp -> setSelfAttribute("nsamples", nsamples_); else if (p.type == Property::string_t && p.name == "Kind") ; // do nothing else if (p.type == Property::vector_double_t && p.name == "Band") { ostringstream ss; ss << setprecision(GYOTO_PREC) << setw(GYOTO_WIDTH) << band_[0] << " " << setprecision(GYOTO_PREC) << setw(GYOTO_WIDTH) << band_[1]; fmp -> setFullContent(ss.str()); } else throwError("Unsupported Property in Spectrometer::Uniform"); } #ifdef GYOTO_USE_XERCES void Gyoto::Spectrometer::Uniform::setParameters(FactoryMessenger* fmp) { string skind = fmp -> getSelfAttribute( "kind" ); size_t nsamples = atol( fmp -> getSelfAttribute( "nsamples" ) . c_str () ); string unit = fmp -> getSelfAttribute( "unit" ); string content = fmp -> getFullContent(); double band[2]; if (FactoryMessenger::parseArray(content, band, 2) != 2) throwError("Spectromecter::Uniform requires exactly 2 tokens"); Uniform::band(band, unit, skind); nSamples(nsamples); } #endif /// Uniform::Uniform() : Generic(WaveKind) { band_[0]=0.; band_[1]=0.; } Uniform::Uniform(size_t nsamples, double band_min, double band_max, kind_t kin) : Generic(kin) { nsamples_=nsamples; band_[0]=band_min; band_[1]=band_max; if (nsamples && kin) reset_(); } Uniform::Uniform(const Uniform& o) : Generic(o) { band_[0]=o.band_[0]; band_[1]=o.band_[1]; reset_(); } Generic* Uniform::clone() const { return new Uniform(*this); } Uniform::~Uniform() { } void Uniform::reset_() { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif if (boundaries_) delete [] boundaries_; if (chanind_) delete [] chanind_; if (midpoints_) delete [] midpoints_; if (widths_) delete [] widths_; boundaries_ = NULL; chanind_ = NULL; midpoints_ = NULL; widths_ = NULL; GYOTO_DEBUG << endl; if (!nsamples_ || !kindid_) return; boundaries_ = new double[nsamples_+1]; chanind_ = new size_t[nsamples_*2]; midpoints_ = new double[nsamples_]; widths_ = new double[nsamples_]; size_t i=0 ; # if GYOTO_DEBUG_ENABLED GYOTO_IF_DEBUG; GYOTO_DEBUG_EXPR(band_); GYOTO_DEBUG_ARRAY(band_, 2); GYOTO_DEBUG_EXPR(kindid_); GYOTO_ENDIF_DEBUG # endif for (i=0; i<=nsamples_; ++i){ # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "boundaries_[" <const &vnu) { if (vnu.size() != 2) throwError("Band needs exactly two elements"); double nu[] = {vnu[0], vnu[1]}; band(nu); } void Uniform::band(std::vectorconst &vnu, std::string const &u) { if (vnu.size() != 2) throwError("Band needs exactly two elements"); double nu[] = {vnu[0], vnu[1]}; band(nu, u); } std::vector Uniform::band() const { std::vector vnu(2, band_[0]); vnu[1]=band_[1]; return vnu; } std::vector Uniform::band(std::string const &unit) const { std::vector vnu = band(); if (kindid_== FreqKind) { if (unit != "" && unit != "Hz") for (size_t i=0; i<=1; ++i) vnu[i] = Units::FromHerz(vnu[i], unit); } else if (kindid_== FreqLogKind) { if (unit != "" && unit != "Hz") for (size_t i=0; i<=1; ++i) vnu[i] = pow(10., Units::FromHerz(log10(vnu[i]), unit)); } else if (kindid_== WaveKind) { if (unit != "" && unit != "m") for (size_t i=0; i<=1; ++i) vnu[i] = Units::FromMeters(vnu[i], unit); } else if (kindid_ == WaveLogKind) { if (unit != "" && unit != "m") for (size_t i=0; i<=1; ++i) vnu[i] = pow(10., Units::FromMeters(log10(vnu[i]), unit)); } else { throwError("Uniform::band(string const &unit) at loss: " "please specify Spectrometer kind"); } return vnu; } void Uniform::band(double nu[2]) { band_[0] = nu[0]; band_[1] = nu[1]; reset_(); } void Uniform::band(double nu[2], string const &unit, string const &skind) { if (skind != "") kind(skind); band(nu, unit); } void Uniform::band(double nu[2], string const &unit) { double band[2] = {nu[0], nu[1]}; if (kindid_== FreqKind) { if (unit != "" && unit != "Hz") for (size_t i=0; i<=1; ++i) band[i] = Units::ToHerz(nu[i], unit); } else if (kindid_== FreqLogKind) { if (unit != "" && unit != "Hz") for (size_t i=0; i<=1; ++i) band[i] = log10(Units::ToHerz(pow(10., nu[i]), unit)); } else if (kindid_== WaveKind) { if (unit != "" && unit != "m") for (size_t i=0; i<=1; ++i) band[i] = Units::ToMeters(nu[i], unit); } else if (kindid_ == WaveLogKind) { if (unit != "" && unit != "m") for (size_t i=0; i<=1; ++i) band[i] = log10(Units::ToMeters(pow(10., nu[i]), unit)); } else { throwError("Uniform::band(double, string) at loss: " "please specify Spectrometer kind"); } Uniform::band(band); } double const * Uniform::getBand() const { return band_; } char const * const Uniform::WaveKind = "wave"; char const * const Uniform::WaveLogKind = "wavelog"; char const * const Uniform::FreqKind = "freq"; char const * const Uniform::FreqLogKind = "freqlog"; Gyoto-1.2.0/lib/UniformSphere.C000066400000000000000000000212621302352257300162600ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include "GyotoUniformSphere.h" #include "GyotoPhoton.h" #include "GyotoPowerLawSpectrum.h" #include "GyotoBlackBodySpectrum.h" #include "GyotoFactoryMessenger.h" #include "GyotoConverters.h" #include "GyotoProperty.h" #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; GYOTO_PROPERTY_START(Gyoto::Astrobj::UniformSphere, "Coordinate sphere with uniform emission and absorption.") GYOTO_PROPERTY_SPECTRUM(UniformSphere, Spectrum, spectrum, "Emission law.") GYOTO_PROPERTY_SPECTRUM(UniformSphere,Opacity, opacity, "Absorption law.") GYOTO_PROPERTY_BOOL(UniformSphere, IsotropicEmittedIntensity, TrueEmittedIntensity, isotropic, "If true, then emission just returns 1.") GYOTO_PROPERTY_DOUBLE(UniformSphere, DeltaMaxOverDistance, deltaMaxOverDistance, "Maximum value of step/distance from centre of sphere for photons.") GYOTO_PROPERTY_DOUBLE(UniformSphere, DeltaMaxOverRadius, deltaMaxOverRadius, "Maximum value of step/radius of sphere for photons.") GYOTO_PROPERTY_DOUBLE(UniformSphere, Alpha, alpha) GYOTO_PROPERTY_DOUBLE_UNIT(UniformSphere, Radius, radius, "Sphere radius (geometrical units).") GYOTO_PROPERTY_END(UniformSphere, Standard::properties) #define GYOTO_USPH_DELTAMAX_OVER_RAD 0.1 #define GYOTO_USPH_DELTAMAX_OVER_DST 0.1 UniformSphere::UniformSphere(string kin) : Astrobj::Standard(kin), // radius_(0.), isotropic_(0), alpha_(1), spectrum_(NULL), opacity_(NULL), dltmor_(GYOTO_USPH_DELTAMAX_OVER_RAD), dltmod_(GYOTO_USPH_DELTAMAX_OVER_DST) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif // also initial safety_value_ etc. radius(0.); spectrum(new Spectrum::BlackBody()); opacity(new Spectrum::PowerLaw(0., 1.)); opticallyThin(false); } UniformSphere::UniformSphere(string kin, SmartPointer met, double rad) : Astrobj::Standard(kin), //radius_(rad), isotropic_(0), alpha_(1), spectrum_(NULL), opacity_(NULL), dltmor_(GYOTO_USPH_DELTAMAX_OVER_RAD), dltmod_(GYOTO_USPH_DELTAMAX_OVER_DST) { // also initialize safety_value_ etc. radius(rad); spectrum(new Spectrum::BlackBody()); opacity(new Spectrum::PowerLaw(0., 1.)); opticallyThin(false); gg_=met; } UniformSphere::UniformSphere(const UniformSphere& orig) : Astrobj::Standard(orig), radius_(orig.radius_), isotropic_(orig.isotropic_), alpha_(orig.alpha_), spectrum_(NULL), opacity_(NULL), dltmor_(orig.dltmor_), dltmod_(orig.dltmod_) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif if (orig.spectrum_()) spectrum_=orig.spectrum_->clone(); if (orig.opacity_()) opacity_=orig.opacity_->clone(); } UniformSphere::~UniformSphere() { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif } string UniformSphere::className() const { return string("UniformSphere"); } string UniformSphere::className_l() const { return string("uniformsphere"); } SmartPointer UniformSphere::spectrum() const { return spectrum_; } void UniformSphere::spectrum(SmartPointer sp) {spectrum_=sp;} SmartPointer UniformSphere::opacity() const { return opacity_; } void UniformSphere::opacity(SmartPointer sp) { opticallyThin(sp); opacity_=sp; } double UniformSphere::operator()(double const coord[4]) { double coord_st[4] = {coord[0]}; double coord_ph[4] = {coord[0]}; double sintheta; getCartesian(coord_st, 1, coord_st+1, coord_st+2, coord_st+3); switch (gg_->coordKind()) { case GYOTO_COORDKIND_CARTESIAN: memcpy(coord_ph+1, coord+1, 3*sizeof(double)); break; case GYOTO_COORDKIND_SPHERICAL: coord_ph[1] = coord[1] * (sintheta=sin(coord[2])) * cos(coord[3]); coord_ph[2] = coord[1] * sintheta * sin(coord[3]); coord_ph[3] = coord[1] * cos(coord[2]) ; break; default: throwError("unsupported coordkind"); } double dx = coord_ph[1]-coord_st[1]; double dy = coord_ph[2]-coord_st[2]; double dz = coord_ph[3]-coord_st[3]; return dx*dx + dy*dy + dz*dz; } double UniformSphere::deltaMax(double * coord) { double r; switch (gg_->coordKind()) { case GYOTO_COORDKIND_CARTESIAN: r=sqrt(coord[1]*coord[1]+coord[2]*coord[2]+coord[3]*coord[3]); break; case GYOTO_COORDKIND_SPHERICAL: r=coord[1]; break; default: r=0.; throwError("unsupported coordkind"); } if (rmax_!=DBL_MAX && r>rmax_) return r*0.5; return max(dltmod_*sqrt((*this)(coord)), dltmor_*radius_); } double UniformSphere::emission(double nu_em, double dsem, double *, double *) const { if (isotropic_){ if (flag_radtransf_){ return dsem; }else{ return 1.; } } if (flag_radtransf_) return (*spectrum_)(nu_em, (*opacity_)(nu_em), dsem); return (*spectrum_)(nu_em); } void UniformSphere::processHitQuantities(Photon* ph, double* coord_ph_hit, double* coord_obj_hit, double dt, Properties* data) const { if (alpha_==1) { // then I_nu \propto nu^0, standard case Generic::processHitQuantities(ph,coord_ph_hit,coord_obj_hit,dt,data); return; } // Here nu*I_nu \propto nu^alpha, alpha!=1 // Emission is assumed to deliver // then I_nu integrated over a band is \propto g^(4-alpha_) // not simply g^3 as in the standard case double freqObs=ph->freqObs(); // this is a useless quantity, always 1 SmartPointer spr = ph -> spectrometer(); double dlambda = dt/coord_ph_hit[4]; //dlambda = dt/tdot double ggredm1 = -gg_->ScalarProd(coord_ph_hit,coord_obj_hit+4, coord_ph_hit+4);// / 1.; //this is nu_em/nu_obs double ggred = 1./ggredm1; //this is nu_obs/nu_em double dsem = dlambda*ggredm1; // *1. double inc =0.; if (data) { if (data->redshift) throwError("unimplemented"); if (data->time) throwError("unimplemented"); if (data->impactcoords) throwError("unimplemented"); if (data->user4) throwError("unimplemented"); if (data->binspectrum) throwError("unimplemented"); if (data->spectrum) throwError("unimplemented"); if (data->intensity) { //Intensity increment : inc = (emission(freqObs*ggredm1, dsem, coord_ph_hit, coord_obj_hit)) * (ph -> getTransmission(size_t(-1))) * pow(ggred,4-alpha_); *data->intensity += inc; } /* update photon's transmission */ ph -> transmit(size_t(-1), transmission(freqObs*ggredm1, dsem,coord_ph_hit)); } else { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "NO data requested!" << endl; # endif } } double UniformSphere::transmission(double nuem, double dsem, double*) const { if (!flag_radtransf_) return 0.; double opac = (*opacity_)(nuem); # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "(nuem=" << nuem << ", dsem=" << dsem << "), opacity=" << opac << endl; # endif if (!opac) return 1.; return exp(-opac*dsem); } double UniformSphere::integrateEmission(double nu1, double nu2, double dsem, double *, double *) const { if (flag_radtransf_) return spectrum_->integrate(nu1, nu2, opacity_(), dsem); return spectrum_->integrate(nu1, nu2); } double UniformSphere::radius() const { return radius_; } void UniformSphere::radius(double r) { radius_=r; critical_value_ = r*r; safety_value_ = critical_value_*1.1+0.1; } double UniformSphere::radius(std::string const &unit) const { return Units::FromGeometrical(radius(), unit, gg_); } void UniformSphere::radius(double r, std::string const &unit) { radius(Units::ToGeometrical(r, unit, gg_)); } double UniformSphere::deltaMaxOverRadius() const {return dltmor_;} void UniformSphere::deltaMaxOverRadius(double f) {dltmor_=f;} double UniformSphere::deltaMaxOverDistance() const {return dltmod_;} void UniformSphere::deltaMaxOverDistance(double f) {dltmod_=f;} double UniformSphere::alpha() const { return alpha_; } void UniformSphere::alpha(double a) { alpha_ = a; } bool UniformSphere::isotropic() const { return isotropic_; } void UniformSphere::isotropic(bool a) { isotropic_ = a; } Gyoto-1.2.0/lib/Utils.C000066400000000000000000000121101302352257300145620ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include "GyotoError.h" #include "GyotoPhoton.h" #include #include #include "GyotoScenery.h" #include "GyotoSpectrum.h" #include "GyotoMetric.h" #include "GyotoAstrobj.h" #include "GyotoSpectrometer.h" #include "GyotoScreen.h" using namespace Gyoto; using namespace std; static int gyoto_debug=GYOTO_DEFAULT_DEBUG_MODE; #if GYOTO_DEFAULT_DEBUG_MODE static int gyoto_verbosity=GYOTO_DEBUG_VERBOSITY; static int gyoto_prev_verbosity=GYOTO_DEBUG_VERBOSITY; #else static int gyoto_verbosity=GYOTO_DEFAULT_VERBOSITY; static int gyoto_prev_verbosity=GYOTO_DEBUG_VERBOSITY; #endif void Gyoto::debug(int mode) { if (mode != gyoto_debug) { if (mode) { gyoto_prev_verbosity=verbose(); verbose(GYOTO_DEBUG_VERBOSITY); } else { verbose(gyoto_prev_verbosity); } gyoto_debug=mode; } } int Gyoto::debug() { return gyoto_debug; } void Gyoto::verbose(int mode) { gyoto_verbosity=mode; } int Gyoto::verbose() { return gyoto_verbosity; } void Gyoto::convert(double * const x, const size_t nelem, const double mass_sun, const double distance_kpc, const string unit) { /// Convert lengths double distance = distance_kpc*GYOTO_KPC; // m double fact = mass_sun * GYOTO_SUN_MASS * GYOTO_G_OVER_C_SQUARE; // m size_t i =0; if (!unit.compare("geometrical")) return ; else if (!unit.compare("m")) ; else if (!unit.compare("km")) fact *= 1e-3 ; else if (!unit.compare("sun radius")) fact *= 1. / GYOTO_SUN_RADIUS; else if (!unit.compare("rad")) fact *= 1. / (distance); else if (!unit.compare("degree")) fact *= 180. / (distance*M_PI); else if (!unit.compare("arcmin")) fact *= 1.08e4 / (distance*M_PI); else if (!unit.compare("arcsec")) fact *= 6.48e5 / (distance*M_PI); else if (!unit.compare("mas")) fact *= 6.48e8 / (distance*M_PI); else if (!unit.compare("uas")) fact *= 6.48e11 / (distance*M_PI); else throwError("Unknown unit."); for (i=0; i plugins; if (class_name.substr(0, 7)=="Gyoto::") class_name=class_name.substr(7); if (class_name=="Scenery") {Scenery().help(); return;} if (class_name=="Screen") {Screen().help(); return;} if (class_name=="Photon") {Photon().help(); return;} size_t pos=class_name.find("::"); if (pos==0 || pos+2==class_name.size()) throwError("Not a valid class name: "+class_name); if (pos > 0 && pos != string::npos) { string nspace = class_name.substr(0, pos); class_name = class_name.substr(pos+2); if (nspace=="Astrobj") { (*Astrobj::getSubcontractor(class_name, plugins)) (NULL, plugins)->help(); return; } if (nspace=="Metric") { (*Metric::getSubcontractor(class_name, plugins)) (NULL, plugins)->help(); return; } if (nspace=="Spectrum") { (*Spectrum::getSubcontractor(class_name, plugins)) (NULL, plugins)->help(); return; } if (nspace=="Spectrometer") { (*Spectrometer::getSubcontractor(class_name, plugins)) (NULL, plugins)->help(); return; } throwError("Unrecognized namespace: "+nspace); } throwError("Help string not implemented (yet) for "+class_name); } std::vector Gyoto::split(std::string const &src, std::string const &delim) { std::vector res; size_t pos=0, fpos=0, sz=src.length(); std::string tmp(""); while (fpos != string::npos && pos < sz) { fpos = src.find_first_of(delim, pos); if (fpos==pos) {++pos; continue;} res.push_back(src.substr(pos, fpos-pos)); pos = fpos+1; } return res; } Gyoto-1.2.0/lib/Value.C000066400000000000000000000112131302352257300145410ustar00rootroot00000000000000/* Copyright 2014-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoValue.h" #include "GyotoMetric.h" #include "GyotoAstrobj.h" #include "GyotoSpectrum.h" #include "GyotoSpectrometer.h" #include "GyotoScreen.h" #include "GyotoProperty.h" #include using namespace Gyoto ; using namespace std ; /// Value #define INIT_MEMBERS \ Double(0.), \ Bool(false), \ Long(0), \ ULong(0), \ SizeT(0), \ String(""), \ VDouble(), \ VULong(), \ Metric(), \ Astrobj(), \ Spectrum(), \ Spectrometer(), \ Screen() Value::Value(): type(Property::empty_t), INIT_MEMBERS {} Value::~Value() {} #define ___local_stuff(t, t_t, T) \ Value::Value(t val) : type(Property::t_t), INIT_MEMBERS {T=val;} \ Value::operator t() const { \ if (type!=Property::t_t) \ throwError("This Value does not hold a " #t); \ return T; \ } Value::Value(long val) : type(Property::long_t), INIT_MEMBERS {Long=val;} Value::Value(unsigned long val) : type(Property::unsigned_long_t), INIT_MEMBERS {ULong=val;} #if !defined(GYOTO_SIZE__T_IS_UNSIGNED_LONG) Value::Value(size_t val) : type(Property::size_t_t), INIT_MEMBERS {SizeT=val;} #endif Value::Value(bool val) : type(Property::bool_t), INIT_MEMBERS {Bool=val;} Value::operator long() const { switch (type) { case Property::long_t: return Long; case Property::unsigned_long_t: return long(ULong); case Property::size_t_t: return long(SizeT); default: throwError("This Value does not hold a long (or unsigned long)"); } return 0; } Value::operator unsigned long() const { switch (type) { case Property::long_t: return (unsigned long)(Long); case Property::unsigned_long_t: return ULong; case Property::size_t_t: return (unsigned long)(SizeT); default: throwError("This Value does not hold a long (or unsigned long)"); } return 0; } #if !defined(GYOTO_SIZE__T_IS_UNSIGNED_LONG) Value::operator size_t() const { switch (type) { case Property::long_t: return size_t(Long); case Property::unsigned_long_t: return size_t(ULong); case Property::size_t_t: return SizeT; default: throwError("This Value does not hold a long (or unsigned long)"); } return 0; } #endif Value::operator bool() const { switch (type) { case Property::bool_t: return Bool; case Property::long_t: return bool(Long); case Property::unsigned_long_t: return bool(ULong); case Property::size_t_t: return bool(SizeT); default: throwError("This Value does not hold an integer"); } return 0; } ___local_stuff(double, double_t, Double) ___local_stuff(std::string, string_t, String) ___local_stuff(std::vector, vector_double_t, VDouble) ___local_stuff(std::vector, vector_unsigned_long_t, VULong) ___local_stuff(Gyoto::SmartPointer, metric_t, Metric) ___local_stuff(Gyoto::SmartPointer, astrobj_t, Astrobj) ___local_stuff(Gyoto::SmartPointer, spectrum_t, Spectrum) ___local_stuff(Gyoto::SmartPointer, spectrometer_t, Spectrometer) ___local_stuff(Gyoto::SmartPointer, screen_t, Screen) Value& Value::operator=(Value const &right) { # define ___local_case(t_t, member) case Property::t_t: member = right.member; break; type=right.type; switch (type) { ___local_case(double_t, Double); ___local_case(bool_t, Bool); ___local_case(long_t, Long); ___local_case(unsigned_long_t, ULong); ___local_case(size_t_t, SizeT); ___local_case(string_t, String); ___local_case(vector_double_t, VDouble); ___local_case(vector_unsigned_long_t, VULong); ___local_case(metric_t, Metric); ___local_case(astrobj_t, Astrobj); ___local_case(spectrum_t, Spectrum); ___local_case(spectrometer_t, Spectrometer); ___local_case(screen_t, Screen); } return *this; # undef ___local_case } Gyoto-1.2.0/lib/WIP.C000066400000000000000000000033001302352257300141220ustar00rootroot00000000000000/* Copyright 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoWIP.h" #include "GyotoUtils.h" #include using namespace std ; using namespace Gyoto ; WIP::WIP() { GYOTO_WARNING << "**************************************************" << endl; GYOTO_WARNING << "Initializing a class marked *work in progress*." << endl; GYOTO_WARNING << "It may be completely buggy." << endl; GYOTO_WARNING << "Please test extensively and/or contact the author." << endl; GYOTO_WARNING << "**************************************************" << endl; } WIP::WIP(string classname) { if (classname == "") return; GYOTO_WARNING << "**************************************************" << endl; GYOTO_WARNING << "Class \"" << classname << "\" is marked *work in progress*." << endl; GYOTO_WARNING << "It may be completely buggy." << endl; GYOTO_WARNING << "Please test extensively and/or contact the author." << endl; GYOTO_WARNING << "**************************************************" << endl; } Gyoto-1.2.0/lib/Worldline.C000066400000000000000000001055021302352257300154310ustar00rootroot00000000000000/* Copyright 2011-2015 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Gyoto; Worldline::Worldline() : stopcond(0), metric_(NULL), imin_(1), i0_(0), imax_(0), adaptive_(1), secondary_(1), delta_(GYOTO_DEFAULT_DELTA), tmin_(-DBL_MAX), cst_(NULL), cst_n_(0), wait_pos_(0), init_vel_(NULL), maxiter_(GYOTO_DEFAULT_MAXITER), delta_min_(GYOTO_DEFAULT_DELTA_MIN), delta_max_(GYOTO_DEFAULT_DELTA_MAX), delta_max_over_r_(GYOTO_DEFAULT_DELTA_MAX_OVER_R), abstol_(GYOTO_DEFAULT_ABSTOL), reltol_(GYOTO_DEFAULT_RELTOL) { xAllocate(); #ifdef GYOTO_HAVE_BOOST_INTEGRATORS state_ = new Worldline::IntegState::Boost(this, "runge_kutta_fehlberg78"); #else state_ = new Worldline::IntegState::Legacy(this); #endif state_ -> init(); } Worldline::Worldline(const Worldline& orig) : metric_(NULL), x_size_(orig.x_size_), imin_(orig.imin_), i0_(orig.i0_), imax_(orig.imax_), adaptive_(orig.adaptive_), secondary_(orig.secondary_), delta_(orig.delta_), tmin_(orig.tmin_), cst_(NULL), cst_n_(orig.cst_n_), wait_pos_(orig.wait_pos_), init_vel_(NULL), maxiter_(orig.maxiter_), delta_min_(orig.delta_min_), delta_max_(orig.delta_max_), delta_max_over_r_(orig.delta_max_over_r_), abstol_(orig.abstol_), reltol_(orig.reltol_), state_(NULL) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif if (orig.metric_()) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "cloning metric\n"; # endif metric_=orig.metric_->clone(); } state_ = orig.state_->clone(this); xAllocate(x_size_); size_t sz = get_nelements()*sizeof(double); # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "sz="< init(); # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "done\n"; # endif } Worldline::Worldline(Worldline *orig, size_t i0, int dir, double step_max) : metric_(orig->metric_), // x_size_(orig.x_size_), imin_(orig.imin_), i0_(orig.i0_), imax_(orig.imax_), adaptive_(orig->adaptive_), secondary_(orig->secondary_), delta_(orig->delta_), tmin_(orig->tmin_), cst_n_(orig->cst_n_), wait_pos_(orig->wait_pos_), init_vel_(NULL), maxiter_(orig->maxiter_), delta_min_(orig->delta_min_), delta_max_(orig->delta_max_), delta_max_over_r_(orig->delta_max_over_r_), abstol_(orig->abstol_), reltol_(orig->reltol_) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif state_ = orig->state_->clone(this); double d1 = orig->x0_[i0], d2 = orig->x0_[i0+dir]; x_size_= size_t(fabs(d1-d2)/step_max)+2; double step = (d2-d1)/double(x_size_-1); xAllocate(x_size_); imin_=0; imax_=x_size_-1; i0_=(dir==1?imin_:imax_); x0_[i0_]=d1; size_t i=i0_; for (i=i0_+dir; i>imin_ && igetCoord(x0_, x_size_, x1_, x2_, x3_, x0dot_, x1dot_, x2dot_, x3dot_); # if GYOTO_DEBUG_ENABLED GYOTO_IF_DEBUG { GYOTO_DEBUG << "(Worldline*, "<cst_, cst_n_*sizeof(double)); } /* if (orig->init_vel_) { init_vel_ = new double [3]; memcpy(init_vel_, orig->init_vel_, 3*sizeof(double)); } */ state_ -> init(); # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "done\n"; # endif } Worldline::~Worldline(){ # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << endl; # endif if (metric_) metric_ -> unhook(this); delete[] x0_; delete[] x1_; delete[] x2_; delete[] x3_; delete[] x0dot_; delete[] x1dot_; delete[] x2dot_; delete[] x3dot_; if (cst_) delete [] cst_; if (init_vel_) delete[] init_vel_; state_=NULL; } void Worldline::xAllocate() {xAllocate(GYOTO_DEFAULT_X_SIZE);} void Worldline::xAllocate(size_t sz) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(sz); # endif x_size_ = sz ; x0_ = new double[x_size_]; x1_ = new double[x_size_]; x2_ = new double[x_size_]; x3_ = new double[x_size_]; x0dot_ = new double[x_size_]; x1dot_ = new double[x_size_]; x2dot_ = new double[x_size_]; x3dot_ = new double[x_size_]; } void Worldline::xExpand(double* &x, int dir) { double * old; size_t offset=(dir==1)?0:x_size_; size_t i; size_t nsize=2*x_size_; old=x; x=new double[nsize]; for (i=imin_;i<=imax_;++i) x[i+offset]=old[i]; delete [] old; } size_t Worldline::xExpand(int dir) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(dir); GYOTO_DEBUG << endl << "massive=" << getMass() << ", size=" << x_size_ << ", imin_=" << imin_ << ", i0_=" << i0_ << ", imax_=" << imax_ << endl; # endif xExpand(x0_, dir); xExpand(x1_, dir); xExpand(x2_, dir); xExpand(x3_, dir); xExpand(x0dot_, dir); xExpand(x1dot_, dir); xExpand(x2dot_, dir); xExpand(x3dot_, dir); size_t retval=(dir==1)?(x_size_-1):x_size_; size_t offset=(dir==1)?0:x_size_; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "retval=" << retval << ", offset=" << offset << ", dir=" << dir << endl; # endif x_size_*=2; imin_+=offset; i0_+=offset; imax_+=offset; # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << ", xsize_=" << x_size_ << ", imin_=" << imin_ << ", i0_=" << i0_ << ", imax_=" << imax_; # endif return retval; } void Worldline::metric(SmartPointer gg) { // Unhook from previous metric if (metric_) metric_ -> unhook(this); // Set the Metric metric_=gg; // Hook to new metric if (metric_) metric_ -> hook(this); // Reset integration reInit(); } void Worldline::tell(Gyoto::Hook::Teller* msg) { if (msg != metric_) { throwError("Worldline::tell(): wrong Teller"); } reInit(); } void Worldline::integrator(std::string const &type) { if (type=="Legacy") state_ = new IntegState::Legacy(this); #ifdef GYOTO_HAVE_BOOST_INTEGRATORS else state_ = new IntegState::Boost(this, type); #else else throwError("unrecognized integrator (recompile with boost?)"); #endif } std::string Worldline::integrator() const { return state_->kind(); } SmartPointer Worldline::metric() const { return metric_; } string Worldline::className() const { return string("Worldline"); } string Worldline::className_l() const { return string("worldline"); } void Worldline::initCoord(std::vector const &v) { if (v.size() != 8) throwError("Worldline::initCoord() requires an 8-element vector"); double c[8]; for (size_t i=0; i<8; ++i) c[i]=v[i]; setInitCoord(c); } std::vector Worldline::initCoord() const { std::vector coord(8, 0.); coord[0] = x0_[i0_]; coord[1] = x1_[i0_]; coord[2] = x2_[i0_]; coord[3] = x3_[i0_]; coord[4] = (i0_<=imax_ && imin_<=i0_)?x0dot_[i0_]:0.; coord[5] = x1dot_[i0_]; coord[6] = x2dot_[i0_]; coord[7] = x3dot_[i0_]; return coord; } void Worldline::setInitCoord(const double coord[8], int dir) { GYOTO_DEBUG_ARRAY(coord, 8); // If dir is not forced and Worldline has never been initialize, // make a default direction depending on particle mass if (dir==0 && i0_==0 && imin_==1 && imax_==0) dir = getMass() ? 1 : -1; switch (dir) { case 0: break; // don't move i0_ case -1: i0_=x_size_-1; break;// integrate backwards case 1: i0_=0; // integrate forwards } imin_=imax_=i0_; x0_[i0_]=coord[0]; x1_[i0_]=coord[1]; x2_[i0_]=coord[2]; x3_[i0_]=coord[3]; x0dot_[i0_]=coord[4]; x1dot_[i0_]=coord[5]; x2dot_[i0_]=coord[6]; x3dot_[i0_]=coord[7]; reInit(); } void Worldline::setInitCoord(double const pos[4], double const v[3], int dir) { if (!getMass()) throwError("Worldline::setInitCoord(pos, vel) " "only makes sense for massive particles"); if (!metric_) throwError("Please set metric before calling " "Worldline::setInitCoord(double pos[4], double vel[3])"); double tdot0=metric_->SysPrimeToTdot(pos, v); GYOTO_DEBUG_EXPR(tdot0); double coord[8]={pos[0], pos[1], pos[2], pos[3], tdot0, v[0]*tdot0, v[1]*tdot0, v[2]*tdot0}; GYOTO_DEBUG_ARRAY(coord, 8); setInitCoord(coord, dir); } void Worldline::setInitialCondition(SmartPointer met, const double coord[8], const int dir) { metric(met); setInitCoord(coord, dir); } void Worldline::setPosition(double const pos[4]) { double vel[] = {0., 0., 0.}; setInitCoord(pos, vel); } void Worldline::setVelocity(double const vel[3]) { double coord[8]; getInitialCoord(coord); setInitCoord(coord, vel); } void Worldline::reset() { if (imin_<=imax_) imin_=imax_=i0_; } void Worldline::reInit() { if (imin_ <= imax_) { reset(); double coord[8]; getInitialCoord(coord); GYOTO_DEBUG_ARRAY(coord, 8); if (metric_) { if ( metric_() -> coordKind() == GYOTO_COORDKIND_SPHERICAL && x2_[i0_]==0. ) { if (verbose() >= GYOTO_SEVERE_VERBOSITY) cerr << "SEVERE: Worldline::reInit(): Kicking particle off z axis\n"; x2_[i0_]=coord[2]=1e-10; } metric_ -> setParticleProperties(this,coord); } state_ -> init(); } } void Worldline::xStore(size_t ind, double const coord[8]) { x0_[ind] = coord[0]; x1_[ind] = coord[1]; x2_[ind] = coord[2]; x3_[ind] = coord[3]; x0dot_[ind] = coord[4]; x1dot_[ind] = coord[5]; x2dot_[ind] = coord[6]; x3dot_[ind] = coord[7]; } void Worldline::xFill(double tlim) { int dir; stopcond=0; size_t ind; // Check whether anything needs to be done, // Determine direction, // Allocate memory. if (tlim > x0_[imax_]) { // integrate forward dir = 1; ind = (imax_==x_size_-1)?xExpand(1):imax_; } else if (tlim < x0_[imin_]) { // integrate backward dir = -1; ind = (imin_==0)?xExpand(-1):imin_; } else return ; // nothing to do # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG<< "Integrating worldline " ; # endif // Set up integration double MassPart=getMass(); if (MassPart==1.) { # if GYOTO_DEBUG_ENABLED GYOTO_IF_DEBUG cerr << "of massive particule ....." << endl; GYOTO_ENDIF_DEBUG # endif }else if(MassPart==0.){ # if GYOTO_DEBUG_ENABLED GYOTO_IF_DEBUG cerr << "of 0-mass particule ....." << endl; GYOTO_ENDIF_DEBUG # endif }else{ throwError("In Worldline.C Unrecognized mass."); //GYOTO_DEBUG<< "of unrecognized mass (!!) particule ....." << endl; //equations of geodesics written for a mass=1 star } double coord[8]={x0_[ind], x1_[ind], x2_[ind], x3_[ind], x0dot_[ind], x1dot_[ind], x2dot_[ind], x3dot_[ind]}; GYOTO_DEBUG << "IntegState initialization" << endl; state_->init(this, coord, dir*delta_); //delta_ = initial integration step (defaults to 0.01) GYOTO_DEBUG << "IntegState initialized" << endl; size_t mycount=0;// to prevent infinite integration while (!stopcond) { mycount++; ind+=dir; stopcond= state_ -> nextStep(coord); if(metric_->isStopCondition(coord)) { # if GYOTO_DEBUG_ENABLED GYOTO_DEBUG << "stopcond set by metric"<tlim) stopcond=1; if ((!stopcond) & (ind==x_size_-1)) { imax_=x_size_-1; ind=xExpand(1); } } else { if (coord[0] coordKind(); switch(coordkind) { case GYOTO_COORDKIND_SPHERICAL: for (n=imin_;n<=imax_;++n) { x[n-imin_]=x1_[n]*sin(x2_[n])*cos(x3_[n]); y[n-imin_]=x1_[n]*sin(x2_[n])*sin(x3_[n]); z[n-imin_]=x1_[n]*cos(x2_[n]); } break; case GYOTO_COORDKIND_CARTESIAN: for (n=imin_;n<=imax_;++n) { x[n-imin_]=x1_[n]; y[n-imin_]=x2_[n]; z[n-imin_]=x3_[n]; } break; default: Gyoto::throwError("in Worldline::get_xyz: Incompatible coordinate kind"); } } void Worldline::getCartesian(double const * const dates, size_t const n_dates, double * const x, double * const y, double * const z, double * const xprime, double * const yprime, double * const zprime) { double *x1, *x2, *x3, *x0dot, *x1dot, *x2dot, *x3dot, tauprime; int coordkind = metric_ -> coordKind(); size_t di; double rprime, thetaprime, phiprime, costheta, sintheta, cosphi, sinphi, r; x0dot = new double[n_dates]; x1dot = new double[n_dates]; x2dot = new double[n_dates]; x3dot = new double[n_dates]; switch(coordkind) { case GYOTO_COORDKIND_SPHERICAL: x1 = new double[n_dates]; x2 = new double[n_dates]; x3 = new double[n_dates]; break; case GYOTO_COORDKIND_CARTESIAN: x1=x; x2=y; x3=z; break; default: Gyoto::throwError("in Worldline::get_xyz: unknown coordinate kind"); x1=x2=x3=NULL; // fix warning } getCoord(dates, n_dates, x1, x2, x3, x0dot, x1dot, x2dot, x3dot); switch(coordkind) { case GYOTO_COORDKIND_SPHERICAL: for (di=0; dicoordKind() == GYOTO_COORDKIND_SPHERICAL){ double pos2[8]={0.,0.,x2[di],x3[di],0.,0.,x2dot[di],0.}; checkPhiTheta(pos2); x2[di]=pos2[2];x3[di]=pos2[3];x2dot[di]=pos2[6]; } continue; } else if (date > x0_[imax_]) { curl=imax_; // current imax_ xFill(date); // integrate, that changes imax_ curh=imax_; // new imax_ if (curl == curh || date > x0_[imax_]) { ss<<"Worldline::getCoord: can't get coordinates for date="<SysPrimeToTdot(pos, vel); if (x1) x1[di] = pos[1]; if (x2) x2[di] = pos[2]; if (x3) x3[di] = pos[3]; if (x0dot) x0dot[di] = tdot; if (x1dot) x1dot[di] = vel[0]*tdot; if (x2dot) x2dot[di] = vel[1]*tdot; if (x3dot) x3dot[di] = vel[2]*tdot; } else { // Photon: don't be so elaborate, we certainly don't need it... yet if (x1) x1[di] = bestl[1]*factl + besth[1]*facth; if (x2) x2[di] = bestl[2]*factl + besth[2]*facth; if (x3) x3[di] = bestl[3]*factl + besth[3]*facth; if (x0dot) x0dot[di] = bestl[4]*factl + besth[4]*facth; if (x1dot) x1dot[di] = bestl[5]*factl + besth[5]*facth; if (x2dot) x2dot[di] = bestl[6]*factl + besth[6]*facth; if (x3dot) x3dot[di] = bestl[7]*factl + besth[7]*facth; } /* For spherical-like coordinates, transforms theta and phi so that theta is in [0,pi] and phi in [0,2pi] This call is due to interpolation above that could lead theta,phi out of their correct ranges. */ if (metric_->coordKind() == GYOTO_COORDKIND_SPHERICAL && x2 && x3 && x2dot){ double pos2[8]={0.,0.,x2[di],x3[di],0.,0.,x2dot[di],0.}; checkPhiTheta(pos2); x2[di]=pos2[2];x3[di]=pos2[3];x2dot[di]=pos2[6]; } } } void Worldline::getCoord(double *x0dest, double *x1dest, double *x2dest, double *x3dest) const { //if (sysco!=sys_) //Gyoto::throwError("At this point, coordinate conversion is not implemented"); size_t ncomp=imax_-imin_+1; memcpy(x0dest, x0_+imin_, sizeof(double)*ncomp); memcpy(x1dest, x1_+imin_, sizeof(double)*ncomp); memcpy(x2dest, x2_+imin_, sizeof(double)*ncomp); memcpy(x3dest, x3_+imin_, sizeof(double)*ncomp); } void Worldline::checkPhiTheta(double coord[8]) const{ switch (metric_ -> coordKind()) { case GYOTO_COORDKIND_SPHERICAL: { /* Transforms theta and phi in coord so that theta is in [0,pi] and phi in [0,2pi] */ double thetatmp=coord[2], phitmp=coord[3]; while (thetatmp>M_PI) thetatmp-=2.*M_PI; while (thetatmp<-M_PI) thetatmp+=2.*M_PI;//then theta in [-pi,pi] if (thetatmp<0.) { thetatmp*=-1.;//then theta in [0,pi] coord[6]*=-1.; //theta -> -theta then idem for derivative phitmp+=M_PI;//thus, same point x,y,z } while (phitmp>2.*M_PI) phitmp-=2.*M_PI; while (phitmp<0.) phitmp+=2.*M_PI;//then phi in [0,2pi] coord[2]=thetatmp; coord[3]=phitmp; } break; case GYOTO_COORDKIND_CARTESIAN: throwError("Worldline::checkPhiTheta(): should not be called " "with cartesian-like coordinates"); default: throwError("Worldline::checkPhiTheta(): unknown COORDKIND"); } } void Worldline::get_dot(double *x0dest, double *x1dest, double *x2dest, double *x3dest) const { // if (sysco!=sys_) // Gyoto::throwError("At this point, coordinate conversion is not implemented"); size_t ncomp=imax_-imin_+1; memcpy(x0dest, x0dot_+imin_, sizeof(double)*ncomp); memcpy(x1dest, x1dot_+imin_, sizeof(double)*ncomp); memcpy(x2dest, x2dot_+imin_, sizeof(double)*ncomp); memcpy(x3dest, x3dot_+imin_, sizeof(double)*ncomp); } void Worldline::getSkyPos(SmartPointer screen, double *dalpha, double *ddelta, double *dD) const { double pos[4], skypos[3]; size_t i, ncomp=imax_-imin_+1; for (i=0;i coordToSky(pos, skypos); dalpha[i]=skypos[0]; ddelta[i]=skypos[1]; dD[i] =skypos[2]; } } void Worldline::get_prime(double *x1dest, double *x2dest, double *x3dest) const { size_t n; double f; //if (sysco!=sys_) // Gyoto::throwError("At this point, coordinate conversion is not implemented"); for (n=imin_;n<=imax_;++n) { x1dest[n-imin_]=x1dot_[n]*(f=1./x0dot_[n]); x2dest[n-imin_]=x2dot_[n]*f; x3dest[n-imin_]=x3dot_[n]*f; } } void Worldline::save_txyz(char * filename) const { size_t n; int width=15; int prec=12; ofstream fichierxyz(filename); int coordkind = metric_ -> coordKind(); switch(coordkind) { case GYOTO_COORDKIND_SPHERICAL: for (n=imin_;n<=imax_;++n) { // GYOTO_DEBUG<< "dans save imin, coord= " << imin_ << " " << x0_[n] << " " << x1_[n] << " " << x2_[n] << " " << x3_[n] << endl; //fichierxyz << setprecision(prec) << setw(width) << x1_[n] << " "; //fichierxyz << setprecision(prec) << setw(width) << x0[n] << " "; fichierxyz << setprecision(prec) << setw(width) << x0_[n] << " ";//saving r distance fichierxyz << setprecision(prec) << setw(width) << x1_[n]*sin(x2_[n])*cos(x3_[n]) << " "; fichierxyz << setprecision(prec) << setw(width) << x1_[n]*sin(x2_[n])*sin(x3_[n]) << " "; fichierxyz << setprecision(prec) << setw(width) << x1_[n]*cos(x2_[n]) << endl; } break; case GYOTO_COORDKIND_CARTESIAN: for (n=imin_;n<=imax_;++n) { //fichierxyz << setprecision(prec) << setw(width) << sqrt(x1[n]*x1[n]+x2_[n]*x2_[n]+x3_[n]*x3_[n]) << " "; fichierxyz << setprecision(prec) << setw(width) << x0_[n] << " "; fichierxyz << setprecision(prec) << setw(width) << x1_[n] << " "; fichierxyz << setprecision(prec) << setw(width) << x2_[n] << " "; fichierxyz << setprecision(prec) << setw(width) << x3_[n] << endl; } break; default: Gyoto::throwError("in Worldline::save_xyz: Incompatible coordinate kind"); } fichierxyz.close(); } void Worldline::save_txyz(char * filename, const double t1, const double mass_sun, const double distance_kpc, const string unit, SmartPointer sc) { xFill(t1); size_t nelem = get_nelements(), n=0; double * t = new double [nelem]; double * x = new double [nelem]; double * y = new double [nelem]; double * z = new double [nelem]; double rad2deg = 180./M_PI; double f=1.; if (getMass()) f /= x0dot_[i0_]; int width=GYOTO_WIDTH; int prec=GYOTO_PREC; ofstream fichierxyz(filename); get_t(t); get_xyz(x, y, z); convert(x, nelem, mass_sun, distance_kpc, unit); convert(y, nelem, mass_sun, distance_kpc, unit); convert(z, nelem, mass_sun, distance_kpc, unit); // HEADER string metkind = metric_->kind(); fichierxyz << "# Gyoto save file " << endl << "# Start Gyoto parameters" << endl << "# particle_type = \"" << className_l() << "\"" << endl; // if (!metkind.compare("KerrBL")) { // SmartPointer kmet = metric_ ; // fichierxyz << "# metric_type = \"kerr\"" << endl // << "# spin = " << kmet -> getSpin() << endl // << "# mass = " << mass_sun << endl; // } else fichierxyz << "# metric_type = \"" << metkind << "\"" << endl ; fichierxyz << "# t0 = " << x0_[i0_] << endl << "# r0 = " << x1_[i0_] << endl << "# theta0 = " << x2_[i0_] << endl << "# phi0 = " << x3_[i0_] << endl << "# rprime0 = " << x1dot_[i0_]*f << endl << "# thetaprime0 = " << x2dot_[i0_]*f << endl << "# phiprime0 = " << x3dot_[i0_]*f << endl << "# t1 = " << t1 << endl; if (sc) fichierxyz << "# incl = " << sc -> inclination()*rad2deg << endl << "# paln = " << sc -> PALN()*rad2deg << endl << "# phase = " << sc -> argument()*rad2deg << endl << "# distance = " << distance_kpc << endl; fichierxyz << "# length_unit = \"" << unit << "\"" << endl << "# End Gyoto parameters" << endl << "# Columns are t, x, y, z" << endl; // DATA for (n=0;n<=nelem;++n) { fichierxyz << setprecision(prec) << setw(width) << t[n] << " " << setprecision(prec) << setw(width) << x[n] << " " << setprecision(prec) << setw(width) << y[n] << " " << setprecision(prec) << setw(width) << z[n] << endl ; } delete [] t; delete [] x; delete [] y; delete [] z; } void Worldline::delta(const double del) { delta_=del; } void Worldline::delta(double d, const string &unit) { delta(Units::ToGeometrical(d, unit, metric_)); } double Worldline::delta() const { return delta_; } double Worldline::delta(const string &unit) const { return Units::FromGeometrical(delta(), unit, metric_); } double Worldline::tMin() const { return tmin_; } double Worldline::tMin(const string &unit) const { return Units::FromGeometricalTime(tMin(), unit, metric_); } void Worldline::tMin(double tmin) { tmin_ = tmin; } void Worldline::tMin(double tmin, const string &unit) { tMin(Units::ToGeometricalTime(tmin, unit, metric_)); } void Worldline::adaptive(bool mode) { adaptive_ = mode; state_->init();} bool Worldline::adaptive() const { return adaptive_; } void Worldline::secondary(bool sec) { secondary_ = sec; } bool Worldline::secondary() const { return secondary_; } void Worldline::maxiter(size_t miter) { maxiter_ = miter; } size_t Worldline::maxiter() const { return maxiter_; } double Worldline::deltaMin() const {return delta_min_;} double Worldline::deltaMax() const {return delta_max_;} void Worldline::deltaMin(double h1) { delta_min_=h1; state_->init(); } void Worldline::deltaMax(double h1) {delta_max_=h1;} double Worldline::deltaMaxOverR() const { return delta_max_over_r_;} void Worldline::deltaMaxOverR(double t) {delta_max_over_r_=t;} double Worldline::absTol() const {return abstol_;} void Worldline::absTol(double t) {abstol_=t; state_->init();} double Worldline::relTol() const {return reltol_;} void Worldline::relTol(double t) {reltol_=t; state_->init();} double Worldline::deltaMax(double const pos[8], double h1max) const { double h1max_at_r=abs(pos[1]); if (metric_ -> coordKind()==GYOTO_COORDKIND_CARTESIAN) { double tmp; if ((tmp=abs(pos[2]))>h1max_at_r) h1max_at_r=tmp; if ((tmp=abs(pos[3]))>h1max_at_r) h1max_at_r=tmp; } h1max_at_r *= delta_max_over_r_; if (h1max > h1max_at_r) h1max = h1max_at_r; if (h1max>delta_max_) h1max=delta_max_; if (h1maximax_) { cerr << "Indices min curr max= " << imin_ << " " << index << " " << imax_ << endl; throwError("Worldline::getCoord: bad index"); } coord[0] = x0_[index]; coord[1] = x1_[index]; coord[2] = x2_[index]; coord[3] = x3_[index]; coord[4] = x0dot_[index]; coord[5] = x1dot_[index]; coord[6] = x2dot_[index]; coord[7] = x3dot_[index]; } void Worldline::getCartesianPos(size_t index, double dest[4]) const { dest[0] = x0_[index]; int coordkind = metric_ -> coordKind(); switch (coordkind) { case GYOTO_COORDKIND_SPHERICAL: dest[1] = x1_[index]*sin(x2_[index])*cos(x3_[index]); dest[2] = x1_[index]*sin(x2_[index])*sin(x3_[index]); dest[3] = x1_[index]*cos(x2_[index]); break; case GYOTO_COORDKIND_CARTESIAN: dest[1] = x1_[index]; dest[2] = x2_[index]; dest[3] = x3_[index]; break; default: Gyoto::throwError("Worldline::getCartesianPos: Incompatible coordinate kind"); } } Gyoto-1.2.0/lib/WorldlineIntegState.C000066400000000000000000000230201302352257300174130ustar00rootroot00000000000000/* Copyright 2011-2015 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include #include #include #include #include #include #include using namespace std ; using namespace Gyoto; #ifdef GYOTO_HAVE_BOOST_INTEGRATORS #include using namespace boost::numeric::odeint; #if defined HAVE_FENV_H # include # pragma STDC FENV_ACCESS ON # define DISABLE_SIGFPE \ fenv_t envp; \ if (feholdexcept(&envp)) throwError("failed holding FPE") # define REENABLE_SIGFPE \ if (feclearexcept(FE_ALL_EXCEPT)) throwError("failed clearing FPE"); \ if (fesetenv(&envp)) throwError("failed setting back FPE") #else # define DISABLE_SIGFPE # define REENABLE_SIGFPE #endif #define GYOTO_TRY_BOOST_CONTROLLED_STEPPER(a) \ if (kind_==Kind::a) { \ typedef boost::numeric::odeint::a error_stepper_type; \ DISABLE_SIGFPE; \ auto controlled= \ make_controlled< error_stepper_type > \ ( line->absTol() , line->relTol() ); \ REENABLE_SIGFPE; \ try_step_ = \ [controlled, system] \ (std::array &inout, double &t, double &h) \ mutable \ -> controlled_step_result \ { \ return controlled.try_step(system, inout, t, h); \ }; \ do_step_ = \ [controlled, system] \ (std::array &inout, double h) \ mutable \ { \ controlled.stepper().do_step(system, inout, 0., h); \ }; \ } #endif // GYOTO_HAVE_BOOST_INTEGRATORS /// Generic Worldline::IntegState::Generic::~Generic() {}; Worldline::IntegState::Generic::Generic(Worldline *parent) : SmartPointee(), line_(parent) {}; void Worldline::IntegState::Generic::init(){ if (!line_) return; adaptive_=line_->adaptive(); gg_=line_->metric(); } void Worldline::IntegState::Generic::init(Worldline * line, const double coord[8], const double delta) { line_=line; delta_=delta; gg_=line->metric(); if (line_->getImin() <= line_->getImax() && gg_) norm_=normref_= gg_->ScalarProd(coord,coord+4,coord+4); } void Worldline::IntegState::Generic::checkNorm(double coord[8]) { norm_=gg_ -> ScalarProd(coord,coord+4,coord+4); double normtol=.001; /* NB: following test done for norm/tdot as tdot can diverge close to horizon (it's the case for NS integration eg where geodesic can come close to horizon) Then just check that norm/tdot does not diverge. */ if (fabs(norm_-normref_)/(coord[4]*coord[4])>normtol) { GYOTO_SEVERE << "in Worldline::IntegState.C: " "norm is drifting" " - with norm,normref= " << norm_ << " " << normref_ << " -- x1,x2,x3= " << coord[1] << " " << coord[2] << " " << coord[3] << " " << endl; } } /// Legacy Worldline::IntegState::Legacy::Legacy(Worldline *parent) : Generic(parent) { Legacy::init(); } Worldline::IntegState::Legacy * Worldline::IntegState::Legacy::clone(Worldline *newparent) const { return new Legacy(newparent); } void Worldline::IntegState::Legacy::init(Worldline * line, const double coord[8], const double delta) { Generic::init(line, coord, delta); short i; for (i=0;i<8;++i) coord_[i]=coord[i]; } int Worldline::IntegState::Legacy::nextStep(double coord[8], double h1max) { GYOTO_DEBUG << h1max << endl; int j; double h1; if (adaptive_){ if (gg_ -> myrk4_adaptive(line_,coord_,norm_,normref_,coord,delta_,h1, h1max)) return 1; delta_ = h1; }else{ if (gg_ -> myrk4(line_,coord_,delta_,coord)) return 1; } for (j=0;j<8;j++) coord_[j] = coord[j]; checkNorm(coord); # if GYOTO_DEBUG_ENABLED GYOTO_IF_DEBUG GYOTO_DEBUG_ARRAY(coord,8); GYOTO_DEBUG_EXPR(delta_); GYOTO_ENDIF_DEBUG # endif if (delta_==delta_+1) return 1; // delta == Infinity : stop condition return 0; } void Worldline::IntegState::Legacy::doStep(double const coordin[8], double step, double coordout[8]) { gg_ -> myrk4(line_, coordin, step, coordout); } std::string Worldline::IntegState::Legacy::kind() { return "Legacy"; } Worldline::IntegState::Legacy::~Legacy() {} /// Boost #ifdef GYOTO_HAVE_BOOST_INTEGRATORS Worldline::IntegState::Boost::~Boost() {}; Worldline::IntegState::Boost::Boost(Worldline*line, std::string type) : Generic(line) { if (type=="runge_kutta_cash_karp54") kind_=runge_kutta_cash_karp54; else if (type=="runge_kutta_fehlberg78") kind_=runge_kutta_fehlberg78; else if (type=="runge_kutta_dopri5") kind_=runge_kutta_dopri5; else if (type=="runge_kutta_cash_karp54_classic") kind_=runge_kutta_cash_karp54_classic; else throwError("unknown integrator kind"); Boost::init(); } Worldline::IntegState::Boost::Boost(Worldline*line, Kind type) : Generic(line), kind_(type) { Boost::init(); } void Worldline::IntegState::Boost::init() { Generic::init(); Worldline* line=line_; Metric::Generic* met=line->metric(); std::function &/*x*/, std::array & /*dxdt*/, const double /* t*/ )> system; if (!met) system=[](const std::array &/*x*/, std::array & /*dxdt*/, const double /* t*/ ){ throwError("Metric not set"); }; else system=[this, line, met](const std::array &x, std::array &dxdt, const double t) { double xx[8]={x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]}; double res[8]; //line->stopcond=met->Generic::diff(xx, res); line->stopcond=met->diff(xx, res); for (size_t i=0; i<=7; ++i) dxdt[i]=res[i]; }; if (line->getImin() > line->getImax() || !met) return; typedef std::array< double, 8 > state_type; GYOTO_TRY_BOOST_CONTROLLED_STEPPER(runge_kutta_cash_karp54) else GYOTO_TRY_BOOST_CONTROLLED_STEPPER(runge_kutta_fehlberg78) else GYOTO_TRY_BOOST_CONTROLLED_STEPPER(runge_kutta_dopri5) else GYOTO_TRY_BOOST_CONTROLLED_STEPPER(runge_kutta_cash_karp54_classic) //else GYOTO_TRY_BOOST_CONTROLLED_STEPPER(rosenbrock4) else throwError("unknown stepper type"); }; Worldline::IntegState::Boost * Worldline::IntegState::Boost::clone(Worldline*newparent) const { return new Boost(newparent, kind_); } void Worldline::IntegState::Boost::init(Worldline * line, const double coord[8], const double delta) { Generic::init(line, coord, delta); } int Worldline::IntegState::Boost::nextStep(double coord[8], double h1max) { GYOTO_DEBUG << h1max << endl; // We first make a C++ std::array out of the bare C array: std::array inout = { coord[0], coord[1], coord[2], coord[3], coord[4], coord[5], coord[6], coord[7]}; if (adaptive_) { double h1=delta_; double sgn=h1>0?1.:-1.; h1max=line_->deltaMax(coord, h1max); double delta_min=line_->deltaMin(); double dt=0.; if (abs(h1)>h1max) h1=sgn*h1max; if (abs(h1)=delta_min && cres==controlled_step_result::fail && abs(h1)h1max) throwError("used step larger than provided"); // cres is still fail, redo with delta_min using the fixed-step integrator if (cres==controlled_step_result::fail) { GYOTO_SEVERE << "delta_min is too large: " << delta_min << endl; for (size_t i=0; i<=7; ++i) inout[i]=coord[i]; do_step_(inout, sgn*delta_min); } // update adaptive step delta_=h1; } else { // non adaptive case // do_Step_ is a lambda function encapsulating a fixed-step integrator // from Boost do_step_(inout, delta_); } for (size_t i=0; i<=7; ++i) coord[i]=inout[i]; checkNorm(coord); return line_->stopcond; } void Worldline::IntegState::Boost::doStep(double const coordin[8], double step, double coordout[8]) { // We first make a C++ std::array out of the bare C array: std::array inout = { coordin[0], coordin[1], coordin[2], coordin[3], coordin[4], coordin[5], coordin[6], coordin[7]}; // We call the Boost stepper do_step_(inout, step); // Copy the result for (size_t i=0; i<=7; ++i) coordout[i]=inout[i]; } std::string Worldline::IntegState::Boost::kind() { if (kind_== Kind::runge_kutta_cash_karp54) return "runge_kutta_cash_karp54"; if (kind_== Kind::runge_kutta_fehlberg78) return "runge_kutta_fehlberg78"; if (kind_== Kind::runge_kutta_dopri5) return "runge_kutta_dopri5"; if (kind_== Kind::runge_kutta_cash_karp54_classic) return "runge_kutta_cash_karp5"; throwError("unknown enum value"); return "error"; } #endif // GYOTO_HAVE_BOOST_INTEGRATORS Gyoto-1.2.0/lib/gyoto-uninstalled.pc.in000066400000000000000000000016351302352257300200020ustar00rootroot00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ pkglibdir=${libdir}/@PACKAGE@ localpkglibdir=@localpkglibdir@ top_srcdir=@abs_top_srcdir@ top_builddir=@abs_top_builddir@ GYOTO=${top_builddir}/bin/gyoto GYOTO_SOVERS=@sovers@ GYOTO_PLUGDIR=${pkglibdir}/${GYOTO_SOVERS} GYOTO_PLUGIN_SFX=@GYOTO_PLUGIN_SFX@ YORICK=@YORICK@ Y_INST_HOME=@Y_INST_HOME@ Y_INST_SITE=@Y_INST_SITE@ PYTHON=@PYTHON@ SWIG=@SWIG@ HOME_LORENE=@HOME_LORENE@ LORENECPPFLAGS=@LORENECPPFLAGS@ LORENELDFLAGS=@LORENELDFLAGS@ MPICXX=@MPICXX@ CXX=@CXX@ Name: Gyoto Description: Relativistic geodesic integration and ray-tracing Version: @VERSION@ URL: http://gyoto.obspm.fr Requires: @pkg_requires@ Conflicts: Libs: -L${top_builddir}/lib/.libs -lgyoto@FEATURES@ -ldl @pkg_libs@ @PTHREAD_LIBS@ Libs.private: Cflags: @CXXFLAGS@ -I${top_srcdir}/include -I${top_builddir}/include @pkg_cflags@ @PTHREAD_CFLAGS@ @BOOST_CPPFLAGS@ Gyoto-1.2.0/lib/gyoto.pc.in000066400000000000000000000014631302352257300154610ustar00rootroot00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ pkglibdir=${libdir}/@PACKAGE@ localpkglibdir=@localpkglibdir@ GYOTO=${exec_prefix}/bin/gyoto GYOTO_SOVERS=@sovers@ GYOTO_PLUGDIR=${pkglibdir}/${GYOTO_SOVERS} GYOTO_PLUGIN_SFX=@GYOTO_PLUGIN_SFX@ YORICK=@YORICK@ Y_INST_HOME=@Y_INST_HOME@ Y_INST_SITE=@Y_INST_SITE@ PYTHON=@PYTHON@ SWIG=@SWIG@ HOME_LORENE=@HOME_LORENE@ LORENECPPFLAGS=@LORENECPPFLAGS@ LORENELDFLAGS=@LORENELDFLAGS@ MPICXX=@MPICXX@ CXX=@CXX@ Name: Gyoto Description: Relativistic geodesic integration and ray-tracing Version: @VERSION@ URL: http://gyoto.obspm.fr Requires: @pkg_requires@ Conflicts: Libs: -L${libdir} -lgyoto@FEATURES@ -ldl @pkg_libs@ @PTHREAD_LIBS@ Libs.private: Cflags: @CXXFLAGS@ -I${includedir}/Gyoto @pkg_cflags@ @PTHREAD_CFLAGS@ @BOOST_CPPFLAGS@ Gyoto-1.2.0/ltmain.sh000066400000000000000000010520261302352257300144430ustar00rootroot00000000000000 # 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 Debian-2.4.2-1.7 # 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 Debian-2.4.2-1.7" 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%" test "X$link_all_deplibs" != Xno && libs="$libs $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" 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 elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi 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 ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; 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 Gyoto-1.2.0/m4/000077500000000000000000000000001302352257300131355ustar00rootroot00000000000000Gyoto-1.2.0/m4/ax_append_compile_flags.m4000066400000000000000000000056541302352257300202340ustar00rootroot00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html # =========================================================================== # # SYNOPSIS # # AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT]) # # DESCRIPTION # # For every FLAG1, FLAG2 it is checked whether the compiler works with the # flag. If it does, the flag is added FLAGS-VARIABLE # # If FLAGS-VARIABLE is not specified, the current language's flags (e.g. # CFLAGS) is used. During the check the flag is always added to the # current language's flags. # # If EXTRA-FLAGS is defined, it is added to the current language's default # flags (e.g. CFLAGS) when the check is done. The check is thus made with # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to # force the compiler to issue an error when a bad flag is given. # # INPUT gives an alternative input source to AC_COMPILE_IFELSE. # # NOTE: This macro depends on the AX_APPEND_FLAG and # AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with # AX_APPEND_LINK_FLAGS. # # LICENSE # # Copyright (c) 2011 Maarten Bosmans # # 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 3 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, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 5 AC_DEFUN([AX_APPEND_COMPILE_FLAGS], [AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) for flag in $1; do AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4]) done ])dnl AX_APPEND_COMPILE_FLAGS Gyoto-1.2.0/m4/ax_append_flag.m4000066400000000000000000000053311302352257300163310ustar00rootroot00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_append_flag.html # =========================================================================== # # SYNOPSIS # # AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) # # DESCRIPTION # # FLAG is appended to the FLAGS-VARIABLE shell variable, with a space # added in between. # # If FLAGS-VARIABLE is not specified, the current language's flags (e.g. # CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains # FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly # FLAG. # # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. # # LICENSE # # Copyright (c) 2008 Guido U. Draheim # Copyright (c) 2011 Maarten Bosmans # # 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 3 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, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 6 AC_DEFUN([AX_APPEND_FLAG], [dnl AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])]) AS_VAR_SET_IF(FLAGS,[ AS_CASE([" AS_VAR_GET(FLAGS) "], [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])], [ AS_VAR_APPEND(FLAGS,[" $1"]) AC_RUN_LOG([: FLAGS="$FLAGS"]) ]) ], [ AS_VAR_SET(FLAGS,[$1]) AC_RUN_LOG([: FLAGS="$FLAGS"]) ]) AS_VAR_POPDEF([FLAGS])dnl ])dnl AX_APPEND_FLAG Gyoto-1.2.0/m4/ax_append_link_flags.m4000066400000000000000000000055701302352257300175360ustar00rootroot00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html # =========================================================================== # # SYNOPSIS # # AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT]) # # DESCRIPTION # # For every FLAG1, FLAG2 it is checked whether the linker works with the # flag. If it does, the flag is added FLAGS-VARIABLE # # If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is # used. During the check the flag is always added to the linker's flags. # # If EXTRA-FLAGS is defined, it is added to the linker's default flags # when the check is done. The check is thus made with the flags: "LDFLAGS # EXTRA-FLAGS FLAG". This can for example be used to force the linker to # issue an error when a bad flag is given. # # INPUT gives an alternative input source to AC_COMPILE_IFELSE. # # NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG. # Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS. # # LICENSE # # Copyright (c) 2011 Maarten Bosmans # # 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 3 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, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 5 AC_DEFUN([AX_APPEND_LINK_FLAGS], [AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) for flag in $1; do AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3], [$4]) done ])dnl AX_APPEND_LINK_FLAGS Gyoto-1.2.0/m4/ax_check_compile_flag.m4000066400000000000000000000062511302352257300176510ustar00rootroot00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html # =========================================================================== # # SYNOPSIS # # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) # # DESCRIPTION # # Check whether the given FLAG works with the current language's compiler # or gives an error. (Warnings, however, are ignored) # # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on # success/failure. # # If EXTRA-FLAGS is defined, it is added to the current language's default # flags (e.g. CFLAGS) when the check is done. The check is thus made with # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to # force the compiler to issue an error when a bad flag is given. # # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. # # LICENSE # # Copyright (c) 2008 Guido U. Draheim # Copyright (c) 2011 Maarten Bosmans # # 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 3 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, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 2 AC_DEFUN([AX_CHECK_COMPILE_FLAG], [AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[no])]) _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], [m4_default([$2], :)], [m4_default([$3], :)]) AS_VAR_POPDEF([CACHEVAR])dnl ])dnl AX_CHECK_COMPILE_FLAGS Gyoto-1.2.0/m4/ax_check_link_flag.m4000066400000000000000000000061551302352257300171610ustar00rootroot00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html # =========================================================================== # # SYNOPSIS # # AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) # # DESCRIPTION # # Check whether the given FLAG works with the linker or gives an error. # (Warnings, however, are ignored) # # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on # success/failure. # # If EXTRA-FLAGS is defined, it is added to the linker's default flags # when the check is done. The check is thus made with the flags: "LDFLAGS # EXTRA-FLAGS FLAG". This can for example be used to force the linker to # issue an error when a bad flag is given. # # INPUT gives an alternative input source to AC_LINK_IFELSE. # # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this # macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. # # LICENSE # # Copyright (c) 2008 Guido U. Draheim # Copyright (c) 2011 Maarten Bosmans # # 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 3 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, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 4 AC_DEFUN([AX_CHECK_LINK_FLAG], [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ ax_check_save_flags=$LDFLAGS LDFLAGS="$LDFLAGS $4 $1" AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], [AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[no])]) LDFLAGS=$ax_check_save_flags]) AS_VAR_IF(CACHEVAR,yes, [m4_default([$2], :)], [m4_default([$3], :)]) AS_VAR_POPDEF([CACHEVAR])dnl ])dnl AX_CHECK_LINK_FLAGS Gyoto-1.2.0/m4/ax_cxx_compile_stdcxx_11.m4000066400000000000000000000112751302352257300203050ustar00rootroot00000000000000# ============================================================================ # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html # ============================================================================ # # SYNOPSIS # # AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) # # DESCRIPTION # # Check for baseline language coverage in the compiler for the C++11 # standard; if necessary, add switches to CXXFLAGS to enable support. # # The first argument, if specified, indicates whether you insist on an # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. # -std=c++11). If neither is specified, you get whatever works, with # preference for an extended mode. # # The second argument, if specified 'mandatory' or if left unspecified, # indicates that baseline C++11 support is required and that the macro # should error out if no mode with that support is found. If specified # 'optional', then configuration proceeds regardless, after defining # HAVE_CXX11 if and only if a supporting mode is found. # # LICENSE # # Copyright (c) 2008 Benjamin Kosnik # Copyright (c) 2012 Zack Weinberg # Copyright (c) 2013 Roy Stogner # Copyright (c) 2014 Alexey Sokolov # # 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 any # warranty. #serial 4 m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; struct Base { virtual void f() {} }; struct Child : public Base { virtual void f() override {} }; typedef check> right_angle_brackets; int a; decltype(a) b; typedef check check_type; check_type c; check_type&& cr = static_cast(c); auto d = a; auto l = [](){}; ]]) AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl m4_if([$1], [], [], [$1], [ext], [], [$1], [noext], [], [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], [$2], [optional], [ax_cxx_compile_cxx11_required=false], [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])]) AC_LANG_PUSH([C++])dnl ac_success=no AC_CACHE_CHECK(whether $CXX supports C++11 features by default, ax_cv_cxx_compile_cxx11, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], [ax_cv_cxx_compile_cxx11=yes], [ax_cv_cxx_compile_cxx11=no])]) if test x$ax_cv_cxx_compile_cxx11 = xyes; then ac_success=yes fi m4_if([$1], [noext], [], [dnl if test x$ac_success = xno; then for switch in -std=gnu++11 -std=gnu++0x; do cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, $cachevar, [ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $switch" AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], [eval $cachevar=yes], [eval $cachevar=no]) CXXFLAGS="$ac_save_CXXFLAGS"]) if eval test x\$$cachevar = xyes; then CXXFLAGS="$CXXFLAGS $switch" ac_success=yes break fi done fi]) m4_if([$1], [ext], [], [dnl if test x$ac_success = xno; then for switch in -std=c++11 -std=c++0x; do cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, $cachevar, [ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $switch" AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], [eval $cachevar=yes], [eval $cachevar=no]) CXXFLAGS="$ac_save_CXXFLAGS"]) if eval test x\$$cachevar = xyes; then CXXFLAGS="$CXXFLAGS $switch" ac_success=yes break fi done fi]) AC_LANG_POP([C++]) if test x$ax_cxx_compile_cxx11_required = xtrue; then if test x$ac_success = xno; then AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) fi else if test x$ac_success = xno; then HAVE_CXX11=0 AC_MSG_NOTICE([No compiler with C++11 support was found]) else HAVE_CXX11=1 AC_DEFINE(HAVE_CXX11,1, [define if the compiler supports basic C++11 syntax]) fi AC_SUBST(HAVE_CXX11) fi ]) Gyoto-1.2.0/m4/ax_pkg_swig.m4000066400000000000000000000155341302352257300157110ustar00rootroot00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html # =========================================================================== # # SYNOPSIS # # AX_PKG_SWIG([major.minor.micro], [action-if-found], [action-if-not-found]) # # DESCRIPTION # # This macro searches for a SWIG installation on your system. If found, # then SWIG is AC_SUBST'd; if not found, then $SWIG is empty. If SWIG is # found, then SWIG_LIB is set to the SWIG library path, and AC_SUBST'd. # # You can use the optional first argument to check if the version of the # available SWIG is greater than or equal to the value of the argument. It # should have the format: N[.N[.N]] (N is a number between 0 and 999. Only # the first N is mandatory.) If the version argument is given (e.g. # 1.3.17), AX_PKG_SWIG checks that the swig package is this version number # or higher. # # As usual, action-if-found is executed if SWIG is found, otherwise # action-if-not-found is executed. # # In configure.in, use as: # # AX_PKG_SWIG(1.3.17, [], [ AC_MSG_ERROR([SWIG is required to build..]) ]) # AX_SWIG_ENABLE_CXX # AX_SWIG_MULTI_MODULE_SUPPORT # AX_SWIG_PYTHON # # LICENSE # # Copyright (c) 2008 Sebastian Huber # Copyright (c) 2008 Alan W. Irwin # Copyright (c) 2008 Rafael Laboissiere # Copyright (c) 2008 Andrew Collier # Copyright (c) 2011 Murray Cumming # Copyright (c) 2015 Thibaut Paumard # # 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, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. # (Partial) History: # 2015-01-29, Thibaut Paumard: append swig3.0 to the list of # executables to try. #serial 11 AC_DEFUN([AX_PKG_SWIG],[ # Ubuntu has swig 2.0 as /usr/bin/swig2.0 # Debian has swig 3.0 as /usr/bin/swig3.0 AC_PATH_PROGS([SWIG],[swig swig2.0 swig3.0]) if test -z "$SWIG" ; then m4_ifval([$3],[$3],[:]) elif test -n "$1" ; then AC_MSG_CHECKING([SWIG version]) [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] AC_MSG_RESULT([$swig_version]) if test -n "$swig_version" ; then # Calculate the required version number components [required=$1] [required_major=`echo $required | sed 's/[^0-9].*//'`] if test -z "$required_major" ; then [required_major=0] fi [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] [required_minor=`echo $required | sed 's/[^0-9].*//'`] if test -z "$required_minor" ; then [required_minor=0] fi [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] [required_patch=`echo $required | sed 's/[^0-9].*//'`] if test -z "$required_patch" ; then [required_patch=0] fi # Calculate the available version number components [available=$swig_version] [available_major=`echo $available | sed 's/[^0-9].*//'`] if test -z "$available_major" ; then [available_major=0] fi [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] [available_minor=`echo $available | sed 's/[^0-9].*//'`] if test -z "$available_minor" ; then [available_minor=0] fi [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] [available_patch=`echo $available | sed 's/[^0-9].*//'`] if test -z "$available_patch" ; then [available_patch=0] fi # Convert the version tuple into a single number for easier comparison. # Using base 100 should be safe since SWIG internally uses BCD values # to encode its version number. required_swig_vernum=`expr $required_major \* 10000 \ \+ $required_minor \* 100 \+ $required_patch` available_swig_vernum=`expr $available_major \* 10000 \ \+ $available_minor \* 100 \+ $available_patch` if test $available_swig_vernum -lt $required_swig_vernum; then AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version.]) SWIG='' m4_ifval([$3],[$3],[]) else AC_MSG_CHECKING([for SWIG library]) SWIG_LIB=`$SWIG -swiglib` AC_MSG_RESULT([$SWIG_LIB]) m4_ifval([$2],[$2],[]) fi else AC_MSG_WARN([cannot determine SWIG version]) SWIG='' m4_ifval([$3],[$3],[]) fi fi AC_SUBST([SWIG_LIB]) ]) Gyoto-1.2.0/m4/ax_pthread.m4000066400000000000000000000303661302352257300155260ustar00rootroot00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_pthread.html # =========================================================================== # # SYNOPSIS # # AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) # # DESCRIPTION # # This macro figures out how to build C programs using POSIX threads. It # sets the PTHREAD_LIBS output variable to the threads library and linker # flags, and the PTHREAD_CFLAGS output variable to any special C compiler # flags that are needed. (The user can also force certain compiler # flags/libs to be tested by setting these environment variables.) # # Also sets PTHREAD_CC to any special C compiler that is needed for # multi-threaded programs (defaults to the value of CC otherwise). (This # is necessary on AIX to use the special cc_r compiler alias.) # # NOTE: You are assumed to not only compile your program with these flags, # but also link it with them as well. e.g. you should link with # $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS # # If you are only building threads programs, you may wish to use these # variables in your default LIBS, CFLAGS, and CC: # # LIBS="$PTHREAD_LIBS $LIBS" # CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # CC="$PTHREAD_CC" # # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant # has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name # (e.g. PTHREAD_CREATE_UNDETACHED on AIX). # # Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the # PTHREAD_PRIO_INHERIT symbol is defined when compiling with # PTHREAD_CFLAGS. # # ACTION-IF-FOUND is a list of shell commands to run if a threads library # is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it # is not found. If ACTION-IF-FOUND is not specified, the default action # will define HAVE_PTHREAD. # # Please let the authors know if this macro fails on any platform, or if # you have any other suggestions or comments. This macro was based on work # by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help # from M. Frigo), as well as ac_pthread and hb_pthread macros posted by # Alejandro Forero Cuervo to the autoconf macro repository. We are also # grateful for the helpful feedback of numerous users. # # Updated for Autoconf 2.68 by Daniel Richard G. # # LICENSE # # Copyright (c) 2008 Steven G. Johnson # Copyright (c) 2011 Daniel Richard G. # # 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 3 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, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 18 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_PUSH([C]) ax_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes) AC_MSG_RESULT($ax_pthread_ok) if test x"$ax_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case ${host_os} in solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" ;; darwin*) ax_pthread_flags="-pthread $ax_pthread_flags" ;; esac if test x"$ax_pthread_ok" = xno; then for flag in $ax_pthread_flags; do case $flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; -*) AC_MSG_CHECKING([whether pthreads work with $flag]) PTHREAD_CFLAGS="$flag" ;; pthread-config) AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no) if test x"$ax_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) AC_MSG_CHECKING([for the pthreads library -l$flag]) PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_LINK_IFELSE([AC_LANG_PROGRAM([#include static void routine(void *a) { a = 0; } static void *start_routine(void *a) { return a; }], [pthread_t th; pthread_attr_t attr; pthread_create(&th, 0, start_routine, 0); pthread_join(th, 0); pthread_attr_init(&attr); pthread_cleanup_push(routine, 0); pthread_cleanup_pop(0) /* ; */])], [ax_pthread_ok=yes], []) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" AC_MSG_RESULT($ax_pthread_ok) if test "x$ax_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$ax_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. AC_MSG_CHECKING([for joinable pthread attribute]) attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [int attr = $attr; return attr /* ; */])], [attr_name=$attr; break], []) done AC_MSG_RESULT($attr_name) if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, [Define to necessary symbol if this constant uses a non-standard name on your system.]) fi AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case ${host_os} in aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; osf* | hpux*) flag="-D_REENTRANT";; solaris*) if test "$GCC" = "yes"; then flag="-D_REENTRANT" else flag="-mt -D_REENTRANT" fi ;; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], ax_cv_PTHREAD_PRIO_INHERIT, [ AC_LINK_IFELSE([ AC_LANG_PROGRAM([[#include ]], [[int i = PTHREAD_PRIO_INHERIT;]])], [ax_cv_PTHREAD_PRIO_INHERIT=yes], [ax_cv_PTHREAD_PRIO_INHERIT=no]) ]) AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.])) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with xlc_r or cc_r if test x"$GCC" != xyes; then AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) else PTHREAD_CC=$CC fi else PTHREAD_CC="$CC" fi AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CC) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$ax_pthread_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) : else ax_pthread_ok=no $2 fi AC_LANG_POP ])dnl AX_PTHREAD Gyoto-1.2.0/m4/ax_require_defined.m4000066400000000000000000000023011302352257300172150ustar00rootroot00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_require_defined.html # =========================================================================== # # SYNOPSIS # # AX_REQUIRE_DEFINED(MACRO) # # DESCRIPTION # # AX_REQUIRE_DEFINED is a simple helper for making sure other macros have # been defined and thus are available for use. This avoids random issues # where a macro isn't expanded. Instead the configure script emits a # non-fatal: # # ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found # # It's like AC_REQUIRE except it doesn't expand the required macro. # # Here's an example: # # AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) # # LICENSE # # Copyright (c) 2014 Mike Frysinger # # 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 any # warranty. #serial 1 AC_DEFUN([AX_REQUIRE_DEFINED], [dnl m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])]) ])dnl AX_REQUIRE_DEFINED Gyoto-1.2.0/m4/boost.m4000066400000000000000000001374361302352257300145430ustar00rootroot00000000000000# boost.m4: Locate Boost headers and libraries for autoconf-based projects. # Copyright (C) 2007-2011, 2014 Benoit Sigoure # # 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 3 of the License, or # (at your option) any later version. # # Additional permission under section 7 of the GNU General Public # License, version 3 ("GPLv3"): # # If you convey this file as part of a work that contains a # configuration script generated by Autoconf, you may do so under # terms of your choice. # # 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 . m4_define([_BOOST_SERIAL], [m4_translit([ # serial 22 ], [# ], [])]) # Original sources can be found at http://github.com/tsuna/boost.m4 # You can fetch the latest version of the script by doing: # wget http://github.com/tsuna/boost.m4/raw/master/build-aux/boost.m4 # ------ # # README # # ------ # # This file provides several macros to use the various Boost libraries. # The first macro is BOOST_REQUIRE. It will simply check if it's possible to # find the Boost headers of a given (optional) minimum version and it will # define BOOST_CPPFLAGS accordingly. It will add an option --with-boost to # your configure so that users can specify non standard locations. # If the user's environment contains BOOST_ROOT and --with-boost was not # specified, --with-boost=$BOOST_ROOT is implicitly used. # For more README and documentation, go to http://github.com/tsuna/boost.m4 # Note: THESE MACROS ASSUME THAT YOU USE LIBTOOL. If you don't, don't worry, # simply read the README, it will show you what to do step by step. m4_pattern_forbid([^_?(BOOST|Boost)_]) # _BOOST_SED_CPP(SED-PROGRAM, PROGRAM, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # -------------------------------------------------------- # Same as AC_EGREP_CPP, but leave the result in conftest.i. # # SED-PROGRAM is *not* overquoted, as in AC_EGREP_CPP. It is expanded # in double-quotes, so escape your double quotes. # # It could be useful to turn this into a macro which extracts the # value of any macro. m4_define([_BOOST_SED_CPP], [AC_LANG_PUSH([C++])dnl AC_LANG_PREPROC_REQUIRE()dnl AC_REQUIRE([AC_PROG_SED])dnl AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])]) AS_IF([dnl eval is necessary to expand ac_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. dnl Beware of Windows end-of-lines, for instance if we are running dnl some Windows programs under Wine. In that case, boost/version.hpp dnl is certainly using "\r\n", but the regular Unix shell will only dnl strip `\n' with backquotes, not the `\r'. This results in dnl boost_cv_lib_version='1_37\r' for instance, which breaks dnl everything else. dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | tr -d '\r' | $SED -n -e "$1" >conftest.i 2>&1], [$3], [$4]) rm -rf conftest* AC_LANG_POP([C++])dnl ])# _BOOST_SED_CPP # BOOST_REQUIRE([VERSION], [ACTION-IF-NOT-FOUND]) # ----------------------------------------------- # Look for Boost. If version is given, it must either be a literal of the form # "X.Y.Z" where X, Y and Z are integers (the ".Z" part being optional) or a # variable "$var". # Defines the value BOOST_CPPFLAGS. This macro only checks for headers with # the required version, it does not check for any of the Boost libraries. # On # success, defines HAVE_BOOST. On failure, calls the optional # ACTION-IF-NOT-FOUND action if one was supplied. # Otherwise aborts with an error message. AC_DEFUN([BOOST_REQUIRE], [AC_REQUIRE([AC_PROG_CXX])dnl AC_REQUIRE([AC_PROG_GREP])dnl echo "$as_me: this is boost.m4[]_BOOST_SERIAL" >&AS_MESSAGE_LOG_FD boost_save_IFS=$IFS boost_version_req=$1 IFS=. set x $boost_version_req 0 0 0 IFS=$boost_save_IFS shift boost_version_req=`expr "$[1]" '*' 100000 + "$[2]" '*' 100 + "$[3]"` boost_version_req_string=$[1].$[2].$[3] AC_ARG_WITH([boost], [AS_HELP_STRING([--with-boost=DIR], [prefix of Boost $1 @<:@guess@:>@])])dnl AC_ARG_VAR([BOOST_ROOT],[Location of Boost installation])dnl # If BOOST_ROOT is set and the user has not provided a value to # --with-boost, then treat BOOST_ROOT as if it the user supplied it. if test x"$BOOST_ROOT" != x; then if test x"$with_boost" = x; then AC_MSG_NOTICE([Detected BOOST_ROOT; continuing with --with-boost=$BOOST_ROOT]) with_boost=$BOOST_ROOT else AC_MSG_NOTICE([Detected BOOST_ROOT=$BOOST_ROOT, but overridden by --with-boost=$with_boost]) fi fi AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], ["$DISTCHECK_CONFIGURE_FLAGS '--with-boost=$with_boost'"])dnl boost_save_CPPFLAGS=$CPPFLAGS AC_CACHE_CHECK([for Boost headers version >= $boost_version_req_string], [boost_cv_inc_path], [boost_cv_inc_path=no AC_LANG_PUSH([C++])dnl m4_pattern_allow([^BOOST_VERSION$])dnl AC_LANG_CONFTEST([AC_LANG_PROGRAM([[#include #if !defined BOOST_VERSION # error BOOST_VERSION is not defined #elif BOOST_VERSION < $boost_version_req # error Boost headers version < $boost_version_req #endif ]])]) # If the user provided a value to --with-boost, use it and only it. case $with_boost in #( ''|yes) set x '' /opt/local/include /usr/local/include /opt/include \ /usr/include C:/Boost/include;; #( *) set x "$with_boost/include" "$with_boost";; esac shift for boost_dir do # Without --layout=system, Boost (or at least some versions) installs # itself in /include/boost-. This inner loop helps to # find headers in such directories. # # Any ${boost_dir}/boost-x_xx directories are searched in reverse version # order followed by ${boost_dir}. The final '.' is a sentinel for # searching $boost_dir" itself. Entries are whitespace separated. # # I didn't indent this loop on purpose (to avoid over-indented code) boost_layout_system_search_list=`cd "$boost_dir" 2>/dev/null \ && ls -1 | "${GREP}" '^boost-' | sort -rn -t- -k2 \ && echo .` for boost_inc in $boost_layout_system_search_list do if test x"$boost_inc" != x.; then boost_inc="$boost_dir/$boost_inc" else boost_inc="$boost_dir" # Uses sentinel in boost_layout_system_search_list fi if test x"$boost_inc" != x; then # We are going to check whether the version of Boost installed # in $boost_inc is usable by running a compilation that # #includes it. But if we pass a -I/some/path in which Boost # is not installed, the compiler will just skip this -I and # use other locations (either from CPPFLAGS, or from its list # of system include directories). As a result we would use # header installed on the machine instead of the /some/path # specified by the user. So in that precise case (trying # $boost_inc), make sure the version.hpp exists. # # Use test -e as there can be symlinks. test -e "$boost_inc/boost/version.hpp" || continue CPPFLAGS="$CPPFLAGS -I$boost_inc" fi AC_COMPILE_IFELSE([], [boost_cv_inc_path=yes], [boost_cv_version=no]) if test x"$boost_cv_inc_path" = xyes; then if test x"$boost_inc" != x; then boost_cv_inc_path=$boost_inc fi break 2 fi done done AC_LANG_POP([C++])dnl ]) case $boost_cv_inc_path in #( no) boost_errmsg="cannot find Boost headers version >= $boost_version_req_string" m4_if([$2], [], [AC_MSG_ERROR([$boost_errmsg])], [AC_MSG_NOTICE([$boost_errmsg])]) $2 ;;#( yes) BOOST_CPPFLAGS= ;;#( *) AC_SUBST([BOOST_CPPFLAGS], ["-I$boost_cv_inc_path"])dnl ;; esac if test x"$boost_cv_inc_path" != xno; then AC_DEFINE([HAVE_BOOST], [1], [Defined if the requested minimum BOOST version is satisfied]) AC_CACHE_CHECK([for Boost's header version], [boost_cv_lib_version], [m4_pattern_allow([^BOOST_LIB_VERSION$])dnl _BOOST_SED_CPP([/^boost-lib-version = /{s///;s/\"//g;p;q;}], [#include boost-lib-version = BOOST_LIB_VERSION], [boost_cv_lib_version=`cat conftest.i`])]) # e.g. "134" for 1_34_1 or "135" for 1_35 boost_major_version=`echo "$boost_cv_lib_version" | sed 's/_//;s/_.*//'` case $boost_major_version in #( '' | *[[!0-9]]*) AC_MSG_ERROR([invalid value: boost_major_version=$boost_major_version]) ;; esac fi CPPFLAGS=$boost_save_CPPFLAGS ])# BOOST_REQUIRE # BOOST_STATIC() # -------------- # Add the "--enable-static-boost" configure argument. If this argument is given # on the command line, static versions of the libraries will be looked up. AC_DEFUN([BOOST_STATIC], [AC_ARG_ENABLE([static-boost], [AS_HELP_STRING([--enable-static-boost], [Prefer the static boost libraries over the shared ones [no]])], [enable_static_boost=yes], [enable_static_boost=no])])# BOOST_STATIC # BOOST_FIND_HEADER([HEADER-NAME], [ACTION-IF-NOT-FOUND], [ACTION-IF-FOUND]) # -------------------------------------------------------------------------- # Wrapper around AC_CHECK_HEADER for Boost headers. Useful to check for # some parts of the Boost library which are only made of headers and don't # require linking (such as Boost.Foreach). # # Default ACTION-IF-NOT-FOUND: Fail with a fatal error unless Boost couldn't be # found in the first place, in which case by default a notice is issued to the # user. Presumably if we haven't died already it's because it's OK to not have # Boost, which is why only a notice is issued instead of a hard error. # # Default ACTION-IF-FOUND: define the preprocessor symbol HAVE_ in # case of success # (where HEADER-NAME is written LIKE_THIS, e.g., # HAVE_BOOST_FOREACH_HPP). AC_DEFUN([BOOST_FIND_HEADER], [AC_REQUIRE([BOOST_REQUIRE])dnl if test x"$boost_cv_inc_path" = xno; then m4_default([$2], [AC_MSG_NOTICE([Boost not available, not searching for $1])]) else AC_LANG_PUSH([C++])dnl boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" AC_CHECK_HEADER([$1], [m4_default([$3], [AC_DEFINE(AS_TR_CPP([HAVE_$1]), [1], [Define to 1 if you have <$1>])])], [m4_default([$2], [AC_MSG_ERROR([cannot find $1])])]) CPPFLAGS=$boost_save_CPPFLAGS AC_LANG_POP([C++])dnl fi ])# BOOST_FIND_HEADER # BOOST_FIND_LIBS([COMPONENT-NAME], [CANDIDATE-LIB-NAMES], # [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], # [CXX-PROLOGUE]) # -------------------------------------------------------------- # Look for the Boost library COMPONENT-NAME (e.g., `thread', for # libboost_thread) under the possible CANDIDATE-LIB-NAMES (e.g., # "thread_win32 thread"). Check that HEADER-NAME works and check that # libboost_LIB-NAME can link with the code CXX-TEST. The optional # argument CXX-PROLOGUE can be used to include some C++ code before # the `main' function. # # Invokes BOOST_FIND_HEADER([HEADER-NAME]) (see above). # # Boost libraries typically come compiled with several flavors (with different # runtime options) so PREFERRED-RT-OPT is the preferred suffix. A suffix is one # or more of the following letters: sgdpn (in that order). s = static # runtime, d = debug build, g = debug/diagnostic runtime, p = STLPort build, # n = (unsure) STLPort build without iostreams from STLPort (it looks like `n' # must always be used along with `p'). Additionally, PREFERRED-RT-OPT can # start with `mt-' to indicate that there is a preference for multi-thread # builds. Some sample values for PREFERRED-RT-OPT: (nothing), mt, d, mt-d, gdp # ... If you want to make sure you have a specific version of Boost # (eg, >= 1.33) you *must* invoke BOOST_REQUIRE before this macro. AC_DEFUN([BOOST_FIND_LIBS], [AC_REQUIRE([BOOST_REQUIRE])dnl AC_REQUIRE([_BOOST_FIND_COMPILER_TAG])dnl AC_REQUIRE([BOOST_STATIC])dnl AC_REQUIRE([_BOOST_GUESS_WHETHER_TO_USE_MT])dnl if test x"$boost_cv_inc_path" = xno; then AC_MSG_NOTICE([Boost not available, not searching for the Boost $1 library]) else dnl The else branch is huge and wasn't intended on purpose. AC_LANG_PUSH([C++])dnl AS_VAR_PUSHDEF([Boost_lib], [boost_cv_lib_$1])dnl AS_VAR_PUSHDEF([Boost_lib_LDFLAGS], [boost_cv_lib_$1_LDFLAGS])dnl AS_VAR_PUSHDEF([Boost_lib_LDPATH], [boost_cv_lib_$1_LDPATH])dnl AS_VAR_PUSHDEF([Boost_lib_LIBS], [boost_cv_lib_$1_LIBS])dnl BOOST_FIND_HEADER([$4]) boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" AC_CACHE_CHECK([for the Boost $1 library], [Boost_lib], [_BOOST_FIND_LIBS($@)]) case $Boost_lib in #( (no) _AC_MSG_LOG_CONFTEST AC_MSG_ERROR([cannot find the flags to link with Boost $1]) ;; esac AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl CPPFLAGS=$boost_save_CPPFLAGS AS_VAR_POPDEF([Boost_lib])dnl AS_VAR_POPDEF([Boost_lib_LDFLAGS])dnl AS_VAR_POPDEF([Boost_lib_LDPATH])dnl AS_VAR_POPDEF([Boost_lib_LIBS])dnl AC_LANG_POP([C++])dnl fi ]) # BOOST_FIND_LIB([LIB-NAME], # [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], # [CXX-PROLOGUE]) # -------------------------------------------------------------- # Backward compatibility wrapper for BOOST_FIND_LIBS. AC_DEFUN([BOOST_FIND_LIB], [BOOST_FIND_LIBS([$1], $@)]) # _BOOST_FIND_LIBS([LIB-NAME], [CANDIDATE-LIB-NAMES], # [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], # [CXX-PROLOGUE]) # -------------------------------------------------------------- # Real implementation of BOOST_FIND_LIBS: rely on these local macros: # Boost_lib, Boost_lib_LDFLAGS, Boost_lib_LDPATH, Boost_lib_LIBS # # The algorithm is as follows: first look for a given library name # according to the user's PREFERRED-RT-OPT. For each library name, we # prefer to use the ones that carry the tag (toolset name). Each # library is searched through the various standard paths were Boost is # usually installed. If we can't find the standard variants, we try # to enforce -mt (for instance on MacOSX, libboost_thread.dylib # doesn't exist but there's -obviously- libboost_thread-mt.dylib). AC_DEFUN([_BOOST_FIND_LIBS], [Boost_lib=no case "$3" in #( (mt | mt-) boost_mt=-mt; boost_rtopt=;; #( (mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$3" : 'Xmt-*\(.*\)'`;; #( (*) boost_mt=; boost_rtopt=$3;; esac if test $enable_static_boost = yes; then boost_rtopt="s$boost_rtopt" fi # Find the proper debug variant depending on what we've been asked to find. case $boost_rtopt in #( (*d*) boost_rt_d=$boost_rtopt;; #( (*[[sgpn]]*) # Insert the `d' at the right place (in between `sg' and `pn') boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #( (*) boost_rt_d='-d';; esac # If the PREFERRED-RT-OPT are not empty, prepend a `-'. test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt" $boost_guess_use_mt && boost_mt=-mt # Look for the abs path the static archive. # $libext is computed by Libtool but let's make sure it's non empty. test -z "$libext" && AC_MSG_ERROR([the libext variable is empty, did you invoke Libtool?]) boost_save_ac_objext=$ac_objext # Generate the test file. AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$4> $6], [$5])]) dnl Optimization hacks: compiling C++ is slow, especially with Boost. What dnl we're trying to do here is guess the right combination of link flags dnl (LIBS / LDFLAGS) to use a given library. This can take several dnl iterations before it succeeds and is thus *very* slow. So what we do dnl instead is that we compile the code first (and thus get an object file, dnl typically conftest.o). Then we try various combinations of link flags dnl until we succeed to link conftest.o in an executable. The problem is dnl that the various TRY_LINK / COMPILE_IFELSE macros of Autoconf always dnl remove all the temporary files including conftest.o. So the trick here dnl is to temporarily change the value of ac_objext so that conftest.o is dnl preserved accross tests. This is obviously fragile and I will burn in dnl hell for not respecting Autoconf's documented interfaces, but in the dnl mean time, it optimizes the macro by a factor of 5 to 30. dnl Another small optimization: the first argument of AC_COMPILE_IFELSE left dnl empty because the test file is generated only once above (before we dnl start the for loops). AC_COMPILE_IFELSE([], [ac_objext=do_not_rm_me_plz], [AC_MSG_ERROR([cannot compile a test that uses Boost $1])]) ac_objext=$boost_save_ac_objext boost_failed_libs= # Don't bother to ident the following nested for loops, only the 2 # innermost ones matter. for boost_lib_ in $2; do for boost_tag_ in -$boost_cv_lib_tag ''; do for boost_ver_ in -$boost_cv_lib_version ''; do for boost_mt_ in $boost_mt -mt ''; do for boost_rtopt_ in $boost_rtopt '' -d; do for boost_lib in \ boost_$boost_lib_$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ boost_$boost_lib_$boost_tag_$boost_rtopt_$boost_ver_ \ boost_$boost_lib_$boost_tag_$boost_mt_$boost_ver_ \ boost_$boost_lib_$boost_tag_$boost_ver_ do # Avoid testing twice the same lib case $boost_failed_libs in #( (*@$boost_lib@*) continue;; esac # If with_boost is empty, we'll search in /lib first, which is not quite # right so instead we'll try to a location based on where the headers are. boost_tmp_lib=$with_boost test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include} for boost_ldpath in "$boost_tmp_lib/lib" '' \ /opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \ "$with_boost" C:/Boost/lib /lib* do # Don't waste time with directories that don't exist. if test x"$boost_ldpath" != x && test ! -e "$boost_ldpath"; then continue fi boost_save_LDFLAGS=$LDFLAGS # Are we looking for a static library? case $boost_ldpath:$boost_rtopt_ in #( (*?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt) Boost_lib_LIBS="$boost_ldpath/lib$boost_lib.$libext" test -e "$Boost_lib_LIBS" || continue;; #( (*) # No: use -lboost_foo to find the shared library. Boost_lib_LIBS="-l$boost_lib";; esac boost_save_LIBS=$LIBS LIBS="$Boost_lib_LIBS $LIBS" test x"$boost_ldpath" != x && LDFLAGS="$LDFLAGS -L$boost_ldpath" dnl First argument of AC_LINK_IFELSE left empty because the test file is dnl generated only once above (before we start the for loops). _BOOST_AC_LINK_IFELSE([], [Boost_lib=yes], [Boost_lib=no]) ac_objext=$boost_save_ac_objext LDFLAGS=$boost_save_LDFLAGS LIBS=$boost_save_LIBS if test x"$Boost_lib" = xyes; then # Check or used cached result of whether or not using -R or # -rpath makes sense. Some implementations of ld, such as for # Mac OSX, require -rpath but -R is the flag known to work on # other systems. https://github.com/tsuna/boost.m4/issues/19 AC_CACHE_VAL([boost_cv_rpath_link_ldflag], [case $boost_ldpath in '') # Nothing to do. boost_cv_rpath_link_ldflag= boost_rpath_link_ldflag_found=yes;; *) for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath" LIBS="$boost_save_LIBS $Boost_lib_LIBS" _BOOST_AC_LINK_IFELSE([], [boost_rpath_link_ldflag_found=yes break], [boost_rpath_link_ldflag_found=no]) done ;; esac AS_IF([test "x$boost_rpath_link_ldflag_found" != "xyes"], [AC_MSG_ERROR([Unable to determine whether to use -R or -rpath])]) LDFLAGS=$boost_save_LDFLAGS LIBS=$boost_save_LIBS ]) test x"$boost_ldpath" != x && Boost_lib_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath" Boost_lib_LDPATH="$boost_ldpath" break 7 else boost_failed_libs="$boost_failed_libs@$boost_lib@" fi done done done done done done done # boost_lib_ rm -f conftest.$ac_objext ]) # --------------------------------------- # # Checks for the various Boost libraries. # # --------------------------------------- # # List of boost libraries: http://www.boost.org/libs/libraries.htm # The page http://beta.boost.org/doc/libs is useful: it gives the first release # version of each library (among other things). # BOOST_DEFUN(LIBRARY, CODE) # -------------------------- # Define BOOST_ as a macro that runs CODE. # # Use indir to avoid the warning on underquoted macro name given to AC_DEFUN. m4_define([BOOST_DEFUN], [m4_indir([AC_DEFUN], m4_toupper([BOOST_$1]), [m4_pushdef([BOOST_Library], [$1])dnl $2 m4_popdef([BOOST_Library])dnl ]) ]) # BOOST_ARRAY() # ------------- # Look for Boost.Array BOOST_DEFUN([Array], [BOOST_FIND_HEADER([boost/array.hpp])]) # BOOST_ASIO() # ------------ # Look for Boost.Asio (new in Boost 1.35). BOOST_DEFUN([Asio], [AC_REQUIRE([BOOST_SYSTEM])dnl BOOST_FIND_HEADER([boost/asio.hpp])]) # BOOST_BIND() # ------------ # Look for Boost.Bind. BOOST_DEFUN([Bind], [BOOST_FIND_HEADER([boost/bind.hpp])]) # BOOST_CHRONO() # -------------- # Look for Boost.Chrono. BOOST_DEFUN([Chrono], [# Do we have to check for Boost.System? This link-time dependency was # added as of 1.35.0. If we have a version <1.35, we must not attempt to # find Boost.System as it didn't exist by then. if test $boost_major_version -ge 135; then BOOST_SYSTEM([$1]) fi # end of the Boost.System check. boost_filesystem_save_LIBS=$LIBS boost_filesystem_save_LDFLAGS=$LDFLAGS m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl LIBS="$LIBS $BOOST_SYSTEM_LIBS" LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" BOOST_FIND_LIB([chrono], [$1], [boost/chrono.hpp], [boost::chrono::thread_clock d;]) if test $enable_static_boost = yes && test $boost_major_version -ge 135; then BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS" fi LIBS=$boost_filesystem_save_LIBS LDFLAGS=$boost_filesystem_save_LDFLAGS ])# BOOST_CHRONO # BOOST_CONVERSION() # ------------------ # Look for Boost.Conversion (cast / lexical_cast) BOOST_DEFUN([Conversion], [BOOST_FIND_HEADER([boost/cast.hpp]) BOOST_FIND_HEADER([boost/lexical_cast.hpp]) ])# BOOST_CONVERSION # BOOST_CRC() # ----------- # Look for Boost.CRC BOOST_DEFUN([CRC], [BOOST_FIND_HEADER([boost/crc.hpp]) ])# BOOST_CRC # BOOST_DATE_TIME([PREFERRED-RT-OPT]) # ----------------------------------- # Look for Boost.Date_Time. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Date_Time], [BOOST_FIND_LIB([date_time], [$1], [boost/date_time/posix_time/posix_time.hpp], [boost::posix_time::ptime t;]) ])# BOOST_DATE_TIME # BOOST_FILESYSTEM([PREFERRED-RT-OPT]) # ------------------------------------ # Look for Boost.Filesystem. For the documentation of PREFERRED-RT-OPT, see # the documentation of BOOST_FIND_LIB above. # Do not check for boost/filesystem.hpp because this file was introduced in # 1.34. BOOST_DEFUN([Filesystem], [# Do we have to check for Boost.System? This link-time dependency was # added as of 1.35.0. If we have a version <1.35, we must not attempt to # find Boost.System as it didn't exist by then. if test $boost_major_version -ge 135; then BOOST_SYSTEM([$1]) fi # end of the Boost.System check. boost_filesystem_save_LIBS=$LIBS boost_filesystem_save_LDFLAGS=$LDFLAGS m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl LIBS="$LIBS $BOOST_SYSTEM_LIBS" LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" BOOST_FIND_LIB([filesystem], [$1], [boost/filesystem/path.hpp], [boost::filesystem::path p;]) if test $enable_static_boost = yes && test $boost_major_version -ge 135; then BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS" fi LIBS=$boost_filesystem_save_LIBS LDFLAGS=$boost_filesystem_save_LDFLAGS ])# BOOST_FILESYSTEM # BOOST_FLYWEIGHT() # ----------------- # Look for Boost.Flyweight. BOOST_DEFUN([Flyweight], [dnl There's a hidden dependency on pthreads. AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl BOOST_FIND_HEADER([boost/flyweight.hpp]) AC_SUBST([BOOST_FLYWEIGHT_LIBS], [$boost_cv_pthread_flag]) ]) # BOOST_FOREACH() # --------------- # Look for Boost.Foreach. BOOST_DEFUN([Foreach], [BOOST_FIND_HEADER([boost/foreach.hpp])]) # BOOST_FORMAT() # -------------- # Look for Boost.Format. # Note: we can't check for boost/format/format_fwd.hpp because the header isn't # standalone. It can't be compiled because it triggers the following error: # boost/format/detail/config_macros.hpp:88: error: 'locale' in namespace 'std' # does not name a type BOOST_DEFUN([Format], [BOOST_FIND_HEADER([boost/format.hpp])]) # BOOST_FUNCTION() # ---------------- # Look for Boost.Function BOOST_DEFUN([Function], [BOOST_FIND_HEADER([boost/function.hpp])]) # BOOST_GEOMETRY() # ---------------- # Look for Boost.Geometry (new since 1.47.0). BOOST_DEFUN([Geometry], [BOOST_FIND_HEADER([boost/geometry.hpp]) ])# BOOST_GEOMETRY # BOOST_GRAPH([PREFERRED-RT-OPT]) # ------------------------------- # Look for Boost.Graphs. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Graph], [BOOST_FIND_LIB([graph], [$1], [boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;]) ])# BOOST_GRAPH # BOOST_IOSTREAMS([PREFERRED-RT-OPT]) # ----------------------------------- # Look for Boost.IOStreams. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([IOStreams], [BOOST_FIND_LIB([iostreams], [$1], [boost/iostreams/device/file_descriptor.hpp], [boost::iostreams::file_descriptor fd; fd.close();]) ])# BOOST_IOSTREAMS # BOOST_HASH() # ------------ # Look for Boost.Functional/Hash BOOST_DEFUN([Hash], [BOOST_FIND_HEADER([boost/functional/hash.hpp])]) # BOOST_LAMBDA() # -------------- # Look for Boost.Lambda BOOST_DEFUN([Lambda], [BOOST_FIND_HEADER([boost/lambda/lambda.hpp])]) # BOOST_LOG([PREFERRED-RT-OPT]) # ----------------------------- # Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Log], [BOOST_FIND_LIB([log], [$1], [boost/log/core/core.hpp], [boost::log::attribute a; a.get_value();]) ])# BOOST_LOG # BOOST_LOG_SETUP([PREFERRED-RT-OPT]) # ----------------------------------- # Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Log_Setup], [AC_REQUIRE([BOOST_LOG])dnl BOOST_FIND_LIB([log_setup], [$1], [boost/log/utility/setup/from_settings.hpp], [boost::log::basic_settings bs; bs.empty();]) ])# BOOST_LOG_SETUP # BOOST_MATH() # ------------ # Look for Boost.Math # TODO: This library isn't header-only but it comes in multiple different # flavors that don't play well with BOOST_FIND_LIB (e.g, libboost_math_c99, # libboost_math_c99f, libboost_math_c99l, libboost_math_tr1, # libboost_math_tr1f, libboost_math_tr1l). This macro must be fixed to do the # right thing anyway. BOOST_DEFUN([Math], [BOOST_FIND_HEADER([boost/math/special_functions.hpp])]) # BOOST_MPI([PREFERRED-RT-OPT]) # ------------------------------- # Look for Boost MPI. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. Uses MPICXX variable if it is # set, otherwise tries CXX # BOOST_DEFUN([MPI], [boost_save_CXX=${CXX} boost_save_CXXCPP=${CXXCPP} if test x"${MPICXX}" != x; then CXX=${MPICXX} CXXCPP="${MPICXX} -E" fi BOOST_FIND_LIB([mpi], [$1], [boost/mpi.hpp], [int argc = 0; char **argv = 0; boost::mpi::environment env(argc,argv);]) CXX=${boost_save_CXX} CXXCPP=${boost_save_CXXCPP} ])# BOOST_MPI # BOOST_MULTIARRAY() # ------------------ # Look for Boost.MultiArray BOOST_DEFUN([MultiArray], [BOOST_FIND_HEADER([boost/multi_array.hpp])]) # BOOST_NUMERIC_UBLAS() # -------------------------- # Look for Boost.NumericUblas (Basic Linear Algebra) BOOST_DEFUN([Numeric_Ublas], [BOOST_FIND_HEADER([boost/numeric/ublas/vector.hpp]) ])# BOOST_NUMERIC_UBLAS # BOOST_NUMERIC_CONVERSION() # -------------------------- # Look for Boost.NumericConversion (policy-based numeric conversion) BOOST_DEFUN([Numeric_Conversion], [BOOST_FIND_HEADER([boost/numeric/conversion/converter.hpp]) ])# BOOST_NUMERIC_CONVERSION # BOOST_OPTIONAL() # ---------------- # Look for Boost.Optional BOOST_DEFUN([Optional], [BOOST_FIND_HEADER([boost/optional.hpp])]) # BOOST_PREPROCESSOR() # -------------------- # Look for Boost.Preprocessor BOOST_DEFUN([Preprocessor], [BOOST_FIND_HEADER([boost/preprocessor/repeat.hpp])]) # BOOST_UNORDERED() # ----------------- # Look for Boost.Unordered BOOST_DEFUN([Unordered], [BOOST_FIND_HEADER([boost/unordered_map.hpp])]) # BOOST_UUID() # ------------ # Look for Boost.Uuid BOOST_DEFUN([Uuid], [BOOST_FIND_HEADER([boost/uuid/uuid.hpp])]) # BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT]) # ----------------------------------------- # Look for Boost.Program_options. For the documentation of PREFERRED-RT-OPT, # see the documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Program_Options], [BOOST_FIND_LIB([program_options], [$1], [boost/program_options.hpp], [boost::program_options::options_description d("test");]) ])# BOOST_PROGRAM_OPTIONS # _BOOST_PYTHON_CONFIG(VARIABLE, FLAG) # ------------------------------------ # Save VARIABLE, and define it via `python-config --FLAG`. # Substitute BOOST_PYTHON_VARIABLE. m4_define([_BOOST_PYTHON_CONFIG], [AC_SUBST([BOOST_PYTHON_$1], [`python-config --$2 2>/dev/null`])dnl boost_python_save_$1=$$1 $1="$$1 $BOOST_PYTHON_$1"]) # BOOST_PYTHON([PREFERRED-RT-OPT]) # -------------------------------- # Look for Boost.Python. For the documentation of PREFERRED-RT-OPT, # see the documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Python], [_BOOST_PYTHON_CONFIG([CPPFLAGS], [includes]) _BOOST_PYTHON_CONFIG([LDFLAGS], [ldflags]) _BOOST_PYTHON_CONFIG([LIBS], [libs]) m4_pattern_allow([^BOOST_PYTHON_MODULE$])dnl BOOST_FIND_LIBS([python], [python python3], [$1], [boost/python.hpp], [], [BOOST_PYTHON_MODULE(empty) {}]) CPPFLAGS=$boost_python_save_CPPFLAGS LDFLAGS=$boost_python_save_LDFLAGS LIBS=$boost_python_save_LIBS ])# BOOST_PYTHON # BOOST_REF() # ----------- # Look for Boost.Ref BOOST_DEFUN([Ref], [BOOST_FIND_HEADER([boost/ref.hpp])]) # BOOST_REGEX([PREFERRED-RT-OPT]) # ------------------------------- # Look for Boost.Regex. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Regex], [BOOST_FIND_LIB([regex], [$1], [boost/regex.hpp], [boost::regex exp("*"); boost::regex_match("foo", exp);]) ])# BOOST_REGEX # BOOST_SERIALIZATION([PREFERRED-RT-OPT]) # --------------------------------------- # Look for Boost.Serialization. For the documentation of PREFERRED-RT-OPT, see # the documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Serialization], [BOOST_FIND_LIB([serialization], [$1], [boost/archive/text_oarchive.hpp], [std::ostream* o = 0; // Cheap way to get an ostream... boost::archive::text_oarchive t(*o);]) ])# BOOST_SERIALIZATION # BOOST_SIGNALS([PREFERRED-RT-OPT]) # --------------------------------- # Look for Boost.Signals. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Signals], [BOOST_FIND_LIB([signals], [$1], [boost/signal.hpp], [boost::signal s;]) ])# BOOST_SIGNALS # BOOST_SIGNALS2() # ---------------- # Look for Boost.Signals2 (new since 1.39.0). BOOST_DEFUN([Signals2], [BOOST_FIND_HEADER([boost/signals2.hpp]) ])# BOOST_SIGNALS2 # BOOST_SMART_PTR() # ----------------- # Look for Boost.SmartPtr BOOST_DEFUN([Smart_Ptr], [BOOST_FIND_HEADER([boost/scoped_ptr.hpp]) BOOST_FIND_HEADER([boost/shared_ptr.hpp]) ]) # BOOST_STATICASSERT() # -------------------- # Look for Boost.StaticAssert BOOST_DEFUN([StaticAssert], [BOOST_FIND_HEADER([boost/static_assert.hpp])]) # BOOST_STRING_ALGO() # ------------------- # Look for Boost.StringAlgo BOOST_DEFUN([String_Algo], [BOOST_FIND_HEADER([boost/algorithm/string.hpp]) ]) # BOOST_SYSTEM([PREFERRED-RT-OPT]) # -------------------------------- # Look for Boost.System. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. This library was introduced in Boost # 1.35.0. BOOST_DEFUN([System], [BOOST_FIND_LIB([system], [$1], [boost/system/error_code.hpp], [boost::system::error_code e; e.clear();]) ])# BOOST_SYSTEM # BOOST_TEST([PREFERRED-RT-OPT]) # ------------------------------ # Look for Boost.Test. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Test], [m4_pattern_allow([^BOOST_CHECK$])dnl BOOST_FIND_LIB([unit_test_framework], [$1], [boost/test/unit_test.hpp], [BOOST_CHECK(2 == 2);], [using boost::unit_test::test_suite; test_suite* init_unit_test_suite(int argc, char ** argv) { return NULL; }]) ])# BOOST_TEST # BOOST_THREAD([PREFERRED-RT-OPT]) # --------------------------------- # Look for Boost.Thread. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Thread], [dnl Having the pthread flag is required at least on GCC3 where dnl boost/thread.hpp would complain if we try to compile without dnl -pthread on GNU/Linux. AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl boost_thread_save_LIBS=$LIBS boost_thread_save_LDFLAGS=$LDFLAGS boost_thread_save_CPPFLAGS=$CPPFLAGS # Link-time dependency from thread to system was added as of 1.49.0. if test $boost_major_version -ge 149; then BOOST_SYSTEM([$1]) fi # end of the Boost.System check. m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl LIBS="$LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag" LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" CPPFLAGS="$CPPFLAGS $boost_cv_pthread_flag" # When compiling for the Windows platform, the threads library is named # differently. case $host_os in (*mingw*) boost_thread_lib_ext=_win32;; esac BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext], [$1], [boost/thread.hpp], [boost::thread t; boost::mutex m;]) BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag" BOOST_THREAD_LDFLAGS="$BOOST_SYSTEM_LDFLAGS" BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag" LIBS=$boost_thread_save_LIBS LDFLAGS=$boost_thread_save_LDFLAGS CPPFLAGS=$boost_thread_save_CPPFLAGS ])# BOOST_THREAD AU_ALIAS([BOOST_THREADS], [BOOST_THREAD]) # BOOST_TOKENIZER() # ----------------- # Look for Boost.Tokenizer BOOST_DEFUN([Tokenizer], [BOOST_FIND_HEADER([boost/tokenizer.hpp])]) # BOOST_TRIBOOL() # --------------- # Look for Boost.Tribool BOOST_DEFUN([Tribool], [BOOST_FIND_HEADER([boost/logic/tribool_fwd.hpp]) BOOST_FIND_HEADER([boost/logic/tribool.hpp]) ]) # BOOST_TUPLE() # ------------- # Look for Boost.Tuple BOOST_DEFUN([Tuple], [BOOST_FIND_HEADER([boost/tuple/tuple.hpp])]) # BOOST_TYPETRAITS() # -------------------- # Look for Boost.TypeTraits BOOST_DEFUN([TypeTraits], [BOOST_FIND_HEADER([boost/type_traits.hpp])]) # BOOST_UTILITY() # --------------- # Look for Boost.Utility (noncopyable, result_of, base-from-member idiom, # etc.) BOOST_DEFUN([Utility], [BOOST_FIND_HEADER([boost/utility.hpp])]) # BOOST_VARIANT() # --------------- # Look for Boost.Variant. BOOST_DEFUN([Variant], [BOOST_FIND_HEADER([boost/variant/variant_fwd.hpp]) BOOST_FIND_HEADER([boost/variant.hpp])]) # BOOST_POINTER_CONTAINER() # ------------------------ # Look for Boost.PointerContainer BOOST_DEFUN([Pointer_Container], [BOOST_FIND_HEADER([boost/ptr_container/ptr_deque.hpp]) BOOST_FIND_HEADER([boost/ptr_container/ptr_list.hpp]) BOOST_FIND_HEADER([boost/ptr_container/ptr_vector.hpp]) BOOST_FIND_HEADER([boost/ptr_container/ptr_array.hpp]) BOOST_FIND_HEADER([boost/ptr_container/ptr_set.hpp]) BOOST_FIND_HEADER([boost/ptr_container/ptr_map.hpp]) ])# BOOST_POINTER_CONTAINER # BOOST_WAVE([PREFERRED-RT-OPT]) # ------------------------------ # NOTE: If you intend to use Wave/Spirit with thread support, make sure you # call BOOST_THREAD first. # Look for Boost.Wave. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Wave], [AC_REQUIRE([BOOST_FILESYSTEM])dnl AC_REQUIRE([BOOST_DATE_TIME])dnl boost_wave_save_LIBS=$LIBS boost_wave_save_LDFLAGS=$LDFLAGS m4_pattern_allow([^BOOST_((FILE)?SYSTEM|DATE_TIME|THREAD)_(LIBS|LDFLAGS)$])dnl LIBS="$LIBS $BOOST_SYSTEM_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_DATE_TIME_LIBS \ $BOOST_THREAD_LIBS" LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS \ $BOOST_DATE_TIME_LDFLAGS $BOOST_THREAD_LDFLAGS" BOOST_FIND_LIB([wave], [$1], [boost/wave.hpp], [boost::wave::token_id id; get_token_name(id);]) LIBS=$boost_wave_save_LIBS LDFLAGS=$boost_wave_save_LDFLAGS ])# BOOST_WAVE # BOOST_XPRESSIVE() # ----------------- # Look for Boost.Xpressive (new since 1.36.0). BOOST_DEFUN([Xpressive], [BOOST_FIND_HEADER([boost/xpressive/xpressive.hpp])]) # ----------------- # # Internal helpers. # # ----------------- # # _BOOST_PTHREAD_FLAG() # --------------------- # Internal helper for BOOST_THREAD. Computes boost_cv_pthread_flag # which must be used in CPPFLAGS and LIBS. # # Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3, # boost/thread.hpp will trigger a #error if -pthread isn't used: # boost/config/requires_threads.hpp:47:5: #error "Compiler threading support # is not turned on. Please set the correct command line options for # threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" # # Based on ACX_PTHREAD: http://autoconf-archive.cryp.to/acx_pthread.html AC_DEFUN([_BOOST_PTHREAD_FLAG], [AC_REQUIRE([AC_PROG_CXX])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_LANG_PUSH([C++])dnl AC_CACHE_CHECK([for the flags needed to use pthreads], [boost_cv_pthread_flag], [ boost_cv_pthread_flag= # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # (none): in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -lpthreads: AIX (must check this before -lpthread) # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # -llthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: GNU Linux/GCC (kernel threads), BSD/GCC (userland threads) # -pthreads: Solaris/GCC # -mthreads: MinGW32/GCC, Lynx/GCC # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # -lpthread: GNU Linux, etc. # --thread-safe: KAI C++ case $host_os in #( *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: boost_pthread_flags="-pthreads -lpthread -mt -pthread";; #( *) boost_pthread_flags="-lpthreads -Kthread -kthread -llthread -pthread \ -pthreads -mthreads -lpthread --thread-safe -mt";; esac # Generate the test file. AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include ], [pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0);])]) for boost_pthread_flag in '' $boost_pthread_flags; do boost_pthread_ok=false dnl Re-use the test file already generated. boost_pthreads__save_LIBS=$LIBS LIBS="$LIBS $boost_pthread_flag" AC_LINK_IFELSE([], [if grep ".*$boost_pthread_flag" conftest.err; then echo "This flag seems to have triggered warnings" >&AS_MESSAGE_LOG_FD else boost_pthread_ok=:; boost_cv_pthread_flag=$boost_pthread_flag fi]) LIBS=$boost_pthreads__save_LIBS $boost_pthread_ok && break done ]) AC_LANG_POP([C++])dnl ])# _BOOST_PTHREAD_FLAG # _BOOST_gcc_test(MAJOR, MINOR) # ----------------------------- # Internal helper for _BOOST_FIND_COMPILER_TAG. m4_define([_BOOST_gcc_test], ["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC @ gcc$1$2"])dnl # _BOOST_mingw_test(MAJOR, MINOR) # ----------------------------- # Internal helper for _BOOST_FIND_COMPILER_TAG. m4_define([_BOOST_mingw_test], ["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC && \ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw$1$2"])dnl # _BOOST_FIND_COMPILER_TAG() # -------------------------- # Internal. When Boost is installed without --layout=system, each library # filename will hold a suffix that encodes the compiler used during the # build. The Boost build system seems to call this a `tag'. AC_DEFUN([_BOOST_FIND_COMPILER_TAG], [AC_REQUIRE([AC_PROG_CXX])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_CACHE_CHECK([for the toolset name used by Boost for $CXX], [boost_cv_lib_tag], [boost_cv_lib_tag=unknown if test x$boost_cv_inc_path != xno; then AC_LANG_PUSH([C++])dnl # The following tests are mostly inspired by boost/config/auto_link.hpp # The list is sorted to most recent/common to oldest compiler (in order # to increase the likelihood of finding the right compiler with the # least number of compilation attempt). # Beware that some tests are sensible to the order (for instance, we must # look for MinGW before looking for GCC3). # I used one compilation test per compiler with a #error to recognize # each compiler so that it works even when cross-compiling (let me know # if you know a better approach). # Known missing tags (known from Boost's tools/build/v2/tools/common.jam): # como, edg, kcc, bck, mp, sw, tru, xlc # I'm not sure about my test for `il' (be careful: Intel's ICC pre-defines # the same defines as GCC's). for i in \ _BOOST_mingw_test(4,8) \ _BOOST_gcc_test(4, 8) \ _BOOST_mingw_test(4,7) \ _BOOST_gcc_test(4, 7) \ _BOOST_mingw_test(4,6) \ _BOOST_gcc_test(4, 6) \ _BOOST_mingw_test(4,5) \ _BOOST_gcc_test(4, 5) \ _BOOST_mingw_test(4,4) \ _BOOST_gcc_test(4, 4) \ _BOOST_mingw_test(4,3) \ _BOOST_gcc_test(4, 3) \ _BOOST_mingw_test(4,2) \ _BOOST_gcc_test(4, 2) \ _BOOST_mingw_test(4,1) \ _BOOST_gcc_test(4, 1) \ _BOOST_mingw_test(4,0) \ _BOOST_gcc_test(4, 0) \ "defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \ && (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw" \ _BOOST_gcc_test(3, 4) \ _BOOST_gcc_test(3, 3) \ "defined _MSC_VER && _MSC_VER >= 1500 @ vc90" \ "defined _MSC_VER && _MSC_VER == 1400 @ vc80" \ _BOOST_gcc_test(3, 2) \ "defined _MSC_VER && _MSC_VER == 1310 @ vc71" \ _BOOST_gcc_test(3, 1) \ _BOOST_gcc_test(3, 0) \ "defined __BORLANDC__ @ bcb" \ "defined __ICC && (defined __unix || defined __unix__) @ il" \ "defined __ICL @ iw" \ "defined _MSC_VER && _MSC_VER == 1300 @ vc7" \ _BOOST_gcc_test(2, 95) \ "defined __MWERKS__ && __MWERKS__ <= 0x32FF @ cw9" \ "defined _MSC_VER && _MSC_VER < 1300 && !defined UNDER_CE @ vc6" \ "defined _MSC_VER && _MSC_VER < 1300 && defined UNDER_CE @ evc4" \ "defined __MWERKS__ && __MWERKS__ <= 0x31FF @ cw8" do boost_tag_test=`expr "X$i" : 'X\([[^@]]*\) @ '` boost_tag=`expr "X$i" : 'X[[^@]]* @ \(.*\)'` AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #if $boost_tag_test /* OK */ #else # error $boost_tag_test #endif ]])], [boost_cv_lib_tag=$boost_tag; break], []) done AC_LANG_POP([C++])dnl case $boost_cv_lib_tag in #( # Some newer (>= 1.35?) versions of Boost seem to only use "gcc" as opposed # to "gcc41" for instance. *-gcc | *'-gcc ') :;; #( Don't re-add -gcc: it's already in there. gcc*) boost_tag_x= case $host_os in #( darwin*) if test $boost_major_version -ge 136; then # The `x' added in r46793 of Boost. boost_tag_x=x fi;; esac # We can specify multiple tags in this variable because it's used by # BOOST_FIND_LIB that does a `for tag in -$boost_cv_lib_tag' ... boost_cv_lib_tag="$boost_tag_x$boost_cv_lib_tag -${boost_tag_x}gcc" ;; #( unknown) AC_MSG_WARN([[could not figure out which toolset name to use for $CXX]]) boost_cv_lib_tag= ;; esac fi])dnl end of AC_CACHE_CHECK ])# _BOOST_FIND_COMPILER_TAG # _BOOST_GUESS_WHETHER_TO_USE_MT() # -------------------------------- # Compile a small test to try to guess whether we should favor MT (Multi # Thread) flavors of Boost. Sets boost_guess_use_mt accordingly. AC_DEFUN([_BOOST_GUESS_WHETHER_TO_USE_MT], [# Check whether we do better use `mt' even though we weren't ask to. AC_LANG_PUSH([C++])dnl AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #if defined _REENTRANT || defined _MT || defined __MT__ /* use -mt */ #else # error MT not needed #endif ]])], [boost_guess_use_mt=:], [boost_guess_use_mt=false]) AC_LANG_POP([C++])dnl ]) # _BOOST_AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # ------------------------------------------------------------------- # Fork of _AC_LINK_IFELSE that preserves conftest.o across calls. Fragile, # will break when Autoconf changes its internals. Requires that you manually # rm -f conftest.$ac_objext in between to really different tests, otherwise # you will try to link a conftest.o left behind by a previous test. # Used to aggressively optimize BOOST_FIND_LIB (see the big comment in this # macro). # # Don't use "break" in the actions, as it would short-circuit some code # this macro runs after the actions. m4_define([_BOOST_AC_LINK_IFELSE], [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl rm -f conftest$ac_exeext boost_save_ac_ext=$ac_ext boost_use_source=: # If we already have a .o, re-use it. We change $ac_ext so that $ac_link # tries to link the existing object file instead of compiling from source. test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false && _AS_ECHO_LOG([re-using the existing conftest.$ac_objext]) AS_IF([_AC_DO_STDERR($ac_link) && { test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_executable_p conftest$ac_exeext dnl FIXME: use AS_TEST_X instead when 2.61 is widespread enough. }], [$2], [if $boost_use_source; then _AC_MSG_LOG_CONFTEST fi $3]) ac_objext=$boost_save_ac_objext ac_ext=$boost_save_ac_ext dnl Delete also the IPA/IPO (Inter Procedural Analysis/Optimization) dnl information created by the PGI compiler (conftest_ipa8_conftest.oo), dnl as it would interfere with the next link command. rm -f core conftest.err conftest_ipa8_conftest.oo \ conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl ])# _BOOST_AC_LINK_IFELSE # Local Variables: # mode: autoconf # End: Gyoto-1.2.0/m4/libtool.m4000066400000000000000000010601111302352257300150430ustar00rootroot00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # 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 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. m4_define([_LT_COPYING], [dnl # 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. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # 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 ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl 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 _LT_CC_BASENAME([$compiler]) # 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 _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# 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' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # 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' _LT_CONFIG_STATUS_DECLARATIONS 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 lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); 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 lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); 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 _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [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. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### 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 _LT_PROG_LTMAIN # 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) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl 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* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl 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* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [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" >&AS_MESSAGE_LOG_FD $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 >&AS_MESSAGE_LOG_FD # 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 >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [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" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $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 >&AS_MESSAGE_LOG_FD 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 >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) 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 ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_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 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="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}" _LT_TAGVAR(module_expsym_cmds, $1)="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}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="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 _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`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_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # 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*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ 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" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. 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|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*) 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" ;; powerpcle-*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*) 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" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) 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" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # 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 _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_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 $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" 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>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | 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" && \ test undefined != "$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 ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_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 AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | 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 AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=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\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_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_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = 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 _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ 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}' m4_if([$1], [],[ 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`' m4_if([$1], [],[ 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 version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; 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 | 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 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) 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' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; 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 AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi 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 _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[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]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_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]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 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 ;; 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 | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=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 ]) 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 _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) 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 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [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 ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # 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 AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_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@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_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@&t@_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_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -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 ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # 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 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_pic, $1)='-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 m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; 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_TAGVAR(lt_prog_compiler_pic, $1)=-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_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; 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). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_pic, $1)='-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 m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; 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_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-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). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-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_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_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 _LT_TAGVAR(export_symbols_cmds, $1)='$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 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_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. dnl Note also adjust exclude_expsyms for C++ above. 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 ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= 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 _LT_TAGVAR(ld_shlibs, $1)=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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; 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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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 _LT_TAGVAR(whole_archive_flag_spec, $1)= 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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$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 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # 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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=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 _LT_TAGVAR(export_symbols_cmds, $1)='$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 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|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. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${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 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no 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 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${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. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='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, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$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. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$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*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # 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) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$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. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(archive_expsym_cmds, $1)='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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='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='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [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]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$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);}' _LT_TAG_COMPILER # 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 _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## 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_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$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. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_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 _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) 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_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$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' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -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 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=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. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${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 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${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. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=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. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='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, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='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, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $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 _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$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. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | 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. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$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."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='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`"' _LT_TAGVAR(old_archive_cmds, $1)='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' _LT_TAGVAR(archive_cmds, $1)='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' _LT_TAGVAR(archive_expsym_cmds, $1)='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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${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++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -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 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' _LT_TAGVAR(compiler_needs_object, $1)=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. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=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. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`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 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=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?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=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. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='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. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$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... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) 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_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf 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). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 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 ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _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 dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); 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 "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${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 "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${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 "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [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. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; 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 _LT_TAGVAR(postdeps,$1)='-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 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 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_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$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... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC 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_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$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... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## 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_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## 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_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # 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 AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # 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 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 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=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # 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}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # 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 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [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 ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#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 ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS Gyoto-1.2.0/m4/ltoptions.m4000066400000000000000000000300731302352257300154350ustar00rootroot00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [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], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) Gyoto-1.2.0/m4/ltsugar.m4000066400000000000000000000104241302352257300150610ustar00rootroot00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # 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 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) Gyoto-1.2.0/m4/ltversion.m4000066400000000000000000000012621302352257300154250ustar00rootroot00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # 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. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) Gyoto-1.2.0/m4/lt~obsolete.m4000066400000000000000000000137561302352257300157650ustar00rootroot00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # 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 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) Gyoto-1.2.0/m4/pkg.m4000066400000000000000000000130231302352257300141570ustar00rootroot00000000000000# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES Gyoto-1.2.0/m4/python.m4000066400000000000000000000530701302352257300147250ustar00rootroot00000000000000# Copyright 2012, 2013, 2014 Brandon Invergo # # This file is part of pyconfigure. 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 3 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. # # Under Section 7 of GPL version 3, you are granted additional # permissions described in the Autoconf Configure Script Exception, # version 3.0, as published by the Free Software Foundation. # # You should have received a copy of the GNU General Public License # and a copy of the Autoconf Configure Script Exception along with # this program; see the files COPYINGv3 and COPYING.EXCEPTION # respectively. If not, see . # Many of these macros were adapted from ones written by Andrew Dalke # and James Henstridge and are included with the Automake utility # under the following copyright terms: # # Copyright (C) 1999-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. # Table of Contents: # # 1. Language selection # and routines to produce programs in a given language. # # 2. Producing programs in a given language. # # 3. Looking for a compiler # And possibly the associated preprocessor. # # 4. Looking for specific libs & functionality ## ----------------------- ## ## 1. Language selection. ## ## ----------------------- ## # AC_LANG(Python) # --------------- AC_LANG_DEFINE([Python], [py], [PY], [PYTHON], [], [ac_ext=py ac_compile='chmod +x conftest.$ac_ext >&AS_MESSAGE_LOG_FD' ac_link='chmod +x conftest.$ac_ext && cp conftest.$ac_ext conftest >&AS_MESSAGE_LOG_FD' ]) # AC_LANG_PYTHON # -------------- AU_DEFUN([AC_LANG_PYTHON], [AC_LANG(Python)]) ## ----------------------- ## ## 2. Producing programs. ## ## ----------------------- ## # AC_LANG_PROGRAM(Python)([PROLOGUE], [BODY]) # ------------------------------------------- m4_define([AC_LANG_PROGRAM(Python)], [dnl @%:@!$PYTHON $1 m4_if([$2], [], [], [dnl if __name__ == '__main__': $2])]) # _AC_LANG_IO_PROGRAM(Python) # --------------------------- # Produce source that performs I/O. m4_define([_AC_LANG_IO_PROGRAM(Python)], [AC_LANG_PROGRAM([dnl import sys try: h = open('conftest.out') except: sys.exit(1) else: close(h) sys.exit(0) ], [])]) # _AC_LANG_CALL(Python)([PROLOGUE], [FUNCTION]) # --------------------- # Produce source that calls FUNCTION m4_define([_AC_LANG_CALL(Python)], [AC_LANG_PROGRAM([$1], [$2])]) ## -------------------------------------------- ## ## 3. Looking for Compilers and Interpreters. ## ## -------------------------------------------- ## AC_DEFUN([AC_LANG_COMPILER(Python)], [AC_REQUIRE([PC_PROG_PYTHON])]) # PC_INIT([MIN-VERSION], [MAX-VERSION]) # ----------------------------- # Initialize pyconfigure, finding a Python interpreter with a given # minimum and/or maximum version. AC_DEFUN([PC_INIT], [PC_PROG_PYTHON([], [$1], [$2]) dnl If we found something, do a sanity check that the interpreter really dnl has the version its name would suggest. m4_ifval([PYTHON], [PC_PYTHON_VERIFY_VERSION([>=], [pc_min_ver], [], [AC_MSG_FAILURE([No compatible Python interpreter found. If you're sure that you have one, try setting the PYTHON environment variable to the location of the interpreter.])])]) m4_ifval([PYTHON], [PC_PYTHON_VERIFY_VERSION([<=], [pc_max_ver], [], [AC_MSG_FAILURE([No compatible Python interpreter found. If you're sure that you have one, try setting the PYTHON environment variable to the location of the interpreter.])])]) ])# PC_INIT # PC_PROG_PYTHON([PROG-TO-CHECK-FOR], [MIN-VERSION], [MAX-VERSION]) # --------------------------------- # Find a Python interpreter. Python versions prior to 2.0 are not # supported. (2.0 was released on October 16, 2000). AC_DEFUN_ONCE([PC_PROG_PYTHON], [AC_ARG_VAR([PYTHON], [the Python interpreter]) dnl The default minimum version is 2.0 m4_define_default([pc_min_ver], m4_ifval([$2], [$2], [2.0])) dnl The default maximum version is 3.3 m4_define_default([pc_max_ver], m4_ifval([$3], [$3], [4.0])) dnl Build up a list of possible interpreter names. m4_define_default([_PC_PYTHON_INTERPRETER_LIST], [[python] \ dnl If we want some Python 3 versions (max version >= 3.0), dnl also search for "python3" m4_if(m4_version_compare(pc_max_ver, [2.9]), [1], [python3], []) \ dnl If we want some Python 2 versions (min version <= 2.7), dnl also search for "python2". m4_if(m4_version_compare(pc_min_ver, [2.8]), [-1], [python2], []) \ dnl Construct a comma-separated list of interpreter names (python2.6, dnl python2.7, etc). We only care about the first 3 characters of the dnl version strings (major-dot-minor; not dnl major-dot-minor-dot-bugfix[-dot-whatever]) m4_foreach([pc_ver], m4_esyscmd_s(seq -s[[", "]] -f["[[%.1f]]"] m4_substr(pc_max_ver, [0], [3]) -0.1 m4_substr(pc_min_ver, [0], [3])), dnl Remove python2.8 and python2.9 since they will never exist [m4_bmatch(pc_ver, [2.[89]], [], [python]pc_ver)])]) dnl Do the actual search at last. m4_ifval([$1], [AC_PATH_PROGS(PYTHON, [$1 _PC_PYTHON_INTERPRETER_LIST])], [AC_PATH_PROGS(PYTHON, [_PC_PYTHON_INTERPRETER_LIST])]) ])# PC_PROG_PYTHON # PC_PYTHON_PROG_PYTHON_CONFIG(PROG-TO-CHECK-FOR) # ---------------------------------------------- # Find the python-config program AC_DEFUN([PC_PYTHON_PROG_PYTHON_CONFIG], [AC_REQUIRE([PC_PROG_PYTHON])[]dnl AC_ARG_VAR([PYTHON_CONFIG], [the Python-config program]) dnl python-config's binary name is normally based on the Python interpreter's dnl binary name (i.e. python2.7 -> python2.7-config) m4_define([_PYTHON_BASENAME], [`basename $PYTHON`]) m4_ifval([$1], [AC_PATH_PROGS(PYTHON_CONFIG, [$1 _PYTHON_BASENAME-config])], [AC_PATH_PROG(PYTHON_CONFIG, _PYTHON_BASENAME-config)]) ]) # PC_PYTHON_PROG_PYTHON_CONFIG # PC_PYTHON_VERIFY_VERSION([RELATION], [VERSION], [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version [RELATION] VERSION. # i.e if RELATION is "<", check if PROG has a version number less than VERSION. # Run ACTION-IF-FALSE otherwise. # Specify RELATION as any mathematical comparison "<", ">", "<=", ">=", "==" or "!=" # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). AC_DEFUN([PC_PYTHON_VERIFY_VERSION], [m4_define([pc_python_safe_ver], m4_bpatsubsts($2, [\.], [_])) AC_CACHE_CHECK([if Python $1 '$2'], [[pc_cv_python_req_version_]pc_python_safe_ver], [AC_LANG_PUSH(Python)[]dnl AC_RUN_IFELSE( [AC_LANG_PROGRAM([dnl import sys ], [dnl # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x reqver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] reqverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(4)): reqverhex = (reqverhex << 8) + reqver[[i]] # the final 8 bits are "0xf0" for final versions, which are all # we'll test against, since it's doubtful that a released software # will depend on an alpha- or beta-state Python. reqverhex += 0xf0 if sys.hexversion $1 reqverhex: sys.exit() else: sys.exit(1) ])], [[pc_cv_python_req_version_]pc_python_safe_ver=yes], [[pc_cv_python_req_version_]pc_python_safe_ver=no]) AC_LANG_POP(Python)[]dnl ]) AS_IF([test "$[pc_cv_python_req_version_]pc_python_safe_ver" = "no"], [$4], [$3]) ])# PC_PYTHON_VERIFY_VERSION # PC_PYTHON_CHECK_VERSION # ----------------------- # Query Python for its version number. Getting [:3] seems to be # the best way to do this; it's what "site.py" does in the standard # library. AC_DEFUN([PC_PYTHON_CHECK_VERSION], [AC_REQUIRE([PC_PROG_PYTHON])[]dnl AC_CACHE_CHECK([for $1 version], [pc_cv_python_version], [AC_LANG_PUSH(Python)[]dnl AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl import sys ], [dnl sys.stdout.write(sys.version[[:3]]) ])], [pc_cv_python_version=`./conftest`], [AC_MSG_FAILURE([failed to run Python program])]) AC_LANG_POP(Python)[]dnl ]) AC_SUBST([PYTHON_VERSION], [$pc_cv_python_version]) ])# PC_PYTHON_CHECK_VERSION # PC_PYTHON_CHECK_PREFIX # ---------------------- # Use the value of $prefix for the corresponding value of # PYTHON_PREFIX. This is made a distinct variable so it can be # overridden if need be. However, general consensus is that you # shouldn't need this ability. AC_DEFUN([PC_PYTHON_CHECK_PREFIX], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl dnl Try to get it with python-config otherwise do it from within Python AC_CACHE_CHECK([for Python prefix], [pc_cv_python_prefix], [if test -x "$PYTHON_CONFIG"; then pc_cv_python_prefix=`$PYTHON_CONFIG --prefix 2>&AS_MESSAGE_LOG_FD` else AC_LANG_PUSH(Python)[]dnl AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl import sys ], [dnl sys.stdout.write(sys.prefix) ])], [pc_cv_python_prefix=`./conftest`; if test $? != 0; then AC_MSG_FAILURE([could not determine Python prefix]) fi], [AC_MSG_FAILURE([failed to run Python program])]) AC_LANG_POP(Python)[]dnl fi]) AC_SUBST([PYTHON_PREFIX], [$pc_cv_python_prefix])]) # PC_PYTHON_CHECK_EXEC_PREFIX # -------------------------- # Like above, but for $exec_prefix AC_DEFUN([PC_PYTHON_CHECK_EXEC_PREFIX], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl dnl Try to get it with python-config otherwise do it from within Python AC_CACHE_CHECK([for Python exec-prefix], [pc_cv_python_exec_prefix], [if test -x "$PYTHON_CONFIG"; then pc_cv_python_exec_prefix=`$PYTHON_CONFIG --exec-prefix 2>&AS_MESSAGE_LOG_FD` else AC_LANG_PUSH(Python)[]dnl AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl import sys ], [dnl sys.stdout.write(sys.exec_prefix) ])], [pc_cv_python_exec_prefix=`./conftest`; if test $? != 0; then AC_MSG_FAILURE([could not determine Python exec_prefix]) fi], [AC_MSG_FAILURE([failed to run Python program])]) AC_LANG_POP(Python)[]dnl fi ]) AC_SUBST([PYTHON_EXEC_PREFIX], [$pc_cv_python_exec_prefix])]) # PC_PYTHON_CHECK_INCLUDES # ------------------------ # Find the Python header file include flags (ie # '-I/usr/include/python') AC_DEFUN([PC_PYTHON_CHECK_INCLUDES], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl dnl Try to find the headers location with python-config otherwise guess AC_CACHE_CHECK([for Python includes], [pc_cv_python_includes], [if test -x "$PYTHON_CONFIG"; then pc_cv_python_includes=`$PYTHON_CONFIG --includes 2>&AS_MESSAGE_LOG_FD` else pc_cv_python_includes="[-I$includedir/$_PYTHON_BASENAME]m4_ifdef(PYTHON_ABI_FLAGS, PYTHON_ABI_FLAGS,)" fi ]) AC_SUBST([PYTHON_INCLUDES], [$pc_cv_python_includes])]) # PC_PYTHON_CHECK_HEADERS([ACTION-IF-PRESENT], [ACTION-IF-ABSENT]) # ----------------------- # Check for the presence and usability of Python.h AC_DEFUN([PC_PYTHON_CHECK_HEADERS], [AC_REQUIRE([PC_PYTHON_CHECK_INCLUDES])[]dnl pc_cflags_store=$CPPFLAGS CPPFLAGS="$CFLAGS $PYTHON_INCLUDES" AC_CHECK_HEADER([Python.h], [$1], [$2]) CPPFLAGS=$pc_cflags_store ]) # PC_PYTHON_CHECK_LIBS # -------------------- # Find the Python lib flags (ie '-lpython') AC_DEFUN([PC_PYTHON_CHECK_LIBS], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl dnl Try to find the lib flags with python-config otherwise guess AC_CACHE_CHECK([for Python libs], [pc_cv_python_libs], [if test -x "$PYTHON_CONFIG"; then pc_cv_python_libs=`$PYTHON_CONFIG --libs 2>&AS_MESSAGE_LOG_FD` else pc_cv_python_libs="[-l$_PYTHON_BASENAME]m4_ifdef(PYTHON_ABI_FLAGS, PYTHON_ABI_FLAGS,)" fi ]) AC_SUBST([PYTHON_LIBS], [$pc_cv_python_libs])]) # PC_PYTHON_TEST_LIBS(LIBRARY-FUNCTION, [ACTION-IF-PRESENT], [ACTION-IF-ABSENT]) # ------------------- # Verify that the Python libs can be loaded AC_DEFUN([PC_PYTHON_TEST_LIBS], [AC_REQUIRE([PC_PYTHON_CHECK_LIBS])[]dnl pc_libflags_store=$LIBS for lflag in $PYTHON_LIBS; do case $lflag in -lpython*@:}@ LIBS="$LIBS $lflag" pc_libpython=`echo $lflag | sed -e 's/^-l//'` ;; *@:}@;; esac done AC_CHECK_LIB([$pc_libpython], [$1], [$2], [$3])]) # PC_PYTHON_CHECK_CFLAGS # ---------------------- # Find the Python CFLAGS AC_DEFUN([PC_PYTHON_CHECK_CFLAGS], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl dnl Try to find the CFLAGS with python-config otherwise give up AC_CACHE_CHECK([for Python CFLAGS], [pc_cv_python_cflags], [if test -x "$PYTHON_CONFIG"; then pc_cv_python_cflags=`$PYTHON_CONFIG --cflags 2>&AS_MESSAGE_LOG_FD` else pc_cv_python_cflags= fi ]) AC_SUBST([PYTHON_CFLAGS], [$pc_cv_python_cflags])]) # PC_PYTHON_CHECK_LDFLAGS # ----------------------- # Find the Python LDFLAGS AC_DEFUN([PC_PYTHON_CHECK_LDFLAGS], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl dnl Try to find the LDFLAGS with python-config otherwise give up AC_CACHE_CHECK([for Python LDFLAGS], [pc_cv_python_ldflags], [if test -x "$PYTHON_CONFIG"; then pc_cv_python_ldflags=`$PYTHON_CONFIG --ldflags 2>&AS_MESSAGE_LOG_FD` else pc_cv_python_ldflags= fi ]) AC_SUBST([PYTHON_LDFLAGS], [$pc_cv_python_ldflags])]) # PC_PYTHON_CHECK_EXTENSION_SUFFIX # -------------------------------- # Find the Python extension suffix (i.e. '.cpython-32.so') AC_DEFUN([PC_PYTHON_CHECK_EXTENSION_SUFFIX], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl dnl Try to find the suffix with python-config otherwise give up AC_CACHE_CHECK([for Python extension suffix], [pc_cv_python_extension_suffix], [if test -x "$PYTHON_CONFIG"; then pc_cv_python_extension_suffix=`$PYTHON_CONFIG --extension-suffix 2>&AS_MESSAGE_LOG_FD` else pc_cv_python_extension_suffix= fi ]) AC_SUBST([PYTHON_EXTENSION_SUFFIX], [$pc_cv_python_extension_suffix])]) # PC_PYTHON_CHECK_ABI_FLAGS # ------------------------- # Find the Python ABI flags AC_DEFUN([PC_PYTHON_CHECK_ABI_FLAGS], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl dnl Try to find the ABI flags with python-config otherwise give up AC_CACHE_CHECK([for Python ABI flags], [pc_cv_python_abi_flags], [if test -x "$PYTHON_CONFIG"; then pc_cv_python_abi_flags=`$PYTHON_CONFIG --abiflags 2>&AS_MESSAGE_LOG_FD` else pc_cv_python_abi_flags= fi ]) AC_SUBST([PYTHON_ABI_FLAGS], [$pc_cv_python_abi_flags])]) # PC_PYTHON_CHECK_PLATFORM # ------------------------ # At times (like when building shared libraries) you may want # to know which OS platform Python thinks this is. AC_DEFUN([PC_PYTHON_CHECK_PLATFORM], [AC_REQUIRE([PC_PROG_PYTHON])[]dnl dnl Get the platform from within Python (sys.platform) AC_CACHE_CHECK([for Python platform], [pc_cv_python_platform], [AC_LANG_PUSH(Python)[]dnl AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl import sys ], [dnl sys.stdout.write(sys.platform) ])], [pc_cv_python_platform=`./conftest`; if test $? != 0; then AC_MSG_FAILURE([could not determine Python platform]) fi], [AC_MSG_FAILURE([failed to run Python program])]) AC_LANG_POP(Python)[]dnl ]) AC_SUBST([PYTHON_PLATFORM], [$pc_cv_python_platform]) ]) # PC_PYTHON_CHECK_SITE_DIR # --------------------- # The directory to which new libraries are installed (i.e. the # "site-packages" directory. AC_DEFUN([PC_PYTHON_CHECK_SITE_DIR], [AC_REQUIRE([PC_PROG_PYTHON])AC_REQUIRE([PC_PYTHON_CHECK_PREFIX])[]dnl AC_CACHE_CHECK([for Python site-packages directory], [pc_cv_python_site_dir], [AC_LANG_PUSH(Python)[]dnl if test "x$prefix" = xNONE then pc_py_prefix=$ac_default_prefix else pc_py_prefix=$prefix fi AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl import sys from platform import python_implementation # sysconfig in CPython 2.7 doesn't work in virtualenv # try: import sysconfig except: can_use_sysconfig = False else: can_use_sysconfig = True if can_use_sysconfig: if python_implementation() == "CPython" and sys.version[[:3]] == '2.7': can_use_sysconfig = False if not can_use_sysconfig: from distutils import sysconfig sitedir = sysconfig.get_python_lib(False, False, prefix='$pc_py_prefix') else: sitedir = sysconfig.get_path('purelib', vars={'base':'$pc_py_prefix'}) ], [dnl sys.stdout.write(sitedir) ])], [pc_cv_python_site_dir=`./conftest`], [AC_MSG_FAILURE([failed to run Python program])]) AC_LANG_POP(Python)[]dnl case $pc_cv_python_site_dir in $pc_py_prefix*) pc__strip_prefix=`echo "$pc_py_prefix" | sed 's|.|.|g'` pc_cv_python_site_dir=`echo "$pc_cv_python_site_dir" | sed "s,^$pc__strip_prefix/,,"` ;; *) case $pc_py_prefix in /usr|/System*) ;; *) pc_cv_python_site_dir=lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pythondir], [\${prefix}/$pc_cv_python_site_dir])])# PC_PYTHON_CHECK_SITE_DIR # PC_PYTHON_SITE_PACKAGE_DIR # -------------------------- # $PACKAGE directory under PYTHON_SITE_DIR AC_DEFUN([PC_PYTHON_SITE_PACKAGE_DIR], [AC_REQUIRE([PC_PYTHON_CHECK_SITE_DIR])[]dnl AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE_NAME])]) # PC_PYTHON_CHECK_EXEC_DIR # ------------------------ # directory for installing python extension modules (shared libraries) AC_DEFUN([PC_PYTHON_CHECK_EXEC_DIR], [AC_REQUIRE([PC_PROG_PYTHON])AC_REQUIRE([PC_PYTHON_CHECK_EXEC_PREFIX])[]dnl AC_CACHE_CHECK([for Python extension module directory], [pc_cv_python_exec_dir], [AC_LANG_PUSH(Python)[]dnl if test "x$pc_cv_python_exec_prefix" = xNONE then pc_py_exec_prefix=$pc_cv_python_prefix else pc_py_exec_prefix=$pc_cv_python_exec_prefix fi AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl import sys from platform import python_implementation # sysconfig in CPython 2.7 doesn't work in virtualenv # try: import sysconfig except: can_use_sysconfig = False else: can_use_sysconfig = True if can_use_sysconfig: if python_implementation() == "CPython" and sys.version[[:3]] == '2.7': can_use_sysconfig = False if not can_use_sysconfig: from distutils import sysconfig sitedir = sysconfig.get_python_lib(False, False, prefix='$pc_py__exec_prefix') else: sitedir = sysconfig.get_path('purelib', vars={'platbase':'$pc_py_exec_prefix'}) ], [dnl sys.stdout.write(sitedir) ])], [pc_cv_python_exec_dir=`./conftest`], [AC_MSG_FAILURE([failed to run Python program])]) AC_LANG_POP(Python)[]dnl case $pc_cv_python_exec_dir in $pc_py_exec_prefix*) pc__strip_prefix=`echo "$pc_py_exec_prefix" | sed 's|.|.|g'` pc_cv_python_exec_dir=`echo "$pc_cv_python_exec_dir" | sed "s,^$pc__strip_prefix/,,"` ;; *) case $pc_py_exec_prefix in /usr|/System*) ;; *) pc_cv_python_exec_dir=lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pyexecdir], [\${exec_prefix}/$pc_cv_python_pyexecdir])]) #PY_PYTHON_CHECK_EXEC_LIB_DIR # PC_PYTHON_EXEC_PACKAGE_DIR # -------------------------- # $PACKAGE directory under PYTHON_SITE_DIR AC_DEFUN([PC_PYTHON_EXEC_PACKAGE_DIR], [AC_REQUIRE([PC_PYTHON_CHECK_EXEC_DIR])[]dnl AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE_NAME])]) ## -------------------------------------------- ## ## 4. Looking for specific libs & functionality ## ## -------------------------------------------- ## # PC_PYTHON_CHECK_MODULE(LIBRARY, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ---------------------------------------------------------------------- # Macro for checking if a Python library is installed AC_DEFUN([PC_PYTHON_CHECK_MODULE], [AC_REQUIRE([PC_PROG_PYTHON])[]dnl m4_define([pc_python_safe_mod], m4_bpatsubsts($1, [\.], [_])) AC_CACHE_CHECK([for Python '$1' library], [[pc_cv_python_module_]pc_python_safe_mod], [AC_LANG_PUSH(Python)[]dnl AC_RUN_IFELSE( [AC_LANG_PROGRAM([dnl import sys try: import $1 except: sys.exit(1) else: sys.exit(0) ], [])], [[pc_cv_python_module_]pc_python_safe_mod="yes"], [[pc_cv_python_module_]pc_python_safe_mod="no"]) AC_LANG_POP(Python)[]dnl ]) AS_IF([test "$[pc_cv_python_module_]pc_python_safe_mod" = "no"], [$3], [$2]) ])# PC_PYTHON_CHECK_MODULE # PC_PYTHON_CHECK_FUNC([LIBRARY], FUNCTION, ARGS, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------------------- # Check to see if a given function call, optionally from a module, can # be successfully called AC_DEFUN([PC_PYTHON_CHECK_FUNC], [AC_REQUIRE([PC_PROG_PYTHON])[]dnl m4_define([pc_python_safe_mod], m4_bpatsubsts($1, [\.], [_])) AC_CACHE_CHECK([for Python m4_ifnblank($1, '$1.$2()', '$2()') function], [[pc_cv_python_func_]pc_python_safe_mod[_$2]], [AC_LANG_PUSH(Python)[]dnl AC_RUN_IFELSE( [AC_LANG_PROGRAM([dnl import sys m4_ifnblank([$1], [dnl try: import $1 except: sys.exit(1) ], [])], [ m4_ifnblank([$1], [ try: $1.$2($3)], [ try: $2($3)]) except: sys.exit(1) else: sys.exit(0) ])], [[pc_cv_python_func_]pc_python_safe_mod[_$2]="yes"], [[pc_cv_python_func_]pc_python_safe_mod[_$2]="no"]) AC_LANG_POP(Python)[]dnl ]) AS_IF([test "$[pc_cv_python_func_]pc_python_safe_mod[_$2]" = "no"], [$5], [$4]) ])# PC_PYTHON_CHECK_FUNC Gyoto-1.2.0/missing000077500000000000000000000153301302352257300142160ustar00rootroot00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written 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 case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man 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 # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # 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: Gyoto-1.2.0/plugins/000077500000000000000000000000001302352257300142765ustar00rootroot00000000000000Gyoto-1.2.0/plugins/null/000077500000000000000000000000001302352257300152505ustar00rootroot00000000000000Gyoto-1.2.0/plugins/null/AUTHORS000066400000000000000000000000001302352257300163060ustar00rootroot00000000000000Gyoto-1.2.0/plugins/null/COPYING000066400000000000000000001045131302352257300163070ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 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 state 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 3 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 . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU 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. But first, please read . Gyoto-1.2.0/plugins/null/ChangeLog000066400000000000000000000000001302352257300170100ustar00rootroot00000000000000Gyoto-1.2.0/plugins/null/INSTALL000066400000000000000000000366101302352257300163070ustar00rootroot00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2013 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 command `./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 limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/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. Gyoto-1.2.0/plugins/null/Makefile.am000066400000000000000000000001341302352257300173020ustar00rootroot00000000000000ACLOCAL_AMFLAGS = -I m4 SUBDIRS=@mySUBDIRS@ $(SUBDIRS): cd $@ ; $(MAKE) .PHONY: $(SUBDIRS) Gyoto-1.2.0/plugins/null/Makefile.in000066400000000000000000000616121302352257300173230ustar00rootroot00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = . DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(top_srcdir)/bin/gyoto.in COPYING compile config.guess \ config.sub depcomp install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.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_CLEAN_FILES = bin/gyoto CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-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 \ tags-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_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope 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__post_remove_distdir = $(am__remove_distdir) 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 DIST_TARGETS = dist-gzip 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@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYLIB_VAR = @DYLIB_VAR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GYOTO = @GYOTO@ GYOTO_EPREFIX = @GYOTO_EPREFIX@ GYOTO_PREFIX = @GYOTO_PREFIX@ Gyoto_CFLAGS = @Gyoto_CFLAGS@ Gyoto_LIBS = @Gyoto_LIBS@ HOME_LORENE = @HOME_LORENE@ 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@ LIPO = @LIPO@ LN_S = @LN_S@ LORENECPPFLAGS = @LORENECPPFLAGS@ LORENELDFLAGS = @LORENELDFLAGS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ 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@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SWIG = @SWIG@ SYS = @SYS@ VERSION = @VERSION@ YORICK = @YORICK@ Y_INST_HOME = @Y_INST_HOME@ Y_INST_SITE = @Y_INST_SITE@ 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__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ 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@ mySUBDIRS = @mySUBDIRS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ plugin_sfx = @plugin_sfx@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ soverdir = @soverdir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = @mySUBDIRS@ all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): bin/gyoto: $(top_builddir)/config.status $(top_srcdir)/bin/gyoto.in cd $(top_builddir) && $(SHELL) ./config.status $@ 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. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ 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" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 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__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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.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 u+w $(distdir) mkdir $(distdir)/_build $(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 \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=.. --prefix="$$dc_install_base" \ && $(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__post_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 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 $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic 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-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: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-generic \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck 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-am uninstall uninstall-am $(SUBDIRS): cd $@ ; $(MAKE) .PHONY: $(SUBDIRS) # 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: Gyoto-1.2.0/plugins/null/NEWS000066400000000000000000000000011302352257300157360ustar00rootroot00000000000000 Gyoto-1.2.0/plugins/null/README000066400000000000000000000024341302352257300161330ustar00rootroot00000000000000This is an example of a Gyoto plug-in. To make your own, 1- choose a cool name; 2- copy this directory (plugins/null/) somewhere; 3- edit configure.ac, lib/Makefile.ac and lib/InitPlug.C: replace any occurrence of "null" with your cool name; 4- add new metrics and astrobjs as needed in lib/ and include/, the gyoto source code is also full of examples; 5- edit lib/InitPlug.C to register your new classes (rename it to CoolPlug.C if you wish); 6- add the name of the required C++ source files to the libgyoto_null_la_SOURCES variable in lib/Makefile.am (this variable should have been renamed to libgyoto__la_SOURCES by now); 7- run autoreconf (whenever you edit any configure.ac or Makefile.am file), then ./configure, make, make install... 8- if installing to default directories (/usr/local/lib), you may need to run 'sudo ldconfig' 9- You can now start using your plug-in by loading it with any of the available methods: - In XML: - On the command line: gyoto -pstdplug,null ... - In Python: gyoto.requirePlugin('null') - In all cases: export GYOTO_PLUGINS="stdplug,null". For further details, refer to the Gyoto user manual, section entitled `Writing a C++ plug-in' (as of writing, Sect. 8.2). Gyoto-1.2.0/plugins/null/aclocal.m4000066400000000000000000001221351302352257300171140ustar00rootroot00000000000000# generated automatically by aclocal 1.14.1 -*- Autoconf -*- # Copyright (C) 1996-2013 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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' 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.14.1], [], [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.14.1])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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$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-2013 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. # 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", "OBJC", "OBJCXX", "UPC", or "GJC". # 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 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" 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 10 /bin/sh. echo '/* dummy */' > 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], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) 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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf 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"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # 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.65])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], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) 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], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [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([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # 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])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro 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 # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi ]) 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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 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-2013 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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 is modern enough. # If it is, 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 --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_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}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/pkg.m4]) Gyoto-1.2.0/plugins/null/bin/000077500000000000000000000000001302352257300160205ustar00rootroot00000000000000Gyoto-1.2.0/plugins/null/bin/gyoto.in000066400000000000000000000003421302352257300175100ustar00rootroot00000000000000#!/bin/sh set -e export LD_LIBRARY_PATH=@abs_top_srcdir@/lib/.libs:$LD_LIBRARY_PATH export DYLD_LIBRARY_PATH=@abs_top_srcdir@/lib/.libs:$DYLD_LIBRARY_PATH export GYOTO_PLUGINS=stdplug,nofail:lorene,obspm @GYOTO@ $@@ exit 0 Gyoto-1.2.0/plugins/null/compile000077500000000000000000000162451302352257300166360ustar00rootroot00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: Gyoto-1.2.0/plugins/null/config.guess000077500000000000000000001303611302352257300175740ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-06-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 3 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # 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 # # Please send patches with a ChangeLog entry to config-patches@gnu.org. 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 1992-2013 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|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #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 ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_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 ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 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 ;; arc:Linux:*:* | arceb:Linux:*:*) 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; } ;; or1k:Linux:*:*) echo ${UNAME_MACHINE}-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 ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 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 ;; x86_64:Haiku:*:*) echo x86_64-unknown-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 eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi 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 case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi 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 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: Gyoto-1.2.0/plugins/null/config.sub000077500000000000000000001053541302352257300172430ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-08-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 3 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # 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 1992-2013 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-musl* | 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*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -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 | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | 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 | microblazeel | 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 \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ | or1k | 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-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | 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-* | microblazeel-* \ | 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-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | 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 ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-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 ;; 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=i686-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 | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) 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* | -plan9* \ | -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* \ | -bitrig* | -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* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -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 ;; -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 ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; 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 ;; or1k-*) 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: Gyoto-1.2.0/plugins/null/configure000077500000000000000000020763311302352257300171730ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for gyoto-null 0.0.0. # # 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 -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 test \$(( 1 + 1 )) = 2 || 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: gyoto@sympa.obspm.fr about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: 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='gyoto-null' PACKAGE_TARNAME='gyoto-null' PACKAGE_VERSION='0.0.0' PACKAGE_STRING='gyoto-null 0.0.0' PACKAGE_BUGREPORT='gyoto@sympa.obspm.fr' PACKAGE_URL='' ac_unique_file="include/GyotoNull.h" # 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 mySUBDIRS CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX soverdir Y_INST_SITE Y_INST_HOME GYOTO_EPREFIX GYOTO_PREFIX GYOTO LORENELDFLAGS LORENECPPFLAGS HOME_LORENE SWIG PYTHON YORICK Gyoto_LIBS Gyoto_CFLAGS plugin_sfx SYS DYLIB_VAR PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC LIBTOOL AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V 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_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build 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_silent_rules enable_shared enable_static with_pic enable_fast_install enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock enable_globalinstall with_soverdir ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR Gyoto_CFLAGS Gyoto_LIBS CXX CXXFLAGS CCC CXXCPP' # 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 gyoto-null 0.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] 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/gyoto-null] --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] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of gyoto-null 0.0.0:";; 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-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --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] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) --enable-globalinstall install the plug-in in the global system directory instead of the local tree 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-soverdir=SOVERDIR install the plug-in exactly in SOVERDIR. By default, use instructions from gyoto.pc or default to LIBDIR (see --enable-globalinstall) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory 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 CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path Gyoto_CFLAGS C compiler flags for Gyoto, overriding pkg-config Gyoto_LIBS linker flags for Gyoto, overriding pkg-config CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF 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 gyoto-null configure 0.0.0 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_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_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_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_c_preproc_warn_flag$ac_c_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_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_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_c_try_run # 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_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { 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 eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=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 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_type # 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_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_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 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 gyoto-null $as_me 0.0.0, 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 # Below, give the name of some file that will stay in you source tree. ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$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. # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version='1.14' # 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; } # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file 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 --is-lightweight"; then am_missing_run="$MISSING " 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; } 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 # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' 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='gyoto-null' VERSION='0.0.0' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # 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}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi 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" # 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # 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_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 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_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=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". 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_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false 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 10 /bin/sh. echo '/* dummy */' > 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_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $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 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 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 ;; 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 | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=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_c_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 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 { $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; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_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_c_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_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_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_c_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 \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $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_c_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_c_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 # 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 # 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 | 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 ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=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* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $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 link_all_deplibs=no 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* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *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 version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; 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 | 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' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; 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=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: # Checks for programs. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; 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_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$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 ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; 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_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$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 ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" 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 PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; 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; } PKG_CONFIG="" fi fi if test "x$PKG_CONFIG" == "x"; then : as_fn_error $? "Please install pkg-config" "$LINENO" 5 fi # Checks for libraries. # Checks for header files. # Checks for typedefs, structures, and compiler characteristics. ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # Checks for library functions. for ac_func in pow sqrt do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Guess *LD_LIBRARY_PATH variable for make check SYS=other DYLIB_VAR=LD_LIBRARY_PATH case "x$target_os" in xdarwin*|xmacos) DYLIB_VAR=DYLD_LIBRARY_PATH SYS=Darwin ;; *) ;; esac plugin_sfx=so # Used in yorick/stdplug/Makefile # Read Gyoto's pkg-config file (gyoto.pc) pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gyoto" >&5 $as_echo_n "checking for Gyoto... " >&6; } if test -n "$Gyoto_CFLAGS"; then pkg_cv_Gyoto_CFLAGS="$Gyoto_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gyoto\""; } >&5 ($PKG_CONFIG --exists --print-errors "gyoto") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_Gyoto_CFLAGS=`$PKG_CONFIG --cflags "gyoto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$Gyoto_LIBS"; then pkg_cv_Gyoto_LIBS="$Gyoto_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gyoto\""; } >&5 ($PKG_CONFIG --exists --print-errors "gyoto") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_Gyoto_LIBS=`$PKG_CONFIG --libs "gyoto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then Gyoto_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gyoto" 2>&1` else Gyoto_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gyoto" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$Gyoto_PKG_ERRORS" >&5 as_fn_error $? "gyoto.pc not found or not functional! Possible culprits: is PKG_CONFIG_PATH correct? are all the dependencies specified in gyoto.pc installed? Else call the guru." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "gyoto.pc not found or not functional! Possible culprits: is PKG_CONFIG_PATH correct? are all the dependencies specified in gyoto.pc installed? Else call the guru." "$LINENO" 5 else Gyoto_CFLAGS=$pkg_cv_Gyoto_CFLAGS Gyoto_LIBS=$pkg_cv_Gyoto_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } YORICK=`$PKG_CONFIG --variable=YORICK gyoto` PYTHON=`$PKG_CONFIG --variable=PYTHON gyoto` SWIG=`$PKG_CONFIG --variable=SWIG gyoto` HOME_LORENE=`$PKG_CONFIG --variable=HOME_LORENE gyoto` LORENECPPFLAGS=`$PKG_CONFIG --variable=LORENECPPFLAGS gyoto` LORENELDFLAGS=`$PKG_CONFIG --variable=LORENELDFLAGS gyoto` GYOTO=`$PKG_CONFIG --variable=GYOTO gyoto` GYOTO_PREFIX=`$PKG_CONFIG --variable=prefix gyoto` GYOTO_EPREFIX=`$PKG_CONFIG --variable=exec_prefix gyoto` Y_INST_HOME=`$PKG_CONFIG --variable=Y_INST_HOME gyoto` Y_INST_SITE=`$PKG_CONFIG --variable=Y_INST_SITE gyoto` # all about the install directories GYOTO_PLUGDIR=` $PKG_CONFIG --variable=GYOTO_PLUGDIR gyoto` GYOTO_SOVERS=` $PKG_CONFIG --variable=GYOTO_SOVERS gyoto` localpkglibdir=`$PKG_CONFIG --variable=localpkglibdir gyoto` # all about the C++ compilers gyoto_MPICXX=`$PKG_CONFIG --variable=MPICXX gyoto` gyoto_CXX=`$PKG_CONFIG --variable=CXX gyoto` fi ## Where shall we install the plug-in? # If the user passes the option --enable-globalinstall, # then install in the same place as the standard plug-ins. # # Else, if gyoto.pc specifies a local install directory, use it (it # will typically be /usr/local/lib/gyoto/SOVERS). # # Else, default to LIBDIR (as can be customized with --libdir). # Check whether --enable-globalinstall was given. if test "${enable_globalinstall+set}" = set; then : enableval=$enable_globalinstall; fi if test "x$enable_globalinstall" == xyes; then : soverdir=${GYOTO_PLUGDIR} else if test "x$localpkglibdir" == x; then : soverdir=${libdir} else soverdir=${localpkglibdir}/${GYOTO_SOVERS} fi fi # For picky users, allow setting soverdir explicitely, overriding the above: # Check whether --with-soverdir was given. if test "${with_soverdir+set}" = set; then : withval=$with_soverdir; if test "x$with_soverdir" != xno; then : soverdir=$with_soverdir fi fi # Finally propagate this variable to the Makefiles: ## Which C++ compiler should we use? # gyoto.pc should specify MPICXX and/or CXX. Try them first. 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 "$gyoto_MPICXX" "$gyoto_CXX" 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 "$gyoto_MPICXX" "$gyoto_CXX" 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 { $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=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". 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_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false 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 10 /bin/sh. echo '/* dummy */' > 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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi 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 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=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 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 ;; 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 | 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 | 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* | netbsdelf*-gnu) ;; *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 ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) 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 version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; 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 | 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' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; 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=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 mySUBDIRS="lib" ac_config_files="$ac_config_files Makefile lib/Makefile bin/gyoto" 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}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= 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 "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" 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 gyoto-null $as_me 0.0.0, 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 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" 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 Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ gyoto-null config.status 0.0.0 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;; --he | --h | --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 # 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 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "bin/gyoto") CONFIG_FILES="$CONFIG_FILES bin/gyoto" ;; *) 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_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" eval set X " :F $CONFIG_FILES :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 ;; :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 "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf 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"` # 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'`; 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 ;; "Makefile":F) test -e bin/gyoto && chmod a+x bin/gyoto ;; "lib/Makefile":F) test -e bin/gyoto && chmod a+x bin/gyoto ;; "bin/gyoto":F) test -e bin/gyoto && chmod a+x bin/gyoto ;; 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 Gyoto-1.2.0/plugins/null/configure.ac000066400000000000000000000100571302352257300175410ustar00rootroot00000000000000# Whenever this file is edited, reprocess it with autoreconf, then re-run ./configure AC_PREREQ([2.69]) # Choose a good name: replace `null' with your own name. # Also change the e-mail address to your own. AC_INIT([gyoto-null], [0.0.0], [gyoto@sympa.obspm.fr]) # Below, give the name of some file that will stay in you source tree. AC_CONFIG_SRCDIR([include/GyotoNull.h]) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE LT_INIT # Checks for programs. AC_PROG_INSTALL PKG_PROG_PKG_CONFIG([]) AS_IF([test "x$PKG_CONFIG" == "x"], [AC_MSG_ERROR([Please install pkg-config])]) # Checks for libraries. # Checks for header files. # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T # Checks for library functions. AC_CHECK_FUNCS([pow sqrt]) # Guess *LD_LIBRARY_PATH variable for make check AC_SUBST([target_os]) SYS=other DYLIB_VAR=LD_LIBRARY_PATH case "x$target_os" in xdarwin*|xmacos) DYLIB_VAR=DYLD_LIBRARY_PATH SYS=Darwin ;; *) ;; esac plugin_sfx=so AC_SUBST([DYLIB_VAR]) # Used in yorick/stdplug/Makefile AC_SUBST([SYS]) AC_SUBST([plugin_sfx]) # Read Gyoto's pkg-config file (gyoto.pc) PKG_CHECK_MODULES([Gyoto], [gyoto], [AC_SUBST([YORICK], [`$PKG_CONFIG --variable=YORICK gyoto`]) AC_SUBST([PYTHON], [`$PKG_CONFIG --variable=PYTHON gyoto`]) AC_SUBST([SWIG], [`$PKG_CONFIG --variable=SWIG gyoto`]) AC_SUBST([HOME_LORENE], [`$PKG_CONFIG --variable=HOME_LORENE gyoto`]) AC_SUBST([LORENECPPFLAGS],[`$PKG_CONFIG --variable=LORENECPPFLAGS gyoto`]) AC_SUBST([LORENELDFLAGS], [`$PKG_CONFIG --variable=LORENELDFLAGS gyoto`]) AC_SUBST([GYOTO], [`$PKG_CONFIG --variable=GYOTO gyoto`]) AC_SUBST([GYOTO_PREFIX], [`$PKG_CONFIG --variable=prefix gyoto`]) AC_SUBST([GYOTO_EPREFIX], [`$PKG_CONFIG --variable=exec_prefix gyoto`]) AC_SUBST([Y_INST_HOME], [`$PKG_CONFIG --variable=Y_INST_HOME gyoto`]) AC_SUBST([Y_INST_SITE], [`$PKG_CONFIG --variable=Y_INST_SITE gyoto`]) # all about the install directories GYOTO_PLUGDIR=` $PKG_CONFIG --variable=GYOTO_PLUGDIR gyoto` GYOTO_SOVERS=` $PKG_CONFIG --variable=GYOTO_SOVERS gyoto` localpkglibdir=`$PKG_CONFIG --variable=localpkglibdir gyoto` # all about the C++ compilers gyoto_MPICXX=`$PKG_CONFIG --variable=MPICXX gyoto` gyoto_CXX=`$PKG_CONFIG --variable=CXX gyoto` ], [AC_MSG_ERROR([gyoto.pc not found or not functional! Possible culprits: is PKG_CONFIG_PATH correct? are all the dependencies specified in gyoto.pc installed? Else call the guru.])] ) ## Where shall we install the plug-in? # If the user passes the option --enable-globalinstall, # then install in the same place as the standard plug-ins. # # Else, if gyoto.pc specifies a local install directory, use it (it # will typically be /usr/local/lib/gyoto/SOVERS). # # Else, default to LIBDIR (as can be customized with --libdir). AC_ARG_ENABLE(globalinstall, [AS_HELP_STRING(--enable-globalinstall, [install the plug-in in the global system directory instead of the local tree])]) AS_IF([test "x$enable_globalinstall" == xyes], [soverdir=${GYOTO_PLUGDIR}], [AS_IF([test "x$localpkglibdir" == x], [soverdir=${libdir}], [soverdir=${localpkglibdir}/${GYOTO_SOVERS}])]) # For picky users, allow setting soverdir explicitely, overriding the above: AC_ARG_WITH(soverdir, [AS_HELP_STRING([--with-soverdir=SOVERDIR], [install the plug-in exactly in SOVERDIR. By default, use instructions from gyoto.pc or default to LIBDIR (see --enable-globalinstall)])], [AS_IF([test "x$with_soverdir" != xno], [soverdir=$with_soverdir])]) # Finally propagate this variable to the Makefiles: AC_SUBST(soverdir) ## Which C++ compiler should we use? # gyoto.pc should specify MPICXX and/or CXX. Try them first. AC_PROG_CXX(["$gyoto_MPICXX" "$gyoto_CXX" g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC]) mySUBDIRS="lib" AC_CONFIG_FILES([Makefile lib/Makefile bin/gyoto], [test -e bin/gyoto && chmod a+x bin/gyoto]) AC_SUBST([mySUBDIRS]) AC_OUTPUT Gyoto-1.2.0/plugins/null/depcomp000077500000000000000000000560161302352257300166350ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, 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 Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: Gyoto-1.2.0/plugins/null/doc/000077500000000000000000000000001302352257300160155ustar00rootroot00000000000000Gyoto-1.2.0/plugins/null/doc/doxyfile000066400000000000000000001737161302352257300176020ustar00rootroot00000000000000# Doxyfile 1.5.8 # 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 a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = Gyoto # 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 = # 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, 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-Cyrilic, Slovak, Slovene, # Spanish, Swedish, and Ukrainian. 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 = # 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 is your file systems # 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 = NO # 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 = NO # 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 = 8 # 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 = # 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 = NO # 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, C#, 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 EXTENSION_MAPPING = h=C++ C=C++ # 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 make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # 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 to 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 = NO # 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 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 penality. # 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 rougly 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 #--------------------------------------------------------------------------- # 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_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 namespace 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 = NO # 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 = NO # 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 = NO # 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 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 = YES # 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_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 # 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 define 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 defines 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 = NO # 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 = #--------------------------------------------------------------------------- # 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 # This WARN_NO_PARAMDOC option can be abled 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 = #--------------------------------------------------------------------------- # 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 = ../include # 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++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = # 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 = NO # The EXCLUDE tag can be used to specify files and/or directories that should # 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. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem 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 = # 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 = # 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 = NO # 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 = images # 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, INPUT_FILTER # is applied to all files. 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 #--------------------------------------------------------------------------- # 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 = YES #--------------------------------------------------------------------------- # 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 = 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. 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 # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # 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 = NO # 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 # 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 = # 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 = # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # 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 FRAME, 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 (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. Other possible values # for this tag are: HIERARCHIES, which will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list; # ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which # disables this behavior completely. For backwards compatibility with previous # releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE # respectively. GENERATE_TREEVIEW = NONE # 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 # 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 #--------------------------------------------------------------------------- # 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 = YES # 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. 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, a4wide, 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 = # 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 = # 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 = YES # 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 = YES # 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 #--------------------------------------------------------------------------- # 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 stylesheet 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 = NO # 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 # in the INCLUDE_PATH (see below) will be search if 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 = # 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. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and 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. # Optionally an initial location of the external documentation # can be added for each tagfile. 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. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # 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 is superseded by the HAVE_DOT option below. This is only a # fallback. 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 # By default doxygen will write a font called FreeSans.ttf to the output # directory and reference it in all dot files that doxygen generates. This # font does not include all possible unicode characters however, so when you need # these (or just want a differently looking font) you can specify the font name # using DOT_FONTNAME. You need 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 # 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 output directory to look for the # FreeSans.ttf font (which doxygen will put there itself). If you specify a # different font using DOT_FONTNAME you can set the path where dot # can find it using this tag. 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 # 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 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 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 png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # 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 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 = 0 # 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 #--------------------------------------------------------------------------- # Options related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO Gyoto-1.2.0/plugins/null/include/000077500000000000000000000000001302352257300166735ustar00rootroot00000000000000Gyoto-1.2.0/plugins/null/include/GyotoNull.h000066400000000000000000000030131302352257300207750ustar00rootroot00000000000000/* Copyright © 2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ /** * \file GyotoNull.h * \brief Null Astrobj, just for investigating geodesics * * The target of ray-traced Gyoto::Photon */ #ifndef __GyotoNullAstrobj_H_ #define __GyotoNullAstrobj_H_ #include #include #include namespace Gyoto{ namespace Astrobj { class Null; } class FactoryMessenger; namespace Spectrum { class Generic; } } #include #include /** * \class Gyoto::Null. * \brief Empty Astrobj * * The target of ray-traced Gyoto::Photon */ class Gyoto::Astrobj::Null : public Astrobj::Generic { friend class Gyoto::SmartPointer; public: Null(); Null(const Null& o); virtual Null * clone() const ; virtual ~Null() ; virtual int Impact(Photon *ph, size_t index, Astrobj::Properties *data=NULL); }; #endif Gyoto-1.2.0/plugins/null/install-sh000077500000000000000000000332551302352257300172640ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # 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-writable 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: Gyoto-1.2.0/plugins/null/lib/000077500000000000000000000000001302352257300160165ustar00rootroot00000000000000Gyoto-1.2.0/plugins/null/lib/InitPlug.C000066400000000000000000000020601302352257300176530ustar00rootroot00000000000000/* Copyright © 2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ // #include all headers necessary to register subcontractors below #include "GyotoNull.h" using namespace Gyoto; // Rename replace "null" with actual name of plug-in in the init // function name below: extern "C" void __GyotonullInit() { // Register subcontractors for all new classes Astrobj::Register("Null", &Astrobj::Subcontractor); } Gyoto-1.2.0/plugins/null/lib/Makefile.am000066400000000000000000000012721302352257300200540ustar00rootroot00000000000000# Whenever this file is edited, reprocess it with autoreconf, then # re-run the configure script. ACLOCAL_AMFLAGS = -I m4 # Add $(LORENECPPFLAGS) and $(LORENELDFLAGS) or other flags as needed. # Unless your plug-in needs some deprecated method names, specify # -DGYOTO_NO_DEPRECATED. AM_CPPFLAGS = -I@top_srcdir@/include $(XERCESCPPFLAGS) AM_LDFLAGS = $(Gyoto_LDFLAGS) -module -export-dynamic -shared -avoid-version AM_CXXFLAGS = $(Gyoto_CFLAGS) -DGYOTO_NO_DEPRECATED # Replace all occurrences of null below by the actual name of the # plug-in. # List all the C++ source files in libgyoto__la_SOURCES. sover_LTLIBRARIES = libgyoto-null.la libgyoto_null_la_SOURCES = Null.C InitPlug.C Gyoto-1.2.0/plugins/null/lib/Makefile.in000066400000000000000000000513121302352257300200650ustar00rootroot00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ # Whenever this file is edited, reprocess it with autoreconf, then # re-run the configure script. VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = lib DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d 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)$(soverdir)" LTLIBRARIES = $(sover_LTLIBRARIES) libgyoto_null_la_LIBADD = am_libgyoto_null_la_OBJECTS = Null.lo InitPlug.lo libgyoto_null_la_OBJECTS = $(am_libgyoto_null_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libgyoto_null_la_SOURCES) DIST_SOURCES = $(libgyoto_null_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYLIB_VAR = @DYLIB_VAR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GYOTO = @GYOTO@ GYOTO_EPREFIX = @GYOTO_EPREFIX@ GYOTO_PREFIX = @GYOTO_PREFIX@ Gyoto_CFLAGS = @Gyoto_CFLAGS@ Gyoto_LIBS = @Gyoto_LIBS@ HOME_LORENE = @HOME_LORENE@ 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@ LIPO = @LIPO@ LN_S = @LN_S@ LORENECPPFLAGS = @LORENECPPFLAGS@ LORENELDFLAGS = @LORENELDFLAGS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ 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@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SWIG = @SWIG@ SYS = @SYS@ VERSION = @VERSION@ YORICK = @YORICK@ Y_INST_HOME = @Y_INST_HOME@ Y_INST_SITE = @Y_INST_SITE@ 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__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ 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@ mySUBDIRS = @mySUBDIRS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ plugin_sfx = @plugin_sfx@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ soverdir = @soverdir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 # Add $(LORENECPPFLAGS) and $(LORENELDFLAGS) or other flags as needed. # Unless your plug-in needs some deprecated method names, specify # -DGYOTO_NO_DEPRECATED. AM_CPPFLAGS = -I@top_srcdir@/include $(XERCESCPPFLAGS) AM_LDFLAGS = $(Gyoto_LDFLAGS) -module -export-dynamic -shared -avoid-version AM_CXXFLAGS = $(Gyoto_CFLAGS) -DGYOTO_NO_DEPRECATED # Replace all occurrences of null below by the actual name of the # plug-in. # List all the C++ source files in libgyoto__la_SOURCES. sover_LTLIBRARIES = libgyoto-null.la libgyoto_null_la_SOURCES = Null.C InitPlug.C all: all-am .SUFFIXES: .SUFFIXES: .C .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-soverLTLIBRARIES: $(sover_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(sover_LTLIBRARIES)'; test -n "$(soverdir)" || 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)$(soverdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(soverdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(soverdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(soverdir)"; \ } uninstall-soverLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(sover_LTLIBRARIES)'; test -n "$(soverdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(soverdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(soverdir)/$$f"; \ done clean-soverLTLIBRARIES: -test -z "$(sover_LTLIBRARIES)" || rm -f $(sover_LTLIBRARIES) @list='$(sover_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgyoto-null.la: $(libgyoto_null_la_OBJECTS) $(libgyoto_null_la_DEPENDENCIES) $(EXTRA_libgyoto_null_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) -rpath $(soverdir) $(libgyoto_null_la_OBJECTS) $(libgyoto_null_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitPlug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Null.Plo@am__quote@ .C.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .C.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .C.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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) installdirs: for dir in "$(DESTDIR)$(soverdir)"; 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-soverLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -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-soverLTLIBRARIES 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-soverLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-soverLTLIBRARIES cscopelist-am ctags \ ctags-am 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-soverLTLIBRARIES \ 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 tags-am uninstall uninstall-am \ uninstall-soverLTLIBRARIES # 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: Gyoto-1.2.0/plugins/null/lib/Null.C000066400000000000000000000017621302352257300170420ustar00rootroot00000000000000/* Copyright © 2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoNull.h" using namespace Gyoto; using namespace Gyoto::Astrobj; Null::Null() : Generic("Null") {} Null::Null(const Null& o) : Generic(o){} Null * Null::clone() const { return new Null(*this); } Null::~Null() {} int Null::Impact(Photon *, size_t , Astrobj::Properties *) {return 0;} Gyoto-1.2.0/plugins/null/ltmain.sh000066400000000000000000010520261302352257300170760ustar00rootroot00000000000000 # 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 Debian-2.4.2-1.1 # 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 Debian-2.4.2-1.1" 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%" test "X$link_all_deplibs" != Xno && libs="$libs $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" 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 elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi 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 ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; 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 Gyoto-1.2.0/plugins/null/m4/000077500000000000000000000000001302352257300155705ustar00rootroot00000000000000Gyoto-1.2.0/plugins/null/m4/libtool.m4000066400000000000000000010575421302352257300175140ustar00rootroot00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # 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 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. m4_define([_LT_COPYING], [dnl # 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. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # 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 ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl 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 _LT_CC_BASENAME([$compiler]) # 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 _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# 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' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # 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' _LT_CONFIG_STATUS_DECLARATIONS 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 lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); 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 lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); 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 _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [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. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### 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 _LT_PROG_LTMAIN # 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) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl 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* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl 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* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [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" >&AS_MESSAGE_LOG_FD $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 >&AS_MESSAGE_LOG_FD # 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 >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [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" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $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 >&AS_MESSAGE_LOG_FD 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 >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) 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 ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_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 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="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}" _LT_TAGVAR(module_expsym_cmds, $1)="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}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="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 _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`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_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # 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*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ 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" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. 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|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*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 AC_TRY_EVAL(ac_compile); 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" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) 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" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # 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 _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_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 $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" 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>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | 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 ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_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 AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | 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 AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=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\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_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_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = 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 _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ 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}' m4_if([$1], [],[ 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`' m4_if([$1], [],[ 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 version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; 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 | 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 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) 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' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; 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 AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi 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 _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[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]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_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]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 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 ;; 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 | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=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 ]) 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 _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) 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 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [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 ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # 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 AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_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@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_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@&t@_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_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -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 ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # 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 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_pic, $1)='-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 m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; 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_TAGVAR(lt_prog_compiler_pic, $1)=-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_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; 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). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_pic, $1)='-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 m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; 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_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-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). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-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_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_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 _LT_TAGVAR(export_symbols_cmds, $1)='$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 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_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. dnl Note also adjust exclude_expsyms for C++ above. 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 ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= 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 _LT_TAGVAR(ld_shlibs, $1)=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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; 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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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 _LT_TAGVAR(whole_archive_flag_spec, $1)= 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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$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 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # 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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=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 _LT_TAGVAR(export_symbols_cmds, $1)='$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 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|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. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${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 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no 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 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${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. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='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, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$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. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$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*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # 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) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$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. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(archive_expsym_cmds, $1)='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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='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='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [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]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$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);}' _LT_TAG_COMPILER # 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 _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## 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_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$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. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_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 _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) 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_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$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' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -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 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=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. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${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 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${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. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=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. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='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, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='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, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $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 _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$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. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | 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. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$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."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='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`"' _LT_TAGVAR(old_archive_cmds, $1)='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' _LT_TAGVAR(archive_cmds, $1)='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' _LT_TAGVAR(archive_expsym_cmds, $1)='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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${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++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -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 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' _LT_TAGVAR(compiler_needs_object, $1)=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. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=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. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`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 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=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?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=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. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='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. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$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... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) 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_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf 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). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 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 ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _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 dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); 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 "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${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 "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${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 "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [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. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; 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 _LT_TAGVAR(postdeps,$1)='-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 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 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_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$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... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC 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_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$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... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## 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_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## 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_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # 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 AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # 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 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 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=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # 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}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # 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 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [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 ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#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 ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS Gyoto-1.2.0/plugins/null/m4/ltoptions.m4000066400000000000000000000300731302352257300200700ustar00rootroot00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [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], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) Gyoto-1.2.0/plugins/null/m4/ltsugar.m4000066400000000000000000000104241302352257300175140ustar00rootroot00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # 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 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) Gyoto-1.2.0/plugins/null/m4/ltversion.m4000066400000000000000000000012621302352257300200600ustar00rootroot00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # 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. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) Gyoto-1.2.0/plugins/null/m4/lt~obsolete.m4000066400000000000000000000137561302352257300204200ustar00rootroot00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # 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 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) Gyoto-1.2.0/plugins/null/m4/pkg.m4000066400000000000000000000130231302352257300166120ustar00rootroot00000000000000# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES Gyoto-1.2.0/plugins/null/missing000077500000000000000000000153301302352257300166510ustar00rootroot00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written 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 case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man 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 # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # 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: Gyoto-1.2.0/plugins/python/000077500000000000000000000000001302352257300156175ustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/AUTHORS000077700000000000000000000000001302352257300203602../../AUTHORSustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/COPYING000077700000000000000000000000001302352257300203262../../COPYINGustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/ChangeLog000077700000000000000000000000001302352257300215642../../ChangeLogustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/INSTALL000077700000000000000000000000001302352257300203222../../INSTALLustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/Makefile.am000066400000000000000000000001351302352257300176520ustar00rootroot00000000000000ACLOCAL_AMFLAGS = -I m4 SUBDIRS=@mySUBDIRS@ $(SUBDIRS): cd $@ ; $(MAKE) .PHONY: $(SUBDIRS) Gyoto-1.2.0/plugins/python/Makefile.in000066400000000000000000000622521302352257300176730ustar00rootroot00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = . DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(top_srcdir)/bin/gyoto.in COPYING config.guess config.sub \ depcomp missing $(top_srcdir)/../../compile \ $(top_srcdir)/../../config.guess \ $(top_srcdir)/../../config.sub $(top_srcdir)/../../install-sh \ $(top_srcdir)/../../ltmain.sh $(top_srcdir)/../../missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/python.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_CLEAN_FILES = bin/gyoto CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-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 \ tags-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_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope 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__post_remove_distdir = $(am__remove_distdir) 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 DIST_TARGETS = dist-gzip 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@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYLIB_VAR = @DYLIB_VAR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GYOTO = @GYOTO@ GYOTO_EPREFIX = @GYOTO_EPREFIX@ GYOTO_PLUGIN_SFX = @GYOTO_PLUGIN_SFX@ GYOTO_PREFIX = @GYOTO_PREFIX@ Gyoto_CFLAGS = @Gyoto_CFLAGS@ Gyoto_LIBS = @Gyoto_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@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NUMPY_CFLAGS = @NUMPY_CFLAGS@ 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@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBS = @PYTHON_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SYS = @SYS@ VERSION = @VERSION@ Y_INST_HOME = @Y_INST_HOME@ Y_INST_SITE = @Y_INST_SITE@ 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__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ 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@ linkname = @linkname@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ mySUBDIRS = @mySUBDIRS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ plugin_sfx = @plugin_sfx@ pluginname = @pluginname@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ soverdir = @soverdir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = @mySUBDIRS@ all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): bin/gyoto: $(top_builddir)/config.status $(top_srcdir)/bin/gyoto.in cd $(top_builddir) && $(SHELL) ./config.status $@ 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. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ 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" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 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__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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.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 u+w $(distdir) mkdir $(distdir)/_build $(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 \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=.. --prefix="$$dc_install_base" \ && $(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__post_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 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 $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic 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-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: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-generic \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck 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-am uninstall uninstall-am $(SUBDIRS): cd $@ ; $(MAKE) .PHONY: $(SUBDIRS) # 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: Gyoto-1.2.0/plugins/python/NEWS000077700000000000000000000000001302352257300174362../../NEWSustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/README000066400000000000000000000005221302352257300164760ustar00rootroot00000000000000This is a python plug-in for Gyoto. It is part of Gyoto and has the same copyright (GPL v3+). It is packaged in a subdirectory as an example for packaging Gyoto plug-ins. It is currently in development. The purpose is to be able to define some objects (e.g. spectra online in python instead of having to write a new C++ class each time. Gyoto-1.2.0/plugins/python/aclocal.m4000066400000000000000000012173671302352257300175000ustar00rootroot00000000000000# generated automatically by aclocal 1.14.1 -*- Autoconf -*- # Copyright (C) 1996-2013 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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 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'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # 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 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. m4_define([_LT_COPYING], [dnl # 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. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # 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 ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl 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 _LT_CC_BASENAME([$compiler]) # 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 _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# 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' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # 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' _LT_CONFIG_STATUS_DECLARATIONS 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 lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); 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 lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); 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 _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [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. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### 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 _LT_PROG_LTMAIN # 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) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl 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* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl 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* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [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" >&AS_MESSAGE_LOG_FD $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 >&AS_MESSAGE_LOG_FD # 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 >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [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" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $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 >&AS_MESSAGE_LOG_FD 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 >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) 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 ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_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 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="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}" _LT_TAGVAR(module_expsym_cmds, $1)="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}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="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 _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`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_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # 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*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ 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" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. 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|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*) 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" ;; powerpcle-*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*) 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" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) 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" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # 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 _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_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 $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" 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>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | 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" && \ test undefined != "$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 ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_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 AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | 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 AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=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\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_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_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = 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 _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ 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}' m4_if([$1], [],[ 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`' m4_if([$1], [],[ 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 version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; 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 | 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 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) 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' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; 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 AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi 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 _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[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]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_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]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 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 ;; 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 | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=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 ]) 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 _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) 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 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [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 ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # 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 AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_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@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_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@&t@_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_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -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 ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # 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 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_pic, $1)='-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 m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; 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_TAGVAR(lt_prog_compiler_pic, $1)=-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_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; 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). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_pic, $1)='-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 m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; 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_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-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). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-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_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_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 _LT_TAGVAR(export_symbols_cmds, $1)='$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 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_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. dnl Note also adjust exclude_expsyms for C++ above. 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 ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= 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 _LT_TAGVAR(ld_shlibs, $1)=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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; 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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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 _LT_TAGVAR(whole_archive_flag_spec, $1)= 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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$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 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # 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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=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 _LT_TAGVAR(export_symbols_cmds, $1)='$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 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|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. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${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 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no 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 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${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. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='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, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$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. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$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*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # 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) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$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. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(archive_expsym_cmds, $1)='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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='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='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [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]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$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);}' _LT_TAG_COMPILER # 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 _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$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. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_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 _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) 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_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$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' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -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 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=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. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${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 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${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. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=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. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='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, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='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, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $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 _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$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. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | 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. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$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."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='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`"' _LT_TAGVAR(old_archive_cmds, $1)='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' _LT_TAGVAR(archive_cmds, $1)='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' _LT_TAGVAR(archive_expsym_cmds, $1)='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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${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++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -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 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' _LT_TAGVAR(compiler_needs_object, $1)=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. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=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. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`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 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=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?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=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. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='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. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$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... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) 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_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf 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). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 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 ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _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 dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); 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 "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${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 "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${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 "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [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. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; 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 _LT_TAGVAR(postdeps,$1)='-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 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 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_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$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... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC 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_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$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... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # 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 AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # 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 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 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=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # 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}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # 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 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [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 ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#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 ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # PKG_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable pkgconfigdir as the location where a module # should install pkg-config .pc files. By default the directory is # $libdir/pkgconfig, but the default can be changed by passing # DIRECTORY. The user can override through the --with-pkgconfigdir # parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_INSTALLDIR # PKG_NOARCH_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable noarch_pkgconfigdir as the location where a # module should install arch-independent pkg-config .pc files. By # default the directory is $datadir/pkgconfig, but the default can be # changed by passing DIRECTORY. The user can override through the # --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_NOARCH_INSTALLDIR # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ------------------------------------------- # Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])# PKG_CHECK_VAR # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' 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.14.1], [], [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.14.1])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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$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-2013 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. # 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", "OBJC", "OBJCXX", "UPC", or "GJC". # 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 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" 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 10 /bin/sh. echo '/* dummy */' > 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], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) 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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf 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"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # 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.65])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], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) 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], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [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([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # 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])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro 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 # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi ]) 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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 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-2013 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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 is modern enough. # If it is, 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 --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_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}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/python.m4]) Gyoto-1.2.0/plugins/python/bin/000077500000000000000000000000001302352257300163675ustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/bin/gyoto.in000066400000000000000000000003501302352257300200560ustar00rootroot00000000000000#!/bin/sh set -e export LD_LIBRARY_PATH=@abs_top_srcdir@/lib/.libs:$LD_LIBRARY_PATH export DYLD_LIBRARY_PATH=@abs_top_srcdir@/lib/.libs:$DYLD_LIBRARY_PATH export GYOTO_PLUGINS=stdplug,nofail:lorene,@pluginname@ @GYOTO@ $@ exit 0 Gyoto-1.2.0/plugins/python/config.guess000077700000000000000000000000001302352257300230722../../config.guessustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/config.sub000077700000000000000000000000001302352257300222002../../config.subustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/configure000077500000000000000000022037141302352257300175370ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for gyoto-python 0.0.0. # # 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 -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 test \$(( 1 + 1 )) = 2 || 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: gyoto@sympa.obspm.fr about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: 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='gyoto-python' PACKAGE_TARNAME='gyoto-python' PACKAGE_VERSION='0.0.0' PACKAGE_STRING='gyoto-python 0.0.0' PACKAGE_BUGREPORT='gyoto@sympa.obspm.fr' PACKAGE_URL='' ac_unique_file="include/GyotoPython.h" # 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 mySUBDIRS NUMPY_CFLAGS DEFAULT_FALSE DEFAULT_TRUE linkname pluginname PYTHON_LIBS PYTHON_LDFLAGS PYTHON_CFLAGS PYTHON_INCLUDES PYTHON_CONFIG PYTHON Y_INST_SITE Y_INST_HOME GYOTO_PLUGIN_SFX GYOTO_EPREFIX GYOTO_PREFIX GYOTO soverdir Gyoto_LIBS Gyoto_CFLAGS plugin_sfx SYS DYLIB_VAR PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC LIBTOOL AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V 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_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build 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_silent_rules enable_shared enable_static with_pic enable_fast_install enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR Gyoto_CFLAGS Gyoto_LIBS PYTHON PYTHON_CONFIG' # 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 gyoto-python 0.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] 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/gyoto-python] --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] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of gyoto-python 0.0.0:";; 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-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --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] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-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). Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory 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 CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path Gyoto_CFLAGS C compiler flags for Gyoto, overriding pkg-config Gyoto_LIBS linker flags for Gyoto, overriding pkg-config PYTHON the Python interpreter PYTHON_CONFIG the Python-config program Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF 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 gyoto-python configure 0.0.0 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_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_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_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_c_preproc_warn_flag$ac_c_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_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_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_c_try_run # 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_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_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_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_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { 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 eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=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 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_type # ac_fn_py_try_run LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_py_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_py_try_run # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $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 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_c_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_c_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_c_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 gyoto@sympa.obspm.fr ## ## ----------------------------------- ##" ) | 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_c_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 gyoto-python $as_me 0.0.0, 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 "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$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. # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version='1.14' # 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; } # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file 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 --is-lightweight"; then am_missing_run="$MISSING " 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; } 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 # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' 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='gyoto-python' VERSION='0.0.0' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # 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}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi 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" # 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # 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_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 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_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=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". 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_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false 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 10 /bin/sh. echo '/* dummy */' > 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_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $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 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 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" && \ test undefined != "$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 ;; 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 | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=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_c_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*|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*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*) 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" ;; powerpcle-*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*) 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 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 { $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; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_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_c_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_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_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_c_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 \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $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_c_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_c_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 # 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 # 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* 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 | 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 ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=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* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $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 link_all_deplibs=no 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* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *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 version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; 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 | 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' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; 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=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: # Checks for programs. 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 { $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=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". 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_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false 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 10 /bin/sh. echo '/* dummy */' > 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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi 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 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=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 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 ;; 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 | 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 | 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* | netbsdelf*-gnu) ;; *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 ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) 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 version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; 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 | 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' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; 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=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $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=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". 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_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false 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 10 /bin/sh. echo '/* dummy */' > 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_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; 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_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$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 ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; 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_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$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 ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" 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 PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; 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; } PKG_CONFIG="" fi fi if test "x$PKG_CONFIG" == "x"; then : as_fn_error $? "Please install pkg-config" "$LINENO" 5 fi # Checks for libraries. # Checks for header files. # Checks for typedefs, structures, and compiler characteristics. ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # Checks for library functions. for ac_func in pow sqrt do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Guess *LD_LIBRARY_PATH variable for make check SYS=other DYLIB_VAR=LD_LIBRARY_PATH case "x$target_os" in xdarwin*|xmacos) DYLIB_VAR=DYLD_LIBRARY_PATH SYS=Darwin ;; *) ;; esac plugin_sfx=so # Used in yorick/stdplug/Makefile PKG_CONFIG_PATH+=../../lib export PKG_CONFIG_PATH # Read Gyoto's pkg-config file pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gyoto" >&5 $as_echo_n "checking for Gyoto... " >&6; } if test -n "$Gyoto_CFLAGS"; then pkg_cv_Gyoto_CFLAGS="$Gyoto_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gyoto\""; } >&5 ($PKG_CONFIG --exists --print-errors "gyoto") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_Gyoto_CFLAGS=`$PKG_CONFIG --cflags "gyoto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$Gyoto_LIBS"; then pkg_cv_Gyoto_LIBS="$Gyoto_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gyoto\""; } >&5 ($PKG_CONFIG --exists --print-errors "gyoto") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_Gyoto_LIBS=`$PKG_CONFIG --libs "gyoto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then Gyoto_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gyoto" 2>&1` else Gyoto_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gyoto" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$Gyoto_PKG_ERRORS" >&5 as_fn_error $? "gyoto.pc not found or not functional! Check PKG_CONFIG_PATH or call the guru" "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "gyoto.pc not found or not functional! Check PKG_CONFIG_PATH or call the guru" "$LINENO" 5 else Gyoto_CFLAGS=$pkg_cv_Gyoto_CFLAGS Gyoto_LIBS=$pkg_cv_Gyoto_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } soverdir=`$PKG_CONFIG --variable=GYOTO_PLUGDIR gyoto` GYOTO=`$PKG_CONFIG --variable=GYOTO gyoto` GYOTO_PREFIX=`$PKG_CONFIG --variable=prefix gyoto` GYOTO_EPREFIX=`$PKG_CONFIG --variable=exec_prefix gyoto` GYOTO_PLUGIN_SFX=`$PKG_CONFIG --variable=GYOTO_PLUGIN_SFX gyoto` Y_INST_HOME=`$PKG_CONFIG --variable=Y_INST_HOME gyoto` Y_INST_SITE=`$PKG_CONFIG --variable=Y_INST_SITE gyoto` gyoto_MPICXX=`$PKG_CONFIG --variable=MPICXX gyoto` fi if test "x$gyoto_MPICXX" != "x"; then : CXX="$gyoto_MPICXX" fi for ac_prog in python \ python3 \ python2 \ python4.0 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 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_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # 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_PYTHON="$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 ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYTHON" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Python >= '2.0'" >&5 $as_echo_n "checking if Python >= '2.0'... " >&6; } if ${pc_cv_python_req_version_2_0+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=py ac_compile='chmod +x conftest.$ac_ext >&5' ac_link='chmod +x conftest.$ac_ext && cp conftest.$ac_ext conftest >&5' 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 > conftest.$ac_ext <<_ACEOF #!$PYTHON import sys if __name__ == '__main__': # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x reqver = list(map(int, '2.0'.split('.'))) + [0, 0, 0] reqverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(4)): reqverhex = (reqverhex << 8) + reqver[i] # the final 8 bits are "0xf0" for final versions, which are all # we'll test against, since it's doubtful that a released software # will depend on an alpha- or beta-state Python. reqverhex += 0xf0 if sys.hexversion >= reqverhex: sys.exit() else: sys.exit(1) _ACEOF if ac_fn_py_try_run "$LINENO"; then : pc_cv_python_req_version_2_0=yes else pc_cv_python_req_version_2_0=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_req_version_2_0" >&5 $as_echo "$pc_cv_python_req_version_2_0" >&6; } if test "$pc_cv_python_req_version_2_0" = "no"; 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 $? "No compatible Python interpreter found. If you're sure that you have one, try setting the PYTHON environment variable to the location of the interpreter. See \`config.log' for more details" "$LINENO" 5; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Python <= '4.0'" >&5 $as_echo_n "checking if Python <= '4.0'... " >&6; } if ${pc_cv_python_req_version_4_0+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=py ac_compile='chmod +x conftest.$ac_ext >&5' ac_link='chmod +x conftest.$ac_ext && cp conftest.$ac_ext conftest >&5' 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 > conftest.$ac_ext <<_ACEOF #!$PYTHON import sys if __name__ == '__main__': # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x reqver = list(map(int, '4.0'.split('.'))) + [0, 0, 0] reqverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(4)): reqverhex = (reqverhex << 8) + reqver[i] # the final 8 bits are "0xf0" for final versions, which are all # we'll test against, since it's doubtful that a released software # will depend on an alpha- or beta-state Python. reqverhex += 0xf0 if sys.hexversion <= reqverhex: sys.exit() else: sys.exit(1) _ACEOF if ac_fn_py_try_run "$LINENO"; then : pc_cv_python_req_version_4_0=yes else pc_cv_python_req_version_4_0=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_req_version_4_0" >&5 $as_echo "$pc_cv_python_req_version_4_0" >&6; } if test "$pc_cv_python_req_version_4_0" = "no"; 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 $? "No compatible Python interpreter found. If you're sure that you have one, try setting the PYTHON environment variable to the location of the interpreter. See \`config.log' for more details" "$LINENO" 5; } fi # Extract the first word of "`basename $PYTHON`-config", so it can be a program name with args. set dummy `basename $PYTHON`-config; 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_PYTHON_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON_CONFIG="$PYTHON_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON_CONFIG="$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 ;; esac fi PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG if test -n "$PYTHON_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CONFIG" >&5 $as_echo "$PYTHON_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 $as_echo_n "checking for Python includes... " >&6; } if ${pc_cv_python_includes+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then pc_cv_python_includes=`$PYTHON_CONFIG --includes 2>&5` else pc_cv_python_includes="-I$includedir/$_PYTHON_BASENAME" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_includes" >&5 $as_echo "$pc_cv_python_includes" >&6; } PYTHON_INCLUDES=$pc_cv_python_includes pc_cflags_store=$CPPFLAGS CPPFLAGS="$CFLAGS $PYTHON_INCLUDES" ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" if test "x$ac_cv_header_Python_h" = xyes; then : fi CPPFLAGS=$pc_cflags_store { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python CFLAGS" >&5 $as_echo_n "checking for Python CFLAGS... " >&6; } if ${pc_cv_python_cflags+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then pc_cv_python_cflags=`$PYTHON_CONFIG --cflags 2>&5` else pc_cv_python_cflags= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_cflags" >&5 $as_echo "$pc_cv_python_cflags" >&6; } PYTHON_CFLAGS=$pc_cv_python_cflags { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python LDFLAGS" >&5 $as_echo_n "checking for Python LDFLAGS... " >&6; } if ${pc_cv_python_ldflags+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then pc_cv_python_ldflags=`$PYTHON_CONFIG --ldflags 2>&5` else pc_cv_python_ldflags= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_ldflags" >&5 $as_echo "$pc_cv_python_ldflags" >&6; } PYTHON_LDFLAGS=$pc_cv_python_ldflags { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python libs" >&5 $as_echo_n "checking for Python libs... " >&6; } if ${pc_cv_python_libs+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then pc_cv_python_libs=`$PYTHON_CONFIG --libs 2>&5` else pc_cv_python_libs="-l$_PYTHON_BASENAME" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pc_cv_python_libs" >&5 $as_echo "$pc_cv_python_libs" >&6; } PYTHON_LIBS=$pc_cv_python_libs # Make sure plug-in name matches real name of interpreter. # If different from provided name, make a symlink. pluginname=`basename $PYTHON` linkname=`basename $PYTHON` real=`which $PYTHON` curdir=`pwd` while test x$real != x ; do cd `dirname $real` pluginname=`basename $real` real=`readlink $pluginname || true` done cd $curdir if test x$pluginname != x$linkname; then DEFAULT_TRUE= DEFAULT_FALSE='#' else DEFAULT_TRUE='#' DEFAULT_FALSE= fi # Find out where NumPy headers are located { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NumPy include files" >&5 $as_echo_n "checking for NumPy include files... " >&6; } numpy_includes=`$PYTHON -c "import numpy ; print(numpy.get_include())"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $numpy_includes" >&5 $as_echo "$numpy_includes" >&6; } if test "x$numpy_includes" != "x"; then : NUMPY_CFLAGS=-I$numpy_includes else NUMPY_CFLAGS="" fi mySUBDIRS="lib" ac_config_files="$ac_config_files Makefile lib/Makefile bin/gyoto" 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}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= 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 "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DEFAULT_TRUE}" && test -z "${DEFAULT_FALSE}"; then as_fn_error $? "conditional \"DEFAULT\" 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 gyoto-python $as_me 0.0.0, 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 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" 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 Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ gyoto-python config.status 0.0.0 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;; --he | --h | --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 # 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 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "bin/gyoto") CONFIG_FILES="$CONFIG_FILES bin/gyoto" ;; *) 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_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" eval set X " :F $CONFIG_FILES :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 ;; :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 "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf 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"` # 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'`; 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 ;; "Makefile":F) test -e bin/gyoto && chmod a+x bin/gyoto ;; "lib/Makefile":F) test -e bin/gyoto && chmod a+x bin/gyoto ;; "bin/gyoto":F) test -e bin/gyoto && chmod a+x bin/gyoto ;; 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 Gyoto-1.2.0/plugins/python/configure.ac000066400000000000000000000057241302352257300201150ustar00rootroot00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT([gyoto-python], [0.0.0], [gyoto@sympa.obspm.fr]) AC_CONFIG_SRCDIR([include/GyotoPython.h]) AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE LT_INIT # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_INSTALL PKG_PROG_PKG_CONFIG([]) AS_IF([test "x$PKG_CONFIG" == "x"], [AC_MSG_ERROR([Please install pkg-config])]) # Checks for libraries. # Checks for header files. # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T # Checks for library functions. AC_CHECK_FUNCS([pow sqrt]) # Guess *LD_LIBRARY_PATH variable for make check AC_SUBST([target_os]) SYS=other DYLIB_VAR=LD_LIBRARY_PATH case "x$target_os" in xdarwin*|xmacos) DYLIB_VAR=DYLD_LIBRARY_PATH SYS=Darwin ;; *) ;; esac plugin_sfx=so AC_SUBST([DYLIB_VAR]) # Used in yorick/stdplug/Makefile AC_SUBST([SYS]) AC_SUBST([plugin_sfx]) PKG_CONFIG_PATH+=../../lib export PKG_CONFIG_PATH # Read Gyoto's pkg-config file PKG_CHECK_MODULES([Gyoto], [gyoto], [ AC_SUBST([soverdir], [`$PKG_CONFIG --variable=GYOTO_PLUGDIR gyoto`]) AC_SUBST([GYOTO], [`$PKG_CONFIG --variable=GYOTO gyoto`]) AC_SUBST([GYOTO_PREFIX], [`$PKG_CONFIG --variable=prefix gyoto`]) AC_SUBST([GYOTO_EPREFIX], [`$PKG_CONFIG --variable=exec_prefix gyoto`]) AC_SUBST([GYOTO_PLUGIN_SFX], [`$PKG_CONFIG --variable=GYOTO_PLUGIN_SFX gyoto`]) AC_SUBST([Y_INST_HOME], [`$PKG_CONFIG --variable=Y_INST_HOME gyoto`]) AC_SUBST([Y_INST_SITE], [`$PKG_CONFIG --variable=Y_INST_SITE gyoto`]) gyoto_MPICXX=`$PKG_CONFIG --variable=MPICXX gyoto` ], [AC_MSG_ERROR([gyoto.pc not found or not functional! Check PKG_CONFIG_PATH or call the guru])] ) AS_IF([test "x$gyoto_MPICXX" != "x"], [CXX="$gyoto_MPICXX"]) PC_INIT PC_PROG_PYTHON PC_PYTHON_PROG_PYTHON_CONFIG PC_PYTHON_CHECK_INCLUDES PC_PYTHON_CHECK_HEADERS PC_PYTHON_CHECK_CFLAGS PC_PYTHON_CHECK_LDFLAGS PC_PYTHON_CHECK_LIBS # Make sure plug-in name matches real name of interpreter. # If different from provided name, make a symlink. pluginname=`basename $PYTHON` linkname=`basename $PYTHON` real=`which $PYTHON` curdir=`pwd` while test x$real != x ; do cd `dirname $real` pluginname=`basename $real` real=`readlink $pluginname || true` done cd $curdir AC_SUBST([pluginname]) AC_SUBST([linkname]) AM_CONDITIONAL([DEFAULT], [test x$pluginname != x$linkname]) # Find out where NumPy headers are located AC_MSG_CHECKING([for NumPy include files]) numpy_includes=`$PYTHON -c "import numpy ; print(numpy.get_include())"` AC_MSG_RESULT($numpy_includes) AS_IF([ test "x$numpy_includes" != "x"], [NUMPY_CFLAGS=-I$numpy_includes], [NUMPY_CFLAGS=""]) AC_SUBST([NUMPY_CFLAGS]) mySUBDIRS="lib" AC_CONFIG_FILES([Makefile lib/Makefile bin/gyoto], [test -e bin/gyoto && chmod a+x bin/gyoto]) AC_SUBST([mySUBDIRS]) AC_OUTPUT Gyoto-1.2.0/plugins/python/depcomp000077700000000000000000000000001302352257300211642../../depcompustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/doc/000077500000000000000000000000001302352257300163645ustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/doc/examples/000077500000000000000000000000001302352257300202025ustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/doc/examples/example-python-flared-disk.xml000066400000000000000000000023271302352257300260650ustar00rootroot00000000000000 4e6 0.52 8 90 180 200 32 2.0e-6 2.4e-6 50 0. 0.3 import math import gyoto class FlaredDisk: opening=0.2 rin=4 rout=15 def __call__(self, coord): r=math.sin(coord[2])*coord[1] h_r=abs(math.cos(coord[2])) return max(h_r-self.opening, self.rin-r, r-self.rout) def getVelocity(self, coord, vel): self.this.metric().circularVelocity(coord, vel) FlaredDisk Intensity Gyoto-1.2.0/plugins/python/doc/examples/example-python-standard.xml000066400000000000000000000026741302352257300255050ustar00rootroot00000000000000 An optically thin blob centered on the origin of the coordinate system, in flat space-time. Computation uses the spherical coordinates. 4e6 8 150 In UTF-8 locales, "microas" may be written "µas". 90 In UTF-8 locales, "degree" may be written "°". 0 0 32 gyoto_sample_standard FixedStar 12 15 For this object, the 3 first parameters give the position, the last parameter give Cartesian (0) or spherical (non-zero). 0 0 0 20. 1e0 0. Intensity One can also specify a unit (if Gyoto was compiled with --with-udunits): Intensity[mJy/pix²] Intensity[mJy/µas²] Intensity[J.m-2.s-1.sr-1.Hz-1] Intensity[erg.cm-2.s-1.sr-1.Hz-1] Intensity[mJy.sr-1] Intensity[Jy.sr-1] Gyoto-1.2.0/plugins/python/doc/examples/example-python-thindisk.xml000066400000000000000000000024371302352257300255170ustar00rootroot00000000000000 This example shows how to code a spectrum in Python directly in the XML file. 0. 1000. 100. 1.22 0. 0.314159265358979323846264338327950288419716 32 Python::ThinDisk inherits from ThinDisk, we can set the usual parameters: 3. We could write a python module in a separate file, say "gyoto_sample_spectra.py", and use the "Module" entity to load it: Alternatively, we can put the Python code inline using the "InlineModule" entity. Common indentation will be removed so we don't have to flush everything left . class ThinDisk: def emission(self, nuem, dsem, cph, co): return dsem Since there is only one class in the module, we do not need to specify the class name here: 0. Gyoto-1.2.0/plugins/python/doc/examples/example-python.xml000066400000000000000000000034061302352257300237010ustar00rootroot00000000000000 The goal of this example is to exhibit using a Metric and a Spectrum coded in Python. It is functionaly equivalent to example-fixed-star-minkowski-cartesian.xml in the main Gyoto example directory. An optically thin blob centered on the origin of the coordinate system, in flat space-time. Computation uses the Cartesian coordinates. 4e6 gyoto_sample_metrics Minkowski 8 150 In UTF-8 locales, "microas" may be written "µas". 90 In UTF-8 locales, "degree" may be written "°". 0 0 32 12 0 0 0 gyoto_sample_spectra PowerLaw 0.001 0. gyoto_sample_spectra PowerLaw 0.001 0. 1e0 0. Intensity One can also specify a unit (if Gyoto was compiled with --with-udunits): Intensity[mJy/pix²] Intensity[mJy/µas²] Intensity[J.m-2.s-1.sr-1.Hz-1] Intensity[erg.cm-2.s-1.sr-1.Hz-1] Intensity[mJy.sr-1] Intensity[Jy.sr-1] Gyoto-1.2.0/plugins/python/doc/examples/gyoto_sample_metrics.py000066400000000000000000000100321302352257300250000ustar00rootroot00000000000000'''Sample metrics for using with Gyoto Python plug-in Those classes demonstrate how to use Python classes as Gyoto Metric implementations using Gyoto's "python" plug-in. Note that this plug-in can be renamed to whatever matches the particular version of Python it has been built against (e.g. python3.4). The goal is to be able to instantiate these from XML, from Yorick... and even from Python using the gyoto extension... Synopsis: import gyoto gyoto.requirePlugin("python") # or python2.7 or python3.4... gg=gyoto.Metric("Python") gg.set("Module", "gyoto_sample_metric") gg.set("Class", "Minkowski") Classes that aim at implementing the Gyoto::Metric::Generic interface do so by providing the following methods: gmunu(self, dst, pos): mandatory; christoffel(self, dst, pos): mandatory __setattr__(self, key, value): optional __setitem__(self, key, value): optional ''' import math import numpy import gyoto class Minkowski: '''Flat space metric Implemented for both Cartesian and spherical coordinates. Every Gyoto Metric implemented in Python must implement the three methods illustrated here. ''' def __setattr__(self, key, value): '''Set attributes. Optional. C++ will set several attributes. By overloading __setattr__, on can react when that occurs, in particular to make sure this knows the coordinate kind as in this example. Attributes set by the C++ layer: this: if the Python extension "gyoto" can be imported, it will be set to a gyoto.Metric instance pointing to the C++-side instance. If the "gyoto" extension cannot be loaded, this will be set to None. spherical: when the spherical(bool t) method is called in the C++ layer, it sets the spherical attribute in the Python side. mass: when the mass(double m) method is called in the C++ side, it sets the spherical attribute in the Python side. This example initializes coordKind in the C++ side if it is not already set, since this Minkowski class can work in either. ''' # First, actually store the attribute. This is what would # happen if we did not overload __setattr__. self.__dict__[key]=value # Then, if key is "this", ensure this knows a valid coordKind. if (key is "this"): cK=value.coordKind() if cK is gyoto.GYOTO_COORDKIND_UNSPECIFIED: value.set("Spherical", False) # We could do without this, since this will tell us later # anyway. else: self.spherical = (cK is gyoto.GYOTO_COORDKIND_SPHERICAL) def gmunu(self, g, x): ''' Gyoto::Metric::Generic::gmunu(double dst[4][4], const double pos[4]) Mandatory. C++ will send two NumPy arrays. ''' for mu in range(0, 4): for nu in range(0, 4): g[mu][nu]=g[nu][mu]=0 g[0][0]=-1; if not self.spherical: for mu in range(1, 4): g[mu][mu]=1. return r=x[1] theta=x[2] tmp=r*math.sin(theta) g[1][1]=1. g[2][2]=r*r g[3][3]=tmp*tmp def christoffel(self, dst, x): '''Gyoto::Metric::Generic::christoffel(double dst[4][4][4], const double pos[4]) Mandatory. C++ will send two NumPy arrays. ''' for alpha in range(0, 4): for mu in range(0, 4): for nu in range(0, 4): dst[alpha][mu][nu]=0. if not self.spherical: return 0 r=x[1] theta=x[2] sth=math.sin(theta) cth=math.cos(theta) dst[1][2][2]=-r dst[1][3][3]=-r*sth*sth dst[2][1][2]=dst[2][2][1]= 1./r dst[2][3][3]=-sth*cth dst[3][1][3]=dst[3][3][1]= dst[2][1][2] dst[3][2][3]=dst[3][3][2]= math.tan(math.pi*0.5 - x[2]) return 0 Gyoto-1.2.0/plugins/python/doc/examples/gyoto_sample_spectra.py000066400000000000000000000077621302352257300250130ustar00rootroot00000000000000'''Sample spectra for using with Gyoto Python plug-in Those classes demonstrate how to use Python classes as Gyoto Spectrum implementations using Gyoto's "python" plug-in. Note that this plug-in can be renamed to whatever matches the particular version of Python it has been built against (e.g. python3.4). The goal is to be able to instantiate these from XML, from Yorick... and even from Python using the gyoto extension... Synopsis: import gyoto gyoto.requirePlugin("python") # or python2.7 or python3.4... sp=gyoto.Spectrum("Python") sp.set("Module", "gyoto_sample_spectra") sp.set("Class", "PowerLaw") # or "BlackBody6000" sp.set("Parameters", (1., 2.)) val=sp(3e8/2e-6) Classes that aim at implementing the Gyoto::Spectrum::Generic interface do so by providing the following methods: __call__(self, nu): mandatory; __setitem__: optional; integrate: optional. ''' import math import numpy import gyoto class BlackBody6000: '''Black-body spectrum at 6000K Parameters: none. This example is pretty minimal: it's a black-body with fixed temperature. We implement the only mandaroty function: __call__(self, nu). ''' def __call__(self, nu): '''spectrum(frequency_in_Hz) = black-body distribution for T=6000K. This function implements only Gyoto::Spectrum::Python::operator()(double nu). It does so by not accepting the varargs argument. Contrast with the PowerLaw definition of __call__. ''' temperature=6000. PLANCK_OVER_BOLTZMANN=4.7992373e-11 return nu*nu*nu/(math.exp(PLANCK_OVER_BOLTZMANN*nu/temperature)-1.); class PowerLaw: '''Powerlaw spectrum Parameters: (constant, exponent) This example is pretty complete. It implements everything usefull and some eye-candy. ''' constant=0. exponent=0. def __setitem__(self, key, value): ''' This is how Gyoto sends the XML entity: spectrum[i]=value i=0: set constant i=1: set exponent ''' if (key==0): self.constant = value elif (key==1): self.exponent = value else: raise IndexError def __getitem__(self, key, value): ''' Implementing this is absolutely not necessary (Gyoto does not use it, as of now), but we can: it allows retrieving the parameters like __setitem__ sets them: spectrum[0] == spectrum.constant spectrum[1] == spectrum.exponent ''' if (key==0): return self.constant elif (key==1): return self.exponent else: raise IndexError def __call__(self, *args): '''spectrum(frequency_in_Hz) = constant * nu**exponent This function implements both Spectrum::Python::operator()(double nu). and Spectrum::Python::operator()(double nu, double opacity, double ds). This behavior is obtained by having the varargs *args as second argument instead of a normal variable. The second overloaded function is here exactly the same as the C++ generic implementation and therefore useless. It is here to illustrate the API. ''' nu=args[0] if (len(args)==1): return self.constant * math.pow(nu, self.exponent) else: opacity=args[1] ds=args[2] thickness=(opacity*ds) if (thickness): return self(nu) * (1.-math.exp(-thickness)) return 0. def integrate(self, nu1, nu2): ''' If present, this function implements Gyoto::Spectrum::Python::integrate(double nu1, double nu2) If absent, the generic integrator is used. ''' if (self.exponent == -1.): return self.constant * (math.log(nu2) -math.log(nu1)) return self.constant * (math.pow(nu2, self.exponent+1)- math.pow(nu1, self.exponent+1)) / (self.exponent+1) Gyoto-1.2.0/plugins/python/doc/examples/gyoto_sample_standard.py000066400000000000000000000054551302352257300251470ustar00rootroot00000000000000'''Sample Astrobj::Standard for using with Gyoto Python plug-in Those classes demonstrate how to use Python classes as Gyoto Astrobj::Standard implementations using Gyoto's "python" plug-in. Note that this plug-in can be renamed to whatever matches the particular version of Python it has been built against (e.g. python3.4). The goal is to be able to instantiate these from XML, from Yorick... and even from Python using the gyoto extension... Synopsis: import gyoto gyoto.requirePlugin("python") # or python2.7 or python3.4... sp=gyoto.Astrobj("Python::Standard") sp.set("Module", "gyoto_sample_standard") sp.set("Class", "FixedStar") sp.set("Parameters", (0., 0., 0.)) Classes that aim at implementing the Gyoto::Astrobj::Standard interface do so by providing the following methods: __call__: required getVelocity: required giveDelta, emission, integrateEmission, transmission, __setitem__: optional. emission and integrateEmission can be overloaded by using the varargs argument. ''' import math import numpy import gyoto class FixedStar: ''' Sample class for Astrobj::Python::Standard ''' def __init__(self): '''Initialize instance Needed here to make a non-static array data member. ''' self.pos = numpy.zeros((4), float) def __setitem__(self, key, value): '''Set parameters Here, the parameters will be the 3 space coordinates of the center of the blob. ''' if key in (0, 1, 2): self.pos[key+1]=value else: raise IndexError self.coord_st=self.to_cartesian(self.pos) def to_cartesian(self, coord): '''Helper function, not in the API ''' gg=self.this.metric() spherical=False if gg is not None: spherical = gg.coordKind() == gyoto.GYOTO_COORDKIND_SPHERICAL if spherical: rs=coord[1] ths=coord[2] phs=coord[3] st=math.sin(ths) ct=math.cos(ths) sp=math.sin(phs) cp=math.cos(phs) return numpy.array((coord[0], rs*st*cp, rs*st*sp, rs*ct)) return coord def __call__(self, coord): ''' Astrobj::Standard::operator()() Required ''' coord_ph=self.to_cartesian(coord) coord_st=self.coord_st dx = coord_ph[1]-coord_st[1] dy = coord_ph[2]-coord_st[2] dz = coord_ph[3]-coord_st[3] return math.sqrt(dx*dx + dy*dy + dz*dz) def getVelocity(self, coord, vel): ''' Velocity field Required ''' vel[0]=1. for i in range(1, 4): vel[i]=0. def emission(self, nuem, dsem, cph, co): ''' emission Optional ''' return 1. Gyoto-1.2.0/plugins/python/doc/examples/gyoto_sample_thindisks.py000066400000000000000000000021561302352257300253420ustar00rootroot00000000000000'''Sample Astrobj::ThinDisk for using with Gyoto Python plug-in Those classes demonstrate how to use Python classes as Gyoto Astrobj::ThibDisk implementations using Gyoto's "python" plug-in. Note that this plug-in can be renamed to whatever matches the particular version of Python it has been built against (e.g. python3.4). The goal is to be able to instantiate these from XML, from Yorick... and even from Python using the gyoto extension... Synopsis: import gyoto gyoto.requirePlugin("python") # or python2.7 or python3.4... td=gyoto.Spectrum("Python::ThinDisk") td.set("Module", "gyoto_sample_thindisks") td.set("Class", "ThinDisk") Classes that aim at implementing the Gyoto::Astrobj::ThinDisk interface do so by providing the following methods: getVelocity, giveDelta, emission, integrateEmission, transmission, __setitem__: optional. emission and integrateEmission can be overloaded by using the varargs argument. ''' class ThinDisk: '''A ThinDisk with trivial emission ''' def emission(self, nuem, dsem, cph, co): return dsem Gyoto-1.2.0/plugins/python/doc/examples/test.py000066400000000000000000000033161302352257300215360ustar00rootroot00000000000000import gyoto import sys import os.path # The name of the Gyoto plug-in that can be loaded in a given Python # session is the same as the name of the Python executable python_plugin = os.path.basename(sys.executable) gyoto.requirePlugin(python_plugin) sp=gyoto.Spectrum("Python") sp.set("Module", "gyoto_sample_spectra") sp.set("Class", "PowerLaw") sp.set("Parameters", (1., 10.)) print('value: {}'.format(sp(3e8/2e-6))) sp.set("Parameters", (2., 20.)) print('value: {}'.format(sp(3e8/2e-6))) #BlackBody6000 does not accept any parameter: sp=gyoto.Spectrum("Python") sp.set("Module", "gyoto_sample_spectra") sp.set("Class", "BlackBody6000") print('value: {}'.format(sp(3e8/2e-6))) sp.set("Module", "gyoto_sample_spectra") sp.set("Class", "PowerLaw") sp.set("Parameters", (2., 0.)) print('using Python integrate: {}'.format(sp.integrate(1., 2.))) sp2=gyoto.Spectrum("PowerLaw") sp2.set("Exponent", 0.) sp2.set("Constant", 2.) print('using Gyoto generic integrator: {}'.format(sp2.integrate(1., 2.))) sp.set("Module", "gyoto_sample_spectra") sp.set("Class", "PowerLaw") sp.set("Parameters", (2., 1.)) print('using Python integrate: {}'.format(sp.integrate(1., 2.))) sp2=gyoto.Spectrum("PowerLaw") sp2.set("Exponent", 1.) sp2.set("Constant", 2.) print('using Gyoto generic integrator: {}'.format(sp2.integrate(1., 2.))) sp.set("Module", "gyoto_sample_spectra") sp.set("Class", "PowerLaw") sp.set("Parameters", (5., -1.)) print('using Python integrate: {}'.format(sp.integrate(1., 2.))) sp2=gyoto.Spectrum("PowerLaw") sp2.set("Exponent", -1.) sp2.set("Constant", 5.) print('using Gyoto generic integrator: {}'.format(sp2.integrate(1., 2.))) gg=gyoto.Metric("Python") gg.set("Module", "gyoto_sample_metrics") gg.set("Class", "Minkowski") Gyoto-1.2.0/plugins/python/gyoto.in000066400000000000000000000003421302352257300173070ustar00rootroot00000000000000#!/bin/sh set -e export LD_LIBRARY_PATH=@abs_top_srcdir@/lib/.libs:$LD_LIBRARY_PATH export DYLD_LIBRARY_PATH=@abs_top_srcdir@/lib/.libs:$DYLD_LIBRARY_PATH export GYOTO_PLUGINS=stdplug,nofail:lorene,obspm @GYOTO@ $@@ exit 0 Gyoto-1.2.0/plugins/python/include/000077500000000000000000000000001302352257300172425ustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/include/GyotoPython.h000066400000000000000000000421711302352257300217230ustar00rootroot00000000000000/* Copyright 2015-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ /** * \file GyotoPython.h * \brief Extending Gyoto using Python * * The classes provided here allow implementing a Spectrum, an Astrobj * or a Metric in Python. Together, they form the "python" Gyoto * plug-in. * * This is complementary to, but distinct from the "gyoto" Python * extension. Here, we are embedding Python inside Gyoto so that a few * functions are coded in Python. The Python extension does the * reverse: it allows calling Gyoto functions from within * Python. Beware of the vocabulary: here, we call "plug-in" a shared * library that extends Gyoto, and "extension" a shared library that * extends Python. * * The plug-in works within the gyoto command-line utility as well as * when Gyoto is used inside Python or inside Yorick. The only caveat * is that the python plug-in of Gyoto should not be loaded into a * Python interpreter different from the one that was used for * building the plug-in. * * For this reason, the name of this plug-in depends on the Python * interpreter that was used when building. It can be simply "python", * or a be versionned: for instance "python2.7" or "python3.4". This * way, it is possible to keep several copies of the plug-in, one for * each version of the Python interpreter that are installed on the * machine. Any version can be used in the gyoto command-line utility * or in Yorick, but when Gyoto is used inside Python, only the * matching version of this plug-in may be used. * * Implementing a Spectrum, Astrobj or Metric kind in Python is much * easier than implementing a new C++ plug-in for Gyoto. This saves in * development time. However, there is a cost in terms of computing * time. While this cost may not be noticeable for Spectra and is * moderate for Astrobjs (at least for simple ones), it is quite * significant for Metrics, because the gmunu and christoffel methods * are evaluated several times per integration step, for every * photon. On one example using the Minkowski Metric, the integration * of a full image with the Python implementation took approx. 150-200 * more time than the same integration with the C++ * implementation. So, for Metrics, the Python implementation can * serve as a prototyping test-bed, but most users will probably still * want to re-implement their Metrics in C++ eventually. * * Note also that multi-threading is not very efficient for the * Metric::Python class, because only one thread may interact with the * Python interpreter at any time. MPI multi-processing runs much * faster. Here again, this limitation is less problematic for Spectra * and Astrobjs than it is for Metrics. * * The principle of these classes is very simple: the plugin embeds a * Python interpreter. Each instance of the Gyoto classes * Gyoto::Metric::Python, Gyoto::Spectrum::Python, * Gyoto::Astrobj:Python::Standard and * Gyoto::Astrobj::Python::ThinDisk instantiate a Python class in this * interpreter, and delegate certain methods from the Gyoto API to * this instance. * * In simple cases, the Python instance does not even need to know * that it is running in Gyoto. It simply exposes an interface that is * being called. However, Gyoto sets a few attributes in each * method. Most notably, if the "gyoto" python extension is available, * Gyoto will the the attribute "this" to the C++ instance that * created the Python class instance, so that the Python code can * access C++-side information. * */ #ifndef __GyotoPython_H_ #define __GyotoPython_H_ #include #include #include #include #include namespace Gyoto { /** * \namespace Gyoto::Python * \brief Helpers for the classes deriving from Gyoto::Python::Base */ namespace Python { class Base; /// Return new reference to method, or NULL if method not found. PyObject * PyInstance_GetMethod(PyObject* pInstance, const char *name); /// Return refernce to the gyoto module, or NULL. PyObject * PyImport_Gyoto(); /// Set "this" attribute in instance void PyInstance_SetThis(PyObject * pInstance, PyObject * pNew, void * ptr); /// Check whether method accepts the varargs argument bool PyCallable_HasVarArg(PyObject * pMethod); /// Create module from Python source code in a C string PyObject * PyModule_NewFromPythonCode(const char * code); /// Get reference to the Spectrum constructor in the gyoto Python extension PyObject * pGyotoSpectrum() ; /// Get reference to the Metric constructor in the gyoto Python extension PyObject * pGyotoMetric() ; /// Get reference to the StandardAstrobj constructor in the gyoto Python extension PyObject * pGyotoStandardAstrobj() ; /// Get reference to the ThinDisk constructor in the gyoto Python extension PyObject * pGyotoThinDisk() ; } namespace Spectrum { class Python; } namespace Metric { class Python; } namespace Astrobj { /** * \namespace Gyoto::Astrobj::Python * \brief Classes that wrap Python classes as Gyoto Astrobj implementations */ namespace Python { class Standard; class ThinDisk; } } } /** * \class Gyoto::Python::Base * * \brief Base class for classes in the Python plug-in. * * All classes have those three Properties: * - Module (string): the module in which the Python class is * implemented; * - Class (string): the name of the Python class, in module Module, * to interface with; * - Parameters (vector): list of parameters for this * class. These parameters are passed one by one to the Python * instance using __setitem__ with numerical keys. * * All the Gyoto instances of the classes descending from * Gyoto::Python::Base expose themselves to the Python instance they * wrap immediately after instantiation by setting the 'this' * attribute. If the 'gyoto' Python extension can be loaded, then * 'this' will be an instance of one of the classes gyoto.Metric, * gyoto.Spectrum, gyoto.StandardAstrobj or gyoto.ThinDisk pointing to * the underlying C++ instance. If the 'gyoto' extension is not * available, 'this' will be None. * */ class Gyoto::Python::Base { protected: /** * \brief Name of the Python module that holds the class * * For instance, if the class is implemented in toto.py, the module * name is "toto". Property name: Module. */ std::string module_; /** * \brief Python source code for module that holds the class * */ std::string inline_module_; /** * \brief Name of the Python class that we want to expose * * Property name: Class. */ std::string class_; /** * \brief Parameters that this class needs * * A list of parameters (doubles) can be passed in the Property * Parameters. They will be sent to the Python instance using * __setitem__. */ std::vector parameters_; /** * \brief Reference to the python module once it has been loaded. */ PyObject * pModule_; /** * \brief Reference to the python instance once it has been instantiated. */ PyObject * pInstance_; public: Base(); Base(const Base&); ~Base(); virtual std::string module() const ; ///< Return module_ virtual std::string inlineModule() const ; ///< Return inline_module_ /** * \brief Set #module_ and import the Python module * * Side effects: * - sets #inline_module_ to ""; * - calls #klass(#class_) if #class_ is already known, so #module_ * can be set (or reset) after #class_. */ virtual void module(const std::string&); /** * \brief Set #inline_module_ and import the Python module * * Side effects: * - sets #module_ to ""; * - calls #klass(#class_) if #class_ is already known, so #module_ * can be set (or reset) after #class_. */ virtual void inlineModule(const std::string&); /// Retrieve #class_. virtual std::string klass() const ; /** * \brief Set #class_ and instantiate the Python class. * * Sets #pInstance_. * * This generic implementation takes care of the common ground, but * does not set 'this' or call #parameters(#parameters_). Therefore, * all the derived classes should reimplement this method and at * least call Python::Base::klass(c) and * #parameters(#parameters_). Between the two is the right moment to * check that the Python class implements the required API and to * cache PyObject* pointers to class methods. */ virtual void klass(const std::string& c); /// Retrieve #parameters_ virtual std::vector parameters() const; /** * \brief Set #parameters_ and send them to #pInstance_ * * The parameters are sent to the class instance using the * __setitem__ method with numerical keys. */ virtual void parameters(const std::vector&); }; /** * \class Gyoto::Spectrum::Python * * \brief Loader for Python classes implementing the Spectrum interface * * It interfaces with a Python class which must implement at least the * __call__ method. * * Sample XML file: * \include example-python.xml * Sample Python module: * \include gyoto_sample_spectra.py */ class Gyoto::Spectrum::Python : public Gyoto::Spectrum::Generic, public Gyoto::Python::Base { friend class Gyoto::SmartPointer; protected: /** * \brief Reference to ___call__ * * __call__ is the method in the underlying Python class that * implements Gyoto::Spectrum::Generic::operator()(). */ PyObject * pCall_; /** * \brief Reference to the (optional) integrate method */ PyObject * pIntegrate_; /** * \brief Whether __call__ is overloaded * * This is determined automatically by looking at the parameters * accepted by __call__: * \code * def __call__(self, nu) * \endcode * In this case call is not overloaded and implements only virtual * double operator()(double nu) const; * \code * def __call__(self, *args) * \endcode * In this case __call__ is overloaded and implements both double * operator()(double nu) const and virtual double operator()(double * nu, double opacity, double ds) const. */ bool pCall_overloaded_; public: GYOTO_OBJECT; GYOTO_OBJECT_THREAD_SAFETY; Python(); Python(const Python&); virtual Python * clone() const; ~Python(); // For some reason we need to implement the bunch although only one // is non-trivial virtual std::string module() const ; virtual void module(const std::string&); virtual std::string inlineModule() const ; virtual void inlineModule(const std::string&); virtual std::string klass() const ; virtual void klass(const std::string&); virtual std::vector parameters() const; virtual void parameters(const std::vector&); virtual double operator()(double nu) const; virtual double operator()(double nu, double opacity, double ds) const; virtual double integrate(double nu1, double nu2) ; }; /** * \class Gyoto::Metric::Python * \brief Metric coded in Python * * Loader for Python Metric classes. It interfaces with a Python class * which must implement at least the methods detailed below. * * Use <Cartesian> or </Spherical> to select the coordinate system * kind. * * Sample XML file: * \include example-python.xml * Sample Python module: * \include gyoto_sample_metrics.py */ class Gyoto::Metric::Python : public Gyoto::Metric::Generic, public Gyoto::Python::Base { friend class Gyoto::SmartPointer; private: // Variables to cache Python objects: /** * \brief Reference to the gmunu method */ PyObject * pGmunu_; /** * \brief Reference to the christoffel method */ PyObject * pChristoffel_; public: GYOTO_OBJECT; GYOTO_OBJECT_THREAD_SAFETY; Python(); Python(const Python&); ~Python(); virtual Python* clone() const ; // Accessors for the Gyoto::Property members: // Those are mere wrappers arround Generic::coordKind(), useful for // declaring a boolen property using the macro GYOTO_PROPERTY_BOOL: void spherical(bool); bool spherical() const; virtual std::string module() const ; virtual void module(const std::string&); virtual std::string inlineModule() const ; virtual void inlineModule(const std::string&); virtual std::string klass() const ; virtual void klass(const std::string&); virtual std::vector parameters() const; virtual void parameters(const std::vector&); using Gyoto::Metric::Generic::mass; virtual void mass(double m); // The minimal Gyoto::Metric API: void gmunu(double g[4][4], const double * x) const ; int christoffel(double dst[4][4][4], const double * x) const ; }; /** * \class Gyoto::Astrobj::Python::Standard * \brief Coding a Gyoto::Astrobj::Standard in Python * * Sample XML file: * \include example-python-standard.xml * Sample Python module: * \include gyoto_sample_standard.py */ class Gyoto::Astrobj::Python::Standard : public Gyoto::Astrobj::Standard, public Gyoto::Python::Base { friend class Gyoto::SmartPointer; private: PyObject *pEmission_, *pIntegrateEmission_, *pTransmission_, *pCall_, *pGetVelocity_, *pGiveDelta_; bool pEmission_overloaded_, pIntegrateEmission_overloaded_; public: GYOTO_OBJECT; GYOTO_OBJECT_THREAD_SAFETY; /* Birth and Death*/ Standard(); Standard(const Standard&); ~Standard(); Standard* clone() const; /* Astrobj::Generic API */ virtual double emission(double nu_em, double dsem, double coord_ph[8], double coord_obj[8]=NULL) const ; virtual void emission(double Inu[], double nu_em[], size_t nbnu, double dsem, double coord_ph[8], double coord_obj[8]=NULL) const ; virtual double integrateEmission(double nu1, double nu2, double dsem, double c_ph[8], double c_obj[8]=NULL) const; virtual void integrateEmission(double * I, double const * boundaries, size_t const * chaninds, size_t nbnu, double dsem, double *cph, double *co) const; virtual double transmission(double nuem, double dsem, double coord[8]) const ; /* Astrobj::Standard API */ virtual double operator()(double const coord[4]) ; virtual void getVelocity(double const pos[4], double vel[4]) ; virtual double giveDelta(double coord[8]); /* Python::Base */ virtual std::string module() const ; virtual void module(const std::string&); virtual std::string inlineModule() const ; virtual void inlineModule(const std::string&); virtual std::string klass() const ; virtual void klass(const std::string&); virtual std::vector parameters() const; virtual void parameters(const std::vector&); virtual double criticalValue() const ; virtual void criticalValue(double) ; }; /** * \class Gyoto::Astrobj::Python::ThinDisk * \brief Coding a Gyoto::Astrobj::ThinDisk in Python * * Sample XML file: * \include example-python-thindisk.xml * Sample Python module: * \include gyoto_sample_thindisks.py */ class Gyoto::Astrobj::Python::ThinDisk : public Gyoto::Astrobj::ThinDisk, public Gyoto::Python::Base { friend class Gyoto::SmartPointer; private: PyObject *pEmission_, *pIntegrateEmission_, *pTransmission_, *pCall_, *pGetVelocity_, *pGiveDelta_; bool pEmission_overloaded_, pIntegrateEmission_overloaded_; public: GYOTO_OBJECT; GYOTO_OBJECT_THREAD_SAFETY; /* Birth and Death*/ ThinDisk(); ThinDisk(const ThinDisk&); ~ThinDisk(); ThinDisk* clone() const; /* Astrobj::Generic API */ virtual double emission(double nu_em, double dsem, double coord_ph[8], double coord_obj[8]=NULL) const ; virtual void emission(double Inu[], double nu_em[], size_t nbnu, double dsem, double coord_ph[8], double coord_obj[8]=NULL) const ; virtual double integrateEmission(double nu1, double nu2, double dsem, double c_ph[8], double c_obj[8]=NULL) const; virtual void integrateEmission(double * I, double const * boundaries, size_t const * chaninds, size_t nbnu, double dsem, double *cph, double *co) const; virtual double transmission(double nuem, double dsem, double coord[8]) const ; /* Astrobj::ThinDisk API */ virtual double operator()(double const coord[4]) ; virtual void getVelocity(double const pos[4], double vel[4]) ; /* Python::Base */ virtual std::string module() const ; virtual void module(const std::string&); virtual std::string inlineModule() const ; virtual void inlineModule(const std::string&); virtual std::string klass() const ; virtual void klass(const std::string&); virtual std::vector parameters() const; virtual void parameters(const std::vector&); }; #endif Gyoto-1.2.0/plugins/python/lib/000077500000000000000000000000001302352257300163655ustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/lib/Base.C000066400000000000000000000232531302352257300173500ustar00rootroot00000000000000/* Copyright © 2015-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoPython.h" #include using namespace Gyoto; using namespace Gyoto::Python; using namespace std; PyObject * Gyoto::Python::PyInstance_GetMethod (PyObject* pInstance, const char *name) { PyObject * pName = PyUnicode_FromString(name); if (!pName) return NULL; if (!PyObject_HasAttr(pInstance, pName)) { Py_XDECREF(pName); return NULL; } PyObject * pMethod = PyObject_GetAttr(pInstance, pName); Py_DECREF(pName); if (!pMethod) return NULL; if (!PyCallable_Check(pMethod)) { Py_DECREF(pMethod); return NULL; } return pMethod; } bool Gyoto::Python::PyCallable_HasVarArg(PyObject * pMethod) { static PyObject * pGetArgSpec = NULL; if (!pGetArgSpec) { PyObject * pName = PyUnicode_FromString("inspect"); PyObject * pModule = PyImport_Import(pName); Py_XDECREF(pName); pName=NULL; pGetArgSpec = PyObject_GetAttrString(pModule, "getargspec"); } PyObject * pArgSpec = PyObject_CallFunctionObjArgs(pGetArgSpec, pMethod, NULL); bool answer = (PyTuple_GetItem(pArgSpec, 1) != Py_None); Py_XDECREF(pArgSpec); return answer; } PyObject * Gyoto::Python::PyImport_Gyoto() { static PyObject * pModule = NULL; static bool need_load = true; if (need_load) { need_load=false; pModule = PyImport_ImportModule("gyoto"); if (PyErr_Occurred()) { GYOTO_WARNING << ""; PyErr_Print(); } } return pModule; } PyObject * Gyoto::Python::pGyotoSpectrum() { PyObject * res = NULL; static bool need_load = true; if (need_load) { need_load=false; PyObject* pGyoto=Gyoto::Python::PyImport_Gyoto(); if (pGyoto) res = PyObject_GetAttrString(pGyoto, "Spectrum"); } return res; } PyObject * Gyoto::Python::pGyotoThinDisk() { PyObject * res = NULL; static bool need_load = true; if (need_load) { need_load=false; PyObject* pGyoto=Gyoto::Python::PyImport_Gyoto(); if (pGyoto) res = PyObject_GetAttrString(pGyoto, "ThinDisk"); } return res; } PyObject * Gyoto::Python::pGyotoMetric() { PyObject * res = NULL; static bool need_load = true; if (need_load) { need_load=false; PyObject* pGyoto=Gyoto::Python::PyImport_Gyoto(); if (pGyoto) res = PyObject_GetAttrString(pGyoto, "Metric"); } return res; } PyObject * Gyoto::Python::pGyotoStandardAstrobj() { PyObject * res = NULL; static bool need_load = true; if (need_load) { need_load=false; PyObject* pGyoto=Gyoto::Python::PyImport_Gyoto(); if (pGyoto) res = PyObject_GetAttrString(pGyoto, "StandardAstrobj"); } return res; } void Gyoto::Python::PyInstance_SetThis(PyObject * pInstance, PyObject * pNew, void * ptr) { PyObject * pThis = NULL; if (pNew) pThis = PyObject_CallFunction(pNew, "l", (long)ptr); else { pThis = Py_None; Py_INCREF(pThis); } PyObject_SetAttrString(pInstance, "this", pThis); Py_XDECREF(pThis); } PyObject * Gyoto::Python::PyModule_NewFromPythonCode(const char * source_code) { PyObject * pDedent = NULL; if (!pDedent) { GYOTO_DEBUG << "importing textwrap.dedent\n"; PyObject * mod = PyImport_ImportModule("textwrap"); if (PyErr_Occurred() || !mod) { Py_XDECREF(mod); return NULL; } pDedent = PyObject_GetAttrString(mod, "dedent"); Py_XDECREF(mod); if (PyErr_Occurred() || !pDedent) { return NULL; } GYOTO_DEBUG << "done importing textwrap.dedent\n"; } GYOTO_DEBUG << "dedenting source code... \n"; PyObject * pCode = PyObject_CallFunction(pDedent, "s", source_code); if (PyErr_Occurred() || !pCode) { GYOTO_DEBUG << "failed dedenting source code!\n"; Py_XDECREF(pCode); return NULL; } const char * new_source_code = NULL; if (PyUnicode_Check(pCode)) { PyObject * tmp = PyUnicode_AsUTF8String(pCode); Py_DECREF(pCode); pCode = tmp; } if (!PyBytes_Check(pCode)) { GYOTO_DEBUG << "not a PyBytes string\n"; Py_DECREF(pCode); return NULL; } new_source_code = PyBytes_AsString(pCode); GYOTO_DEBUG << "compiling inline code...\n"; PyObject * object_code=Py_CompileString(new_source_code, "", Py_file_input); Py_DECREF(pCode); if (PyErr_Occurred() || !object_code) { GYOTO_DEBUG << "failed compiling inline code!\n"; Py_XDECREF(object_code); return NULL; } GYOTO_DEBUG << "importing object code as module...\n"; PyObject * mod = PyImport_ExecCodeModule("gyoto_inline", object_code); Py_XDECREF(object_code); if (PyErr_Occurred() || !mod) { GYOTO_DEBUG << "failed importing object code as module!\n"; Py_XDECREF(mod); return NULL; } return mod; } // Birth and death Base::Base() : module_(""), inline_module_(""), class_(""), parameters_(), pModule_(NULL), pInstance_(NULL) {} Base::Base(const Base& o) : module_(o.module_), inline_module_(o.inline_module_), class_(o.class_), parameters_(o.parameters_), pModule_(o.pModule_), pInstance_(o.pInstance_) { Py_XINCREF(pModule_); Py_XINCREF(pInstance_); } Base::~Base() { Py_XDECREF(pInstance_); Py_XDECREF(pModule_); } /* Accessors */ std::string Base::module() const { return module_; } void Base::module(const std::string &m) { GYOTO_DEBUG << "Loading Python module " << m << endl; PyGILState_STATE gstate; module_=m; if (m=="") return; inline_module_=""; gstate = PyGILState_Ensure(); PyObject *pName=PyUnicode_FromString(m.c_str()); if (!pName) { PyErr_Print(); PyGILState_Release(gstate); throwError("Failed translating string to Python"); } Py_XDECREF(pModule_); pModule_ = PyImport_Import(pName); Py_DECREF(pName); if (PyErr_Occurred() || !pModule_) { PyErr_Print(); PyGILState_Release(gstate); throwError("Failed loading Python module"); } PyGILState_Release(gstate); if (class_ != "") klass(class_); GYOTO_DEBUG << "Done loading Python module " << m << endl; } std::string Base::inlineModule() const { return inline_module_; } void Base::inlineModule(const std::string &m) { inline_module_=m; if (m=="") return; module_=""; GYOTO_DEBUG << "Loading inline Python module :" << m << endl; PyGILState_STATE gstate = PyGILState_Ensure(); Py_XDECREF(pModule_); pModule_ = Gyoto::Python::PyModule_NewFromPythonCode(m.c_str()); if (PyErr_Occurred() || !pModule_) { PyErr_Print(); PyGILState_Release(gstate); throwError("Failed loading inline Python module"); } PyGILState_Release(gstate); if (class_ != "") klass(class_); GYOTO_DEBUG << "Done loading Python module " << m << endl; } std::string Base::klass() const { return class_; } void Base::klass(const std::string &f) { class_=f; if (!pModule_) return; GYOTO_DEBUG << "Instantiating Python class " << f << endl; PyGILState_STATE gstate = PyGILState_Ensure(); Py_XDECREF(pInstance_); pInstance_=NULL; if (class_ == ""){ GYOTO_DEBUG << "class_ is empty: check whether there is a single class in module...\n"; PyObject * dict = PyModule_GetDict(pModule_); PyObject *key, *value, *tmp; Py_ssize_t pos = 0, nclass=0; while (PyDict_Next(dict, &pos, &key, &value)) { if ( #if PY_VERSION_HEX < 0x03000000 PyClass_Check(value) || #endif PyObject_TypeCheck(value, &PyType_Type)) { ++nclass; if (PyUnicode_Check(key)) { tmp = PyUnicode_AsUTF8String(key); } else { tmp = key; Py_INCREF(tmp); } if (!PyBytes_Check(tmp)) { Py_DECREF(tmp); PyGILState_Release(gstate); throwError("not a PyBytes string"); } class_= PyBytes_AsString(tmp); Py_DECREF(tmp); } } if (nclass>1) { GYOTO_DEBUG << "several classes in module" << endl; class_ = ""; } else if (nclass == 1) GYOTO_DEBUG << "single class in module: " << class_ << endl; else if (nclass == 0) { PyGILState_Release(gstate); throwError("no class in Python module\n"); } } PyObject * pClass = PyObject_GetAttrString(pModule_, class_.c_str()); if (PyErr_Occurred() || !pClass) { PyErr_Print(); Py_XDECREF(pClass); PyGILState_Release(gstate); throwError("Could not find class in module"); } if (!PyCallable_Check(pClass)) { Py_DECREF(pClass); PyGILState_Release(gstate); throwError("Class is not callable"); } pInstance_ = PyObject_CallObject(pClass, NULL); Py_DECREF(pClass); pClass=NULL; if (PyErr_Occurred() || !pInstance_) { PyErr_Print(); Py_XDECREF(pInstance_); pInstance_=NULL; PyGILState_Release(gstate); throwError("Failed instantiating Python class"); } PyGILState_Release(gstate); GYOTO_DEBUG << "Done instantiating Python class " << f << endl; } std::vector Base::parameters() const {return parameters_;} void Base::parameters(const std::vector &p){ parameters_=p; if (!pInstance_ || p.size()==0) return; PyGILState_STATE gstate = PyGILState_Ensure(); for (size_t i=0; i&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = lib DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/../../depcomp $(library_include_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d 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)$(soverdir)" \ "$(DESTDIR)$(library_includedir)" LTLIBRARIES = $(sover_LTLIBRARIES) libgyoto_@pluginname@_la_LIBADD = am_libgyoto_@pluginname@_la_OBJECTS = PythonPlug.lo Base.lo \ Spectrum.lo Metric.lo Standard.lo ThinDisk.lo libgyoto_@pluginname@_la_OBJECTS = \ $(am_libgyoto_@pluginname@_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/../../depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libgyoto_@pluginname@_la_SOURCES) DIST_SOURCES = $(libgyoto_@pluginname@_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(library_include_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYLIB_VAR = @DYLIB_VAR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GYOTO = @GYOTO@ GYOTO_EPREFIX = @GYOTO_EPREFIX@ GYOTO_PLUGIN_SFX = @GYOTO_PLUGIN_SFX@ GYOTO_PREFIX = @GYOTO_PREFIX@ Gyoto_CFLAGS = @Gyoto_CFLAGS@ Gyoto_LIBS = @Gyoto_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@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NUMPY_CFLAGS = @NUMPY_CFLAGS@ 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@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBS = @PYTHON_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SYS = @SYS@ VERSION = @VERSION@ Y_INST_HOME = @Y_INST_HOME@ Y_INST_SITE = @Y_INST_SITE@ 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__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ 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@ linkname = @linkname@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ mySUBDIRS = @mySUBDIRS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ plugin_sfx = @plugin_sfx@ pluginname = @pluginname@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ soverdir = @soverdir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -I@top_srcdir@/include -DGYOTO_NO_DEPRECATED \ $(PYTHON_INCLUDES) $(NUMPY_CFLAGS) -DGYOTO_PLUGIN=@pluginname@ AM_LDFLAGS = $(Gyoto_LDFLAGS) -module -export-dynamic \ $(PYTHON_LDFLAGS) $(PYTHON_LIBS) -avoid-version -shared AM_CXXFLAGS = $(Gyoto_CFLAGS) -DGYOTO_PREFIX=\"@prefix@\" \ $(PYTHON_CFLAGS) sover_LTLIBRARIES = libgyoto-@pluginname@.la libgyoto_@pluginname@_la_SOURCES = \ PythonPlug.C Base.C Spectrum.C Metric.C Standard.C ThinDisk.C # HEADERS: where they are, where to install them library_includedir = $(GYOTO_PREFIX)/include/Gyoto library_include_HEADERS = $(top_srcdir)/include/*.h all: all-am .SUFFIXES: .SUFFIXES: .C .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-soverLTLIBRARIES: $(sover_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(sover_LTLIBRARIES)'; test -n "$(soverdir)" || 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)$(soverdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(soverdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(soverdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(soverdir)"; \ } uninstall-soverLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(sover_LTLIBRARIES)'; test -n "$(soverdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(soverdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(soverdir)/$$f"; \ done clean-soverLTLIBRARIES: -test -z "$(sover_LTLIBRARIES)" || rm -f $(sover_LTLIBRARIES) @list='$(sover_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libgyoto-@pluginname@.la: $(libgyoto_@pluginname@_la_OBJECTS) $(libgyoto_@pluginname@_la_DEPENDENCIES) $(EXTRA_libgyoto_@pluginname@_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) -rpath $(soverdir) $(libgyoto_@pluginname@_la_OBJECTS) $(libgyoto_@pluginname@_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Base.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Metric.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PythonPlug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Spectrum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Standard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ThinDisk.Plo@am__quote@ .C.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .C.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .C.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(library_includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(library_includedir)" || 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)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(library_includedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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)$(soverdir)" "$(DESTDIR)$(library_includedir)"; 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." @DEFAULT_FALSE@install-data-hook: @DEFAULT_FALSE@uninstall-hook: clean: clean-am clean-am: clean-generic clean-libtool clean-soverLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -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-library_includeHEADERS \ install-soverLTLIBRARIES @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-library_includeHEADERS \ uninstall-soverLTLIBRARIES @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-data-am install-strip uninstall-am .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-soverLTLIBRARIES cscopelist-am ctags \ ctags-am 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-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-library_includeHEADERS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-soverLTLIBRARIES 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 tags-am uninstall uninstall-am uninstall-hook \ uninstall-library_includeHEADERS uninstall-soverLTLIBRARIES @DEFAULT_TRUE@install-data-hook: @DEFAULT_TRUE@ cd $(DESTDIR)$(soverdir) && \ @DEFAULT_TRUE@ rm -f libgyoto-$(linkname).$(GYOTO_PLUGIN_SFX) && \ @DEFAULT_TRUE@ $(LN_S) libgyoto-$(pluginname).$(GYOTO_PLUGIN_SFX) \ @DEFAULT_TRUE@ libgyoto-$(linkname).$(GYOTO_PLUGIN_SFX) @DEFAULT_TRUE@uninstall-hook: @DEFAULT_TRUE@ rm -f $(DESTDIR)$(soverdir)/libgyoto-python.$(GYOTO_PLUGIN_SFX) # 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: Gyoto-1.2.0/plugins/python/lib/Metric.C000066400000000000000000000141361302352257300177210ustar00rootroot00000000000000#include "GyotoPython.h" #include "GyotoProperty.h" #include "GyotoError.h" #include #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #define NO_IMPORT_ARRAY #define PY_ARRAY_UNIQUE_SYMBOL GyotoPython_ARRAY_API #include using namespace Gyoto; using namespace Gyoto::Metric; using namespace std; GYOTO_PROPERTY_START(Gyoto::Metric::Python, "Python-based Metric class") GYOTO_PROPERTY_STRING(Gyoto::Metric::Python, Module, module, "Python module containing the Metric implementation.") GYOTO_PROPERTY_STRING(Gyoto::Metric::Python, InlineModule, inlineModule, "Inline code of Python module containing the Spectrum implementation.") GYOTO_PROPERTY_STRING(Gyoto::Metric::Python, Class, klass, "Python class (in Module) implementing the Metric.") GYOTO_PROPERTY_VECTOR_DOUBLE(Gyoto::Metric::Python, Parameters, parameters, "Parameters for the class instance.") GYOTO_PROPERTY_BOOL(Metric::Python, Spherical, Cartesian, spherical, "Whether the coordinate system is Spherical or (default) Cartesian.") GYOTO_PROPERTY_END(Metric::Python, Generic::properties) GYOTO_PROPERTY_THREAD_UNSAFE(Metric::Python) // Birth and death Gyoto::Metric::Python::Python() : Generic(GYOTO_COORDKIND_CARTESIAN, "Python"), Base(), pGmunu_(NULL), pChristoffel_(NULL) {} Gyoto::Metric::Python::Python(const Python& o) : Generic(o), Base(o), pGmunu_(o.pGmunu_), pChristoffel_(o.pChristoffel_) { Py_XINCREF(pGmunu_); Py_XINCREF(pChristoffel_); } Gyoto::Metric::Python::~Python() { Py_XDECREF(pChristoffel_); Py_XDECREF(pGmunu_); } Metric::Python* Gyoto::Metric::Python::clone() const {return new Python(*this);} // Property accessors void Gyoto::Metric::Python::spherical(bool t) { coordKind(t?GYOTO_COORDKIND_SPHERICAL:GYOTO_COORDKIND_CARTESIAN); if (!pInstance_) return; GYOTO_DEBUG << "Set \"spherical\"\n"; PyGILState_STATE gstate = PyGILState_Ensure(); int res = PyObject_SetAttrString(pInstance_, "spherical", t?Py_True:Py_False); if (PyErr_Occurred() || res == -1) { PyErr_Print(); PyGILState_Release(gstate); throwError("Failed setting \"spherical\" using __setattr__"); } PyGILState_Release(gstate); GYOTO_DEBUG << "done.\n"; } bool Gyoto::Metric::Python::spherical() const { if (coordKind() == GYOTO_COORDKIND_UNSPECIFIED) throwError("coordKind unspecified"); return coordKind() == GYOTO_COORDKIND_SPHERICAL; } void Gyoto::Metric::Python::mass(double m) { Generic::mass(m); if (!pInstance_) return; GYOTO_DEBUG << "Setting \"mass\"\n"; PyGILState_STATE gstate = PyGILState_Ensure(); PyObject * pM = PyFloat_FromDouble(mass()); int res = PyObject_SetAttrString(pInstance_, "mass", pM); Py_DECREF(pM); if (PyErr_Occurred() || res == -1) { PyErr_Print(); PyGILState_Release(gstate); throwError("Failed setting \"mass\" using __setattr__"); } PyGILState_Release(gstate); GYOTO_DEBUG << "done.\n"; } std::vector Metric::Python::parameters() const {return Python::Base::parameters();} void Metric::Python::parameters(const std::vector& m) {Python::Base::parameters(m);} std::string Metric::Python::module() const {return Python::Base::module();} void Metric::Python::module(const std::string& m){Python::Base::module(m);} std::string Metric::Python::inlineModule() const {return Python::Base::inlineModule();} void Metric::Python::inlineModule(const std::string& m){Python::Base::inlineModule(m);} std::string Metric::Python::klass() const {return Python::Base::klass();} void Gyoto::Metric::Python::klass(const std::string &f) { PyGILState_STATE gstate = PyGILState_Ensure(); Py_XDECREF(pChristoffel_); pChristoffel_=NULL; Py_XDECREF(pGmunu_); pGmunu_=NULL; PyGILState_Release(gstate); Python::Base::klass(f); if (!pModule_) return; gstate = PyGILState_Ensure(); GYOTO_DEBUG << "Checking Python class methods" << f << endl; pGmunu_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "gmunu"); pChristoffel_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "christoffel"); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error while retrieving methods"); } if (!pGmunu_) { PyGILState_Release(gstate); throwError("Object does not implement required method \"__call__\""); } if (!pChristoffel_) { PyGILState_Release(gstate); throwError("Object does not implement required method \"getVelocity\""); } Gyoto::Python::PyInstance_SetThis(pInstance_, Gyoto::Python::pGyotoMetric(), this); PyGILState_Release(gstate); if (parameters_.size()) parameters(parameters_); if (coordKind()) spherical(spherical()); mass(mass()); GYOTO_DEBUG << "Done checking Python class methods" << f << endl; } void Metric::Python::gmunu(double g[4][4], const double * x) const { if (!pGmunu_) throwError("gmunu method not loaded yet"); PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp g_dims[] = {4, 4}; PyObject * pG = PyArray_SimpleNewFromData(2, g_dims, NPY_DOUBLE, g); PyObject * pX = PyArray_SimpleNewFromData(1, g_dims, NPY_DOUBLE, const_cast(x)); PyObject * pR = PyObject_CallFunctionObjArgs(pGmunu_, pG, pX, NULL); Py_XDECREF(pR); Py_XDECREF(pX); Py_XDECREF(pG); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in Metric::Python::gmunu"); } PyGILState_Release(gstate); } int Metric::Python::christoffel(double dst[4][4][4], const double * x) const { if (!pChristoffel_) throwError("christoffel method not loaded yet"); PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp d_dims[] = {4, 4, 4}; PyObject * pD = PyArray_SimpleNewFromData(3, d_dims, NPY_DOUBLE, dst); PyObject * pX = PyArray_SimpleNewFromData(1, d_dims, NPY_DOUBLE, const_cast(x)); PyObject * pR = PyObject_CallFunctionObjArgs(pChristoffel_, pD, pX, NULL); double r = PyFloat_AsDouble(pR); Py_XDECREF(pR); Py_XDECREF(pX); Py_XDECREF(pD); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in Metric::Python::gmunu"); } PyGILState_Release(gstate); return r; } Gyoto-1.2.0/plugins/python/lib/PythonPlug.C000066400000000000000000000042421302352257300206040ustar00rootroot00000000000000/* Copyright 2015 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoPython.h" #include #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #define PY_ARRAY_UNIQUE_SYMBOL GyotoPython_ARRAY_API #include using namespace Gyoto; static PyThreadState* mainPyThread=NULL; namespace Gyoto { // import_array is actually a MACRO which returns a value. // We want to eat this return. bool eat_import_array() { import_array1(false); return true;} } extern "C" void __GyotoPluginInit() { Spectrum::Register("Python", &(Spectrum::Subcontractor)); Metric::Register("Python", &(Metric::Subcontractor)); Astrobj::Register("Python::Standard", &(Astrobj::Subcontractor)); Astrobj::Register("Python::ThinDisk", &(Astrobj::Subcontractor)); Py_InitializeEx(0); PyObject *pSys = PyImport_ImportModule("sys"); PyObject *pPath = PyObject_GetAttrString(pSys, "path"); PyObject *pDir = PyUnicode_FromString("."); Py_XDECREF(pSys); PyList_Reverse(pPath); PyList_Append(pPath, pDir); Py_XDECREF(pDir); PyList_Reverse(pPath); Py_XDECREF(pPath); Py_XDECREF(PyImport_ImportModule("numpy")); if (PyErr_Occurred()) { PyErr_Print(); throwError("Failed imorting numpy"); } Gyoto::eat_import_array(); if (!PyEval_ThreadsInitialized()) { PyEval_InitThreads(); mainPyThread = PyEval_SaveThread(); } if (PyErr_Occurred()) { PyErr_Print(); throwError("Failed"); } } Gyoto-1.2.0/plugins/python/lib/Spectrum.C000066400000000000000000000141141302352257300202740ustar00rootroot00000000000000#include "GyotoPython.h" #include "GyotoProperty.h" #include "GyotoError.h" #include "Python.h" using namespace Gyoto; using namespace Gyoto::Spectrum; using namespace std; GYOTO_PROPERTY_START(Gyoto::Spectrum::Python, "Python-based Spectrum class") GYOTO_PROPERTY_STRING(Gyoto::Spectrum::Python, Module, module, "Name of Python module containing the Spectrum implementation.") GYOTO_PROPERTY_STRING(Gyoto::Spectrum::Python, InlineModule, inlineModule, "Inline code of Python module containing the Spectrum implementation.") GYOTO_PROPERTY_STRING(Gyoto::Spectrum::Python, Class, klass, "Python class (in Module) implementing the Spectrum.") GYOTO_PROPERTY_VECTOR_DOUBLE(Gyoto::Spectrum::Python, Parameters, parameters, "Parameters for the class instance.") GYOTO_PROPERTY_END(Gyoto::Spectrum::Python, Gyoto::Spectrum::Generic::properties) GYOTO_PROPERTY_THREAD_UNSAFE(Gyoto::Spectrum::Python) Spectrum::Python::Python() : Generic("Python"), Base(), pCall_(NULL), pIntegrate_(NULL), pCall_overloaded_(false) {} Spectrum::Python::Python(const Python&o) : Generic(o), Base(o), pCall_(o.pCall_), pIntegrate_(o.pIntegrate_), pCall_overloaded_(o.pCall_overloaded_) { PyGILState_STATE gstate = PyGILState_Ensure(); Py_XINCREF(pCall_); Py_XINCREF(pIntegrate_); PyGILState_Release(gstate); } Spectrum::Python::~Python(){ PyGILState_STATE gstate = PyGILState_Ensure(); Py_XDECREF(pIntegrate_); Py_XDECREF(pCall_); PyGILState_Release(gstate); } Spectrum::Python* Spectrum::Python::clone() const {return new Python(*this);} /* Gyoto::Python::Base API: reimplement ::klass method */ std::vector Spectrum::Python::parameters() const {return Python::Base::parameters();} void Spectrum::Python::parameters(const std::vector& m) {Python::Base::parameters(m);} std::string Spectrum::Python::module() const {return Python::Base::module();} void Spectrum::Python::module(const std::string& m){Python::Base::module(m);} std::string Spectrum::Python::inlineModule() const {return Python::Base::inlineModule();} void Spectrum::Python::inlineModule(const std::string& m){Python::Base::inlineModule(m);} std::string Spectrum::Python::klass() const {return Python::Base::klass();} void Spectrum::Python::klass(const std::string &f) { PyGILState_STATE gstate = PyGILState_Ensure(); Py_XDECREF(pIntegrate_); pIntegrate_=NULL; Py_XDECREF(pCall_); pCall_=NULL; PyGILState_Release(gstate); Python::Base::klass(f); if (!pModule_) return; gstate = PyGILState_Ensure(); GYOTO_DEBUG << "Checking Python class methods" << f << endl; pCall_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "__call__"); pIntegrate_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "integrate"); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error while retrieving methods"); } if (!pCall_) { PyGILState_Release(gstate); throwError("Object does not implement required method \"__call__\""); } pCall_overloaded_ = Gyoto::Python::PyCallable_HasVarArg(pCall_); Gyoto::Python::PyInstance_SetThis(pInstance_, Gyoto::Python::pGyotoSpectrum(), this); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error while setting this"); } PyGILState_Release(gstate); if (parameters_.size()) parameters(parameters_); GYOTO_DEBUG << "Done checking Python class methods" << f << endl; } /* Gyoto::Spectrum::Generic API */ double Spectrum::Python::operator()(double nu) const { if (!pCall_) throwError("Python class not loaded yet"); PyGILState_STATE gstate; gstate = PyGILState_Ensure(); PyObject * pArgs = Py_BuildValue("(d)", nu); if (PyErr_Occurred() || !pArgs) { PyErr_Print(); Py_XDECREF(pArgs); PyGILState_Release(gstate); throwError("Failed building argument list"); } PyObject * pValue = PyObject_CallObject(pCall_, pArgs); Py_DECREF(pArgs); if (PyErr_Occurred() || !pValue) { PyErr_Print(); Py_XDECREF(pValue); PyGILState_Release(gstate); throwError("Failed calling Python method __call__"); } double res = PyFloat_AsDouble(pValue); Py_DECREF(pValue); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error interpreting result as double"); } PyGILState_Release(gstate); return res; } double Spectrum::Python::operator()(double nu, double opacity, double ds) const { if (!pCall_overloaded_) return Generic::operator()(nu, opacity, ds); PyGILState_STATE gstate; gstate = PyGILState_Ensure(); PyObject * pArgs = Py_BuildValue("(ddd)", nu, opacity, ds); if (PyErr_Occurred() || !pArgs) { PyErr_Print(); Py_XDECREF(pArgs); PyGILState_Release(gstate); throwError("Failed building argument list"); } PyObject * pValue = PyObject_CallObject(pCall_, pArgs); Py_DECREF(pArgs); if (PyErr_Occurred() || !pValue) { PyErr_Print(); Py_XDECREF(pValue); PyGILState_Release(gstate); throwError("Failed calling Python method __call__"); } double res = PyFloat_AsDouble(pValue); Py_DECREF(pValue); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error interpreting result as double"); } PyGILState_Release(gstate); return res; } double Spectrum::Python::integrate(double nu1, double nu2) { if (!pIntegrate_) return Generic::integrate(nu1, nu2); PyGILState_STATE gstate = PyGILState_Ensure(); PyObject * pArgs = Py_BuildValue("dd", nu1, nu2); if (PyErr_Occurred() || !pArgs) { PyErr_Print(); Py_XDECREF(pArgs); PyGILState_Release(gstate); throwError("Failed building argument list"); } PyObject * pValue = PyObject_CallObject(pIntegrate_, pArgs); Py_DECREF(pArgs); if (PyErr_Occurred() || !pValue) { PyErr_Print(); Py_XDECREF(pValue); PyGILState_Release(gstate); throwError("Failed calling Python method integrate"); } double res = PyFloat_AsDouble(pValue); Py_DECREF(pValue); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error interpreting result as double"); } PyGILState_Release(gstate); return res; } Gyoto-1.2.0/plugins/python/lib/Standard.C000066400000000000000000000307341302352257300202400ustar00rootroot00000000000000#include "GyotoPython.h" #include "GyotoProperty.h" #include "GyotoError.h" #include #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #define NO_IMPORT_ARRAY #define PY_ARRAY_UNIQUE_SYMBOL GyotoPython_ARRAY_API #include using namespace Gyoto; using namespace std; GYOTO_PROPERTY_START(Gyoto::Astrobj::Python::Standard, "Python-based Astrobj class") GYOTO_PROPERTY_STRING(Gyoto::Astrobj::Python::Standard, Module, module, "Python module containing the Astrobj implementation.") GYOTO_PROPERTY_STRING(Gyoto::Astrobj::Python::Standard, InlineModule, inlineModule, "Inline code of Python module containing the Spectrum implementation.") GYOTO_PROPERTY_STRING(Gyoto::Astrobj::Python::Standard, Class, klass, "Python class (in Module) implementing the Astrobj.") GYOTO_PROPERTY_VECTOR_DOUBLE(Gyoto::Astrobj::Python::Standard, Parameters, parameters, "Parameters for the class instance.") GYOTO_PROPERTY_DOUBLE(Gyoto::Astrobj::Python::Standard, CriticalValue, criticalValue, "The object is defined by __call__ < this value") GYOTO_PROPERTY_END(Astrobj::Python::Standard, Generic::properties) GYOTO_PROPERTY_THREAD_UNSAFE(Astrobj::Python::Standard) // Birth and death Gyoto::Astrobj::Python::Standard::Standard() : Astrobj::Standard("Python::Standard"), pEmission_(NULL), pIntegrateEmission_(NULL), pTransmission_(NULL), pCall_(NULL), pGetVelocity_(NULL), pGiveDelta_(NULL), pEmission_overloaded_(false), pIntegrateEmission_overloaded_(false) {} Gyoto::Astrobj::Python::Standard::Standard(const Standard& o) : Astrobj::Standard(o), pEmission_(o.pEmission_), pIntegrateEmission_(o.pIntegrateEmission_), pTransmission_(o.pTransmission_), pCall_(o.pCall_), pGetVelocity_(o.pGetVelocity_), pGiveDelta_(o.pGiveDelta_), pEmission_overloaded_(o.pEmission_overloaded_), pIntegrateEmission_overloaded_(o.pIntegrateEmission_overloaded_) { Py_XINCREF(pEmission_); Py_XINCREF(pIntegrateEmission_); Py_XINCREF(pTransmission_); Py_XINCREF(pCall_); Py_XINCREF(pGetVelocity_); Py_XINCREF(pGiveDelta_); } Gyoto::Astrobj::Python::Standard::~Standard() { Py_XDECREF(pEmission_); Py_XDECREF(pIntegrateEmission_); Py_XDECREF(pTransmission_); Py_XDECREF(pCall_); Py_XDECREF(pGetVelocity_); Py_XDECREF(pGiveDelta_); } Astrobj::Python::Standard* Gyoto::Astrobj::Python::Standard::clone() const {return new Standard(*this);} double Astrobj::Python::Standard::criticalValue() const {return critical_value_;} void Astrobj::Python::Standard::criticalValue(double v) {critical_value_=v;} std::vector Astrobj::Python::Standard::parameters() const {return Gyoto::Python::Base::parameters();} void Astrobj::Python::Standard::parameters(const std::vector& m) {Gyoto::Python::Base::parameters(m);} std::string Astrobj::Python::Standard::module() const {return Gyoto::Python::Base::module();} std::string Astrobj::Python::Standard::inlineModule() const {return Gyoto::Python::Base::inlineModule();} void Astrobj::Python::Standard::inlineModule(const std::string& m) {Gyoto::Python::Base::inlineModule(m);} void Astrobj::Python::Standard::module(const std::string& m) {Gyoto::Python::Base::module(m);} std::string Astrobj::Python::Standard::klass() const {return Gyoto::Python::Base::klass();} void Gyoto::Astrobj::Python::Standard::klass(const std::string &f) { PyGILState_STATE gstate = PyGILState_Ensure(); Py_XDECREF(pEmission_); Py_XDECREF(pIntegrateEmission_); Py_XDECREF(pTransmission_); Py_XDECREF(pCall_); Py_XDECREF(pGetVelocity_); Py_XDECREF(pGiveDelta_); PyGILState_Release(gstate); pEmission_overloaded_ = false; pIntegrateEmission_overloaded_ = false; Gyoto::Python::Base::klass(f); if (!pModule_) return; gstate = PyGILState_Ensure(); GYOTO_DEBUG << "Checking Python class methods" << f << endl; pEmission_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "emission"); pIntegrateEmission_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "integrateEmission"); pTransmission_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "transmission"); pCall_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "__call__"); pGetVelocity_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "getVelocity"); pGiveDelta_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "giveDelta"); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error while retrieving methods"); } if (!pCall_) { PyGILState_Release(gstate); throwError("Object does not implement required method \"__call__\""); } if (!pGetVelocity_) { PyGILState_Release(gstate); throwError("Object does not implement required method \"getVelocity\""); } pEmission_overloaded_ = pEmission_ && Gyoto::Python::PyCallable_HasVarArg(pEmission_); pIntegrateEmission_overloaded_ = pIntegrateEmission_ && Gyoto::Python::PyCallable_HasVarArg(pIntegrateEmission_); Gyoto::Python::PyInstance_SetThis(pInstance_, Gyoto::Python::pGyotoStandardAstrobj(), this); PyGILState_Release(gstate); if (parameters_.size()) parameters(parameters_); GYOTO_DEBUG << "Done checking Python class methods" << f << endl; } double Gyoto::Astrobj::Python::Standard::operator()(double const coord[4]) { if (!pCall_) throwError("__call__ not loaded yet"); PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp dims[] = {4}; PyObject * pCoord = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, const_cast(coord)); PyObject * pR = PyObject_CallFunctionObjArgs(pCall_, pCoord, NULL); double res = PyFloat_AsDouble(pR); Py_XDECREF(pR); Py_XDECREF(pCoord); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in Standard::operator()()"); } PyGILState_Release(gstate); return res; } void Gyoto::Astrobj::Python::Standard::getVelocity (double const coord[4], double vel[4]) { PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp dims[] = {4}; PyObject * pCoord = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, const_cast(coord)); PyObject * pVel = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, vel); PyObject * pR = PyObject_CallFunctionObjArgs(pGetVelocity_, pCoord, pVel, NULL); Py_XDECREF(pR); Py_XDECREF(pCoord); Py_XDECREF(pVel); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in Standard::getVelocity()"); } PyGILState_Release(gstate); } double Gyoto::Astrobj::Python::Standard::giveDelta(double coord[8]) { if (!pGiveDelta_) return Astrobj::Standard::giveDelta(coord); PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp dims[] = {8}; PyObject * pCoord = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, coord); PyObject * pR = PyObject_CallFunctionObjArgs(pGiveDelta_, pCoord, NULL); double res = PyFloat_AsDouble(pR); Py_XDECREF(pR); Py_XDECREF(pCoord); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in Standard::giveDelta()"); } PyGILState_Release(gstate); return res; } double Gyoto::Astrobj::Python::Standard::emission (double nu_em, double dsem, double coord_ph[8], double coord_obj[8]) const { if (!pEmission_) return Astrobj::Standard::emission(nu_em, dsem, coord_ph, coord_obj); PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp dims[] = {8}; PyObject * pNu = PyFloat_FromDouble(nu_em); PyObject * pDs = PyFloat_FromDouble(dsem); PyObject * pCp = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, coord_ph); PyObject * pCo = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE,coord_obj); PyObject * pR = PyObject_CallFunctionObjArgs(pEmission_, pNu, pDs, pCp, pCo, NULL); double res = PyFloat_AsDouble(pR); Py_XDECREF(pR); Py_XDECREF(pCo); Py_XDECREF(pCp); Py_XDECREF(pDs); Py_XDECREF(pNu); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in Standard::emission()"); } PyGILState_Release(gstate); return res; } void Gyoto::Astrobj::Python::Standard::emission (double Inu[], double nu_em[], size_t nbnu, double dsem, double coord_ph[8], double coord_obj[8]) const { if (!pEmission_ || !pEmission_overloaded_) { Astrobj::Standard::emission(Inu, nu_em, nbnu, dsem, coord_ph, coord_obj); return; } PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp I_dims[] = {static_cast(nbnu)}; npy_intp dims[] = {8}; PyObject * pIn = PyArray_SimpleNewFromData(1, I_dims, NPY_DOUBLE, Inu); PyObject * pNu = PyArray_SimpleNewFromData(1, I_dims, NPY_DOUBLE, nu_em); PyObject * pDs = PyFloat_FromDouble(dsem); PyObject * pCp = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, coord_ph); PyObject * pCo = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE,coord_obj); PyObject * pR = PyObject_CallFunctionObjArgs(pEmission_, pIn, pNu, pDs, pCp, pCo, NULL); Py_XDECREF(pR); Py_XDECREF(pCo); Py_XDECREF(pCp); Py_XDECREF(pDs); Py_XDECREF(pNu); Py_XDECREF(pIn); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in Standard::emission()"); } PyGILState_Release(gstate); } double Gyoto::Astrobj::Python::Standard::integrateEmission (double nu1, double nu2, double dsem, double c_ph[8], double c_obj[8]) const { if (!pIntegrateEmission_) return Astrobj::Standard::integrateEmission(nu1, nu2, dsem, c_ph,c_obj); PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp dims[] = {8}; PyObject * pN1 = PyFloat_FromDouble(nu1); PyObject * pN2 = PyFloat_FromDouble(nu2); PyObject * pDs = PyFloat_FromDouble(dsem); PyObject * pCp = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, c_ph); PyObject * pCo = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, c_obj); PyObject * pR = PyObject_CallFunctionObjArgs(pIntegrateEmission_, pN1, pN2, pDs, pCp, pCo, NULL); double res = PyFloat_AsDouble(pR); Py_XDECREF(pR); Py_XDECREF(pCo); Py_XDECREF(pCp); Py_XDECREF(pDs); Py_XDECREF(pN2); Py_XDECREF(pN1); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in Standard::integrateEmission()"); } PyGILState_Release(gstate); return res; } void Gyoto::Astrobj::Python::Standard::integrateEmission (double * I, double const * boundaries, size_t const * chaninds, size_t nbnu, double dsem, double *cph, double *co) const{ if (!pIntegrateEmission_ || !pIntegrateEmission_overloaded_) { Gyoto::Astrobj::Standard::integrateEmission(I, boundaries, chaninds, nbnu, dsem, cph, co); return; } PyGILState_STATE gstate = PyGILState_Ensure(); size_t nbo=0; for (size_t i=0; i<2*nbnu; ++i) if (nbo < chaninds[i]) nbo=chaninds[i]; npy_intp nNu = nbnu, nBo = nbo, nCh = 2*nbnu, nCo = 8; PyObject * pI = PyArray_SimpleNewFromData(1, &nNu, NPY_DOUBLE, I); PyObject * pBo = PyArray_SimpleNewFromData(1, &nBo, NPY_DOUBLE, const_cast(boundaries)); PyObject * pCh = PyArray_SimpleNewFromData(1, &nCh, NPY_UINTP, const_cast(chaninds)); PyObject * pDs = PyFloat_FromDouble(dsem); PyObject * pCp = PyArray_SimpleNewFromData(1, &nCo, NPY_DOUBLE, cph); PyObject * pCo = PyArray_SimpleNewFromData(1, &nCo, NPY_DOUBLE, co); PyObject * pR = PyObject_CallFunctionObjArgs(pIntegrateEmission_, pI, pBo, pCh, pDs, pCp, pCo, NULL); Py_XDECREF(pR); Py_XDECREF(pCo); Py_XDECREF(pCp); Py_XDECREF(pDs); Py_XDECREF(pCh); Py_XDECREF(pBo); Py_XDECREF(pI); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in Standard::integrateEmission()"); } PyGILState_Release(gstate); } double Gyoto::Astrobj::Python::Standard::transmission (double nuem, double dsem, double coord[8]) const { if (!pTransmission_) return Astrobj::Standard::transmission(nuem, dsem, coord); PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp dims[] = {8}; PyObject * pNu = PyFloat_FromDouble(nuem); PyObject * pDs = PyFloat_FromDouble(dsem); PyObject * pCp = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, coord); PyObject * pR = PyObject_CallFunctionObjArgs(pTransmission_, pNu, pDs, pCp, NULL); double res = PyFloat_AsDouble(pR); Py_XDECREF(pR); Py_XDECREF(pCp); Py_XDECREF(pDs); Py_XDECREF(pNu); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in Standard::emission()"); } PyGILState_Release(gstate); return res; } Gyoto-1.2.0/plugins/python/lib/ThinDisk.C000066400000000000000000000261551302352257300202170ustar00rootroot00000000000000#include "GyotoPython.h" #include "GyotoProperty.h" #include "GyotoError.h" #include #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #define NO_IMPORT_ARRAY #define PY_ARRAY_UNIQUE_SYMBOL GyotoPython_ARRAY_API #include using namespace Gyoto; using namespace std; GYOTO_PROPERTY_START(Gyoto::Astrobj::Python::ThinDisk, "Python-based Astrobj class") GYOTO_PROPERTY_STRING(Gyoto::Astrobj::Python::ThinDisk, Module, module, "Python module containing the Astrobj implementation.") GYOTO_PROPERTY_STRING(Gyoto::Astrobj::Python::ThinDisk, InlineModule, inlineModule, "Inline code of Python module containing the Spectrum implementation.") GYOTO_PROPERTY_STRING(Gyoto::Astrobj::Python::ThinDisk, Class, klass, "Python class (in Module) implementing the Astrobj.") GYOTO_PROPERTY_VECTOR_DOUBLE(Gyoto::Astrobj::Python::ThinDisk, Parameters, parameters, "Parameters for the class instance.") GYOTO_PROPERTY_END(Astrobj::Python::ThinDisk, Astrobj::ThinDisk::properties) GYOTO_PROPERTY_THREAD_UNSAFE(Astrobj::Python::ThinDisk) // Birth and death Gyoto::Astrobj::Python::ThinDisk::ThinDisk() : Astrobj::ThinDisk("Python::ThinDisk"), pEmission_(NULL), pIntegrateEmission_(NULL), pTransmission_(NULL), pCall_(NULL), pGetVelocity_(NULL), pEmission_overloaded_(false), pIntegrateEmission_overloaded_(false) {} Gyoto::Astrobj::Python::ThinDisk::ThinDisk(const ThinDisk& o) : Astrobj::ThinDisk(o), pEmission_(o.pEmission_), pIntegrateEmission_(o.pIntegrateEmission_), pTransmission_(o.pTransmission_), pCall_(o.pCall_), pGetVelocity_(o.pGetVelocity_), pEmission_overloaded_(o.pEmission_overloaded_), pIntegrateEmission_overloaded_(o.pIntegrateEmission_overloaded_) { Py_XINCREF(pEmission_); Py_XINCREF(pIntegrateEmission_); Py_XINCREF(pTransmission_); Py_XINCREF(pCall_); Py_XINCREF(pGetVelocity_); } Gyoto::Astrobj::Python::ThinDisk::~ThinDisk() { Py_XDECREF(pEmission_); Py_XDECREF(pIntegrateEmission_); Py_XDECREF(pTransmission_); Py_XDECREF(pCall_); Py_XDECREF(pGetVelocity_); } Astrobj::Python::ThinDisk* Gyoto::Astrobj::Python::ThinDisk::clone() const {return new ThinDisk(*this);} std::vector Astrobj::Python::ThinDisk::parameters() const {return Gyoto::Python::Base::parameters();} void Astrobj::Python::ThinDisk::parameters(const std::vector& m) {Gyoto::Python::Base::parameters(m);} std::string Astrobj::Python::ThinDisk::module() const {return Gyoto::Python::Base::module();} void Astrobj::Python::ThinDisk::module(const std::string& m) {Gyoto::Python::Base::module(m);} std::string Astrobj::Python::ThinDisk::inlineModule() const {return Gyoto::Python::Base::inlineModule();} void Astrobj::Python::ThinDisk::inlineModule(const std::string& m) {Gyoto::Python::Base::inlineModule(m);} std::string Astrobj::Python::ThinDisk::klass() const {return Gyoto::Python::Base::klass();} void Gyoto::Astrobj::Python::ThinDisk::klass(const std::string &f) { PyGILState_STATE gstate = PyGILState_Ensure(); Py_XDECREF(pEmission_); Py_XDECREF(pIntegrateEmission_); Py_XDECREF(pTransmission_); Py_XDECREF(pCall_); Py_XDECREF(pGetVelocity_); PyGILState_Release(gstate); pEmission_overloaded_ = false; pIntegrateEmission_overloaded_ = false; Gyoto::Python::Base::klass(f); if (!pModule_) return; gstate = PyGILState_Ensure(); GYOTO_DEBUG << "Checking Python class methods" << f << endl; pEmission_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "emission"); pIntegrateEmission_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "integrateEmission"); pTransmission_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "transmission"); pCall_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "__call__"); pGetVelocity_ = Gyoto::Python::PyInstance_GetMethod(pInstance_, "getVelocity"); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error while retrieving methods"); } pEmission_overloaded_ = pEmission_ && Gyoto::Python::PyCallable_HasVarArg(pEmission_); pIntegrateEmission_overloaded_ = pIntegrateEmission_ && Gyoto::Python::PyCallable_HasVarArg(pIntegrateEmission_); Gyoto::Python::PyInstance_SetThis(pInstance_, Gyoto::Python::pGyotoThinDisk(), this); PyGILState_Release(gstate); if (parameters_.size()) parameters(parameters_); GYOTO_DEBUG << "Done checking Python class methods" << f << endl; } double Gyoto::Astrobj::Python::ThinDisk::operator()(double const coord[4]) { if (!pCall_) return Gyoto::Astrobj::ThinDisk::operator()(coord); PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp dims[] = {4}; PyObject * pCoord = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, const_cast(coord)); PyObject * pR = PyObject_CallFunctionObjArgs(pCall_, pCoord, NULL); double res = PyFloat_AsDouble(pR); Py_XDECREF(pR); Py_XDECREF(pCoord); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in ThinDisk::operator()()"); } PyGILState_Release(gstate); return res; } void Gyoto::Astrobj::Python::ThinDisk::getVelocity (double const coord[4], double vel[4]) { if (!pGetVelocity_) return Gyoto::Astrobj::ThinDisk::getVelocity(coord, vel); PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp dims[] = {4}; PyObject * pCoord = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, const_cast(coord)); PyObject * pVel = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, vel); PyObject * pR = PyObject_CallFunctionObjArgs(pGetVelocity_, pCoord, pVel, NULL); Py_XDECREF(pR); Py_XDECREF(pCoord); Py_XDECREF(pVel); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in ThinDisk::getVelocity()"); } PyGILState_Release(gstate); } double Gyoto::Astrobj::Python::ThinDisk::emission (double nu_em, double dsem, double coord_ph[8], double coord_obj[8]) const { if (!pEmission_) return Astrobj::ThinDisk::emission(nu_em, dsem, coord_ph, coord_obj); PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp dims[] = {8}; PyObject * pNu = PyFloat_FromDouble(nu_em); PyObject * pDs = PyFloat_FromDouble(dsem); PyObject * pCp = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, coord_ph); PyObject * pCo = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE,coord_obj); PyObject * pR = PyObject_CallFunctionObjArgs(pEmission_, pNu, pDs, pCp, pCo, NULL); double res = PyFloat_AsDouble(pR); Py_XDECREF(pR); Py_XDECREF(pCo); Py_XDECREF(pCp); Py_XDECREF(pDs); Py_XDECREF(pNu); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in ThinDisk::emission()"); } PyGILState_Release(gstate); return res; } void Gyoto::Astrobj::Python::ThinDisk::emission (double Inu[], double nu_em[], size_t nbnu, double dsem, double coord_ph[8], double coord_obj[8]) const { if (!pEmission_ || !pEmission_overloaded_) { Astrobj::ThinDisk::emission(Inu, nu_em, nbnu, dsem, coord_ph, coord_obj); return; } PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp I_dims[] = {static_cast(nbnu)}; npy_intp dims[] = {8}; PyObject * pIn = PyArray_SimpleNewFromData(1, I_dims, NPY_DOUBLE, Inu); PyObject * pNu = PyArray_SimpleNewFromData(1, I_dims, NPY_DOUBLE, nu_em); PyObject * pDs = PyFloat_FromDouble(dsem); PyObject * pCp = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, coord_ph); PyObject * pCo = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE,coord_obj); PyObject * pR = PyObject_CallFunctionObjArgs(pEmission_, pIn, pNu, pDs, pCp, pCo, NULL); Py_XDECREF(pR); Py_XDECREF(pCo); Py_XDECREF(pCp); Py_XDECREF(pDs); Py_XDECREF(pNu); Py_XDECREF(pIn); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in ThinDisk::emission()"); } PyGILState_Release(gstate); } double Gyoto::Astrobj::Python::ThinDisk::integrateEmission (double nu1, double nu2, double dsem, double c_ph[8], double c_obj[8]) const { if (!pIntegrateEmission_) return Astrobj::ThinDisk::integrateEmission(nu1, nu2, dsem, c_ph,c_obj); PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp dims[] = {8}; PyObject * pN1 = PyFloat_FromDouble(nu1); PyObject * pN2 = PyFloat_FromDouble(nu2); PyObject * pDs = PyFloat_FromDouble(dsem); PyObject * pCp = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, c_ph); PyObject * pCo = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, c_obj); PyObject * pR = PyObject_CallFunctionObjArgs(pIntegrateEmission_, pN1, pN2, pDs, pCp, pCo, NULL); double res = PyFloat_AsDouble(pR); Py_XDECREF(pR); Py_XDECREF(pCo); Py_XDECREF(pCp); Py_XDECREF(pDs); Py_XDECREF(pN2); Py_XDECREF(pN1); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in ThinDisk::integrateEmission()"); } PyGILState_Release(gstate); return res; } void Gyoto::Astrobj::Python::ThinDisk::integrateEmission (double * I, double const * boundaries, size_t const * chaninds, size_t nbnu, double dsem, double *cph, double *co) const{ if (!pIntegrateEmission_ || !pIntegrateEmission_overloaded_) { Gyoto::Astrobj::ThinDisk::integrateEmission(I, boundaries, chaninds, nbnu, dsem, cph, co); return; } PyGILState_STATE gstate = PyGILState_Ensure(); size_t nbo=0; for (size_t i=0; i<2*nbnu; ++i) if (nbo < chaninds[i]) nbo=chaninds[i]; npy_intp nNu = nbnu, nBo = nbo, nCh = 2*nbnu, nCo = 8; PyObject * pI = PyArray_SimpleNewFromData(1, &nNu, NPY_DOUBLE, I); PyObject * pBo = PyArray_SimpleNewFromData(1, &nBo, NPY_DOUBLE, const_cast(boundaries)); PyObject * pCh = PyArray_SimpleNewFromData(1, &nCh, NPY_UINTP, const_cast(chaninds)); PyObject * pDs = PyFloat_FromDouble(dsem); PyObject * pCp = PyArray_SimpleNewFromData(1, &nCo, NPY_DOUBLE, cph); PyObject * pCo = PyArray_SimpleNewFromData(1, &nCo, NPY_DOUBLE, co); PyObject * pR = PyObject_CallFunctionObjArgs(pIntegrateEmission_, pI, pBo, pCh, pDs, pCp, pCo, NULL); Py_XDECREF(pR); Py_XDECREF(pCo); Py_XDECREF(pCp); Py_XDECREF(pDs); Py_XDECREF(pCh); Py_XDECREF(pBo); Py_XDECREF(pI); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in ThinDisk::integrateEmission()"); } PyGILState_Release(gstate); } double Gyoto::Astrobj::Python::ThinDisk::transmission (double nuem, double dsem, double coord[8]) const { if (!pTransmission_) return Astrobj::ThinDisk::transmission(nuem, dsem, coord); PyGILState_STATE gstate = PyGILState_Ensure(); npy_intp dims[] = {8}; PyObject * pNu = PyFloat_FromDouble(nuem); PyObject * pDs = PyFloat_FromDouble(dsem); PyObject * pCp = PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, coord); PyObject * pR = PyObject_CallFunctionObjArgs(pTransmission_, pNu, pDs, pCp, NULL); double res = PyFloat_AsDouble(pR); Py_XDECREF(pR); Py_XDECREF(pCp); Py_XDECREF(pDs); Py_XDECREF(pNu); if (PyErr_Occurred()) { PyErr_Print(); PyGILState_Release(gstate); throwError("Error occurred in ThinDisk::emission()"); } PyGILState_Release(gstate); return res; } Gyoto-1.2.0/plugins/python/m4/000077500000000000000000000000001302352257300161375ustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/m4/ltoptions.m4000077700000000000000000000000001302352257300241052../../../m4/ltoptions.m4ustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/m4/ltsugar.m4000077700000000000000000000000001302352257300231612../../../m4/ltsugar.m4ustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/m4/ltversion.m4000077700000000000000000000000001302352257300240712../../../m4/ltversion.m4ustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/m4/lt~obsolete.m4000077700000000000000000000000001302352257300247432../../../m4/lt~obsolete.m4ustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/m4/python.m4000077700000000000000000000000001302352257300226612../../../m4/python.m4ustar00rootroot00000000000000Gyoto-1.2.0/plugins/python/missing000077700000000000000000000000001302352257300212302../../missingustar00rootroot00000000000000Gyoto-1.2.0/python/000077500000000000000000000000001302352257300141365ustar00rootroot00000000000000Gyoto-1.2.0/python/Makefile.in000066400000000000000000000215621302352257300162110ustar00rootroot00000000000000# Makefile.in # # Copyright © 2012, 2013 Brandon Invergo # # 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 any warranty. # This Makefile contains targets that fail if run in parallel .NOTPARALLEL: # List whatever files you want to include in your source distribution here. # You can include whole directories but note that *everything* under that # directory will be included DISTFILES = PKG-INFO Makefile.in configure setup.py install-sh DESTDIR = VPATH = @srcdir@ SED = @SED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_DISTNAME = ${PACKAGE_NAME}-${PACKAGE_VERSION} PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYTHON = @PYTHON@ VIRTUALENV = @VIRTUALENV@ SPHINXBUILD = @SPHINXBUILD@ SHELL = @SHELL@ MKDIR_P = @MKDIR_P@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ prefix = @prefix@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ pythondir = @pythondir@ pyexecdir = @pyexecdir@ pkgdatadir = $(datadir)/@PACKAGE_NAME@ pkgincludedir = $(includedir)/@PACKAGE_NAME@ pkgpythondir = @pkgpythondir@ pkgpyexecdir = @pkgpyexecdir@ PYTHONPATH = $(pythondir)$(PATH_SEPARATOR)$(DESTDIR)$(pythondir) SWIG=@SWIG@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ XERCES_CFLAGS = @XERCES_CFLAGS@ XERCES_LIBS = @XERCES_LIBS@ UDUNITS_CFLAGS = @UDUNITS_CFLAGS@ UDUNITS_CPPFLAGS = @UDUNITS_CPPFLAGS@ UDUNITS_LDFLAGS = @UDUNITS_LDFLAGS@ UDUNITS_LIBS = @UDUNITS_LIBS@ CXX=@CXX@ CC=$(CXX) PYTHON = @PYTHON@ PYTHON_ABI_FLAGS = @PYTHON_ABI_FLAGS@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_EXTENSION_SUFFIX = @PYTHON_EXTENSION_SUFFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PREFIX = @PYTHON_PREFIX@ CPPFLAGS=-I../include -I$(top_srcdir)/include $(CFITSIO_CFLAGS) $(XERCES_CFLAGS) $(UDUNITS_CFLAGS) CXXFLAGS=@CXXFLAGS@ $(CFITSIO_CFLAGS) $(XERCES_CFLAGS) $(UDUNITS_CFLAGS) CFLAGS=$(CXXFLAGS) SWIG_CMD = $(SWIG) -I../include -I$(srcdir)/../include -c++ -python -outdir . export LDFLAGS export CFLAGS export CPPFLAGS export CXXFLAGS export CC GYOTO_EXTENSIONS = _gyoto$(PYTHON_EXTENSION_SUFFIX) \ _gyoto_std$(PYTHON_EXTENSION_SUFFIX) GYOTO_PYFILES = gyoto.py gyoto_std.py GYOTO_SWIGFILES = $(srcdir)/gyoto.i $(srcdir)/gyoto_std.i gyoto_doc.i $(srcdir)/numpy.i $(srcdir)/gyoto_swig.h $(srcdir)/gyoto_std_swig.h @HAVE_LORENE_TRUE@GYOTO_EXTENSIONS += _gyoto_lorene$(PYTHON_EXTENSION_SUFFIX) @HAVE_LORENE_TRUE@GYOTO_PYFILES += gyoto_lorene.py @HAVE_LORENE_TRUE@GYOTO_SWIGFILES += $(srcdir)/gyoto_lorene.i all: $(GYOTO_PYFILES) $(GYOTO_EXTENSIONS) ../doc/xml/index.xml: cd ../doc; $(MAKE) doxygen.stamp gyoto_doc.i.orig: ../doc/xml/index.xml $(PYTHON) $(srcdir)/doxy2swig.py --no-function-definition $< $@ || rm $@ gyoto_doc.i: gyoto_doc.i.orig $(SED) -e 's/Gyoto::Screen::Angles/Angles/' \ -e 's/Gyoto::Screen::Bucket/Bucket/' \ -e 's/Gyoto::Screen::Coord1dSet/Coord1dSet/' \ -e 's/Gyoto::Screen::Coord2dSet/Coord2dSet/' \ -e 's/Gyoto::Screen::Empty/Empty/' \ -e 's/Gyoto::Screen::Grid/Grid/' \ -e 's/Gyoto::Screen::Indices/Indices/' \ -e 's/Gyoto::Screen::Range/Range/' \ -e 's/Gyoto::Screen::RepeatAngle/RepeatAngle/' \ $< > $@ _gyoto$(PYTHON_EXTENSION_SUFFIX): gyoto_wrap.cxx $(PYTHON) setup.py build_ext _gyoto_std$(PYTHON_EXTENSION_SUFFIX): gyoto_std_wrap.cxx $(PYTHON) setup_std.py build_ext _gyoto_lorene$(PYTHON_EXTENSION_SUFFIX): gyoto_lorene_wrap.cxx $(PYTHON) setup_lorene.py build_ext gyoto.py gyoto_wrap.cxx: gyoto.i header.py gyoto_doc.i $(top_srcdir)/include/*.h $(builddir)/../include/*.h $(SWIG_CMD) -o gyoto_wrap.cxx $(srcdir)/gyoto.i mv gyoto.py trailer.py cat $(srcdir)/header.py trailer.py > gyoto.py rm trailer.py gyoto_std.py gyoto_std_wrap.cxx: gyoto_std.i gyoto.i $(SWIG_CMD) -o gyoto_std_wrap.cxx $(srcdir)/gyoto_std.i mv gyoto_std.py gyoto_std_trailer.py echo "# -*- coding: utf-8 -*-" > gyoto_std.py cat gyoto_std_trailer.py >> gyoto_std.py rm gyoto_std_trailer.py gyoto_lorene.py gyoto_lorene_wrap.cxx: gyoto_lorene.i gyoto.i $(SWIG_CMD) -o gyoto_lorene_wrap.cxx $(srcdir)/gyoto_lorene.i .PHONY: all install uninstall distclean info install-html html install-pdf pdf install-dvi dvi install-ps ps clean dist check installdirs # Since installing to a virtualenv is all the rage these days, support it here. If the VIRTUALENV # variable is set to anything other than "no", set up a new virtualenv and install there, otherwise # install as usual from setup.py install: all installdirs ifneq ($(VIRTUALENV),no) $(VIRTUALENV) $(VIRTUALENV_FLAGS) $(DESTDIR)$(prefix) || $(VIRTUALENV) $(DESTDIR)$(prefix) $(DESTDIR)$(prefix)/bin/python setup.py install --prefix=$(DESTDIR)$(prefix) $(DESTDIR)$(prefix)/bin/python setup_std.py install --prefix=$(DESTDIR)$(prefix) @HAVE_LORENE_TRUE@ $(DESTDIR)$(prefix)/bin/python setup_lorene.py install --prefix=$(DESTDIR)$(prefix) else $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix) --record=gyoto_installed.txt $(PYTHON) setup_std.py install --prefix=$(DESTDIR)$(prefix) --record=gyoto_std_installed.txt @HAVE_LORENE_TRUE@ $(PYTHON) setup_lorene.py install --prefix=$(DESTDIR)$(prefix) --record=gyoto_lorene_installed.txt endif $(INSTALL_DATA) $(GYOTO_SWIGFILES) $(DESTDIR)$(pkgincludedir) # setup.py doesn't (yet) support an uninstall command, so until it does, you # must manually remove everything that was installed here. The following example # should remove a basic package installed via setup.py, but please double- and # triple-check it so that you don't remove something you shouldn't! # Be sure to remove any extra files you install, such as binaries or documentation! uninstall: -cd $(DESTDIR)$(pkgincludedir) ; \ for file in $(GYOTO_SWIGFILES) numpy.i gyoto_swig.h ; do \ rm `basename $$file` ;\ done -rm -rvf $(DESTDIR)$(pkgpythondir) -cat gyoto_*installed.txt | xargs rm -rmdir $(DESTDIR)$(pkgincludedir) # Just use the usual setup.py clean command clean: $(PYTHON) setup.py clean $(PYTHON) setup_std.py clean @HAVE_LORENE_TRUE@ $(PYTHON) setup_lorene.py clean -rm -Rf build dist -rm gyoto*.py gyoto*_wrap.cxx *.pyc gyoto_doc.i gyoto_doc.i.orig -rm doxygen_sqlite3.db gyoto_*installed.txt -rm -f tests/*.pyc -rm -Rf _gyoto*.so Gyoto*.egg-info # Clean up the output of configure distclean: clean -rm -v $(builddir)/setup*.py -rm -v $(builddir)/Makefile # You can either use the setup.py sdist command or you can roll your own here dist: # $(PYTHON) setup.py sdist mkdir $(PACKAGE_DISTNAME) cp -r $(DISTFILES) $(PACKAGE_DISTNAME) tar -czf $(PACKAGE_DISTNAME).tar.gz $(PACKAGE_DISTNAME) rm -rf $(PACKAGE_DISTNAME) # Use the setup.py test command check: @DYLIB_VAR@=../lib/.libs:$$@DYLIB_VAR@ PYTHONPATH=@srcdir@:$$PYTHONPATH $(PYTHON) -B setup.py test @DYLIB_VAR@=../lib/.libs:$$@DYLIB_VAR@ PYTHONPATH=@srcdir@:$$PYTHONPATH $(PYTHON) -B setup_std.py test # setup.py might complain if a directory doesn't exist so just in case, make the directory # here installdirs: $(MKDIR_P) $(DESTDIR)$(pkgpythondir) $(MKDIR_P) $(DESTDIR)$(pkgincludedir) # The following show how to install documentation. In this example, # docs are built from a separate Makefile contained in the docs # directory which uses the SPHINXBUILD variable to store the location # of the sphinx-build (Python doc tool) binary to use. # $(DESTDIR)$(infodir)/foo.info: docs/build/texinfo/foo.info # $(POST_INSTALL) # $(INSTALL_DATA) @< $(DESTDIR)$@ # if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then # install-info --dir-file=$(DESTDIR)$(infodir)/dir \ # $(DESTDIR)$(infodir)/foo.info; # else true; fi # # info: docs/build/texinfo/foo.info # # docs/build/texinfo/foo.info: $(wildcard docs/source/*) # ifneq ($(SPHINXBUILD),no) # $(MAKE) -C docs info SPHINXBUILD=$(SPHINXBUILD) # endif # # # install-html: html installdirs # $(INSTALL_DATA) docs/build/html/* $(DESTDIR)$(htmldir) # # html: docs/build/html/index.html # # docs/build/html/index.html: $(wildcard $(srcdir)/docs/source/*) # ifneq ($(SPHINXBUILD),no) # $(MAKE) -C docs html SPHINXBUILD=$(SPHINXBUILD) # endif # # # install-pdf: pdf installdirs # $(INSTALL_DATA) docs/build/latex/foo.pdf $(DESTDIR)$(pdfdir) # # pdf: docs/build/latex/Foo.pdf # # docs/build/latex/foo.pdf: $(wildcard $(srcdir)/docs/source/*) # ifneq ($(SPHINXBUILD),no) # $(MAKE) -C docs latexpdf SPHINXBUILD=$(SPHINXBUILD) # endif # # # install-dvi: # # dvi: # # install-ps: # # ps: Gyoto-1.2.0/python/PKG-INFO000066400000000000000000000002651302352257300152360ustar00rootroot00000000000000Metadata-Version: 1.2 Name: gyoto Version: 0.1 Summary: The General relativitY Orbit Tracer of paris Observatory Home-page: http://gyoto.obspm.fr Author-email: gyoto@sympa.obspm.fr Gyoto-1.2.0/python/doxy2swig.py000066400000000000000000000421301302352257300164470ustar00rootroot00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- """Doxygen XML to SWIG docstring converter. Usage: doxy2swig.py [options] input.xml output.i Converts Doxygen generated XML files into a file containing docstrings that can be used by SWIG-1.3.x. Note that you need to get SWIG version > 1.3.23 or use Robin Dunn's docstring patch to be able to use the resulting output. input.xml is your doxygen generated XML file and output.i is where the output will be written (the file will be clobbered). """ ###################################################################### # # This code is implemented using Mark Pilgrim's code as a guideline: # http://www.faqs.org/docs/diveintopython/kgp_divein.html # # Author: Prabhu Ramachandran # License: BSD style # # Thanks: # Johan Hake: the include_function_definition feature # Bill Spotz: bug reports and testing. # Sebastian Henschel: Misc. enhancements. # # Copyright 2008-2015 Prabhu Ramachandran # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # 3. Neither the name of the copyright holder nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Gyoto history: # 2015-05-27: # * add the third clause of the BSD license per request of the # original author. # 2015-05-25: # * add explicit copyright notice and BSD (2 clause) license. The # original author only specified "BSD style". # 2015-01-05: # * download this file from # http://www.aero.iitb.ac.in/~prabhu/software/code/python/doxy2swig.py # * change my_open_write to open output with utf-8 encoding; # * small modifications to make the script run under both # python2.7 and python3.4. # ###################################################################### from xml.dom import minidom import re import textwrap import sys import types import os.path import optparse import codecs def my_open_read(source): if hasattr(source, "read"): return source else: return open(source) def my_open_write(dest): if hasattr(dest, "write"): return dest else: return codecs.open(dest, 'w', 'utf-8') class Doxy2SWIG: """Converts Doxygen generated XML files into a file containing docstrings that can be used by SWIG-1.3.x that have support for feature("docstring"). Once the data is parsed it is stored in self.pieces. """ def __init__(self, src, include_function_definition=True, quiet=False): """Initialize the instance given a source object. `src` can be a file or filename. If you do not want to include function definitions from doxygen then set `include_function_definition` to `False`. This is handy since this allows you to use the swig generated function definition using %feature("autodoc", [0,1]). """ f = my_open_read(src) self.my_dir = os.path.dirname(f.name) self.xmldoc = minidom.parse(f).documentElement f.close() self.pieces = [] self.pieces.append('\n// File: %s\n'%\ os.path.basename(f.name)) self.space_re = re.compile(r'\s+') self.lead_spc = re.compile(r'^(%feature\S+\s+\S+\s*?)"\s+(\S)') self.multi = 0 self.ignores = ['inheritancegraph', 'param', 'listofallmembers', 'innerclass', 'name', 'declname', 'incdepgraph', 'invincdepgraph', 'programlisting', 'type', 'references', 'referencedby', 'location', 'collaborationgraph', 'reimplements', 'reimplementedby', 'derivedcompoundref', 'basecompoundref'] #self.generics = [] self.include_function_definition = include_function_definition if not include_function_definition: self.ignores.append('argsstring') self.quiet = quiet def generate(self): """Parses the file set in the initialization. The resulting data is stored in `self.pieces`. """ self.parse(self.xmldoc) def parse(self, node): """Parse a given node. This function in turn calls the `parse_` functions which handle the respective nodes. """ pm = getattr(self, "parse_%s"%node.__class__.__name__) pm(node) def parse_Document(self, node): self.parse(node.documentElement) def parse_Text(self, node): txt = node.data txt = txt.replace('\\', r'\\\\') txt = txt.replace('"', r'\"') # ignore pure whitespace m = self.space_re.match(txt) if m and len(m.group()) == len(txt): pass else: self.add_text(textwrap.fill(txt, break_long_words=False)) def parse_Element(self, node): """Parse an `ELEMENT_NODE`. This calls specific `do_` handers for different elements. If no handler is available the `generic_parse` method is called. All tagNames specified in `self.ignores` are simply ignored. """ name = node.tagName ignores = self.ignores if name in ignores: return attr = "do_%s" % name if hasattr(self, attr): handlerMethod = getattr(self, attr) handlerMethod(node) else: self.generic_parse(node) #if name not in self.generics: self.generics.append(name) def parse_Comment(self, node): """Parse a `COMMENT_NODE`. This does nothing for now.""" return def add_text(self, value): """Adds text corresponding to `value` into `self.pieces`.""" if type(value) in (list, tuple): self.pieces.extend(value) else: self.pieces.append(value) def get_specific_nodes(self, node, names): """Given a node and a sequence of strings in `names`, return a dictionary containing the names as keys and child `ELEMENT_NODEs`, that have a `tagName` equal to the name. """ nodes = [(x.tagName, x) for x in node.childNodes \ if x.nodeType == x.ELEMENT_NODE and \ x.tagName in names] return dict(nodes) def generic_parse(self, node, pad=0): """A Generic parser for arbitrary tags in a node. Parameters: - node: A node in the DOM. - pad: `int` (default: 0) If 0 the node data is not padded with newlines. If 1 it appends a newline after parsing the childNodes. If 2 it pads before and after the nodes are processed. Defaults to 0. """ npiece = 0 if pad: npiece = len(self.pieces) if pad == 2: self.add_text('\n') for n in node.childNodes: self.parse(n) if pad: if len(self.pieces) > npiece: self.add_text('\n') def space_parse(self, node): self.add_text(' ') self.generic_parse(node) do_ref = space_parse do_emphasis = space_parse do_bold = space_parse do_computeroutput = space_parse do_formula = space_parse def do_compoundname(self, node): self.add_text('\n\n') data = node.firstChild.data self.add_text('%%feature("docstring") %s "\n'%data) def do_compounddef(self, node): kind = node.attributes['kind'].value if kind in ('class', 'struct'): prot = node.attributes['prot'].value if prot != 'public': return names = ('compoundname', 'briefdescription', 'detaileddescription', 'includes') first = self.get_specific_nodes(node, names) for n in names: if n in first: self.parse(first[n]) self.add_text(['";','\n']) for n in node.childNodes: if n not in first.values(): self.parse(n) elif kind in ('file', 'namespace'): nodes = node.getElementsByTagName('sectiondef') for n in nodes: self.parse(n) def do_includes(self, node): self.add_text('C++ includes: ') self.generic_parse(node, pad=1) def do_parameterlist(self, node): text='unknown' for key, val in node.attributes.items(): if key == 'kind': if val == 'param': text = 'Parameters' elif val == 'exception': text = 'Exceptions' else: text = val break self.add_text(['\n', '\n', text, ':', '\n']) self.generic_parse(node, pad=1) def do_para(self, node): self.add_text('\n') self.generic_parse(node, pad=1) def do_parametername(self, node): self.add_text('\n') try: data=node.firstChild.data except AttributeError: # perhaps a tag in it data=node.firstChild.firstChild.data if data.find('Exception') != -1: self.add_text(data) else: self.add_text("%s: "%data) def do_parameterdefinition(self, node): self.generic_parse(node, pad=1) def do_detaileddescription(self, node): self.generic_parse(node, pad=1) def do_briefdescription(self, node): self.generic_parse(node, pad=1) def do_memberdef(self, node): prot = node.attributes['prot'].value id = node.attributes['id'].value kind = node.attributes['kind'].value tmp = node.parentNode.parentNode.parentNode compdef = tmp.getElementsByTagName('compounddef')[0] cdef_kind = compdef.attributes['kind'].value if prot == 'public': first = self.get_specific_nodes(node, ('definition', 'name')) name = first['name'].firstChild.data if name[:8] == 'operator': # Don't handle operators yet. return if not 'definition' in first or \ kind in ['variable', 'typedef']: return if self.include_function_definition: defn = first['definition'].firstChild.data else: defn = "" self.add_text('\n') self.add_text('%feature("docstring") ') anc = node.parentNode.parentNode if cdef_kind in ('file', 'namespace'): ns_node = anc.getElementsByTagName('innernamespace') if not ns_node and cdef_kind == 'namespace': ns_node = anc.getElementsByTagName('compoundname') if ns_node: ns = ns_node[0].firstChild.data self.add_text(' %s::%s "\n%s'%(ns, name, defn)) else: self.add_text(' %s "\n%s'%(name, defn)) elif cdef_kind in ('class', 'struct'): # Get the full function name. anc_node = anc.getElementsByTagName('compoundname') cname = anc_node[0].firstChild.data self.add_text(' %s::%s "\n%s'%(cname, name, defn)) for n in node.childNodes: if n not in first.values(): self.parse(n) self.add_text(['";', '\n']) def do_definition(self, node): data = node.firstChild.data self.add_text('%s "\n%s'%(data, data)) def do_sectiondef(self, node): kind = node.attributes['kind'].value if kind in ('public-func', 'func', 'user-defined', ''): self.generic_parse(node) def do_header(self, node): """For a user defined section def a header field is present which should not be printed as such, so we comment it in the output.""" data = node.firstChild.data self.add_text('\n/*\n %s \n*/\n'%data) # If our immediate sibling is a 'description' node then we # should comment that out also and remove it from the parent # node's children. parent = node.parentNode idx = parent.childNodes.index(node) if len(parent.childNodes) >= idx + 2: nd = parent.childNodes[idx+2] if nd.nodeName == 'description': nd = parent.removeChild(nd) self.add_text('\n/*') self.generic_parse(nd) self.add_text('\n*/\n') def do_simplesect(self, node): kind = node.attributes['kind'].value if kind in ('date', 'rcs', 'version'): pass elif kind == 'warning': self.add_text(['\n', 'WARNING: ']) self.generic_parse(node) elif kind == 'see': self.add_text('\n') self.add_text('See: ') self.generic_parse(node) else: self.generic_parse(node) def do_argsstring(self, node): self.generic_parse(node, pad=1) def do_member(self, node): kind = node.attributes['kind'].value refid = node.attributes['refid'].value if kind == 'function' and refid[:9] == 'namespace': self.generic_parse(node) def do_doxygenindex(self, node): self.multi = 1 comps = node.getElementsByTagName('compound') for c in comps: refid = c.attributes['refid'].value fname = refid + '.xml' if not os.path.exists(fname): fname = os.path.join(self.my_dir, fname) if not self.quiet: print("parsing file: %s"%fname) p = Doxy2SWIG(fname, self.include_function_definition, self.quiet) p.generate() self.pieces.extend(self.clean_pieces(p.pieces)) def write(self, fname): o = my_open_write(fname) if self.multi: o.write("".join(self.pieces)) else: o.write("".join(self.clean_pieces(self.pieces))) o.close() def clean_pieces(self, pieces): """Cleans the list of strings given as `pieces`. It replaces multiple newlines by a maximum of 2 and returns a new list. It also wraps the paragraphs nicely. """ ret = [] count = 0 for i in pieces: if i == '\n': count = count + 1 else: if i == '";': if count: ret.append('\n') elif count > 2: ret.append('\n\n') elif count: ret.append('\n'*count) count = 0 ret.append(i) _data = "".join(ret) ret = [] for i in _data.split('\n\n'): if i == 'Parameters:' or i == 'Exceptions:': ret.extend([i, '\n-----------', '\n\n']) elif i.find('// File:') > -1: # leave comments alone. ret.extend([i, '\n']) else: _tmp = textwrap.fill(i.strip(), break_long_words=False) _tmp = self.lead_spc.sub(r'\1"\2', _tmp) ret.extend([_tmp, '\n\n']) return ret def convert(input, output, include_function_definition=True, quiet=False): p = Doxy2SWIG(input, include_function_definition, quiet) p.generate() p.write(output) def main(): usage = __doc__ parser = optparse.OptionParser(usage) parser.add_option("-n", '--no-function-definition', action='store_true', default=False, dest='func_def', help='do not include doxygen function definitions') parser.add_option("-q", '--quiet', action='store_true', default=False, dest='quiet', help='be quiet and minimize output') options, args = parser.parse_args() if len(args) != 2: parser.error("error: no input and output specified") convert(args[0], args[1], not options.func_def, options.quiet) if __name__ == '__main__': main() Gyoto-1.2.0/python/example-mpi.py000066400000000000000000000127501302352257300167330ustar00rootroot00000000000000#/bin/env python # -*- coding: utf-8 -*- # Example file for gyoto with MPI # # Copyright 2015 Thibaut Paumard # # This file is part of Gyoto. # # Gyoto 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 3 of the License, or # (at your option) any later version. # # Gyoto is distributed in the hope that 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 Gyoto. If not, see . ### Explanation: # # The script examplifies how to use MPI parallelization with Gyoto # commanded from Python. It performs the ray-tracing of one of the # Gyoto examples in doc/examples/ using MPI parallelization. It does # nothing with the result, uncomment the last few lines if you want to # display them. # # The parallel computing model of Gyoto is MIMD (Multiple Instruction, # Multiple Data) which allows not caring too much about the details in # the high level program. We have a single 'manager' process that # takes care of handling input/output and distributes the work load # (ray-tracing of individual geodesics) to 'worker' processes, # instances of gyoto-mpi-worker.VERSION where VERSION is the ABI # version of Gyoto. # # There are two basic scenarios supported in Gyoto to start the # manager and the workers, plus a cheat that works only under Open # MPI: # # 1- mpirun starts only the rank 0, manager process, which is # responsible for starting the workers processes using # MPI_Comm_spawn(); # # 2- mpirun starts one instance of the manager process and NWORKER # instances of the worker process; # # 3- only under Open MPI: mpirun/orterun starts NWORKERS+1 instances # of the manager program, and all these instances except rank 0 # immediately transform themselves into worker processes using the # execlp() system call, so we are back in scenario 2 above. # ### Synopsis: # # This script automatically detects how it was started and supports # the three scenarios above: # # 1- mpirun -np 1 python example-mpi.py # 2- mpirun -np 1 python example-mpi.py : -np NWORKERS gyoto-mpi-worker.VERSION # 3- orterun -np python example-mpi.py # # where NWORKERS is the desired number of workers to use (e.g. 4) and # VERSION is the gyoto ABI version (e.g. 5 or 5-unreleased). In the # first form, the script will spawn 4 workers (instances of # gyoto-mpi-workers.VERSION). In the second form, the script will use # the NWORKERS instances launched by mpirun. # # The third version works only if the MPI environment is Open MPI # (hence the choice to use the command orterun instead of mpirun in # the example). In this case, the NWORKERS process with rank > 0 will # respawn themselves as gyoto-mpi-worker.VERSION using os.execlp(). # ### Environment: # # The system must be able to find libgyoto, the plugins, and the # command-line utilities gyoto and gyoto-mpi-workers.VERSION, # therefore you may need to set PATH and LD_LIBRARY_PATH appropriately # or the like. Make sure the version of gyoto that is found first in # your path is the right version, i.e. that LD_LIBRARY_PATH and PATH # are set consistently. # ### # 1- Support scenario 3 above # # Check whether we are running under an OpenMPI environment and have a # rank > 0. In this case, respawn as gyoto, which will itself respawn # as the right gyoto-mpi-worker.VERSION using exactly the same # heuristics. Respawning as gyoto instead of gyoto-mpi-worker.VERSION # saves us from hard-coding VERSION, but is slightly unsafe. Make sure # the right (ABI-compatible) version of gyoto is first in your PATH! import os if os.getenv('OMPI_COMM_WORLD_RANK', '0') != '0': os.execlp("gyoto", "") # 2- Let mpi4py initialize the MPI environment: import mpi4py.MPI # 3- Prepare Gyoto::Scenery to ray-trace import numpy import matplotlib as ml import matplotlib.pyplot as plt import gyoto gyoto.requirePlugin("stdplug") import gyoto_std a=gyoto.Factory("../doc/examples/example-moving-star.xml") sc=a.getScenery() sc.nThreads(1) sc.astrobj().opticallyThin(False) # 4- Prepare storage for ray-traced quantities # Prepare array for holding results res=sc.screen().resolution() intensity=numpy.zeros((res, res), dtype=float) time=numpy.zeros((res, res), dtype=float) distance=numpy.zeros((res, res), dtype=float) # Store array pointers in AstrobjProperties aop=gyoto.AstrobjProperties() aop.intensity=gyoto.array_double.fromnumpy2(intensity) aop.time=gyoto.array_double.fromnumpy2(time) aop.distance=gyoto.array_double.fromnumpy2(distance) # 5- Prepare Coord2dSet to select what Photons to launch ii=gyoto.Range(1, res, 1) jj=gyoto.Range(1, res, 1) grid=gyoto.Grid(ii, jj) # 6- Autodetect scenario 1 vs. scenarios 2/3 # Spawn processes and clone scenery into them: world = mpi4py.MPI.COMM_WORLD if (world.size > 1 and world.rank == 0): # This is scenario 2/3 # We assume that the other ranks are instances of # gyoto-mpi-worker.VERSION and enrole them sc.mpiSpawn(-1) else: # This is scenario 1 # We spawn 4 instances of gyoto-mpi-worker.VERSION sc.mpiSpawn(4) sc.mpiClone() # 7- Ray-trace sc.rayTrace(grid, aop) # 8- Terminate MPI workers sc.mpiTerminate() # 9- Do something with the data #plt.imshow(intensity) #plt.show() #plt.imshow(time) #plt.show() #plt.imshow(distance) #plt.show() print("All done, exiting") Gyoto-1.2.0/python/example.py000066400000000000000000000172531302352257300161530ustar00rootroot00000000000000#/bin/env python # -*- coding: utf-8 -*- # Example file for gyoto # # Copyright 2014-2016 Thibaut Paumard # # This file is part of Gyoto. # # Gyoto 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 3 of the License, or # (at your option) any later version. # # Gyoto is distributed in the hope that 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 Gyoto. If not, see . # Before loading the gyoto_std extension: # - gyoto must be imported; # - the stdplug Gyoto plug-in must be loaded. This normally happens # automatically, unless the user has set her environment otherwise. import numpy import matplotlib as ml import matplotlib.pyplot as plt import gyoto gyoto.requirePlugin("stdplug") import gyoto_std # Simple stuff scr=gyoto.Screen() gg=gyoto_std.KerrBL() scr.metric(gg) pos=numpy.zeros(4, float) scr.getObserverPos(pos) # Load Scenery a=gyoto.Factory("../doc/examples/example-moving-star.xml") sc=a.getScenery() sc.nThreads(8) sc.astrobj().opticallyThin(False) scr=sc.screen() dest=numpy.zeros(8, float) scr.getRayCoord(1,1,dest) dest=numpy.ndarray(3, float) scr.coordToSky((0., 5., numpy.pi/2, 0), dest) # Trace and plot NULL geodesic: ph=gyoto.Photon() ph.setInitialCondition(sc.metric(), sc.astrobj(), sc.screen(), 0., 0.) ph.hit() n=ph.get_nelements() # We try to map Gyoto arrays to NumPy arrays wherever possible. # Create NumPy arrays t=numpy.ndarray(n) r=numpy.ndarray(n) theta=numpy.ndarray(n) phi=numpy.ndarray(n) # Call Gyoto method that takes these arrays as argument: ph.getCoord(t, r, theta, phi) plt.plot(t, r) plt.show() # Trace and plot timelike geodesic # We need to cast the object to a gyoto_std.Star: wl=gyoto_std.Star(sc.astrobj()) wl.xFill(1000) n=wl.get_nelements() x=numpy.ndarray(n) y=numpy.ndarray(n) z=numpy.ndarray(n) wl.get_xyz(x, y, z) plt.plot(x, y) plt.show() # Ray-trace scenery res=sc.screen().resolution() intensity=numpy.zeros((res, res), dtype=float) time=numpy.zeros((res, res), dtype=float) distance=numpy.zeros((res, res), dtype=float) aop=gyoto.AstrobjProperties() # Here we will use the low-level AstrobjProperties facilities. This is # one of a few Gyoto functionalities where NumPy arrays are not # directly supported. We use lower-level C-like arrays through the # gyoto.array_double and gyoto.array_unsigned_long classes. Beware # that this type does not provide any safeguards, it is quite easy to # get it to SEGFAULT. As we develop Gyoto, we try to remove the need # for the gyoto.array_* classes in favor of NumPy arrays. Code that # uses this... ``feature'' therefore may break in future releases. # # To (indirectly) use NumPy arrays with a functionality that requires # gyoto.array_* arguments, create the arrays using numpy (see above: # `intensity', `time' and `distance' arrays) , then cast them using # the fromnumpyN static methods, where the digit N indicates the # dimensionality of the NumPy array. The underlying storage belongs to # the NumPy variable and will be deleted with it: don't use the # array_double() variable (for anyting else that destroying it) past # the destruction of the corresponding NumPy variable. aop.intensity=gyoto.array_double.fromnumpy2(intensity) aop.time=gyoto.array_double.fromnumpy2(time) aop.distance=gyoto.array_double.fromnumpy2(distance) ii=gyoto.Range(1, res, 1) jj=gyoto.Range(1, res, 1) grid=gyoto.Grid(ii, jj, "\rj = ") sc.rayTrace(grid, aop) plt.imshow(intensity) plt.show() plt.imshow(time) plt.show() plt.imshow(distance) plt.show() # Another Scenery, with spectrum sc=gyoto.Factory("../doc/examples/example-polish-doughnut.xml").getScenery() sc.screen().resolution(32) res=sc.screen().resolution() ns=sc.screen().spectrometer().nSamples() spectrum=numpy.zeros((ns, res, res), dtype=float) ii=gyoto.Range(1, res, 1) jj=gyoto.Range(1, res, 1) grid=gyoto.Grid(ii, jj, "\rj = ") aop=gyoto.AstrobjProperties() aop.spectrum=gyoto.array_double.fromnumpy3(spectrum) aop.offset=res*res sc.rayTrace(grid, aop) plt.imshow(spectrum[1,:,:]) plt.show() # Another Scenery, with impact coords, created from within Python met=gyoto.Metric("KerrBL") met.mass(4e6, "sunmass") ao=gyoto.Astrobj("PageThorneDisk") ao.metric(met) ao.opticallyThin(False) ao.rMax(100) screen=gyoto.Screen() screen.distance(8, "kpc") screen.time(8, "kpc") screen.resolution(64) screen.inclination(numpy.pi/4) screen.PALN(numpy.pi) screen.time(8, "kpc") screen.fieldOfView(100, "µas") sc=gyoto.Scenery() sc.metric(met) sc.astrobj(ao) sc.screen(screen) sc.delta(1, "kpc") sc.adaptive(True) sc.nThreads(8) res=sc.screen().resolution() ii=gyoto.Range(1, res, 1) jj=gyoto.Range(1, res, 1) grid=gyoto.Grid(ii, jj, "\rj = ") ipct=numpy.zeros((res, res, 16), dtype=float) aop=gyoto.AstrobjProperties() aop.impactcoords=gyoto.array_double.fromnumpy3(ipct) aop.offset=res*res sc.rayTrace(grid, aop) plt.imshow(ipct[:,:,0], interpolation="nearest", vmin=-100, vmax=0) plt.show() # Trace one line of the above using alpha and delta N=10 buf=numpy.linspace(screen.fieldOfView()*-0.5, screen.fieldOfView()*0.5, N) a=gyoto.Angles(buf) d=gyoto.RepeatAngle(screen.fieldOfView()*-0.5, N) bucket=gyoto.Bucket(a, d) ipct=numpy.zeros((N, 16), dtype=float) aop=gyoto.AstrobjProperties() aop.impactcoords=gyoto.array_double.fromnumpy2(ipct) aop.offset=N sc.rayTrace(bucket, aop) plt.plot(buf, ipct[:,0]) plt.show() # Trace the diagonal of the above using i and j. The Range and Indices # definitions below are equivalent. Range is more efficient for a # range, Indices can hold arbitrary indices. ind=numpy.arange(1, res+1, dtype=numpy.uintp) # on 64bit arch... ii=gyoto.Indices(ind) # Or: # ind=gyoto.array_size_t(res) # for i in range(0, res): # ind[i]=i+1 # ii=gyoto.Indices(ind, res) jj=gyoto.Range(1, res, 1) bucket=gyoto.Bucket(ii, jj) ipct=numpy.zeros((res, 16), dtype=float) aop=gyoto.AstrobjProperties() aop.impactcoords=gyoto.array_double.fromnumpy2(ipct) aop.offset=res sc.rayTrace(bucket, aop) t=numpy.clip(ipct[:,0], a_min=-200, a_max=0) plt.plot(t) plt.show() # Any derived class can be instantiated from its name, as soon as the # corresponding plug-in has been loaded into Gyoto. The standard # plug-in is normally loaded automatically, but this can also be # forced with gyoto.requirePlugin(): gyoto.requirePlugin('stdplug') tt=gyoto.Astrobj('Torus') kerr=gyoto.Metric('KerrBL') # Most properties that can be set in an XML file can also be accessed # from Python using the Property/Value mechanism: # Low-level access: p=tt.property("SmallRadius") p.type==gyoto.Property.double_t tt.set(p, gyoto.Value(0.2)) tt.get(p) == 0.2 # Higher-level: kerr.set("Spin", 0.95) kerr.get("Spin") == 0.95 # However, we also have Python extensions around the standard Gyoto # plug-ins. Beware that the plug-in must be loaded into Gyoto before # importing the corresponding Python extension: gyoto.requirePlugin('stdplug') import gyoto_std # And if the lorene plug-in has been compiled: # gyoto.requirePlugin('lorene') # import gyoto_lorene # It then becomes possible to access the methods specific to derived # classes. They can be instantiated directly from the gyoto_* extension: tr2=gyoto_std.Torus() # and we can cast a generic pointer (from the gyoto extension) to a # derived class: tr=gyoto_std.Torus(tt) tt.get("SmallRadius") == tr.smallRadius() # Another example: using a complex (i.e. compound) Astrobj: cplx=gyoto_std.ComplexAstrobj() cplx.append(tr) cplx.append(sc.astrobj()) sc.astrobj(cplx) cplx.rMax(100) print("All done, exiting") Gyoto-1.2.0/python/gyoto.i000066400000000000000000000761741302352257300154700ustar00rootroot00000000000000/* Copyright 2014-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ /* This is a Swig interface file. It is currently meant to provide Python bindings only, but it should not be too difficult to provide bindings for java, Tcl or whatever other language Swig supports. */ // ******** SOME INITIALIZATION ********* // // Define the module name, with a docstring %module(docstring="The General relativitY Orbit Tracer of paris Observatory") gyoto // Let Swig generate some documentation for the overloaded methods %feature("autodoc", "1"); // gyoto_doc.i is generated from the doxygen comments using doxy2swig.py %import gyoto_doc.i // Make it possible to detect that a .h file is being processed by // Swig rather than CPP. There should be a Swig feature for that, I // didn't find it. %define GYOTO_SWIGIMPORTED %enddef // Make sure we don't activate the deprecated method names (see // GyotoDefs.h): it is better to fail on them to update them now. %define GYOTO_NO_DEPRECATED %enddef // ********** MACRO DEFINITIONS *********** // // Exposing SmartPointers does not work well: it breaks automatic // inheritance and docstring generation. We therefore provide Swig // typemaps to convert SmartPointers to normal pointers // automatically. We also use the ref/unref features to let Swig // handle the reference counting for us mostly automatically (which is // what we wouldotherwise loose by not using SmartPointers). // // Since SmartPointers are templates, we use macros here to provide // typemaps for various SmartPointer specializations. // Typemaps for Gyoto::SmartPointer %define GyotoSmPtrTypeMapClass(klass) GyotoSmPtrTypeMap(Gyoto::klass, SWIGTYPE_p_Gyoto__ ## klass) %enddef // Typemaps for Gyoto::SmartPointer %define GyotoSmPtrTypeMapClassGeneric(nspace) GyotoSmPtrTypeMap(Gyoto::nspace::Generic, SWIGTYPE_p_Gyoto__ ## nspace ## __Generic) %enddef // Typemaps for Gyoto::SmartPointer %define GyotoSmPtrTypeMapClassDerived(nspace, klass) GyotoSmPtrTypeMap(Gyoto::nspace::klass, SWIGTYPE_p_Gyoto__ ## nspace ## __ ## klass) %enddef // Basic macro used in the above: gtype is the Gyoto name of a type, // e.g. Gyoto::Metric::KerrBL, while stype is the Swig name for same // type, e.g. SWIGTYPE_p_Gyoto__Metric__KerrBL %define GyotoSmPtrTypeMap(gtype, stype) %typemap(in) Gyoto::SmartPointer (gtype *) { int res=0; void *argp=0; res=SWIG_ConvertPtr($input, &argp, stype, 0); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "argument of type '" #gtype "*'"); } gtype * kp=reinterpret_cast< gtype * >(argp); $1 = Gyoto::SmartPointer(kp); } %typemap(out) Gyoto::SmartPointer (gtype *) { gtype* normal_pointer=(gtype *) (Gyoto::SmartPointer(result)); if (normal_pointer) normal_pointer->incRefCount(); $result = SWIG_NewPointerObj( normal_pointer, stype, SWIG_POINTER_OWN | 0 ); } %typemap(typecheck,precedence=SWIG_TYPECHECK_VOIDPTR) Gyoto::SmartPointer, gtype * { void *vptr = 0; int res = SWIG_ConvertPtr($input, &vptr, stype, 0); $1 = SWIG_CheckState(res); } %typemap(typecheck) Gyoto::SmartPointer< gtype > = Gyoto::SmartPointer; %typemap(typecheck) gtype * = Gyoto::SmartPointer; %typemap(typecheck) gtype const * = Gyoto::SmartPointer; %enddef // Include header for a class deriving from SmartPointee, providing // the ref and unref features %define GyotoSmPtrClass(klass) %feature("ref") Gyoto:: klass "$this->incRefCount();"; %feature("unref") Gyoto:: klass "$this->decRefCount(); if (!$this->getRefCount()) delete $this;"; %include Gyoto ## klass ## .h %enddef // Include header for a base class (e.g. GyotoMetric.h), provide // constructor from kind string (e.g. gyoto.Metric('KerrBL')), provide // ref/unref features %define GyotoSmPtrClassGeneric(klass) %rename(klass) klass ## Ptr; %rename(klass ## Register) Gyoto::klass::Register_; %inline { Gyoto::Register::Entry * get ## klass ## Register() { return Gyoto::klass::Register_; } } %rename(register ## klass) Gyoto::klass::Register; %rename(init ## klass ## Register) Gyoto::klass::initRegister; %rename(get ## klass ## Subcontractor) Gyoto::klass::getSubcontractor; %rename(klass) Gyoto::klass::Generic; %feature("ref") Gyoto:: klass ::Generic"$this->incRefCount();"; %feature("unref") Gyoto:: klass ::Generic"$this->decRefCount(); if (!$this->getRefCount()) delete $this;"; // Need to mark the base classes as "notabstract" to extend them with // a down-cast constructor %feature("notabstract") Gyoto::klass::Generic; // Ignore all the actual constructors as these classes are really abstract %ignore Gyoto::klass::Generic::Generic(Gyoto::klass::Generic const &); %ignore Gyoto::klass::Generic::Generic(const Generic &); %ignore Gyoto::klass::Generic::Generic(const klass::Generic &); %ignore Gyoto::klass::Generic::Generic(); %ignore Gyoto::klass::Generic::Generic(double); %ignore Gyoto::klass::Generic::Generic(kind_t); %ignore Gyoto::klass::Generic::Generic(const std::string); %ignore Gyoto::klass::Generic::Generic(const int, const std::string &); // Make a pseudo constructor for down-casting. %extend Gyoto::klass::Generic { Generic(std::string nm) { std::vector plugin; Gyoto::SmartPointer pres= Gyoto::klass::getSubcontractor(nm.c_str(), plugin)(NULL, plugin); Gyoto::klass::Generic * res = (Gyoto::klass::Generic *)(pres); if (res) res -> incRefCount(); return res; } Generic(std::string nm, std::vector plugin) { GYOTO_DEBUG_EXPR(plugin.size()); Gyoto::SmartPointer pres= Gyoto::klass::getSubcontractor(nm.c_str(), plugin)(NULL, plugin); Gyoto::klass::Generic * res = (Gyoto::klass::Generic *)(pres); if (res) res -> incRefCount(); return res; } Generic(long address) { Gyoto::klass::Generic * res = (Gyoto::klass::Generic *)(address); if (res) res -> incRefCount(); return res; } }; %include Gyoto ## klass ## .h %enddef // Include header for derived class. Parameters: nspace: namespace // (e.g. Astrobj); klass: classname (e.g. Complex); nick: name to use // in the flattened namespace (e.g. ComplexAstrobj); hdr: header file // (e.g. GyotoComplexAstrobj.h). Extends class with a pseudo // constructor for upcasting, // e.g. cplx=gyoto_std.ComplexAstrobj(sc.strobj()) %define GyotoSmPtrClassDerivedPtrHdr(nspace, klass, nick, hdr) %rename(nick) Gyoto::nspace::klass; %feature("notabstract") Gyoto::nspace::klass; %extend Gyoto::nspace::klass { klass(Gyoto::nspace::Generic * base) { Gyoto::nspace::klass * res = dynamic_cast< Gyoto::nspace::klass * >(base); if (!res) Gyoto::throwError("This pointer cannot be cast to 'Gyoto::" #nspace "::" #klass "*'"); return res; } klass(long address) { Gyoto::nspace::klass * res = (Gyoto::nspace::klass *)(address); if (res) res -> incRefCount(); return res; } }; %include hdr %enddef // Simplification of the above when nick == klass %define GyotoSmPtrClassDerivedHdr(nspace, klass, hdr) GyotoSmPtrClassDerivedPtrHdr(nspace, klass, klass, hdr) %enddef // Simplification of the above when hdr == Gyoto ## klass ## .h %define GyotoSmPtrClassDerived(nspace, klass) GyotoSmPtrClassDerivedHdr(nspace, klass, Gyoto ## klass ## .h) %enddef // ******** INCLUDES ******** // // Include any file that is needed to compile the wrappers %{ #define SWIG_FILE_WITH_INIT #define GYOTO_NO_DEPRECATED #include "gyoto_swig.h" using namespace Gyoto; swig_type_info * __Gyoto_SWIGTYPE_p_Gyoto__Error() { return SWIGTYPE_p_Gyoto__Error; } %} // ******** INITIALIZATION ******** // // Catch all Gyoto errors and re-throw them as run-time errors for the // target language %exception { try { $action } catch (Gyoto::Error e) { // PyErr_SetString(PyErr_NewException("gyoto.Error", NULL, NULL), e); SWIG_Python_Raise (SWIG_NewPointerObj ((new Gyoto::Error(static_cast(e))), __Gyoto_SWIGTYPE_p_Gyoto__Error(),SWIG_POINTER_NEW), "gyoto.Error", __Gyoto_SWIGTYPE_p_Gyoto__Error()); SWIG_fail; } } // This will be called upon extension initialization %init { Gyoto::Register::init(); #ifdef SWIGPYTHON import_array(); #endif } // Rename operator++() -> increment() for everything %rename(increment) *::operator++; // Rename operator=() -> assign() for everything %rename(assign) *::operator=; // Rename operator*() -> __ref__ // nothing to do, that's the default // ******** TYPEMAPS ******** // // Actually instantiate typemaps using de macros defined above GyotoSmPtrTypeMapClassGeneric(Metric); GyotoSmPtrTypeMapClassGeneric(Astrobj); GyotoSmPtrTypeMapClassGeneric(Spectrum); GyotoSmPtrTypeMapClassGeneric(Spectrometer); GyotoSmPtrTypeMapClassDerived(Astrobj, ThinDisk); GyotoSmPtrTypeMapClassDerived(Astrobj, Standard) GyotoSmPtrTypeMapClass(Screen); GyotoSmPtrTypeMapClass(Scenery); GyotoSmPtrTypeMapClass(Photon); GyotoSmPtrTypeMapClass(SmartPointee); GyotoSmPtrTypeMapClassDerived(Spectrometer, Complex); GyotoSmPtrTypeMapClassDerived(Spectrometer, Uniform); GyotoSmPtrTypeMapClassDerived(Units, Unit); GyotoSmPtrTypeMapClassDerived(Units, Converter); GyotoSmPtrTypeMapClassDerived(Worldline, IntegState); GyotoSmPtrTypeMapClassDerived(Astrobj, Properties); // Typemaps for Gyoto::Value: // In: cast from target language representations for all the supported // types. %typemap(in) Gyoto::Value { int res=0; void *argp=0; res=SWIG_ConvertPtr($input, &argp, SWIGTYPE_p_Gyoto__Value, 0); if (SWIG_IsOK(res)) { Gyoto::Value * temp = reinterpret_cast< Gyoto::Value * >(argp); $1 = *temp; if (SWIG_IsNewObj(res)) delete temp; } if (!SWIG_IsOK(res)) { res=SWIG_ConvertPtr($input, &argp, SWIGTYPE_p_Gyoto__Metric__Generic, 0); if (SWIG_IsOK(res)) { Gyoto::SmartPointer temp = reinterpret_cast< Gyoto::Metric::Generic * >(argp); $1 = Gyoto::Value(temp); } } if (!SWIG_IsOK(res)) { res=SWIG_ConvertPtr($input, &argp, SWIGTYPE_p_Gyoto__Astrobj__Generic, 0); if (SWIG_IsOK(res)) { Gyoto::SmartPointer temp = reinterpret_cast< Gyoto::Astrobj::Generic * >(argp); $1 = Gyoto::Value(temp); } } if (!SWIG_IsOK(res)) { res=SWIG_ConvertPtr($input, &argp, SWIGTYPE_p_Gyoto__Spectrum__Generic, 0); if (SWIG_IsOK(res)) { Gyoto::SmartPointer temp = reinterpret_cast< Gyoto::Spectrum::Generic * >(argp); $1 = Gyoto::Value(temp); } } if (!SWIG_IsOK(res)) { res=SWIG_ConvertPtr($input, &argp, SWIGTYPE_p_Gyoto__Spectrometer__Generic, 0); if (SWIG_IsOK(res)) { Gyoto::SmartPointer temp = reinterpret_cast< Gyoto::Spectrometer::Generic * >(argp); $1 = Gyoto::Value(temp); } } if (!SWIG_IsOK(res)) { res=SWIG_ConvertPtr($input, &argp, SWIGTYPE_p_Gyoto__Screen, 0); if (SWIG_IsOK(res)) { Gyoto::SmartPointer temp = reinterpret_cast< Gyoto::Screen * >(argp); $1 = Gyoto::Value(temp); } } if (!SWIG_IsOK(res)) { std::string *temp = 0; res = SWIG_AsPtr_std_string ($input, &temp) ; if (SWIG_IsOK(res)) $1 = Gyoto::Value(*temp); if (SWIG_IsNewObj(res) && temp) delete temp; } if (!SWIG_IsOK(res)) { std::vector *temp=0; res = swig::traits_asptr< std::vector >::asptr($input, &temp); if (SWIG_IsOK(res)) $1 = Gyoto::Value(*temp); if (SWIG_IsNewObj(res) && temp) delete temp; } if (!SWIG_IsOK(res)) { std::vector *temp=0; res = swig::traits_asptr< std::vector >::asptr($input, &temp); if (SWIG_IsOK(res)) $1 = Gyoto::Value(*temp); if (SWIG_IsNewObj(res) && temp) delete temp; } if (!SWIG_IsOK(res)) { long temp=0; res = SWIG_AsVal(long)($input, &temp); if (SWIG_IsOK(res)) $1 = Gyoto::Value(temp); } if (!SWIG_IsOK(res)) { double temp=0; res = SWIG_AsVal(double)($input, &temp); if (SWIG_IsOK(res)) $1 = Gyoto::Value(temp); } if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ArgError(res), "argument of type 'Gyoto::Value*'"); } // Typecheck: should be debugged, does not seem to filter anything %typemap(typecheck) Gyoto::Value { void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Gyoto__Value, 0); $1 = res; } // Out: cast from Gyoto::Value to language-specific representation // for each sub-type. %typemap(out) Gyoto::Value { switch ($1.type) { case Gyoto::Property::unsigned_long_t: $result = SWIG_From_unsigned_SS_long((unsigned long)($1)); break; case Gyoto::Property::long_t: $result = SWIG_From_long(long($1)); break; case Gyoto::Property::bool_t: $result = SWIG_From_bool(bool($1)); break; case Gyoto::Property::double_t: $result = SWIG_From_double(double($1)); break; case Gyoto::Property::filename_t: case Gyoto::Property::string_t: $result = SWIG_From_std_string(static_cast< std::string >($1)); break; case Gyoto::Property::vector_double_t: $result = swig::from(($1).operator std::vector()); break; case Gyoto::Property::vector_unsigned_long_t: $result = swig::from(($1).operator std::vector()); break; case Gyoto::Property::metric_t: { Gyoto::Metric::Generic* normal_pointer=(Gyoto::Metric::Generic *) (Gyoto::SmartPointer($1)); if (normal_pointer) normal_pointer->incRefCount(); $result = SWIG_NewPointerObj( normal_pointer, SWIGTYPE_p_Gyoto__Metric__Generic, SWIG_POINTER_OWN | 0 ); } break; case Gyoto::Property::astrobj_t: { Gyoto::Astrobj::Generic* normal_pointer=(Gyoto::Astrobj::Generic *) (Gyoto::SmartPointer($1)); if (normal_pointer) normal_pointer->incRefCount(); $result = SWIG_NewPointerObj( normal_pointer, SWIGTYPE_p_Gyoto__Astrobj__Generic, SWIG_POINTER_OWN | 0 ); } break; case Gyoto::Property::spectrum_t: { Gyoto::Spectrum::Generic* normal_pointer=(Gyoto::Spectrum::Generic *) (Gyoto::SmartPointer($1)); if (normal_pointer) normal_pointer->incRefCount(); $result = SWIG_NewPointerObj( normal_pointer, SWIGTYPE_p_Gyoto__Spectrum__Generic, SWIG_POINTER_OWN | 0 ); } break; case Gyoto::Property::spectrometer_t: { Gyoto::Spectrometer::Generic* normal_pointer=(Gyoto::Spectrometer::Generic *) (Gyoto::SmartPointer($1)); if (normal_pointer) normal_pointer->incRefCount(); $result = SWIG_NewPointerObj( normal_pointer, SWIGTYPE_p_Gyoto__Spectrometer__Generic, SWIG_POINTER_OWN | 0 ); } break; case Gyoto::Property::screen_t: { Gyoto::Screen* normal_pointer=(Gyoto::Screen *) (Gyoto::SmartPointer($1)); if (normal_pointer) normal_pointer->incRefCount(); $result = SWIG_NewPointerObj( normal_pointer, SWIGTYPE_p_Gyoto__Screen, SWIG_POINTER_OWN | 0 ); } break; default: $result = SWIG_NewPointerObj((new Gyoto::Value(static_cast< const Gyoto::Value& >($1))), SWIGTYPE_p_Gyoto__Value, SWIG_POINTER_OWN | 0 ); } } // Non-Gyoto typemaps: // Handle std::string %include "std_string.i"; // Handle std::vector and %include "std_vector.i"; %template(vector_string) std::vector; %template(vector_double) std::vector; %{ typedef unsigned long unsignedlong; %} %template(vector_unsigned_long) std::vector; #ifdef SWIGPYTHON // Handle some arrays as NumPy arrays %include "numpy.i"; %numpy_typemaps(size_t, NPY_ULONG , size_t); %numpy_typemaps(double, NPY_DOUBLE, size_t); #endif // Handle generic C arrays using a class-like interface %include "carrays.i" %array_class(double, array_double); %array_class(size_t, array_size_t); %array_class(unsigned long, array_unsigned_long); #ifdef SWIGPYTHON // Provide conversion between generic C arrays and NumPy ndarrays %define ExtendArrayNumPy(name, type) %extend name { static name* fromnumpy1(type* IN_ARRAY1, size_t DIM1) { return static_cast< name * >(IN_ARRAY1); } static name* fromnumpy2(type* IN_ARRAY2, size_t DIM1, size_t DIM2) { return static_cast< name * >(IN_ARRAY2); } static name* fromnumpy3(type* IN_ARRAY3, size_t DIM1, size_t DIM2, size_t DIM3) { return static_cast< name * >(IN_ARRAY3); } static name* fromnumpy4(type* IN_ARRAY4, size_t DIM1, size_t DIM2, size_t DIM3, size_t DIM4) { return static_cast< name * >(IN_ARRAY4); } }; %enddef ExtendArrayNumPy(array_double, double); ExtendArrayNumPy(array_unsigned_long, unsigned long); ExtendArrayNumPy(array_size_t, size_t); #endif %apply (double * IN_ARRAY1, size_t DIM1) {(double * dates, size_t n_dates)}; %apply (double * IN_ARRAY1, size_t DIM1) {(double const * cst, size_t const ncsts)}; %apply (double * INPLACE_ARRAY1, size_t DIM1) {(double * x1dest, size_t n1)}; %apply (double * INPLACE_ARRAY1, size_t DIM1) {(double * x2dest, size_t n2)}; %apply (double * INPLACE_ARRAY1, size_t DIM1) {(double * x3dest, size_t n3)}; %apply (double * INPLACE_ARRAY1, size_t DIM1) {(double * x0dot, size_t n0d)}; %apply (double * INPLACE_ARRAY1, size_t DIM1) {(double * x1dot, size_t n1d)}; %apply (double * INPLACE_ARRAY1, size_t DIM1) {(double * x2dot, size_t n2d)}; %apply (double * INPLACE_ARRAY1, size_t DIM1) {(double * x3dot, size_t n3d)}; // Handle all const arrays of fixed size as NumPy IN_ARRAYs %apply (double IN_ARRAY1[ANY]) {(const double [ANY])}; %apply (double IN_ARRAY2[ANY][ANY]) {(const double [ANY][ANY])}; %apply (double IN_ARRAY3[ANY][ANY][ANY]) {(const double [ANY][ANY][ANY])}; %apply (double IN_ARRAY4[ANY][ANY][ANY][ANY]) {(const double [ANY][ANY][ANY][ANY])}; // Handle all non-const arrays of fixed size as INPLACE. %apply (double INPLACE_ARRAY1[ANY]) {(double [ANY])}; %apply (double INPLACE_ARRAY2[ANY][ANY]) {(double [ANY][ANY])}; %apply (double INPLACE_ARRAY3[ANY][ANY][ANY]) {(double [ANY][ANY][ANY])}; %apply (double INPLACE_ARRAY4[ANY][ANY][ANY][ANY]) {(double [ANY][ANY][ANY][ANY])}; %apply (double ARGOUT_ARRAY1[ANY]) {(double ARGOUT_ARRAY1_1[ANY])} %apply (double ARGOUT_ARRAY1[ANY]) {(double ARGOUT_ARRAY1_2[ANY])} %apply (double ARGOUT_ARRAY1[ANY]) {(double ARGOUT_ARRAY1_3[ANY])} %apply (double ARGOUT_ARRAY1[ANY]) {(double ARGOUT_ARRAY1_4[ANY])} // ******** INTERFACE ******** // // Here starts the actual parsing of the various header files // Expose the build-time configuration variables %include "GyotoConfig.h" // Expose the global definitions and typedefs %include "GyotoDefs.h" // Expose the Gyoto::Error class %extend Gyoto::Error { const char *__str__() { return *($self); } }; %exceptionclass Gyoto::Error ; %include "GyotoError.h" // Expose the SmartPointer API %ignore Gyoto::SmartPointer::operator(); %rename(assign) Gyoto::SmartPointer::operator=; %include "GyotoSmartPointer.h" // Expose Gyoto::Register::list as gyoto.listRegister %rename(RegisterEntry) Gyoto::Register::Entry; %rename(initRegister) Gyoto::Register::init; %rename(listRegister) Gyoto::Register::list; %include GyotoRegister.h %rename(Functor__Double_constDoubleArray) Gyoto::Functor::Double_constDoubleArray; %rename(Functor__Double_Double_const) Gyoto::Functor::Double_Double_const; %include "GyotoFunctors.h" %include "GyotoHooks.h" %include "GyotoWIP.h" %immutable Gyoto::Value::type; %rename(assign) Gyoto::Value::operator=; %rename(toDouble) Gyoto::Value::operator double; %rename(toLong) Gyoto::Value::operator long; %rename(toULong) Gyoto::Value::operator unsigned long; %extend Gyoto::Value {size_t toSizeT() {return size_t(*$self);}}; %rename(toString) Gyoto::Value::operator std::string; %rename(toVDouble) Gyoto::Value::operator std::vector; %extend Gyoto::Value { std::vector toVULong() {return ($self)->operator std::vector();} }; %rename(toMetric) Gyoto::Value::operator Gyoto::SmartPointer; %rename(toAstrobj) Gyoto::Value::operator Gyoto::SmartPointer; %rename(toSpectrum) Gyoto::Value::operator Gyoto::SmartPointer; %rename(toSpectrometer) Gyoto::Value::operator Gyoto::SmartPointer; %rename(toScreen) Gyoto::Value::operator Gyoto::SmartPointer; %include "GyotoValue.h" %include "GyotoObject.h" %rename(Worldline__IntegState__Generic) Gyoto::Worldline::IntegState::Generic; %rename(Worldline__IntegState__Boost) Gyoto::Worldline::IntegState::Boost; %rename(Worldline__IntegState__Legacy) Gyoto::Worldline::IntegState::Legacy; %ignore Gyoto::Worldline::getCoord(double const * const dates, size_t const n_dates, double * const x1dest, double * const x2dest, double * const x3dest, double * const x0dot=NULL, double * const x1dot=NULL, double * const x2dot=NULL, double * const x3dot=NULL) ; %extend Gyoto::Worldline { void get_t(double * INPLACE_ARRAY1, size_t DIM1) { if (DIM1 != ($self)->get_nelements()) throwError("wrong output array size"); ($self)->get_t(INPLACE_ARRAY1); } void getCoord(double * dates, size_t n_dates, double * x1dest, size_t n1, double * x2dest, size_t n2, double * x3dest, size_t n3, double * x0dot, size_t n0d, double * x1dot, size_t n1d, double * x2dot, size_t n2d, double * x3dot, size_t n3d) { if (n1 != n_dates || n2 != n_dates || n3 != n_dates || (x0dot && n0d != n_dates) || (x1dot && n1d != n_dates) || (x2dot && n2d != n_dates) || (x3dot && n3d != n_dates)) throwError("wrong size for output array"); ($self)->getCoord(dates, n_dates, x1dest, x2dest, x3dest, x0dot, x1dot, x2dot, x3dot); } void getCartesian(double * dates, size_t n_dates, double * x1dest, size_t n1, double * x2dest, size_t n2, double * x3dest, size_t n3, double * x1dot, size_t n1d, double * x2dot, size_t n2d, double * x3dot, size_t n3d) { if (n1 != n_dates || n2 != n_dates || n3 != n_dates || (x1dot && n1d != n_dates) || (x2dot && n2d != n_dates) || (x3dot && n3d != n_dates)) throwError("wrong size for output array"); ($self)->getCartesian(dates, n_dates, x1dest, x2dest, x3dest, x1dot, x2dot, x3dot); } void getCoord(double * dates, size_t n_dates, double * x1dest, size_t n1, double * x2dest, size_t n2, double * x3dest, size_t n3) { if (n_dates != ($self)->get_nelements() || n1 != n_dates || n2 != n_dates || n3 != n_dates) throwError("wrong size for output array"); ($self)->getCoord(dates, x1dest, x2dest, x3dest); } void get_xyz( double * x1dest, size_t n1, double * x2dest, size_t n2, double * x3dest, size_t n3) { if (n1 != ($self)->get_nelements() || n2 != n1 || n3 != n1) throwError("wrong size for output array"); ($self)->get_xyz(x1dest, x2dest, x3dest); } void getSkyPos(SmartPointer screen, double * x1dest, size_t n1, double * x2dest, size_t n2, double * x3dest, size_t n3) { if (n1 != ($self)->get_nelements() || n2 != n1 || n3 != n1) throwError("wrong size for output array"); ($self)->getSkyPos(screen, x1dest, x2dest, x3dest); } void get_dot(double * x0dot, size_t n0d, double * x1dot, size_t n1d, double * x2dot, size_t n2d, double * x3dot, size_t n3d) { if (n0d != ($self)->get_nelements() || n1d != n0d || n2d != n0d || n3d != n0d) throwError("wrong size for output array"); ($self)->get_dot(x0dot, x1dot, x2dot, x3dot); } void get_prime( double * x1dot, size_t n1d, double * x2dot, size_t n2d, double * x3dot, size_t n3d) { if (n1d != ($self)->get_nelements() || n2d != n1d || n3d != n1d) throwError("wrong size for output array"); ($self)->get_prime(x1dot, x2dot, x3dot); } // support this syntax: // vel = gg.circularVelocity(pos) // in addition of gg.circularVelocity(pos, vel) void getInitialCoord(double ARGOUT_ARRAY1[8]) { ($self)->getInitialCoord(ARGOUT_ARRAY1); } void getCoord(size_t index, double ARGOUT_ARRAY1[8]) { ($self)->getCoord(index, ARGOUT_ARRAY1); } void getCartesianPos(size_t index, double ARGOUT_ARRAY1[8]) { ($self)->getCartesianPos(index, ARGOUT_ARRAY1); } }; %include "GyotoWorldline.h" GyotoSmPtrClass(Screen) GyotoSmPtrClass(Scenery) %ignore Gyoto::Photon::Refined; GyotoSmPtrClass(Photon) %rename(AstrobjProperties) Gyoto::Astrobj::Properties; GyotoSmPtrClassGeneric(Astrobj) GyotoSmPtrClassDerived(Astrobj, ThinDisk) %ignore Gyoto::Astrobj::Standard::Standard(); %ignore Gyoto::Astrobj::Standard::Standard(double radmax); %ignore Gyoto::Astrobj::Standard::Standard(std::string kind); %ignore Gyoto::Astrobj::Standard::Standard(const Standard& ); GyotoSmPtrClassDerivedPtrHdr(Astrobj, Standard, StandardAstrobj, GyotoStandardAstrobj.h) %define _PConverter(member, method) Gyoto::Units::Converter * method() { Gyoto::Units::Converter * res = $self->member; if (res) res -> incRefCount(); return res; } %enddef %extend Gyoto::Astrobj::Properties{ _PConverter(binspectrum_converter_, binSpectrumConverter) _PConverter(intensity_converter_, intensityConverter) _PConverter(spectrum_converter_, spectrumConverter) }; %extend Gyoto::Metric::Generic { // Support this syntax: // vel = gg.circularVelocity(pos) // in addition of gg.circularVelocity(pos, vel) // Same for gmunu and christoffel void circularVelocity(double const IN_ARRAY1[4], double ARGOUT_ARRAY1[4]) { ($self)->circularVelocity(IN_ARRAY1, ARGOUT_ARRAY1); } void gmunu(double ARGOUT_ARRAY2[4][4], double const IN_ARRAY1[4]) { ($self)->gmunu(ARGOUT_ARRAY2, IN_ARRAY1); } void christoffel(double ARGOUT_ARRAY3[4][4][4], double const IN_ARRAY1[4]) { ($self)->christoffel(ARGOUT_ARRAY3, IN_ARRAY1); } void observerTetrad(std::string const obskind, double const IN_ARRAY1[4], double ARGOUT_ARRAY1_1[4], double ARGOUT_ARRAY1_2[4], double ARGOUT_ARRAY1_3[4], double ARGOUT_ARRAY1_4[4]) const { ($self)-> observerTetrad(obskind, IN_ARRAY1, ARGOUT_ARRAY1_1, ARGOUT_ARRAY1_2, ARGOUT_ARRAY1_3, ARGOUT_ARRAY1_4); } }; GyotoSmPtrClassGeneric(Metric) GyotoSmPtrClassGeneric(Spectrum) GyotoSmPtrClassGeneric(Spectrometer) %extend Gyoto::Spectrometer::Complex { Gyoto::Spectrometer::Generic * __getitem__ (int i) { Gyoto::Spectrometer::Generic * res = ($self)->operator[](i); if (res) res -> incRefCount(); return res; } }; %extend Gyoto::Spectrometer::Complex { void __setitem__(int i, Gyoto::Spectrometer::Generic * p) { ($self)->operator[](i)=p; } }; GyotoSmPtrClassDerivedPtrHdr(Spectrometer, Complex, ComplexSpectrometer, GyotoComplexSpectrometer.h) GyotoSmPtrClassDerivedPtrHdr(Spectrometer, Uniform, UniformSpectrometer, GyotoUniformSpectrometer.h) %include "GyotoConfig.h" %include "GyotoUtils.h" %include "GyotoFactory.h" %include "GyotoFactoryMessenger.h" // SWIG fails on nested classes. Work around this limitation: %{ typedef Gyoto::Screen::CoordType_e CoordType_e; typedef Gyoto::Screen::Coord1dSet Coord1dSet; typedef Gyoto::Screen::Coord2dSet Coord2dSet; typedef Gyoto::Screen::Grid Grid; typedef Gyoto::Screen::Bucket Bucket; typedef Gyoto::Screen::Empty Empty; typedef Gyoto::Screen::Range Range; typedef Gyoto::Screen::Indices Indices; typedef Gyoto::Screen::Angles Angles; typedef Gyoto::Screen::RepeatAngle RepeatAngle; %} enum CoordType_e; #ifdef HAVE_BOOST_ARRAY_HPP namespace boost { template class array { public: T& operator[](size_t c) { return buf[c] ; } }; } #endif %extend GYOTO_ARRAY { T __getitem__(size_t c) { return $self->operator[](c); } }; %template(ARRAY_double_2) GYOTO_ARRAY; %template(ARRAY_size_t_2) GYOTO_ARRAY; class Coord1dSet { public: const CoordType_e kind; public: Coord1dSet(CoordType_e k); virtual void begin() =0; virtual bool valid() =0; virtual size_t size()=0; virtual size_t operator*() const ; virtual double angle() const ; virtual Coord1dSet& operator++()=0; }; class Coord2dSet { public: const CoordType_e kind; Coord2dSet(CoordType_e k); virtual Coord2dSet& operator++() =0; virtual GYOTO_ARRAY operator* () const; virtual GYOTO_ARRAY angles() const ; virtual void begin() =0; virtual bool valid() =0; virtual size_t size()=0; }; class Grid: public Coord2dSet { protected: protected: const char * const prefix_; Coord1dSet &iset_; Coord1dSet &jset_; public: Grid(Coord1dSet &iset, Coord1dSet &jset, const char * const p=NULL); virtual Coord2dSet& operator++(); virtual GYOTO_ARRAY operator* () const; virtual void begin(); virtual bool valid(); virtual size_t size(); }; class Bucket : public Coord2dSet { protected: Coord1dSet &alpha_; Coord1dSet &delta_; public: Bucket(Coord1dSet &iset, Coord1dSet &jset); virtual Coord2dSet& operator++(); virtual GYOTO_ARRAY angles() const; virtual GYOTO_ARRAY operator*() const; virtual void begin(); virtual bool valid(); virtual size_t size(); }; class Empty: public Coord2dSet { public: Empty(); virtual Coord2dSet& operator++(); virtual void begin(); virtual bool valid(); virtual size_t size(); }; class Range : public Coord1dSet { protected: const size_t mi_, ma_, d_, sz_; size_t cur_; public: Range(size_t mi, size_t ma, size_t d); void begin(); bool valid(); size_t size(); Coord1dSet& operator++(); size_t operator*() const ; }; class Indices : public Coord1dSet { protected: size_t const * const indices_; size_t const sz_; size_t i_; public: Indices (size_t *carray, size_t nel); void begin(); bool valid(); size_t size(); Coord1dSet& operator++(); size_t operator*() const ; }; %extend Indices { Indices (size_t DIM1, size_t *IN_ARRAY1) { return new Indices(IN_ARRAY1, DIM1); } } class Angles : public Coord1dSet { protected: double const * const buf_; size_t const sz_; size_t i_; public: Angles (double * carray, size_t nel); void begin(); bool valid(); size_t size(); Coord1dSet& operator++(); double angle() const ; }; %extend Angles { Angles (size_t DIM1, double *IN_ARRAY1) { return new Angles(IN_ARRAY1, DIM1); } } class RepeatAngle : public Coord1dSet { protected: double const val_; size_t const sz_; size_t i_; public: RepeatAngle (double val, size_t sz); void begin(); bool valid(); size_t size(); Coord1dSet& operator++(); double angle() const ; }; %ignore Gyoto::Property::Property; %include "GyotoProperty.h" %extend Gyoto::Units::Unit { const char *__str__() { return (std::string(*($self))).c_str(); } }; %include "GyotoConverters.h" // Workaround cvar bug in Swig which makes help(gyoto) fail: %inline { namespace Gyoto { extern int __class__=0; } } Gyoto-1.2.0/python/gyoto_lorene.i000066400000000000000000000024151302352257300170170ustar00rootroot00000000000000/* Copyright 2014-2015 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ %module(docstring="The Gyoto Lorene plug-in") gyoto_lorene %import gyoto.i %{ #define GYOTO_NO_DEPRECATED #include "gyoto_swig.h" #include "GyotoRotStar3_1.h" #include "GyotoNumericalMetricLorene.h" using namespace Gyoto; %} %array_class(double, array_double) %array_class(unsigned long, array_unsigned_long) %array_class(size_t, array_size_t) GyotoSmPtrClassDerived(Metric, RotStar3_1) GyotoSmPtrClassDerived(Metric, NumericalMetricLorene) // Workaround cvar bug in Swig which makes help(module) fail: %inline { namespace GyotoLorene { extern int __class__=0; } } Gyoto-1.2.0/python/gyoto_std.i000066400000000000000000000112541302352257300163260ustar00rootroot00000000000000/* Copyright 2014-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ %module(docstring="The Gyoto standard plug-in") gyoto_std %import gyoto.i %{ #define GYOTO_NO_DEPRECATED #include "gyoto_swig.h" #include "gyoto_std_swig.h" using namespace Gyoto; %} %array_class(double, array_double) %array_class(unsigned long, array_unsigned_long) %array_class(size_t, array_size_t) // Typemaps to translate SmartPointer to specific classes GyotoSmPtrTypeMapClassDerived(Astrobj, UniformSphere) GyotoSmPtrTypeMapClassDerived(Astrobj, Star) GyotoSmPtrTypeMapClassDerived(Astrobj, StarTrace) GyotoSmPtrTypeMapClassDerived(Astrobj, FixedStar) GyotoSmPtrTypeMapClassDerived(Astrobj, InflateStar) GyotoSmPtrTypeMapClassDerived(Astrobj, Torus) GyotoSmPtrTypeMapClassDerived(Astrobj, OscilTorus) GyotoSmPtrTypeMapClassDerived(Astrobj, PageThorneDisk) GyotoSmPtrTypeMapClassDerived(Astrobj, ThinDiskPL) GyotoSmPtrTypeMapClassDerived(Astrobj, PolishDoughnut) GyotoSmPtrTypeMapClassDerived(Astrobj, ThinDiskIronLine) GyotoSmPtrTypeMapClassDerived(Astrobj, PatternDisk) GyotoSmPtrTypeMapClassDerived(Astrobj, PatternDiskBB) GyotoSmPtrTypeMapClassDerived(Astrobj, DynamicalDisk) GyotoSmPtrTypeMapClassDerived(Astrobj, DynamicalDiskBolometric) GyotoSmPtrTypeMapClassDerived(Astrobj, Disk3D) GyotoSmPtrTypeMapClassDerived(Astrobj, DynamicalDisk3D) GyotoSmPtrTypeMapClassDerived(Astrobj, DirectionalDisk) GyotoSmPtrTypeMapClassDerived(Astrobj, DeformedTorus) GyotoSmPtrTypeMapClassDerived(Astrobj, EquatorialHotSpot) GyotoSmPtrTypeMapClassDerived(Metric, KerrBL) GyotoSmPtrTypeMapClassDerived(Metric, KerrKS) GyotoSmPtrTypeMapClassDerived(Metric, Minkowski) GyotoSmPtrTypeMapClassDerived(Metric, ChernSimons) GyotoSmPtrTypeMapClassDerived(Metric, RezzollaZhidenko) GyotoSmPtrTypeMapClassDerived(Spectrum, PowerLaw) GyotoSmPtrTypeMapClassDerived(Spectrum, BlackBody) GyotoSmPtrTypeMapClassDerived(Spectrum, ThermalBremsstrahlung) %ignore Gyoto::Astrobj::UniformSphere::UniformSphere (std::string kind, SmartPointer gg, double radius); %ignore Gyoto::Astrobj::UniformSphere::UniformSphere (std::string kind); %ignore Gyoto::Astrobj::UniformSphere::UniformSphere (const UniformSphere& orig); GyotoSmPtrClassDerived(Astrobj, UniformSphere) %extend Gyoto::Astrobj::Complex { Gyoto::Astrobj::Generic * __getitem__ (int i) { Gyoto::Astrobj::Generic * res = ($self)->operator[](i); res -> incRefCount(); return res; } }; %extend Gyoto::Astrobj::Complex { void __setitem__(int i, Gyoto::Astrobj::Generic * p) { ($self)->operator[](i)=p; } }; GyotoSmPtrClassDerivedPtrHdr(Astrobj, Complex, ComplexAstrobj, GyotoComplexAstrobj.h) // Declare specific classes GyotoSmPtrClassDerived(Astrobj, Star) GyotoSmPtrClassDerived(Astrobj, StarTrace) GyotoSmPtrClassDerived(Astrobj, FixedStar) GyotoSmPtrClassDerived(Astrobj, InflateStar) GyotoSmPtrClassDerived(Astrobj, Torus) GyotoSmPtrClassDerived(Astrobj, OscilTorus) GyotoSmPtrClassDerived(Astrobj, PageThorneDisk) GyotoSmPtrClassDerived(Astrobj, ThinDiskPL) GyotoSmPtrClassDerived(Astrobj, PolishDoughnut) GyotoSmPtrClassDerived(Astrobj, ThinDiskIronLine) GyotoSmPtrClassDerived(Astrobj, PatternDisk) GyotoSmPtrClassDerived(Astrobj, PatternDiskBB) GyotoSmPtrClassDerived(Astrobj, DynamicalDisk) GyotoSmPtrClassDerived(Astrobj, DynamicalDiskBolometric) GyotoSmPtrClassDerived(Astrobj, Disk3D) GyotoSmPtrClassDerived(Astrobj, DynamicalDisk3D) GyotoSmPtrClassDerived(Astrobj, DirectionalDisk) GyotoSmPtrClassDerived(Astrobj, DeformedTorus) GyotoSmPtrClassDerived(Astrobj, EquatorialHotSpot) GyotoSmPtrClassDerived(Metric, KerrBL) GyotoSmPtrClassDerived(Metric, KerrKS) GyotoSmPtrClassDerived(Metric, Minkowski) GyotoSmPtrClassDerived(Metric, ChernSimons) GyotoSmPtrClassDerived(Metric, RezzollaZhidenko) GyotoSmPtrClassDerivedHdr(Spectrum, PowerLaw, GyotoPowerLawSpectrum.h) GyotoSmPtrClassDerivedHdr(Spectrum, BlackBody, GyotoBlackBodySpectrum.h) GyotoSmPtrClassDerivedHdr(Spectrum, ThermalBremsstrahlung, GyotoThermalBremsstrahlungSpectrum.h) // Workaround cvar bug in Swig which makes help(gyoto_std) fail: %inline { namespace GyotoStd { extern int __class__=0; } } Gyoto-1.2.0/python/gyoto_std_swig.h000066400000000000000000000017421302352257300173570ustar00rootroot00000000000000// include Metric headers #include "GyotoKerrBL.h" #include "GyotoKerrKS.h" #include "GyotoMinkowski.h" #include "GyotoChernSimons.h" #include "GyotoRezzollaZhidenko.h" // include Astrobj headers #include "GyotoComplexAstrobj.h" #include "GyotoStar.h" #include "GyotoStarTrace.h" #include "GyotoFixedStar.h" #include "GyotoInflateStar.h" #include "GyotoTorus.h" #include "GyotoOscilTorus.h" #include "GyotoThinDisk.h" #include "GyotoPageThorneDisk.h" #include "GyotoThinDiskPL.h" #include "GyotoPolishDoughnut.h" #include "GyotoThinDiskIronLine.h" #include "GyotoPatternDisk.h" #include "GyotoPatternDiskBB.h" #include "GyotoDynamicalDisk.h" #include "GyotoDynamicalDiskBolometric.h" #include "GyotoDisk3D.h" #include "GyotoDynamicalDisk3D.h" #include "GyotoDirectionalDisk.h" #include "GyotoDeformedTorus.h" #include "GyotoEquatorialHotSpot.h" // include Spectrum headers #include "GyotoPowerLawSpectrum.h" #include "GyotoBlackBodySpectrum.h" #include "GyotoThermalBremsstrahlungSpectrum.h" Gyoto-1.2.0/python/gyoto_swig.h000066400000000000000000000012671302352257300165070ustar00rootroot00000000000000#include "GyotoConfig.h" #include "GyotoDefs.h" #include "GyotoFactory.h" #include "GyotoFactoryMessenger.h" #include "GyotoValue.h" #include "GyotoProperty.h" #include "GyotoObject.h" #include "GyotoAstrobj.h" #include "GyotoError.h" #include "GyotoWorldline.h" #include "GyotoPhoton.h" #include "GyotoScreen.h" #include "GyotoThinDisk.h" #include "GyotoStandardAstrobj.h" #include "GyotoSpectrometer.h" #include "GyotoComplexSpectrometer.h" #include "GyotoUniformSpectrometer.h" #include "GyotoRegister.h" #include "GyotoWIP.h" #include "GyotoConverters.h" #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #include swig_type_info * __Gyoto_SWIGTYPE_p_Gyoto__Error() ; Gyoto-1.2.0/python/header.py000066400000000000000000000004611302352257300157410ustar00rootroot00000000000000# -*- coding: utf-8 -*- """ The General relativitY Orbit Tracer of paris Observatory """ # This is necessary at least on Linux to let the libgyoto symbols be # visible from the libgyoto-stdplug (and other plug-ins) symbols. import sys, ctypes sys.setdlopenflags(sys.getdlopenflags() | ctypes.RTLD_GLOBAL) Gyoto-1.2.0/python/numpy.i000066400000000000000000003213041302352257300154630ustar00rootroot00000000000000/* -*- C -*- (not really, but good for syntax highlighting) */ /* * Copyright (c) 2005-2015, NumPy Developers. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * * Neither the name of the NumPy Developers nor the names of any * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifdef SWIGPYTHON %{ #ifndef SWIG_FILE_WITH_INIT #define NO_IMPORT_ARRAY #endif #include "stdio.h" #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #include %} /**********************************************************************/ %fragment("NumPy_Backward_Compatibility", "header") { %#if NPY_API_VERSION < 0x00000007 %#define NPY_ARRAY_DEFAULT NPY_DEFAULT %#define NPY_ARRAY_FARRAY NPY_FARRAY %#define NPY_FORTRANORDER NPY_FORTRAN %#endif } /**********************************************************************/ /* The following code originally appeared in * enthought/kiva/agg/src/numeric.i written by Eric Jones. It was * translated from C++ to C by John Hunter. Bill Spotz has modified * it to fix some minor bugs, upgrade from Numeric to numpy (all * versions), add some comments and functionality, and convert from * direct code insertion to SWIG fragments. */ %fragment("NumPy_Macros", "header") { /* Macros to extract array attributes. */ %#if NPY_API_VERSION < 0x00000007 %#define is_array(a) ((a) && PyArray_Check((PyArrayObject*)a)) %#define array_type(a) (int)(PyArray_TYPE((PyArrayObject*)a)) %#define array_numdims(a) (((PyArrayObject*)a)->nd) %#define array_dimensions(a) (((PyArrayObject*)a)->dimensions) %#define array_size(a,i) (((PyArrayObject*)a)->dimensions[i]) %#define array_strides(a) (((PyArrayObject*)a)->strides) %#define array_stride(a,i) (((PyArrayObject*)a)->strides[i]) %#define array_data(a) (((PyArrayObject*)a)->data) %#define array_descr(a) (((PyArrayObject*)a)->descr) %#define array_flags(a) (((PyArrayObject*)a)->flags) %#define array_enableflags(a,f) (((PyArrayObject*)a)->flags) = f %#else %#define is_array(a) ((a) && PyArray_Check(a)) %#define array_type(a) PyArray_TYPE((PyArrayObject*)a) %#define array_numdims(a) PyArray_NDIM((PyArrayObject*)a) %#define array_dimensions(a) PyArray_DIMS((PyArrayObject*)a) %#define array_strides(a) PyArray_STRIDES((PyArrayObject*)a) %#define array_stride(a,i) PyArray_STRIDE((PyArrayObject*)a,i) %#define array_size(a,i) PyArray_DIM((PyArrayObject*)a,i) %#define array_data(a) PyArray_DATA((PyArrayObject*)a) %#define array_descr(a) PyArray_DESCR((PyArrayObject*)a) %#define array_flags(a) PyArray_FLAGS((PyArrayObject*)a) %#define array_enableflags(a,f) PyArray_ENABLEFLAGS((PyArrayObject*)a,f) %#endif %#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS((PyArrayObject*)a)) %#define array_is_native(a) (PyArray_ISNOTSWAPPED((PyArrayObject*)a)) %#define array_is_fortran(a) (PyArray_ISFORTRAN((PyArrayObject*)a)) } /**********************************************************************/ %fragment("NumPy_Utilities", "header") { /* Given a PyObject, return a string describing its type. */ const char* pytype_string(PyObject* py_obj) { if (py_obj == NULL ) return "C NULL value"; if (py_obj == Py_None ) return "Python None" ; if (PyCallable_Check(py_obj)) return "callable" ; if (PyString_Check( py_obj)) return "string" ; if (PyInt_Check( py_obj)) return "int" ; if (PyFloat_Check( py_obj)) return "float" ; if (PyDict_Check( py_obj)) return "dict" ; if (PyList_Check( py_obj)) return "list" ; if (PyTuple_Check( py_obj)) return "tuple" ; %#if PY_MAJOR_VERSION < 3 if (PyFile_Check( py_obj)) return "file" ; if (PyModule_Check( py_obj)) return "module" ; if (PyInstance_Check(py_obj)) return "instance" ; %#endif return "unknown type"; } /* Given a NumPy typecode, return a string describing the type. */ const char* typecode_string(int typecode) { static const char* type_names[25] = {"bool", "byte", "unsigned byte", "short", "unsigned short", "int", "unsigned int", "long", "unsigned long", "long long", "unsigned long long", "float", "double", "long double", "complex float", "complex double", "complex long double", "object", "string", "unicode", "void", "ntypes", "notype", "char", "unknown"}; return typecode < 24 ? type_names[typecode] : type_names[24]; } /* Make sure input has correct numpy type. This now just calls PyArray_EquivTypenums(). */ int type_match(int actual_type, int desired_type) { return PyArray_EquivTypenums(actual_type, desired_type); } %#ifdef SWIGPY_USE_CAPSULE void free_cap(PyObject * cap) { void* array = (void*) PyCapsule_GetPointer(cap,SWIGPY_CAPSULE_NAME); if (array != NULL) free(array); } %#endif } /**********************************************************************/ %fragment("NumPy_Object_to_Array", "header", fragment="NumPy_Backward_Compatibility", fragment="NumPy_Macros", fragment="NumPy_Utilities") { /* Given a PyObject pointer, cast it to a PyArrayObject pointer if * legal. If not, set the python error string appropriately and * return NULL. */ PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode) { PyArrayObject* ary = NULL; if (is_array(input) && (typecode == NPY_NOTYPE || PyArray_EquivTypenums(array_type(input), typecode))) { ary = (PyArrayObject*) input; } else if is_array(input) { const char* desired_type = typecode_string(typecode); const char* actual_type = typecode_string(array_type(input)); PyErr_Format(PyExc_TypeError, "Array of type '%s' required. Array of type '%s' given", desired_type, actual_type); ary = NULL; } else { const char* desired_type = typecode_string(typecode); const char* actual_type = pytype_string(input); PyErr_Format(PyExc_TypeError, "Array of type '%s' required. A '%s' was given", desired_type, actual_type); ary = NULL; } return ary; } /* Convert the given PyObject to a NumPy array with the given * typecode. On success, return a valid PyArrayObject* with the * correct type. On failure, the python error string will be set and * the routine returns NULL. */ PyArrayObject* obj_to_array_allow_conversion(PyObject* input, int typecode, int* is_new_object) { PyArrayObject* ary = NULL; PyObject* py_obj; if (is_array(input) && (typecode == NPY_NOTYPE || PyArray_EquivTypenums(array_type(input),typecode))) { ary = (PyArrayObject*) input; *is_new_object = 0; } else { py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_ARRAY_DEFAULT); /* If NULL, PyArray_FromObject will have set python error value.*/ ary = (PyArrayObject*) py_obj; *is_new_object = 1; } return ary; } /* Given a PyArrayObject, check to see if it is contiguous. If so, * return the input pointer and flag it as not a new object. If it is * not contiguous, create a new PyArrayObject using the original data, * flag it as a new object and return the pointer. */ PyArrayObject* make_contiguous(PyArrayObject* ary, int* is_new_object, int min_dims, int max_dims) { PyArrayObject* result; if (array_is_contiguous(ary)) { result = ary; *is_new_object = 0; } else { result = (PyArrayObject*) PyArray_ContiguousFromObject((PyObject*)ary, array_type(ary), min_dims, max_dims); *is_new_object = 1; } return result; } /* Given a PyArrayObject, check to see if it is Fortran-contiguous. * If so, return the input pointer, but do not flag it as not a new * object. If it is not Fortran-contiguous, create a new * PyArrayObject using the original data, flag it as a new object * and return the pointer. */ PyArrayObject* make_fortran(PyArrayObject* ary, int* is_new_object) { PyArrayObject* result; if (array_is_fortran(ary)) { result = ary; *is_new_object = 0; } else { Py_INCREF(array_descr(ary)); result = (PyArrayObject*) PyArray_FromArray(ary, array_descr(ary), NPY_FORTRANORDER); *is_new_object = 1; } return result; } /* Convert a given PyObject to a contiguous PyArrayObject of the * specified type. If the input object is not a contiguous * PyArrayObject, a new one will be created and the new object flag * will be set. */ PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input, int typecode, int* is_new_object) { int is_new1 = 0; int is_new2 = 0; PyArrayObject* ary2; PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode, &is_new1); if (ary1) { ary2 = make_contiguous(ary1, &is_new2, 0, 0); if ( is_new1 && is_new2) { Py_DECREF(ary1); } ary1 = ary2; } *is_new_object = is_new1 || is_new2; return ary1; } /* Convert a given PyObject to a Fortran-ordered PyArrayObject of the * specified type. If the input object is not a Fortran-ordered * PyArrayObject, a new one will be created and the new object flag * will be set. */ PyArrayObject* obj_to_array_fortran_allow_conversion(PyObject* input, int typecode, int* is_new_object) { int is_new1 = 0; int is_new2 = 0; PyArrayObject* ary2; PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode, &is_new1); if (ary1) { ary2 = make_fortran(ary1, &is_new2); if (is_new1 && is_new2) { Py_DECREF(ary1); } ary1 = ary2; } *is_new_object = is_new1 || is_new2; return ary1; } } /* end fragment */ /**********************************************************************/ %fragment("NumPy_Array_Requirements", "header", fragment="NumPy_Backward_Compatibility", fragment="NumPy_Macros") { /* Test whether a python object is contiguous. If array is * contiguous, return 1. Otherwise, set the python error string and * return 0. */ int require_contiguous(PyArrayObject* ary) { int contiguous = 1; if (!array_is_contiguous(ary)) { PyErr_SetString(PyExc_TypeError, "Array must be contiguous. A non-contiguous array was given"); contiguous = 0; } return contiguous; } /* Require that a numpy array is not byte-swapped. If the array is * not byte-swapped, return 1. Otherwise, set the python error string * and return 0. */ int require_native(PyArrayObject* ary) { int native = 1; if (!array_is_native(ary)) { PyErr_SetString(PyExc_TypeError, "Array must have native byteorder. " "A byte-swapped array was given"); native = 0; } return native; } /* Require the given PyArrayObject to have a specified number of * dimensions. If the array has the specified number of dimensions, * return 1. Otherwise, set the python error string and return 0. */ int require_dimensions(PyArrayObject* ary, int exact_dimensions) { int success = 1; if (array_numdims(ary) != exact_dimensions) { PyErr_Format(PyExc_TypeError, "Array must have %d dimensions. Given array has %d dimensions", exact_dimensions, array_numdims(ary)); success = 0; } return success; } /* Require the given PyArrayObject to have one of a list of specified * number of dimensions. If the array has one of the specified number * of dimensions, return 1. Otherwise, set the python error string * and return 0. */ int require_dimensions_n(PyArrayObject* ary, int* exact_dimensions, int n) { int success = 0; int i; char dims_str[255] = ""; char s[255]; for (i = 0; i < n && !success; i++) { if (array_numdims(ary) == exact_dimensions[i]) { success = 1; } } if (!success) { for (i = 0; i < n-1; i++) { sprintf(s, "%d, ", exact_dimensions[i]); strcat(dims_str,s); } sprintf(s, " or %d", exact_dimensions[n-1]); strcat(dims_str,s); PyErr_Format(PyExc_TypeError, "Array must have %s dimensions. Given array has %d dimensions", dims_str, array_numdims(ary)); } return success; } /* Require the given PyArrayObject to have a specified shape. If the * array has the specified shape, return 1. Otherwise, set the python * error string and return 0. */ int require_size(PyArrayObject* ary, npy_intp* size, int n) { int i; int success = 1; int len; char desired_dims[255] = "["; char s[255]; char actual_dims[255] = "["; for(i=0; i < n;i++) { if (size[i] != -1 && size[i] != array_size(ary,i)) { success = 0; } } if (!success) { for (i = 0; i < n; i++) { if (size[i] == -1) { sprintf(s, "*,"); } else { sprintf(s, "%ld,", (long int)size[i]); } strcat(desired_dims,s); } len = strlen(desired_dims); desired_dims[len-1] = ']'; for (i = 0; i < n; i++) { sprintf(s, "%ld,", (long int)array_size(ary,i)); strcat(actual_dims,s); } len = strlen(actual_dims); actual_dims[len-1] = ']'; PyErr_Format(PyExc_TypeError, "Array must have shape of %s. Given array has shape of %s", desired_dims, actual_dims); } return success; } /* Require the given PyArrayObject to to be Fortran ordered. If the * the PyArrayObject is already Fortran ordered, do nothing. Else, * set the Fortran ordering flag and recompute the strides. */ int require_fortran(PyArrayObject* ary) { int success = 1; int nd = array_numdims(ary); int i; npy_intp * strides = array_strides(ary); if (array_is_fortran(ary)) return success; /* Set the Fortran ordered flag */ array_enableflags(ary,NPY_ARRAY_FARRAY); /* Recompute the strides */ strides[0] = strides[nd-1]; for (i=1; i < nd; ++i) strides[i] = strides[i-1] * array_size(ary,i-1); return success; } } /* Combine all NumPy fragments into one for convenience */ %fragment("NumPy_Fragments", "header", fragment="NumPy_Backward_Compatibility", fragment="NumPy_Macros", fragment="NumPy_Utilities", fragment="NumPy_Object_to_Array", fragment="NumPy_Array_Requirements") { } /* End John Hunter translation (with modifications by Bill Spotz) */ /* %numpy_typemaps() macro * * This macro defines a family of 74 typemaps that allow C arguments * of the form * * 1. (DATA_TYPE IN_ARRAY1[ANY]) * 2. (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) * 3. (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) * * 4. (DATA_TYPE IN_ARRAY2[ANY][ANY]) * 5. (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) * 6. (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) * 7. (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) * 8. (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) * * 9. (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) * 10. (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * 11. (DATA_TYPE** IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * 12. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) * 13. (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * 14. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) * * 15. (DATA_TYPE IN_ARRAY4[ANY][ANY][ANY][ANY]) * 16. (DATA_TYPE* IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) * 17. (DATA_TYPE** IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) * 18. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, , DIM_TYPE DIM4, DATA_TYPE* IN_ARRAY4) * 19. (DATA_TYPE* IN_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) * 20. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* IN_FARRAY4) * * 21. (DATA_TYPE INPLACE_ARRAY1[ANY]) * 22. (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) * 23. (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) * * 24. (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) * 25. (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) * 26. (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) * 27. (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) * 28. (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) * * 29. (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) * 30. (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * 31. (DATA_TYPE** INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * 32. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3) * 33. (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * 34. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3) * * 35. (DATA_TYPE INPLACE_ARRAY4[ANY][ANY][ANY][ANY]) * 36. (DATA_TYPE* INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) * 37. (DATA_TYPE** INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) * 38. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* INPLACE_ARRAY4) * 39. (DATA_TYPE* INPLACE_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) * 40. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* INPLACE_FARRAY4) * * 41. (DATA_TYPE ARGOUT_ARRAY1[ANY]) * 42. (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) * 43. (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) * * 44. (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) * * 45. (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) * * 46. (DATA_TYPE ARGOUT_ARRAY4[ANY][ANY][ANY][ANY]) * * 47. (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1) * 48. (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1) * * 49. (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) * 50. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2) * 51. (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) * 52. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2) * * 53. (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) * 54. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) * 55. (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) * 56. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3) * * 57. (DATA_TYPE** ARGOUTVIEW_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) * 58. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEW_ARRAY4) * 59. (DATA_TYPE** ARGOUTVIEW_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) * 60. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEW_FARRAY4) * * 61. (DATA_TYPE** ARGOUTVIEWM_ARRAY1, DIM_TYPE* DIM1) * 62. (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEWM_ARRAY1) * * 63. (DATA_TYPE** ARGOUTVIEWM_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) * 64. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_ARRAY2) * 65. (DATA_TYPE** ARGOUTVIEWM_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) * 66. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_FARRAY2) * * 67. (DATA_TYPE** ARGOUTVIEWM_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) * 68. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_ARRAY3) * 69. (DATA_TYPE** ARGOUTVIEWM_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) * 70. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_FARRAY3) * * 71. (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) * 72. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_ARRAY4) * 73. (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) * 74. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_FARRAY4) * * where "DATA_TYPE" is any type supported by the NumPy module, and * "DIM_TYPE" is any int-like type suitable for specifying dimensions. * The difference between "ARRAY" typemaps and "FARRAY" typemaps is * that the "FARRAY" typemaps expect Fortran ordering of * multidimensional arrays. In python, the dimensions will not need * to be specified (except for the "DATA_TYPE* ARGOUT_ARRAY1" * typemaps). The IN_ARRAYs can be a numpy array or any sequence that * can be converted to a numpy array of the specified type. The * INPLACE_ARRAYs must be numpy arrays of the appropriate type. The * ARGOUT_ARRAYs will be returned as new numpy arrays of the * appropriate type. * * These typemaps can be applied to existing functions using the * %apply directive. For example: * * %apply (double* IN_ARRAY1, int DIM1) {(double* series, int length)}; * double prod(double* series, int length); * * %apply (int DIM1, int DIM2, double* INPLACE_ARRAY2) * {(int rows, int cols, double* matrix )}; * void floor(int rows, int cols, double* matrix, double f); * * %apply (double IN_ARRAY3[ANY][ANY][ANY]) * {(double tensor[2][2][2] )}; * %apply (double ARGOUT_ARRAY3[ANY][ANY][ANY]) * {(double low[2][2][2] )}; * %apply (double ARGOUT_ARRAY3[ANY][ANY][ANY]) * {(double upp[2][2][2] )}; * void luSplit(double tensor[2][2][2], * double low[2][2][2], * double upp[2][2][2] ); * * or directly with * * double prod(double* IN_ARRAY1, int DIM1); * * void floor(int DIM1, int DIM2, double* INPLACE_ARRAY2, double f); * * void luSplit(double IN_ARRAY3[ANY][ANY][ANY], * double ARGOUT_ARRAY3[ANY][ANY][ANY], * double ARGOUT_ARRAY3[ANY][ANY][ANY]); */ %define %numpy_typemaps(DATA_TYPE, DATA_TYPECODE, DIM_TYPE) /************************/ /* Input Array Typemaps */ /************************/ /* Typemap suite for (DATA_TYPE IN_ARRAY1[ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE IN_ARRAY1[ANY]) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE IN_ARRAY1[ANY]) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[1] = { $1_dim0 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 1) || !require_size(array, size, 1)) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(freearg) (DATA_TYPE IN_ARRAY1[ANY]) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[1] = { -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 1) || !require_size(array, size, 1)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); } %typemap(freearg) (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[1] = {-1}; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 1) || !require_size(array, size, 1)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE IN_ARRAY2[ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE IN_ARRAY2[ANY][ANY]) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE IN_ARRAY2[ANY][ANY]) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { $1_dim0, $1_dim1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2)) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(freearg) (DATA_TYPE IN_ARRAY2[ANY][ANY]) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); } %typemap(freearg) (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { -1, -1 }; array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2) || !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); } %typemap(freearg) (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { -1, -1 }; array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { $1_dim0, $1_dim1, $1_dim2 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3)) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(freearg) (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { -1, -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); } %typemap(freearg) (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE** IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE** IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { /* for now, only concerned with lists */ $1 = PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE** IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (DATA_TYPE** array=NULL, PyArrayObject** object_array=NULL, int* is_new_object_array=NULL) { npy_intp size[2] = { -1, -1 }; PyArrayObject* temp_array; Py_ssize_t i; int is_new_object; /* length of the list */ $2 = PyList_Size($input); /* the arrays */ array = (DATA_TYPE **)malloc($2*sizeof(DATA_TYPE *)); object_array = (PyArrayObject **)calloc($2,sizeof(PyArrayObject *)); is_new_object_array = (int *)calloc($2,sizeof(int)); if (array == NULL || object_array == NULL || is_new_object_array == NULL) { SWIG_fail; } for (i=0; i<$2; i++) { temp_array = obj_to_array_contiguous_allow_conversion(PySequence_GetItem($input,i), DATA_TYPECODE, &is_new_object); /* the new array must be stored so that it can be destroyed in freearg */ object_array[i] = temp_array; is_new_object_array[i] = is_new_object; if (!temp_array || !require_dimensions(temp_array, 2)) SWIG_fail; /* store the size of the first array in the list, then use that for comparison. */ if (i == 0) { size[0] = array_size(temp_array,0); size[1] = array_size(temp_array,1); } if (!require_size(temp_array, size, 2)) SWIG_fail; array[i] = (DATA_TYPE*) array_data(temp_array); } $1 = (DATA_TYPE**) array; $3 = (DIM_TYPE) size[0]; $4 = (DIM_TYPE) size[1]; } %typemap(freearg) (DATA_TYPE** IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { Py_ssize_t i; if (array$argnum!=NULL) free(array$argnum); /*freeing the individual arrays if needed */ if (object_array$argnum!=NULL) { if (is_new_object_array$argnum!=NULL) { for (i=0; i<$2; i++) { if (object_array$argnum[i] != NULL && is_new_object_array$argnum[i]) { Py_DECREF(object_array$argnum[i]); } } free(is_new_object_array$argnum); } free(object_array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, * DATA_TYPE* IN_ARRAY3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { -1, -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { -1, -1, -1 }; array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3) | !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); } %typemap(freearg) (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, * DATA_TYPE* IN_FARRAY3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { -1, -1, -1 }; array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE IN_ARRAY4[ANY][ANY][ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE IN_ARRAY4[ANY][ANY][ANY][ANY]) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE IN_ARRAY4[ANY][ANY][ANY][ANY]) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[4] = { $1_dim0, $1_dim1, $1_dim2 , $1_dim3}; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 4) || !require_size(array, size, 4)) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(freearg) (DATA_TYPE IN_ARRAY4[ANY][ANY][ANY][ANY]) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3, DIM_TYPE DIM4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[4] = { -1, -1, -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 4) || !require_size(array, size, 4)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); $5 = (DIM_TYPE) array_size(array,3); } %typemap(freearg) (DATA_TYPE* IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE** IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3, DIM_TYPE DIM4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE** IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { /* for now, only concerned with lists */ $1 = PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE** IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) (DATA_TYPE** array=NULL, PyArrayObject** object_array=NULL, int* is_new_object_array=NULL) { npy_intp size[3] = { -1, -1, -1 }; PyArrayObject* temp_array; Py_ssize_t i; int is_new_object; /* length of the list */ $2 = PyList_Size($input); /* the arrays */ array = (DATA_TYPE **)malloc($2*sizeof(DATA_TYPE *)); object_array = (PyArrayObject **)calloc($2,sizeof(PyArrayObject *)); is_new_object_array = (int *)calloc($2,sizeof(int)); if (array == NULL || object_array == NULL || is_new_object_array == NULL) { SWIG_fail; } for (i=0; i<$2; i++) { temp_array = obj_to_array_contiguous_allow_conversion(PySequence_GetItem($input,i), DATA_TYPECODE, &is_new_object); /* the new array must be stored so that it can be destroyed in freearg */ object_array[i] = temp_array; is_new_object_array[i] = is_new_object; if (!temp_array || !require_dimensions(temp_array, 3)) SWIG_fail; /* store the size of the first array in the list, then use that for comparison. */ if (i == 0) { size[0] = array_size(temp_array,0); size[1] = array_size(temp_array,1); size[2] = array_size(temp_array,2); } if (!require_size(temp_array, size, 3)) SWIG_fail; array[i] = (DATA_TYPE*) array_data(temp_array); } $1 = (DATA_TYPE**) array; $3 = (DIM_TYPE) size[0]; $4 = (DIM_TYPE) size[1]; $5 = (DIM_TYPE) size[2]; } %typemap(freearg) (DATA_TYPE** IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { Py_ssize_t i; if (array$argnum!=NULL) free(array$argnum); /*freeing the individual arrays if needed */ if (object_array$argnum!=NULL) { if (is_new_object_array$argnum!=NULL) { for (i=0; i<$2; i++) { if (object_array$argnum[i] != NULL && is_new_object_array$argnum[i]) { Py_DECREF(object_array$argnum[i]); } } free(is_new_object_array$argnum); } free(object_array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, * DATA_TYPE* IN_ARRAY4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* IN_ARRAY4) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* IN_ARRAY4) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[4] = { -1, -1, -1 , -1}; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 4) || !require_size(array, size, 4)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DIM_TYPE) array_size(array,3); $5 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* IN_ARRAY4) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3, DIM_TYPE DIM4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[4] = { -1, -1, -1, -1 }; array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 4) || !require_size(array, size, 4) | !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); $5 = (DIM_TYPE) array_size(array,3); } %typemap(freearg) (DATA_TYPE* IN_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, * DATA_TYPE* IN_FARRAY4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* IN_FARRAY4) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* IN_FARRAY4) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[4] = { -1, -1, -1 , -1 }; array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 4) || !require_size(array, size, 4) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DIM_TYPE) array_size(array,3); $5 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* IN_FARRAY4) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /***************************/ /* In-Place Array Typemaps */ /***************************/ /* Typemap suite for (DATA_TYPE INPLACE_ARRAY1[ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE INPLACE_ARRAY1[ANY]) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE INPLACE_ARRAY1[ANY]) (PyArrayObject* array=NULL) { npy_intp size[1] = { $1_dim0 }; array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,1) || !require_size(array, size, 1) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = ($1_ltype) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) (PyArrayObject* array=NULL, int i=1) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,1) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = 1; for (i=0; i < array_numdims(array); ++i) $2 *= array_size(array,i); } /* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) (PyArrayObject* array=NULL, int i=0) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,1) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = 1; for (i=0; i < array_numdims(array); ++i) $1 *= array_size(array,i); $2 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) (PyArrayObject* array=NULL) { npy_intp size[2] = { $1_dim0, $1_dim1 }; array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_size(array, size, 2) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = ($1_ltype) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) (PyArrayObject* array=NULL) { npy_intp size[3] = { $1_dim0, $1_dim1, $1_dim2 }; array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_size(array, size, 3) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = ($1_ltype) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); } /* Typemap suite for (DATA_TYPE** INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE** INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { $1 = PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE** INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (DATA_TYPE** array=NULL, PyArrayObject** object_array=NULL) { npy_intp size[2] = { -1, -1 }; PyArrayObject* temp_array; Py_ssize_t i; /* length of the list */ $2 = PyList_Size($input); /* the arrays */ array = (DATA_TYPE **)malloc($2*sizeof(DATA_TYPE *)); object_array = (PyArrayObject **)calloc($2,sizeof(PyArrayObject *)); if (array == NULL || object_array == NULL) { SWIG_fail; } for (i=0; i<$2; i++) { temp_array = obj_to_array_no_conversion(PySequence_GetItem($input,i), DATA_TYPECODE); /* the new array must be stored so that it can be destroyed in freearg */ object_array[i] = temp_array; if ( !temp_array || !require_dimensions(temp_array, 2) || !require_contiguous(temp_array) || !require_native(temp_array) || !PyArray_EquivTypenums(array_type(temp_array), DATA_TYPECODE) ) SWIG_fail; /* store the size of the first array in the list, then use that for comparison. */ if (i == 0) { size[0] = array_size(temp_array,0); size[1] = array_size(temp_array,1); } if (!require_size(temp_array, size, 2)) SWIG_fail; array[i] = (DATA_TYPE*) array_data(temp_array); } $1 = (DATA_TYPE**) array; $3 = (DIM_TYPE) size[0]; $4 = (DIM_TYPE) size[1]; } %typemap(freearg) (DATA_TYPE** INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { if (array$argnum!=NULL) free(array$argnum); if (object_array$argnum!=NULL) free(object_array$argnum); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, * DATA_TYPE* INPLACE_ARRAY3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, * DATA_TYPE* INPLACE_FARRAY3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE INPLACE_ARRAY4[ANY][ANY][ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE INPLACE_ARRAY4[ANY][ANY][ANY][ANY]) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE INPLACE_ARRAY4[ANY][ANY][ANY][ANY]) (PyArrayObject* array=NULL) { npy_intp size[4] = { $1_dim0, $1_dim1, $1_dim2 , $1_dim3 }; array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,4) || !require_size(array, size, 4) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = ($1_ltype) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3, DIM_TYPE DIM4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,4) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); $5 = (DIM_TYPE) array_size(array,3); } /* Typemap suite for (DATA_TYPE** INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3, DIM_TYPE DIM4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE** INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { $1 = PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE** INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) (DATA_TYPE** array=NULL, PyArrayObject** object_array=NULL) { npy_intp size[3] = { -1, -1, -1 }; PyArrayObject* temp_array; Py_ssize_t i; /* length of the list */ $2 = PyList_Size($input); /* the arrays */ array = (DATA_TYPE **)malloc($2*sizeof(DATA_TYPE *)); object_array = (PyArrayObject **)calloc($2,sizeof(PyArrayObject *)); if (array == NULL || object_array == NULL) { SWIG_fail; } for (i=0; i<$2; i++) { temp_array = obj_to_array_no_conversion(PySequence_GetItem($input,i), DATA_TYPECODE); /* the new array must be stored so that it can be destroyed in freearg */ object_array[i] = temp_array; if ( !temp_array || !require_dimensions(temp_array, 3) || !require_contiguous(temp_array) || !require_native(temp_array) || !PyArray_EquivTypenums(array_type(temp_array), DATA_TYPECODE) ) SWIG_fail; /* store the size of the first array in the list, then use that for comparison. */ if (i == 0) { size[0] = array_size(temp_array,0); size[1] = array_size(temp_array,1); size[2] = array_size(temp_array,2); } if (!require_size(temp_array, size, 3)) SWIG_fail; array[i] = (DATA_TYPE*) array_data(temp_array); } $1 = (DATA_TYPE**) array; $3 = (DIM_TYPE) size[0]; $4 = (DIM_TYPE) size[1]; $5 = (DIM_TYPE) size[2]; } %typemap(freearg) (DATA_TYPE** INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { if (array$argnum!=NULL) free(array$argnum); if (object_array$argnum!=NULL) free(object_array$argnum); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, * DATA_TYPE* INPLACE_ARRAY4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* INPLACE_ARRAY4) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* INPLACE_ARRAY4) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,4) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DIM_TYPE) array_size(array,3); $5 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3, DIM_TYPE DIM4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,4) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); $5 = (DIM_TYPE) array_size(array,3); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, * DATA_TYPE* INPLACE_FARRAY4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* INPLACE_FARRAY4) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* INPLACE_FARRAY4) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,4) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DIM_TYPE) array_size(array,3); $5 = (DATA_TYPE*) array_data(array); } /*************************/ /* Argout Array Typemaps */ /*************************/ /* Typemap suite for (DATA_TYPE ARGOUT_ARRAY1[ANY]) */ %typemap(in,numinputs=0, fragment="NumPy_Backward_Compatibility,NumPy_Macros") (DATA_TYPE ARGOUT_ARRAY1[ANY]) (PyObject* array = NULL) { npy_intp dims[1] = { $1_dim0 }; array = PyArray_SimpleNew(1, dims, DATA_TYPECODE); if (!array) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(argout) (DATA_TYPE ARGOUT_ARRAY1[ANY]) { $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); } /* Typemap suite for (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) */ %typemap(in,numinputs=1, fragment="NumPy_Fragments") (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) (PyObject* array = NULL) { npy_intp dims[1]; if (!PyInt_Check($input)) { const char* typestring = pytype_string($input); PyErr_Format(PyExc_TypeError, "Int dimension expected. '%s' given.", typestring); SWIG_fail; } $2 = (DIM_TYPE) PyInt_AsLong($input); dims[0] = (npy_intp) $2; array = PyArray_SimpleNew(1, dims, DATA_TYPECODE); if (!array) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); } %typemap(argout) (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) { $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); } /* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) */ %typemap(in,numinputs=1, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) (PyObject* array = NULL) { npy_intp dims[1]; if (!PyInt_Check($input)) { const char* typestring = pytype_string($input); PyErr_Format(PyExc_TypeError, "Int dimension expected. '%s' given.", typestring); SWIG_fail; } $1 = (DIM_TYPE) PyInt_AsLong($input); dims[0] = (npy_intp) $1; array = PyArray_SimpleNew(1, dims, DATA_TYPECODE); if (!array) SWIG_fail; $2 = (DATA_TYPE*) array_data(array); } %typemap(argout) (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) { $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); } /* Typemap suite for (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) */ %typemap(in,numinputs=0, fragment="NumPy_Backward_Compatibility,NumPy_Macros") (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) (PyObject* array = NULL) { npy_intp dims[2] = { $1_dim0, $1_dim1 }; array = PyArray_SimpleNew(2, dims, DATA_TYPECODE); if (!array) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(argout) (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) { $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); } /* Typemap suite for (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) */ %typemap(in,numinputs=0, fragment="NumPy_Backward_Compatibility,NumPy_Macros") (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) (PyObject* array = NULL) { npy_intp dims[3] = { $1_dim0, $1_dim1, $1_dim2 }; array = PyArray_SimpleNew(3, dims, DATA_TYPECODE); if (!array) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(argout) (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) { $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); } /* Typemap suite for (DATA_TYPE ARGOUT_ARRAY4[ANY][ANY][ANY][ANY]) */ %typemap(in,numinputs=0, fragment="NumPy_Backward_Compatibility,NumPy_Macros") (DATA_TYPE ARGOUT_ARRAY4[ANY][ANY][ANY][ANY]) (PyObject* array = NULL) { npy_intp dims[4] = { $1_dim0, $1_dim1, $1_dim2, $1_dim3 }; array = PyArray_SimpleNew(4, dims, DATA_TYPECODE); if (!array) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(argout) (DATA_TYPE ARGOUT_ARRAY4[ANY][ANY][ANY][ANY]) { $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); } /*****************************/ /* Argoutview Array Typemaps */ /*****************************/ /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim_temp) { $1 = &data_temp; $2 = &dim_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1) { npy_intp dims[1] = { *$2 }; PyObject* obj = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DATA_TYPE** ARGOUTVIEW_ARRAY1) (DIM_TYPE dim_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim_temp; $2 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1) { npy_intp dims[1] = { *$1 }; PyObject* obj = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$2)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) { npy_intp dims[2] = { *$2, *$3 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DATA_TYPE** ARGOUTVIEW_ARRAY2) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2) { npy_intp dims[2] = { *$1, *$2 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) { npy_intp dims[2] = { *$2, *$3 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DATA_TYPE** ARGOUTVIEW_FARRAY2) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2) { npy_intp dims[2] = { *$1, *$2 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) { npy_intp dims[3] = { *$2, *$3, *$4 }; PyObject* obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp = NULL) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) { npy_intp dims[3] = { *$1, *$2, *$3 }; PyObject* obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$4)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) { npy_intp dims[3] = { *$2, *$3, *$4 }; PyObject* obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DATA_TYPE** ARGOUTVIEW_FARRAY3) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3) { npy_intp dims[3] = { *$1, *$2, *$3 }; PyObject* obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$4)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_ARRAY4, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; $5 = &dim4_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEW_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) { npy_intp dims[4] = { *$2, *$3, *$4 , *$5 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEW_ARRAY4) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 , DATA_TYPE** ARGOUTVIEW_ARRAY4) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &dim4_temp; $5 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEW_ARRAY4) { npy_intp dims[4] = { *$1, *$2, *$3 , *$4 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$5)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_FARRAY4, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; $5 = &dim4_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DATA_TYPE** ARGOUTVIEW_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) { npy_intp dims[4] = { *$2, *$3, *$4 , *$5 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEW_FARRAY4) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 , DATA_TYPE** ARGOUTVIEW_FARRAY4) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &dim4_temp; $5 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEW_FARRAY4) { npy_intp dims[4] = { *$1, *$2, *$3 , *$4 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$5)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /*************************************/ /* Managed Argoutview Array Typemaps */ /*************************************/ /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY1, DIM_TYPE* DIM1) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_ARRAY1, DIM_TYPE* DIM1 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim_temp) { $1 = &data_temp; $2 = &dim_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Utilities") (DATA_TYPE** ARGOUTVIEWM_ARRAY1, DIM_TYPE* DIM1) { npy_intp dims[1] = { *$2 }; PyObject* obj = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEWM_ARRAY1) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DATA_TYPE** ARGOUTVIEWM_ARRAY1) (DIM_TYPE dim_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim_temp; $2 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Utilities") (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEWM_ARRAY1) { npy_intp dims[1] = { *$1 }; PyObject* obj = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$2)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_ARRAY2, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Utilities") (DATA_TYPE** ARGOUTVIEWM_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) { npy_intp dims[2] = { *$2, *$3 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_ARRAY2) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DATA_TYPE** ARGOUTVIEWM_ARRAY2) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Utilities") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_ARRAY2) { npy_intp dims[2] = { *$1, *$2 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_FARRAY2, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements,NumPy_Utilities") (DATA_TYPE** ARGOUTVIEWM_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) { npy_intp dims[2] = { *$2, *$3 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_FARRAY2) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DATA_TYPE** ARGOUTVIEWM_FARRAY2) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements,NumPy_Utilities") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_FARRAY2) { npy_intp dims[2] = { *$1, *$2 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_ARRAY3, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Utilities") (DATA_TYPE** ARGOUTVIEWM_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) { npy_intp dims[3] = { *$2, *$3, *$4 }; PyObject* obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_ARRAY3) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DATA_TYPE** ARGOUTVIEWM_ARRAY3) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Utilities") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_ARRAY3) { npy_intp dims[3] = { *$1, *$2, *$3 }; PyObject* obj= PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$4)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_FARRAY3, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements,NumPy_Utilities") (DATA_TYPE** ARGOUTVIEWM_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) { npy_intp dims[3] = { *$2, *$3, *$4 }; PyObject* obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_FARRAY3) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DATA_TYPE** ARGOUTVIEWM_FARRAY3) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements,NumPy_Utilities") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_FARRAY3) { npy_intp dims[3] = { *$1, *$2, *$3 }; PyObject* obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$4)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; $5 = &dim4_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Utilities") (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) { npy_intp dims[4] = { *$2, *$3, *$4 , *$5 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_ARRAY4) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 , DATA_TYPE** ARGOUTVIEWM_ARRAY4) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &dim4_temp; $5 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Utilities") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_ARRAY4) { npy_intp dims[4] = { *$1, *$2, *$3 , *$4 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$5)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; $5 = &dim4_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements,NumPy_Utilities") (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) { npy_intp dims[4] = { *$2, *$3, *$4 , *$5 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_FARRAY4) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 , DATA_TYPE** ARGOUTVIEWM_FARRAY4) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &dim4_temp; $5 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements,NumPy_Utilities") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_FARRAY4) { npy_intp dims[4] = { *$1, *$2, *$3 , *$4 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$5)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; $5 = &dim4_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Utilities") (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) { npy_intp dims[4] = { *$2, *$3, *$4 , *$5 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_ARRAY4) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 , DATA_TYPE** ARGOUTVIEWM_ARRAY4) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &dim4_temp; $5 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Utilities") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_ARRAY4) { npy_intp dims[4] = { *$1, *$2, *$3 , *$4 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$5)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; $5 = &dim4_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements,NumPy_Utilities") (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) { npy_intp dims[4] = { *$2, *$3, *$4 , *$5 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_FARRAY4) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 , DATA_TYPE** ARGOUTVIEWM_FARRAY4) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &dim4_temp; $5 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements,NumPy_Utilities") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_FARRAY4) { npy_intp dims[4] = { *$1, *$2, *$3 , *$4 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$5)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } %enddef /* %numpy_typemaps() macro */ /* *************************************************************** */ /* Concrete instances of the %numpy_typemaps() macro: Each invocation * below applies all of the typemaps above to the specified data type. */ %numpy_typemaps(signed char , NPY_BYTE , int) %numpy_typemaps(unsigned char , NPY_UBYTE , int) %numpy_typemaps(short , NPY_SHORT , int) %numpy_typemaps(unsigned short , NPY_USHORT , int) %numpy_typemaps(int , NPY_INT , int) %numpy_typemaps(unsigned int , NPY_UINT , int) %numpy_typemaps(long , NPY_LONG , int) %numpy_typemaps(unsigned long , NPY_ULONG , int) %numpy_typemaps(long long , NPY_LONGLONG , int) %numpy_typemaps(unsigned long long, NPY_ULONGLONG, int) %numpy_typemaps(float , NPY_FLOAT , int) %numpy_typemaps(double , NPY_DOUBLE , int) /* *************************************************************** * The follow macro expansion does not work, because C++ bool is 4 * bytes and NPY_BOOL is 1 byte * * %numpy_typemaps(bool, NPY_BOOL, int) */ /* *************************************************************** * On my Mac, I get the following warning for this macro expansion: * 'swig/python detected a memory leak of type 'long double *', no destructor found.' * * %numpy_typemaps(long double, NPY_LONGDOUBLE, int) */ #ifdef __cplusplus %include %numpy_typemaps(std::complex, NPY_CFLOAT , int) %numpy_typemaps(std::complex, NPY_CDOUBLE, int) #endif #endif /* SWIGPYTHON */ Gyoto-1.2.0/python/setup.py.in000066400000000000000000000033631302352257300162620ustar00rootroot00000000000000#!/usr/bin/env python # setup.py.in.distutils # # Copyright 2012, 2013 Brandon Invergo # Copyright 2014 Thibaut Paumard # # 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 any warranty. from setuptools import setup, Extension import platform import re import numpy try: numpy_include = numpy.get_include() except AttributeError: numpy_include = numpy.get_numpy_include() if platform.system() == 'Linux': doc_dir = '@prefix@/share/doc/@PACKAGE_TARNAME@' else: try: from win32com.shell import shellcon, shell homedir = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0) appdir = '@PACKAGE_TARNAME@' doc_dir = os.path.join(homedir, appdir) except: pass gyoto_lib_dirs=['../lib/.libs'] gyoto_libs=['gyoto@FEATURES@'] for libspec in ('@CFITSIO_LIBS@', '@XERCES_LIBS@', '@UDUNITS_LIBS@'): libspec=re.split('[ \t]', libspec) for comp in libspec: if re.match('-L', comp): gyoto_lib_dirs.append(re.sub('^-L', '', comp)) elif re.match('-l', comp): gyoto_libs.append(re.sub('^-l', '', comp)) gyoto_module = Extension('_gyoto', sources=['gyoto_wrap.cxx'], include_dirs=[numpy_include, '@abs_srcdir@'], library_dirs=gyoto_lib_dirs, libraries=gyoto_libs ) setup(name='@PACKAGE_NAME@', version='@PACKAGE_VERSION@', author_email='@PACKAGE_BUGREPORT@', py_modules=["gyoto"], ext_modules=[gyoto_module], test_suite='tests' ) Gyoto-1.2.0/python/setup_lorene.py.in000066400000000000000000000034121302352257300176210ustar00rootroot00000000000000#!/usr/bin/env python # setup.py.in.distutils # # Copyright 2012, 2013 Brandon Invergo # Copyright 2014-2016 Thibaut Paumard # # 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 any warranty. from setuptools import setup, Extension import platform import re import numpy try: numpy_include = numpy.get_include() except AttributeError: numpy_include = numpy.get_numpy_include() if platform.system() == 'Linux': doc_dir = '@prefix@/share/doc/@PACKAGE_TARNAME@' else: try: from win32com.shell import shellcon, shell homedir = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0) appdir = '@PACKAGE_TARNAME@' doc_dir = os.path.join(homedir, appdir) except: pass gyoto_lib_dirs=['../lib/.libs'] gyoto_libs=['gyoto@FEATURES@'] for libspec in ('@CFITSIO_LIBS@', '@XERCES_LIBS@', '@UDUNITS_LIBS@'): libspec=re.split('[ \t]', libspec) for comp in libspec: if re.match('-L', comp): gyoto_lib_dirs.append(re.sub('^-L', '', comp)) elif re.match('-l', comp): gyoto_libs.append(re.sub('^-l', '', comp)) gyoto_lorene_module = Extension('_gyoto_lorene', sources=['gyoto_lorene_wrap.cxx'], include_dirs=[numpy_include, '@abs_srcdir@'], library_dirs=gyoto_lib_dirs, libraries=gyoto_libs ) setup(name='@PACKAGE_NAME@'+'_lorene', version='@PACKAGE_VERSION@', author_email='@PACKAGE_BUGREPORT@', py_modules=["gyoto_lorene"], ext_modules=[gyoto_lorene_module] ) Gyoto-1.2.0/python/setup_std.py.in000066400000000000000000000034201302352257300171260ustar00rootroot00000000000000#!/usr/bin/env python # setup.py.in.distutils # # Copyright 2012, 2013 Brandon Invergo # Copyright 2014 Thibaut Paumard # # 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 any warranty. from setuptools import setup, Extension import platform import re import numpy try: numpy_include = numpy.get_include() except AttributeError: numpy_include = numpy.get_numpy_include() if platform.system() == 'Linux': doc_dir = '@prefix@/share/doc/@PACKAGE_TARNAME@' else: try: from win32com.shell import shellcon, shell homedir = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0) appdir = '@PACKAGE_TARNAME@' doc_dir = os.path.join(homedir, appdir) except: pass gyoto_lib_dirs=['../lib/.libs'] gyoto_libs=['gyoto@FEATURES@'] for libspec in ('@CFITSIO_LIBS@', '@XERCES_LIBS@', '@UDUNITS_LIBS@'): libspec=re.split('[ \t]', libspec) for comp in libspec: if re.match('-L', comp): gyoto_lib_dirs.append(re.sub('^-L', '', comp)) elif re.match('-l', comp): gyoto_libs.append(re.sub('^-l', '', comp)) gyoto_std_module = Extension('_gyoto_std', sources=['gyoto_std_wrap.cxx'], include_dirs=[numpy_include, '@abs_srcdir@'], library_dirs=gyoto_lib_dirs, libraries=gyoto_libs ) setup(name='@PACKAGE_NAME@'+'_std', version='@PACKAGE_VERSION@', author_email='@PACKAGE_BUGREPORT@', py_modules=["gyoto_std"], ext_modules=[gyoto_std_module], test_suite='tests_std' ) Gyoto-1.2.0/python/tests/000077500000000000000000000000001302352257300153005ustar00rootroot00000000000000Gyoto-1.2.0/python/tests/__init__.py000066400000000000000000000000001302352257300173770ustar00rootroot00000000000000Gyoto-1.2.0/python/tests/test_converters.py000066400000000000000000000017541302352257300211120ustar00rootroot00000000000000import unittest import gyoto class TestUnit(unittest.TestCase): def test___str__(self): self.assertEqual(str(gyoto.Unit("km")), "km") def test_throw(self): self.assertRaises(gyoto.Error, lambda: gyoto.Unit("deadbeaf")) def test_to(self): self .assertEqual(gyoto.Unit("m").To(5, gyoto.Unit("km")), 5000.) def test_from(self): self .assertEqual(gyoto.Unit("m").From(5000, gyoto.Unit("km")), 5.) class TestConverter(unittest.TestCase): def test_trivial(self): a=gyoto.Converter() self.assertEqual(a(2.), 2.) def test_converter(self): a=gyoto.Converter(gyoto.Unit("m"), gyoto.Unit("km")) self.assertEqual(5., a(5000)) def test_reset_trivial(self): a=gyoto.Converter(gyoto.Unit("m"), gyoto.Unit("km")) a.reset() self.assertEqual(a(2.), 2.) def test_reset(self): a=gyoto.Converter() a.reset(gyoto.Unit("m"), gyoto.Unit("km")) self.assertEqual(5., a(5000)) Gyoto-1.2.0/python/tests/test_error.py000066400000000000000000000006051302352257300200430ustar00rootroot00000000000000import unittest import gyoto class TestError(unittest.TestCase): def test_get_message(self): a=gyoto.Error("toto") self.assertEqual(a.get_message(), "toto") def test_throwError(self): self.assertRaises(gyoto.Error, lambda: gyoto.throwError("msg")) def test_getErrcode(self): a=gyoto.Error("toto") self.assertEqual(a.getErrcode(), 1) Gyoto-1.2.0/python/tests/test_metric.py000066400000000000000000000032251302352257300201760ustar00rootroot00000000000000import unittest import gyoto import numpy gyoto.requirePlugin('stdplug') class TestMetric(unittest.TestCase): def test_circularVelocity(self): gg=gyoto.Metric('KerrBL') vel=numpy.zeros(4, float) vel2=numpy.zeros(4, float) pos_list=[0, 6, numpy.pi*0.5, 0] pos_numpy=numpy.asarray(pos_list) gg.circularVelocity(pos_numpy, vel) gg.circularVelocity(pos_list, vel2) vel3=gg.circularVelocity(pos_list) self.assertTrue((vel == vel2).all()) self.assertTrue((vel == vel3).all()) def test_SysPrimeToTdot(self): gg=gyoto.Metric('KerrBL') self.assertAlmostEqual(gg.SysPrimeToTdot([0, 6, numpy.pi/2, 0], (0, 0, 0.1)), 1.8057877962865378) def test_isStopCondition(self): gg=gyoto.Metric('KerrBL') self.assertFalse(gg.isStopCondition((0, 6, 3.14, 0, 0, 0, 0, 0))) self.assertTrue(gg.isStopCondition((0, 0, 3.14, 0, 0, 0, 0, 0))) def test_gmunu(self): gg=gyoto.Metric('KerrBL') tt=gg.gmunu((0, 6, 3.14, 0), 0, 0) self.assertAlmostEqual(tt, -0.6666666666666667) dst=numpy.zeros((4, 4), float) gg.gmunu(dst, (0, 6, 3.14, 0)) self.assertEqual(tt, dst[0, 0]) dst2=gg.gmunu((0, 6, 3.14, 0)) self.assertEqual(tt, dst2[0, 0]) def test_christoffel(self): gg=gyoto.Metric('KerrBL') tt=gg.christoffel((0, 6, 3.14, 0), 0, 0, 0) self.assertAlmostEqual(tt, 0) dst=numpy.zeros((4, 4, 4), float) gg.christoffel(dst, (0, 6, 3.14, 0)) self.assertEqual(tt, dst[0, 0, 0]) dst2=gg.christoffel((0, 6, 3.14, 0)) self.assertEqual(tt, dst2[0, 0, 0]) Gyoto-1.2.0/python/tests/test_value.py000066400000000000000000000032241302352257300200260ustar00rootroot00000000000000import unittest import gyoto gyoto.requirePlugin("stdplug") class TestValue(unittest.TestCase): def test_good(self): a=gyoto.Value(5) self.assertEqual(a.toLong(), 5) self.assertEqual(a.toULong(), 5) self.assertEqual(a.toSizeT(), 5) a=gyoto.Value((1, 2, 3.)) self.assertEqual(a.toVDouble(), (1., 2., 3.)) a=gyoto.Value((1, 2, 3)) self.assertEqual(a.toVULong(), (1, 2, 3)) a=gyoto.Value('a') self.assertEqual(a.toString(), 'a') s=gyoto.Screen() a=gyoto.Value(s) self.assertEqual(a.toScreen().this, s.this) def test_assign(self): a=gyoto.Value(0) a.assign(gyoto.Value(5)) self.assertEqual(a.toLong(), 5) a.assign(gyoto.Value(5.)) self.assertEqual(a.toDouble(), 5.) def test_bad(self): self.assertRaises(gyoto.Error, lambda: gyoto.Value(5).toDouble()) self.assertRaises(gyoto.Error, lambda: gyoto.Value(5.).toLong()) self.assertRaises(gyoto.Error, lambda: gyoto.Value((1,)).toVDouble()) self.assertRaises(gyoto.Error, lambda: gyoto.Value('a').toVULong()) class TestProperty(unittest.TestCase): def test_get(self): s=gyoto.Screen() self.assertEqual(s.get('Distance'), 1.0) self.assertRaises(gyoto.Error, lambda: s.get('NonExistentProperty')) def test_set(self): s=gyoto.Screen() s.set('Distance', 8., 'kpc') self.assertAlmostEqual(s.get('Distance'), 8.*gyoto.GYOTO_KPC, -15) def test_describe(self): s=gyoto.Screen() p=s.property('Distance') self.assertIn('Distance: double with unit', s.describeProperty(p)) Gyoto-1.2.0/python/tests_std/000077500000000000000000000000001302352257300161525ustar00rootroot00000000000000Gyoto-1.2.0/python/tests_std/__init__.py000066400000000000000000000000001302352257300202510ustar00rootroot00000000000000Gyoto-1.2.0/python/tests_std/test_ChernSimons.py000066400000000000000000000004411302352257300220120ustar00rootroot00000000000000import numpy import unittest import gyoto gyoto.loadPlugin('stdplug') import gyoto_std class TestChernSimons(unittest.TestCase): def test_setInitCoord(self): gg=gyoto_std.ChernSimons() zeta=0.5 gg.dzetaCS(zeta) self.assertTrue((gg.dzetaCS() == zeta)) Gyoto-1.2.0/python/tests_std/test_DeformedTorus.py000066400000000000000000000006071302352257300223500ustar00rootroot00000000000000import numpy import unittest import gyoto gyoto.loadPlugin('stdplug') import gyoto_std class TestDeformedTorus(unittest.TestCase): def test_DeformedTorus(self): ao=gyoto.Astrobj("DeformedTorus") ao=gyoto_std.DeformedTorus() sp=gyoto_std.BlackBody() ao.spectrum(sp) r=4. ao.largeRadius(r) self.assertTrue((ao.largeRadius() == r)) Gyoto-1.2.0/python/tests_std/test_DynamicalDiskBolometric.py000066400000000000000000000004741302352257300243240ustar00rootroot00000000000000import numpy import unittest import gyoto gyoto.loadPlugin('stdplug') import gyoto_std class TestDynamicalDiskBolometric(unittest.TestCase): def test_DynamicalDiskBolometric(self): ao=gyoto.Astrobj("DynamicalDiskBolometric") ao=gyoto_std.DynamicalDiskBolometric() self.assertTrue(True) Gyoto-1.2.0/python/tests_std/test_EquatorialHotSpot.py000066400000000000000000000007761302352257300232240ustar00rootroot00000000000000import numpy import unittest import gyoto gyoto.loadPlugin('stdplug') import gyoto_std class TestEquatorialHotSpot(unittest.TestCase): def test_EquatorialHotSpot(self): ao=gyoto.Astrobj("EquatorialHotSpot") ao=gyoto_std.EquatorialHotSpot() r=4. ao.spotRadSize(r) self.assertTrue((ao.spotRadSize() == r)) kind="RadialBeaming" ao.beaming(kind) self.assertTrue((ao.beaming() == kind)) self.assertRaises(gyoto.Error, ao.beaming, "foo") Gyoto-1.2.0/python/tests_std/test_InflateStar.py000066400000000000000000000006241302352257300220010ustar00rootroot00000000000000import numpy import unittest import gyoto gyoto.loadPlugin('stdplug') import gyoto_std class TestInflateStar(unittest.TestCase): def test_InflateStar(self): ao=gyoto.Astrobj("InflateStar") ao=gyoto_std.InflateStar() ao.radius(0.) ao.radiusStop(2.) ao.timeInflateInit(0.) ao.timeInflateStop(2.) self.assertTrue(abs(ao.radiusAt(1.)-1.) < 1e-6) Gyoto-1.2.0/python/tests_std/test_OscilTorus.py000066400000000000000000000007001302352257300216660ustar00rootroot00000000000000import numpy import unittest import gyoto gyoto.loadPlugin('stdplug') import gyoto_std class TestOscilTorus(unittest.TestCase): def test_OscilTorus(self): ao=gyoto.Astrobj("OscilTorus") ao=gyoto_std.OscilTorus() r=4. ao.largeRadius(r) self.assertTrue((ao.largeRadius() == r)) perturbkind="Vertical" ao.perturbKind(perturbkind) self.assertTrue((ao.perturbKind() == perturbkind)) Gyoto-1.2.0/python/tests_std/test_RezzollaZhidenko.py000066400000000000000000000006631302352257300230660ustar00rootroot00000000000000import numpy import unittest import gyoto gyoto.loadPlugin('stdplug') import gyoto_std class TestRezzollaZhidenko(unittest.TestCase): def test_mass(self): gg=gyoto_std.RezzollaZhidenko() m=2. gg.mass(m) self.assertTrue((gg.mass() == m)) def test_aparam(self): gg=gyoto_std.RezzollaZhidenko() a=(1., 2., 3., 4.) gg.aparam(a) self.assertTrue((gg.aparam() == a)) Gyoto-1.2.0/python/tests_std/test_star.py000066400000000000000000000011531302352257300205340ustar00rootroot00000000000000import numpy import unittest import gyoto gyoto.requirePlugin('stdplug') import gyoto_std class TestStar(unittest.TestCase): def test_setInitCoord(self): st=gyoto_std.Star() gg=gyoto_std.KerrBL() st.metric(gg) pos_list=(600., 9., 1.5707999999999999741, 0) vel_list=(0., 0., 0.037037) st.setInitCoord(pos_list, vel_list) dst=numpy.zeros(8, float) dst2=numpy.zeros(8, float) st.getInitialCoord(dst) st.setPosition(pos_list) st.setVelocity(vel_list) st.getInitialCoord(dst2) self.assertTrue((dst == dst2).all()) Gyoto-1.2.0/yorick/000077500000000000000000000000001302352257300141155ustar00rootroot00000000000000Gyoto-1.2.0/yorick/Makefile.in000066400000000000000000000127121302352257300161650ustar00rootroot00000000000000# these values filled in by yorick -batch make.i Y_MAKEDIR= Y_EXE= Y_EXE_PKGS= Y_EXE_HOME= Y_EXE_SITE= Y_HOME_PKG= # ----------------------------------------------------- optimization flags # options for make command line, e.g.- make COPT=-g TGT=exe COPT=$(COPT_DEFAULT) -L../lib/.libs -I../include TGT=$(DEFAULT_TGT) # ------------------------------------------------ macros for this package #include ../local_settings vpath %.C @srcdir@ CXXFLAGS=@CXXFLAGS@ CPPFLAGS=@CPPFLAGS@ XERCES_LIBS=@XERCES_LIBS@ XERCES_CFLAGS=@XERCES_CFLAGS@ UDUNITS_CFLAGS=@UDUNITS_CFLAGS@ UDUNITS_LIBS=@UDUNITS_LIBS@ CFITSIO_CFLAGS=@CFITSIO_CFLAGS@ CFITSIO_LIBS=@CFITSIO_LIBS@ BOOST_CPPFLAGS=@BOOST_CPPFLAGS@ DYLIB_VAR=@DYLIB_VAR@ PTHREAD_CFLAGS= @PTHREAD_CFLAGS@ PTHREAD_LIBS= @PTHREAD_LIBS@ YGYOTO_C = $(shell ls @srcdir@/*.C) GYOTO_C = $(shell ls @top_srcdir@/lib/*.C) GYOTO_OBJ = $(GYOTO_C:.C=.o) GYOTO_H = $(shell ls @top_srcdir@/include/*.h) MPIRUN = mpirun PKG_NAME=gyoto PKG_I=@srcdir@/gyoto.i OBJS=gyoto_utils.o gyoto_Metric.o gyoto_Photon.o \ gyoto_Scenery.o gyoto_Screen.o gyoto_Idx.o gyoto_Spectrum.o \ gyoto_Astrobj.o gyoto_ThinDisk.o \ gyoto_Spectrometer.o gyoto_SpectroComplex.o gyoto_SpectroUniform.o # gyoto_KerrBL.o gyoto_KerrKS.o gyoto_Star.o gyoto_FixedStar.o gyoto_PolishDoughnut.o gyoto_ThinInfiniteDiskBL.o gyoto_ThinInfiniteDiskKS.o # change to give the executable a name other than yorick PKG_EXENAME=yorick # PKG_DEPLIBS=-Lsomedir -lsomelib for dependencies of this package PKG_DEPLIBS=-L../lib/.libs -lgyoto@FEATURES@ $(XERCES_LIBS) $(PTHREAD_LIBS) $(CFITSIO_LIBS) $(UDUNITS_LIBS) # set compiler (or rarely loader) flags specific to this package PKG_CFLAGS= -I@top_srcdir@/include $(XERCES_CFLAGS) $(UDUNITS_CFLAGS) $(BOOST_CPPFLAGS) $(PTHREAD_CFLAGS) $(CFITSIO_CFLAGS) PKG_LDFLAGS= $(PTHREAD_CFLAGS) # list of additional package names you want in PKG_EXENAME # (typically Y_EXE_PKGS should be first here) EXTRA_PKGS=$(Y_EXE_PKGS) # list of additional files for clean PKG_CLEAN= # autoload file for this package, if any PKG_I_START= # non-pkg.i include files for this package, if any PKG_I_EXTRA=@srcdir@/gyoto_constants.i @srcdir@/gyotoy.i @srcdir@/gyoto_namespace.i # -------------------------------- standard targets and rules (in Makepkg) # set macros Makepkg uses in target and dependency names # DLL_TARGETS, LIB_TARGETS, EXE_TARGETS # are any additional targets (defined below) prerequisite to # the plug-in library, archive library, and executable, respectively PKG_I_DEPS=$(PKG_I) Y_DISTMAKE=distmake include $(Y_MAKEDIR)/Make.cfg # Yorick-distributed Makepkg is not reliable for out-of-tree builds. include @top_srcdir@/yorick/Makepkg include $(Y_MAKEDIR)/Make$(TGT) # override macros Makepkg sets for rules and other macros # Y_HOME and Y_SITE in Make.cfg may not be correct (e.g.- relocatable) Y_HOME=$(Y_EXE_HOME) Y_SITE=$(Y_EXE_SITE) # use the compiler selected with the configure script CC=@CC@ CXX=@CXX@ # Actual install directories set with ./configure --with-yorick-* prefix=@prefix@ exec_prefix=@exec_prefix@ DEST_Y_HOME=$(DESTDIR)@Y_INST_HOME@ DEST_Y_SITE=$(DESTDIR)@Y_INST_SITE@ abs_top_builddir = @abs_top_builddir@ # ------------begin C++ source hacks # must use C++ to load yorick with this C++ package # this assumes make default CXX macro points to C++ compiler CXXFLAGS+=$(CFLAGS) $(GYOTO_FLAGS) LD_DLL=$(CXX) $(LDFLAGS) $(PLUG_SHARED) LD_EXE=$(CXX) $(LDFLAGS) $(PLUG_EXPORT) # C++ has no standard file extension, supply default make rule(s) .C.o: $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@ $< # --------------end C++ source hacks # simple example: #myfunc.o: myapi.h # more complex example (also consider using PKG_CFLAGS above): #myfunc.o: myapi.h myfunc.c # $(CC) $(CPPFLAGS) $(CFLAGS) -DMY_SWITCH -o $@ -c myfunc.c DEST_PKG_INSTALLED_DIR=$(DEST_Y_SITE)/packages/installed all: gyoto.so gyoto_std.so gyoto_std.so: stdplug/gyoto_std.so cp stdplug/gyoto_std.so ./ stdplug/gyoto_std.so: @srcdir@/stdplug/*.C cd stdplug; $(MAKE) gyoto.so: gyoto.i $(OBJS) custom.i: @srcdir@/custom1.i cp $< $@ check-dll: $(PKG_DLL) check.i custom.i unset GYOTO_PLUGINS && \ GYOTO_CHECK_NODISPLAY=true \ ./yorick1 -i check.i check-mpi: $(PKG_DLL) check-mpi.i custom.i unset GYOTO_PLUGINS && \ GYOTO_CHECK_NODISPLAY=true \ PATH=$(abs_top_builddir)/bin:$$PATH \ $(MPIRUN) ./yorick1 -i check-mpi.i install:: cd stdplug; make install $(YNSTALL) @srcdir@/ygyoto.h @srcdir@/ygyoto_idx.h @srcdir@/ygyoto_supplier.C $(DEST_Y_SITE)/include $(YNSTALL) @srcdir@/gyotoy.xml $(DEST_Y_SITE)/glade $(YNSTALL) @srcdir@/gyotoy.png $(DEST_Y_SITE)/data $(YNSTALL) @srcdir@/gyotoy $(DEST_Y_SITE)/bin -ln $(DEST_Y_SITE)/bin/gyotoy $(DESTDIR)$(exec_prefix)/bin/ $(YNSTALL) @srcdir@/gyotoy.1 $(DESTDIR)$(prefix)/share/man/man1 $(YNSTALL) gyoto.info $(DEST_PKG_INSTALLED_DIR) uninstall:: cd stdplug; make uninstall cd $(DEST_Y_SITE)/include ; rm -f ygyoto.h ygyoto_idx.h ygyoto_supplier.C rm -f $(DEST_Y_SITE)/glade/gyotoy.xml rm -f $(DEST_Y_SITE)/data/gyotoy.png rm -f $(DEST_Y_HOME)/bin/gyotoy rm -f $(DESTDIR)$(exec_prefix)/bin/gyotoy rm -f $(DESTDIR)$(prefix)/share/man/man1/gyotoy.1 -rm -f $(DEST_PKG_INSTALLED_DIR)/gyoto.info clean:: cd stdplug; $(Y_EXE) -batch make.i; make clean rm -f gyoto_std.so example-patterndisk.fits.gz example-patterndisk.xml distclean:: $(Y_EXE) cd stdplug; $(Y_EXE) -batch make.i; make distclean -rm custom.i %: ; .PHONY: standalone test-cppprog test-standalone test test-plugin check # -------------------------------------------------------- end of Makefile Gyoto-1.2.0/yorick/Makepkg000066400000000000000000000235231302352257300154240ustar00rootroot00000000000000# -*-mode: makefile;-*- # $Id: Makepkg,v 1.4 2010-08-13 09:46:16 thiebaut Exp $ # standard parts of yorick package Makefile SHELL=/bin/sh MAKE=make # ------------------------------------------------------------------------ # Any libpkg.a file may require -L and -l linker options in order # to be able to load it (a corresponding pkg.so would have already # been linked against those when it was built). Since we want to # be able to concoct executable yoricks with any subset of those # libpkg.a statically linked, the required -L and -l options, if # any, must be recorded in a libpkg.a.dep file kept alongside libpkg.a. # The rule that does the static link uses the yorick/libdep.sh script # to find and extract the information from these .dep files, in # order to create the appropriate linker options. # beware a subtle feature of Makefile semantics: # macros used in targets and their prerequisites take their # "instantaneous" values (make builds dependency tree as it goes) # macros used in rules or RHS of assignment take their # "final" values (actions actually happen after entire file parsed) # these macros are targets or prerequisites: # Makefile must define these _before_ including Makepkg # Y_MAKEDIR # TGT # OBJS # PKG_EXE, PKG_LIB, PKG_DLL, PKG_DEF # EXE_TARGETS, LIB_TARGETS, DLL_TARGETS # CODGER_DEP, H_YWRAP # PKG_I_DEPS (same as PKG_I unless PKG_I_DIR) # ALL_TARGETS # these macros are used in rules directly: # LD_DLL, DLL_LIBS # LD_EXE, Y_MAIN_O, EXE_LIBS, PKG_DEPLIBS (to make .dep file) # AR, ARFLAGS, RANLIB # CODGER, PKG_NAME, PKG_I, PKG_I_DIR, EXTRA_PKGS # Y_EXE, Y_SITE, Y_HOME # PKG_CLEAN, Y_BINDIR # DESTDIR, DEST_Y_SITE, DEST_Y_HOME, DEST_Y_BINDIR # defined in package Makefile (which includes this Makepkg): # Y_MAKEDIR directory containing Make.cfg, Makepkg, Makeexe, Makedll # Y_EXE path to yorick executable # Y_EXE_PKGS statically loaded packages in yorick executable # Y_EXE_HOME path Y_HOME for yorick executable # Y_EXE_SITE path Y_SITE for yorick executable # COPT C optimization flags, COPT_DEFAULT # TGT exe or dll, the target to be built, DEFAULT_TGT # PKG_NAME name of this package # PKG_I startup include file(s) for this package # OBJS list of object files # PKG_EXENAME normally just yorick # PKG_DEPLIBS list of load options (-L, -l) required for this package # PKG_CFLAGS optional additional CFLAGS for this package (e.g. -I...) # PKG_LDFLAGS optional additional LDFLAGS for this package (rare) # EXTRA_PKGS additional static packages if TGT=exe, default Y_EXE_PKGS # Y_HOME_ALT alternate Y_HOME directory to scan for EXTRA_PKGS # PKG_CLEAN optional list of non-standard cleanup files # PKG_I_START optional autoload file(s) for this package # PKG_I_EXTRA optional ordinary yorick include file(s) for this package # defined in Make.cfg # Y_CFG_HOME, Y_CFG_SITE Y_HOME, Y_SITE defined by yorick configure script # these should always both be relocate in modern yorick installations # Y_HOME, Y_SITE obsolete, set to Y_CFG_* for backward compatibility # ALL_TARGETS optional prerequisites for all: # EXE_TARGETS optional prerequisites for executable # LIB_TARGETS optional prerequisites for static library # DLL_TARGETS optional prerequisites for dynamic library # DESTDIR optional (un)install root # DEST_Y_SITE optional install Y_SITE (default: $(DESTDIR)$(Y_EXE_SITE)) # DEST_Y_HOME optional install Y_HOME (default: $(DESTDIR)$(Y_EXE_HOME)) # DEST_Y_BINDIR optional install Y_BINDIR (default: $(DESTDIR)$(Y_BINDIR)) # ------------------------------------------------------------------------ # defined in Make.cfg: # CC # Y_CFLAGS non-optimization flags required to compile (rare) # Y_LDFLAGS non-optimization flags required to laod (rare) # EXE_SFX .exe for WIN32, blank for UNIX # PLUG_SFX .dll for WIN32, .so for UNIX, .sl for HPUX # PLUG_EXPORT ld flags for yorick exe that can dlopen packages # PLUG_LIB ld library containing dlopen # PLUG_SHARED ld flags to create a dll (may reference Y_EXE) # PLUG_PIC cc flags unique to modules to go in a dll (-fPIC) PKG_EXE=$(PKG_EXENAME)$(EXE_SFX) PKG_LIB=lib$(PKG_NAME).a PKG_DLL=$(PKG_NAME)$(PLUG_SFX) PKG_DEF=$(PKG_NAME).def Y_LIBEXE=$(Y_EXE_HOME)/lib Y_INCLUDE=$(Y_EXE_HOME)/include CODGER=$(Y_LIBEXE)/codger$(EXE_SFX) LIBDEP=$(Y_LIBEXE)/libdep.sh # might want to override these on make command line Y_IDIR=-I$(Y_INCLUDE) Y_LDIR=-L$(Y_LIBEXE) PKG_L_OPT=-L. -l$(PKG_NAME) # note that PLUG is defined in Makeexe or Makedll CFLAGS=$(COPT) $(Y_CFLAGS) $(PKG_CFLAGS) $(PLUG) -I. $(Y_IDIR) LDFLAGS=$(COPT) $(Y_LDFLAGS) $(PKG_LDFLAGS) ARFLAGS=rc Y_HOME_ALT= EXTRA_LIBS=`$(LIBDEP) "$(Y_EXE_HOME)" "$(Y_HOME_ALT)" $(EXTRA_PKGS)` LD_EXE=$(CC) $(LDFLAGS) $(PLUG_EXPORT) EXE_LIBS=$(PKG_L_OPT) $(Y_LDIR) $(PKG_DEPLIBS) $(EXTRA_LIBS) -lyor $(SYS_LIBS) Y_MAIN_O=$(Y_LIBEXE)/main.o LD_DLL=$(CC) $(LDFLAGS) $(PLUG_SHARED) DLL_LIBS=$(PKG_DEPLIBS) $(MATHLIB) DLL_DEF=$(YWIN_DEF) SYS_LIBS=$(X11LIB) $(FPELIB) $(MATHLIB) $(PLUG_LIB) # here are full warning options for gcc (for COPT) GCCOPTS=-g -O2 -ansi -pedantic -Wall $(GCCPROTO) GCCPROTO=-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations #------------------------------------------------------------------------ # standard targets # macros in target names or dependency lists must be defined above here all: $(ALL_TARGETS) $(TGT) exe: $(PKG_EXE) dll: $(PKG_DLL) # Makeexe or Makedll used to get portable conditional make: # contain PLUG macro, PKG_EXE, PKG_LIB, PKG_DLL targets $(PKG_DEF): echo IMPORTS >$@ sed -e "s/.*/\0 = `basename $(Y_EXE)`.\0/" <$(Y_LIBEXE)/yorapi.def >>$@ ywrap.c: Makefile $(CODGER_DEP) $(PKG_I_DEPS) $(CODGER) w $(PKG_NAME) $(PKG_I_DIR) $(PKG_I) yinit.c: Makefile $(CODGER_DEP) $(CODGER) i "$(Y_CFG_HOME)" "$(Y_CFG_SITE)" $(EXTRA_PKGS) $(PKG_NAME) yinit.o: yinit.c $(H_YWRAP) ywrap.o: ywrap.c $(H_YWRAP) check: check-$(TGT) check-exe: $(PKG_EXE) check.i ./$(PKG_EXE) -batch check.i check-dll: $(PKG_DLL) check.i $(Y_EXE) -batch check.i dist: distclean D=`pwd`; D=`basename "$$D"`; cd ..; tar cvf - "$$D"|gzip - >"$$D.tgz" # following have two colons so you can define additional rules elsewhere # install-exe build and install PKG_EXE assuming TGT=exe # install-dll build and install PKG_DLL assuming TGT=dll # install build and install PKG_$(TGT) # install0 build PKG_EXE, install all but PKG_EXE executable # make clean; make TGT=exe install0; make clean; make TGT=dll install # builds and installs both static and dynamic libraries # use install instead of install0 to also install static executable Y_GROUP=`cat $(Y_LIBEXE)/install.grp` YNSTALL=$(Y_LIBEXE)/install.sh $(Y_GROUP) DESTDIR= DEST_Y_SITE=$(DESTDIR)$(Y_EXE_SITE) DEST_Y_HOME=$(DESTDIR)$(Y_EXE_HOME) DEST_Y_BINDIR=$(DESTDIR)$(Y_BINDIR) install:: install-$(TGT) $(YNSTALL) $(PKG_I_DEPS) $(DEST_Y_SITE)/i0 if test -n "$(PKG_I_START)"; then $(YNSTALL) $(PKG_I_START) $(DEST_Y_HOME)/i-start; fi if test -n "$(PKG_I_EXTRA)"; then $(YNSTALL) $(PKG_I_EXTRA) $(DEST_Y_SITE)/i; fi if test -f "$(PKG_NAME).cfg"; then $(YNSTALL) $(PKG_NAME).cfg $(DEST_Y_SITE)/lib; fi install-exe:: install0 $(YNSTALL) $(PKG_EXE) $(DEST_Y_BINDIR) install0:: $(PKG_EXE) $(YNSTALL) $(PKG_LIB) $(DEST_Y_HOME)/lib $(RANLIB) $(DEST_Y_HOME)/lib/$(PKG_LIB) if test -f "$(PKG_LIB).dep"; then $(YNSTALL) $(PKG_LIB).dep $(DEST_Y_SITE)/lib; fi install-dll:: $(PKG_DLL) $(YNSTALL) $(PKG_DLL) $(DEST_Y_HOME)/lib uninstall:: if test $(PKG_EXE) != yorick; then rm -f $(DEST_Y_BINDIR)/$(PKG_EXE); fi rm -f $(DEST_Y_HOME)/lib/$(PKG_LIB) $(DEST_Y_HOME)/lib/$(PKG_LIB).dep $(DEST_Y_HOME)/lib/$(PKG_DLL) cd $(DEST_Y_SITE)/i0; for file in $(PKG_I); do rm -f `basename $$file`; done if test -n "$(PKG_I_START)"; then cd $(DEST_Y_HOME)/i-start; for file in $(PKG_I_START); do rm -f `basename $$file`; done; fi if test -n "$(PKG_I_EXTRA)"; then cd $(DEST_Y_SITE)/i; for file in $(PKG_I_EXTRA); do rm -f `basename $$file`; done; fi # non-Y_HOME package installation to directory DEST (default relocate) # install2 install to directory other than Y_EXE_HOME # uninstall2 uninstall from directory other than Y_EXE_HOME DEST=relocate install2: echo $(Y_EXE_HOME) >Y_HOME.txt @$(MAKE) DEST_Y_HOME=$(DEST) DEST_Y_SITE=$(DEST) DEST_Y_BINDIR=$(DEST)/bin TGT=$(TGT) install $(YNSTALL) Y_HOME.txt $(DEST)/bin uninstall2: @$(MAKE) DEST_Y_HOME=$(DEST) DEST_Y_SITE=$(DEST) DEST_Y_BINDIR=$(DEST)/bin TGT=$(TGT) uninstall rm -f $(DEST)/bin/Y_HOME.txt if test $(DEST) = relocate; then rm -rf relocate; fi debug: @$(MAKE) TGT=exe COPT=-g clean:: rm -f *~ '#'* core* *.core a.out yinit.* ywrap.* *.dep so_locations Make.tmp rm -f Y_HOME.txt rm -f $(OBJS) $(PKG_EXE) $(PKG_LIB) $(PKG_DLL) $(PKG_DEF) $(PKG_CLEAN) distclean:: clean $(Y_DISTMAKE) rm -f Makefile.old rm -rf relocate distmake: if S="s/^Y_MAKEDIR=.*/Y_MAKEDIR=/;s/^Y_EXE=.*/Y_EXE=/;\ s/^Y_EXE_PKGS=.*/Y_EXE_PKGS=/;s/^Y_EXE_SITE=.*/Y_EXE_SITE=/;\ s/^Y_EXE_HOME=.*/Y_EXE_HOME=/;s/^Y_HOME_PKG=.*/Y_HOME_PKG=/";\ sed -e "$$S" Makefile >Make.tmp; then mv Make.tmp Makefile; fi # create optional $(PKG_NAME).cfg file which records package configuration # do make dumpconfig before make install # this information insufficient on some platforms dumpconfig: @rm -f $(PKG_NAME).cfg @echo "$(PKG_NAME).cfg built by Make on `date`" >> $(PKG_NAME).cfg @echo "HOST=`uname -a`" >>$(PKG_NAME).cfg @echo 'PKG_CFLAGS=$(PKG_CFLAGS)' >> $(PKG_NAME).cfg @echo 'PKG_LDFLAGS=$(PKG_LDFLAGS)' >> $(PKG_NAME).cfg @echo 'PKG_DEPLIBS=$(PKG_DEPLIBS)' >> $(PKG_NAME).cfg @echo 'CC_FULL=$(CC)' >> $(PKG_NAME).cfg # grab the executable name from the $CC @echo "CC_PATH=`which \`echo $(CC) | awk 'BEGIN { FS=\" \" };{print $$1}'\``" >> $(PKG_NAME).cfg # grab the arguments (everyhing after the excutable) from CC @echo "CC_OPT=`echo $(CC) | awk 'BEGIN { FS=\" \" };{{ for (f=2; f <= NF; f++) { if (f != 1 && f != 9) printf(\"%s \", $$f);}}}'`" >>$(PKG_NAME).cfg @echo "LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)" >>$(PKG_NAME).cfg @echo "PATH=$(PATH)" >>$(PKG_NAME).cfg Gyoto-1.2.0/yorick/Orbite.i000066400000000000000000000077731302352257300155310ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ // This file is a port from tools/Orbite.C rev. 66 #include "gyoto.i" width=15; prec=12; mm=1; // BH mass, still unsused aa=0.995; radius=1; gg=gyoto_KerrBL(spin=aa,mass=mm); //gg_gen=gyoto_AnalyticMetric_new(mm); //To be changed : gen=0;// 1=use generic metric, 0=use Kerr name="StarOrbitXYZ.dat";// name of the saving file tstop=-2000.;//integration stops when t=tstop // initial conditions : //***CI Kerr Equatorial*** ri=10.790954422036;//at apo ; cf Eric Eq. 5.57 et CondInitKerrEquat.nb r2=ri*ri; a2=aa*aa; thetai=pi/2.; sinu=sin(thetai); cosi=cos(thetai); sinu2=sinu*sinu; cosi2=cosi*cosi; sigma=r2+a2*cosi2; phii=0.; tobs=1000;//observation time (chosen) robs=100;//observer distance ttrav=robs;//approximate photon travel time ti=tobs-4.*ttrav; //cf Levin & Perez-Giz 2008 Ph Rv D 77, 1003005, Fig. 15 bottom right EE=.921103; LL=2.; QQ=0.;//equatorial plane //cf LevinPerez Eq. A7 lambda=1.-2*mm*ri/sigma; xi=2.*mm*aa*ri*sinu2/sigma; gamma = sinu2*(r2+a2+2.*mm*a2*ri*sinu2/sigma); fact=1./(gamma*lambda+xi*xi); phipointi=lambda*fact*LL+xi*fact*EE; tpointi=-xi*fact*LL+gamma*fact*EE; write, format= "phipointi %e tpointi %e\n", phipointi, tpointi; //cf MTW 33.31d : thetapoint2=(QQ-LL*LL/(tan(thetai)*tan(thetai))+a2*(EE*EE-1.)*cosi2)/(sigma*sigma); //cout << "thetapoint2= " << thetapoint2 << endl; if (-thetapoint2 < 1e-10) thetapoint2=0;// if thetapoint2 slightly < 0... if (thetapoint2 < 0.) error , "thetapoint2 < 0 !!! aborting..."; thetapointi=sqrt(thetapoint2); //cout << "thetapoint " << thetapointi << endl; pthetai=sigma*thetapointi; //cout << "pthetai= " << pthetai << endl; posi=[ti,ri,thetai,phii]; //cout << "ri thi phi " << setprecision(prec) << ri << " " << thetai << " " << phii << endl; if (!gen) { gtt = gg(posi, 1, 1); grr = gg(posi, 2, 2); gthth = gg(posi, 3, 3); gphph = gg(posi, 4, 4); gtph = gg(posi, 1, 4); }else{ gtt =gg_gen(posi, 1, 1); grr =gg_gen(posi, 2, 2); gthth =gg_gen(posi, 3, 3); gphph =gg_gen(posi, 4, 4); gtph =gg_gen(posi, 1, 4); } rpoint2=(-1.-gtt*tpointi*tpointi-2.*gtph*tpointi*phipointi-gthth*thetapointi*thetapointi-gphph*phipointi*phipointi)/grr; if (-rpoint2 < 1e-10) rpoint2=0;// if rpoint2 slightly < 0... //cout << "rpoint2 " << rpoint2 << endl; if (rpoint2 < 0.) error, "rpoint2 < 0 !!! aborting..."; rpointi=sqrt(rpoint2); Bigdelta=r2-2.*mm*ri+a2; //cout << "Bigdelta" << Bigdelta << endl; pri=sigma/Bigdelta*rpointi; //cout << "pri= " << pri << endl; cst=[1.,EE,LL,QQ];//4 Kerr cst of motion µ, E, L, Q pti=-EE; pphii=LL; yinit=[ti,ri,thetai,phii,pti,pri,pthetai,pphii]; if (gen) init=[ti, ri, thetai, phii, tpointi, rpointi, thetapointi, phipointi];\ else init = gg (get_coord = yinit, cst); write,"\n"; write, format="phidot= %e tdot= %e\n", init(8), init(5); write,"\n"; write,"dans Orbit.i yinit= "+pr1(yinit); write,"dans Orbit.i init= "+pr1(init); t0=init(1); r0=init(2); theta0=init(3); phi0=init(4); tdot0=init(5); rdot0=init(6); thetadot0=init(7); phidot0=init(8); v= [rdot0/tdot0, thetadot0/tdot0, phidot0/tdot0]; if (gen) st=gyoto_Star(metric=gg_gen,radius=radius,initcoord=init,v) ;\ else st=gyoto_Star(metric=gg, radius=radius, initcoord=init, v) ; gyoto_Star_xFill,st,tstop; gyoto_Star_get_coord,st,t,r; gyoto_Star_get_xyz, st, x, y, z; f=open(name, "w"); write, f, format="%15.12g %15.12g %15.12g %15.12g\n", r, x, y, z; close, f; Gyoto-1.2.0/yorick/README000066400000000000000000000032401302352257300147740ustar00rootroot00000000000000 Gyoto for Yorick This is a Yorick plug-in giving access to the Gyoto library. It comes with a (GTK) graphical interface. 1- Prerequisites (see details below): _____________________________________ Yorick ______ For direct access to Gyoto, only Yorick is required. Yorick comes precompiled with many distributions of linux and is present in the Macports. You can also find binaries and source code at http://yorick.sourceforge.net/ Yorick >= 2.2 is needed. For the graphical user interface Gyotoy, you'll need a few additional pieces. First of all, I seriously doubt it will run under MS Windows, but please report any news on that front. Yutils ______ A collection of utilities for Yorick, distributed as yorick-yutils in many Linux distributions. Actually, only pyk.i is used in Gyotoy (so far). Either get yutils > 1.4.0 from e.g. http://www.maumae.net/yorick/packages/src/ or fetch pyk.i from the CVS browser at http://yorick.cvs.sourceforge.net/viewvc/*checkout*/yorick/yorick-yutils/pyk.i Yorick-GY _________ The graphical interface gyotoy needs an additional Yorick plug-in, plus the Gtk 3 library. Check README.gyotoy. 2- Building ___________ Building the Gyoto plug-in is done the standard way: ./configure make You can check the package by running make check or by trying out the graphical interface, if you have installed all the dependencies: ./gyotoy.i 3- Installing _____________ make install 4- Running __________ Read gyoto.i and check.i for using Gyoto from within Yorick. The graphical interface, Gyotoy, can be run with yorick -i gyotoy.i If everything goes well, ./gyotoy should do, too. 5 June 2013, Thibaut Paumard.Gyoto-1.2.0/yorick/README.gyotoy000066400000000000000000000021321302352257300163240ustar00rootroot00000000000000Running gyotoy ______________ Gyotoy is a small graphical user interface (a.k.a. "a toy", or GUI) to vizualize a single geodesic (a star orbit or a photon trajectory) in a metric. It currently supports any metric with a spherical-like coordinate system: KerrBL spin can be set directly, and any GYOTO Metric can be loaded from an XML description file. The hard work is done by the Yorick GYOTO plug-in. In addition, the Yorick gy plug-in is needed, as well as the Gtk 3 GObject Instrospection files. For now, you will need to compile gy from source: git clone git://github.com/paumard/yorick-gy.git cd yorick-gy yorick -batch make.i make make install The GObject Introspection files for Gtk 3 may have been packaged for your platform. Under Mac OS X using macports, try: sudo port install gtk3 Under a Debian or derivative GNU/Linux system: sudo apt-get install gir1.2-gtk-3.0 If you get an error message in the lines of "Glib: no schemas installed on the system", set the environment variable XDG_DATA_DIRS in your shell (for instance in $HOME/.profile): export XDG_DATA_DIRS=/opt/local/share Gyoto-1.2.0/yorick/RayTracing.i000066400000000000000000000174571302352257300163500ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ // Yorick port of ../tools/RayTracing.C rev. 66 #include "gyoto.i" /* This program aims at computing the null geodesics of photons from an observation screen to an astrophysical object (star orbit, fixed star or disk). The final result is a list of illuminated pixels. */ //****CHOOSE COORDINATES*** ChooseCoord="BL"; //"BL", "KS" or "Kerr" //************************* //******************************************** // Definition of Metric and Observer position* //******************************************** //Metric definition : mm=1; //BH mass aa=0.7; //BH spin write, "\n"; write, format="BH spin= %g\n", aa; //Kerr metric construction if (ChooseCoord=="BL") gg=gyoto_KerrBL(spin=aa,mass=mm) ; \ else if (ChooseCoord=="KS") gg=gyoto_KerrKS(spin=aa,mass=mm) ; //Observer position : // Observer Boyer Lindquist (BL) coord : r0=100.;//100; /* 100 = star orbit ; 45 = disk*/ theta0=1.22;//0.785;//1.22; //0.05;//1.309;//75 deg //pi/4.;//pi/2.;//x axis //75 deg = 1.309 rad ; 70 deg = 1.22 rad //45 deg = 0.785 rad /* 0.05 = star orbit ; 1.309 = 75 deg = disk */ phi0=0;//0.; /* 0. = star orbit ; pi/4. = disk */ tobs0=1000.; delta_t=0.;//31.;//change delta_t if you wan't to make a movie... write, format="Observing time delta_t= %g\n", delta_t; tobs=tobs0+delta_t;//observation time t0=tobs;//for time-reversed integration, initial time for photon (not for star if ray-tracing a star...) prec=8;width=15;fmts="%"+pr1(width)+"."+pr1(prec)+"g"; //format string pos=array(double,8); // Corresponding observer Kerr-Schild space and time coord (cf Hameury, Marck, Pelat 93): psi0=phi0-0.5*aa/sqrt(mm*mm-aa*aa)*log(abs((1+(r0-mm)/(sqrt(mm*mm-aa*aa)))/(1-(r0-mm)/(sqrt(mm*mm-aa*aa))))); x0=(r0*cos(psi0)-aa*sin(psi0))*sin(theta0); y0=(r0*sin(psi0)+aa*cos(psi0))*sin(theta0); z0=r0*cos(theta0); T0=1000.; if (ChooseCoord=="BL" || ChooseCoord=="Kerr") pos(1:4)=[t0, r0, theta0, phi0];\ else if (ChooseCoord=="KS") pos(1:4)=[T0, x0, y0, z0]; write, format="%s\n", "setting pos: "+pr1(pos); screen=gyoto_Screen(metric=gg, observerpos=pos); //****************** // Object creation * //****************** { // variables defined below are local in the C++ code, // THIS DOES NOT WORK IN YORICK !!! // everything is global //OBJECT == STAR ORBIT //CI = ISCO in equatorial plane Z1=1.+(1.-aa*aa/(mm*mm))^(1./3.)*((1.+aa/mm)^(1./3.)+(1.-aa/mm)^(1./3.)); Z2=sqrt(3.*aa*aa/(mm*mm)+Z1*Z1);//cf Bardeen 1972 2.21 risco=mm*(3.+Z2-sqrt((3.-Z1)*(3.+Z1+2.*Z2)));//ISCO thetai=1.5708; phii=0.; rhor=mm+sqrt(mm*mm-aa*aa);//event horizon radius=0.5;//0.5;//0.4;//1.2;//NB : cf Trippe et al 2007 ("IR polarized flare") , R_hotspot < 0.3 * R_S = 0.6 ri=risco+radius;// so that the point of the star closest to the BH is on the ISCO : the entire star must not be closer than ISCO to be able to orbit. //pay attention to the fact that changing the radius of the star thus changes its trajectory write, format="risco= "+fmts+"\n", risco; write, format="rhor= "+fmts+"\n", rhor; write, format="star radius= "+fmts+"\n", radius; write, format="ri +/- rstar= "+fmts+" "+fmts+"\n", ri-radius, ri+radius; ttravel=r0;//approximate photon travel time (r0=c*tobs=tobs) ti=tobs0-4.*ttravel; pri=0.;//BL canonical momentum p_r pthetai=0.;//BL canonical momentum p_theta yinit=[ti,ri,thetai,phii,ti,pri,pthetai]; //cf Bardeen 1972 2.12-2.15: //these equations assume that the particule mass is 1. if (aa==1.) { E=(ri+sqrt(mm*ri)-mm)/(ri^(3./4.)*sqrt(ri^(1./2.)+2.*sqrt(mm))); L=(mm*(ri^(3./2.)+sqrt(mm)*ri+mm*sqrt(ri)-mm^(3./2.)))/(ri^(3./4.)*sqrt(ri^(1./2.)+2.*sqrt(mm))); }else{ E=(ri^(3./2.)-2*mm*sqrt(ri)+aa*sqrt(mm))/(ri^(3./4.)*sqrt(ri^(3./2.)-3.*mm*sqrt(ri)+2.*aa*sqrt(mm))); L=(sqrt(mm)*(ri*ri-2.*aa*sqrt(mm)*sqrt(ri)+aa*aa))/(ri^(3./4.)*sqrt(ri^(3./2.)-3.*mm*sqrt(ri)+2.*aa*sqrt(mm))); } Q=0.; cst=[1.,E,L,Q];//1. = star mass, not used in MakeCoord write,format="dans main E,L= "+fmts+" "+fmts+"\n", cst(2), cst(3); //Proper time step, number of proper time steps //double delta=0.1; niter=230;//chosen so that the orbit is computed for [ti;tobs] init=gg(get_coord = yinit, cst); t0=init(1); r0=init(2); theta0=init(3); //cout << "theta0 dans rt.C : " << theta0 << endl; phi0=init(4); tdot0=init(5); rdot0=init(6); thetadot0=init(7); phidot0=init(8); //cout << "coord init dans rt.C " << t0 << " " << r0 << " " << theta0 << " " << phi0 << " " << tdot0 << " " << rdot0 << " " << thetadot0 << " " << phidot0 << endl; //Kerr coordinates : (cf article null hypersurface Eric) tdot0_Kerr=tdot0+rdot0/((r0*r0+aa*aa)/(2.*mm*r0)-1.); phidot0_Kerr=phidot0+aa*rdot0/(r0*r0-2.*mm*r0+aa*aa); v= [rdot0/tdot0, thetadot0/tdot0, phidot0/tdot0]; pos=[t0, r0,theta0,phi0]; "gg:"; gyoto_Metric_g(gg, pos, ChooseCoord); "radius: "+pr1(radius); "pos: "+pr1(pos); "v: "+ pr1(v); "ChooseCoord: "+ ChooseCoord; if (ChooseCoord=="BL") orbit = gyoto_Star(metric=gg, radius=radius, initcoord=pos, v) ; \ else { v_Kerr= [rdot0/tdot0_Kerr, thetadot0/tdot0_Kerr, phidot0_Kerr/tdot0_Kerr]; pos_Kerr=[t0,r0,theta0,phi0]; //cout << endl; //cout << "pos init star= " << t0 << " " << r0 << " " << theta0 << " " << phi0 << endl; //cout << endl; orbit = gyoto_Star(metric=gg, radius=radius, initcoord=pos_Kerr, v_Kerr) ; } //OBJECT == FIXED STAR //NB : theta_ein=sqrt(4.*M*dLS/(dL*dS)) // if (ChooseCoord=="BL") { // StarPos=[10.,pi/2.,pi]; //BL star (fixed) space coord // } else if (ChooseCoord=="KS") { // StarPos=[-10.,0.,0.];//KS star (fixed) space coord // } //FixedS = gyoto_FixedStar(position=StarPos,radius=radius,metric=gyotoKerrBL()); //OBJECT == DISK // ThinDisk = gyoto_ThinInfiniteDisk_new(gg,ChooseCoord); } //*************************** // Null geodesic integration* //*************************** //Proper time step, number of proper time steps deltatau=.01;//1.; pixels = open("pix.dat", "w");//illuminated pixels on screen N=1001;//501;//1023;//501;//3001;//number of pixels in each direction //angular pixel step : //double delta=pi/(double(N));//all sky view : fov = pi //warning : vel[3] in Metric::getRayCoord is not defined everywhere. //double delta=pi/(4.*double(N));//limited view : fov = pi/4. for DISK delta=pi/(10.*double(N));//limited view : fov = pi/10. for ORBIT ph=gyoto_Photon_new(); coordout=ChooseCoord; for (i=368;i<=368;i++) { //i=251 with a=0.9 integration doesn't progress write, "\n"; write, "******************\n"; write, format= "i = %d\n", i; write, "******************\n"; write, "\n"; xscr=delta*(i-(N+1)/2.); for (j=474;j<=474;j++) { //j=315 with a=0.9 integration doesn't progress yscr=delta*(j-(N+1)/2.); coord=screen(raycoord=[-xscr, yscr]); //1. Init cond : gyoto_Photon_setInitialCondition,ph, gg, orbit, coord; //2. delta : gyoto_Photon_setDelta,ph,deltatau; //3. hit : if (gyoto_Photon_hit(ph, 0.)) write, pixels, format="%15i %15d %15.12g\n", i, j, gyoto_Star_get_redshift(orbit)^3; //4. save : //gyoto_Photon_save_xyz(ph,"xyz.dat"); } } close, pixels; Gyoto-1.2.0/yorick/check-directionaldisk.i000066400000000000000000000072151302352257300205170ustar00rootroot00000000000000/* Copyright 2014 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "check-helpers.i" begin_section, "DirectionalDisk Astrobj"; nnu=2; ni=2; nr=10; intensity=array(double, nnu, ni, nr); intensity(,1,1::2)=10.; intensity(,1,2::2)=7.; intensity(,1,3::8)=4.; intensity(,1,9::10)=1.; intensity(,2,)=0.1*intensity(,1,); freq=array(double,nnu); cosi=array(double,ni); radius=indgen(nr)*5.; freq(1)+=100.; freq(2)+=10.; cosi+=0.5; metric = gyoto_KerrBL(mass=4e6*GYOTO_SUN_MASS); write, format="%s", "Creating DirectionalDisk..."; pd = gyoto_DirectionalDisk(copyintensity=intensity, copygridfreq=freq, copygridcosi=cosi, copygridradius=radius, metric=metric, rmax=100, innerradius=6, outerradius=50 ); write, format="%s\n", " done."; write, format="%s\n", "Printing DirectionalDisk:"; pd; write, format="%s\n", " done."; screen = gyoto_Screen(metric=metric, resolution=64, time=1000.*metric.unitlength()/GYOTO_C, distance=100.*metric.unitlength(), fov=30./100., inclination=110./180.*pi, paln=pi); write, format="%s", "Attaching DirectionalDisk to scenery..."; sc = gyoto_Scenery(metric=metric, screen=screen, astrobj=pd); write, format="%s\n", " done."; if (gyoto_haveXerces() && gyoto_haveCFITSIO()) { write, format="%s", "Saving data to fits file..."; pd, fitswrite="!check-directionaldisk.fits.gz"; write, format="%s\n", " done."; write, format="%s", "Saving scenery to XML file..."; sc, xmlwrite="check-directionaldisk.xml"; write, format="%s\n", " done."; write, format="%s", "Reading back scenery..."; sc2 = gyoto_Scenery("check-directionaldisk.xml"); write, format="%s\n", " done."; write, format="%s", "Removing temporary files..."; remove, "check-directionaldisk.xml"; remove, "check-directionaldisk.fits.gz"; write, format="%s\n", " done."; } else { write, format="%s", "Cloning..."; sc2 = sc.clone(); write, format="%s\n", " done."; } write, format="%s", "Getting DirectionalDisk..."; pd2 = sc2.astrobj(); write, format="%s\n", " done."; write, format="%s", "Comparing intensity array..."; if (anyof(intensity != pd2.copyintensity())) error, "CHECK FAILED"; write, format="%s\n", " done."; write, format="%s", "Comparing freq array..."; if (anyof(freq != pd2.copygridfreq())) error, "CHECK FAILED"; write, format="%s\n", " done."; write, format="%s", "Comparing cosi array..."; if (anyof(cosi != pd2.copygridcosi())) error, "CHECK FAILED"; write, format="%s\n", " done."; write, format="%s", "Comparing radius array..."; if (anyof(radius != pd2.copygridradius())) error, "CHECK FAILED"; write, format="%s\n", " done."; write, format="%s", "Performing raytracing...\n"; im = sc(); write, format="%s\n", "done."; write, format="%s", "Displaying image..."; window, style="nobox.gs"; pli, im; write, format="%s\n", " done."; pause, 1000; if (batch()) winkill; end_section, "DirectionalDisk Astrobj"; Gyoto-1.2.0/yorick/check-disk3d.i000066400000000000000000000055341302352257300165320ustar00rootroot00000000000000/* Copyright 2012, 2014-2015 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "check-helpers.i" begin_section, "Disk3D Astrobj"; emissquant=array(double, 1, 2, 10 ,10); emissquant(,1,,1:3)=100.; emissquant(,2,,4:10)=100.; velocity=array(1., 3, 2, 10, 10); metric = gyoto_KerrBL(mass=4e6*GYOTO_SUN_MASS); write, format="%s", "Creating Disk3D..."; pd = gyoto_Disk3D(copyemissquant=emissquant, copyvelocity=velocity, rin=3, rout=28, zmin=1., zmax=10., phimin=0., phimax=2.*pi, repeatphi=8, metric=metric); write, format="%s\n", " done."; write, format="%s\n", "Printing Disk3D:"; pd; write, format="%s\n", " done."; screen = gyoto_Screen(metric=metric, resolution=64, time=1000.*metric.unitlength()/GYOTO_C, distance=100.*metric.unitlength(), fov=30./100., inclination=110./180.*pi, paln=pi); write, format="%s", "Attaching Disk3D to scenery..."; sc = gyoto_Scenery(metric=metric, screen=screen, astrobj=pd); write, format="%s\n", " done."; if (gyoto_haveXerces() && gyoto_haveCFITSIO()) { write, format="%s", "Saving data to fits file..."; pd, fitswrite="!check-disk3d.fits.gz"; write, format="%s\n", " done."; write, format="%s", "Saving scenery to XML file..."; sc, xmlwrite="check-disk3d.xml"; write, format="%s\n", " done."; write, format="%s", "Reading back scenery..."; sc2 = gyoto_Scenery("check-disk3d.xml"); write, format="%s\n", " done."; write, format="%s", "Removing temporary files..."; remove, "check-disk3d.xml"; remove, "check-disk3d.fits.gz"; write, format="%s\n", " done."; } else { write, format="%s", "Cloning..."; sc2 = sc.clone; write, format="%s\n", " done."; } write, format="%s", "Getting Disk3D..."; pd2 = sc2.astrobj; write, format="%s\n", " done."; write, format="%s", "Comparing emissquant array..."; if (anyof(emissquant != pd2.copyemissquant())) error, "CHECK FAILED"; write, format="%s\n", " done."; write, format="%s", "Comparing velocity array..."; if (anyof(velocity != pd2.copyvelocity())) error, "CHECK FAILED"; write, format="%s\n", " done."; end_section, "Disk3D Astrobj"; Gyoto-1.2.0/yorick/check-helpers.i000066400000000000000000000134041302352257300170060ustar00rootroot00000000000000/* Copyright 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ /* This file contains helpers for the various check*.i files in the Gyoto source. */ #include "gyoto.i" #include "gyoto_std.i" #include "matrix.i" #include "linalg.i" func doing(msg, dots) { if (is_void(dots)) dots=1; if (dots) format="%s..."; else format="%s"; write, format=format, msg; } func done {write, format="%s\n", " done.";} func dot {write, format="%s", ".";} func output(msg) {write, format="%s\n", msg;} func hline(a,w) { if (is_void(a)) a="_"; if (is_void(w)) w=80; b=""; for (i=1; i<=w; ++i) b+=a; output, b; } func begin_section(name, comment) { hline, "*"; if (is_void(comment)) comment=""; else comment=" ("+comment+")"; output, "CHECKING "+strcase(1, name)+comment; hline, "*"; } func end_section(name, comment) { hline, "*"; if (is_void(comment)) comment=""; else comment=" ("+comment+")"; output, "ALL TESTS PASSED FOR "+strcase(1, name)+comment; hline, "*"; } func jacobian(met, pos, eps=) /* DOCUMENT jac=jacobian(met, pos[, eps=]) Compute the Jacobian matrix of metric met, i.e.: jac(nu, mu, a) := d(met(pos)(nu, mu))/dx^a Derivatives are evaluated by finite difference using the infinitesimal step EPS (default: 1e-10). */ { grad=array(double, 4, 4, 4); if (is_void(eps)) eps=1e-6; for (i=1; i<=4; ++i) { delta=array(0., 4); delta(i)=eps; grad(,,i)=(met(pos+delta)-met(pos-delta))/(2.*eps); } return grad; } func gmunu_up(met, pos) /* DOCUMENT gup=gmunu_up(met, pos) Return gup, the inverse matrix of the Metric: met(pos, nu, mu) := g_mu_nu gup(nu, mu):= g^mu^nu It is computed using LUsolve(). */ { g=met(pos); return LUsolve(g); } func christoffel(met, pos, eps=) /* DOCUMENT Gamma = christoffel(met, pos) Compute the 64 Christoffel symbols of metric MET: Gamma(nu, mu, a) := Gamma^a_mu_nu Uses gmunu_up() and jacobian(). The computation is done using only the method gmunu in the metric and can therefore be used for a consistency check with the christoffel method. */ { res=array(double, 4, 4, 4); gup=gmunu_up(met, pos); jac=jacobian(met, pos, eps=eps); for (a=1; a<=4; ++a) { for (mu=1; mu<=4; ++mu) { for (nu=1; nu<=4; ++nu) { for (i=1; i<=4; ++i) { res(nu, mu, a) += 0.5*gup(a, i)*( jac(nu, i, mu) +jac(i, mu, nu) -jac(nu, mu, i)); } } } } return res; } func check_christoffels(gg, pos, tolerance=, eps=) /* DOCUMENT check_christoffels, GG, positions Check that the two forms of the christoffel method are consistent with each other and that they are consistent with the gmunu method. */ { doing, "checking christoffel methods", 0; if (is_void(tolerance)) tolerance=1e-6; default_positions, gg, pos; d=dimsof(pos); for (n=1; n<=d(3); ++n) { Gamma1=gg(christoffel=pos(,n)); Gamma2=array(double, 4, 4, 4); for (a=1; a<=4; ++a) for (i=1; i<=4; ++i) for (j=1; j<=4; ++j) Gamma2(j,i,a)=gg(christoffel=pos(,n), j, i, a); Gamma3=christoffel(gg, pos(,n), eps=eps); if (anyof(Gamma1!=Gamma2)) error, "The two forms of the christoffel method don't yield the same result"; if (max(abs(Gamma1-Gamma3))>tolerance) error, "The Christoffels don't agree with their numerical estimate"; dot; } done; } func default_positions(gg, &pos) { if (is_void(pos)) pos=[[0., 10., 1., 2.]]; d=dimsof(pos); if (d(1)==1) { pos=[ pos ]; } } func check_gmunu(gg, pos, tolerance=) /* DOCUMENT check_gmunu, gg, positions Check that the two forms of the gmunu method are consistent with each other and that the matrix is symmetric. */ { if (is_void(tolerance)) tolerance=1e-15; default_positions, gg, pos; d=dimsof(pos); doing, "checking metric coefficients", 0; for (n=1; n<=d(3); ++n) { g=gg(pos); g2=array(double, 4, 4); for (i=1; i<=4; ++i) g2(i, )=gg(pos, i, ); gm1=g*0.+1.; gm1(where(g))=g(where(g)); if (max(abs((g2-g)*gm1)) > tolerance) error, "The two forms of the gmunu method don't yield the same result"; if (anyof(g != transpose(g))) error, "The metric is not symmetric"; dot; } done; } func check_gmunu_up(gg, pos, tolerance=) /* DOCUMENT check_gmunu_up, gg, positions Check that the gmunu_up method yields the inverse of the gmunu method. Note that not all metric kinds implement the gmunu_up method. */ { doing, "checking gmunu_up method", 0; if (is_void(tolerance)) tolerance=1e-15; default_positions, gg, pos; d=dimsof(pos); for (n=1; n<=d(3); ++n) { g=gg(pos(,n)); gup=gg(gmunu_up=pos(,n)); gup2=array(double, 4, 4); for (i=1; i<=4; ++i) gup2(i, )=gg(gmunu_up=pos(,n), i, ); prod=g(,+)*gup(+,); gm1=gup*0.+1.; gm1(where(gup))=gup(where(gup)); if (max(abs((gup2-gup)*gm1)) > tolerance) error, "The two forms of the gmunu_up method don't yield the same result"; if (max(abs((prod-diag([1., 1., 1., 1.])))) > tolerance) error, "gmunu_up is not the inverse of gmunu"; dot; } done; } Gyoto-1.2.0/yorick/check-kerrbl.i000066400000000000000000000105751302352257300166330ustar00rootroot00000000000000/* Copyright 2011, 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "check-helpers.i" begin_section, "KerrBL metric", "Kerr in Boyer-Lindquist coordinates"; restore, gyoto; aa=0.995; write, format="%s", "Checking gyoto_KerrBL: "; gg=gyoto_KerrBL(spin=aa); write, format="%s\n","done.\n"; check_gmunu, gg; check_gmunu_up, gg; check_christoffels, gg; // initial conditions : ri=10.791; thetai=1.5708; phii=0.; ti=0.; pri=0.;//canonical momentum pthetai=0.; cst=[1,0.921103,2.,0.];//4 Kerr cst of motion mu, E, L, Q yinit=[ti,ri,thetai,phii,-cst(2),pri,pthetai,cst(3)]; write, format="%s", "Checking makecoord: "; coord=gg(makecoord=yinit, cst); if (abs((coord-[0,10.791,1.5708,0,1.12641,0,0,0.0187701]))(max)<1e-6) write, format="%s\n","done."; else error, "PREVIOUS CHECK FAILED"; write, format="%s\n", "Creating metric using gyoto_Kerr(spin=0.7)"; gg=gyoto_KerrBL(spin=0.7); if (gyoto_KerrBL(gg, spin=)!=0.7) error, "CHECK FAILED"; write, format="%s\n","done."; write, format="%s", "Setting spin... "; gg, spin=0.9; write, format="%s\n", "done."; write, format="%s", "Getting spin... "; if (gg.spin()!=0.9) error, "CHECK FAILED"; write, format="%s\n", "done."; //write, format="%s", "Pointer to this Metric object: gg()=="; gg(); write, format="%s\n", "Printing object. \"gg\" yields: "; gg; write, format="%s", "Setting deltamin... "; gg, deltamin=40; if (gg.deltamin()!=40) error, "CHECK FAILED"; write, format="%s\n", "done."; write, format="%s", "Setting deltamax... "; gg, deltamax=400; if (gg.deltamax()!=400) error, "CHECK FAILED"; write, format="%s\n", "done."; write, format="%s", "Setting difftol... "; gg, difftol=1e-3; if (gg.difftol()!=1e-3) error, "CHECK FAILED"; write, format="%s\n", "done."; write, format="%s", "Setting deltamaxoverr... "; gg, deltamaxoverr=2e-3; if (gg.deltamaxoverr()!=2e-3) error, "CHECK FAILED"; write, format="%s\n", "done."; write, format="%s", "Cloning... "; gg2=gg(clone=); if (gg2.deltamax()!=400 || gg2.deltamin()!=40 || gg2.difftol()!=1e-3) error, "CHECK FAILED"; write, format="%s\n", "done."; doing, "comparing the various integrators"; gg=KerrBL(spin=0.995); //gg, deltamaxoverr=0.1, deltamin=1e-6; gg2=gg.clone(); gg2, setparameter="GenericIntegrator"; st=Star(metric=gg, initcoord=[0., 10.791, pi/2., 0], [0., 0., 0.016664]); st2=Star(metric=gg2, initcoord=[0., 10.791, pi/2., 0], [0., 0., 0.016664]); st, setparameter="Integrator", "Legacy"; st2, setparameter="Integrator", "Legacy"; dates=double(indgen(100)); coords=st(get_coord=dates); coords2=st2(get_coord=dates); if (max(abs(coords-coords2))>1e-3) error, "the two Legacy integrators don't yield the same result"; if (gyoto_haveBoost()) { st3=st2(clone=); st4=st2(clone=); st5=st2(clone=); st6=st2(clone=); //st7=st2(clone=); st3, setparameter="Integrator", "runge_kutta_cash_karp54"; st4, setparameter="Integrator", "runge_kutta_fehlberg78"; st5, setparameter="Integrator", "runge_kutta_dopri5"; st6, setparameter="Integrator", "runge_kutta_cash_karp54_classic"; //st7, setparameter="Integrator", "rosenbrock4"; coords3=st3(get_coord=dates); coords4=st4(get_coord=dates); coords5=st5(get_coord=dates); coords6=st6(get_coord=dates); //coords7=st7(get_coord=dates); if (max(abs(coords-coords3))>1e-3) error, "two integrators don't yield the same result"; if (max(abs(coords-coords5))>3e-3) error, "two integrators don't yield the same result"; if (max(abs(coords-coords4))>1e-3) error, "two integrators don't yield the same result"; if (max(abs(coords-coords6))>1e-3) error, "two integrators don't yield the same result"; } done; // Free memory for testing with valgrind gg2=[]; gg=[]; aa=[]; ri=[]; thetai=[]; phii=[]; ti=[]; pri=[]; pthetai=[]; cst=[]; yinit=[]; end_section, "KerrBL metric", "Kerr in Boyer-Lindquist coordinates"; Gyoto-1.2.0/yorick/check-kerrks.i000066400000000000000000000135051302352257300166470ustar00rootroot00000000000000/* Copyright 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "check-helpers.i" func check_jacobian(gg, pos) { if (is_void(tolerance)) tolerance=1e-6; d=dimsof(pos); if (d(1)==0) { pos=[[0., 10., 1., 2.]]; d=dimsof(pos); } else if (d(1)==1) { pos=[ pos ]; d=dimsof(pos); } doing, "checking Jacobian", 0; for (n=1; n<=d(3); ++n) { j1=gg(jacobian=pos(,n)); j2=array(double, 4, 4, 4); for (a=1; a<=4; ++a) for (i=1; i<=4; ++i) for (j=1; j<=4; ++j) j2(j,i,a)=gg(jacobian=pos(,n), j, i, a); j3=jacobian(gg, pos(,n)); j4=jacfunc(gg, pos(,n)); if (anyof(j1!=j2)) error, "The two forms of the jacobian method don't yield the same result"; if (max(abs(j1-j4))>tolerance) error, "The Jacobian is wrong"; if (max(abs(j1-j3))>tolerance) error, "The Jacobian doesn't agree with its numerical estimate"; dot; } done; } func ffunc(gg, pos) { spin_=gg.spin(); a2_=spin_^2; x=pos(2); y=pos(3); z=pos(4); x2=x*x; y2=y*y; z2=z*z; a2z2=a2_*z2; tau=x2+y2+z2-a2_; rho2=tau*tau+4.*a2z2; rho=sqrt(rho2); r2=0.5*(tau+rho); r=sqrt(r2); r3=r2*r; r4=r2*r2; r2_a2=r2+a2_; rx_ay=r*x+spin_*y; ry_ax=r*y-spin_*x; f=2.*r3/(r4+a2_*z2); fr2=f*r2; return f; } func dffunc(gg, pos) { spin_=gg.spin(); a2_=spin_^2; a4=a2_*a2_; x=pos(2); y=pos(3); z=pos(4); x2=x*x; y2=y*y; z2=z*z; a2z2=a2_*z2; tau=x2+y2+z2-a2_; rho2=tau*tau+4.*a2z2; rho=sqrt(rho2); r2=0.5*(tau+rho); r=sqrt(r2); r3=r2*r; r4=r2*r2; r2_a2=r2+a2_; rx_ay=r*x+spin_*y; ry_ax=r*y-spin_*x; f=2.*r3/(r4+a2_*z2); fr2=f*r2; r4_a2z2=r4+a2z2; temp=-(2.*r3*(r4-3.*a2z2))/(r4_a2z2*r4_a2z2*rho); x2_y2_z2=x2+y2+z2; temp2=(a4+2.*r2*x2_y2_z2 - a2_* (x2_y2_z2 - 4.* z2 + rho)); return [ 0., x*temp, y*temp, -((4.*r*z*(2.* a4*a2_ + (a2_ + 2.*r2)*x2_y2_z2*x2_y2_z2 + a4*(-3.*x2 - 3.*y2 + z2 - 2.*rho) + a2_*(x2 + y2 - z2)*rho))/(rho*temp2*temp2)) ]; } func dfnum(gg, pos, eps=) { grad=array(double, 4); if (is_void(eps)) eps=1e-10; for (i=1; i<=4; ++i) { delta=array(0., 4); delta(i)=eps; grad(i)=(ffunc(gg, pos+delta)-ffunc(gg, pos-delta))/(2.*eps); } return grad; } func kfunc(gg, pos) { spin_=gg.spin(); a2_=spin_^2; x=pos(2); y=pos(3); z=pos(4); x2=x*x; y2=y*y; z2=z*z; a2z2=a2_*z2; tau=x2+y2+z2-a2_; rho2=tau*tau+4.*a2z2; rho=sqrt(rho2); r2=0.5*(tau+rho); r=sqrt(r2); r3=r2*r; r4=r2*r2; r2_a2=r2+a2_; rx_ay=r*x+spin_*y; ry_ax=r*y-spin_*x; f=2.*r3/(r4+a2_*z2); fr2=f*r2; return [ 1., rx_ay/r2_a2, ry_ax/r2_a2, z/r ]; } func dkfunc(gg, pos) { spin_=gg.spin(); a2_=spin_^2; x=pos(2); y=pos(3); z=pos(4); x2=x*x; y2=y*y; z2=z*z; a2z2=a2_*z2; tau=x2+y2+z2-a2_; rho2=tau*tau+4.*a2z2; rho=sqrt(rho2); r2=0.5*(tau+rho); r=sqrt(r2); r3=r2*r; r4=r2*r2; r2_a2=r2+a2_; rx_ay=r*x+spin_*y; ry_ax=r*y-spin_*x; f=2.*r3/(r4+a2_*z2); fr2=f*r2; frac1=1./(r2_a2*r2_a2*rho); frac2=z/(r2_a2*r*rho); frac3=-z/(r*rho); return [ // d/dt [0., 0., 0., 0.], // d/dx [ 0., (r3*(x2+rho)-rx_ay*x*(x2+y2+z2+rho)+a2_*(rx_ay*x+r*(x2+rho)))*frac1, (x*(r3*y+a2_*(ry_ax+r*y)-ry_ax*(x2+y2+z2))-(spin_*r2_a2+ry_ax*x)*rho)*frac1, x*frac3 ], // d/dy [ 0., (a2_*(rx_ay+r*x)*y+r2_a2*spin_*rho-y*(-r3*x+rx_ay*(x2+y2+z2+rho)))*frac1, (r3*(y2+rho)-ry_ax*y*(x2+y2+z2+rho)+a2_*(ry_ax*y+r*(y2+rho)))*frac1, y*frac3 ], // d/dz [ 0., ((a2_-r2)*x-2*spin_*r*y)*frac2, ((a2_-r2)*y+2*spin_*r*x)*frac2, (2.*r2- (z2*(a2_ + x2 + y2 + z2 + rho))/rho)/(2.*r3) ] ] } func dknum(gg, pos, eps=) { grad=array(double, 4, 4); if (is_void(eps)) eps=1e-10; for (i=1; i<=4; ++i) { delta=array(0., 4); delta(i)=eps; grad(,i)=(kfunc(gg, pos+delta)-kfunc(gg, pos-delta))/(2.*eps); } return grad; } func jacfunc(gg, pos) { jac=array(double, 4, 4, 4); df=dffunc(gg, pos); dk=dkfunc(gg, pos); k=kfunc(gg, pos); f=ffunc(gg, pos); for(a=1; a<=4; ++a) for (mu=1; mu<=4; ++mu) for (nu=1; nu<=mu;++nu) jac(nu, mu, a)=jac(mu, nu, a)=df(a)*k(mu)*k(nu)+f*dk(mu, a)*k(nu)+f*k(mu)*dk(nu,a); return jac; } func christofunc(gg, pos) { dst=array(double, 4, 4, 4); gup=gg(gmunu_up=pos); jac=jacfunc(gg, pos); for (a=1; a<=4; ++a) { for (mu=1; mu<=4; ++mu) { for (nu=1; nu<=4; ++nu) { dst(nu, mu, a)=0.; for (i=1; i<=4; ++i) { dst(nu, mu, a)+=0.5*gup(a,i)* (jac(nu, i, mu)+jac(i, mu, nu)-jac(nu, mu, i)); } } } } return dst; } restore, gyoto; begin_section, "KerrKS metric", "Kerr in Kerr-Schild coordinates"; doing, "creating KerrKS metric"; gg=KerrKS(spin=0.); done; positions=[[0, 10., 12., 5.], [0, 5., 2., 7.], [0, -10., 0., 50.], [0, 0., 0., 10000.]]; check_gmunu, gg, positions; check_gmunu_up, gg, positions; doing, "checking dk"; pos=[0, 10., 12., 5.]; dk1=dkfunc(gg, pos); dk3=dknum(gg, pos); if (max(abs(dk1-dk3))>1e-5) error, "dk is wrong"; done; doing, "checking df"; pos=[0, 10., 12., 5.]; df1=dffunc(gg, pos); df3=dfnum(gg, pos); if (max(abs(df1-df3))>1e-6) error, "df is wrong"; done; check_jacobian, gg, positions; check_christoffels, gg, positions; end_section, "KerrKS metric", "Kerr in Kerr-Schild coordinates"; Gyoto-1.2.0/yorick/check-minkowski.i000066400000000000000000000067761302352257300173750ustar00rootroot00000000000000/* Copyright 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "check-helpers.i" // There is no specific Yorick interface for the Minkowski metric. // The only limitation is that is is not possible to retrieve the kind // of coordinate system in use. restore, gyoto; begin_section, "Minkowski metric", "in cartesian coordinates"; positions=[[0, 10., 12., 5.], [0, 5., 2., 7.], [0, -10., 0., 50.], [0, 0., 0., 10000.]]; doing, "creating Minkowski metric"; gg=Metric("Minkowski"); done; check_gmunu, gg, positions; check_christoffels, gg, positions; doing, "creating Star in this metric"; st = Star(metric=gg, initcoord=[0., 0., 0., 0.], [0., 0., 0.]); done; doing, "integrating geodesic"; st, xfill=1000.; done; doing, "checking results"; data=st(get_coord=); d=dimsof(data); write, format="(integration produced %d rows)...", d(2); if (!(allof(data(,2:)==([0., 0, 0, 1., 0, 0, 0](-:1:d(2), ))))) error, "integration produced wrong results"; done; doing, "checking another star"; pos=[0., 4., 2., 6.]; vel=[0.5, 0.2, 0.4]; st = Star(metric=gg, initcoord=pos, vel); st, xfill=1000.; data=st(get_coord=); maxerr=max(abs(minmax(data(, 2:4)-data(,1)(,-)*vel(-,)-pos(-,2:4)))); if (maxerr>1e-10) error, "integration produced wrong results"; done; doing, "checking a photon"; pos=[0., 4., 2., 6.]; vel=[0.5, 0.2, 0.4]; st = Photon(metric=gg, initcoord=pos, vel); st, xfill=1000.; data=st(get_coord=); nrows=dimsof(data)(2); norm=array(double, nrows); for(i=1; i<=nrows; ++i) norm(i)=gg(scalarprod=data(i, 1:4), data(i, 5:8), data(i, 5:8)); if (max(norm) > 1e-10) "error: norm was not conserved"; maxerr=max(abs(minmax(data(, 2:4)- data(,1)(,-)*vel(-,)/data(,5)(,-)-pos(-,2:4)))); if (maxerr>1e-10) error, "integration produced wrong results"; done; begin_section, "Minkowski metric", "in spherical coordinates"; doing, "changing coordinate system"; gg, setparameter="Spherical"; done; positions=[[0, 10., pi/2., 0.], [100., 10., pi/4., 2.], [1000., 100., 1., 1.]]; check_gmunu, gg, positions; check_christoffels, gg, positions; doing, "checking motionless star"; pos=[0., 4., 2., 6.]; vel=[0., 0., 0.]; st = Star(metric=gg, initcoord=pos, vel); st, xfill=1000.; data=st(get_coord=); d=dimsof(data); write, format="(integration produced %d rows)...", d(2); if (!(allof(data(,2:)==(_(pos(2:),[1.],vel)(-:1:d(2), ))))) error, "integration produced wrong results"; done; doing, "checking moving star"; pos=[0., 10.791, pi/2., 0]; vel=[0., 0., 0.016664]; st = Star(metric=gg, initcoord=pos, vel); st, adaptive=1; st, delta=0.1; st, xfill=1000.; data=st(get_coord=); dates=data(,1); txyz=st(get_cartesian=dates); d=dimsof(data); write, format="(integration produced %d rows)...", d(2); //if (!(allof(data(,2:)==(_(pos(2:),[1.],vel)(-:1:d(2), ))))) // error, "integration produced wrong results"; done; end_section, "Minkowski metric"; Gyoto-1.2.0/yorick/check-mpi.i000066400000000000000000000062321302352257300161320ustar00rootroot00000000000000/* Copyright 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ // NODISPLAY implies batch mode if (get_env("GYOTO_CHECK_NODISPLAY")) { batch, 1; __xytitles=xytitles; __fma=fma; __winkill=winkill; __pli=pli; __plg=plg; __pause=pause; __window=window; xytitles = fma = winkill = pli = plg = pause = window = noop; } #include "check-helpers.i" restore, gyoto; begin_section, "MPI functionalities"; doing, "Checking whether MPI is built-in"; have_mpi=haveMPI(); output, (have_mpi?" yes":" no"); doing, "Calling MPI_Initiliazed"; if (MPI_Initialized()) error, "MPI should not be initialized yet"; done; doing, "Calling MPI_Init"; if (MPI_Init() && have_mpi) error, "MPI INIT FAILED"; done; doing, "Calling MPI_Initiliazed again"; inited=MPI_Initialized(); if (have_mpi && !inited) error, "MPI should be initialized by now"; if (!have_mpi && inited) error, "MPI should not be initializable"; done; doing, "Reading Scenery"; sc = Scenery(GYOTO_EXAMPLES_DIR+"example-complex-astrobj.xml"); done; doing, "Spawning workers"; sc, mpispawn=4; done; doing, "Sending Scenery to the workers"; sc, mpiclone=; done; doing, "Ray-tracing with MPI"; data=sc(); done; doing, "Terminating workers"; sc, mpispawn=0; done; doing, "Integrating Scenery without MPI"; sc, nthreads=4; data2=sc(); done; doing, "Comparing results"; diff=data-data2; ind=where(data); diff(ind)/=data(ind); mdiff=max(abs(diff)); if (mdiff > 1e-6) error, "Results differ"; output, " OK (max rel. dif.: "+pr1(mdiff)+")"; fov=sc.screen().fov(); npix=sc.screen().resolution(); delta= fov/double(npix); xx=((indgen(npix)-0.5)*delta-fov/2.)(, -:1:32); yy=transpose(xx); sc, mpispawn=8, mpiclone=; doing, "Integrating whole field, specifying angles, with MPI"; data2 = sc(-xx, yy, ); done; sc, mpispawn=0; doing, "Comparing results"; diff=data-data2; ind=where(data); diff(ind)/=data(ind); mdiff=max(abs(diff)); if (mdiff > 1e-6) error, "Results differ"; output, " OK (max rel. dif.: "+pr1(mdiff)+")"; doing, "Deleting Scenery"; sc=[]; done; doing, "Calling MPI_Finalized"; if (MPI_Finalized()) error, "MPI should not be finalized yet"; done; doing, "Calling MPI_Finalize"; if (MPI_Finalize() && have_mpi) error, "MPI FINALIZE FAILED"; done; doing, "Calling MPI_Finalized again"; finited=MPI_Finalized(); if (have_mpi && !finited) error, "MPI should be finalized by now"; if (!have_mpi && finited) error, "MPI should not be finalizable"; done; doing, "Cleaning"; data=data2=have_mpi=mdiff=diff=inited=finited=[]; done; end_section, "MPI functionalities"; if (anyof(get_argv() == "check-mpi.i")) quit; Gyoto-1.2.0/yorick/check-patterndisk.i000066400000000000000000000064271302352257300177030ustar00rootroot00000000000000/* Copyright 2011, 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "check-helpers.i" begin_section, "PatternDisk Astrobj"; opacity=array(double, 1, 2, 10); opacity(,1,1::2)=100.; opacity(,2,2::2)=100.; intensity=opacity*0.+1.; metric = gyoto_KerrBL(mass=4e6*GYOTO_SUN_MASS); write, format="%s", "Creating PatternDisk..."; pd = gyoto_PatternDisk(copyintensity=intensity, copyopacity=opacity, innerradius=3, outerradius=28, repeatphi=8, metric=metric, rmax=50); write, format="%s\n", " done."; write, format="%s\n", "Printing PatternDisk:"; pd; write, format="%s\n", " done."; screen = gyoto_Screen(metric=metric, resolution=64, time=1000.*metric.unitlength()/GYOTO_C, distance=100.*metric.unitlength(), fov=30./100., inclination=110./180.*pi, paln=pi); write, format="%s", "Attaching PatternDisk to scenery..."; sc = gyoto_Scenery(metric=metric, screen=screen, astrobj=pd); write, format="%s\n", " done."; if (gyoto_haveXerces() && gyoto_haveCFITSIO()) { write, format="%s", "Saving data to fits file..."; pd, fitswrite="!check-patterndisk.fits.gz"; write, format="%s\n", " done."; write, format="%s", "Saving scenery to XML file..."; sc, xmlwrite="check-patterndisk.xml"; write, format="%s\n", " done."; write, format="%s", "Reading back scenery..."; sc2 = gyoto_Scenery("check-patterndisk.xml"); write, format="%s\n", " done."; doing, "Checking dmax"; if (sc2.screen().dmax() != sc.screen().dmax()) error, "dmax was not conserved when writing and reading XML"; done; doing, "Checking tmin"; if (sc2.tmin() != sc.tmin()) error, "tmin was not conserved when writing and reading XML"; done; write, format="%s", "Removing temporary files..."; remove, "check-patterndisk.xml"; remove, "check-patterndisk.fits.gz"; write, format="%s\n", " done."; } else { write, format="%s", "Cloning..."; sc2 = sc.clone(); write, format="%s\n", " done."; } write, format="%s", "Getting PatternDisk..."; pd2 = sc2.astrobj(); write, format="%s\n", " done."; write, format="%s", "Comparing intensity array..."; if (anyof(intensity != pd2.copyintensity())) error, "CHECK FAILED"; write, format="%s\n", " done."; write, format="%s", "Comparing opacity array..."; if (anyof(opacity != pd2.copyopacity())) error, "CHECK FAILED"; write, format="%s\n", " done."; write, format="%s", "Performing raytracing...\n"; im = sc(); write, format="%s\n", "done."; write, format="%s", "Displaying image..."; window, style="nobox.gs"; pli, im; write, format="%s\n", " done."; pause, 1000; if (batch()) winkill; end_section, "PatternDisk Astrobj"; Gyoto-1.2.0/yorick/check-photon-BL.i000066400000000000000000000103561302352257300171510ustar00rootroot00000000000000/* Copyright 2011, 2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "check-helpers.i" begin_section, "Photon in KerrBL metric"; aa=0.; gg=gyoto_KerrBL(spin=aa); gg2=gg.clone; write, format="%s", "Creating Photon: "; ph = gyoto_Photon(); if (ph()) write, format="%s\n","done.\n"; else error, "PREVIOUS CHECK FAILED"; write, format="%s", "Attaching metric: "; ph,metric=gg; if (ph()) write, format="%s\n","done.\n"; else error, "PREVIOUS CHECK FAILED"; // initial conditions : ri=6; thetai=pi/2.; phii=0.; ttravel=r0; ti=0.; pri=0.;//canonical momentum pthetai=0.; yinit=[ti, ri, thetai, phii, ti, pri, pthetai]; cst=[1,0.921103,2.,0.];//4 Kerr cst of motion a, E, L, Q write, format="%s", "Checking gyoto_Kerr_MakeCoord: "; coord=gg(makecoord=yinit, cst); coord; //if (abs((coord-[0,10.791,1.5708,0,1.12641,0,0,0.0187701]))(max)<1e-6) if (abs((coord-[0,6,1.5708,0,1.38165,0,0,0.0555556]))(max)<1e-5) write, format="%s\n","done.\n"; else error, "PREVIOUS CHECK FAILED"; doing, "Setting metric spin"; gg, spin=0.95; done; doing, "Computing initial coordinate"; coord=gg.makecoord(yinit, cst); done; pos=coord(:4); v= coord(6:)/coord(5); doing, "Checking gyoto_Star"; st=gyoto_Star(metric=gg, radius=1., initcoord=pos, v); done; doing, "Trying gyoto_Star_xFill"; st,xfill=770.; done; //Computing position of star at a given proper time : //time=212.4034;//proper time //write, format="%s\n", "Checking gyoto_Star_position: "; //pos=gyoto_Part_position(st,time); //pos; //if (abs(pos-[10.5718661339679, 1.57079398752261, 59.5795847453848])(max)<1e-5) // write, format="%s\n","done.\n"; else error, "PREVIOUS CHECK FAILED"; // Ray tracing write, format="%s", "Checking gyoto_Metric_setObserverPos: "; screen=gyoto_Screen(metric=gg, observerpos=[1000., 100., 0.05, 0.]); write, format="%s\n","done.\n"; write, format="%s", "Checking gyoto_Metric_setSpin: "; gg,spin=0.; write, format="%s\n","done.\n"; write, format="%s", "Checking gyoto_Star(): "; orbit=gyoto_Star(metric=gg, radius=2, initcoord=[600, 6, 1.57, 0], [0, 0, 0.068041381745]) write, format="%s\n","done.\n"; N=21; delta=pi/(10.*N); screen, fov=pi/10., resolution=21; gg, setparameter="GenericIntegrator"; i=15; j=9; xscr=delta*(i-(N+1)/2.); yscr=delta*(j-(N+1)/2.); write, format="%s", "Checking gyoto_Photon_setInitialCondition: "; ph2=gyoto_Photon(metric=gg, astrobj=orbit); ph1=gyoto_Photon(metric=gg, astrobj=orbit); ph1, initcoord=screen, -xscr, yscr; ph2, initcoord=screen, i, j; write, format="%s\n","done.\n"; write, format="%s", "Checking gyoto_Photon(delta=1): "; write, format="%s\n","done.\n"; write, format="%s", "Checking gyoto_Photon(is_hit=1): "; if( ph1(is_hit=1) && ph2(is_hit=1)) write, format="%s\n","done.\n"; else error, "PREVIOUS CHECK FAILED"; "_________________________"; hitmap2=hitmap1=hitmap=array(0, N, N); ph=gyoto_Photon(metric=gg, astrobj=orbit); for (i=1; i<=N; i++) { write , format="*** Column %i ***\n", i; xscr=delta*(i-(N+1)/2.); for (j=1; j<=N; j++) { yscr=delta*(j-(N+1)/2.); ph, initcoord=screen, -xscr, yscr; ph, tmin=0.; ph1, initcoord=screen, -xscr, yscr; ph2, initcoord=screen, i, j; ph, delta=1.; hitmap(i,j)=ph(is_hit=1); } } ph2=[]; // Check that changing spin can be done on attached metric ph1, metric=ph1.metric(); ph1, xfill=0.; txyz=ph1.get_txyz(); plg, txyz(2,), txyz(1,); ph2=ph1.clone(); gg2=gg.clone(); write, format="%s", "Mutating metric spin... "; gg, spin=0.5; write, format="%s\n", "done."; gg2, spin=0.5; ph2, metric=gg2; ph1=ph2=[]; // CLONES AND HOOKS "_________________________"; ph=[]; st=[]; orbit=[]; screen=[]; gg=[]; end_section, "Photon in KerrBL metric"; Gyoto-1.2.0/yorick/check-polish-doughnut.i000066400000000000000000000074131302352257300205000ustar00rootroot00000000000000/* Copyright 2011, 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "check-helpers.i" begin_section, "PolishDoughnut Astrobj"; write, format="%s", "Creating default PolishDoughnut... "; pd = gyoto_PolishDoughnut(); write, format="%s\n", "done."; write, format="%s\n", "Printing object:"; write, format="%s\n", "-----------------------------"; pd; write, format="%s\n", "-----------------------------"; // write, format="%s", "Setting lambda to 2... "; // pd, lambda=2; // write, format="%s\n", "done."; // write, format = "%s", "Checking value of lambda... "; // if (pd(get_lambda=1)==2) write, format="%s\n", "done."; \ // else error, "CHECK FAILED!"; write, format= "%s" , "Instanciating Kerr metric... "; gg = gyoto_KerrBL(); write, format= "%s\n", "done."; write, format= "%s" , "Attaching metric to doughnut... "; pd, metric=gg; write, format= "%s\n", "done."; write, format= "%s" , "Checking attached metric... "; if (pd.metric()()==gg()) write, format="%s\n", "done."; \ else error, "CHECK FAILED!"; write, format="%s\n", "Printing object:"; write, format="%s\n", "-----------------------------"; pd; write, format="%s\n", "-----------------------------"; if (gyoto.haveUDUNITS() && gyoto.haveXerces()) { write, format="%s", "Creating PolishDoughnut from file... "; pd = gyoto_Scenery(GYOTO_EXAMPLES_DIR+"example-polish-doughnut.xml").astrobj(); write, format="%s\n", "done."; write, format="%s\n", "Printing object:"; write, format="%s\n", "-----------------------------"; pd; write, format="%s\n", "-----------------------------"; write, format="%s", "Reading PolishDoughnut scenery... "; sc = gyoto_Scenery(GYOTO_EXAMPLES_DIR+"example-polish-doughnut.xml") ; write, format="%s\n", "done."; write, format="%s", "Setting spectro... "; noop, sc.screen.spectro( gyoto_SpectroUniform(kind="freqlog", nsamples=20, band=[-6, 8], unit="eV") ); noop, sc.astrobj.opticallythin(1); write, format="%s\n", "done."; write, format="%s", "Ray-tracing scenery... "; img = sc(,,"Spectrum")(,,avg); write, format="%s\n", "done."; write, format="%s", "Displaying image... "; fma; pli, img; write, format="%s\n", "done."; pause, 1000; write, format="%s", "Integrating one spectrum with radiative transfer...\n"; s1 = sc(10, 15, "Spectrum[J.m-2.s-1.sr-1.Hz-1]"); write, format="%s\n", "done."; midpoints = sc.screen.spectro.midpoints(); widths = sc.screen.spectro.widths(); fma; logxy, 1, 1; plg, (s1*widths), midpoints; xytitles, "Frequency [Hz]"; write, format="%s", "Integrating one bin spectrum with radiative transfer...\n"; s2 = sc(10, 15, "BinSpectrum[J.m-2.s-1.sr-1]"); write, format="%s\n", "done."; channels = sc.screen.spectro.channels(); widths = sc.screen.spectro.widths(); s22=array(double,numberof(s2)*2); s22(::2)=s2; s22(2::2)=s2; chan2=array(double,numberof(s2)*2); chan2(::2)=channels(1,); chan2(2::2)=channels(2,); plg, s22, chan2; } if (batch()) { pause, 1000; winkill,0; } end_section, "PolishDoughnut Astrobj"; Gyoto-1.2.0/yorick/check-scenery.i000066400000000000000000000221131302352257300170110ustar00rootroot00000000000000/* Copyright 2011, 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "check-helpers.i" restore, gyoto; begin_section, "Scenery"; // From yutils, for tic() and tac() #include "util_fr.i" write, format="%s", "New scenery... "; sc=gyoto_Scenery(); write, format="%s\n", "done."; write, format="%s\n", "Printing this Scenery:"; sc; write, format="%s %i\n", "Pointer to this Scenery:", sc(get_pointer=1); // MaxIter is a property of type size_t. The implementation of such // properties rely on undefined behaviour. Check here that it works in // practice. If one of these test fail, we have to find a new // implementation of GYOTO_PROPERTY_SIZE_T. doing, "Using maxiter()"; max1=sc.maxiter(); done; doing, "Using MaxIter()"; max2=sc.MaxIter(); done; doing, "Comparing"; if (max1!=max2) error, "maxiter() and MaxIter() do not yield the same value"; done; doing, "Checking MaxIter(val)"; if ((sc.MaxIter(25)).maxiter() != 25) error, "MaxIter and maxiter do not agree"; done; doing, "Checking maxiter(val)"; if ((sc.maxiter(40)).MaxIter() != 40) error, "MaxIter and maxiter do not agree"; done; // Set back the original value. Phew, GYOTO_PROPERTY_SIZE_T works as // expected. sc, MaxIter=max1; write, format="%s", "New scenery, setting only \"time\"... "; sc2=gyoto_Scenery(screen=gyoto_Screen(time=1)); write, format="%s\n", "done."; write, format="%s\n", "Printing this Scenery:"; sc2; write, format="%s %i\n", "Pointer to this Scenery:", sc2(get_pointer=1); write, format="%s", "Attaching metric to scenery... "; sc, metric=gyoto_KerrBL(); write, format="%s\n", "done."; write, format="%s\n", "Printing this Scenery:"; sc; write, format="%s", "Pointer to this Scenery: "; write, format="%i\n", sc(get_pointer=1); write, format="%s", "Creating star... "; ao=gyoto_Star(metric=sc.metric(), radius=0.5, initcoord=[0,6,pi/2.,0], [0,1e-3,0]); write, format="%s\n", "done."; write, format="%s", "Attaching astrobj to scenery... "; sc, astrobj=ao; write, format="%s\n", "done."; write, format="%s", "Retrieving astrobj... "; ao2=sc.astrobj(); write, format="%s\n", "done."; write, format="%s", "Setting time... "; noop,sc.screen.time(10000); write, format="%s\n", "done."; write, format="%s %e\n", "Checking time:", (time=sc.screen.time()); if (time!=10000) error, "CHECK FAILED"; // write, format="%s", "Setting tmin... "; // rien=sc(screen=)(tmin=-10000); // write, format="%s\n", "done."; // write, format="%s %e\n", "Checking tmin:", (tmin=sc(screen=)(get_tmin=1)); // if (tmin!=-10000) error, "CHECK FAILED"; // write, format="%s", "Setting dtau... "; // sc, dtau=0.1; // write, format="%s\n", "done."; // write, format="%s %e\n", "Checking dtau:", (dtau=sc(get_dtau=1)); // if (dtau!=0.1) error, "CHECK FAILED"; write, format="%s", "Setting field-of-view... "; noop,sc.screen.fov(pi/4.); write, format="%s\n", "done."; write, format="%s %e\n", "Checking field-of-view:", (fov=sc.screen.fov()); if (fov!=pi/4) error, "CHECK FAILED"; write, format="%s", "Setting resolution... "; noop,sc.screen.resolution(16); write, format="%s\n", "done."; write, format="%s %i\n", "Checking resolution:", (res=sc.screen.resolution()); if (res!=16) error, "CHECK FAILED"; write, format="%s", "Setting inclination... "; noop,sc.screen.inclination(pi/3.); write, format="%s\n", "done."; write, format="%s %e\n", "Checking inclination:", (incl=sc.screen.inclination()); if (incl!=pi/3) error, "CHECK FAILED"; if (gyoto_haveXerces()) { write, format="%s", "Writing XML description... "; sc,xmlwrite="test.xml"; write, format="%s\n", "done."; remove, "test.xml"; write , format="%s", "Reading Scenery from XML description... "; sc3=gyoto_Scenery(GYOTO_EXAMPLES_DIR+"example-moving-star.xml"); } else { write , format="%s", "No Xerces, creating scenery from scratch... "; gg = gyoto_KerrBL(); spectro = gyoto_Spectrometer("wave", nsamples=1, band=[2e-6, 2.4e-6]); scr = gyoto_Screen(metric=gg, observerpos=[1000., 100., 0.78, 0. ], time=1000., resolution=128, spectro=spectro); ao = gyoto_Star(metric=gg, radius=2, rmax=50, initcoord=[600,9,1.5707999999999999741,0],[0., 0., 0.037037]) sc3=gyoto_Scenery(metric=gyoto_KerrBL(), screen=scr, astrobj=ao, tmin=0.); } noop, sc3.screen.resolution(32); noop, sc3.astrobj.radius(2); write, format="%s\n" , "done."; write, format="%s", "Ray-tracing on 1 thread (sc())... \n"; sc3, nthreads=1; tic; im1 = sc3(,,"Intensity"); // raytrace tac(); pli, im1; pause, 1000; write, format="%s\n" , "done."; write, format="%s", "Ray-tracing on 2 threads (sc())... \n"; sc3, nthreads=2; tic; im1 = sc3(,,"Intensity"); // raytrace tac(); window,1; pli, im1; pause, 1000; write, format="%s\n" , "done."; write, format="%s", "Ray-tracing on 2 threads (gyoto_Scenery_rayTrace())... \n"; sc3, nthreads=2, quantities="Intensity"; //tic; im1 = gyoto_Scenery_rayTrace(sc3); window,2; pli, im1; pause, 1000; //tac(); write, format="%s\n" , "done."; write, format="%s", "Ray-tracing on 1 thread... \n"; sc3, nthreads=1; tic; mask = gyoto_Scenery_rayTrace(sc3); tac(); write, format="%s\n" , "done."; write, format="%s", "Setting mask... "; noop, sc3.screen.mask(mask); write, format="%s\n" , "done."; write, format="%s", "Checking mask... "; mask2 = sc3.screen.mask(); if (!allof(mask2==mask)) error, "CHECK FAILED!"; write, format="%s\n" , "done."; write, format="%s", "Ray-tracing on 1 thread with mask... \n"; sc3, nthreads=1; tic; im1 = gyoto_Scenery_rayTrace(sc3); tac(); if (!allof(im1==mask)) error, "CHECK FAILED!"; write, format="%s\n" , "done."; write, format="%s", "Ray-tracing with mask (sc())... \n"; sc3, nthreads=1; tic; im1 = sc3(,,"Intensity"); // raytrace if (!allof(im1==mask)) error, "CHECK FAILED!"; tac(); pli, im1; pause, 1000; write, format="%s\n" , "done."; //noop,sc3.screen(maskwrite="toto.fits"); //noop,sc3.screen(xmlwrite="toto.xml"); /* write, format="%s", "Ray-tracing on adaptive grid... "; data = gyoto_Scenery_adaptive_raytrace(sc3, 4); fma; pli, data(,,3), cmax=100; write, format="%s\n" , "done."; */ write, format="%s", "Cloning..."; sc4=sc3.clone(); write, format="%s\n", "DONE."; write, format="%s\n", "Printing clone:"; sc4; ph = gyoto_Photon(initcoord=sc3, 6, 19); ph.is_hit(); doing, "Reading Scenery..."; sc=Scenery(GYOTO_EXAMPLES_DIR+"example-complex-astrobj.xml"); done; sc, nthreads=8, nprocesses=0, mpispawn=0; doing, "Integrating whole field..."; data=sc(); done; r1=8:25:4; r2=2:-2:3; v1=[1, 4, 16]; v2=[15, 20, 22]; s1=[[1, 2], [3, 4]]; s2=[[[12, 13], [14, 15]], [[1, 2], [3, 4]], [[10, 11], [16, 17]], [[7, 8], [20, 22]]]; doing, "Integrating subfield..."; data2=sc(r1, r2, ); done; doing, "Comparing..."; if (anyof(data2 != data(r1, r2, ))) error, "result differ"; done; doing, "Integrating subfield..."; data2=sc(v1, v2, ); done; doing, "Comparing..."; if (anyof(data2 != data(v1, v2, ))) error, "result differ"; done; doing, "Integrating subfield..."; data2=sc(s1, s2, ); done; doing, "Comparing..."; if (anyof(data2 != data(s1, s2, ))) error, "result differ"; done; doing, "Integrating subfield..."; data2=sc(r1, v2, ); done; doing, "Comparing..."; if (anyof(data2 != data(r1, v2, ))) error, "result differ"; done; doing, "Integrating subfield..."; data2=sc(v1, r2, ); done; doing, "Comparing..."; if (anyof(data2 != data(v1, r2, ))) error, "result differ"; done; fov=sc.screen().fov(); npix=sc.screen().resolution(); delta= fov/double(npix); xx=((indgen(npix)-0.5)*delta-fov/2.)(, -:1:32); yy=transpose(xx); data2=array(double, npix, npix, 1); doing, "integrating pix. by pix., specifying angles...\n"; verbosity=verbose(0); for (j=1; j<=npix; ++j) { write, format="\rj = %d/%d", j, npix; for (i=1; i<=npix; ++i) { data2(i, j, 1) = sc(-xx(i, j), yy(i, j), ); } } write, format="%s\n", ""; done; verbose, verbosity; doing, "Comparing results"; diff=data-data2; ind=where(data); diff(ind)/=data(ind); mdiff=max(abs(diff)); if (mdiff > 1e-6) error, "Results differ"; output, " OK (max rel. dif.: "+pr1(mdiff)+")"; doing, "integrating whole field, specifying angles...\n"; data2 = sc(-xx, yy, ); done; doing, "Comparing results"; diff=data-data2; ind=where(data); diff(ind)/=data(ind); mdiff=max(abs(diff)); if (mdiff > 1e-6) error, "Results differ"; output, " OK (max rel. dif.: "+pr1(mdiff)+")"; if (batch()) { // Free memory for easier checking with valgrind xx=yy=data2=data=ind=[]; sc4=[]; sc3=[]; sc2=[]; sc=[]; ao=ao2=[]; pause, 1000; winkill; } end_section, "Scenery"; Gyoto-1.2.0/yorick/check-star.i000066400000000000000000000060571302352257300163230ustar00rootroot00000000000000/* Copyright 2011, 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "check-helpers.i" begin_section, "Star Astrobj", "in KerrBL metric"; write, format="%s\n", "Attempting star construction:"; st=gyoto_Star(); write, format="%s", "Printing star:"; st; write, format="%s", "Cloning..."; st2=st.clone(); write, format="%s\n", "DONE."; write, format="%s", "Printing clone:"; st2; write, format="%s", "Gyoto::Star pointer is at address: "; st(); write, format="%s", "Setting radius... "; st, radius=0.5; write, format= "%s\n", "done."; write, format="%s", "Getting radius... "; if (st.radius()!=0.5) error, "CHECK FAILED"; write, format= "%s\n", "done."; write, format="%s", "Setting metric... "; st, metric=gyoto_KerrBL(spin=0.); write, format= "%s\n", "done."; write, format="%s", "Changing metric spin... "; noop, st.metric.spin(0.7); if (st.metric.spin()!=0.7) error, "CHECK FAILED"; gg=st.metric(); gg, spin=0.995; if (st.metric.spin()!=0.995) error, "CHECK FAILED"; write, format= "%s\n", "done."; write, format="%s", "Setting initial condition... "; st, initcoord=[0, 10.791, 1.5708, 0], [0, 0, 0.0166637]; write, format="%s\n", "done."; doing, "Setting integrator"; if (gyoto_haveBoost()) { st, integrator="runge_kutta_fehlberg78"; st, deltamaxoverr=0.1; } else { noop, st(metric=)(deltamaxoverr=0.1); } done; write, format="%s", "Computing orbit... "; st, xfill=800; write, format="%s\n", "done."; write, format="%s", "Instanciating Screen... "; screen=gyoto_Screen(metric=st.metric()); write, format="%s\n", "done."; write, format="%s", "Retrieving projected orbit... "; data=st(get_skypos=screen); write, format="%s\n", "done."; write, format="%s\n", "Printing Star object:"; st; if (!nodisplay) { write, format="%s\n", "Check it out (pausing for 1s)!"; plg,data(,2), data(,1); limits; pause, 1000; winkill; } write, format="%s", "All in one call... "; data2=gyoto_Star(radius=0.5, metric=gyoto_KerrBL(spin=0.995), initcoord=[0, 10.791, 1.5708, 0], [0, 0, 0.0166637], xfill=800 )( get_skypos=(screen2=gyoto_Screen(metric=gyoto_KerrBL(spin=0.995))) ); write, format="%s\n", "done."; if (!nodisplay) { write, format="%s\n", "Check it out (pausing for 1s)!"; plg,data2(,2), data2(,1); pause, 1000; winkill; } // Free memroy to check with valgrind; //data=[]; //st=[]; end_section, "Star Astrobj", "in KerrBL metric"; Gyoto-1.2.0/yorick/check-startrace.i000066400000000000000000000041011302352257300173260ustar00rootroot00000000000000/* Copyright 2013-2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "check-helpers.i" begin_section, "StarTrace Astrobj"; if (gyoto_haveXerces()) { sc = gyoto.Scenery(GYOTO_EXAMPLES_DIR+"example-moving-star.xml"); noop, sc.screen.mask(0); // make sure no mask is set yet st = sc.astrobj(); } else { // No XML, build from scratch met=gyoto.KerrBL(); st=gyoto.Star(metric=met, radius=2., initcoord=[600., 9., 1.5707999999999999741, 0], [0., 0., 0.037037]); screen=gyoto.Screen(metric=met, observerpos=[1000., 100., 0.78, 0.], time=1000., resolution=128, fov=0.1*pi); sc=gyoto.Scenery(metric=met, screen=screen, astrobj=st, tmin=0.); } write, format="%s", "Instanciating StarTrace from Star... "; stt = st(startrace=600, 800); write, format="%s\n", "done."; write, format="%s", "Mutating StarTrace... "; stt, adaptive=0, delta=1, opticallythin=0; write, format="%s\n", "done."; sc, astrobj=stt, nthreads=8; write, format="%s\n", "Ray-tracing StarTrace... "; tic; mask = sc(,,"Intensity"); tac(); write, format="%s\n", "done."; sc, astrobj=st; write, format="%s\n", "Ray-tracing Star without mask... "; tic; im1=sc(,,); tac(); write, format="%s\n", "done."; noop, sc.screen.mask(mask); write, format="%s\n", "Ray-tracing Star with mask... "; tic; im2=sc(,,); tac(); write, format="%s\n", "done."; end_section, "StarTrace Astrobj"; Gyoto-1.2.0/yorick/check.i000066400000000000000000000120631302352257300153460ustar00rootroot00000000000000/* Copyright 2011, 2013-2015 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ // NODISPLAY implies batch mode if (get_env("GYOTO_CHECK_NODISPLAY")) { batch, 1; __xytitles=xytitles; __fma=fma; __winkill=winkill; __pli=pli; __plg=plg; __pause=pause; __window=window; xytitles = fma = winkill = pli = plg = pause = window = noop; } #include "check-helpers.i" begin_section, "basic functionality"; aa=0.995; write, format="%s", "Checking gyoto_Kerr_new: "; gg=gyoto_KerrBL(spin=aa); write, format="%s\n","done.\n"; // initial conditions : ri=10.791; thetai=1.5708; phii=0.; ti=0.; pri=0.;//canonical momentum pthetai=0.; cst=[1,0.921103,2.,0.];//4 Kerr cst of motion mu, E, L, Q yinit=[ti,ri,thetai,phii,-cst(2),pri,pthetai,cst(3)]; write, format="%s", "Checking gyoto_Kerr_MakeCoord: "; coord=gg(makecoord= yinit, cst); if (abs((coord-[0,10.791,1.5708,0,1.12641,0,0,0.0187701]))(max)<1e-6) write, format="%s\n","done.\n"; else error, "PREVIOUS CHECK FAILED"; pos=coord(:4); v= coord(6:)/coord(5); write, format="%s", "Checking gyoto_Star(): "; st=gyoto_Star(metric=gg, radius=1., initcoord=pos, v); write, format="%s\n","done.\n"; write, format="%s\n", "Trying gyoto_Star_xFill"; st,xfill=770.; //Computing position of star at a given proper time : //time=212.4034;//proper time //write, format="%s\n", "Checking gyoto_Star_position: "; //pos=gyoto_Part_position(st,time); //pos; //if (abs(pos-[10.5718661339679, 1.57079398752261, 59.5795847453848])(max)<1e-5) // write, format="%s\n","done.\n"; else error, "PREVIOUS CHECK FAILED"; txyz=st.get_txyz; dates=txyz(,1); x=txyz(,2); y=txyz(,3); coords=st.get_coord(); primes=st.get_prime(); write, format="%s", "Checking gg(prime2tdot= pos, vel): "; N=dimsof(coords)(2); tdotbis=array(double,N); for (n=1; n<= N; ++n) tdotbis(n)=gg (prime2tdot=coords(n,1:4), primes(n,)); tdot=coords(,5); if (max (abs( (tdot-tdotbis)/tdot ) ) < 1e-4) write, format="%s\n","done.\n"; else error, "PREVIOUS CHECK FAILED"; write, format="%s", "Checking gg(position): "; norm=array(double, N); for (n=1; n<= N; ++n) { g = gg (coords(n,)); qvel=coords(n,5:); norm(n)=sum(g*qvel(,-)*qvel(-,)); } if (max(abs(norm+1)) < 1e-4) write, format="%s\n","done.\n"; else error, "PREVIOUS CHECK FAILED"; // Ray tracing write, format="%s", "Checking gyoto_Screen(observerpos=...): "; screen=gyoto_Screen(metric=gg, observerpos=[1000., 100., 0.05, 0.]); write, format="%s\n","done.\n"; write, format="%s", "Checking gyoto_Metric(spin=): "; gg, spin=0.; write, format="%s\n","done.\n"; write, format="%s", "Checking gyoto_Star(): "; orbit=gyoto_Star(metric=gg, radius=2, initcoord=[600, 6, 1.57, 0], [0, 0, 0.068041381745]) write, format="%s\n","done.\n"; N=51; delta=pi/(10.*N); write, format="%s", "Checking gyoto_Photon(): "; ph=gyoto_Photon(); write, format="%s\n","done.\n"; i=35; j=19; xscr=delta*(i-(N+1)/2.); yscr=delta*(j-(N+1)/2.); write, format="%s", "Checking gyoto_Photon_setInitialCondition: "; ph, metric=gg, astrobj=orbit, initcoord=screen, -xscr, yscr; write, format="%s\n","done.\n"; write, format="%s", "Checking gyoto_Photon_setDelta: "; ph, delta=1.; write, format="%s\n","done.\n"; write, format="%s", "Checking gyoto_Photon_hit: "; if(ph(is_hit=1)) write, format="%s\n","done.\n"; else error, "PREVIOUS CHECK FAILED"; "_________________________"; hitmap=array(0, N, N); ph, tmin=0.; for (i=1; i<=N; i++) { write , format="*** Column %i ***\n", i; xscr=delta*(i-(N+1)/2.); for (j=1; j<=N; j++) { yscr=delta*(j-(N+1)/2.); ph, metric=gg, astrobj=orbit, initcoord=screen, -xscr, yscr; // gyoto_Photon_setDelta, ph, 1.; hitmap(i,j)=ph(is_hit=1); } } "_________________________"; screen=[]; ph=[]; st=[]; orbit=[]; gg=[]; end_section, "basic functionality"; #include "check-photon-BL.i" #include "check-scenery.i" #include "check-kerrbl.i" #include "check-kerrks.i" #include "check-minkowski.i" #include "check-star.i" #include "check-startrace.i" #include "check-patterndisk.i" #include "check-directionaldisk.i" #include "check-disk3d.i" #include "check-polish-doughnut.i" // Don't run check-mpi.i automatically, // It may hang the computer if not plugged to the network //#include "check-mpi.i" write, format="\n\n%s\n%s\n%s\n%s\n\n", " ********************************************", " * ALL TESTS PASSED *", " ********************************************", " (You may want to run 'make check-mpi' still)"; if (anyof(get_argv() == "check.i")) quit; //if (batch()) quit; Gyoto-1.2.0/yorick/compare-integrators.i000066400000000000000000000113471302352257300202620ustar00rootroot00000000000000/* Copyright 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "gyoto.i" restore, gyoto; // Put screen on Earth in KerrBL metric met=KerrBL(mass=4e6, unit="sunmass"); scr=Screen(metric=met, distance=8, unit="kpc"); scr, inclination=pi/2; scr, time=scr(distance=, unit="kpc"), unit="kpc"; alpha=50.*pi/180/3600/1e6; // 50µas R0=scr(distance=, unit="geometrical"); Rs=1000.; tinf=scr(time=, unit="geometrical_time"); //tol=10.^-(indgen(18)+3); tol=spanl(1e-10, 1e-21, 18); dmor=spanl(.5, 1e-4, numberof(tol)); // Choose integrator integrators=["Legacy", "Legacy", "runge_kutta_cash_karp54", "runge_kutta_dopri5", "runge_kutta_fehlberg78"]; colors=["red", "red", "blue", "magenta", "black"]; types=["solid", "dashdot", "solid", "solid", "solid", "solid"]; dfl=array(double, numberof(tol), numberof(integrators)); ctime=dfl; niter=long(dfl); for(k=1; k<=numberof(integrators); ++k) { write, format="Trying integrator %s\n", integrators(k); ph=Photon(metric=met, initcoord=scr, alpha, 0.); ph, integrator=integrators(k); ph, delta=tinf/2; ph, maxiter=long(1e10); // Two times Legacy: try various numerical parameters if (k==1) { legacy_type="SpecificIntegrator"; } else if (k==2) { legacy_type="GenericIntegrator"; } else legacy_type=[]; if (k<=2) { noop, ph(metric=)(setparameter=legacy_type); noop, ph(metric=)(difftol=1e-6); } for (i=1; i<=numberof(tol); ++i) { if (k<=2) { write, format="Integrator: %s (%s), dm/R: %e\n", integrators(k), legacy_type, dmor(i); noop, ph(metric=)(deltamaxoverr=dmor(i)); } else write, format="Integrator: %s, tol: %e\n", integrators(k), tol(i); verbose, 0; //norm *will* drift ph, abstol=tol(i), reltol=tol(i); ph, delta=tinf/2.; ph, reset=; tic; vel=ph(get_cartesian=[1, -1]*scr(time=, unit="geometrical_time"))(,4:6); ctime(i,k)=tac(); norm=sqrt((vel^2)(,sum)); cosine=(vel(1,)*vel(2,))(sum)/(norm(1,)*norm(2,)); dfl(i,k)=acos(cosine); niter(i,k)=dimsof(ph(get_coord=))(2); } } mima=[1e-12, 10]; axis1toaxis2=Rs/(Rs+R0)*3600*1e6; winkill, 0; window, 0, style="boxed.gs"; // set the viewport to something nice get_style, land, sys, leg, cleg; sys.viewport=[0.1757,0.6143,0.509465,0.780535]; set_style, land, sys, leg, cleg; // fma; for (k=3; k<=numberof(integrators); ++k) plg, abs(dfl(dif,k))/pi*180*3600*1e6, tol(:-1), color=colors(k), type=types(k), marks=0; for (k=1; k<=2; ++k) plg, abs(dfl(dif,k))/pi*180*3600*1e6, (dmor(:-1))^3/1e8, color=colors(k), type=types(k), marks=0; logxy, 1, 1; limits, tol(1), tol(-1), 1e-3, 1e9; xytitles, "AbsTol and RelTol or DeltaMaxOverR^3^/1e8", "Error on deflection angle [!mas]"; pdf, "doc-fig-dfl-tol.pdf"; winkill, 1; window, 1, style="boxed.gs"; // set the viewport to something nice get_style, land, sys, leg, cleg; sys.viewport=[0.1757,0.6143,0.509465,0.780535]; set_style, land, sys, leg, cleg; // fma; for (k=3; k<=numberof(integrators); ++k) plg, ctime(:-1,k), tol(:-1), color=colors(k), type=types(k), marks=0; for (k=1; k<=2; ++k) plg, ctime(:-1,k), (dmor(:-1))^3/1e8, color=colors(k), type=types(k), marks=0, marks=0; xytitles, "AbsTol and RelTol or DeltaMaxOverR^3^/1e8", "Computing time [s]"; logxy, 1, 1; limits, tol(1), tol(-1), 0.1, 10; pdf, "doc-fig-ctime-tol.pdf"; winkill, 2; window, 2, style="boxed.gs"; // set the viewport to something nice get_style, land, sys, leg, cleg; sys.viewport=[0.1757,0.6143,0.509465,0.780535]; set_style, land, sys, leg, cleg; // fma; plsys, 1; for (k=1; k<=numberof(integrators); ++k) { i0=min(where(dfl(dif,k)!=0)); plg, ctime(i0:-1,k), abs(dfl(dif,k)(i0:))/pi*180*3600e6, color=colors(k), type=types(k), marks=0; } xytitles, "Error on deflection angle [!mas]", "Computing time [s]"; logxy, 1, 1; limits, 1e4, 1e-4, 0.2, 4; pdf, "doc-fig-dfl-ctime.pdf"; bdfx=array(long, numberof(colors)); bdfl=array(double, numberof(colors)); for (k=1; k<=numberof(colors); ++k) { a=abs(dfl(dif,k)); if (anyof (a==0) ) a(where(a==0))=a(max); bdfx(k)=a(mnx); bdfl(k)=dfl(bdfx(k),k); } dfl_ref=bdfl([1, 3, 4, 5])(avg); (bdfl-dfl_ref)/pi*180; Gyoto-1.2.0/yorick/custom1.i000066400000000000000000000000441302352257300156600ustar00rootroot00000000000000#include "setpaths.i" process_argv; Gyoto-1.2.0/yorick/gyoto.i000066400000000000000000002240451302352257300154370ustar00rootroot00000000000000plug_in, "gyoto"; /* Copyright 2011-2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "graphk.i" local GYOTO_PLUGINS; /* DOCUMENT GYOTO_PLUGINS Comma-separated list of plug-ins to load when initializing gyoto (more plug-ins can be loaded afterwards). Must be set before #including gyoto.i. If this Yorick variable is not set, then the environment variable of the same name is used. If it is not set either, then the built-in default (usually "stdplug,nofail:lorene") is used. Each plug-in may be prefixed with "nofail:" to tell gyoto that it is not an error if this plug-oin cannot be loaded. EXAMPLES: To load gyoto with no plug-in at all, and load "myplugin" afterwards: GYOTO_PLUGINS=""; GYOTO_NO_STD=1; #include "gyoto.i" noop, gyoto.requirePlugin("myplugin"); SEE ASLO: gyoto.requirePlugin, GYOTO_NO_STD */ local GYOTO_PLUGINS; /* DOCUMENT GYOTO_NO_STD=1 By default, #include "gyoto.i" will also #include "gyoto_std.i" (which in turn loads the stdplug Gyoto plug-in). To inhibit this behavios, set this variable (to something that evaluates as true) before #including gyoto.i. EXAMPLES: To load gyoto with no plug-in at all, and load only "myplugin": GYOTO_PLUGINS=""; GYOTO_NO_STD=1; #include "gyoto.i" noop, gyoto.requirePlugin("myplugin"); SEE ASLO: gyoto.requirePlugin, GYOTO_PLUGINS */ extern gyoto_haveXerces; /* DOCUMENT have_xerces = gyoto.haveXerces() Tell whether GYOTO was compiled with Xerces support (XML i/o) OUTPUT: HAVE_XERCES=1 if compiled with Xerces, else 0. */ extern gyoto_haveCFITSIO; /* DOCUMENT have_cfitsio = gyoto.haveCFITSIO() Tell whether GYOTO was compiled with CFITSIO support (FITS i/o) OUTPUT: HAVE_CFITSIO=1 if compiled with CFITSIO, else 0. */ extern gyoto_haveBoost; /* DOCUMENT have_boost = gyoto.haveBoost() Tell whether GYOTO was compiled with Boost support (advanced integrators) OUTPUT: HAVE_BOOST=1 if compiled with Boost, else 0. */ extern gyoto_haveUDUNITS; /* DOCUMENT have_udunits = gyoto.haveUNUITS() Tell whether GYOTO was compiled with UDUNITS support (advanced units) OUTPUT: HAVE_UDUNITS=1 if compiled with UDUNITS, else 0. */ extern gyoto_havePTHREAD; /* DOCUMENT have_pthread = gyoto.havePTHREAD() Tell whether GYOTO was compiled with POSIX thread support (multi-thread parallel computing) OUTPUT: HAVE_PTHREAD=1 if compiled with PTHREAD, else 0. */ extern gyoto_haveMPI; /* DOCUMENT have_mpi = gyoto.haveMPI() Tell whether GYOTO was compiled with MPI support (multi-process parallel computing) OUTPUT: HAVE_MPI=1 if compiled with MPI, else 0. SEE ALSO: gyoto.MPI_Init, .MPI_Finalize, .MPI_Initialized, .MPI_Finalized */ extern gyoto_MPI_Init; /* DOCUMENT status = gyoto.MPI_Init([argv]); Initialize MPI. Wrapper around MPI_Init(numberof(argv), argv). argv may be modified upon completion. Returns 0 for success, no-zer otherwise. If MPI is not compiled-in, returns 1. SEE ALSO: gyoto.haveMPI, .MPI_Finalize, .MPI_Initialized, .MPI_Finalized */ extern gyoto_MPI_Finalize; /* DOCUMENT gyoto.MPI_Finalize; Finalize MPI. Wrapper around MPI_Finalize(). Returns 0 for success, non-zero otherwise. If MPI is not compiled-in, returns 1. SEE ALSO: gyoto.haveMPI, .MPI_Init, .MPI_Finalized, .MPI_Initialized */ extern gyoto_MPI_Finalized; /* DOCUMENT is_finalized=gyoto.MPI_Finalized(); Tell whether some implemention of MPI_Finalize() was already called. If MPI support is not present, return 0. SEE ALSO: gyoto.haveMPI, .MPI_Finalize, .MPI_Init, .MPI_Initialzed */ extern gyoto_MPI_Initialized; /* DOCUMENT is_initialized=gyoto.MPI_Initialized(); Tell whether some implemention of MPI_Init() was already called. If MPI support is not present, return 0. SEE ALSO: gyoto.haveMPI, .MPI_Init, .MPI_Finalize, .MPI_Finalized */ extern __gyoto_setErrorHandler; /* xDOCUMENT __gyoto_setErrorHandler Must be called once to attach the GYOTO error handler to Yorick's one */ __gyoto_setErrorHandler; extern gyoto_requirePlugin; extern gyoto_loadPlugin; extern gyoto_havePlugin; /* DOCUMENT gyoto.requirePlugin, plugin[, plugin2[, plugin3]] [, nofail=1] gyoto.loadPlugin, plugin[, plugin2[, plugin3]] [, nofail=1] gyoto.havePlugin(plugin] Load Gyoto plug-ins. INPUTS: gyoto.requirePlugin() and gyoto.loadPlugin() accept an aribtrary number of positional arguments, each a string or string array naming individual Gyoto plug-ins. For instance, all of the following attempt to load the plug-ins, stdplug, lorene and myplug: gyoto.requirePlugin, "stdplug", "lorene", myplug" gyoto.requirePlugin, ["stdplug", "lorene", myplug"] gyoto.requirePlugin, "stdplug", ["lorene", myplug"] In the first (preferred) form, each plug-in is loaded only if it is not already. In the second form, each plug-in is forcibly loaded, which has the effect that the classes it implements will be registered twice. The only use of this feature is to put the classes of this plug-in first in the registers to make sure they are the version that is used when instanciating a class without specifying it's plug-in. In short, this should not be used. gyoto.havePlugin("myplug") returns 1 if myplug has already been loaded, 0 otherwise. KEYWORDS: nofail= if set and true, failure to load a plug-in will not trigger an error. It applies to _all_ plug-ins in the list. EXAMPLE: gyoto.requirePlugin, "stdplug" gyoto.requirePlugin, "lorene", nofail=1 */ extern __gyoto_initRegister; /* xDOCUMENT __gyoto_initRegister[, pluglist] Must be called once to initialize the GYOTO plug-in register. PLUGLIST: list of plug-ins to load. If absent or nil, load the default list (either from the GYOTO_PLUGINS environment variable, or built-in default). */ __gyoto_initRegister, GYOTO_PLUGINS; extern __gyoto_exportSupplier; /* xDOCUMENT __gyoto_exportSupplier To be called by client plug-ins like gyoto_std.i */ require, "pl3d.i"; #include "gyoto_constants.i" local gyoto; /* DOCUMENT GYOTO -- General relativtY Orbit Tracer of Observatoire de paris GYOTO is a Yorick plug-in, based on an eponym C++ library, which allows computing geodesics in curved space-time. The two main uses are: -- computing the orbits of stars around relativistic objects; -- producing ray-traced images of compact objects and their surrondings. CONCEPTS AND SYNTAX =================== The Yorick plug-in implementation is object-oriented, reflecting that of the underlying C++ library. For the most part, it adheres to the Yorick uses, but some details can be surprising to a Yorick user. The gyoto namespace ------------------- Most of the Gyoto functions are put into the "gyoto" namespace (actually an oxy group, for the interested reader). You can restore, gyoto; and be done with the "gyoto." prefix. A few (rare) functions have the "gyoto_" prefix, they are not in the namespace. Creating a GYOTO object ----------------------- To create a GYOTO object, one calls one of the object creators: for instance gg = gyoto.KerrBL() ; results in GG being an opaque object containing a GYOTO Metric (a Kerr Metric in this case, using the Boyer-Lindquist coordinate system). The creators accept a filename as positional argument (see FILE FORMAT below): gg = gyoto.KerrBL( "my_KerrBL_descritpion.xml" ); Arbitrary derived classes can also be instantiated using the base class constructor: gg = gyoto.Metric("KerrBL", [plugin]); The PLUGIN argument is optional and has two effects: - it ensures the plug-in PLUGIN is loaded before attempting to instantiate the object; - it ensures the class of the newly created object comes from this plug-in and that another class by the same name in another plug-in is not inadvertently used. Finally, it is possible to instantiate an object using a buffer containing XML data: #include "pathfun.i" gg = gyoto.KerrBL(); xmldata = pathform(print(gg), delim="\n"); gg2 =gyoto.Metric(xmldata). This should be equivalent to gg2 == gg.clone(), see COPYING vs. CLONIG below. GYOTO OBJECTS BEHAVE LIKE FUNCTIONS ----------------------------------- Once a GYOTO object has been created, it can be accessed in an object-like fashion (the object then ressembles a Yorick function) or through the same function which was used to create it. For instance, to change the spin parameter of the GG Metric above, the two following are exactly synonymous: gg, spin=0.8 ; gyoto.KerrBL, gg, spin=0.8; Likewise, the value of the spin member can be retrieved like this: a = gg(spin=); a = gyoto.KerrBL(gg, spin=); Beware: in the second form, the positional parameter GG must be given before any keyword parameter. This is one of the few points were the GYOTO syntax does not fully adheres the Yorick uses. SYNTACTIC SUGAR: the dot operator --------------------------------- The normal way to access members or methods in a Gyoto object (see below) is: object, member1=val1, member2=val2...; // set member1 and member2 retval = object(member1=, member2=val2); // retrieve member1, set member2 In order to get a more usual look-and-feel, it is also possible to write this instead: noop, object.member(val[,other_args]); // set member retval = object.member([,other_args]); // get member For instance, to retrieve the mass in a Metric object, these two syntaxes work (and will continue working in future releases, until a design change is necessary): m = gg(mass=, unit="sunmass"); m = gg.mass(unit="sunmass"); Incidently, it is currently possible to process several keywords also in this way: noop, object.member1(value1, member2=value2); is the same as object, member1=value1, member2=value2; This is not intentional and your code should not rely on this behaviour. For the sake of forward compatibility, when using the .member() notation, use only additional keywords if they are needed to process .member. Currently, this concerns only the "unit=" keyword. Additional sugar: when chaining dot extraction, intermediate "()" are implied, so that scenery.screen.resolution(); is a shorthand for: scenery.screen().resolution(); A note on optimisation: the dot operator (currently) works by calling the more basic keyword= syntax. It is therefore very slightly slower. In the following, we give the alternative dot notation alternative as a comment (following "//"). MEMBERS ------- All the GYOTO objects have properties called "members" such as the spin of a Kerr metric. Members can be set or retrieved using the corresponding keywords, either upon object instantiation or at any later point in time: gg = gyoto.KerrBL( spin=0.995, mass=4e6 ) ; gg, spin=0.5; spin_param = gg(spin=); // or spin_param = gg.spin() Note how giving a member keyword without any value, as in the last example above, allows _retrieving_ the previously set value. When setting member, it is also possible to call the object as a function. In that case, the return value will be the object itself, allowing to call it again as a function: spin_val = gg(spin=0.5)(spin=) // or spin_val = gg.spin(0.5).spin() Although the above example is trivial, this is useful in many slightly more complex situations: Getting the resolution in a Screen attached to a Scenery: res_val = scenery(screen=)(resolution=); // or res_val = scenery.screen.resolution(); Setting resolution: noop, scenery.screen(resolution=res_val); // or noop, scenery.screen.resolution(res_val); (The noop above is not mandatory but avoid spurious display). Some member keywords accept more than one parameter, separated by comas. This is the second exception GYOTO makes to the Yorick syntax. For example, for setting the initial position and velocity of a star, one can use: st = gyoto.Star( initcoord=pos,vel ); // or st = gyoto.Star().initcoord(pos, vel); Only one such keyword can be set at any time because it would be exceedingly difficult to parse them otherwise. COPYING vs. CLONING ------------------- Be careful that GYOTO objects behave like pointers: if you make a copy of an object, any change in one of the instances will affect both. For instance: gg2 = gg; gg2, spin=0.5; In the above, the spin parameter of GG will be the same as that of GG2 (0.5). In fact, in memory, GG and GG2 point to the same C++ object. This is on purpose: this way, if you affect a Metric to a Photon and a Star, then change the spin of the Metric, the change will be reflected in all of the objects linked with this Metric: gg = gyoto.KerrBL(); st = gyoto.Star( metric=gg ); ph = gyoto.Photon( metric=gg ); gg, spin=0.5; In the above, the spin change affect the Photon and the Star as well. If what you want is a detached copy of a Gyoto object, you can get it with the CLONE method. Following the above example: gg_copy = gg; // This is copying: gg2 and gg are the same // object gg_clone = gg(clone=); // This is cloning: gg_clone is a // or gg_clone = gg.clone(); // detached copy gg_copy, spin=0.2; gg_clone, spin=0.7; gg.spin(); // the spin in gg is the same as in gg_copy, not // gg_clone. METHODS ------- Some keywords are "subroutine-like" methods in that they can have side-effects, but do not return a specific value. One notable example is the XMLWRITE keyword which most objects accept for dumping a description of themselves to an XML file: gg, xmlwrite="filename.xml"; // or noop, gg.xmlwrite("filename.xml") Another notable example is the HELP keyword, which lists the properties that can be set or retrieved in any object: gg, help=; // or noop, gg.help(); Other methods keywords are function-like: they usually take one or several parameter and return a value. Only one value-returning keyword can be set at a time (be it a function-like method or member keyword set for retrieving a value, such as "spin="): coor = gg(makecoord=yinit, cst); // or coor = gg.makecoord(init, cst); txyz = star(get_cartesian=dates); // or txyz = star.get_cartesian(dates); Some objects have a default methods that is called when no keyword is present. This is the case for metrics, which return the metric coefficients at a specific location, and of sceneries, which perform ray-tracing: coefficient = gg(coordinates, mu, nu); // or coefficients = scenery.metric()(coordinates, mu, nu); image = scenery(); GYOTO OBJECT TYPES ================== gyoto.Metric: the general relativity metric in which objects move... Notable sub-classes: gyoto.KerrBL, gyoto.KerrKS gyoto.Photon: massless particules used for ray-tracing gyoto.Astrobj: astrophysical objects. Notable sub-classes: gyoto.Star, gyoto.FixedStar, gyoto.PolishDoughnut, gyoto.ThinInfiniteDisk gyoto.Screen: the camera for ray-tracing gyoto.Spectrometer: the spectral capabilites of a gyoto.Screen (also found in gyoto.Photon) gyoto.Spectrum: a spectrum, only used in gyoto.Star so far gyoto.Scenery: relationship between all of the above FILE FORMAT =========== Most objects can be described in XML format. That's what you see when you print an object. You can also read/write an object from/to and XML file: sc = gyoto.Scenery( "description.xml" ); print, sc; sc, xmlwrite="backup.xml"; GYOTOY ====== GYOTO comes with a little GUI program: gyotoy. It allows interactively selecting the initial conditions for displaying the trajectory of a star or of a photon around a Kerr black-hole. EXAMPLES ======== Compute and display the orbit of a star: data = gyoto.Star(radius=0.5, metric=(gg=gyoto.KerrBL(spin=0.995)), initcoord=[0, 10.791, 1.5708, 0], [0, 0, 0.0166637], xfill=800 )( get_skypos=gyoto.Screen(metric=gg) ); plg, data(,2), data(,1); Ray-trace a scenery (orbiting star near a Kerr black-hole): sc = gyoto.Scenery( metric=(gg=gyoto.KerrBL()), screen=gyoto.Screen(metric=gg, observerpos=[1000, 100., 0.15, 0.], fov=pi/10., resolution=128), astrobj=gyoto.Star(metric=gg, radius=0.5, initcoord=[600, 9, pi/2, 0], [0, 0, 0.037037]) ) pli, sc(,,"Intensity"); Trace the trajectory of a photon in the secondary image of the above: ph = gyoto.Photon(initcoord=sc,77,45, xfill=870.623); txyz = ph.get_txyz(); plg, txyz(,3), txyz(,2); limits, square=1; SEE ALSO: gyoto.Metric, gyoto.Astrobj, gyoto.Photon, gyoto.Screen, gyoto.Scenery, gyoto.Spectrum, gyoto.Spectrometer utilities: gyotoy, gyoto_plg3, gyoto.debug, gyoto_plgsky, gyoto_plmksky, gyoto_pltsky, gyoto_reticle, gyoto_orient3, gyoto_convert */ //////// SCENERY extern gyoto_Scenery; /* DOCUMENT scenery = gyoto.Scenery([filename,] [members=values ...]) Create GYOTO Scenery object or scenery, [members=values] Set GYOTO Scenery member or res = scenery(member=) or res = scenery.member() Get GYOTO Scenery member or scenery, xmlwrite=filename Save Scenery description to XML or data = scenery([ irange, jrange [, quantities ]]) Ray-trace scenery PURPOSE: Create and use GYOTO Scenery objects. A GYOTO Scenery is used to render an image by relativistic ray-tracing. A GYOTO Scenery contains references to: - a GYOTO Metric ("the stage"); - a GYOTO Astrobj ("the actors"); - a GYOTO Screen ("the camera"). See GYOTO for basic concepts and syntax. MEMBERS: metric= see gyoto.Metric(): what "straight" means for light travel; screen= see gyoto.Screen(), it specifies where the obseerver is located and the obseerving time; astrobj= see gyoto.Astrobj(): where the light comes from; delta= a double scalar, the initial integration step for the Photons laucnched during ray-tracing; adaptive= whether integration uses adaptive step maxiter= maximum number of iterations in integration (per Photon) quantities= an array of strings giving the names of physical quantities that should be retrieved during ray-tracing. Beware that not all Astrobj kinds support all of those quantities. The order in which the quantities are listed when setting this member is not relevant, the following are equivalent: data = scenery(quantities=["EmissionTime", "Intensity"])(); and data = scenery(quantities=["Intensity", "EmissionTime"])(); Setting quantities here is not mandatory as the third positional argument used for ray-tracing permits to override it in an ordered fashion. Recognized quantities: "Intensity": apparent intensity of the Astrobj; "EmissionTime": time at which each photonreaching the screen was emitted; "MinDistance": minimum distance ever reached between each photon (whether comingfrom the object or not) and the Astrobj); "FirstDistMin": First local minimum in the Astrobj/Photon distance; "Redshift": ; "ImpactR", "ImpactX", "ImpactY" and "ImpactZ": R (specrical), X, Y and Z (Cartsesian) coordinates at which a photon was emitted by the Astrobj; "Spectrum": Inu spectrum of the Astrobj on this pixel, the spectrometer is specified in the Screen object; "BinSpectrum": spectrum of the Astrobj on this pixel (the spectrometer is specified in the Screen object), as would be detected by a real spectrometer: the value in each spectral channel is the integral of Inu over the spectral channel; "User1" to "User5": other specific scalar quantities an Astrobj may be able to compute, refer to the documentation for the Astrobj kind of your choice. nthreads=number of parallel threads to use in gyoto.Scenery_rayTrace. This has no effect when ray-tracing using the "data = scenery()" syntax below. METHODS: xmlwrite, help MPI MULTI-PROCESSING: You can check whether MPI support is compiled-in using gyoto.haveMPI(). To benefit from it, you must call gyoto.MPI_Init() once, before using the following keywords. Before quitting Yorick, should should also call 'sc, mpispawn=0; gyoto.MPI_Finalize;'. Failure to do that may lead to helper processes lingering around. nprocesses=number of parallel processes to use. If you just set nprocesses this way, they will be launched (but not stopped) automatically the first time ray-tracing is attempted. Setting nprocesses after processes have been launched does not change the number of processes running. mpispawn=number of parallel MPI jobs (a.k.a. workers) to spawn. This also sets nprocesses, and actually launches the processes. use mpilaunch=0 to stop the processes (they consume CPU cycles even when idle). Always use mpiclone to send the current Scenery to the workers before calling gyoto.Scenery_rayTrace(). This can be done in the same call as mpispawn: sc, mpispawn=12, mpiclone=; mpiclone=[anything]: clone this Scenery into the MPI workers (see mpispawn). The workers do not stay synchonised automatically. mpiclone must always be called right before ray-tracing (i.e. after any modification to the Scenery or any of the objects it contains, and after having called mpispawn). RAY-TRACING: Ray-traced data is retrieved calling the object like a function with no keyword: data = scenery (); or data = scenery (ispec, jspec, quant ) or data = scenery (alpha, delta, quant ) ISPEC and JSPEC are about anything that can be use to index an array (except range functions, wildcards and rubber indices): scalar integers, ranges (imin:imax:step), or arrays of integers. The result is that scenery() (ispec, jspec, ) == scenery(ispec, jspec, ); Indices are in the range 1 to scenery.screen().resolution(). ALPHA and DELTA are double scalars or arrays of scalars. If they are both arrays, they must have the same dimensions. They are used as angles to address the screen. Angles are normally in the range [-0.5,0.5]*scenery.screen().fov(). QUANT is an array of Yorick strings where each element selects one quantity to retrieve (see the QUANTITIES member above). QUANT may be void to use the quantities already set in the Scenery or the default for the Astrobj. If specifyng QUANT, DATA will be a MxNxP double array, where P=numberof(QUANT) and DATA(,,i) will contain the value of the quantity specified by QUANT(i). QUANTITIES may also be a scalar to retrieve a single quantity. The "Spectrum" quantity is a bit peculiar since it take more than one plane in data. PARALLEL COMPUTING: Gyoto supports parallel computing using either multi-threading (pthreads) or multi-processing (MPI). Not all classes work well using multi-threading (in particular, Lorene metrics are not thread-safe). On the other hand, all of Gyoto should support multi-processing. If you want to use mutli-processing, you should take care of: - calling 'sc, mpispawn=' before sending ray-tracing; - calling 'sc, mpiclone=;' once the scenery is ready, before tracing; - before quitting yorick: * destroy all of your sceneries with sc[]; * call gyoto.MPI_Finalize(). libgyoto may automatically initialize MPI, in which case it will also automatically terminate it. To prevent this behaviour, use mpispawn at least once before ray-tracing. SEE ALSO: gyoto.Metric, gyoto.Screen, gyoto.Astrobj, gyoto.Photon, gyoto.Spectrometer, gyoto.Scenery_rayTrace */ extern gyoto_Scenery_rayTrace /* DOCUMENT res = gyoto.Scenery_rayTrace(scenery, imin, imax, jmin, jmax, impactcoords) If IMPACTCOORDS is an unadorned, nil variable it is output. If it is an expression or non-nil, it is input. This function is a very thin wrapper around the C++ method Gyoto::Scenery::rayTrace(). It behaves exactly the same as the command-line utility gyoto, except: - the data are returned as a Yorick array instead of saved to a FITS file (if multiple quantities are requested, they are stored in successive planes in he output data cube); - (i|j)(min|max) default to sane values. Gyoto provides an alternative manner for ray-tracing, which is simply calling the Scenery object without any keyword argument. The two methods are not equivalent. Example using MPI multi-processing: #include "gyoto.i" restore, gyoto; sc = Scenery("../doc/examples/example-polish-doughnut.xml"); data = Scenery_rayTrace(sc(mpispawn=12, mpiclone=)); sc, mpispawn=0; */ func _gyoto_Scenery_adaptive_raytrace(sco, respmax, &computed) { /* xDOCUMENT data = gyoto_Scenery_adaptive_raytrace(scenery, pmax, [computed]) BROKEN Ray-trace a GYOTO Scenery on an adaptive grid. For certain kinds of objects (in particular, Stars), this routine is much faster than the equivalent: data = scenery(resolution=3^pmax, raytrace=1); It is NOT guaranteed that the two methods yield the same result. The minimum distance between photon and object is first computed on a coarse grid which is then refined as required. SEE ALSO: gyoto.Scenery */ write, format="%s\n", "WARNING: gyoto_Scenery_adaptive_raytrace() is under development"; sc = sco(clone=); // don't modify calling object DBL_MAX=1e100; screen = sc(screen=); respmax=long(respmax); resp=1; resmax=3^respmax; step=long(3^(respmax-resp)); first=step/2+1; data=array(double, resmax, resmax, 6); quantities = ["Intensity", "EmissionTime", "MinDistance", "ImpactX", "ImpactY", "ImpactZ"]; screen, resolution=resmax; data(first::step, first::step, ) = sc(first::step, first::step, quantities); computed=array(long,resmax,resmax); nb=9; for (resp=2, res=3; resp<=respmax; ++resp) { // largest distance to neighbour dsub=data(first::step, first::step,); ind=where(dsub>=DBL_MAX); if (numberof(ind)) dsub(ind)=DBL_MAX; delta = array(double, res, res); d1=(dsub(dif,,4:6)^2)(,,sum); d2=(dsub(,dif,4:6)^2)(,,sum); delta(2:-1,2:-1)=[d1(:-1,2:-1), d1(2:,2:-1), d2(2:-1,:-1), d2(2:-1,2:)](,,max); delta(1,2:-1)=[d1(1,2:-1), d2(1,:-1), d2(1,2:)](,max); delta(0,2:-1)=[d1(0,2:-1), d2(0,:-1), d2(0,2:)](,max); delta(2:-1,1)=[d2(2:-1,1), d1(:-1,1), d1(2:,1)](,max); delta(2:-1,0)=[d2(2:-1,0), d1(:-1,0), d1(2:,0)](,max); delta(0,0)=[d1(0,0), d2(0,0)](max); delta(1,1)=[d1(1,1), d2(1,1)](max); delta(0,1)=[d1(0,1), d2(0,1)](max); delta(1,0)=[d1(1,0), d2(1,0)](max); // ! BEWARE : res is updated here res*=3; refine=array(int, res, res); refine(1::3, 1::3) = refine(2::3, 1::3) = refine(3::3, 1::3) = refine(1::3, 2::3) = refine(2::3, 2::3) = refine(3::3, 2::3) = refine(1::3, 3::3) = refine(2::3, 3::3) = refine(3::3, 3::3) = (dsub(,,3)<4*delta) | (dsub(,,3)<2); nstep=long(3^(respmax-resp)); nfirst=first-nstep; data(nfirst ::step,nfirst ::step,)= data(first ::step,nfirst ::step,)= data(first+nstep::step,nfirst ::step,)= data(nfirst ::step,first ::step,)= data(first+nstep::step,first ::step,)= data(nfirst ::step,first+nstep::step,)= data(first ::step,first+nstep::step,)= data(first+nstep::step,first+nstep::step,)= dsub; step=nstep; first=nfirst; for (i=1; i<=res; ++i) { ibis=(i-1)*step+first; ind=where(refine(i,) & !computed(ibis,first::step)); nb+=numberof(ind); if (numberof(ind)) { indbis=(ind-1)*step+first; data(ibis,indbis,)=sc(ibis, indbis, quantities); computed(ibis, indbis)=resp; } } } nb; return data; } func gyoto_matte_paint(set, paint, kind=, yaw=, pitch=, roll=) /* DOCUMENT bg = gyoto.matte_paint(set, paint[, coordkind=coordkind]) Vizualize lensing effects on a painted background. Only geometrical distorsion effects are rendered. gyoto.matte_paint() will ray-trace the Scenery SET, compute the origin direction of each Photon that do originate from infinite, and pass these directions to PAINT. INPUTS: set: a Gyoto Scenery or impact coordinates as computed with sc(,,impactcoords=); paint: a function-like object that will perform the actual painting. PAINT will be called as: bg = paint(theta, phi, mask=mask); where THETA and PHI denote the direction from which each Photon originates, as seen from the center of the coordinate system, and mask is 0 for Photons that do not exist (e.g. photons that would fall into the black-hole. OUTPUT: The rendered image. */ { restore, gyoto; coordkind=kind if (is_Scenery(set)) { data=sc(,,impactcoords=)(9:,,); coordkind=sc.metric().coordkind(); } else { if (is_void(coordkind)) error, "KIND must be provided if SET is not a Scenery"; if (dimsof(set)(2)==8) data=set; else data=set(9:,,); } // Prepare rotation matrix to transform from compact object // coordinates to painter coordinates. Yaw, pitch and roll are the // angles defining the orientation of the painter relative to the // metric coordinate system. // First, R is identity. R=array(0., 3, 3); for (i=1; i<=3; ++i) R(i, i)=1.; // Then, apply each rotation in order. // yaw, about Z axis if (!is_void(yaw)) R = gyoto.rotation(3, yaw); // pitch, about rotated Y axis if (!is_void(pitch)) R = gyoto.rotation(2, pitch)(,+)*R(+,); // roll, about rotated X axis if (!is_void(roll)) R = gyoto.rotation(1, roll)(,+)*R(+,); // Transform the photon's 4-velocity into Cartesian coordinates if (coordkind==gyoto.coordkind.spherical) { t=data(1,,); r=data(2,,); theta=data(3,,); phi=data(4,,); tdot=data(5,,); rp=rdot=data(6,,); thp=thetadot=data(7,,); php=phidot=data(8,,); ind=where(tdot); taup=tdot; taup(ind)=1./tdot(ind); rp =rdot *taup; php=phidot *taup; thp=thetadot*taup; sth=sin(theta); cth=cos(theta); sph=sin(phi); cph=cos(phi); ur= [sth*cph, sth*sph, cth]; uth=[cth*cph, cth*sph, -sth]; uph=[ -sph, cph, 0]; durdph=sth*uph; durdth=uth; durdt=php*durdph+thp*durdth; v=rp*ur + r*durdt; mask0=char(r<1e200); } else { tdot=data(5,,); xdot=data(6,,); ydot=data(7,,); zdot=data(8,,); v=[xdot, ydot, zdot]/tdot(,,-); mask0=char(tdot<1e200); } // Express this in the painter base: V=R(,+)*v(,,+); // transform to spherical coordinates vproj2=V(1,,)^2+V(2,,)^2; vr=sqrt(vproj2+V(3,,)^2); vph=atan(V(2,,), V(1,,)); vth=atan(sqrt(vproj2), V(3,,)); theta=pi-vth; phi=vph-pi; if (numberof((ind=where(phi<-pi)))) phi(ind)+=2.*pi; bg=paint(theta, phi); if (dimsof(bg)(1) == 3) {bg*=mask0(-,,);} else bg *= mask0; return bg; } if (is_func(use)) painters_junk=save(painters_junk, gyoto_painters_p_mode_eval, gyoto_painters_mk_p_mode, gyoto_painters_panorama_eval, gyoto_painters_mk_panorama, gyoto_painters_picture_eval, gyoto_painters_mk_picture); func gyoto_painters_p_mode_eval(theta, phi, mask=) { use, ntheta, nphi; bg=sin(ntheta*theta)*sin(nphi*phi)+1.; if (!is_void(mask)) bg*=mask; return bg; } func gyoto_painters_mk_p_mode(ntheta=, nphi=) /* DOCUMENT painter = gyoto.painters.mk_p_mode([ntheta=ntheta, [nphi=nphi]) Make a painter for gyoto.matte_paint(). In this painter, the sky is mainted in a p-mode spherical harmonic fashion, with m=nphi and l=nphi+ntheta. SEE ALSO: gyoto.matte_paint */ { if (is_void(ntheta)) ntheta=1; if (is_void(nphi)) nphi=1; return closure(save(ntheta=ntheta, nphi=nphi, painter_eval=gyoto.painters.p_mode_eval), painter_eval); } func gyoto_rotation(axis, angle) /* DOCUMENT R=gyoto.rotation(axis, angle) Yield rotation matrix about axis AXIS (Ox=1, Oy=2, Oz=3) by amount ANGLE. If vector V holds the coordinates of a point in original the coordinate base, R(,+)*v(+) holds coordinates of same point in rotated base while R(+,)*v(+) holds coordinates of rotated vector in original base. In both cases, if S and T are two rotations, R=T(,+)*S(+,) if the rotation obtained by first applying S, then T. SEE ALSO: */ { ca=cos(angle); sa=sin(angle); R2=[[ca, -sa], [sa, ca]]; R3=array(0., 3, 3); for (i=1; i<=3; ++i) R3(i, i)=1.; plane=(axis+[1, 2])%3; if (numberof((ind=where(plane==0)))) plane(ind)=3; R3(plane, plane)=R2; return R3; } func gyoto_painters_picture_eval(theta_spherical, phi_spherical, mask=) { // see http://mathworld.wolfram.com/GnomonicProjection.html use, img, phi1, lambda0; dmatte=dimsof(img); ndims=dmatte(1); nx=dmatte(-1); ny=dmatte(0); phi=pi/2-theta_spherical ; // latitude lambda=-phi_spherical ; // longitude cos_c=sin(phi1)*sin(phi)+cos(phi1)*cos(phi)*cos(lambda-lambda0); x=cos(phi)*sin(lambda-lambda0)/cos_c; y=(cos(phi1)*sin(phi)-sin(phi1)*cos(phi)*cos(lambda-lambda0))/cos_c; // two extreme points in the long dimension phi_corners=phi1+fov*0.5*[-1.,1.]*(ny>nx); lambda_corners=lambda0+fov*0.5*[-1.,1.]*(nx>=ny); cos_c_corners=sin(phi1)*sin(phi_corners)+ cos(phi1)*cos(phi_corners)*cos(lambda_corners-lambda0); x_corners=cos(phi_corners)*sin(lambda_corners-lambda0)/ cos_c_corners; y_corners=(cos(phi1)*sin(phi_corners)- sin(phi1)*cos(phi_corners)*cos(lambda_corners-lambda0))/ cos_c_corners; scale=(nx>=ny)?(nx/x_corners(dif)):(ny/y_corners(dif)); // Below, +0.5 so that for a 4x4 grid, the center is at 2.5, and // another +0.5 so that the long() conversion yields the closest // approximation rather than the bottom truncation. i0=nx*0.5 +1.; j0=ny*0.5 +1.; xp=i0 + x*scale ; yp=j0 + y*scale ; if (numberof((ind=where(xp<=0)))) xp(ind)=1; if (numberof((ind=where(yp<=0)))) yp(ind)=1; if (numberof((ind=where(xp>nx)))) xp(ind)=nx; if (numberof((ind=where(yp>ny)))) yp(ind)=ny; dd=dimsof(phi); if (ndims==3) bg=array(structof(img), dmatte(2), dd(2), dd(3)); if (ndims==2) bg=array(structof(img), dd(2), dd(3)); for (i=1; i<=dd(2); ++i) { for (j=1; j<=dd(3); ++j) { bg(..,i,j)=img(..,long(xp(i, j)),long(yp(i, j))); } } return bg; } func gyoto_painters_mk_picture(img=, fov=, phi1=, lambda0=) /* DOCUMENT painter = gyoto.painters.mk_picture(img=img) Make a painter for gyoto.matte_paint(). In this painter, only a fraction of the celestial sphere is available in rectilinear (=gnomonic) projection. In other words, as a normal photographic picture. Missing pixels are painted like the closest available pixel. Keywords: Mandatory: img: the image, suitable for displaying with pli. Optional: h_fov: horizontal angle of view of the image, in radians. v_fov: vertical field of view of the image. fov: field-of-view in the largest dimension of the image. By default, FOV corresponds to 36mm film behind a 50mm focal-length lense (about 40°) and the pixel scale is assumed to be the same in the horizontal and vertical dimensions. All angles must be specified in radians. SEE ALSO: gyoto.matte_paint, .painters.mk_p_mode */ { if (is_void(img)) error, "img can't be void"; d=dimsof(img); nx=d(-1); ny=d(0); if (is_void(fov)) fov=2.*atan(36./100.); if (is_void(phi1)) phi1=0.; if (is_void(lambda0)) lambda0=0.; return closure(save(img, h_fov, v_fov, phi1, lambda0, painter_eval=gyoto.painters.picture_eval), painter_eval); } func gyoto_painters_panorama_eval(theta, phi, mask=) { use, img, phi_fov, theta_fov; dmatte=dimsof(img); ndims=dmatte(1); nphi=dmatte(ndims); ntheta=dmatte(ndims+1); if (is_void(phi_fov)) phi_fov=2.*pi; if (is_void(theta_fov)) theta_fov=pi; // That's in pixel per radian. Minus signs because theta increases // from top to bottom and phi from right to left, as seen from // inside the sphere. phi_scale=-nphi/phi_fov; theta_scale=-ntheta/theta_fov; // Below, +0.5 so that for a 4x4 grid, the center is at 2.5, and // another +0.5 so that the long() conversion yields the closest // approximation rather than the bottom truncation. i0=nphi*0.5 +1.; j0=ntheta*0.5 +1.; x=long(i0 + phi*phi_scale) ; y=long(j0 + (theta-0.5*pi)*theta_scale) ; if (numberof((ind=where(x<=0)))) x(ind)=1; if (numberof((ind=where(y<=0)))) y(ind)=1; if (numberof((ind=where(x>nphi)))) x(ind)=nphi; if (numberof((ind=where(y>ntheta)))) y(ind)=ntheta; dd=dimsof(phi); if (ndims==3) bg=array(structof(img), dmatte(2), dd(2), dd(3)); if (ndims==2) bg=array(structof(img), dd(2), dd(3)); for (i=1; i<=dd(2); ++i) { for (j=1; j<=dd(3); ++j) { bg(..,i,j)=img(..,x(i, j),y(i, j)); } } return bg; } func gyoto_painters_mk_panorama(img=, phi_fov=, theta_fov=) /* DOCUMENT painter = gyoto.painters.mk_panorama(img=img) Make a painter for gyoto.matte_paint(). In this painter, the sky is painted using an image. The image should be a 360°x180° panorama rendered in equirectangular projection. If the image does not cover the full celestial sphere, use phi_fov and theta_fov to specify the field of view in each direction. img should be an array(char, 3, nphi, ntheta). SEE ALSO: gyoto.matte_paint, .painters.mk_p_mode */ { if (is_void(phi_fov)) phi_fov=2.*pi; if (is_void(theta_fov)) theta_fov=pi; return closure(save(img, phi_fov, theta_fov, painter_eval=gyoto.painters.panorama_eval), painter_eval); } local gyoto_painters; /* DOCUMENT namespace gyoto.painters Contains painters to be used with gyoto.matte_paint. EXAMPLE: sc=gyoto.Scenery("file.xml"); painter=gyoto.painters.mk_p_mode(ntheta=80, nphi=80); bg=gyoto.matte_paint(sc, painter); SEE ALSO: gyoto.matte_paint, .painters.mk_p_mode */ if (is_func(use)) { gyoto_painters=save(p_mode_eval=gyoto_painters_p_mode_eval, mk_p_mode=gyoto_painters_mk_p_mode, picture_eval=gyoto_painters_picture_eval, mk_picture=gyoto_painters_mk_picture, panorama_eval=gyoto_painters_panorama_eval, mk_panorama=gyoto_painters_mk_panorama); restore, painters_junk; } // PHOTON CLASS extern gyoto_Photon; /* DOCUMENT photon = gyoto.Photon([filename], [members=values]) photon, member=values value = photon(member=) or value = photon.member value = photon(function_method=params) photon, subroutine_method=params PURPOSE: Instantiate and use a single GYOTO photon. Photons are mass-less particles following light-like geodesics of a metric. For basic concepts, see GYOTO. For ray-tracing, gyoto.Scenery() is more appropriate. MEMBERS: Members can be set with the syntax "photon, member=value" and retrieved with the syntax "value=photon(member=)" or "value=photon.member": metric= a GYOTO Metric (see gyoto.Metric), initcoord=scenery,x,y also sets the metric. astrobj=a GYOTO Astrobj (see gyoto.Astroj), the target of ray-tracing. initcoord= the initial coordinates (4-position & 4 velocity). There are many ways to specify this: initcoord=COORD8 directly give the 8 coordinates; initcoord=POS4,VEL4 as above, with a coma in-between; initcoord=POS4,VEL3 this time only 3 coordinates are given for the velocity vector. The light-ray will be tangent to this 3-vector. initcoord=SCREEN,DALPHA,DDELTA SCREEN is a gyoto.Screen, DALPHA and DDELTA specify the direction this photon comes from when it reaches the screen. DALPHA and DDELTA are in radians and must be floating-point values. initcoord=SCREEN,I,J As above, but I and J are integers specifying the pixel of the arrival SCREEN which the photon hits. initcoord=SCENERY,DALPHA,DDELTA initcoord=SCENERY,I,J As above, but specify a gyoto.Scenery instead of a gyoto.Screen. The Metric and Astrobj of the Senery will also be attached to the Photon. Those last ways of specifying the initial conditions are very useful to get the trajectory of a specific photon in a ray-traced scenery. spectro= a gyoto.Spectrometer delta= integration step (initial in case of adaptive, the default) adaptive= whether integration uses adaptive step maxiter= maximum number of iterations in integration integrator= "Legacy" | "runge_kutta_fehlberg78" | "runge_kutta_cash_karp54" |"runge_kutta_dopri5" | "runge_kutta_cash_karp54_classic" The integrator to use. deltamin=, deltamax=, deltamaxoverr=, abstol, reltol: numerical tuning parameters for the integrators other than Legacy (the tuning parameters for the Legacy integrator are set in the Metric object). You should normally need to tweak only abstol and reltol. If you find you need to change the others, try a higher order integrator, such as runge_kutta_fehlberg78. SUBROUTINE-LIKE METHODS: Several of these keywords can by specified whenever creating or accessing the object. xfill=TLIM Integrate the geodesic from the time specified with INITCOORD to tlim (the integrated geodesic remains stored in the PHOTON); save_txyz=FILENAME Dump the integrated geodesic in cartesian coordinates in ASCII file FILENAME. xmlwrite=filename as usual, save an XML description of this photon; help=; list properties; setparameter=name[,value] set any low-level parameter. Name and value are strings. FUNCTION-LIKE METHODS: The object PHOTON will return a value when called as a function with the following keywords set: is_hit= Return 1 if this photon hits the Astrobj get_txyz= Return the geodesic in Cartesian coordinates: data = photon(xfill=tlim, get_txyz=) data will be a Nx4 double array where data(i,) contains the 4-position in Cartesian coordinates of the photon for all the dates computed by the integrator between INITCOORD[0] and TLIM. get_coord= Return the geodesic in Metric coordinatess: same as above, but in the prefered coordinate system for this metric, which may be Cartesian or spherical. get_coord=dates Same as above, but for the dates specified in double array DATES. get_cartesian=dates Get the 3-position and 3-velocity of the Photon in Cartesian coordinates for the specified dates. SEE ALSO: gyoto, gyoto.Metric, gyoto.Screen, gyoto.Scenery, gyoto.Astrobj */ /// METRIC extern gyoto_Metric; /* DOCUMENT gg = gyoto.Metric( filename, [members=values] ) gg, members=values retval = gg(member=) or retval = gg.member; retval = gg(function_method=par1, par2...) gg, xmlwrite=filename coef = gg(coordinates, mu, nu) gg, help=; PURPOSE: Create and manipulate GYOTO Metric objects INTRODUCTION: See GYOTO for basic concepts. The GYOTO plug-in for Yorick introduces "Metric" objects (see GYOTO for an introduction). Such objects are created used for instance the gyoto.KerrBL() function. Any kind of metric (even if not explicitely exposed in this plug-in) can be loaded from an XML file using the FILENAME parameter. This XML file can by any GYOTO file containing a Metric section: the top-level can be a Metric, a Scenery, an Astrobj or whatever which contains a reference to a Metric. When printed, a Metric displays an XML description of itself, which can be dumped to a file using the XMLWRITE keyword. The HELP method prints the list of properties supported by this astrobj. Most GYOTO functions which accept a Metric as a parameter accept any kind of Metric. There are nevertheless specific functionsAstrobjs which make sense only in the framework of a specific kind of Metric, notably gyoto.KerrBL. This is the case for gyoto.PolishDoughnut for instance. MEMBER KEYWORDS: mass=, unitlength=, kind=, deltamin=, deltamax=, keplerian= All the Metric kinds have a mass that can be set and retrieved using the mass keyword: gg, mass=value; value = gg(mass=); Setting the mass gives the scale of the black hole in physical units. The unit length can be retrieve using the unitlength keyword: len = gg(unitlength=) where LEN is in meters if MASS was set in kilograms. The kind of the metric (e.g. "KerrBL") can be queried: kind_string = gg(kind=) The coordinate kind of this metric can be compared with members of the oxy group gyoto.coordkind: if (gg.coordkind() == gyoto.coordkind.cartesian) ...; The minimum and maximum value of the adaptive step in the integrator can be set using respectively deltamin and deltamax. KEPLERIAN can be set to 1 in oreder to get CIRCULARVELOCITY to return the Keplerian approximation. METHODS Without any keywords, the metric can output its coefficient at 4-position POSITION: coefs = gg(position, mu, nu); where mu and nu are indices or ranges (1-4, 1 is for time). coefs = gg(position) returns the 16 metric coefficients at position. Additional function-like or subroutine like methods: coord=gg(prime2tdot=pos, vel): COORD is the 8-vector where COORD[1-4]==POS and COORD[5-8] is the 4-velocity corresponding to the 3-velocity VEL; vel4 =gg(nullifycoord=pos, vel) Return nullified (photon) coord tangent to vel at pos. prod = gg(scalarprod=pos, u1, u2) Return (4-dimensional) scalar product. vels = gg(circularvelocity=coords [, dir]) On input, COORDS is an array of doubles yielding 4-position vectors: x0=coords(1,..), x1=coords(2, ..), x3=coords(3, ..), x4=coords(4, ..). The return value VELS has the same dimensionality as coords(1:4, ..). It contains the circular velocity (on te equatorial plane, so COORDS is projected) corresponding to each position specified by coords. If the optional parameter DIR is -1, VELS corresponds to the counter-rotating circular velocity. Gamma= gg(christoffel=pos) Return the 64 Christoffel symbols at posistion POS. Beware of the index ordering: Gamma(nu, mu, alpha) == Gamma^alpha_mu_nu gg, help=; print help on properties. SEE ALSO: gyoto, gyoto.KerrBL, gyoto.KerrKS */ extern gyoto_Astrobj; /* DOCUMENT ao = gyoto.Astrobj( filename ); ao, member1=val1, member2=val2...; val = ao(member=) or val = ao.member ao, xmlwrite=filename ao, help=; Generic class for describing an astronomical object (a star, an accretion disk...) in the context of GYOTO. See "help, gyoto" for an introduction. Several specific kinds of objects can be created using the functions listed in "SEE ALSO". Any kind of Astrobj can be loaded from an XML file using gyoto.Astrobj. This XML file can be any GYOTO file containing an Astrobj section (for instance, a Scenery file). When printed, an astrobj displays an XML description of itself. This description can be saved to disk using the XMLWRITE method keyword. The HELP method prints the list of properties supported by this astrobj. MEMBER KEYWORDS All the kinds of Astrobjs share a few members that can be accessed with the following keywords. To set the member, use "ao, member=value". To retrieve the current value of the member, use "retval = ao(member=)" or "retval = ao.member". rmax: for optimization, tell the Scenery that this object does not extend over RMAX from the center of the coordinate system (RMAX is expressed in geometrical units). opticallythin: whether or not to compute radiative transfer through the object for optically thin objects. kind: read only. ao(kind=) return a string containing the kind of this object (e.g. "Star", "PolishDoughnut"). METHOD KEYWORDS Astrobj objects can also provide function-like or subroutine-like methods. All of them support the following (subroutine-like): xmlwite="filename.xml" dump a description of the object to an XML file. setparameter="name","content" generic method to set a parameter in an Astrobj object, even if is has not been explicitely exposed in the Yorick plug-in. For instance, if st is a gyoto.Star object, the two following commands yield the same result, although the former is faster than the latter: st, radius=1.0; st, setparameter="Radius","1.0"; The list of values that "name" can take is (or should be) documented in the doxygen documentation for the specific class. See Gyoto::Astrobj::Generic::setParameter(). EXAMPLES: The following implement specific objects, most require gyoto_std.i: gyoto.Star A spherical object moving along a geodesic gyoto.FixedStar A spherical object of constant coordinates gyoto.Torus A simple torus (solid, Keplerian rotation) gyoto.ThinDisk A geometrically thin disk gyoto.PatternDisk As above, emission numerically provided gyoto.Disk3D Thick disk, emission numerically provided It is also possible to instantiate an astrobj by kind name even if this kind is not explicitly implemented in the yorick plug-in: gyoto.Astrobj("PageThorneDisk") A geometrically thin, optically thick disk with Page & Thorne 1974 emission SEE ALSO: gyoto */ extern gyoto_ThinDisk; /* DOCUMENT ao = gyoto.ThinDisk( filename ); ao, member1=val1, member2=val2...; val = ao(member=) or val = ao.member ao, xmlwrite=filename ao, help=; A more specific version of the gyoto.Astrobj function. A very crude Astrobj can be instantiated using gyoto.ThinDisk. More elaborate derived classes also exist. gyoto.ThinDisk accepts a few keywords in addition to those processed by gyoto.Astrobj. MEMBER KEYWORDS innerradius: inner radius of the disk. outer radius: outer radius of the disk. dir: 1 if corotating (relative to the coordinate system), -1 if coounter rotating. SEE ALSO: gyoto, gyoto.Astrobj There is one derived classe in gyoto_std.i: gyoto.PatternDisk As above, emission numerically provided try also gyoto.Astrobj("PageThorneDisk") */ extern gyoto_Screen; /* DOCUMENT screen = gyoto.Screen([keyword=value ...]) or gyoto.Screen, screen, [keyword=value] or screen, [keyword=value] Set GYOTO Screen member or res = gyoto.Screen(screen, get_keyword=1) or res = screen(get_keyword=1) Get GYOTO Screen member PURPOSE: Create and use GYOTO Screen objects. A GYOTO Screen is in essence the virtual camera used for ray-tracing a GYOTO Scenery. It contains informations such as the resolution of the output images and the location of the camera relative to the Metric. A Screen is usually created using the gyoto.Screen function. It's members are then set or queried using various member keywords (see KEYWORDS below, "help, gyoto"). A description of the Screen can be written to an XML file using the xmlwrite= keyword. The help= keyword prints the list of poperties that the Screen class supports. INPUT: SCREEN: an opaque object referencing a GYOTO Screen instance. In the first form, SCENERY is instantiated with any member set accordingly to the KEYWORD=VALUE pairs. In the four other forms, SCREEN must have been instantiated by a previous call to gyoto.Screen(). OUTPUT: SCREEN: in the first form, a new GYOTO Screen object is returned (actually an opaque Yorick object referencing a GYOTO object). RES: in the last two forms, the Screen object is queried thanks to a keyword starting with "get_" and the call returns the corresponding value. KEYWORDS: Member keywords are used to set the value of a member (screen, member=value) or to retrieve the value of a member (value=screen(member=) or value=screen.member). Many support "unit".: metric, time, tmin, fov (field-of-view), resolution (N pixels on each side), alpha0, delta0, distance (meters), inclination, paln (position angle of the line of nodes), argument, freqobs, pojection (=[incl, paln, arg]), observerpos (alternative way to set time, dist, incl, and arg by giving the position of the camera. Here, dist is in geometrical units), fourvel, screen1, screen2, screen3, spectro (see gyoto.Spectrometer); Screens provide two function-like methods and the usual subroutine-like method xmlwrite plus two methods for specifying a mask: skycoord = [x0, x1, x2, x3] returns screen (=sky) coordinates d_alpha, d_delta, d_dist raycoord = [d_alpha, d_delta] returns 8-coordinate vector (position-velocity) of photon hitting screen with arrival direction d_alpha, d_delta. xmlwrite = filename to export screen to XML. help=nil list properties. mask= [nil | filename | image] use nil to retrieve the mask, filename to load mask from FITS file, image array to set mask from Yorick array. maskwrite=filename: save mask to FITS file. SEE ALSO: gyoto, gyoto.Metric, gyoto.Scenery, gyoto.Astrobj, gyoto.Spectrometer */ extern gyoto_Spectrum; /* DOCUMENT sp = gyoto.Spectrum([filename, ][members=values] or sp, method=parameters or value = sp(method=parameters) or Inu = sp(frequency) or I_nu1_nu2 = sp(integrate=channels) A gyoto object with the usual gyoto syntax representing the spectrum of a source. So far, it can be attached only to a Star. The specificity of a spectrum is that it can be used as a function to retrieve the intensity of an object at a given wavelength. METHODS: operator(): Without any keyword, SP is used as a function to evaluate Inu at a given FREQUENCY: Inu = sp(frequency) FREQUENCY may be an array if any shape, Inu will be conformable. FREQUENCY is in Hz. integrate=channels CHANNELS must be a 1-dimensional array of N doubles (N>=2). The returned value will be an array of doubles with N-1 elements: I_nu1_nu2 = sp(integrate=channels) I_nu1_nu2(i) is the integral of Inu from frequency nu1 to frequency nu2. This is the same than the BinSpectrum quantity in a Scenery. GENERIC MEMBERS: kind= (read-only) GENERIC SUBROUTINE-LIKE METHODS xmlwrite=filename (as usual) help=nil (as usual) GENERIC FUNCTION-LIKE METHODS clone= (as usual) SEE ALSO: gyoto, gyoto.Star */ extern gyoto_debug; /* DOCUMENT gyoto.debug, 1/0 Turn GYOTO debug output on/off. SEE ALSO: gyoto */ extern gyoto_verbose; /* DOCUMENT gyoto.verbose, level or level = gyoto.verbose() Set/get Gyoto verbosity level SEE ALSO: gyoto */ extern gyoto_Spectrometer; /* DOCUMENT spectro = gyoto.Spectrometer([filename],[members=values]) or spectro, xmlwrite=filename or var = spectro( channels= | midpoints= | widths= | nsamples= | kind= | clone= ) The spectrometric capabilities of a GYOTO Screen or Photon. The spectrometer attached to a Screen in a Scenery determines the frequencies for which the Quantities Spectrum and BinSpectrum are computed when ray-tracing. For basics, see GYOTO. In the first form, if FILENAME is specified, a new Spectrometer is instantiated from XML file FILENAME. FILENAME can also name a Spectrometer Kind, such as "Complex" or "wave". KEYWORDS: unit= a string, affects methods called together: channels_in_microns=spectro(channels=, unit="microm") METHODS: xmlwrite=filename, write XML desription of this spectrometer to hard drive. E.g. spectro, wmlwrite="file.xml" help=nil, list properties The following keywords allow retrieving information on the spectrometer. They don't take a value but return one with this syntax: retval=spectro(keyword=) kind= returns the Spectrometer kind name, e.g. "wave", "freq" or "Complex". nsamples= returns the number of spectral channels. channels= return an array(double, NSAMPLES, 2) yielding the edges of each spectral channel in UNIT (default: Hz) midpoints= returns an array(double, NSAMPLES) yielding the central frequency of each spectral channel in UNIT (default: Hz). widths= returns the width of each spectral channel in UNIT (default: Hz). clone= returns a deep copy of this Spectrometer. SEE ALSO: gyoto, gyoto.Screen, gyoto.Scenery, gyoto.SpectroUniform, gyoto.SpetroComplex */ extern gyoto_SpectroUniform; extern _gyoto_SpectroUniform_register_as_Spectro; /* DOCUMENT spectro = gyoto.SpectroUniform([members=values]) or spectro, keywords=values or retval = spectro( keyword= ) gyoto.SpectroUniform() is a more specific implementation of gyoto.Spectrometer(). It allows creating an Spectrometer::Uniform object which models a spectrometer where NSAMPLES spectral channels are unifromly spaced in wavelength, frequency, or log10 thereof. gyoto.SpectroUniform has a superset of the functionalities of gyoto.Spectrometer. MEMBERS: Members can be set with "spectro, member=value" and retrieved with "value = spectro(member=)" or "value=spectro.member". kind= a string, one of "none", "wave", "freq", "wavelog", "freqlog". KIND affects how BAND below is interpreted and how CHANNELS and MIDPOINTS are returned. Since these four "kinds" are actually based on the same code, it is possible to convert a Spetrcometer between them. nsamples= a long, the number of spectral channels in this spectrometer; band= a pair of doubles, the lower and upper boundaries of the spectral band covered by this spectrometer. The default unit in which BAND is expressed depends on KIND: KIND UNIT freq Hz freqlog log10(Hz) wave m wavelog log10(m) Keyword UNIT can be set to use a different unit than the default. For kinds freqlog and wavelog, log10(unit) is used. METHODS: The following methods from gyoto_Spectrometer are implemented: xmlwrite, help, clone, channels, midpoints, widths. SEE ALSO: gyoto.Spectrometer, gyoto.SpectroComplex */ _gyoto_SpectroUniform_register_as_Spectro; extern gyoto_SpectroComplex; extern _gyoto_SpCplx_register_as_Spectrometer; /* DOCUMENT spectro = gyoto.SpectroComplex([members=values]) or spectro, keywords=values or retval = spectro( keyword= ) or subspectro = spectro(index) gyoto.SpectroComplex() is a more specific implementation of gyoto.Spectrometer(). It allows creating an Spectrometer::Complex object which models a spectrometer made of several simpler Spectrometer objects (sub-spectrometers). gyoto.SpectroComplex has a superset of the functionalities of gyoto.Spectrometer. A single sub-spectrometer can be retrieved by its INDEX. INDEX is 1-based, as is customary in Yorick. EXAMPLE: sp1 = gyoto.SpectroUniform(kind="wave", nsamples=10, unit="microm", band=[1, 2]); sp2 = gyoto.SpectroUniform(kind="freqlog", nsamples=10, unit="eV", band=[10, 20]); sp = gyoto.SpectroComplex(append=sp1)(append=sp2); sp1bis = sp(1); sp2bis = sp(2); METHODS: The following methods from gyoto.Spectrometer are implemented: xmlwrite, help, clone, channels, midpoints, widths. In addition, gyoto.SpectroComplex accepts the following methods: append=subspectro add new sub-spectrometer remove=index remove sub-spectrometer INDEX SEE ALSO: gyoto.Spectrometer, gyoto.SpectroUniform */ _gyoto_SpCplx_register_as_Spectrometer; func gyoto_plg3(x,y,z, keywords=) { /* DOCUMENT gyoto_plg3, x, y, z Plot (plg) a graph in 3D using the API provided by pl3d.i SEE ALSO: pl3d.i, set3_object, gyoto_plgsky */ if (_draw3) { xyz= _nxt(x); keywords= _nxt(x); get3_xy, xyz, x, y; plgk, y, x, keywords=keywords; return; } set3_object, gyoto_plg3, _lst(transpose([x,y,z]), keywords); } func gyoto_plmk3(x,y,z, keywords=) { /* DOCUMENT gyoto_plmk3, x, y, z Plot (plg) a graph in 3D using the API provided by pl3d.i SEE ALSO: pl3d.i, set3_object, gyoto_plgsky */ if (_draw3) { xyz= _nxt(x); keywords= _nxt(x); get3_xy, xyz, x, y; plmkk, y, x, keywords=keywords; return; } set3_object, gyoto_plmk3, _lst(transpose([x,y,z]), keywords); } func gyoto_plgsky(alpha,delta, keywords=) { /* DOCUMENT gyoto_plgsky, alpha, delta Plot (plg) data on the plane of the sky using the pl3d.i API. Not all transforamations are allowed (basically orient3 and rot3). SEE ALSO: gyoto_pltsky, gyoto_plmksky, gyoto_reticle, gyoto_plg3 */ if (_draw3) { list=alpha; alpha= _nxt(list); delta= _nxt(list); keywords= _nxt(list); scale= _getscl3()(1); plgk, delta*scale, -alpha*scale, keywords=keywords; return; } set3_object, gyoto_plgsky, _lst(alpha, delta, keywords); } func gyoto_plmksky(alpha,delta, keywords=) { /* DOCUMENT gyoto_plmksky, alpha, delta Plot (plmk) data on the plane of the sky using the pl3d.i API. Not all transforamations are allowed (basically orient3 and rot3). SEE ALSO: gyoto_pltsky, gyoto_plgsky, gyoto_reticle */ if (_draw3) { list=alpha; alpha= _nxt(list); delta= _nxt(list); keywords= _nxt(list); scale= _getscl3()(1); plmkk, delta*scale, -alpha*scale, keywords=keywords; return; } set3_object, gyoto_plmksky, _lst(alpha,delta, keywords); } func gyoto_pltsky(text, alpha, delta, keywords=) { /* DOCUMENT gyoto_plgsky, text, alpha, delta, justify Write text (plt) on the plane of the sky using the pl3d.i API. Not all transforamations are allowed (basically orient3 and rot3). SEE ALSO: gyoto_plgsky, gyoto_plmksky, gyoto_reticle */ if (_draw3) { list=text; text = _nxt(list); alpha = _nxt(list); delta = _nxt(list); keywords= _nxt(list); scale= _getscl3()(1); if (is_void(keywords)) keywords=GraphK(); keywords.tosys=&long(1); pltk, text, -alpha*scale, delta*scale, keywords=keywords; return; } set3_object, gyoto_pltsky, _lst(text, alpha,delta, keywords); } func gyoto_reticle(alphamax, deltamax, alphamin, deltamin, set=) { /* DOCUMENT gyoto_reticle, alphamax [, deltamax, alphamin, deltamin] Draw alpha and delta axes on the plane of the sky using the pl3d.i API. Not all transforamations are allowed (basically orient3 and rot3). SEE ALSO: gyoto_plgsky, gyoto_plmksky, gyoto_pltsky */ if (is_void(deltamax)) deltamax = alphamax; if (is_void(alphamin)) alphamin = -alphamax; if (is_void(deltamin)) deltamin = -deltamax; gyoto_plgsky,[alphamin, alphamax], [0,0]; gyoto_plgsky,[0,0],[deltamin, deltamax]; // Compute tick length len=max(alphamax-alphamin,deltamax-deltamin); _3ticks, alphamin, alphamax, _3nmajor; for (i=1; i<=numberof(xminor); ++i) gyoto_plgsky, xminor(i)(-:1:2), [-len*_3lminor, 0]; for (i=1; i<=numberof(xmajor); ++i) { gyoto_plgsky, xmajor(i)(-:1:2), [-len*_3lmajor, 0]; gyoto_pltsky, xlabel(i), xmajor(i), -len*_3lmajor, keywords=GraphK(justify=&string("CT")); } _3ticks, deltamin, deltamax, _3nmajor; for (i=1; i<=numberof(xminor); ++i) gyoto_plgsky, [len*_3lminor, 0], xminor(i)(-:1:2); for (i=1; i<=numberof(xmajor); ++i) { gyoto_plgsky, [len*_3lmajor, 0], xmajor(i)(-:1:2); gyoto_pltsky, xlabel(i), len*_3lmajor, xmajor(i), keywords=GraphK(justify=&string("RH")); } } func gyoto_orient3(incl, paln, phase) { /* DOCUMENT gyoto_orient3, incl, paln, phase Call orient3 and rot3 after having converted the 3 (more or less) standard astronomical angles (expressed in degrees) into the corresponding ones in the pl3d.i API. SEE ALSO: orient3, rot3 */ local deg2rad; deg2rad=pi/180.; // orient3,phase*deg2rad,incl*deg2rad-pi/2.; // rot3,,,paln*deg2rad+pi/2.; // restore3, []; // Reset orientation to something normal orient3, 0, 0; rot3, , pi, ; rot3, -pi/2,,; // start from here rot3, , ,-phase*deg2rad; rot3, -incl*deg2rad, , ; rot3, , ,-paln *deg2rad; } func gyoto_convert(&x, mass, distance, unit) { /* DOCUMENT gyoto_convert, x, mass, distance, unit or x_unit = gyoto_convert(x, mass, distance, unit) INPUT: X: value in geometrical units MASS: mass defining geometrical units in solar masses DISTANCE: distance to observer in kiloparsecs UNIT: unit to convert to. One of "geometric", "m", "km", "sun radius", "arcsec", "mas" (milliarcseconds), "uas" (microarcseconds) OUTPUT: X (in the first form) or X_UNIT: the converted value. SEE ALSO: */ m_sun = 1.98843e30; // kg G = 6.67428e-11; // Gravitational constant, SI = m^3 * kg^-1 * s-2 c = 299792458.; // m/s r_sun = 6.955e8; // m kpc = 3.08568025e19; // m GMsunoC2 = G*m_sun/c^2; unit_d = GMsunoC2 * mass; // m if (unit=="geometrical") x_unit=x; else if (unit=="m") x_unit=x* unit_d; else if (unit=="km") x_unit=x*(unit_d*1e-3); else if (unit=="sun radius") x_unit=x*(unit_d/r_sun); else if (unit=="rad") x_unit=x*(unit_d/(distance*kpc)); else if (unit=="degree") x_unit=x*(unit_d/(distance*kpc*pi)*180); else if (unit=="arcmin") x_unit=x*(unit_d/(distance*kpc*pi)*1.08e4); else if (unit=="arcsec") x_unit=x*(unit_d/(distance*kpc*pi)*6.48e5); else if (unit=="mas") x_unit=x*(unit_d/(distance*kpc*pi)*6.48e8); else if (unit=="uas") x_unit=x*(unit_d/(distance*kpc*pi)*6.48e11); /* need double checking else if (unit=="s") x_unit=x*(unit_d/c); else if (unit=="min") x_unit=x*(unit_d/(c*60.)); else if (unit=="hour") x_unit=x*(unit_d/(c*3600.)); else if (unit=="day") x_unit=x*(unit_d/(c*86400.)); else if (unit=="month") x_unit=x*(unit_d/(c*2629743.8)); else if (unit=="year") x_unit=x*(unit_d/(c*31556926)); */ else error, "unknown unit "+unit; if (am_subroutine()) eq_nocopy, x, x_unit; else return x_unit; } extern is_gyoto_Photon; extern is_gyoto_Astrobj; extern is_gyoto_Metric; extern is_gyoto_Spectrometer; extern is_gyoto_Spectrum; extern is_gyoto_Screen; extern is_gyoto_Scenery; /* DOCUMENT bool = gyoto.is_BASE(arg) BOOL is 1 if arg is a gyoto.BASE where base is Metric, Astrobj, Spectrum, Spectrometer, Scenery, Screen... SEE ALSO: gyoto */ extern gyoto_dontcatchSIGFPE; extern gyoto_dontcatchSIGSEGV; /* DOCUMENT gyoto.dontcatchSIGFPE and gyoto.dontcatchSIGSEGV By default, Yorick will catch SIGFPE and SIGSEGV and throw a Yorick error when they occur. Although this is arguably the right thing to do in the general case, this makes it difficult to debug compiled code that triggers these signals. These functions disables catching the corresponding signal, so that a debugger such as GDB can be used to track down their origin. SEE ALSO: gyoto.fedisableexcept */ extern gyoto_fedisableexcept; extern gyoto_feenableexcept; extern gyoto_haveFENV; extern gyoto_FE; /* DOCUMENT gyoto.fedisableexcept[(excepts)]; gyoto.fedisableexcept[(excepts)]; gyoto.haveFENV(); except=gyoto.FE(except_name); Yorick tries very hard to set the floating-point environment such that e.g. divisions by zero will trigger SIGFPE. Gyoto tries to not allow SIGFPE to occur and this normally is a bug when it does. However, it is sometimes impossible to avoid it: depending on the compiler used to build Gyoto and its dependencies, optimizations may be done under the assumption that the code will always run with all exceptions disabled. See BUGS.md in the Gyoto source code for details. Gyoto therefore provides the following functions to control the floating-point environment from Yorick scripts. Parameters are discribed below. gyoto.fedisableexcept([int excepts]); Disable exceptions specified in EXCEPT. By default, all exceptions normally enabled by Yorick (FE_DIVBYZERO | FE_OVERFLOW | FE_INVALID). Values suitable for EXCEPT are those returned by gyoto.FE() and any ored combination of those. gyoto.feenableexcept([int excepts]); Enable exceptions specified in EXCEPT. By default, all exceptions normally enabled by Yorick. gyoto.haveFENV(); Return 1 if support for setting the floating-point environment is built-in, else 0. gyoto.FE(string except_name); Get integer flag representation of a given exception, e.g. FE_DIVBYZERO=gyoto.FE("DIVBYZERO"). EXCEPT_NAME is one of: DIVBYZERO, INVALID, INEXACT, OVERFLOW, UNDERFLOW, ALL_EXCEPT. EXAMPLES: Disable all exceptions normally enabled by Yorick: gyoto.fedisableexcept(); Disable absolutely all exceptions: gyoto.dedisableexcept(gyoto.FE("ALL_EXCEPT")); Specifically enable overflow and underflow exceptions, but not DIVBYZERO: gyoto.feenableexcept(gyoto.FE("OVERFLOW") | gyoto.FE("UNDEFLOW")); Enable all exceptions normally enabled by Yorick: gyoto.feenableexcept(); Enable absolutely all exceptions: gyoto.feenableexcept(gyoto.FE("ALL_EXCEPT")) SEE ALSO: gyoto.dontcatchSIGFPE */ extern gyoto_listRegister; /* DOCUMENT gyoto.listRegister List the register of known Astrobj, Metric, Spectrum and Spectrometer kinds. SEE ALSO: gyoto */ if (is_func(use)) { include, "gyoto_namespace.i", 1; } else { gyoto_namespace=noop; } if (!GYOTO_NO_STD) include, "gyoto_std.i", 2; Gyoto-1.2.0/yorick/gyoto.info.in000066400000000000000000000014041302352257300165370ustar00rootroot00000000000000Package: gyoto Kind: plugin Version: @VERSION@ Revision: 1 Description: the General relativitY Orbit Tracer of Observatoire de Paris License: GPL-3+ Author: Thibaut Paumard Maintainer: Thibaut Paumard OS: architecture independant Depends: yorick(>=2.2), yutils(>=1.3.0) Source: https://github.com/gyoto/Gyoto/archive/%v.tar.gz Source-MD5: Source-Directory: DocFiles: README AUTHORS COPYING Homepage: http://gyoto.obspm.fr/ DescDetail: << Gyoto aims at providing a framework for computing orbits and ray-traced images in General relativity. It consists in a library (libgyoto), utility programs, and a plug-in for Yorick. << DescUsage: << See check.i for a test suite. Type "yorick -i check.i" in a terminal to run it. << DescPort: << << Gyoto-1.2.0/yorick/gyoto_AnalyticMetric.C000066400000000000000000000022551302352257300203560ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "ygyoto.h" #include #include "yapi.h" using namespace Gyoto; extern "C" { // ANALYTICMETRIC CLASS // Constructor void Y_gyoto_AnalyticMetric_new(int n) { double mm=1.0; if (n>1) y_error("gyoto_Kerr_new takes at most 1 arguments"); if (n==1) mm=ygets_d(0); SmartPointer *gg = ypush_Metric(); try { *gg = new AnalyticMetric(mm); } YGYOTO_STD_CATCH ; // strcpy(obj->type,"AnalyticMetric"); } } Gyoto-1.2.0/yorick/gyoto_Astrobj.C000066400000000000000000000115121302352257300170460ustar00rootroot00000000000000/* Copyright 2011-2015 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "ygyoto.h" #include "ygyoto_private.h" #include "yapi.h" #include "pstdlib.h" #ifdef GYOTO_USE_XERCES #include "GyotoFactory.h" #endif #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; static char ygyoto_Astrobj_names[YGYOTO_TYPE_LEN][YGYOTO_MAX_REGISTERED] ={{0}}; static ygyoto_Astrobj_eval_worker_t *ygyoto_Astrobj_evals[YGYOTO_MAX_REGISTERED] ={0}; static int ygyoto_Astrobj_count=0; YGYOTO_YUSEROBJ(Astrobj, Astrobj::Generic) YGYOTO_BASE_CONSTRUCTOR1(Astrobj,astrobj) extern "C" { void gyoto_Astrobj_eval(void *obj, int argc) { GYOTO_DEBUG << endl; // If no parameters, return pointer if (argc==1 && yarg_nil(0)) { ypush_long((long)((gyoto_Astrobj*)obj)->smptr()); return; } // Try calling kind-specific worker int n=0; SmartPointer * OBJ = &(((gyoto_Astrobj*)obj)->smptr); const string kind = (*OBJ)->kind(); while (n((*OBJ)())) base = THINDISK; static char const * knames_thindisk[]={"unit", YGYOTO_THINDISK_GENERIC_KW, 0}; static char const * knames_generic[]={"unit", YGYOTO_ASTROBJ_GENERIC_KW, 0}; static long kglobs[YGYOTO_ASTROBJ_BASE_MAX_KW_N+2]; static int kiargs[YGYOTO_ASTROBJ_BASE_MAX_KW_N+1]; char ** knames=NULL; ygyoto_Astrobj_generic_eval_t * worker; // ThinDisk switch (base) { case GENERIC: knames=const_cast(knames_generic); worker = &ygyoto_Astrobj_generic_eval; break; case THINDISK: knames = const_cast(knames_thindisk); worker = &ygyoto_ThinDisk_generic_eval; break; default: y_error("BUG: unknown base type"); } yarg_kw_init(knames, kglobs, kiargs); while (iarg>=1) { iarg = yarg_kw(iarg, kglobs, kiargs); if (iarg>=1) { if (parg<4) piargs[parg++]=iarg--; else y_error("gyoto_Astrobj takes at most 4 positional arguments"); } } char * unit=NULL; int k =-1; /* UNIT */ YGYOTO_WORKER_SET_UNIT; (*worker)(OBJ, kiargs+k+1, piargs, rvset, paUsed, unit); } } void ygyoto_Astrobj_register(char const*const name, ygyoto_Astrobj_eval_worker_t* on_eval){ int n; if (ygyoto_Astrobj_count==YGYOTO_MAX_REGISTERED) y_error("Too many Astrobjs registered"); for (n=0; n*OBJ, int *kiargs, int *piargs, int *rvset, int *paUsed, char * unit) { int k=-1, iarg; char const * rmsg="Cannot set return value more than once"; char const * pmsg="Cannot use positional argument more than once"; // avoid ununsed warning if (rmsg && pmsg) {} if (debug()) for (int i=0; i. */ #include "ygyoto_idx.h" #include "yapi.h" #include "GyotoError.h" #include "GyotoDefs.h" #include "GyotoUtils.h" #include using namespace YGyoto; using namespace Gyoto; using namespace std; int YGyoto::Idx::isNuller() const {return _is_nuller;} long YGyoto::Idx::getNElements() const {return _nel;} long YGyoto::Idx::current() const { if (_is_list) return _idx[_cur]; return _cur; } double YGyoto::Idx::getDVal() const {return _is_double?_dval:_range[0];} int YGyoto::Idx::isDouble() const {return _is_double || _is_dlist;} int YGyoto::Idx::isRangeOrScalar() const {return _is_range || _is_scalar;} int YGyoto::Idx::isFirst() const {return _is_first;} int YGyoto::Idx::isLast() const { if (_is_range) return _cur+_range[2] > _range[1]; if (_is_scalar) return 1; if (_is_list) return _cur >= _nel; return 0; } long YGyoto::Idx::first() { _is_first=1; if (_is_range) return _cur=_range[0]; if (_is_scalar) return _cur=_range[0]; if (_is_list) return _idx[_cur=0]; return 0; } int YGyoto::Idx::valid() const { if (_is_range) return _cur<=_range[1]; if (_is_scalar) return _cur==_range[0]; if (_is_list) return _cur<_nel; return 0; } long YGyoto::Idx::next() { _is_first=0; if (_is_range) return _cur+=_range[2]; if (_is_scalar) return ++_cur; if (_is_list && (++_cur)<_nel) return _idx[_cur]; return 0; } long YGyoto::Idx::range_min() const { if (!(_is_range || _is_scalar)) throwError("BUG: not a range"); return _range[0]; } long YGyoto::Idx::range_max() const { if (!(_is_range || _is_scalar)) throwError("BUG: not a range"); return _range[1]; } long YGyoto::Idx::range_dlt() const { if (!(_is_range || _is_scalar)) throwError("BUG: not a range"); return _range[2]; } YGyoto::Idx::Idx(int iarg, int res) : _is_nuller(0), _is_range(0), _is_list(0), _is_scalar(0), _is_double(0), _is_dlist(0), _buf(NULL) { int flags = yget_range(iarg, _range); if (flags) { _is_range=1; if (flags>=Y_MAX_DFLT) { flags-=Y_MAX_DFLT; _range[1]=res; } if (flags>=Y_MIN_DFLT) { flags-=Y_MIN_DFLT; _range[0]=1; } if (flags==Y_NULLER) { _is_nuller=1; flags=0; _nel=0; } if (flags>1) y_error("unsupported range syntax"); if (_range[0]<=0) _range[0]+=res; if (_range[1]<=0) _range[1]+=res; if (_range[0]>res || _range[1]>res) y_error("max index too large"); _nel=(_range[1]-_range[0]+_range[2])/_range[2]; _dims[0]=1; _dims[1]=_nel; return; } if (yarg_number(iarg)==1){ if (yarg_rank(iarg) > 0) { _is_list=1; _idx = ygeta_l(iarg, &_nel, _dims); return; } _is_scalar=1; long val=ygets_l(iarg); if (val>res) y_error("max index too large"); if (val<=0) val+=res; _range[0]=_range[1]=val; _range[2]=1; _nel=1; _dims[0]=0; return; } if (yarg_number(iarg)==2) { _is_double=1; _buf=ygeta_d(iarg, &_nel, _dims); _dval=_buf[0]; if (_dims[0]) _is_dlist=1; else _is_scalar=1; GYOTO_DEBUG_ARRAY(_dims, Y_DIMSIZE); GYOTO_DEBUG_EXPR(_is_scalar); GYOTO_DEBUG_EXPR(_is_dlist); return; } if (iarg<0 || yarg_nil(iarg)) { _is_range=1; _range[0]=1; _range[1]=res; _range[2]=1; _nel=res; _dims[0]=1; _dims[1]=_nel; return; } y_error("unsupported range syntax"); } int YGyoto::Idx::getNDims() const { if (_is_range) return 1; if (_is_list) return 1; if (_is_scalar) return 0; throwError("BUG: What does this YGyoto::Idx instance hold?"); return 0; } long const * YGyoto::Idx::getDims() const {return _dims;} long const * YGyoto::Idx::getBuffer() const {return _idx;} double const * YGyoto::Idx::getDoubleBuffer() const {return _buf;} Gyoto-1.2.0/yorick/gyoto_Metric.C000066400000000000000000000203231302352257300166650ustar00rootroot00000000000000/* Copyright 2011, 2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "ygyoto.h" #include "ygyoto_private.h" #include "ygyoto_idx.h" #include "yapi.h" #include "pstdlib.h" #ifdef GYOTO_USE_XERCES #include #endif #include #include using namespace std; using namespace Gyoto; using namespace YGyoto; // Needed by the YGYOTO_WORKER_* macros YGYOTO_YUSEROBJ(Metric, Metric::Generic) YGYOTO_BASE_CONSTRUCTOR1(Metric,metric) static char ygyoto_Metric_names[YGYOTO_TYPE_LEN][YGYOTO_MAX_REGISTERED] ={{0}}; static ygyoto_Metric_eval_worker_t *ygyoto_Metric_evals[YGYOTO_MAX_REGISTERED] ={0}; static int ygyoto_Metric_count=0; extern "C" { void gyoto_Metric_eval(void *obj, int argc) { SmartPointer *OBJ_ = &((gyoto_Metric*)obj)->smptr; // If no parameters, return pointer if (argc==1 && yarg_nil(0)) { ypush_long( (long) (*OBJ_)() ); return; } // Try calling kind-specific worker int n=0; const string kind = (*OBJ_)->kind(); while (n*OBJ, int *kiargs, int *piargs, int *rvset, int *paUsed, char * unit) { int k=-1, iarg=-1; char const * rmsg="Cannot set return value more than once"; char const * pmsg="Cannot use positional argument more than once"; long ntot, dims[Y_DIMSIZE]; /* METHODS */ if ((iarg=kiargs[++k])>=0) { // get_tdot if (debug()) cerr << "In get_tdot" << endl; if ((*rvset)++) y_error(rmsg); if ((*paUsed)++) y_error(pmsg); double * pos=ygeta_d(iarg,&ntot,0); if (ntot!=4) y_error("POS must have 4 elements"); double * vel=ygeta_d(piargs[0],&ntot,0); if (ntot!=3) y_error("VEL must have 3 elements"); ypush_double((*OBJ)->SysPrimeToTdot(pos, vel)); } if ((iarg=kiargs[++k])>=0) { // nullifycoord if (debug()) cerr << "In nullifycoord" << endl; if ((*rvset)++) y_error(rmsg); if ((*paUsed)++) y_error(pmsg); double * pos=ygeta_d(iarg,&ntot,0); if (ntot!=4) y_error("POS must have 4 elements"); double * vel=ygeta_d(piargs[0],&ntot,0); if (ntot!=3) y_error("VEL must have 3 elements"); dims[0]=1; dims[1]=8; double *coord = ypush_d(dims); for (int i=0; i<4; ++i) coord[i]=pos[i]; for (int i=0; i<3; ++i) coord[i+5]=vel[i]; (*OBJ)->nullifyCoord(coord); } // kind if ((iarg=kiargs[++k])>=0) { if ((*rvset)++) y_error(rmsg); if (!yarg_nil(iarg)) y_error("KIND is readonly"); char ** kind = ypush_q(0); *kind = p_strcpy((*OBJ)->kind().c_str()); } // coordkind if ((iarg=kiargs[++k])>=0) { if ((*rvset)++) y_error(rmsg); if (!yarg_nil(iarg)) y_error("COORDKIND is readonly"); ypush_long((*OBJ)->coordKind()); } YGYOTO_WORKER_SETPARAMETER; // ScalarProd if ((iarg=kiargs[++k])>=0) { if ((*rvset)++) y_error(rmsg); if ((*paUsed)++) y_error(pmsg); ntot=0; double * pos = ygeta_d(iarg, &ntot, dims); if (!dims[0] || dims[1]<4) y_error("scalarprod: pos must be at least 4 elements long"); double * u1 = ygeta_d(piargs[0], &ntot, dims); if (!dims[0] || dims[1]<4) y_error("scalarprod: u1 must be at least 4 elements long"); double * u2 = ygeta_d(piargs[1], &ntot, dims); if (!dims[0] || dims[1]<4) y_error("scalarprod: u2 must be at least 4 elements long"); ypush_double((*OBJ)->ScalarProd(pos, u1, u2)); } YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(mass); YGYOTO_WORKER_GETSET_DOUBLE2(deltaMin); YGYOTO_WORKER_GETSET_DOUBLE2(deltaMax); YGYOTO_WORKER_GETSET_LONG2(keplerian); // Unit length if ((iarg=kiargs[++k])>=0) { // unitLength() if ((*rvset)++) y_error(rmsg); if (!yarg_nil(iarg)) y_error("UNITLENGTH is readonly"); ypush_double((*OBJ)->unitLength(unit?unit:"")); } // circularvelocity if ((iarg=kiargs[++k])>=0) { if ((*rvset)++) y_error(rmsg); if ((*paUsed)++) y_error(pmsg); double * coords = ygeta_d(iarg, &ntot, dims); if (!dims[0] || dims[1]<4) y_error("syntax: circularvelocity=array(double, 4 ...)"); double dir =1; if (piargs[0] >= 0) dir = ygets_d(piargs[0]) >= 0 ? 1 : -1; long d1 = dims[1]; long npoints=ntot/d1; dims[1]=4; double * vels = ypush_d(dims); for (long i=0; icircularVelocity(coords, vels, dir); } // christoffel if ((iarg=kiargs[++k])>=0) { if ((*rvset)++) y_error(rmsg); if ((*paUsed)++) y_error(pmsg); double * coords = ygeta_d(iarg, &ntot, dims); if (!dims[0] || dims[1]<4) y_error("syntax: christoffel=array(double, 4)"); Idx i_idx (piargs[0], 4); if (i_idx.isNuller()) return; Idx j_idx (piargs[1], 4); if (j_idx.isNuller()) return; Idx a_idx (piargs[2], 4); if (a_idx.isNuller()) return; long ni=i_idx.getNElements(); long nj=j_idx.getNElements(); long na=a_idx.getNElements(); dims[0]=i_idx.getNDims()+j_idx.getNDims()+a_idx.getNDims(); size_t offset=0; if (i_idx.getNDims()) dims[++offset]=ni; if (j_idx.getNDims()) dims[++offset]=nj; if (a_idx.getNDims()) dims[++offset]=na; double * data=ypush_d(dims); double dst[4][4][4]; if (dims[0]==3 && dims[1]==4 && dims[2]==4 && dims[3]==4) { (*OBJ)->christoffel(dst, coords); memcpy(data, &dst[0][0], 4*4*4*sizeof(double)); } else { size_t i, j, a; for ( a=a_idx.first() ; a_idx.valid() ; a=a_idx.next() ) for ( i=i_idx.first() ; i_idx.valid() ; i=i_idx.next() ) for ( j=j_idx.first() ; j_idx.valid() ; j=j_idx.next() ) *(data++) = (*OBJ)->christoffel(coords, int(a-1), int(i-1), int(j-1)); } } YGYOTO_WORKER_XMLWRITE; YGYOTO_WORKER_CLONE(Metric); YGYOTO_WORKER_HELP; if (*rvset || *paUsed || piargs[0]<0 || !yarg_number(piargs[0])) return; //else /* GET G MU NU */ if (debug()) cerr << "DEBUG: gyoto_Metric_generic_eval: getting gmunu\n"; double *x = ygeta_d(piargs[0], &ntot, NULL); if (ntot<4) y_error("X must have at least four elements"); Idx i_idx (piargs[1], 4); if (i_idx.isNuller()) return; Idx j_idx (piargs[2], 4); if (j_idx.isNuller()) return; long ni=i_idx.getNElements(); long nj=j_idx.getNElements(); dims[0]=i_idx.getNDims()+j_idx.getNDims(); size_t offset=0; if (i_idx.getNDims()) dims[++offset]=ni; if (j_idx.getNDims()) dims[++offset]=nj; double * data=ypush_d(dims); double dst[4][4]; if (dims[0]==2 && dims[1]==4 && dims[2]==4) { (*OBJ)->gmunu(dst, x); memcpy(data, &dst[0][0], 4*4*sizeof(double)); return; } size_t i, j; for ( j=j_idx.first() ; j_idx.valid() ; j=j_idx.next() ) for ( i=i_idx.first() ; i_idx.valid() ; i=i_idx.next() ) *(data++) = (*OBJ)->gmunu(x, int(i-1), int(j-1)); } Gyoto-1.2.0/yorick/gyoto_Photon.C000066400000000000000000000226231302352257300167160ustar00rootroot00000000000000/* Copyright 2011, 2013-2015 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoPhoton.h" #include "GyotoFactory.h" #include "GyotoDefs.h" #include "ygyoto.h" #include "ygyoto_private.h" #include "yapi.h" #include "pstdlib.h" #define OBJ ph using namespace Gyoto; using namespace std; #define YGYOTO_PHOTON_GENERIC_KW "unit", "metric", "initcoord", "astrobj", \ "spectro", "tmin", "delta", "adaptive", "maxiter", \ "integrator", "deltamin", "deltamax", "deltamaxoverr", "abstol", "reltol", \ "setparameter", "reset", "xfill", "save_txyz", "xmlwrite", "is_hit", \ "get_txyz", "get_coord", "get_cartesian", "clone", "help" #define YGYOTO_PHOTON_GENERIC_KW_N 26 void ygyoto_Photon_generic_eval(Gyoto::SmartPointer* ph, int *kiargs, int *piargs, int *rvset, int *paUsed) { if (debug()) cerr << "\nDEBUG: In ygyoto_Photon_generic_eval: "; int k=-1, iarg; char const * rmsg="Cannot set return value more than once"; char const * pmsg="Cannot use positional argument more than once"; char * unit = NULL; YGYOTO_WORKER_SET_UNIT; YGYOTO_WORKER_GETSET_OBJECT2(metric,Metric); /* INITCOORD */ if ((iarg=kiargs[++k])>=0) { iarg+=*rvset; if (debug()) cerr << "initcoord="; if (yarg_nil(iarg)) { // Getting initcoord if (debug()) cerr << " get_initcoord=1" << endl; if ((*rvset)++) y_error(rmsg); long dims[]= {1, 8}; double *coord = ypush_d(dims); (*ph)->getInitialCoord(coord); } else { // Setting initcoord long ptot=1; double coord[8]; if (yarg_number(iarg)) { // initcoord=coord or initcoord=pos, vel double *pos=ygeta_d(iarg, &ptot, 0); if (ptot!=4 && ptot !=8) y_error("POS should have either 4 or 8 elements."); for (int ii=0; iimetric()) y_error("METRIC should have been set already"); (*ph)->metric()->nullifyCoord(coord); } else y_error("VEL should have 3 or 4 elements"); } } else { SmartPointer sc = NULL; if (yarg_Scenery(iarg)) { // initcoord=scenery,i,j or senery,da,dd SmartPointer *scenery = yget_Scenery(iarg); (*ph) -> metric((*scenery)->metric()); (*ph) -> astrobj((*scenery)->astrobj()); sc = (*scenery)->screen(); } else sc = *yget_Screen(iarg); //initcoord=screen,i,j or screen, da, dd if (yarg_number(piargs[0]+*rvset)==2) { double da = ygets_d(piargs[0]+*rvset); double dd = ygets_d(piargs[1]+*rvset); if (debug()) cerr << "screen, dalpha="<setInitCoord(coord) ; if (debug()) cerr << "]" << endl; } if (debug()) cerr << "... " << endl; } YGYOTO_WORKER_GETSET_OBJECT2(astrobj,Astrobj); YGYOTO_WORKER_GETSET_OBJECT2(spectrometer,Spectrometer); YGYOTO_WORKER_GETSET_DOUBLE2(tMin); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(delta); YGYOTO_WORKER_GETSET_LONG2(adaptive); YGYOTO_WORKER_GETSET_LONG2( maxiter ); YGYOTO_WORKER_GETSET_STRING2( integrator ); YGYOTO_WORKER_GETSET_DOUBLE2( deltaMin ); YGYOTO_WORKER_GETSET_DOUBLE2( deltaMax ); YGYOTO_WORKER_GETSET_DOUBLE2( deltaMaxOverR ); YGYOTO_WORKER_GETSET_DOUBLE2( absTol ); YGYOTO_WORKER_GETSET_DOUBLE2( relTol ); YGYOTO_WORKER_SETPARAMETER; YGYOTO_WORKER_RUN( reset() ); YGYOTO_WORKER_RUN( xFill(ygets_d(iarg)) ); // save_txyz=filename, t1, mass_sun, distance_kpc, unit, screen if ((iarg=kiargs[++k])>=0) { iarg+=*rvset; if (debug()) cerr << " save_txyz="; int myarg=0; if (debug()) cerr << "save_txyz="; char* filename = ygets_q(iarg); double t1 = 0.;//ygets_d(piargs[0]+*rvset); double mass_sun = 1.;//ygets_d(piargs[1]+*rvset); double distance_kpc = 1.;//ygets_d(piargs[2]+*rvset); string unt = "geometrical";//ygets_q(piargs[3]+*rvset); SmartPointer* sc = NULL; //yget_Screen(piargs[4]+*rvset); if (yarg_number(piargs[myarg]+*rvset)) { t1= ygets_d(piargs[myarg++]+*rvset); if (yarg_number(piargs[myarg]+*rvset)) { mass_sun= ygets_d(piargs[myarg++]+*rvset); if (yarg_number(piargs[myarg]+*rvset)) { distance_kpc= ygets_d(piargs[myarg++]+*rvset); } } } if (yarg_string(piargs[myarg]+*rvset)) unt = ygets_q(piargs[myarg++]+*rvset); if (yarg_Screen(piargs[myarg]+*rvset)) sc = yget_Screen(piargs[myarg++]+*rvset); (*ph) -> save_txyz ( filename, t1, mass_sun, distance_kpc, unt, (sc?*sc:SmartPointer(NULL)) ); if (debug()) cerr << filename << endl ; } YGYOTO_WORKER_XMLWRITE; // FUNCTION-LIKE // /* IS_HIT= */ if ((iarg=kiargs[++k])>=0) { // is_hit=whatever if (debug()) cerr << " is_hit=" << endl; if ((*rvset)++) y_error(rmsg); Astrobj::Properties junk; ypush_int((*ph)->hit(&junk)); } /* GET_TXYZ */ if ((iarg=kiargs[++k])>=0) { // get_txyz= if (debug()) cerr << " get_txyz=1" << endl; if ((*rvset)++) y_error(rmsg); long nel =(*ph)->get_nelements(); long dims[] = {2, nel, 4}; double * data=ypush_d(dims); (*ph)->get_t(data); (*ph)->get_xyz(data+nel, data+2*nel, data+3*nel); } /* GET_COORD */ if ((iarg=kiargs[++k])>=0) { if (debug()) cerr << " get_coord=dates" << endl; if ((*rvset)++) y_error(rmsg); // Two cases : get_coord=1 or get_coord=dates. // We will recognize the first case if the parameter is the // integer scalar 1, any other type or value is a date // specification. int argt = 1;yarg_number(iarg); long ntot[1] = {1}; long dims[Y_DIMSIZE] = {0}; double * dates = NULL; if (!yarg_nil(iarg)) { argt = yarg_number(iarg); dates=ygeta_d(iarg, ntot, dims); } else { dates = ypush_d(dims); dates[0]=1.; } if (debug()) cerr << "DEBUG: gyoto_Photon(get_coord=array(" << (yarg_number(iarg)==1?"long":"double") << ", " << *ntot << ") (rank=" << dims[0] << ", dates[0]=" << dates[0] << ")" << endl; if (dims[0] == 0 && argt == 1 && dates[0] == 1) { if(debug()) cerr << "DEBUG: retrieving all already computed coordinates" << endl; long nel =(*ph)->get_nelements(); long ddims[] = {2, nel, 8}; double * data = ypush_d(ddims); (*ph)->getCoord(data, data+nel, data+2*nel, data+3*nel); (*ph)->get_dot(data+4*nel, data+5*nel, data+6*nel, data+7*nel); } else { if(debug()) cerr << "DEBUG: retrieving coordinates for specified date(s)"<< endl; if (dims[0] > Y_DIMSIZE-2) y_errorn("gyoto_Star(get_coord=dates): DATES must have at most %ld " "dimensions", Y_DIMSIZE-2); dims[0] += 1; dims[dims[0]] = 7; double * data = ypush_d(dims); size_t nel = *ntot; (*ph) -> getCoord(dates, nel, data, data+ nel,data+2* nel,data+3* nel, data+4* nel, data+5* nel, data+6* nel); } } if ((iarg=kiargs[++k])>=0) { // get_cartesian if (debug()) cerr << " get_cartesian=dates" << endl; if ((*rvset)++) y_error(rmsg); long ntot[1] = {1}; long dims[Y_DIMSIZE]; double* dates = ygeta_d(iarg, ntot, dims); if (dims[0] > Y_DIMSIZE-2) y_errorn("gyoto_Star(get_cartesian=dates): DATES must have at most %ld " "dimensions", Y_DIMSIZE-2); dims[0] += 1; dims[dims[0]] = 6; double * data = ypush_d(dims); size_t nel = *ntot; (*ph) -> getCartesian(dates, nel, data, data + nel, data + 2*nel, data + 3*nel, data + 4*nel, data + 5*nel); } YGYOTO_WORKER_CLONE(Photon); YGYOTO_WORKER_HELP; if (debug()) cerr << endl; } YGYOTO_YUSEROBJ(Photon, Photon) extern "C" { void gyoto_Photon_eval(void *obj, int argc) { // If no parameters, return pointer if (argc==1 && yarg_nil(0)) { ypush_long((long)((gyoto_Photon*)obj)->smptr()); return; } SmartPointer *ph_ = &(((gyoto_Photon*)obj)->smptr); static char const * knames[]={ YGYOTO_PHOTON_GENERIC_KW, 0 }; YGYOTO_WORKER_INIT1(Photon, Photon, knames, YGYOTO_PHOTON_GENERIC_KW_N); ygyoto_Photon_generic_eval(ph_, kiargs, piargs, rvset, paUsed); } // Generic constructor/accessor void Y_gyoto_Photon(int argc) { YGYOTO_CONSTRUCTOR_INIT1(Photon, Photon, Photon); gyoto_Photon_eval(OBJ, argc); } } Gyoto-1.2.0/yorick/gyoto_Scenery.C000066400000000000000000000410071302352257300170540ustar00rootroot00000000000000/* Copyright 2011-2015 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include #ifdef GYOTO_USE_XERCES #include #endif #include #include #include "yapi.h" #include "pstdlib.h" #include "ygyoto.h" #include "ygyoto_private.h" #include #include #include "ygyoto_idx.h" #ifdef HAVE_PTHREAD #include #endif using namespace std; using namespace Gyoto; using namespace YGyoto; YGYOTO_YUSEROBJ(Scenery, Scenery) extern "C" { void Y_gyoto_Scenery(int); void gyoto_Scenery_eval(void *obj, int argc) { SmartPointer *OBJ_ = &(((gyoto_Scenery*)obj)->smptr); double * impactcoords = NULL; bool precompute = 0; static char const *knames[] = { "get_pointer", "unit", "metric", "screen", "astrobj", "delta", "tmin", "quantities", "adaptive", "maxiter", "integrator", "deltamin", "deltamax", "deltamaxoverr", "abstol", "reltol", "xmlwrite", "clone", "help", "clonephoton", "impactcoords", "nthreads", "nprocesses", "mpispawn", "mpiclone", 0 }; YGYOTO_WORKER_INIT1(Scenery, Scenery, knames, 25) // Get pointer if (yarg_true(kiargs[++k])) { if ((*rvset)++) y_error("Only one return value possible"); ypush_long((long)((*OBJ)())); } YGYOTO_WORKER_SET_UNIT; YGYOTO_WORKER_GETSET_OBJECT2(metric,Metric); YGYOTO_WORKER_GETSET_OBJECT2(screen,Screen); YGYOTO_WORKER_GETSET_OBJECT2(astrobj,Astrobj); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(delta); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(tMin); /* QUANTITIES */ if ((iarg=kiargs[++k])>=0) { iarg+=*rvset; if (yarg_nil(iarg)) { // quantities= : Getting if ((*rvset)++) y_error("Only one return value possible"); long nk = long((*OBJ)->getScalarQuantitiesCount()); long rquant = nk>1?1:0; long dims[2] = { rquant, nk }; ystring_t *squant = ypush_q(dims); long k = 0; string requested=(*OBJ)->requestedQuantitiesString(); char *tk = strtok(const_cast(requested.c_str()), " \n\t"); while (tk!=NULL) { if (k>=nk) y_error("BUG: too many tokens in quantity list"); squant[k++] = p_strcpy(tk); tk = strtok(NULL, " \n\t"); } }else { // quantities=["Q1", "Q2"...]: Setting long k, nk; ystring_t * squant = ygeta_q(iarg, &nk, NULL); string quants = squant[0]; for (k=1; k requestedQuantitiesString(quants); } } YGYOTO_WORKER_GETSET_LONG2( adaptive ); YGYOTO_WORKER_GETSET_LONG2( maxiter ); YGYOTO_WORKER_GETSET_STRING2( integrator ); YGYOTO_WORKER_GETSET_DOUBLE2( deltaMin ); YGYOTO_WORKER_GETSET_DOUBLE2( deltaMax ); YGYOTO_WORKER_GETSET_DOUBLE2( deltaMaxOverR ); YGYOTO_WORKER_GETSET_DOUBLE2( absTol ); YGYOTO_WORKER_GETSET_DOUBLE2( relTol ); YGYOTO_WORKER_XMLWRITE; YGYOTO_WORKER_CLONE(Scenery); YGYOTO_WORKER_HELP; /* CLONEPHOTON */ if ((iarg=kiargs[++k])>=0) { if ((*rvset)++) y_error(rmsg); int nb=0; if (yarg_nil(iarg)) *ypush_Photon() = (*OBJ)->clonePhoton(); else if ((nb=yarg_number(iarg))==1) { size_t i=ygets_l(iarg); size_t j=ygets_l(piargs[0]); if ((*paUsed)++) y_error(pmsg); *ypush_Photon() = (*OBJ)->clonePhoton(i, j); } else if (nb==2) { double a=ygets_d(iarg); double d=ygets_d(piargs[0]); if ((*paUsed)++) y_error(pmsg); *ypush_Photon() = (*OBJ)->clonePhoton(a, d); } else y_error("unsupported argument for clonephoton"); } /* IMPACTCOORDS */ if ((iarg=kiargs[++k])>=0) { iarg+=*rvset; if (yarg_nil(iarg)) { // impactcoords= : Getting precompute = 1; } else { // impaccoords=double(16,res,res): Setting long ntot; long dims[Y_DIMSIZE]; size_t res=(*OBJ)->screen()->resolution(); impactcoords = ygeta_d(iarg, &ntot, dims); if (dims[0] != 3 || dims[1] != 16 || dims[2] != long(res) || dims[3] != long(res)) y_error("dimsof(impactcoords) != [3,16,res,res]"); } } YGYOTO_WORKER_GETSET_LONG2(nThreads); YGYOTO_WORKER_GETSET_LONG2(nProcesses); #ifdef HAVE_MPI YGYOTO_WORKER_RUN( mpiSpawn(ygets_l(iarg)) ); YGYOTO_WORKER_RUN( mpiClone() ); #else if ((iarg=kiargs[++k])>=0) GYOTO_WARNING << "No MPI in this GYOTO" << endl; if ((iarg=kiargs[++k])>=0) GYOTO_WARNING << "No MPI in this GYOTO" << endl; #endif // Get ray-traced image if there is a supplementary positional argument if ( !*rvset && // has a return value already been set? (((argc>0 && argc<=3 && piargs[argc-1]>=0) || (piargs[1]>=0)) // positional argument? || precompute || impactcoords) ) { size_t res=(*OBJ)->screen()->resolution(); if ((*rvset)++) y_error("Only one return value possible"); if ((*paUsed)++) y_error("Only one keyword may use positional arguments"); GYOTO_DEBUG << "rank: " << yarg_rank(piargs[0]) << endl; SmartPointer spr = (*OBJ)->screen()->spectrometer(); size_t nbnuobs = spr()? spr->nSamples() : 0; Idx i_idx (piargs[0], res); if (i_idx.isNuller()) return; Idx j_idx (piargs[1], res); if (j_idx.isNuller()) return; bool is_double=false; long dims[Y_DIMSIZE]={0}; long nelem; dims[0]=0; if (precompute) dims[++dims[0]]=16; if (i_idx.isDouble() || j_idx.isDouble()) { if (!i_idx.isDouble() || !j_idx.isDouble()) throwError("i and j must be of same type (double or long)"); is_double=true; nelem=i_idx.getNElements(); long const *idims=i_idx.getDims(); if (j_idx.getNElements() != nelem) { if (nelem==1) { nelem=j_idx.getNElements(); idims=j_idx.getDims(); } else throwError("alpha and delta must be conformable"); } for (int m=1; m<=idims[0]; ++m) dims[++dims[0]]=idims[m]; } else { nelem=i_idx.getNElements()*j_idx.getNElements(); if ( (precompute + i_idx.getDims()[0]+j_idx.getDims()[0]) >= Y_DIMSIZE ) throwError("Too many dimensions"); long const *idims=i_idx.getDims(); for (int m=1; m<=idims[0];++m) dims[++dims[0]]=idims[m]; idims=j_idx.getDims(); for (int m=1; m<=idims[0];++m) dims[++dims[0]]=idims[m]; } size_t nk = 0; int rquant = 0; ystring_t * squant = NULL; if (piargs[2] < 0 || yarg_nil(piargs[2])) { Quantity_t quant = (*OBJ)->getRequestedQuantities(); nk = (*OBJ)->getScalarQuantitiesCount(); if (quant & GYOTO_QUANTITY_SPECTRUM) nk += 1; if (quant & GYOTO_QUANTITY_BINSPECTRUM) nk += 1; rquant = nk>1?1:0; long dims[2] = { 1, long(nk) }; squant = ypush_q(dims); size_t k = 0; char *tk = strtok(const_cast((*OBJ)->requestedQuantitiesString().c_str()), " \n\t"); while (tk!=NULL) { if (k>=nk) y_error("BUG: too many tokens in quantity list"); squant[k++] = p_strcpy(tk); tk = strtok(NULL, " \n\t"); } } else { GYOTO_DEBUG << "quantities provided online"<=1)||has_sp||has_bsp) ) { ++dims[0]; if (dims[0] >=Y_DIMSIZE) throwError("Too many dimensions"); dims[dims[0]]=nk; } GYOTO_DEBUG << "precompute=" << precompute << ", nk=" << nk << ", nbnuobs="< screen = (*OBJ) -> screen(); # ifdef HAVE_UDUNITS if (data) (*OBJ)->setPropertyConverters(&prop); screen->mapPixUnit(); if (intu != "") prop.intensityConverter(intu); if (spu != "") prop.spectrumConverter(spu); if (bspu != "") prop.binSpectrumConverter(bspu); screen->unmapPixUnit(); # endif if (precompute) prop.impactcoords=data; else { for ( k=0; k= j_idx.getNElements()? i_idx.getNElements():j_idx.getNElements(); if (i_idx.getNElements()==1) ispec = new Screen::RepeatAngle(i_idx.getDVal(), sz); else ispec = new Screen::Angles(i_idx.getDoubleBuffer(), sz); if (j_idx.getNElements()==1) jspec = new Screen::RepeatAngle(j_idx.getDVal(), sz); else jspec = new Screen::Angles(j_idx.getDoubleBuffer(), sz); ijspec = new Screen::Bucket(*ispec, *jspec); } else { if (i_idx.isRangeOrScalar()) ispec = new Screen::Range (i_idx.range_min(), i_idx.range_max(), i_idx.range_dlt()); else ispec = new Screen::Indices (reinterpret_cast(i_idx.getBuffer()), i_idx.getNElements()); if (j_idx.isRangeOrScalar()) jspec = new Screen::Range (j_idx.range_min(), j_idx.range_max(), j_idx.range_dlt()); else jspec = new Screen::Indices (reinterpret_cast(j_idx.getBuffer()), j_idx.getNElements()); ijspec = new Screen::Grid(*ispec, *jspec, "\rj = "); if (verbose() >= GYOTO_QUIET_VERBOSITY) cout << "\nj = 1/" << jspec->size() << flush; } (*OBJ)->rayTrace(*ijspec, &prop, impactcoords); delete ispec; delete jspec; delete ijspec; } // if (conditions for ray-tracing) } // void gyoto_Scenery_eval(void *obj, int argc); // Constructor void Y_gyoto_Scenery(int argc) { YGYOTO_CONSTRUCTOR_INIT1(Scenery, Scenery, Scenery); gyoto_Scenery_eval(OBJ, argc); } void Y_gyoto_Scenery_rayTrace(int argc) { size_t imin=1, imax=-1, jmin=1, jmax=-1; if (argc<1) y_error("gyoto_Scenery_rayTrace takes at least 1 argument"); gyoto_Scenery * s_obj=(gyoto_Scenery*)yget_obj(argc-1, &gyoto_Scenery_obj); Scenery * scenery = s_obj->smptr; if (argc>=2 && !yarg_nil(argc-2)) imin=ygets_l(argc-2); if (argc>=3 && !yarg_nil(argc-3)) imax=ygets_l(argc-3); if (argc>=4 && !yarg_nil(argc-4)) jmin=ygets_l(argc-4); if (argc>=5 && !yarg_nil(argc-5)) jmax=ygets_l(argc-5); size_t res=0; try {res=scenery->screen()->resolution();} YGYOTO_STD_CATCH; if (imax>res) imax=res; if (jmax>res) jmax=res; Screen::Range irange(imin, imax, 1); Screen::Range jrange(jmin, jmax, 1); Screen::Grid grid(irange, jrange, "\r j = "); double * impactcoords = NULL; int ipctout = 0; if (argc>=6) { int iarg = argc-6; long ref = yget_ref(iarg); long dims[Y_DIMSIZE] = {3, 16, long(res), long(res)}; if (ref >= 0 && yarg_nil(iarg)) { impactcoords = ypush_d(dims); yput_global(ref, 0); ipctout = 1; } else { long ntot = 0; impactcoords = ygeta_d(iarg, &ntot, dims); if (dims[0]!=3 || dims[1]!=16 || dims[2]!=long(res) || dims[3]!=long(res)) y_error("Wrong dims for impactcoords"); } } long nbnuobs=0, nbdata=0; Quantity_t quantities=0; try { quantities = scenery -> getRequestedQuantities(); if (quantities & (GYOTO_QUANTITY_SPECTRUM | GYOTO_QUANTITY_BINSPECTRUM)) { SmartPointer spr=scenery->screen()->spectrometer(); if (!spr) throwError("Spectral quantity requested but " "no spectrometer specified!"); nbnuobs = long(spr -> nSamples()); } nbdata= long(scenery->getScalarQuantitiesCount()); } YGYOTO_STD_CATCH; long dims[4]={(nbdata+nbnuobs) > 1 ? 3 : 2, long(res), long(res), nbdata+nbnuobs}; double * vect=ypush_d(dims); Astrobj::Properties data; size_t curquant=0; size_t offset=res*res; if (ipctout) data.impactcoords = impactcoords; if (quantities & GYOTO_QUANTITY_INTENSITY) data.intensity=vect+offset*(curquant++); if (quantities & GYOTO_QUANTITY_EMISSIONTIME) data.time=vect+offset*(curquant++); if (quantities & GYOTO_QUANTITY_MIN_DISTANCE) data.distance=vect+offset*(curquant++); if (quantities & GYOTO_QUANTITY_FIRST_DMIN) data.first_dmin=vect+offset*(curquant++); if (quantities & GYOTO_QUANTITY_REDSHIFT) data.redshift=vect+offset*(curquant++); if (quantities & GYOTO_QUANTITY_USER1) data.user1=vect+offset*(curquant++); if (quantities & GYOTO_QUANTITY_USER2) data.user2=vect+offset*(curquant++); if (quantities & GYOTO_QUANTITY_USER3) data.user3=vect+offset*(curquant++); if (quantities & GYOTO_QUANTITY_USER4) data.user4=vect+offset*(curquant++); if (quantities & GYOTO_QUANTITY_USER5) data.user5=vect+offset*(curquant++); if (quantities & GYOTO_QUANTITY_SPECTRUM) { data.spectrum=vect+offset*(curquant++); data.offset=offset; } if (quantities & GYOTO_QUANTITY_BINSPECTRUM) { data.binspectrum=vect+offset*(curquant++); data.offset=offset; } data.intensity=vect; if (verbose() >= GYOTO_QUIET_VERBOSITY) cout << endl << flush; try {scenery -> rayTrace(grid, &data, ipctout?NULL:impactcoords);} YGYOTO_STD_CATCH; } } Gyoto-1.2.0/yorick/gyoto_Screen.C000066400000000000000000000114661302352257300166710ustar00rootroot00000000000000/* Copyright 2011, 2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "ygyoto.h" #include "ygyoto_private.h" #include #include #ifdef GYOTO_USE_XERCES #include #endif #include #include using namespace std; using namespace Gyoto; YGYOTO_YUSEROBJ(Screen, Screen) extern "C" { void gyoto_Screen_eval(void *obj, int argc) { SmartPointer *OBJ_ = &((gyoto_Screen*)obj)->smptr; static char const * knames[]={ "unit", "metric", "time","fov","resolution", "mask", "maskwrite", "alpha0", "delta0", "anglekind", "distance", "dmax", "inclination", "paln", "argument", "freqobs", "projection", "observerpos", "fourvel", "screen1", "screen2", "screen3", "spectro", "skycoord", "raycoord", "xmlwrite", "clone", "help", 0 }; YGYOTO_WORKER_INIT1(Screen, Screen, knames, 28) YGYOTO_WORKER_SET_UNIT; YGYOTO_WORKER_GETSET_OBJECT2(metric,Metric); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(time); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(fieldOfView); YGYOTO_WORKER_GETSET_LONG2(resolution); /* MASK */ if ((iarg=kiargs[++k])>=0) { // mask GYOTO_DEBUG << "mask=\n"; iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); long npix = long((*OBJ) -> resolution()); long dims[] = {2, npix, npix}; double * out = ypush_d(dims); memcpy(out, (*OBJ)->mask(), npix*npix*sizeof(double)); } else if (yarg_string(iarg)) { #ifdef GYOTO_USE_CFITSIO (*OBJ)->fitsReadMask(ygets_q(iarg)); #else y_error("no cfitsio in this gyoto"); #endif } else { long ntot; long dims[Y_DIMSIZE]; double const * const in = ygeta_d(iarg, &ntot, dims); if (dims[0]==0 && ntot && *in==0) (*OBJ) -> mask(NULL, 0); else if (dims[0]==2 && dims[1]==dims[2]) { (*OBJ)->mask(in, dims[1]); } else y_error("MASK must be square image"); } } /* MASKWRITE */ if ((iarg=kiargs[++k])>=0) { #ifdef GYOTO_USE_CFITSIO char * fname=const_cast(""); iarg+=*rvset; if (!yarg_nil(iarg)) fname=ygets_q(iarg); (*OBJ)->fitsWriteMask(fname); #else y_error("no cfitsio in this gyoto"); #endif } YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(alpha0); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(delta0); YGYOTO_WORKER_GETSET_STRING2(anglekind); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(distance); YGYOTO_WORKER_GETSET_DOUBLE2(dMax); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(inclination); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(PALN); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(argument); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(freqObs); /* PROJECTION */ if ((iarg=kiargs[++k])>=0) { // Set Projection iarg+=*rvset; long ntot; double *proj=ygeta_d(iarg, &ntot, NULL); switch (ntot) { case 4: (*OBJ)->setProjection(proj[0], proj[1], proj[2], proj[3]); break; case 3: (*OBJ)->setProjection(proj[0], proj[1], proj[2]); break; } } YGYOTO_WORKER_GETSET4(ObserverPos); YGYOTO_WORKER_GETSET4(FourVel); YGYOTO_WORKER_GETSET4(Screen1); YGYOTO_WORKER_GETSET4(Screen2); YGYOTO_WORKER_GETSET4(Screen3); YGYOTO_WORKER_GETSET_OBJECT2(spectrometer,Spectrometer); ///// METHODS ////// /* SKYCOORD METHOD */ if ((iarg=kiargs[++k])>=0) { // skycoord if ((*rvset)++) y_error(rmsg); long ntot=1; double *pos=ygeta_d(iarg, &ntot, NULL); if (ntot<4) y_error("POS argument should have at lest 4 elements"); long dims[] = {1, 3}; double * skypos=ypush_d(dims); (*OBJ)->coordToXYZ(pos, skypos); } /* RAYCOORD METHOD */ if ((iarg=kiargs[++k])>=0) { // raycoord if ((*rvset)++) y_error(rmsg); long ntot=1; double *pos=ygeta_d(iarg, &ntot, NULL); if (ntot<2) y_error("X_Y argument should have at lest 4 elements"); long dims[] = {1,8}; yarg_drop(1); double * coord=ypush_d(dims); (*OBJ)->getRayCoord(pos[0], pos[1], coord); } YGYOTO_WORKER_XMLWRITE; YGYOTO_WORKER_CLONE(Screen); YGYOTO_WORKER_HELP; } } extern "C" { void Y_gyoto_Screen(int argc) { YGYOTO_CONSTRUCTOR_INIT2(Screen, Screen, Screen, screen); gyoto_Screen_eval(OBJ, argc); } } Gyoto-1.2.0/yorick/gyoto_SpectroComplex.C000066400000000000000000000050261302352257300204140ustar00rootroot00000000000000/* Copyright 2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include #include "ygyoto.h" #include "yapi.h" #include using namespace std; using namespace Gyoto; using namespace Gyoto::Spectrometer; namespace YGyoto { ygyoto_Spectrometer_eval_worker_t SpCplxEval; } // on_eval worker void YGyoto::SpCplxEval(SmartPointer *OBJ_, int argc) { static char const * knames[]={ "unit", "append", "remove", "cardinal", \ YGYOTO_SPECTROMETER_GENERIC_KW, 0 }; YGYOTO_WORKER_INIT(Spectrometer, Complex, knames, YGYOTO_SPECTROMETER_GENERIC_KW_N+4); YGYOTO_WORKER_SET_UNIT; YGYOTO_WORKER_RUN( append(*yget_Spectrometer(iarg)) ); YGYOTO_WORKER_RUN( remove(ygets_l(iarg)) ); /* cardinal */ if ((iarg=kiargs[++k])>=0) { iarg+=*rvset; if ((*rvset)++) y_error(rmsg); GYOTO_DEBUG << "get cardinal" << endl; ypush_long((*OBJ)->getCardinal()); } YGYOTO_WORKER_CALL_GENERIC(Spectrometer); if (!(*paUsed) && (iarg=piargs[0])>=0 && !yarg_nil(iarg)) { iarg+=*rvset; if ((*rvset)++) y_error(rmsg); ++(*paUsed); size_t cardinal=(*OBJ) -> getCardinal(); size_t item = ygets_l(iarg); if (item > cardinal) y_error("index overreach array bounds"); if (item <= 0) { item += cardinal; if (item <= 0) y_error("index overreach array bounds"); } *ypush_Spectrometer() = (*(*OBJ))[item-1]; } GYOTO_DEBUG << "done\n"; } extern "C" { void Y__gyoto_SpCplx_register_as_Spectrometer(int argc){ ygyoto_Spectrometer_register(Complex::Kind,&YGyoto::SpCplxEval); } void Y_gyoto_SpectroComplex(int argc) { YGYOTO_CONSTRUCTOR_INIT2(Spectrometer, Spectrometer::Generic, Complex, spectrometer); if ((*OBJ)->kindid() != Complex::Kind) y_error("Expecting Spectrometer of kind Complex"); YGyoto::SpCplxEval(OBJ, argc); } } Gyoto-1.2.0/yorick/gyoto_SpectroUniform.C000066400000000000000000000114371302352257300204270ustar00rootroot00000000000000/* Copyright 2011-2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include "ygyoto.h" #include "GyotoUniformSpectrometer.h" #include "yapi.h" #include "pstdlib.h" #ifdef GYOTO_USE_XERCES #include "GyotoFactory.h" #endif using namespace std; using namespace Gyoto; using namespace Gyoto::Spectrometer; #define OBJ sp namespace YGyoto { void SpectroUniformYEval(SmartPointer*sp, int argc); } using namespace YGyoto; void YGyoto::SpectroUniformYEval(Gyoto::SmartPointer*sp_, int argc) { static char const * knames[]={ "unit", "kind", "nsamples", "band", "setparameter", "xmlwrite", "clone", "channels", "midpoints", "widths", 0 }; YGYOTO_WORKER_INIT(Spectrometer, Uniform, knames, 10); YGYOTO_WORKER_SET_UNIT; /* SPECTRO_KIND */ if ((iarg=kiargs[++k])>=0) { iarg+=*rvset; if (yarg_nil(iarg)) { // get spectro kind if ((*rvset)++) y_error(rmsg); *ypush_q(0) = p_strcpy((*sp) -> kindid() ); } else { // set spectro kind (*sp) -> kind(std::string(ygets_q(iarg))); } } YGYOTO_WORKER_GETSET_LONG2(nSamples); /* BAND */ if ((iarg=kiargs[++k])>=0) { iarg+=*rvset; double * boundaries = NULL; if (yarg_nil(iarg)) { // get spectro band if ((*rvset)++) y_error(rmsg); long dims[Y_DIMSIZE] = {1, 2}; boundaries=ypush_d(dims); boundaries[0] = (*sp) -> getBand()[0]; boundaries[1] = (*sp) -> getBand()[1]; } else { // set spectro band long ntot; boundaries = ygeta_d(iarg, &ntot, NULL); if (ntot != 2) y_error("BAND must have 2 elements"); (*sp) -> band(boundaries, unit?unit:""); } } YGYOTO_WORKER_SETPARAMETER; #undef OBJ #define OBJ sp_ YGYOTO_WORKER_XMLWRITE; #undef OBJ #define OBJ sp YGYOTO_WORKER_CLONE(Spectrometer); /* GET SPECTRO CHANNELS */ if ((iarg=kiargs[++k])>=0) { if (!yarg_nil(iarg)) y_error("CHANNELS is readonly"); if ((*rvset)++) y_error(rmsg); long nsamples = long((*sp) -> nSamples()); if (nsamples) { long dims[] = {2, 2, nsamples}; double converted[(*sp)->getNBoundaries()]; (*sp) -> getChannelBoundaries(converted, unit?unit:""); GYOTO_DEBUG_ARRAY(converted, (*sp)->getNBoundaries()); size_t const * const chanind = (*sp) -> getChannelIndices(); GYOTO_DEBUG_ARRAY(chanind, 2*size_t(nsamples)); double * ychannels = ypush_d(dims); for (long i=0; i<2*nsamples; ++i) { ychannels[i] = converted[chanind[i]]; GYOTO_DEBUG << "ychannels["<< i << "]=" << ychannels[i] << endl; } } else ypush_nil(); } /* GET SPECTRO MIDPOINTS */ if ((iarg=kiargs[++k])>=0) { if (!yarg_nil(iarg)) y_error("MIDPOINTS is readonly"); if ((*rvset)++) y_error(rmsg); long nsamples = long((*sp) -> nSamples()); if (nsamples) { long dims[] = {1, nsamples}; double * ychannels = ypush_d(dims); (*sp)->getMidpoints(ychannels, unit?unit:""); } else ypush_nil(); } /* GET SPECTRO WIDTHS */ if ((iarg=kiargs[++k])>=0) { if (!yarg_nil(iarg)) y_error("WIDTHS is readonly"); if ((*rvset)++) y_error(rmsg); long nsamples = long((*sp) -> nSamples()); if (nsamples) { long dims[] = {1, nsamples}; double * ywidths = ypush_d(dims); (*sp)->getWidths(ywidths, unit?unit:""); } else ypush_nil(); } } extern "C" { void Y__gyoto_SpectroUniform_register_as_Spectro(int argc){ ygyoto_Spectrometer_register(Uniform::WaveKind, &YGyoto::SpectroUniformYEval); ygyoto_Spectrometer_register(Uniform::WaveLogKind, &YGyoto::SpectroUniformYEval); ygyoto_Spectrometer_register(Uniform::FreqKind, &YGyoto::SpectroUniformYEval); ygyoto_Spectrometer_register(Uniform::FreqLogKind, &YGyoto::SpectroUniformYEval); } void Y_gyoto_SpectroUniform(int argc) { YGYOTO_CONSTRUCTOR_INIT2(Spectrometer, Spectrometer::Generic, Uniform, spectrometer); kind_t kind=(*sp)->kindid(); if (kind != Uniform::WaveKind && kind != Uniform::WaveLogKind && kind != Uniform::FreqKind && kind != Uniform::FreqLogKind) y_error("Expecting Spectrometer of kind Uniform"); YGyoto::SpectroUniformYEval(OBJ, argc); } } Gyoto-1.2.0/yorick/gyoto_Spectrometer.C000066400000000000000000000121321302352257300201150ustar00rootroot00000000000000/* Copyright 2011-2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include "ygyoto.h" #include "ygyoto_private.h" #include "yapi.h" #include "pstdlib.h" #ifdef GYOTO_USE_XERCES #include "GyotoFactory.h" #endif using namespace std; using namespace Gyoto; using namespace Gyoto::Spectrometer; static char const * ygyoto_Spectrometer_names[YGYOTO_MAX_REGISTERED] ={0}; static ygyoto_Spectrometer_eval_worker_t *ygyoto_Spectrometer_evals[YGYOTO_MAX_REGISTERED] ={0}; static int ygyoto_Spectrometer_count=0; YGYOTO_YUSEROBJ(Spectrometer, Spectrometer::Generic) YGYOTO_BASE_CONSTRUCTOR1(Spectrometer,spectrometer) extern "C" { void gyoto_Spectrometer_eval(void *obj, int argc) { SmartPointer *OBJ_ = &(((gyoto_Spectrometer*)obj)->smptr); // If no parameters, return pointer if (argc==1 && yarg_nil(0)) { ypush_long( (long) (*OBJ_)() ); return; } // Try calling kind-specific worker int n=0; char const * const kind = (*OBJ_)->kindid(); while (n*OBJ, int *kiargs, int *piargs, int *rvset, int *paUsed, char * unit) { int k=-1, iarg=-1; char const * rmsg="Cannot set return value more than once"; /* METHODS */ // kind if ((iarg=kiargs[++k])>=0) { if ((*rvset)++) y_error(rmsg); if (!yarg_nil(iarg)) y_error("KIND is readonly"); char ** kind = ypush_q(0); *kind = p_strcpy((*OBJ)->kindid()); } // Process SET keywords // Save to file YGYOTO_WORKER_XMLWRITE; /* CLONE */ YGYOTO_WORKER_CLONE(Spectrometer); /* HELP */ YGYOTO_WORKER_HELP; // get members // /* NSAMPLES */ if ((iarg=kiargs[++k])>=0) { iarg+=*rvset; if (yarg_nil(iarg)) ypush_long((*OBJ)->nSamples()); else y_error("NSAMPLES is readonly"); } /* SETPARAMETER */ YGYOTO_WORKER_SETPARAMETER; /* GET SPECTRO CHANNELS */ if ((iarg=kiargs[++k])>=0) { if (!yarg_nil(iarg)) y_error("CHANNELS is readonly"); if ((*rvset)++) y_error(rmsg); long nsamples = long((*OBJ) -> nSamples()); if (nsamples) { long dims[] = {2, 2, nsamples}; double converted[(*OBJ)->getNBoundaries()]; (*OBJ) -> getChannelBoundaries(converted, unit?unit:""); GYOTO_DEBUG_ARRAY(converted, (*OBJ)->getNBoundaries()); size_t const * const chanind = (*OBJ) -> getChannelIndices(); GYOTO_DEBUG_ARRAY(chanind, 2*size_t(nsamples)); double * ychannels = ypush_d(dims); for (long i=0; i<2*nsamples; ++i) { ychannels[i] = converted[chanind[i]]; GYOTO_DEBUG << "ychannels["<< i << "]=" << ychannels[i] << endl; } } else ypush_nil(); } /* GET SPECTRO MIDPOINTS */ if ((iarg=kiargs[++k])>=0) { if (!yarg_nil(iarg)) y_error("MIDPOINTS is readonly"); if ((*rvset)++) y_error(rmsg); long nsamples = long((*OBJ) -> nSamples()); if (nsamples) { long dims[] = {1, nsamples}; double * ychannels = ypush_d(dims); (*OBJ)->getMidpoints(ychannels, unit?unit:""); } else ypush_nil(); } /* GET SPECTRO WIDTHS */ if ((iarg=kiargs[++k])>=0) { if (!yarg_nil(iarg)) y_error("WIDTHS is readonly"); if ((*rvset)++) y_error(rmsg); long nsamples = long((*OBJ) -> nSamples()); if (nsamples) { long dims[] = {1, nsamples}; double * ywidths = ypush_d(dims); (*OBJ)->getWidths(ywidths, unit?unit:""); } else ypush_nil(); } } Gyoto-1.2.0/yorick/gyoto_Spectrum.C000066400000000000000000000104211302352257300172420ustar00rootroot00000000000000/* Copyright 2011, 2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "ygyoto.h" #include "ygyoto_private.h" #include "yapi.h" #include "pstdlib.h" #ifdef GYOTO_USE_XERCES #include #endif #include using namespace std; using namespace Gyoto; using namespace Gyoto::Spectrum; static char ygyoto_Spectrum_names[YGYOTO_TYPE_LEN][YGYOTO_MAX_REGISTERED] ={{0}}; static ygyoto_Spectrum_eval_worker_t *ygyoto_Spectrum_evals[YGYOTO_MAX_REGISTERED] ={0}; static int ygyoto_Spectrum_count=0; YGYOTO_YUSEROBJ(Spectrum, Spectrum::Generic) YGYOTO_BASE_CONSTRUCTOR1(Spectrum,spectrum) extern "C" { void gyoto_Spectrum_eval(void *obj, int argc) { // If no parameters, return pointer if (argc==1 && yarg_nil(0)) { ypush_long((long)((gyoto_Spectrum*)obj)->smptr()); return; } // Try calling kind-specific worker int n=0; SmartPointer * OBJ_ = &(((gyoto_Spectrum*)obj)->smptr); const string kind = (*OBJ_)->kind(); while (n*OBJ, int *kiargs, int *piargs, int *rvset, int *paUsed, char* unit) { int k=-1, iarg; char const * rmsg="Cannot set return value more than once"; if (debug()) for (int i=0; i=2 elements"); --dims[1]; --ntot; double * Inu1nu2 = ypush_d(dims); for (long i=0; i < ntot; ++i) Inu1nu2[i] = (*OBJ)->integrate(freqs[i], freqs[i+1]); } // GET SPECTRUM VALUE FOR WAVELENGTHS if (*rvset || *paUsed || (iarg=piargs[0]) < 0 || !yarg_number(iarg)) return; if (debug()) cerr<<"DEBUG: gyoto_Spectrum_generic_eval evaluating Spectrum " "at frequency\n"; long ntot, dims[Y_DIMSIZE]; double * freqs = ygeta_d(iarg, &ntot, dims); double * Inu = ypush_d(dims); for (long i=0; i < ntot; ++i) Inu[i] = (**OBJ)(freqs[i]); if (debug()) cerr << "DEBUG: out of Spectrum_generic_eval"<< endl; } Gyoto-1.2.0/yorick/gyoto_ThinDisk.C000066400000000000000000000077341302352257300171720ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include "ygyoto.h" #include "ygyoto_private.h" #include "yapi.h" using namespace Gyoto; using namespace Gyoto::Astrobj; #include using namespace std; // on_eval worker void ygyoto_ThinDisk_eval(Gyoto::SmartPointer* ao_, int argc) { int rvset[1]={0}, paUsed[1]={0}; if (!ao_) { // Constructor mode ao_ = ypush_Astrobj(); *ao_ = new ThinDisk(); } else *ypush_Astrobj()=*ao_; static char const * knames[]={ "unit", YGYOTO_THINDISK_GENERIC_KW, 0 }; static long kglobs[YGYOTO_THINDISK_GENERIC_KW_N+6]; int kiargs[YGYOTO_THINDISK_GENERIC_KW_N+5]; int piargs[]={-1,-1,-1,-1}; yarg_kw_init(const_cast(knames), kglobs, kiargs); int iarg=argc, parg=0; while (iarg>=1) { iarg = yarg_kw(iarg, kglobs, kiargs); if (iarg>=1) { if (parg<4) piargs[parg++]=iarg--; else y_error("gyoto_Astrobj takes at most 4 positional arguments"); } } int k=-1; char * unit = NULL; /* UNIT */ if ((iarg=kiargs[++k])>=0) { iarg+=*rvset; GYOTO_DEBUG << "get unit" << endl; unit = ygets_q(iarg); } // Call generic ThinDisk worker ygyoto_ThinDisk_generic_eval(ao_, kiargs+k+1, piargs, rvset, paUsed, unit); } void ygyoto_ThinDisk_generic_eval(Gyoto::SmartPointer*ao_, int *kiargs, int *piargs, int *rvset, int *paUsed, char * unit) { SmartPointer *ao = (SmartPointer *)ao_; int k=-1, iarg; char const * rmsg="Cannot set return value more than once"; if (debug()) for (int i=0; iinnerRadius(ygets_d(iarg), unit?unit:"") ; } /* OUTERRADIUS */ if ((iarg=kiargs[++k])>=0) { iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); ypush_double((*ao)->outerRadius(unit?unit:"")); } else (*ao)->outerRadius(ygets_d(iarg), unit?unit:"") ; } /* THICKNESS */ if ((iarg=kiargs[++k])>=0) { iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); ypush_double((*ao)->thickness(unit?unit:"")); } else (*ao)->thickness(ygets_d(iarg), unit?unit:"") ; } /* DIR */ if ((iarg=kiargs[++k])>=0) { iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); ypush_long((*ao)->dir()); } else (*ao)->dir(ygets_l(iarg)) ; } GYOTO_DEBUG << "calling ygyoto_Astrobj_generic_eval\n"; ygyoto_Astrobj_generic_eval(ao_, kiargs+k+1, piargs, rvset, paUsed, unit); if (debug()) cerr << "DEBUG: out of ThinDisk_generic_eval"<< endl; } extern "C" { void Y__gyoto_ThinDisk_register_as_Astrobj(){ ygyoto_Astrobj_register("ThinDisk",&ygyoto_ThinDisk_eval); } // Generic constructor/accessor void Y_gyoto_ThinDisk(int argc) { SmartPointer *ao = NULL; if (yarg_Astrobj(argc-1)) { ao = yget_Astrobj(--argc); if ((*ao)->kind().compare("ThinDisk")) y_error("Expecting Astrobj of kind Star"); } ygyoto_ThinDisk_eval(ao, argc); } } Gyoto-1.2.0/yorick/gyoto_constants.i000066400000000000000000000017661302352257300175360ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ extern GYOTO_C, GYOTO_G, GYOTO_G_OVER_C_SQUARE, GYOTO_SUN_MASS, GYOTO_SUN_RADIUS, GYOTO_KPC; GYOTO_C = 299792458. GYOTO_G = 6.67428e-11 GYOTO_G_OVER_C_SQUARE = 7.426138e-28 GYOTO_SUN_MASS = 1.98843e30 GYOTO_SUN_RADIUS = 6.955e8 GYOTO_KPC = 3.08568025e19 Gyoto-1.2.0/yorick/gyoto_namespace.i000066400000000000000000000046331302352257300174520ustar00rootroot00000000000000gyoto=save( haveXerces=gyoto_haveXerces, haveCFITSIO=gyoto_haveCFITSIO, haveBoost=gyoto_haveBoost, haveUDUNITS=gyoto_haveUDUNITS, havePTHREAD=gyoto_havePTHREAD, haveMPI=gyoto_haveMPI, haveFENV=gyoto_haveFENV, MPI_Init=gyoto_MPI_Init, MPI_Finalize=gyoto_MPI_Finalize, MPI_Initialized=gyoto_MPI_Initialized, MPI_Finalized=gyoto_MPI_Finalized, loadPlugin=gyoto_loadPlugin, requirePlugin=gyoto_requirePlugin, havePlugin=gyoto_havePlugin, Scenery=gyoto_Scenery, Scenery_rayTrace=gyoto_Scenery_rayTrace, matte_paint=gyoto_matte_paint, Photon=gyoto_Photon, Metric=gyoto_Metric, Astrobj=gyoto_Astrobj, ThinDisk=gyoto_ThinDisk, Screen=gyoto_Screen, Spectrum=gyoto_Spectrum, debug=gyoto_debug, verbose=gyoto_verbose, Spectrometer=gyoto_Spectrometer, SpectroUniform=gyoto_SpectroUniform, SpectroComplex=gyoto_SpectroComplex, dontcatchSIGFPE=gyoto_dontcatchSIGFPE, dontcatchSIGSEGV=gyoto_dontcatchSIGSEGV, fedisableexcept=gyoto_fedisableexcept, feenableexcept=gyoto_feenableexcept, FE=gyoto_FE, listRegister=gyoto_listRegister, is_Photon=is_gyoto_Photon, is_Astrobj=is_gyoto_Astrobj, is_Metric=is_gyoto_Metric, is_Spectrometer=is_gyoto_Spectrometer, is_Spectrum=is_gyoto_Spectrum, is_Screen=is_gyoto_Screen, is_Scenery=is_gyoto_Scenery, C=GYOTO_C, G=GYOTO_G, G_OVER_C_SQUARE=GYOTO_G_OVER_C_SQUARE, SUN_MASS=GYOTO_SUN_MASS, SUN_RADIUS=GYOTO_SUN_RADIUS, KPC=GYOTO_KPC, coordkind=save(unspecified=0, cartesian=1, spherical=2), painters=gyoto_painters, rotation=gyoto_rotation ); func gyoto_namespace(args) { /* DOCUMENT gyoto_namespace, shortname=longname; If this version of yorick supports oxy object, the same as: save, gyoto, shortname=longname else, noop. SEE ALSO: oxy, save, restore */ extern gyoto; keynames=args(-); for (i=1; i<=numberof(keynames); ++i) { save, gyoto, keynames(i), args(keynames(i)) ; } } wrap_args, gyoto_namespace; Gyoto-1.2.0/yorick/gyoto_utils.C000066400000000000000000000407601302352257300166110ustar00rootroot00000000000000/* Copyright 2011-2015 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "GyotoUtils.h" #include "GyotoRegister.h" #include "GyotoProperty.h" #include "GyotoValue.h" #include "GyotoObject.h" #include "GyotoMetric.h" #include "GyotoAstrobj.h" #include "GyotoSpectrum.h" #include "GyotoSpectrometer.h" #include "GyotoScreen.h" #include #include #include #include #include #include #include #if defined HAVE_FENV_H # include #endif #if defined HAVE_MPI # include #endif #include "ygyoto.h" #include "ygyoto_private.h" using namespace std; static YGyotoSupplier_t *YGyotoGlobalSupplier = NULL; void ygyotoErrorHandler (const Gyoto::Error e) { y_error(e); } #if defined HAVE_MPI void ygyotoMPIErrorHandlerFcn(MPI_Comm * comm, int * error_code, ...) { char error_string[MPI_MAX_ERROR_STRING]; int error_string_length; MPI_Error_string(*error_code, error_string, &error_string_length); error_string[error_string_length] = '\0'; y_error(error_string); } MPI_Errhandler ygyotoMPIErrorHandler; #endif extern "C" { void Y_gyoto_dontcatchSIGFPE(int) { signal(SIGFPE, SIG_DFL); } void Y_gyoto_FE(int argc) { std::string name=ygets_q(0); #if defined HAVE_FENV_H # if defined FE_DIVBYZERO if (name=="DIVBYZERO") { ypush_int(FE_DIVBYZERO); return; } # endif # if defined FE_INEXACT if (name=="INEXACT") { ypush_int(FE_INEXACT); return; } # endif # if defined FE_INVALID if (name=="INVALID") { ypush_int(FE_INVALID); return; } # endif # if defined FE_OVERFLOW if (name=="OVERFLOW") { ypush_int(FE_OVERFLOW); return; } # endif # if defined FE_UNDERFLOW if (name=="UNDERFLOW") { ypush_int(FE_UNDERFLOW); return; } # endif # if defined FE_ALL_EXCEPT if (name=="ALL_EXCEPT") { ypush_int(FE_ALL_EXCEPT); return; } # endif y_errorq("No such exception: FE_%s", name.c_str()); #else GYOTO_WARNING << "no GNU fenv.h in this Gyoto\n"; #endif } void Y_gyoto_dontcatchSIGSEGV(int) { signal(SIGSEGV, SIG_DFL); } void Y_gyoto_fedisableexcept(int argc) { #if defined HAVE_FENV_H int excepts=FE_DIVBYZERO | FE_OVERFLOW | FE_INVALID; if (argc && !yarg_nil(0)) excepts=ygets_i(0); ypush_int(fedisableexcept(excepts)); #else GYOTO_WARNING << "no GNU fenv.h in this Gyoto\n"; #endif } void Y_gyoto_feenableexcept(int argc) { #if defined HAVE_FENV_H int excepts=FE_DIVBYZERO | FE_OVERFLOW | FE_INVALID; if (argc && !yarg_nil(0)) excepts=ygets_i(0); ypush_int(feenableexcept(excepts)); #else GYOTO_WARNING << "no GNU fenv.h in this Gyoto\n"; #endif } void Y_gyoto_debug(int argc) { ypush_long(Gyoto::debug()); if (argc && !yarg_nil(argc)) Gyoto::debug(int(ygets_l(1))); } void Y_gyoto_verbose(int argc) { ypush_long(Gyoto::verbose()); if (argc && !yarg_nil(argc)) Gyoto::verbose(int(ygets_l(1))); } void Y_gyoto_havePlugin(int argc) { ypush_long(Gyoto::havePlugin(ygets_q(0))); } void Y_gyoto_loadPlugin(int argc) { // Step 1: determine whether nofail is set (to true) int nofail=0; static char const * knames[2] = { "nofail", 0 }; static long kglobs[2]; int kiargs[1]; yarg_kw_init(const_cast(knames), kglobs, kiargs); int iarg=argc-1; while (iarg>=0) { iarg = yarg_kw(iarg, kglobs, kiargs); iarg--; } if (kiargs[0]>=0) {// nofail= present nofail=yarg_true(kiargs[0]); } // Step 2: load plug-ins long ntot=0; long dims[Y_DIMSIZE]; ystring_t * plugins = 0; for (iarg=argc-1; iarg>=0; iarg--) { if (kiargs[0]<0 ||(iarg!=kiargs[0] && iarg!=kiargs[0]+1)) { plugins = ygeta_q(iarg, &ntot, dims); for (long i=0; i(knames), kglobs, kiargs); int iarg=argc-1; while (iarg>=0) { iarg = yarg_kw(iarg, kglobs, kiargs); iarg--; } if (kiargs[0]>=0) {// nofail= present nofail=yarg_true(kiargs[0]); } // Step 2: load plug-ins long ntot=0; long dims[Y_DIMSIZE]; ystring_t * plugins = 0; for (iarg=argc-1; iarg>=0; iarg--) { if (kiargs[0]<0 ||(iarg!=kiargs[0] && iarg!=kiargs[0]+1)) { plugins = ygeta_q(iarg, &ntot, dims); for (long i=0; i1) y_error("gyoto.MPI_Init() takes at most one argument"); if (argc) { index=yget_ref(0); if (!yarg_nil(0)) mpiargv=ygeta_q(0, &mpiargcl, NULL); } int mpiargc=mpiargcl; ypush_long(MPI_Init(&mpiargc, &mpiargv)); if (index>=0) { long dims[]={1, mpiargc}; ystring_t * out=ypush_q(dims); for (long i=0; i yget_Metric = &yget_Metric; YGyotoGlobalSupplier -> ypush_Metric = &ypush_Metric; YGyotoGlobalSupplier -> yarg_Metric = &yarg_Metric; YGyotoGlobalSupplier -> ygyoto_Metric_register = &ygyoto_Metric_register; YGyotoGlobalSupplier -> ygyoto_Metric_generic_eval = &ygyoto_Metric_generic_eval; // Plug Astrobj ABI YGyotoGlobalSupplier -> yget_Astrobj = &yget_Astrobj; YGyotoGlobalSupplier -> ypush_Astrobj = &ypush_Astrobj; YGyotoGlobalSupplier -> yarg_Astrobj = &yarg_Astrobj; YGyotoGlobalSupplier -> ygyoto_Astrobj_register = &ygyoto_Astrobj_register; YGyotoGlobalSupplier -> ygyoto_Astrobj_generic_eval = &ygyoto_Astrobj_generic_eval; YGyotoGlobalSupplier -> ygyoto_ThinDisk_generic_eval = &ygyoto_ThinDisk_generic_eval; // Plug Spectrum ABI YGyotoGlobalSupplier -> yget_Spectrum = &yget_Spectrum; YGyotoGlobalSupplier -> ypush_Spectrum = &ypush_Spectrum; YGyotoGlobalSupplier -> yarg_Spectrum = &yarg_Spectrum; YGyotoGlobalSupplier -> ygyoto_Spectrum_register = &ygyoto_Spectrum_register; YGyotoGlobalSupplier -> ygyoto_Spectrum_generic_eval = &ygyoto_Spectrum_generic_eval; // Plug Screen ABI YGyotoGlobalSupplier -> yget_Screen = &yget_Screen; YGyotoGlobalSupplier -> ypush_Screen = &ypush_Screen; YGyotoGlobalSupplier -> yarg_Screen = &yarg_Screen; // Plug Scenery ABI YGyotoGlobalSupplier -> yget_Scenery = &yget_Scenery; YGyotoGlobalSupplier -> ypush_Scenery = &ypush_Scenery; YGyotoGlobalSupplier -> yarg_Scenery = &yarg_Scenery; // Plug Spectrometer ABI YGyotoGlobalSupplier -> yget_Spectrometer = &yget_Spectrometer; YGyotoGlobalSupplier -> ypush_Spectrometer = &ypush_Spectrometer; YGyotoGlobalSupplier -> yarg_Spectrometer = &yarg_Spectrometer; YGyotoGlobalSupplier -> ygyoto_Spectrometer_register = &ygyoto_Spectrometer_register; YGyotoGlobalSupplier -> ygyoto_Spectrometer_generic_eval = &ygyoto_Spectrometer_generic_eval; // Property ABI YGyotoGlobalSupplier -> yget_property = &yget_property; YGyotoGlobalSupplier -> ypush_property = &ypush_property; } ypush_long(long(YGyotoGlobalSupplier)); } void Y___gyoto_setErrorHandler(int) { Gyoto::Error::setHandler(&ygyotoErrorHandler); } } /* Don't overuse the two below, the are not exported with the rest of the ABI */ /* The point is to cache the variable names and global indices used by the closure on_eval operator */ char const * const __ygyoto_var_name(size_t id) { static std::vector names; if (id >= names.size()) { size_t cursize=names.size(); names.resize(id+1); for (size_t k=cursize; k<=id; ++k) { stringstream ss; ss << "__gyoto_var" << k; names[k]=ss.str(); } } return names[id].c_str(); } long int __ygyoto_var_idx(size_t id) { static std::vector ids; if (id >= ids.size()) { size_t cursize=ids.size(); ids.resize(id+1); for (size_t k=cursize; k<=id; ++k) ids[k]=yget_global(__ygyoto_var_name(k), 0); } return ids[id]; } void ypush_property(Gyoto::SmartPointer ptr, Gyoto::Property const& p, std::string name, std::string unit) { Gyoto::Value val; Gyoto::SmartPointee * smptee = (Gyoto::SmartPointee*) ptr(); Gyoto::Object * object = dynamic_cast (smptee); Gyoto::Astrobj::Generic * ao=NULL; if (!smptee) Gyoto::throwError("NULL SmartPointee*"); // Some Astrobj (in particular Star) inherit twice from Object. if (!object && (ao=dynamic_cast (smptee)) ) object = dynamic_cast (ao); if (!object) Gyoto::throwError("dynamic_cast from SmartPointee* to Object* failed"); if (p.type == Gyoto::Property::double_t || p.type == Gyoto::Property::vector_double_t) val = object -> get(p, unit); else val = object -> get(p); switch(p.type) { case Gyoto::Property::bool_t: ypush_long(name==p.name?bool(val):!val); break; case Gyoto::Property::long_t: ypush_long(long(val)); break; case Gyoto::Property::unsigned_long_t: ypush_long(long((unsigned long)(val))); break; case Gyoto::Property::size_t_t: ypush_long(long(size_t(val))); break; case Gyoto::Property::double_t: ypush_double(val); break; case Gyoto::Property::string_t: case Gyoto::Property::filename_t: *ypush_q(0) = p_strcpy(string(val).c_str()); break; case Gyoto::Property::vector_double_t: { std::vector vval = val; size_t n = vval.size(); long dims[]={1, long(n)}; double * buf = ypush_d(dims); for (size_t i=0; i vval = val; size_t n = vval.size(); long dims[]={1, long(n)}; long * buf = ypush_l(dims); for (size_t i=0; i(val); break; case Gyoto::Property::astrobj_t: *ypush_Astrobj() = Gyoto::SmartPointer(val); break; case Gyoto::Property::spectrum_t: *ypush_Spectrum() = Gyoto::SmartPointer(val); break; case Gyoto::Property::spectrometer_t: *ypush_Spectrometer() = Gyoto::SmartPointer(val); break; case Gyoto::Property::screen_t: *ypush_Screen() = Gyoto::SmartPointer(val); break; default: y_error("Property type unimplemented in ypush_property()"); } } void yget_property(Gyoto::SmartPointer ptr, Gyoto::Property const& p, int iarg, std::string name, std::string unit) { Gyoto::Value val; Gyoto::SmartPointee * smptee = (Gyoto::SmartPointee*) ptr(); Gyoto::Object * object = dynamic_cast (smptee); Gyoto::Astrobj::Generic * ao=NULL; if (!smptee) Gyoto::throwError("NULL SmartPointee*"); // Some Astrobj (in particular Star) inherit twice from Object. if (!object && (ao=dynamic_cast (smptee)) ) object = dynamic_cast (ao); if (!object) Gyoto::throwError("dynamic_cast from SmartPointee* to Object* failed"); switch(p.type) { case Gyoto::Property::bool_t: { val=bool(ygets_l(iarg)); if (name != p.name) val = !val; } break; case Gyoto::Property::long_t: val = long(ygets_l(iarg)); break; case Gyoto::Property::unsigned_long_t: val = (unsigned long)(ygets_l(iarg)); break; case Gyoto::Property::size_t_t: val = size_t(ygets_l(iarg)); break; case Gyoto::Property::double_t: object->set(p, ygets_d(iarg), unit); return; case Gyoto::Property::filename_t: case Gyoto::Property::string_t: val = string(ygets_q(iarg)); break; case Gyoto::Property::vector_double_t: { long n; double *buf = ygeta_d(iarg, &n, NULL); std::vector vval(n, 0.); for (long i=0; iset(p, vval, unit); } return; case Gyoto::Property::vector_unsigned_long_t: { long n; long *buf = ygeta_l(iarg, &n, NULL); std::vector vval=val; vval.resize(n); for (long i=0; i(NULL)); else val = *yget_Metric(iarg); break; case Gyoto::Property::astrobj_t: if (yarg_number(iarg) && ygets_l(iarg)==0) val=(Gyoto::SmartPointer(NULL)); else val = *yget_Astrobj(iarg); break; case Gyoto::Property::spectrum_t: if (yarg_number(iarg) && ygets_l(iarg)==0) val=(Gyoto::SmartPointer(NULL)); else val = *yget_Spectrum(iarg); break; case Gyoto::Property::spectrometer_t: if (yarg_number(iarg) && ygets_l(iarg)==0) val=(Gyoto::SmartPointer(NULL)); else val = *yget_Spectrometer(iarg); break; case Gyoto::Property::screen_t: if (yarg_number(iarg) && ygets_l(iarg)==0) val=(Gyoto::SmartPointer(NULL)); else val = *yget_Screen(iarg); break; default: y_error("Property type unimplemented in yget_property()"); } object->set(p, val); } Gyoto-1.2.0/yorick/gyotoy000077500000000000000000000000601302352257300153710ustar00rootroot00000000000000#!/bin/sh set -e yorick -i gyotoy.i $@ exit 0 Gyoto-1.2.0/yorick/gyotoy.1000066400000000000000000000033121302352257300155300ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii foo.1 .\" .TH GYOTOY 1 "AUGUST 2011" Science "User Manuals" .SH NAME Gyotoy \- visualize one geodesic in Kerr metric .SH SYNOPSIS gyotoy [\fIinput.xml\fR] .SH DESCRIPTION Gyoto is a framework for computing geodesics in curved space-times. The \fBgyotoy\fR utility program uses this framework to compute and display a single geodesic (the trajectory of a massive or mass-less particle) in Kerr metric. \fBgyotoy\fR takes as optional argument a scenery description in XML format (\fIinput.xml\fR). This scenery must contain a Astrobj section of kind Star. Alternatively, a default scenery is loaded. The user can then interactively select initial parameters and redraw the geodesic as many time as needed. the Projection parameters allow rotating the view and various menu entries are rather self-explanatory. Entries in the File menu allow saving the display as an image file, saving the parameters as an XML description, or saving the geodesic's coordinates in an ASCII file. \fBgyotoy\fR is only a small utility to visualise a single geodesic. It can also be invoked from the \fByorick\fR(1) prompt for building more complex graphics and for scripting. Have a look at the gyoto.i and gyotoy.i files in \fByorick\fR's Y_SITE directory. A companion program, \fBgyoto\fR(1), can be used to compute an entire Gyoto scenery using relativistic ray-tracing. .SH ENVIRONMENT .IP GYOTO_PLUGINS The "Star" object in Gyoto is part of the standard plug-in. If the GYOTO_PLUGINS environment variable is set, it must contain at least "stdplug" for \fBgyotoy\fR to run properly. .SH AUTHOR Thibaut Paumard wrote this manual. .SH "SEE ALSO" .BR gyoto (1), .BR yorick (1) Gyoto-1.2.0/yorick/gyotoy.i000066400000000000000000000721671302352257300156360ustar00rootroot00000000000000#!/usr/bin/env yorick -i /* Copyright 2007 F. Rigaut Copyright 2011-2015 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ /* gyotoy.i main function to call the pygtk GUI to gyotoy. syntax: yorick -i gyotoy.i */ require, "gyoto.i"; require, "gyoto_std.i"; require, "pl3d.i"; // gy_gtk needs to be included after defining gy_gtk_before_init // require, "gy_gtk.i"; func __gyotoy_before_init { noop, gy.GLib.set_prgname("Gyotoy"); noop, gy.GLib.set_application_name("Gyotoy"); } GYOTOY_VERSION = "0.2"; extern _gyotoy_running; extern _gyotoy_reticle; extern _gyotoy_wstyle; extern _gyotoy_stand_alone; extern _gyotoy_particle_is_massless; extern _gyotoy_metric; extern _gyotoy_particle; extern _gyotoy_t1; extern _gyotoy_delta; extern _gyotoy_adaptive; extern _gyotoy_initcoord; extern _gyotoy_mass; extern _gyotoy_distance; extern _gyotoy_unit; extern _gyotoy_txyz; extern _gyotoy_particle_to_load; extern _gyotoy_inhibit_redraw; extern _gyotoy_metric_file; extern _gyotoy_nsteps; /* DOCUMENT extern _gyotoy_*; Some variable holding state information for use inside gyotoy. _running: true if GTK interface is running; _reticle: true if reticle should be displayed; .yid: Yorick window ID of the Gyotoy plot area; _wstyle: window style (normally "nobox.gs"); _gyotoy.filename: name of the last file read (careful: can be the py file itself) _gyotoy_stand_alone: true if the user is not supposed to ever see the Yorick prompt. _gyotoy_particle_is_massless: true for a photon. _gyoto_metric: the actual metric object. SEE ALSO: gyotoy */ if (is_void(_gyotoy_nsteps)) _gyotoy_nsteps=100 ; func gyotoy_adaptive(mode, void) { extern _gyotoy_adaptive; if (!is_numerical(mode)) mode = !mode.get_active(); _gyotoy_adaptive=mode; if (mode) _gyotoy_particle, setparameter="Adaptive"; else _gyotoy_particle, setparameter="NonAdaptive"; } func gyotoy_reset(void){ extern _gyotoy_running; extern _gyotoy_reticle; extern _gyotoy_wstyle; extern _gyotoy_stand_alone; extern _gyotoy_particle_is_massless; extern _gyotoy_metric; extern _gyotoy_particle; extern _gyotoy_t0; extern _gyotoy_t1; extern _gyotoy_initcoord; extern _gyotoy_mass; extern _gyotoy_distance; extern _gyotoy_unit; extern _gyotoy_txyz; extern _gyotoy_particle_to_load; _gyotoy_particle_is_massless=0; _gyotoy_metric=gyoto_KerrBL(spin=0.995); _gyotoy_initcoord=[0.,10.791,pi/2,0.,0.,0.,0.016664]; _gyotoy_t1=3000.; _gyotoy_t0=0.; _gyotoy_delta=0.01; _gyotoy_particle=gyoto_Star(metric=_gyotoy_metric, initcoord=_gyotoy_initcoord(1:4), _gyotoy_initcoord(5:7), delta=_gyotoy_delta); gyotoy_adaptive,1; _gyotoy_particle, xfill=_gyotoy_t1; _gyotoy_txyz=_gyotoy_particle(get_txyz=1); _gyotoy_mass=4e6; _gyotoy_distance=8.; _gyotoy_unit="geometrical"; } gyotoy_reset; func gyotoy_set_unit(unit, data) { extern _gyotoy_unit; if (!is_string(unit)) { if (!unit.get_active()) return; unit=gy.Gtk.Buildable(unit).get_name(); } _gyotoy_unit=unit; gyotoy_redraw; } func gyotoy_set_t1(t1, void) { extern _gyotoy_txyz, _gyotoy_t1; if (!is_numerical(t1)) t1 = t1.get_value(); /* if ( (_gyotoy_t1 > _gyotoy_t0 && t1<_gyotoy_t1) || (_gyotoy_t1 < _gyotoy_t0 && t1>_gyotoy_t1) ) _gyotoy_particle, reset=;*/ _gyotoy_t1=t1; if (catch(0x08)) return; // avoid breaking in case of v>c // _gyotoy_txyz=_gyotoy_particle(xfill=t1, get_txyz=1); gyotoy_compute_and_draw; } func gyotoy_set_distance(dist, void) { extern _gyotoy_distance; if (!is_numerical(dist)) dist = dist.get_value(); _gyotoy_distance=dist; gyotoy_redraw; } func gyotoy_set_KerrBL_metric(spin, void) { extern _gyotoy_metric, _gyotoy_particle, _gyotoy_txyz; if (!is_numerical(spin)) spin = spin.get_value(); _gyotoy_metric = gyoto_KerrBL ( spin = spin ); if (_gyotoy_inhibit_redraw) return; //if (catch(0x08)) return; // avoid breaking in case of v>c _gyotoy_particle,metric=_gyotoy_metric, initcoord=_gyotoy_initcoord(1:4), _gyotoy_initcoord(5:7); gyotoy_compute_and_draw; } func gyotoy_set_metric(fname, void) { extern _gyotoy_metric, _gyotoy_particle, _gyotoy_txyz, _gyotoy_metric_file; if (catch(0x08)) { // avoid breaking in case bad file gyotoy_warning, "Unable to load metric. Is this a GYOTO XML description file?"; return; } if (is_void(structof(fname))) fname = gy.Gtk.FileChooser(fname).get_filename(); if (is_string(fname)) metric=gyoto_Metric(fname); if (typeof(metric)!="gyoto_Metric") gyotoy_warning, "Failed to set metric"; prev_metric=_gyotoy_metric; _gyotoy_metric=metric; _gyotoy_metric_file=fname; if (catch(0x08)) { // avoid breaking in case of v>c or other problem gyotoy_warning, "metric loaded but orbit computation failed"; _gyotoy_metric=prev_metric; _gyotoy_particle,metric=_gyotoy_metric, initcoord=_gyotoy_initcoord(1:4), _gyotoy_initcoord(5:7); return; } _gyotoy_particle,metric=_gyotoy_metric, initcoord=_gyotoy_initcoord(1:4), _gyotoy_initcoord(5:7); gyotoy_compute_and_draw; } func gyotoy_set_initcoord(t0, r0, theta0, phi0, rprime0, thetaprime0, phiprime0) { extern _gyotoy_initcoord, _gyotoy_txyz, _gyotoy_inhibit_redraw; if (!is_numerical(t0)) { r0 = _gyotoy.builder.get_object("r0").get_value(); theta0 = _gyotoy.builder.get_object("theta0").get_value(); phi0 = _gyotoy.builder.get_object("phi0").get_value(); t0 = _gyotoy.builder.get_object("t0").get_value(); rprime0 = _gyotoy.builder.get_object("rprime0").get_value(); thetaprime0 = _gyotoy.builder.get_object("thetaprime0").get_value(); phiprime0 = _gyotoy.builder.get_object("phiprime0").get_value(); } _gyotoy_initcoord=[t0, r0, theta0, phi0, rprime0, thetaprime0, phiprime0]; _gyotoy_t0=t0; if (catch(0x08)) return; // avoid breaking in case of v>c _gyotoy_particle, initcoord=_gyotoy_initcoord(1:4),_gyotoy_initcoord(5:7); if (_gyotoy_inhibit_redraw) return; gyotoy_compute_and_draw; } func gyotoy_redraw(void){ /* DOCUMENT gyotoy_redraw Redraws the Gyotoy plot: - convert to UNIT; - erase the plot; - if requested, draws the reticle; - plot the orbit (which triggers drawing the 3d cage). SEE ALSO: gyoto_Kerr_orbit, gyoto_convert, gyoto_reticle, gyoto_plg3 */ // [a, e, l, q]; // delta; long(niter); // Purpose of the "if": gyoto_Kerr_orbit will return 0 if v>c extern _gyotoy_txyz, _gyotoy_inhibit_redraw; if (_gyotoy_inhibit_redraw) return; if (numberof(_gyotoy_txyz)>1) { t=_gyotoy_txyz(,1); n0=abs(t-_gyotoy_t0)(mnx); n1=abs(t-_gyotoy_t1)(mnx); if (n1>n0) ++n1; else --n1; if (n1<1) n1=1; if (n1>numberof(t)) n1=numberof(t); if (n1=t0) t = _gyotoy_txyz(0,1); else t = _gyotoy_txyz(1,1); dt = (_gyotoy_t1-t0)/_gyotoy_nsteps; if (dt==0) { gyotoy_warning, "t0 and t1 too close."; --_gyotoy_redrawing; return; } if ( ((t-t0)/(_gyotoy_t1-t0)) >=1 ){ gyotoy_set_play_image, "gtk-media-play"; gyotoy_set_fraction, (t-t0)/(_gyotoy_t1-t0); gyotoy_redraw; --_gyotoy_redrawing; return; } gyotoy_set_fraction, (t-t0)/(_gyotoy_t1-t0); gyotoy_set_play_image, "gtk-media-pause"; dir = sign(_gyotoy_t1-t0); for ( ; ((dir == 1 && t<=_gyotoy_t1+dt) || (dir ==-1 && t>=_gyotoy_t1+dt) ) && !_gyotoy_cancel; t+=dt) { _gyotoy_txyz=_gyotoy_particle(xfill=t, get_txyz=1); if ( ( (dir== 1) && _gyotoy_txyz(0,1) < t) || ( (dir==-1) && _gyotoy_txyz(1,1) > t) ) t = _gyotoy_t1+2*dt; gyotoy_redraw; //gy_gtk_step_once; frac=(t-t0)/(_gyotoy_t1-t0); if (frac>1.) frac=1; gyotoy_set_fraction, frac; while (gy.Gtk.events_pending ()) noop, gy.Gtk.main_iteration (); } gyotoy_set_play_image, "gtk-media-play"; frac=(t-t0)/(_gyotoy_t1-t0); if (frac>1.) frac=1; gyotoy_set_fraction, frac; gyotoy_redraw; --_gyotoy_redrawing; if (_gyotoy_cancel==2) gyotoy_rewind; } func gyotoy_set_play_image(name) { noop, _gyotoy.builder.get_object("play_image"). set_from_stock(name, gy.Gtk.IconSize.button); } func gyotoy_rewind(wdg, data) { extern _gyotoy_cancel; if (_gyotoy_redrawing) { _gyotoy_cancel=2; return; } _gyotoy_particle, reset=; gyotoy_set_fraction, 0; } func gyotoy_set_fraction(frac) { noop, _gyotoy.builder.get_object("progressbar").set_fraction(frac); } func gyotoy_set_delta(delta, void) { extern _gyotoy_delta; if (!is_numerical(delta)) delta = delta.get_value(); _gyotoy_delta=delta; _gyotoy_particle, delta=delta; } func gyotoy_inhibit_redraw(mode, data) { extern _gyotoy_inhibit_redraw, _gyotoy_cancel; if (!structof(mode)) mode=mode.get_active(); _gyotoy_inhibit_redraw=mode; if (mode &&_gyotoy_redrawing) _gyotoy_cancel=1; } func gyotoy_play_pause(wdg, data) { noop, _gyotoy.builder.get_object("inhibit_button").set_active(0); gyotoy_compute_and_draw; } func gyotoy_export(filename, data) { /* DOCUMENT gyotoy_export, filename Save current plot or Gyotoy data to file. The plot is exported using the standard Yorick functions if filename ends in ".pdf", ".png", ".eps", ".ps", ".jpeg", ".jpg", or ".jfif". The data are exported to an ASCII file if filename ends in ".dat" or ".txt". The GTK interface needs to be running for this to happen. Use gyotoy_save_data for the same result if the interface is not running. SEE ALSO: gyotoy_import, gyotoy_save_data */ // If filename is not a string, assume open button has been clicked if (!is_string(filename)) { Gtk = gy.require("Gtk", "3.0"); chooser = Gtk.FileChooserDialog(); noop, chooser.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.cancel); noop, chooser.add_button(Gtk.STOCK_SAVE, Gtk.ResponseType.ok); fcfc = Gtk.FileChooser(chooser); noop, fcfc.set_action(Gtk.FileChooserAction.save); noop, fcfc.set_do_overwrite_confirmation(1); filter = Gtk.FileFilter(); noop, filter.add_pattern("*"); noop, filter.set_name("All Files"); noop, fcfc.add_filter(filter); filter = Gtk.FileFilter(); noop, filter.add_pattern("*.[tT][xX][tT]"); noop, filter.add_pattern("*.[dD][aA][tT]"); noop, filter.add_pattern("*.[pP][dD][fF]"); noop, filter.add_pattern("*.[eE][pP][sS]"); noop, filter.add_pattern("*.[jJ][pP][eE][gG]"); noop, filter.add_pattern("*.[jJ][pP][gG]"); noop, filter.add_pattern("*.[jJ][fF][iI][fF]"); noop, filter.add_pattern("*.[pP][nN][gG]"); noop, filter.set_name("All supported files"); noop, fcfc.add_filter(filter); filter = Gtk.FileFilter(); noop, filter.add_pattern("*.[dD][aA][tT]"); noop, filter.add_pattern("*.[tT][xX][tT]"); noop, filter.set_name("Data Files"); noop, fcfc.add_filter(filter); filter = Gtk.FileFilter(); noop, filter.add_pattern("*.[xX][mM][lL]"); noop, filter.set_name("XML description files"); noop, fcfc.add_filter(filter); filter = Gtk.FileFilter(); noop, filter.add_pattern("*.[pP][dD][fF]"); noop, filter.set_name("PDF documents"); noop, fcfc.add_filter(filter); filter = Gtk.FileFilter(); noop, filter.add_pattern("*.[eE][pP][sS]"); noop, filter.set_name("EPS documents"); noop, fcfc.add_filter(filter); filter = Gtk.FileFilter(); noop, filter.add_pattern("*.[jJ][pP][eE][gG]"); noop, filter.add_pattern("*.[jJ][pP][gG]"); noop, filter.add_pattern("*.[jJ][fF][iI][fF]"); noop, filter.set_name("JPEG images"); noop, fcfc.add_filter(filter); filter = Gtk.FileFilter(); noop, filter.add_pattern("*.[pP][nN][gG]"); noop, filter.set_name("PNG images"); noop, fcfc.add_filter(filter); res = chooser.run(); noop, chooser.hide(); if (res == Gtk.ResponseType.OK) { filename=fcfc.get_filename(); noop, chooser.destroy(); } else { noop, chooser.destroy(); return; } } window, _gyotoy.yid; require,"pathfun.i"; ext=pathsplit(filename,delim=".")(0); if (strglob("*.pdf", filename, case=0)) pdf, filename; else if (strglob("*.png", filename, case=0)) png, filename; else if (strglob("*.eps", filename, case=0)) eps, filename; else if (strglob("*.ps", filename, case=0)) ps, filename; else if (strglob("*.jpeg",filename, case=0)) jpeg,filename; else if (strglob("*.jpg", filename, case=0)) jpeg,filename; else if (strglob("*.jfif",filename, case=0)) jpeg,filename; else if (strglob("*.dat", filename, case=0)) gyotoy_save_data(filename); else if (strglob("*.txt", filename, case=0)) gyotoy_save_data(filename); else if (strglob("*.xml", filename, case=0)) _gyotoy_particle, xmlwrite=filename; else pyk,"warning('Unknown file type for "+filename+"')"; } func gyotoy_import(filename, data) { extern _gyotoy, _gyotoy_inhibit_redraw; // If filename is not a string, assume open button has been clicked if (!is_string(filename)) { Gtk = gy.require("Gtk", "3.0"); chooser = Gtk.FileChooserDialog(); noop, chooser.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.cancel); noop, chooser.add_button(Gtk.STOCK_OPEN, Gtk.ResponseType.ok); fcfc = Gtk.FileChooser(chooser); noop, fcfc.set_action(Gtk.FileChooserAction.open); noop, fcfc.set_do_overwrite_confirmation(1); /* buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, Gtk.STOCK_OPEN, Gtk.ResponseType.OK)); */ filter = Gtk.FileFilter(); noop, filter.add_pattern("*"); noop, filter.set_name("All Files"); noop, fcfc.add_filter(filter); filter = Gtk.FileFilter(); noop, filter.add_pattern("*.[dD][aA][tT]"); noop, filter.add_pattern("*.[tT][xX][tT]"); noop, filter.set_name("Data Files"); noop, fcfc.add_filter(filter); filter = Gtk.FileFilter(); noop, filter.add_pattern("*.[xX][mM][lL]"); noop, filter.set_name("XML description files"); noop, fcfc.add_filter(filter); res = chooser.run(); noop, chooser.hide(); if (res == Gtk.ResponseType.OK) { filename=fcfc.get_filename(); noop, chooser.destroy(); } else { noop, chooser.destroy(); return; } } // XML file: if (strpart(filename,-3:0)==".xml") { local rad2deg; rad2deg=180./pi; _gyotoy, filename=filename; gyotoy_set_particle, gyoto_Astrobj(filename); return; } // Non-xml file if(! (file = open(filename,"r",1))) { gyotoy_warning, "Could not open file "+filename+" for reading"; return; } /* if (!strmatch(rdline(file),"# Gyotoy save file")) { gyotoy_warning, filename+" is not a Gyotoy save file"; return; }*/ rdr=_gyotoy_inhibit_redraw; _gyotoy_inhibit_redraw=1; while ((line=rdline(file)) && !strmatch(line,"# Start Gyoto parameters")) {} if (!line) { gyotoy_warning, filename+" is not a Gyoto save file"; return; } while (!strmatch((line=rdline(file)),"# End Gyoto parameters")) { key=""; value=""; sread,line, format="# %s = %s", key, value; if (key=="metric_file") gyotoy_set_metric, strpart(value, 2:-1); ok=pyk("set_parameter('"+key+"',"+value+")"); } _gyotoy_inhibit_redraw=rdr; gyotoy_compute_and_draw; //pyk,"compute_orbit('rien')"; } func gyotoy_print(truc) {print,truc;} func gyotoy_set_mass(mass, void) { extern _gyotoy_mass; if (!is_numerical(mass)) mass = mass.get_value(); _gyotoy_mass=mass; gyotoy_redraw; } func gyotoy_set_particle_type(type, void) { extern _gyotoy_particle_is_massless, _gyotoy_particle, _gyotoy_metric; extern _gyotoy_txyz; if (!is_string(type)) { if (!type.get_active()) return; type = gy.Gtk.Buildable(type).get_name(); } _gyotoy_particle_is_massless = (type=="photon"); if (type=="photon") { _gyotoy_particle_is_massless = 1; _gyotoy_particle = gyoto_Photon(); } else { _gyotoy_particle_is_massless = 0; _gyotoy_particle = gyoto_Star(); } if (catch(0x08)) return; // avoid breaking in case of v>c _gyotoy_particle,metric=_gyotoy_metric, initcoord=_gyotoy_initcoord(1:4),_gyotoy_initcoord(5:7); _gyotoy_particle, delta=_gyotoy_delta; gyotoy_adaptive, _gyotoy_adaptive; gyotoy_compute_and_draw; } func gyotoy_save_data(filename) { /* DOCUMENT gyotoy_save_data,filename Save parameters and orbit to text file. SEE ALSO: */ extern _gyotoy_metric; t=_gyotoy_txyz(,1); x=_gyotoy_txyz(,2); y=_gyotoy_txyz(,3); z=_gyotoy_txyz(,4); gyoto_convert, x, _gyotoy_mass, _gyotoy_distance, _gyotoy_unit; gyoto_convert, y, _gyotoy_mass, _gyotoy_distance, _gyotoy_unit; gyoto_convert, z, _gyotoy_mass, _gyotoy_distance, _gyotoy_unit; ptype = (_gyotoy_particle_is_massless?"photon":"star"); mtype = (_gyotoy_metric(kind=)=="KerrBL")?"kerrbl":"file"; spin=(_gyotoy_metric(kind=)=="KerrBL")?_gyotoy_metric(spin=):2; if (f=open(filename,"w",1)) { write, f, format="# %s\n", "Gyoto save file"; write, f, format="# %s\n", "Start Gyoto parameters"; write, f, format="# %13s = \"%s\"\n", "particle_type", ptype; write, f, format="# %13s = \"%s\"\n", "metric_type", mtype; if (mtype=="kerrbl") write, f, format="# %13s = %14.12f\n", "spin", spin; else write, f, format="# %13s = \"%s\"\n", "metric_file", _gyotoy_metric_file; write, f, format="# %13s = %14.12f\n", ["mass", "t0", "r0", "theta0", "phi0", "rprime0", "thetaprime0", "phiprime0", "t1", "delta"], _([_gyotoy_mass], _gyotoy_initcoord, _gyotoy_t1, _gyotoy_delta); write, f, format="# %13s = %d\n", ["adaptive", "nsteps"], [_gyotoy_adaptive, _gyotoy_nsteps]; write, f, format="# %13s = \"%s\"\n", "length_unit", _gyotoy_unit; write, f, format="# %s\n", "End Gyoto parameters"; write, f, format= "# %s\n", "Columns are t, x, y, z"; write, f, format="%14.12f %14.12f %14.12f %14.12f\n", t, x, y, z; close,f; } else error, "Could not create file "+filename; } /************** CALLBACKS ****************/ func gyotoy_about(wdg, udata) { Gtk=gy.require("Gtk", "3.0"); dialog = Gtk.AboutDialog(); noop, dialog.set_program_name("Gyotoy"); noop, dialog.set_version(GYOTOY_VERSION); noop, dialog.set_logo(icon); noop, dialog.set_copyright("Copyright © 20011-2013 Frédéric Vincent & Thibaut Paumard"); noop, dialog.set_license_type(Gtk.License.gpl_3_0); noop, dialog.run(); noop, dialog.destroy(); } func _gyotoy_orient3(wdg, data) { incl = _gyotoy.builder.get_object("incl").get_value(); paln = _gyotoy.builder.get_object("paln").get_value(); phase = _gyotoy.builder.get_object("phase").get_value(); gyoto_orient3, incl, paln, phase; //draw3,1; } func _gyotoy_metric_type(wdg, data) { type_id = wdg.get_active(); if (type_id == 0) type = "kerrbl"; else if (type_id == 1) type = "file"; if (type=="file") { noop, _gyotoy.builder.get_object("spin").set_sensitive(0); noop, _gyotoy.builder.get_object("spin").set_visible(0); noop, _gyotoy.builder.get_object("spin_label").set_visible(0); noop, _gyotoy.builder.get_object("metric_file").set_sensitive(1); noop, _gyotoy.builder.get_object("metric_file_label").set_visible(1); noop, _gyotoy.builder.get_object("metric_file").set_visible(1); // TO PORT //_gyotoy.metric_file_set_cb(_gyotoy.builder.get_object("metric_file")); } else if (type=="kerrbl") { noop, _gyotoy.builder.get_object("spin").set_visible(1); noop, _gyotoy.builder.get_object("spin").set_sensitive(1); noop, _gyotoy.builder.get_object("spin_label").set_visible(1); noop, _gyotoy.builder.get_object("metric_file").set_sensitive(0); noop, _gyotoy.builder.get_object("metric_file_label").set_visible(0); noop, _gyotoy.builder.get_object("metric_file").set_visible(0); gyotoy_set_KerrBL_metric, _gyotoy.builder.get_object("spin"); } else { error, "Unknown metric type"; } } func _gyotoy_gnomon(wdg, data) { gnomon; } func _gyotoy_cage(wdg, data) { cage3; } func _gyotoy_unlimit(wdg, data) { limits; } extern gyotoy_warning; gyotoy_warning=error; extern _pyk_proc, _gyotoy_stand_alone; if (is_void(_gyotoy.yid)) _gyotoy,yid=0; gyotoy_args=get_argv(); if (is_void(GYOTOY_NO_AUTO) & numberof(gyotoy_args)>=3 && anyof(basename(gyotoy_args(3))==["gyotoy.i","gyotoy"])) { _gyotoy_stand_alone=1; if (numberof(gyotoy_args)>3) { gyotoy_args=gyotoy_args(4:); ind=where(strgrep("^-",gyotoy_args)(2,)==-1); if (numberof(ind)) _gyotoy, filename=gyotoy_args(ind(1)); if (numberof(ind)JD}LqIY28y"_^^+(^9?r,,cѾ]wr |*z v["Né_?sjs5`ڔy85g1h`ڽcvUxѵk[:ʊ+;i`) IÉΉVdK~hG;v\1dDoy.ҶμLQ$U2e#_} T7"-51+' q7 #spQ~ӕ j_:7e[> %E_뀐bۘ"NE$ #yدvS]'_wi,_*8`uxԾ"}Nfܻ)h(+y㸖-8SpOiJH-1 { \gQ,6B(uS&aTW+ (2] z~:}c x`EڗV:p.h,@#@$`߅PnF+y!Gifm;lZr7:נHބ ׇALL 붿+"cuB "`ʆ~1`xG#,>~vc@ I0k_/P ^[`2ן+j4j !! JBa@HB=wm˘ y\lЮc*)I''`U]EEi !"95a#z\K 0>3T;Rsuj.M&%@{,\4Ct֑B6g+ǜ*x|L%bˮsVέ|0cj/B^xLl8lUf9XE8Z@4Pd+  zl::Ţ$xZ4$?p/ 8{hS^g?i[gGU}J+/Ŧ ;)/$7{}>9-Je,Z2k\N+-]_'M#_{vO=lt@TӮ`ENJ_Q/]N0%nOT{9bB-bDlvM `Qaȱs--.c؟~2ቴCV~EŠ0aX&YO~زǚ T6&tn=r<ER 7VcYҌrCߖX~`"$΂ɪYxT'xeTW{)pHƹ5sU).g5,&Ϫb߶c3g ֳOW^Z_\Z;IH\ڒ]ǟg ښ;n WkyOjG9oүس.%dG1 Z >ɀj`ii_ x:CT^.R*"tܖ#cY˹Ad>ͣR<7oX0oS,PQ"ͻ_ P:D0D;}  ?f(!۹S?%i;'o /ibOy2>W10#N ONk^U<'(@P,~SxۉKͯ 33IzaZcNej55M2?ؤgA@כJt)ӕEdZ[:ʲRnDSE$H.Wedz{ ܝZ̗IHcl;L%\׏>T,"#SZZ"cukGƱ ?>=;Ɉc=‘YȞ/_  z.b߶ÿ/3XI@P7%"{C,Ӓ1[iRNchW_g̟pi)#D êiD ~ՆW^ ]q)v8l63^mӅX}UIu= {TP~pt1穥}qX_0r29v$PH+::GX(t7`b?7HjXf*9r<WqE}&4MjC8 N4hnbrU rZ7RrBx%mb}/׮B@`v(.%Ϛ׍YOItL4C:Ctntd)TNA ^ yYJGMʃs[)wM+%Esk[. n2&5Z&^^rWC`1Q:JMǥ2)1,&|/{wf95(# pj<ʶk%zɛʀ `c[(^{jg)ԅhOc/ {b1P_ĩ'$DMd\Յ];  =Ǥ&<#{o4(-*bx) rr p. }:7Sج zkY('טM.`TX4tI8e8e=͆0i6RQ|b BT1?UшOU)cKذ~Ϙk IӭE}:l(vۼziE4;F}/b 01w;G<&Wp` i %a⧍VwKrewb#l65&E]3;g~BIɉt:Pu:BWPl(:N'̞?[_{5`m׈7_bZYٳfM=lNp4<,,ӂsJzs#aG`@)IYizAtlH;& ~*J.NX,i0vf EMjˏqgP^^C%=qq$Il13Hɥ5H 7%$ NO~F&۾8u*fMєثbZf0⪩IS~RԮSr R?z~TNV(z̊B   Y'~9xՋ3;1g>&zxi]ӫžy7(*,Q@{nk0\3 d>^{iE=OyPsM\|(N_`+uݚ0U5zֈon|)SVo6kNv|p>$? !}'}ҮcszLуݙk̛gcYȍT$} :.(Jf;M.l4 YS|۷o)ڴKdJ&=[9+sx?kƀ4H+ǯhq:Z4 W䪙*5pM^ޡSh>$u+sQ4@~֌lC5^`#5RU⁛f7>";TC$^OeɺF/@puW> _>+&:"^ϿFzkp@!SSaj//Kj!9ii R3HHa_-!hfifi(IwR3"!IENDB`Gyoto-1.2.0/yorick/gyotoy.xcf000066400000000000000000000267071302352257300161650ustar00rootroot00000000000000gimp xcf fileJJB*B*@G gimp-commentCreated with GIMPgimp-image-grid(style solid) (fgcolor (color-rgba 0.000000 0.000000 0.000000 1.000000)) (bgcolor (color-rgba 1.000000 1.000000 1.000000 1.000000)) (xspacing 10.000000) (yspacing 10.000000) (spacing-unit inches) (xoffset 0.000000) (yoffset 0.000000) (offset-unit inches) ,JJgyotoy_screenshot.png     |JJJJN<<<<<<<<<<<<<<<<<< ư%ԯ*Ӿ׼y$"sɵ#Ӣ    tn   I Ǿ˰G = ˹gJ?No˺ح G}ӭl.2vN3+.Iଦ MzҊP}?   pۦ VRq? 謞J  Қ fe ͝ 檿 ԅij\ͪЏy viíϹi}  7jƿOŶTȽB)/ҏ䰦gB|[Tqz䶹 ްy?9b|B Şn ϤnJEb7NR9zs ט9yBҤ Kƹ\os+ЩF|zɝ uüz/Н{+Oölռ]֘ zή TiӰa " ZttӲj\"   R_5ljeza]RTPeSqIGt֤uEWn} B}Zj͹ƶ &Tbz? s1PŲO ]÷˨G \a. Z̰ͷƣ [5RJ VRyosiVC$ K_\3͏S+Gfvge`ҽ)7 Ի{+η/튷ӱ|F -DZ ̙Sv-= "7;7;7;7;7;5:;=<<<<<<<<<<<<<<<<<< Ϲ%賆(ʞx#!qԻ"  qo   H ȞݷF ; ۾hH>NqƲ꭫ G|k-3vL3*-H L|Q@   o򧞕 WRp? K 暐 ga  ϖ Շѽ_Д{whҹºǞk򍵁 6lζQ׼VǼC(0љhC\Uq}Ƈ |@8bC ֦qߨlHDb8NS9}u 9|C I]sv+G}աsɾ~0ۀ+PϿlʳ` }Vj軕b "[vu齕l̼_"  Sμ`5یgͲ}caUVQgSuKIwשּׂĭwCWqCϷ[m &Ve~? w0RN aƵH _f/ ]޿ī٭ ]5SϷưL XU~uxmXF& N`\4U+Kj{khbφ*6 ΀+0H - U|/? "9;9;9;9;9;6:;=v<v<v<v<v<v<v<v<v<v<v<v<v<v<v<v<v<v<v %xgy}Ơ^YͿ  ZTѴ  7h ັ|ǰ5 -tc ݺ{gN70;Ss­ 5pcS#&t~u[9&"5iά :ql]m=ta/  Tŧ A=V0  6  g L{K  匤udɰǺzFr^XNj~|Qlb (gQozg;kx?Ǽ1#j|xqqkrn}bԱrP1oaE>W`d`üϓ^/td)Kbc2 SɰP52Hz(9p>*_cX z)]1Ӹ  5EfVXsocݺ4b^mԶx U{_k #ttk_e :QͼsGwy ]}c@NrHc w o CWWڻqPfE}d}=pF'hLj_IG>va> ;M=oV66ZX1@Sc2`DQu fgi ?J_pvo. Xi|#=gd9 G{5 EKxc"  Dto D'=~h7 A>|n^VYcnxzgPA3 9FD&r>6M[NMHc 'x _#lya4 ! z >tyzyt\"- (;';(;(;(;':r;===================&                                <<<<<;<=69 52Z.i6-X$M+eҢԡnCC"A#E06953]/l6,Z%N+gqCF"C%G06|o c)o'e %vD "dP' B:iwM‚SC2/w306C0bbbb%%JJBlur     ?JJ,JJ*,p,==================&                                <<<<<;<===================&                                <<<<<;<===================&                                <<<<<;<===================%뒩ʲuiotϽr³ кˢӡ 钩ɹע 啼̢آ³­ءĴռԎ˼ ڦ۽ ߦ ´ ɹ씰Ľι޲Ὢӿݰ⽩ƾՔ զަ ʷסռע헵٭οˣץ׭ؼ禾ɷޮ»ğ պοڽ ðн۽ȵĺô ޸Ĺޞ򒪳³ ٪} 뒭øϹ ï䔰 ե³ ļ˾۽ǰ ڽ|® r|rϽxrn{| n|<|<|<|<|<|{:r;=6C06C06C06ӤؼӥݹؑΩ|ɟԺBqnnhnnnrx0bbbbz%%JJ Background     >-OJJ-g-JJ----cccc%%Gyoto-1.2.0/yorick/gyotoy.xml000066400000000000000000002403141302352257300161750ustar00rootroot00000000000000 99 0.01 0.01 1 0.01 1000000 8 1 10 -360 360 120 1 10 1 1e+20 4000000 1000 100000 KerrBL kerrbl From XML file file 1 10000000 100 10 100 -360 360 -180 1 10 True False 975 600 True False True False False True False _Fichier True True False gtk-open False True False True True gtk-save-as False True False True True True False gtk-quit False True False True True False True False _Affichage True True False False True False Toggle gnomon True False True False Toggle cage True False True False Toggle reticle True False True False Reset 2D limits True False True False Length unit True True False False True False Geometrical unit True True False True False Meter True geometrical False True False Kilometer True geometrical False True False Solar radius True geometrical False True False Arc second True geometrical False True False Milliarcsecond True geometrical False True False Microarcsecond True geometrical False True False Aid_e True True False gtk-about False True False True True False True 0 True True True 475 True True False True False True True True in True False True False 26 2 True True True Integrate from t0 to t1 Geometrical units Integrate from t0 to t1 Geometrical units 40 20 False False t1_adjustment 17 1 2 25 26 True False True Integrate from t0 to t1 Geometrical units Integrate from t0 to t1 Geometrical units t₁ 25 26 True False Integration parameters 2 24 25 True False True Incination of the equatorial plane Degrees Incination of the equatorial plane Degrees Inclination 20 21 True False True Position angle of the line of nodes Degrees Position angle of the line of nodes Degrees PALN 19 20 True False True Argument of the x axis Degrees Argument of the x axis Degrees Phase 21 22 True True True Incination of the equatorial plane Degrees Incination of the equatorial plane Degrees 22 20 False False incl_adjustment 17 1 2 20 21 True True True Position angle of the line of nodes Degrees Position angle of the line of nodes Degrees 22 20 False False paln_adjustment 0.050000000000000003 17 1 2 19 20 True True True Argument of the x axis Degrees Argument of the x axis Degrees 22 20 False False phase_adjustment 17 1 2 21 22 True False Projection 2 18 19 True True True Radians per geometrical units Radians per geometrical units 20 20 False False phiprime0_adjustment 17 1 2 16 17 True False True Radians per geometrical units Radians per geometrical units dφ/dt 16 17 True True True Radians per geometrical units Radians per geometrical units 20 20 False False thetaprime0_adjustment 17 1 2 15 16 True True True Relative to light speed Relative to light speed 20 20 False False rprime0_adjustment 17 1 2 14 15 True True True Date for initial condition Geometrical units Date for initial condition Geometrical units 40 20 False False t0_adjustment 17 1 2 13 14 True True True Radians Radians 20 20 False False phi0_adjustment 17 1 2 12 13 True True True Radians Radians 20 20 False False theta0_adjustment 17 1 2 11 12 True True True Initial distance from center Geometrical units Initial distance from center Geometrical units 20 20 False False r0_adjustment 17 1 2 10 11 True False True Radians per geometrical units Radians per geometrical units dθ/dt 10 15 16 True False True Relative to light speed Relative to light speed dr/dt 14 15 True False True Date for initial condition Geometrical units Date for initial condition Geometrical units t₀ 13 14 True False True Radians Radians φ₀ 12 13 True False True Radians Radians θ₀ 11 12 True False True Initial distance from center Geometrical units Initial distance from center Geometrical units r₀ 10 11 True False Initial conditions 2 9 10 True False True Spin parameter For Kerr metric only Spin parameter For Kerr metric only Spin param. 6 7 True True True Spin parameter For Kerr metric only Spin parameter For Kerr metric only 20 20 0.14000000059604645 False False spin_adjustment 17 True 1 2 6 7 True False True Type of metric Type of metric Type 12 4 5 True False True Type of metric Type of metric metric_type_liststore 0 0 1 2 4 5 True False Metric parameters 2 3 4 True False 2 23 24 True False 2 17 18 True False 2 8 9 True False True Compact object mass for scaling geometrical unit Solar masses Compact object mass for scaling geometrical unit Solar masses Mass 7 8 True True True Compact object mass for scaling geometrical unit Solar masses Compact object mass for scaling geometrical unit Solar masses False False mass_adjustment 17 1 2 7 8 True False True Distance from observer Kiloparsecs Distance from observer Kiloparsecs Distance 22 23 True True True Distance from observer Kiloparsecs Distance from observer Kiloparsecs False False distance_adjustment 17 1 2 22 23 False 2 2 3 True False Particle type 2 True False True Star False True True False True Compute massive-particle orbit (Timelike geodesic) Compute massive-particle orbit (Timelike geodesic) False 0 True True True True 0 Photon False True True False True Compute massless particle trajectory (Null geodesic) Compute massless particle trajectory (Null geodesic) False 0 True star True True 1 2 1 2 False False True True Gyoto XML file containing metric Any kind of Gyoto XML as long as a metric is included Gyoto XML file containing metric Any kind of Gyoto XML as long as a metric is included vertical 1 2 5 6 False True True Gyoto XML file containing metric Any kind of Gyoto XML as long as a metric is included Gyoto XML file containing metric Any kind of Gyoto XML as long as a metric is included File 5 6 True True True True 1 True False True False True True True 0 True False Integration step in proper time Geometrical units Initial if step is adaptive 5 δ False True 1 True True Integration step in proper time Geometrical units Initial if step is adaptive 6 delta_adjustment 4 True False True 2 False True True True Push-in for non-adaptive δ False none True False gtk-zoom-100 False True 3 True False Split t0 to t1 integration in N frames 5 N. frames False True 4 True True Split t0 to t1 integration in N frames 4 nsteps_adjustment True False True 5 False True True True Pause and reset integration False none True False Pause and reset integration gtk-goto-first False True 6 False True True True Integrate / pause integration False none True False gtk-media-play False True 7 False True True True Push-in to inhibit redraw upon parameter changes False none True False gtk-media-stop False True 8 False False 2 -360 360 -120 1 10 -4 4 0.01 0.10000000000000001 -10 10 0.016664000000000002 0.01 0.10000000000000001 1000000 10.789999999999999 1 10 -10 10 0.01 0.10000000000000001 1 0.995 0.01 0.10000000000000001 -1000000 1000000 1 10 -10000000000 10000000000 3000 1 10 4 1.5707963267948966 0.01 0.10000000000000001 -10 10 0.01 0.10000000000000001 Gyoto-1.2.0/yorick/matte-painting.i000066400000000000000000000053121302352257300172110ustar00rootroot00000000000000#!/usr/bin/env yorick /* This script examplifies how to perform matte painting with Gyoto, i.e. vizualizing lensing effects on a painted background. Copyright 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "gyoto.i" #include "jpeg.i" restore, gyoto; ///// First, define an appropriate Scenery: // Choose a metric, set its mass: earth_mass=5.9722e24; // mass of the Earth, in kg kerrbl=KerrBL(spin=0., mass=1*earth_mass, unit="kg"); kerrks=KerrKS(mass=kerrbl.mass(), spin=kerrbl.spin()); minkowski=Metric("Minkowski"); minkowski, mass=kerrbl.mass(), setparameter="Spherical"; metric=kerrbl; // Define the screen (=camera): res=128; // resolution of the output image scr=Screen(inclination=pi/2, paln=pi, argument=pi/2, metric=metric, resolution=res, anglekind="Rectilinear"); scr,distance=2, unit="m"; // camera is at 1m from the BH scr, fov=pi/2.; // Use an empty Astrobj, just set rmax to 10 meters: ao=Astrobj("Complex", rmax=10./metric.unitlength()); // Build a Scenery with this Metric, Screen and Astrobj: sc=Scenery(metric=metric, astrobj=ao, screen=scr, nthreads=8); ///// Second, choose a painter to paint the sky: // To use a jpeg file containing a full-sky, 360°x180° panorama: // download file: // http://farm1.staticflickr.com/192/456185667_adde9d2f8e_o_d.jpg //painter=gyoto.painters.mk_panorama(img=jpeg_read("456185645_e56abcc2cd_o.jpg")(,,::-1)); // To use a p-mode-like pattern: painter=gyoto.painters.mk_p_mode(ntheta=80, nphi=80); ///// Third, simply call the appropriate function: // matte_paint() can be called directly on sc, but to specify only a // region or to call matte_paint repeatedly (e.g. on distinct // painters, of to fiddle with yaw, pitch & roll), we can precompute // ipct: ny=res*10/16; // use a 16/10 aspect ratio y1=(res-ny)/2+1; y2=res+1-y1; ipct=sc(,y1:y2,impactcoords=); //ipct=fits_read("ipct.fits"); bg=matte_paint(ipct, painter, kind=metric.coordkind(), yaw=-1.62, roll=-0.32); ///// Fourth, display the image: fma; pli, bg; limits, square=1; ///// Fifth, possibly, save it as a JPEG: //jpeg_write, "file_out.jpg", bg(,,::-1); Gyoto-1.2.0/yorick/mk-movie-fork-raytracing.i000077500000000000000000000070621302352257300211230ustar00rootroot00000000000000#!/usr/bin/env yorick /* This script examplifies how to make a movie using Gyoto and LibAV. There is an unconspicuous bug in Gyoto by which mutlithreaded ray-tracing corrupts the process memory (presumably some block is freed in one thread whereas it is still used by the main thread). We seem to work around this bug by performing the ray-tracing of each image in a separate (multi-threaded) yorick process. Therefore, this script is mutli-process (main process writes movie file, subprocesses compute images), and the Gyoto subprocesses are multi-threaded. Required packages: gyoto (gyoto_Scenery) https://github.com/gyoto/Gyoto yorick-av (av_*) https://github.com/paumard/yorick-av yorick-svipc (ftok, fork, s?m_*) https://github.com/mdcb/yp-svipc yutils (tic, tac) https://github.com/frigaut/yorick-yutils */ #include "svipc.i" #include "gyoto.i" #include "libav.i" //// PARAMETERS ifile=GYOTO_EXAMPLES_DIR+"example-moving-star.xml"; ofile="test.ogg"; vcodec="libtheora"; resolution=64; // use jmin and jmax to fix aspect ratio jcrop = resolution/8; // aspect ratio 4:3 jmin=1+jcrop; jmax=resolution-jcrop t0=1000.; nframes=1000; dt=1.; //gyoto_verbose,0; //// END PARAMETERS tic; // Initialize time counter file_i=current_include(); ppid=getpid(); shmid = ftok(file_i, proj=ppid); semid = ftok(file_i, proj=ppid+1); sem_init, semid, nums=2; shm_init, shmid, slots=1; // Semaphores are used in this script to lock the shared memory // segment. Gyoto write to shared memory and gives 0. FFmpeg reads // from shared memory and gives 1. Initially, FFmpeg gives 1 (nothing // to read) and takes 0 (waiting for frame). // Reading palette using plain Yorick requires an X11 window window; pli, array(double, 2,2); palette, query=1, r,g,b; rgb= transpose([r,g,b]); top=numberof(r)-1; winkill; // Reading and initializing scenery sc=gyoto_Scenery(ifile); ut = sc(metric=)(unitlength=)/GYOTO_C; sc,quantities="Intensity"; sc,nthreads=8; noop, sc(screen=)(time=t0*ut); noop, sc(screen=)(resolution=resolution); // Specific to star astrobj: precompute orbit ao = sc(astrobj=); if (ao(kind=)=="Star") noop, ao(xfill=0.); // Change star size to something reasonably physical, yet nice ao, radius=1, opticallythin=0; // Precompute mask, if possible for this astrobj stt = ao(startrace= t0, t0+nframes*dt)(opticallythin=0, radius=2.*ao(radius=), delta=0.5*ao(radius=)); sc, astrobj=stt; mask=sc(,,"Intensity"); sc, astrobj=ao; noop, sc.screen(mask=mask); // Check the mask at least once! //pli, mask(,jmin:jmax); limits, square=1; pause, 10000; winkill; sem_give, semid, 1; // Give 1: Gyoto may write to shared memory. encoder=av_create(ofile, vcodec=vcodec); gyoto_verbose, 0; for (n=1, t=t0; n<=nframes; ++n, t+=dt) { if (fork()) { sem_take, semid, 0; // Is there something to read now? im = shm_read(shmid, "image"); if (n==1) cmax=max(im); frame = rgb(,bytscl(im(,0:1:-1), cmax=cmax, top=top)+1); sem_give, semid, 1; // Reading done, Gyoto may write again. write, format="Writting frame nr %d of %d to movie file\n", n, nframes; av_write, encoder, frame; } else { write, format="Ray-tracing frame nr %d of %d, time=%e\n", n, nframes, t; noop, sc(screen=)(time=t*ut); im = sc(,jmin:jmax,"Intensity"); sem_take, semid, 1; // May we write now? shm_write, shmid, "image", &im; sem_give, semid, 0; // Image ready to be read. quit; } } av_close, encoder; sem_cleanup, semid; shm_cleanup, shmid; write, format="\nRay-traced %d frames in %g seconds\n", nframes, tac(); Gyoto-1.2.0/yorick/mk-movie.i000077500000000000000000000043001302352257300160130ustar00rootroot00000000000000#!/usr/bin/env yorick /* This script examplifies how to make a movie using Gyoto and LibAV. As of writing there is a bug in Gyoto which makes this script occasionaly fail with a segmentation fault or message such as yorick(20187,0x7fff706cdcc0) malloc: *** error for object 0x10038d0c8: incorrect checksum for freed object - object was probably modified after being freed. mk-movie-fork-raytracing.i tries to work around this bug by insulating each call to gyoto_Scenery_rayTrace in its own process. Required packages: gyoto (gyoto_Scenery) yorick-av (av_*) yutils (tic, tac) */ #include "gyoto.i" #include "pnm.i" #include "libav.i" ifile=GYOTO_EXAMPLES_DIR+"example-moving-star.xml"; ofile="test_single.ogg"; resolution=64; // use jmin and jmax to fix aspect ratio jcrop = resolution/8; // aspect ratio 4:3 jmin=1+jcrop; jmax=resolution-jcrop nthreads=8; gyoto_verbose,0; tic; t0=1000.; nframes=2000; dt=1.; sc=gyoto_Scenery(ifile); ut = sc(metric=)(unitlength=)/GYOTO_C; sc,quantities="Intensity"; sc,nthreads=nthreads; noop, sc(screen=)(time=t0*ut); noop, sc(screen=)(resolution=resolution); // Specific to star astrobj: precompute orbit ao = sc(astrobj=); if (ao(kind=)=="Star") noop, ao(xfill=0.); // Change star size to something reasonably physical, yet nice ao, radius=1, opticallythin=0; // Precompute mask, if possible for this astrobj stt = ao(startrace= t0, t0+nframes*dt)(opticallythin=0, radius=2.*ao(radius=), delta=0.5*ao(radius=)); sc, astrobj=stt; mask=sc(,,"Intensity"); sc, astrobj=ao; noop, sc.screen(mask=mask); // Check the mask at least once! //pli, mask(,jmin:jmax); limits, square=1; pause, 10000; winkill; encoder=av_create(ofile); window; pli, array(double, 2,2); palette, query=1, r,g,b; rgb= transpose([r,g,b]); top=numberof(r)-1; winkill; for (n=1, t=t0; n<=nframes; ++n, t+=dt) { write, format="\nRay-tracing frame nr %d of %d, observing time=%e\n", n, nframes, t; noop, sc(screen=)(time=t*ut); im = sc(,jmin:jmax,"Intensity"); if (n==1) cmax=max(im); frame = rgb(,bytscl(im(,0:1:-1), cmax=cmax, top=top)+1); av_write, encoder, frame; } av_close, encoder; write, format="\nRay-traced %d frames in %g seconds\n", nframes, tac(); Gyoto-1.2.0/yorick/setpaths.i.in000066400000000000000000000023501302352257300165270ustar00rootroot00000000000000/* Copyright 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ /* The purpose of this file is to set Yorick paths to access the gyoto plug-in from the built source tree. This file (setpaths.i) and its source (setpaths.i.in) are not supposed to be installed on the system. */ abs_top_srcdir="@abs_top_srcdir@"; abs_top_builddir="@abs_top_srcdir@"; #include "pathfun.i" idirs=abs_top_srcdir+"/yorick/"+["", "stdplug/"]; sodirs=abs_top_builddir+"/yorick/"+["", "stdplug/"]; plug_dir,_(sodirs, plug_dir()); set_path, pathform(idirs)+":"+get_path(); GYOTO_EXAMPLES_DIR=abs_top_builddir+"/doc/examples/"; Gyoto-1.2.0/yorick/stdplug/000077500000000000000000000000001302352257300155775ustar00rootroot00000000000000Gyoto-1.2.0/yorick/stdplug/Makefile.in000066400000000000000000000101561302352257300176470ustar00rootroot00000000000000# these values filled in by yorick -batch make.i Y_MAKEDIR= Y_EXE= Y_EXE_PKGS= Y_EXE_HOME= Y_EXE_SITE= Y_HOME_PKG= # ----------------------------------------------------- optimization flags # options for make command line, e.g.- make COPT=-g TGT=exe COPT=$(COPT_DEFAULT) -L../../lib -I@top_srcdir@/include -I@top_builddir@/include TGT=$(DEFAULT_TGT) # ------------------------------------------------ macros for this package vpath %.C @srcdir@ CXXFLAGS=@CXXFLAGS@ CPPFLAGS=@CPPFLAGS@ XERCES_LIBS=@XERCES_LIBS@ XERCES_CFLAGS=@XERCES_CFLAGS@ CFITSIO_LIBS=@CFITSIO_LIBS@ CFITSIO_CFLAGS=@CFITSIO_CFLAGS@ UDUNITS_CFLAGS=@UDUNITS_CFLAGS@ BOOST_CPPFLAGS=@BOOST_CPPFLAGS@ UDUNITS_LIBS=@UDUNITS_LIBS@ DYLIB_VAR=@DYLIB_VAR@ PTHREAD_CFLAGS= @PTHREAD_CFLAGS@ PTHREAD_LIBS= @PTHREAD_LIBS@ SYS=@SYS@ plugin_sfx=@plugin_sfx@ YGYOTO_C = $(shell ls @srcdir@/../*.C) GYOTO_C = $(shell ls @top_srcdir@/lib/*.C) GYOTO_OBJ = $(GYOTO_C:.C=.o) GYOTO_H = $(shell ls @top_srcdir@/include/*.h) PKG_NAME=gyoto_std PKG_I=@srcdir@/gyoto_std.i OBJS = StdPlug.o gyoto_KerrBL.o gyoto_KerrKS.o \ gyoto_Star.o gyoto_StarTrace.o gyoto_FixedStar.o \ gyoto_Torus.o gyoto_PatternDisk.o \ gyoto_DirectionalDisk.o \ gyoto_Disk3D.o gyoto_PolishDoughnut.o\ gyoto_PowerLawSpectrum.o gyoto_BlackBodySpectrum.o # change to give the executable a name other than yorick PKG_EXENAME=yorick # PKG_DEPLIBS=-Lsomedir -lsomelib for dependencies of this package PKG_DEPLIBS=-L../../lib/.libs -lgyoto@FEATURES@ $(PTHREADS_LIBS) ifeq ($(SYS),Darwin) PKG_DEPLIBS+=-bundle_loader ../../lib/.libs/libgyoto-stdplug.$(plugin_sfx) \ -flat_namespace -bundle_loader ../gyoto.so $(LIB_CXX) endif # set compiler (or rarely loader) flags specific to this package PKG_CFLAGS= -I@top_srcdir@/include -I@top_srcdir@/yorick $(XERCES_CFLAGS) $(CFITSIO_CFLAGS) $(UDUNITS_CFLAGS) $(BOOST_CPPFLAGS) $(PTHREAD_CFLAGS) PKG_LDFLAGS= $(PTHREAD_CFLAGS) # list of additional package names you want in PKG_EXENAME # (typically Y_EXE_PKGS should be first here) EXTRA_PKGS=$(Y_EXE_PKGS) # list of additional files for clean PKG_CLEAN= # autoload file for this package, if any PKG_I_START= # non-pkg.i include files for this package, if any PKG_I_EXTRA= # -------------------------------- standard targets and rules (in Makepkg) # set macros Makepkg uses in target and dependency names # DLL_TARGETS, LIB_TARGETS, EXE_TARGETS # are any additional targets (defined below) prerequisite to # the plugin library, archive library, and executable, respectively PKG_I_DEPS=$(PKG_I) Y_DISTMAKE=distmake include $(Y_MAKEDIR)/Make.cfg # Yorick-distributed Makepkg is not reliable for out-of-tree builds. include @top_srcdir@/yorick/Makepkg include $(Y_MAKEDIR)/Make$(TGT) # override macros Makepkg sets for rules and other macros # Y_HOME and Y_SITE in Make.cfg may not be correct (e.g.- relocatable) Y_HOME=$(Y_EXE_HOME) Y_SITE=$(Y_EXE_SITE) # use the compiler selected with the configure script CC=@CC@ CXX=@CXX@ # Actual install directories set with ./configure --with-yorick-* prefix=@prefix@ exec_prefix=@exec_prefix@ DEST_Y_HOME=$(DESTDIR)@Y_INST_HOME@ DEST_Y_SITE=$(DESTDIR)@Y_INST_SITE@ # ------------begin C++ source hacks # must use C++ to load yorick with this C++ package # this assumes make default CXX macro points to C++ compiler CXXFLAGS+=$(CFLAGS) $(GYOTO_FLAGS) -DYGYOTO_LOCAL_SUPPLIER=GyotoStdPlugSupplier LD_DLL=$(CXX) $(LDFLAGS) $(PLUG_SHARED) LD_EXE=$(CXX) $(LDFLAGS) $(PLUG_EXPORT) # C++ has no standard file extension, supply default make rule(s) .C.o: $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@ $< # --------------end C++ source hacks # simple example: #myfunc.o: myapi.h # more complex example (also consider using PKG_CFLAGS above): #myfunc.o: myapi.h myfunc.c # $(CC) $(CPPFLAGS) $(CFLAGS) -DMY_SWITCH -o $@ -c myfunc.c StdPlug.o: @srcdir@/../ygyoto_supplier.C @srcdir@/../ygyoto.h $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@ $< ../../lib/libgyoto.a: $(GYOTO_C) $(GYOTO_H) make -C ../lib gyoto_std.so: ../gyoto.so $(OBJS) ../gyoto.so: make -C .. gyoto.so .PHONY: standalone test-cppprog test-standalone test test-plugin check # -------------------------------------------------------- end of Makefile Gyoto-1.2.0/yorick/stdplug/gyoto_BlackBodySpectrum.C000066400000000000000000000035761302352257300225140ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "ygyoto.h" #include "yapi.h" #include #include "GyotoFactory.h" #include "GyotoBlackBodySpectrum.h" namespace YGyoto { namespace Spectrum { ygyoto_Spectrum_eval_worker_t BlackBodyYEval; } } using namespace Gyoto; using namespace YGyoto; using namespace Gyoto::Spectrum; using namespace YGyoto::Spectrum; using namespace std; void YGyoto::Spectrum::BlackBodyYEval(SmartPointer * OBJ_, int argc) { static char const * knames[]={ "unit", "temperature", "scaling", YGYOTO_SPECTRUM_GENERIC_KW, 0 }; YGYOTO_WORKER_INIT(Spectrum, BlackBody, knames, YGYOTO_SPECTRUM_GENERIC_KW_N+3); YGYOTO_WORKER_SET_UNIT; YGYOTO_WORKER_GETSET_DOUBLE2(temperature); YGYOTO_WORKER_GETSET_DOUBLE2(scaling); YGYOTO_WORKER_CALL_GENERIC(Spectrum); } extern "C" { void Y_gyoto_BlackBodySpectrum(int argc) { YGYOTO_CONSTRUCTOR_INIT2(Spectrum, Gyoto::Spectrum::Generic, BlackBody, spectrum); if ((*OBJ)->kind().compare("BlackBody")) y_error("Expecting Spectrum of kind BlackBody"); BlackBodyYEval(OBJ, argc); } void Y__gyoto_BlackBodySpectrum_register_as_Metric(){ ygyoto_Spectrum_register("BlackBody",&BlackBodyYEval); } } Gyoto-1.2.0/yorick/stdplug/gyoto_DirectionalDisk.C000066400000000000000000000127551302352257300222060ustar00rootroot00000000000000/* Copyright 2014 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include #include "../ygyoto.h" #include "yapi.h" #include using namespace Gyoto; using namespace Gyoto::Astrobj; #include using namespace std; // on_eval worker void ygyoto_DirectionalDisk_eval(SmartPointer *OBJ_, int argc) { static char const * knames[]={ "unit", #ifdef GYOTO_USE_CFITSIO "fitsread", #endif "copyintensity", "copygridfreq", "copygridcosi", "copygridradius", #ifdef GYOTO_USE_CFITSIO "fitswrite", #endif YGYOTO_THINDISK_GENERIC_KW, 0 }; #ifdef GYOTO_USE_CFITSIO #define NKW 8 #else #define NKW 6 #endif YGYOTO_WORKER_INIT(Astrobj, DirectionalDisk, knames, YGYOTO_THINDISK_GENERIC_KW_N+NKW); YGYOTO_WORKER_SET_UNIT; #ifdef GYOTO_USE_CFITSIO YGYOTO_WORKER_RUN( fitsRead(ygets_q(iarg)) ); #endif //YGYOTO_WORKER_GETSET_DOUBLE2(patternVelocity); //YGYOTO_WORKER_GETSET_LONG2(repeatPhi); //YGYOTO_WORKER_GETSET_DOUBLE2(nu0); //YGYOTO_WORKER_GETSET_DOUBLE2(dnu); //YGYOTO_WORKER_GETSET_DOUBLE2(phimin); //YGYOTO_WORKER_GETSET_DOUBLE2(phimax); /* INTENSITY */ if ((iarg=kiargs[++k])>=0) { GYOTO_DEBUG << "copyintensity=\n"; iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); size_t ddims[3]; (*OBJ) -> getIntensityNaxes(ddims); long dims[] = {3, long(ddims[0]), long(ddims[1]), long(ddims[2])}; double * out = ypush_d(dims); memcpy(out, (*OBJ)->getIntensity(), dims[1]*dims[2]*dims[3]*sizeof(double)); } else { long ntot; long dims[Y_DIMSIZE]; double const * const in = ygeta_d(iarg, &ntot, dims); if (dims[0]==0 && ntot && *in==0) (*OBJ) -> copyIntensity(NULL, 0); else if (dims[0]==3) { size_t ddims[] = {size_t(dims[1]), size_t(dims[2]), size_t(dims[3])}; (*OBJ)->copyIntensity(in, ddims); } else y_error("COPYINTENSITY must be nil, 0, or array(double, nnu, nphi, nr"); } } /* GRIDFREQ */ if ((iarg=kiargs[++k])>=0) { GYOTO_DEBUG << "copygridfreq=\n"; iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); double const * const freq = (*OBJ)->getGridFreq(); if (freq) { size_t ddims[3]; (*OBJ) -> getIntensityNaxes(ddims); long dims[] = {1, long(ddims[0])}; double * out = ypush_d(dims); memcpy(out, freq, ddims[0]*sizeof(double)); } else ypush_long(0); } else { long ntot; long dims[Y_DIMSIZE]; double const * const in = ygeta_d(iarg, &ntot, dims); if (dims[0]==0 && ntot && *in==0) (*OBJ) -> copyGridFreq(NULL, 0); else if (dims[0]==1) (*OBJ) -> copyGridFreq(in, ntot); else y_error("COPYGRIDFREQ must be nil, 0, or array(double, nr"); } } /* GRIDCOSI */ if ((iarg=kiargs[++k])>=0) { GYOTO_DEBUG << "copygridcosi=\n"; iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); double const * const cosi = (*OBJ)->getGridCosi(); if (cosi) { size_t ddims[3]; (*OBJ) -> getIntensityNaxes(ddims); long dims[] = {1, long(ddims[1])}; double * out = ypush_d(dims); memcpy(out, cosi, ddims[1]*sizeof(double)); } else ypush_long(0); } else { long ntot; long dims[Y_DIMSIZE]; double const * const in = ygeta_d(iarg, &ntot, dims); if (dims[0]==0 && ntot && *in==0) (*OBJ) -> copyGridCosi(NULL, 0); else if (dims[0]==1) (*OBJ) -> copyGridCosi(in, ntot); else y_error("COPYGRIDCOSI must be nil, 0, or array(double, nr"); } } /* GRIDRADIUS */ if ((iarg=kiargs[++k])>=0) { GYOTO_DEBUG << "copygridradius=\n"; iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); double const * const radius = (*OBJ)->getGridRadius(); if (radius) { size_t ddims[3]; (*OBJ) -> getIntensityNaxes(ddims); long dims[] = {1, long(ddims[2])}; double * out = ypush_d(dims); memcpy(out, radius, ddims[2]*sizeof(double)); } else ypush_long(0); } else { long ntot; long dims[Y_DIMSIZE]; double const * const in = ygeta_d(iarg, &ntot, dims); if (dims[0]==0 && ntot && *in==0) (*OBJ) -> copyGridRadius(NULL, 0); else if (dims[0]==1) (*OBJ) -> copyGridRadius(in, ntot); else y_error("COPYGRIDRADIUS must be nil, 0, or array(double, nr"); } } #ifdef GYOTO_USE_CFITSIO YGYOTO_WORKER_RUN( fitsWrite(ygets_q(iarg)) ); #endif YGYOTO_WORKER_CALL_GENERIC(ThinDisk); } extern "C" { void Y__gyoto_DirectionalDisk_register_as_Astrobj(){ ygyoto_Astrobj_register("DirectionalDisk",&ygyoto_DirectionalDisk_eval); } // Generic constructor/accessor void Y_gyoto_DirectionalDisk(int argc) { YGYOTO_CONSTRUCTOR_INIT2(Astrobj, Astrobj::Generic, DirectionalDisk, astrobj); if ((*OBJ)->kind().compare("DirectionalDisk")) y_error("Expecting Astrobj of kind DirectionalDisk"); ygyoto_DirectionalDisk_eval(OBJ, argc); } } Gyoto-1.2.0/yorick/stdplug/gyoto_Disk3D.C000066400000000000000000000120251302352257300202050ustar00rootroot00000000000000/* Copyright 2011, 2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include #include #include "../ygyoto.h" #include "yapi.h" using namespace Gyoto; using namespace Gyoto::Astrobj; #include using namespace std; #define OBJ ao // on_eval worker void ygyoto_Disk3D_eval(SmartPointer *ao_, int argc) { static char const * knames[]={ "unit", #ifdef GYOTO_USE_CFITSIO "fitsread", #endif "repeatphi", "nu0", "dnu", "rin", "rout", "zmin", "zmax", "phimin", "phimax", "copyemissquant", "copyopacity", "copyvelocity", #ifdef GYOTO_USE_CFITSIO "fitswrite", #endif YGYOTO_ASTROBJ_GENERIC_KW, 0 }; #ifdef GYOTO_USE_CFITSIO #define NKW 15 #else #define NKW 13 #endif YGYOTO_WORKER_INIT(Astrobj, Disk3D, knames, YGYOTO_ASTROBJ_GENERIC_KW_N+NKW); YGYOTO_WORKER_SET_UNIT; #ifdef GYOTO_USE_CFITSIO YGYOTO_WORKER_RUN( fitsRead(ygets_q(iarg)) ); #endif YGYOTO_WORKER_GETSET_LONG2(repeatPhi); YGYOTO_WORKER_GETSET_DOUBLE2(nu0); YGYOTO_WORKER_GETSET_DOUBLE2(dnu); YGYOTO_WORKER_GETSET_DOUBLE2(rin); YGYOTO_WORKER_GETSET_DOUBLE2(rout); YGYOTO_WORKER_GETSET_DOUBLE2(zmin); YGYOTO_WORKER_GETSET_DOUBLE2(zmax); YGYOTO_WORKER_GETSET_DOUBLE2(phimin); YGYOTO_WORKER_GETSET_DOUBLE2(phimax); /* EMISSQUANT */ if ((iarg=kiargs[++k])>=0) { GYOTO_DEBUG << "copyemissquant=\n"; iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); size_t ddims[4]; (*ao) -> getEmissquantNaxes(ddims); long dims[] = {4, long(ddims[0]), long(ddims[1]), long(ddims[2]), long(ddims[3])}; double * out = ypush_d(dims); memcpy(out, (*ao)->getEmissquant(), dims[1]*dims[2]*dims[3]*dims[4]*sizeof(double)); } else { long ntot; long dims[Y_DIMSIZE]; double const * const in = ygeta_d(iarg, &ntot, dims); if (dims[0]==0 && ntot && *in==0) (*ao) -> copyEmissquant(NULL, 0); else if (dims[0]==4) { size_t ddims[] = {size_t(dims[1]), size_t(dims[2]), size_t(dims[3]), size_t(dims[4])}; (*ao)->copyEmissquant(in, ddims); } else y_error("COPYEMISSQUANT must be nil, 0, or array(double, nnu, nphi, nz, nr"); } } /* OPACITY */ if ((iarg=kiargs[++k])>=0) { GYOTO_DEBUG << "copyopacity=\n"; iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); size_t ddims[4]; (*ao) -> getEmissquantNaxes(ddims); long dims[] = {4, long(ddims[0]), long(ddims[1]), long(ddims[2]), long(ddims[3])}; double * out = ypush_d(dims); memcpy(out, (*ao)->opacity(), dims[1]*dims[2]*dims[3]*dims[4]*sizeof(double)); } else { long ntot; long dims[Y_DIMSIZE]; double const * const in = ygeta_d(iarg, &ntot, dims); if (dims[0]==0 && ntot && *in==0) (*ao) -> copyOpacity(NULL, 0); else if (dims[0]==4) { size_t ddims[] = {size_t(dims[1]), size_t(dims[2]), size_t(dims[3]), size_t(dims[4])}; (*ao)->copyOpacity(in, ddims); } else y_error("COPYOPACITY must be nil, 0, or array(double, nnu, nphi, nz, nr"); } } /* VELOCITY */ if ((iarg=kiargs[++k])>=0) { GYOTO_DEBUG << "copyvelocity=\n"; iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); size_t ddims[4]; (*ao) -> getEmissquantNaxes(ddims); long dims[] = {4, 3, long(ddims[1]), long(ddims[2]), long(ddims[3])}; double * out = ypush_d(dims); memcpy(out, (*ao)->getVelocity(), 3*dims[2]*dims[3]*dims[4]*sizeof(double)); } else { long ntot; long dims[Y_DIMSIZE]; double const * const in = ygeta_d(iarg, &ntot, dims); if (dims[0]==0 && ntot && *in==0) (*ao) -> copyVelocity(NULL, 0); else if (dims[0]==4 && dims[1]==3) { size_t ddims[] = {size_t(dims[2]), size_t(dims[3]), size_t(dims[4])}; (*ao)->copyVelocity(in, ddims); } else y_error("COPYVELOCITY must be nil, 0, or array(double, 3, nphi, nz, nr"); } } #ifdef GYOTO_USE_CFITSIO YGYOTO_WORKER_RUN( fitsWrite(ygets_q(iarg)) ); #endif YGYOTO_WORKER_CALL_GENERIC(Astrobj); } extern "C" { void Y__gyoto_Disk3D_register_as_Astrobj(){ ygyoto_Astrobj_register("Disk3D",&ygyoto_Disk3D_eval); } // Generic constructor/accessor void Y_gyoto_Disk3D(int argc) { YGYOTO_CONSTRUCTOR_INIT2(Astrobj, Astrobj::Generic, Disk3D, astrobj); if ((*ao)->kind().compare("Disk3D")) y_error("Expecting Astrobj of kind Disk3D"); ygyoto_Disk3D_eval(ao, argc); } } Gyoto-1.2.0/yorick/stdplug/gyoto_FixedStar.C000066400000000000000000000041071302352257300210170ustar00rootroot00000000000000/* Copyright 2011, 2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include #include "../ygyoto.h" #include "yapi.h" using namespace Gyoto; #include using namespace std; using namespace Gyoto::Astrobj; #define OBJ ao // on_eval worker void ygyoto_FixedStar_eval(SmartPointer* ao_, int argc) { static char const * knames[]={ "unit", "radius", "position", "rotating", "spectrum", "opacity", "deltamaxoverradius", "deltamaxoverdistance", YGYOTO_ASTROBJ_GENERIC_KW, 0 }; YGYOTO_WORKER_INIT(Astrobj, FixedStar, knames, YGYOTO_ASTROBJ_GENERIC_KW_N+8); YGYOTO_WORKER_SET_UNIT; YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(radius); YGYOTO_WORKER_GETSET_VECTOR(Pos, 3); YGYOTO_WORKER_GETSET_LONG2(rotating); YGYOTO_WORKER_GETSET_OBJECT2(spectrum,Spectrum); YGYOTO_WORKER_GETSET_OBJECT2(opacity,Spectrum); YGYOTO_WORKER_GETSET_DOUBLE2(deltaMaxOverRadius); YGYOTO_WORKER_GETSET_DOUBLE2(deltaMaxOverDistance); YGYOTO_WORKER_CALL_GENERIC(Astrobj); } extern "C" { void Y__gyoto_FixedStar_register_as_Astrobj(){ ygyoto_Astrobj_register("FixedStar",&ygyoto_FixedStar_eval); } // Generic constructor/accessor void Y_gyoto_FixedStar(int argc) { YGYOTO_CONSTRUCTOR_INIT2(Astrobj, Astrobj::Generic, FixedStar, astrobj); if ((*ao)->kind().compare("FixedStar")) y_error("Expecting Astrobj of kind Star"); ygyoto_FixedStar_eval(ao, argc); } } Gyoto-1.2.0/yorick/stdplug/gyoto_KerrBL.C000066400000000000000000000066401302352257300202530ustar00rootroot00000000000000/* Copyright 2011, 2014 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include #include "ygyoto.h" #include "ygyoto_idx.h" #include "yapi.h" #include #include using namespace std; using namespace Gyoto; using namespace YGyoto; using namespace Gyoto::Metric; void ygyoto_KerrBL_eval(SmartPointer *OBJ_, int argc) { static char const * knames[]={ "unit", "spin", "difftol", "deltamaxoverr", "makecoord", "gmunu_up", \ YGYOTO_METRIC_GENERIC_KW, 0 }; YGYOTO_WORKER_INIT(Metric, KerrBL, knames, YGYOTO_METRIC_GENERIC_KW_N+6); YGYOTO_WORKER_SET_UNIT; YGYOTO_WORKER_GETSET_DOUBLE2(spin); YGYOTO_WORKER_GETSET_DOUBLE2(difftol); YGYOTO_WORKER_GETSET_DOUBLE2(deltaMaxOverR); if (kiargs[++k]>=0) { // makecoord if (debug()) cerr << "DEBUG: In ygyoto_KerrBL_eval(): get_coord" << endl; if ((*rvset)++) y_error(rmsg); if ((*paUsed)++) y_error(pmsg); long dims[]={1,8}; long ntot=1; double * coord_=ygeta_d(kiargs[k],&ntot,0); if (ntot<7) y_error("YINIT should have >= 7 elements"); double * cst_=ygeta_d(piargs[0],&ntot,0); if (ntot!=4) y_error("CST should have 4 elements"); yarg_drop(1); double * coord=ypush_d(dims); # ifdef GYOTO_DEBUG_ENABLED GYOTO_DEBUG_EXPR(OBJ); # endif (*OBJ)->MakeCoord(coord_,cst_,coord); } // GMUNU_UP if ((iarg=kiargs[++k])>=0) { if ((*rvset)++) y_error(rmsg); if ((*paUsed)++) y_error(pmsg); GYOTO_DEBUG << "getting gmunu_up\n"; long ntot, dims[Y_DIMSIZE]; double *x = ygeta_d(iarg, &ntot, NULL); if (ntot<4) y_error("X must have at least four elements"); Idx i_idx (piargs[0], 4); if (i_idx.isNuller()) return; Idx j_idx (piargs[1], 4); if (j_idx.isNuller()) return; long ni=i_idx.getNElements(); long nj=j_idx.getNElements(); dims[0]=i_idx.getNDims()+j_idx.getNDims(); size_t offset=0; if (i_idx.getNDims()) dims[++offset]=ni; if (j_idx.getNDims()) dims[++offset]=nj; double * data=ypush_d(dims); if (dims[0]==2 && dims[1]==4 && dims[2]==4) { double dst[4][4]; (*OBJ)->gmunu_up(dst, x); memcpy(data, &dst[0][0], 4*4*sizeof(double)); } else { size_t i, j; for ( j=j_idx.first() ; j_idx.valid() ; j=j_idx.next() ) for ( i=i_idx.first() ; i_idx.valid() ; i=i_idx.next() ) *(data++) = (*OBJ)->gmunu_up(x, i-1, j-1); } } YGYOTO_WORKER_CALL_GENERIC(Metric); } extern "C" { void Y__gyoto_KerrBL_register_as_Metric(){ ygyoto_Metric_register("KerrBL",&ygyoto_KerrBL_eval); } void Y_gyoto_KerrBL(int argc) { YGYOTO_CONSTRUCTOR_INIT2(Metric, Metric::Generic, KerrBL, metric); if ((*OBJ)->kind() != "KerrBL") y_error("Expecting Metric of kind KerrBL"); ygyoto_KerrBL_eval(OBJ, argc); } } Gyoto-1.2.0/yorick/stdplug/gyoto_KerrKS.C000066400000000000000000000100241302352257300202620ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include #include "ygyoto.h" #include "ygyoto_idx.h" #include "yapi.h" #include #include using namespace std; using namespace Gyoto; using namespace YGyoto; using namespace Gyoto::Metric; #define OBJ gg void ygyoto_KerrKS_eval(SmartPointer *gg_, int argc) { static char const * knames[]={ "unit", "spin", "horizonsecurity", "gmunu_up", "jacobian", YGYOTO_METRIC_GENERIC_KW, 0 }; YGYOTO_WORKER_INIT(Metric, KerrKS, knames, YGYOTO_METRIC_GENERIC_KW_N+5); YGYOTO_WORKER_SET_UNIT; YGYOTO_WORKER_GETSET_DOUBLE2(spin); YGYOTO_WORKER_GETSET_DOUBLE2(horizonSecurity); // GMUNU_UP if ((iarg=kiargs[++k])>=0) { if ((*rvset)++) y_error(rmsg); if ((*paUsed)++) y_error(pmsg); GYOTO_DEBUG << "getting gmunu_up\n"; long ntot, dims[Y_DIMSIZE]; double *x = ygeta_d(iarg, &ntot, NULL); if (ntot<4) y_error("X must have at least four elements"); Idx i_idx (piargs[0], 4); if (i_idx.isNuller()) return; Idx j_idx (piargs[1], 4); if (j_idx.isNuller()) return; long ni=i_idx.getNElements(); long nj=j_idx.getNElements(); dims[0]=i_idx.getNDims()+j_idx.getNDims(); size_t offset=0; if (i_idx.getNDims()) dims[++offset]=ni; if (j_idx.getNDims()) dims[++offset]=nj; double * data=ypush_d(dims); double dst[4][4]; (*OBJ)->gmunu_up(dst, x); if (dims[0]==2 && dims[1]==4 && dims[2]==4) { memcpy(data, &dst[0][0], 4*4*sizeof(double)); } else { size_t i, j; for ( j=j_idx.first() ; j_idx.valid() ; j=j_idx.next() ) for ( i=i_idx.first() ; i_idx.valid() ; i=i_idx.next() ) *(data++) = dst[i-1][j-1]; } } // JACOBIAN if ((iarg=kiargs[++k])>=0) { if ((*rvset)++) y_error(rmsg); if ((*paUsed)++) y_error(pmsg); GYOTO_DEBUG << "getting jacobian\n"; long ntot, dims[Y_DIMSIZE]; double *x = ygeta_d(iarg, &ntot, NULL); if (ntot<4) y_error("X must have at least four elements"); Idx i_idx (piargs[0], 4); if (i_idx.isNuller()) return; Idx j_idx (piargs[1], 4); if (j_idx.isNuller()) return; Idx a_idx (piargs[2], 4); if (a_idx.isNuller()) return; long ni=i_idx.getNElements(); long nj=j_idx.getNElements(); long na=a_idx.getNElements(); dims[0]=i_idx.getNDims()+j_idx.getNDims()+a_idx.getNDims(); size_t offset=0; if (i_idx.getNDims()) dims[++offset]=ni; if (j_idx.getNDims()) dims[++offset]=nj; if (a_idx.getNDims()) dims[++offset]=na; double * data=ypush_d(dims); double dst[4][4][4]; (*OBJ)->jacobian(dst, x); if (dims[0]==3 && dims[1]==4 && dims[2]==4 && dims[3]==4) { memcpy(data, &dst[0][0][0], 4*4*4*sizeof(double)); } else { size_t i, j, a; for ( a=a_idx.first() ; a_idx.valid() ; a=a_idx.next() ) for ( j=j_idx.first() ; j_idx.valid() ; j=j_idx.next() ) for ( i=i_idx.first() ; i_idx.valid() ; i=i_idx.next() ) *(data++) = dst[a-1][i-1][j-1]; } } YGYOTO_WORKER_CALL_GENERIC(Metric); } extern "C" { void Y__gyoto_KerrKS_register_as_Metric(){ ygyoto_Metric_register("KerrKS",&ygyoto_KerrKS_eval); } void Y_gyoto_KerrKS(int argc) { YGYOTO_CONSTRUCTOR_INIT2(Metric, Metric::Generic, KerrKS, metric); if ((*OBJ)->kind() != "KerrKS") y_error("Expecting Metric of kind KerrKS"); ygyoto_KerrKS_eval(gg, argc); } } Gyoto-1.2.0/yorick/stdplug/gyoto_PatternDisk.C000066400000000000000000000132261302352257300213600ustar00rootroot00000000000000/* Copyright 2011-2014, 2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include #include "../ygyoto.h" #include "yapi.h" #include using namespace Gyoto; using namespace Gyoto::Astrobj; #include using namespace std; // on_eval worker void ygyoto_PatternDisk_eval(SmartPointer *OBJ_, int argc) { static char const * knames[]={ "unit", #ifdef GYOTO_USE_CFITSIO "fitsread", #endif "patternvelocity", "repeatphi", "nu0", "dnu", "phimin", "phimax", "copyintensity", "copyopacity", "copyvelocity", "copygridradius", #ifdef GYOTO_USE_CFITSIO "fitswrite", #endif YGYOTO_THINDISK_GENERIC_KW, 0 }; #ifdef GYOTO_USE_CFITSIO #define NKW 13 #else #define NKW 11 #endif YGYOTO_WORKER_INIT(Astrobj, PatternDisk, knames, YGYOTO_THINDISK_GENERIC_KW_N+NKW); YGYOTO_WORKER_SET_UNIT; #ifdef GYOTO_USE_CFITSIO YGYOTO_WORKER_RUN( fitsRead(ygets_q(iarg)) ); #endif YGYOTO_WORKER_GETSET_DOUBLE2(patternVelocity); YGYOTO_WORKER_GETSET_LONG2(repeatPhi); YGYOTO_WORKER_GETSET_DOUBLE2(nu0); YGYOTO_WORKER_GETSET_DOUBLE2(dnu); YGYOTO_WORKER_GETSET_DOUBLE2(phimin); YGYOTO_WORKER_GETSET_DOUBLE2(phimax); /* INTENSITY */ if ((iarg=kiargs[++k])>=0) { GYOTO_DEBUG << "copyintensity=\n"; iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); size_t ddims[3]; (*OBJ) -> getIntensityNaxes(ddims); long dims[] = {3, long(ddims[0]), long(ddims[1]), long(ddims[2])}; double * out = ypush_d(dims); memcpy(out, (*OBJ)->getIntensity(), dims[1]*dims[2]*dims[3]*sizeof(double)); } else { long ntot; long dims[Y_DIMSIZE]; double const * const in = ygeta_d(iarg, &ntot, dims); if (dims[0]==0 && ntot && *in==0) (*OBJ) -> copyIntensity(NULL, 0); else if (dims[0]==3) { size_t ddims[] = {size_t(dims[1]), size_t(dims[2]), size_t(dims[3])}; (*OBJ)->copyIntensity(in, ddims); } else y_error("COPYINTENSITY must be nil, 0, or array(double, nnu, nphi, nr"); } } /* OPACITY */ if ((iarg=kiargs[++k])>=0) { GYOTO_DEBUG << "copyopacity=\n"; iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); size_t ddims[3]; (*OBJ) -> getIntensityNaxes(ddims); long dims[] = {3, long(ddims[0]), long(ddims[1]), long(ddims[2])}; double * out = ypush_d(dims); memcpy(out, (*OBJ)->opacity(), dims[1]*dims[2]*dims[3]*sizeof(double)); } else { long ntot; long dims[Y_DIMSIZE]; double const * const in = ygeta_d(iarg, &ntot, dims); if (dims[0]==0 && ntot && *in==0) (*OBJ) -> copyOpacity(NULL, 0); else if (dims[0]==3) { size_t ddims[] = {size_t(dims[1]), size_t(dims[2]), size_t(dims[3])}; (*OBJ)->copyOpacity(in, ddims); } else y_error("COPYOPACITY must be nil, 0, or array(double, nnu, nphi, nr"); } } if ((iarg=kiargs[++k])>=0) { GYOTO_DEBUG << "copyvelocity=\n"; iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); size_t ddims[3]; (*OBJ) -> getIntensityNaxes(ddims); long dims[] = {3, 2, long(ddims[1]), long(ddims[2])}; double * out = ypush_d(dims); memcpy(out, (*OBJ)->getVelocity(), 2*dims[2]*dims[3]*sizeof(double)); } else { long ntot; long dims[Y_DIMSIZE]; double const * const in = ygeta_d(iarg, &ntot, dims); if (dims[0]==0 && ntot && *in==0) (*OBJ) -> copyVelocity(NULL, 0); else if (dims[0]==3 && dims[1]==2) { size_t ddims[] = {size_t(dims[2]), size_t(dims[3])}; (*OBJ)->copyVelocity(in, ddims); } else y_error("COPYVELOCITY must be nil, 0, or array(double, 2, nphi, nr"); } } /* GRIDRADIUS */ if ((iarg=kiargs[++k])>=0) { GYOTO_DEBUG << "copygridradius=\n"; iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); double const * const radius = (*OBJ)->getGridRadius(); if (radius) { size_t ddims[3]; (*OBJ) -> getIntensityNaxes(ddims); long dims[] = {1, long(ddims[2])}; double * out = ypush_d(dims); memcpy(out, radius, ddims[2]*sizeof(double)); } else ypush_long(0); } else { long ntot; long dims[Y_DIMSIZE]; double const * const in = ygeta_d(iarg, &ntot, dims); if (dims[0]==0 && ntot && *in==0) (*OBJ) -> copyGridRadius(NULL, 0); else if (dims[0]==1) (*OBJ) -> copyGridRadius(in, ntot); else y_error("COPYGRIDRADIUS must be nil, 0, or array(double, nr"); } } #ifdef GYOTO_USE_CFITSIO YGYOTO_WORKER_RUN( fitsWrite(ygets_q(iarg)) ); #endif YGYOTO_WORKER_CALL_GENERIC(ThinDisk); } extern "C" { void Y__gyoto_PatternDisk_register_as_Astrobj(){ ygyoto_Astrobj_register("PatternDisk",&ygyoto_PatternDisk_eval); } // Generic constructor/accessor void Y_gyoto_PatternDisk(int argc) { YGYOTO_CONSTRUCTOR_INIT2(Astrobj, Astrobj::Generic, PatternDisk, astrobj); GYOTO_DEBUG << "object constructed" << endl; if ((*OBJ)->kind().compare("PatternDisk")) y_error("Expecting Astrobj of kind PatternDisk"); ygyoto_PatternDisk_eval(OBJ, argc); } } Gyoto-1.2.0/yorick/stdplug/gyoto_PolishDoughnut.C000066400000000000000000000045331302352257300221050ustar00rootroot00000000000000/* Copyright (c) 2012-2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "../ygyoto.h" #include "yapi.h" #include #ifdef GYOTO_USE_XERCES #include #endif #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; // on_eval worker void ygyoto_PolishDoughnut_eval(SmartPointer* OBJ_, int argc) { static char const * knames[]={ "unit", "lambda", "komissarov", "centraldensity", "centraltempovervirial", "beta", "spectraloversampling", "l0", "Wsurface", "Wcentre", "rcusp", "rcentre", YGYOTO_ASTROBJ_GENERIC_KW, 0 }; YGYOTO_WORKER_INIT(Astrobj, PolishDoughnut, knames, YGYOTO_ASTROBJ_GENERIC_KW_N+12); YGYOTO_WORKER_SET_UNIT; YGYOTO_WORKER_GETSET_DOUBLE2(lambda); YGYOTO_WORKER_GETSET_LONG2(komissarov); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(centralDensity); YGYOTO_WORKER_GETSET_DOUBLE2(centralTempOverVirial); YGYOTO_WORKER_GETSET_DOUBLE2(beta); YGYOTO_WORKER_GETSET_LONG2(spectralOversampling); YGYOTO_WORKER_GET_DOUBLE(getL0); YGYOTO_WORKER_GET_DOUBLE(getWsurface); YGYOTO_WORKER_GET_DOUBLE(getWcentre); YGYOTO_WORKER_GET_DOUBLE(getRcusp); YGYOTO_WORKER_GET_DOUBLE(getRcentre); YGYOTO_WORKER_CALL_GENERIC(Astrobj); } extern "C" { void Y__gyoto_PolishDoughnut_register_as_Astrobj(){ ygyoto_Astrobj_register("PolishDoughnut",&ygyoto_PolishDoughnut_eval); } // Generic constructor/accessor void Y_gyoto_PolishDoughnut(int argc) { YGYOTO_CONSTRUCTOR_INIT2(Astrobj, Astrobj::Generic, PolishDoughnut, astrobj); if ((*OBJ)->kind()!="PolishDoughnut") y_error("Expecting Astrobj of kind PolishDoughnut"); ygyoto_PolishDoughnut_eval(OBJ, argc); } } Gyoto-1.2.0/yorick/stdplug/gyoto_PowerLawSpectrum.C000066400000000000000000000035611302352257300224140ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "ygyoto.h" #include "yapi.h" #include #include "GyotoFactory.h" #include "GyotoPowerLawSpectrum.h" namespace YGyoto { namespace Spectrum { ygyoto_Spectrum_eval_worker_t PowerLawYEval; } } using namespace Gyoto; using namespace YGyoto; using namespace Gyoto::Spectrum; using namespace YGyoto::Spectrum; using namespace std; void YGyoto::Spectrum::PowerLawYEval(SmartPointer * OBJ_, int argc) { static char const * knames[]={ "unit", "constant", "exponent", YGYOTO_SPECTRUM_GENERIC_KW, 0 }; YGYOTO_WORKER_INIT(Spectrum, PowerLaw, knames, YGYOTO_SPECTRUM_GENERIC_KW_N+3); YGYOTO_WORKER_SET_UNIT; YGYOTO_WORKER_GETSET_DOUBLE2(constant); YGYOTO_WORKER_GETSET_DOUBLE2(exponent); YGYOTO_WORKER_CALL_GENERIC(Spectrum); } extern "C" { void Y_gyoto_PowerLawSpectrum(int argc) { YGYOTO_CONSTRUCTOR_INIT2(Spectrum, Gyoto::Spectrum::Generic, PowerLaw, spectrum); if ((*OBJ)->kind().compare("PowerLaw")) y_error("Expecting Spectrum of kind PowerLaw"); PowerLawYEval(OBJ, argc); } void Y__gyoto_PowerLawSpectrum_register_as_Metric(){ ygyoto_Spectrum_register("PowerLaw",&PowerLawYEval); } } Gyoto-1.2.0/yorick/stdplug/gyoto_Star.C000066400000000000000000000170351302352257300200430ustar00rootroot00000000000000/* Copyright 2011, 2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "../ygyoto.h" #include "yapi.h" #include "pstdlib.h" #include #include #ifdef GYOTO_USE_XERCES #include #endif #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; #define OBJ ao // on_eval worker void ygyoto_Star_eval(SmartPointer* ao_, int argc) { GYOTO_DEBUG << endl; // Define keywords static char const * knames[]={ "unit", "radius", "metric", "initcoord", "spectrum", "opacity", "delta", "adaptive", "deltamaxoverradius", "deltamaxoverdistance", "maxiter", "integrator", "deltamin", "deltamax", "deltamaxoverr", "abstol", "reltol", "reset", "xfill", YGYOTO_ASTROBJ_GENERIC_KW, "get_skypos", "get_txyz", "get_prime", "get_coord", "get_cartesian", "startrace", 0 }; YGYOTO_WORKER_INIT(Astrobj, Star, knames, YGYOTO_ASTROBJ_GENERIC_KW_N+25); YGYOTO_WORKER_SET_UNIT; YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(radius); YGYOTO_WORKER_GETSET_OBJECT2(metric,Metric); /* INITCOORD */ if ((iarg=kiargs[++k])>=0) { //initcoord iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); long dims[]= {1, 8}; double *coord = ypush_d(dims); (*ao)->getInitialCoord(coord); } else { long ptot=1, vtot=1; double *pos=ygeta_d(iarg, &ptot, 0); if (ptot<4) y_error("POS should have at least 4 elements"); int n; double coord[8]; for (n=0; n<4; ++n) coord[n]=pos[n]; double *v=NULL, tdot0; if (yarg_number(piargs[0]+*rvset)) { if ((*paUsed)++) y_error(pmsg); v=ygeta_d(piargs[0]+*rvset, &vtot, 0); if (vtot!=3) y_error("V should have 3 elements"); if (!(*ao)->metric()) y_error("Please set metric before setting initial condition"); tdot0=(*ao)->metric()->SysPrimeToTdot(pos, v); coord[4]=tdot0; for (n=0; n<3; ++n) coord[5+n]=v[n]*tdot0; } else if (ptot==8) { for (n=4; n<8; ++n) coord[n]=pos[n]; } else if (ptot==7) { v=pos+4; tdot0=(*ao)->metric()->SysPrimeToTdot(pos, v); coord[4]=tdot0; for (n=0; n<3; ++n) coord[5+n]=v[n]*tdot0; } else y_error("Not enough information to set initial condition"); (*ao)->setInitialCondition(coord); } } YGYOTO_WORKER_GETSET_OBJECT2(spectrum,Spectrum); YGYOTO_WORKER_GETSET_OBJECT2(opacity,Spectrum); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(delta); YGYOTO_WORKER_GETSET_LONG2(adaptive); YGYOTO_WORKER_GETSET_DOUBLE2(deltaMaxOverRadius); YGYOTO_WORKER_GETSET_DOUBLE2(deltaMaxOverDistance); YGYOTO_WORKER_GETSET_LONG2( maxiter ); YGYOTO_WORKER_GETSET_STRING2( integrator ); YGYOTO_WORKER_GETSET_DOUBLE2( deltaMin ); YGYOTO_WORKER_GETSET_DOUBLE2( Worldline::deltaMax ); YGYOTO_WORKER_GETSET_DOUBLE2( deltaMaxOverR ); YGYOTO_WORKER_GETSET_DOUBLE2( absTol ); YGYOTO_WORKER_GETSET_DOUBLE2( relTol ); YGYOTO_WORKER_RUN( reset() ); YGYOTO_WORKER_RUN( xFill(ygets_d(iarg+*rvset)) ); YGYOTO_WORKER_CALL_GENERIC(Astrobj); k += YGYOTO_ASTROBJ_GENERIC_KW_N; // SPECIFIC GET KEYWORDS if ((iarg=kiargs[++k])>=0) { // get skypos if ((*rvset)++) y_error(rmsg); if ((*paUsed)++) y_error(pmsg); if (!yarg_Screen(iarg)) y_error("Expecting gyoto_Screen argument"); SmartPointer *screen = yget_Screen(iarg); int nel =(*ao)->get_nelements(); long dims[] = {2, nel, 3}; double * data=ypush_d(dims); (*ao)->getSkyPos(*screen, data, data+nel, data+2*nel); } if ((iarg=kiargs[++k])>=0) { // get_txyz if ((*rvset)++) y_error(rmsg); int nel =(*ao)->get_nelements(); long dims[] = {2, nel, 4}; double * data=ypush_d(dims); (*ao)->get_t(data); (*ao)->get_xyz(data+nel, data+2*nel, data+3*nel); } if ((iarg=kiargs[++k])>=0) { // get_prime if ((*rvset)++) y_error(rmsg); int nel =(*ao)->get_nelements(); long dims[] = {2, nel, 3}; double * data=ypush_d(dims); (*ao)->get_prime(data, data+nel, data+2*nel); } if ((iarg=kiargs[++k])>=0) { // get_coord if ((*rvset)++) y_error(rmsg); // Two cases : get_coord=1 or get_coord=dates. // We will recognize the first case if the parameter is the // integer scalar 1, any other type or value is a date // specification. int argt = yarg_number(iarg); long ntot[1] = {1}; long dims[Y_DIMSIZE]; double* dates = NULL; double dummy[]= {1.}; if (yarg_nil(iarg)) { // void is same as 1 in this context argt=1; *ntot=1; dims[0]=0; dates=dummy; } else dates = ygeta_d(iarg, ntot, dims); if (debug()) cerr << "DEBUG: gyoto_Star(get_coord=array(" << (argt==1?"long":"double") << ", " << *ntot << ") (rank=" << dims[0] << ", dates[0]=" << dates[0] << ")" << endl; if (dims[0] == 0 && argt == 1 && dates[0] == 1) { if(debug()) cerr << "DEBUG: retrieving all already computed coordinates" << endl; int nel =(*ao)->get_nelements(); long ddims[] = {2, nel, 8}; double * data = ypush_d(ddims); (*ao)->getCoord(data, data+nel, data+2*nel, data+3*nel); (*ao)->get_dot(data+4*nel, data+5*nel, data+6*nel, data+7*nel); } else { if(debug()) cerr << "DEBUG: retrieving coordinates for specified date(s)"<< endl; if (dims[0] > Y_DIMSIZE-2) y_errorn("gyoto_Star(get_coord=dates): DATES must have at most %ld " "dimensions", Y_DIMSIZE-2); dims[0] += 1; dims[dims[0]] = 7; double * data = ypush_d(dims); size_t nel = *ntot; (*ao) -> getCoord(dates, nel, data, data+ nel,data+2* nel,data+3* nel, data+4* nel, data+5* nel, data+6* nel); } } if ((iarg=kiargs[++k])>=0) { // get_cartesian if ((*rvset)++) y_error(rmsg); long ntot[1] = {1}; long dims[Y_DIMSIZE]; double* dates = ygeta_d(iarg, ntot, dims); if(debug()) cerr << "DEBUG: gyoto_Star(get_cartesian=dates)"<< endl; if (dims[0] > Y_DIMSIZE-2) y_errorn("gyoto_Star(get_cartesian=dates): DATES must have at most %ld " "dimensions", Y_DIMSIZE-2); dims[0] += 1; dims[dims[0]] = 6; double * data = ypush_d(dims); size_t nel = *ntot; (*ao) -> getCartesian(dates, nel, data, data + nel, data + 2*nel, data + 3*nel, data + 4*nel, data + 5*nel); } /* STARTRACE */ if ((iarg=kiargs[++k])>=0) { if (*rvset) y_error(rmsg); if (*paUsed) y_error(pmsg); double tmin=ygets_d(iarg); double tmax=ygets_d(piargs[0]); ++(*rvset); ++(*paUsed); *ypush_Astrobj() = new StarTrace(**ao, tmin, tmax); } } extern "C" { void Y__gyoto_Star_register_as_Astrobj(){ ygyoto_Astrobj_register("Star",&ygyoto_Star_eval); } // Generic constructor/accessor void Y_gyoto_Star(int argc) { GYOTO_DEBUG << endl; YGYOTO_CONSTRUCTOR_INIT2(Astrobj, Astrobj::Generic, Star, astrobj); if ((*ao)->kind().compare("Star")) y_error("Expecting Astrobj of kind Star"); ygyoto_Star_eval(ao, argc); } } Gyoto-1.2.0/yorick/stdplug/gyoto_StarTrace.C000066400000000000000000000162001302352257300210130ustar00rootroot00000000000000/* Copyright 2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include "../ygyoto.h" #include "yapi.h" #include #ifdef GYOTO_USE_XERCES #include #endif #include #include using namespace std; using namespace Gyoto; using namespace Gyoto::Astrobj; #define OBJ ao // on_eval worker void ygyoto_StarTrace_eval(SmartPointer* ao_, int argc) { GYOTO_DEBUG << endl; // Define keywords static char const * knames[]={ "unit", "radius", "metric", "initcoord", "spectrum", "opacity", "delta", "adaptive", "deltamaxoverradius", "deltamaxoverdistance", "tmin", "tmax", "maxiter", "reset", "xfill", YGYOTO_ASTROBJ_GENERIC_KW, "get_skypos", "get_txyz", "get_prime", "get_coord", "get_cartesian", "star", 0 }; YGYOTO_WORKER_INIT(Astrobj, StarTrace, knames, YGYOTO_ASTROBJ_GENERIC_KW_N+21); YGYOTO_WORKER_SET_UNIT; YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(radius); YGYOTO_WORKER_GETSET_OBJECT2(metric,Metric); /* INITCOORD */ if ((iarg=kiargs[++k])>=0) { //initcoord iarg+=*rvset; if (yarg_nil(iarg)) { if ((*rvset)++) y_error(rmsg); long dims[]= {1, 8}; double *coord = ypush_d(dims); (*ao)->getInitialCoord(coord); } else { long ptot=1, vtot=1; double *pos=ygeta_d(iarg, &ptot, 0); if (ptot<4) y_error("POS should have at least 4 elements"); int n; double coord[8]; for (n=0; n<4; ++n) coord[n]=pos[n]; double *v=NULL, tdot0; if (yarg_number(piargs[0]+*rvset)) { if ((*paUsed)++) y_error(pmsg); v=ygeta_d(piargs[0]+*rvset, &vtot, 0); if (vtot!=3) y_error("V should have 3 elements"); if (!(*ao)->metric()) y_error("Please set metric before setting initial condition"); tdot0=(*ao)->metric()->SysPrimeToTdot(pos, v); coord[4]=tdot0; for (n=0; n<3; ++n) coord[5+n]=v[n]*tdot0; } else if (ptot==8) { for (n=4; n<8; ++n) coord[n]=pos[n]; } else if (ptot==7) { v=pos+4; tdot0=(*ao)->metric()->SysPrimeToTdot(pos, v); coord[4]=tdot0; for (n=0; n<3; ++n) coord[5+n]=v[n]*tdot0; } else y_error("Not enough information to set initial condition"); (*ao)->setInitialCondition(coord); } } YGYOTO_WORKER_GETSET_OBJECT2(spectrum,Spectrum); YGYOTO_WORKER_GETSET_OBJECT2(opacity,Spectrum); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(delta); YGYOTO_WORKER_GETSET_LONG2(adaptive); YGYOTO_WORKER_GETSET_DOUBLE2(deltaMaxOverRadius); YGYOTO_WORKER_GETSET_DOUBLE2(deltaMaxOverDistance); YGYOTO_WORKER_GETSET_DOUBLE2(TMin); YGYOTO_WORKER_GETSET_DOUBLE2(TMax); YGYOTO_WORKER_GETSET_LONG2( maxiter ); YGYOTO_WORKER_RUN( reset() ); YGYOTO_WORKER_RUN( xFill(ygets_d(iarg+*rvset)) ); YGYOTO_WORKER_CALL_GENERIC(Astrobj); k += YGYOTO_ASTROBJ_GENERIC_KW_N; // SPECIFIC GET KEYWORDS if ((iarg=kiargs[++k])>=0) { // get skypos if ((*rvset)++) y_error(rmsg); if ((*paUsed)++) y_error(pmsg); if (!yarg_Screen(iarg)) y_error("Expecting gyoto_Screen argument"); SmartPointer *screen = yget_Screen(iarg); int nel =(*ao)->get_nelements(); long dims[] = {2, nel, 3}; double * data=ypush_d(dims); (*ao)->getSkyPos(*screen, data, data+nel, data+2*nel); } if ((iarg=kiargs[++k])>=0) { // get_txyz if ((*rvset)++) y_error(rmsg); int nel =(*ao)->get_nelements(); long dims[] = {2, nel, 4}; double * data=ypush_d(dims); (*ao)->get_t(data); (*ao)->get_xyz(data+nel, data+2*nel, data+3*nel); } if ((iarg=kiargs[++k])>=0) { // get_prime if ((*rvset)++) y_error(rmsg); int nel =(*ao)->get_nelements(); long dims[] = {2, nel, 3}; double * data=ypush_d(dims); (*ao)->get_prime(data, data+nel, data+2*nel); } if ((iarg=kiargs[++k])>=0) { // get_coord if ((*rvset)++) y_error(rmsg); // Two cases : get_coord=1 or get_coord=dates. // We will recognize the first case if the parameter is the // integer scalar 1, any other type or value is a date // specification. int argt = yarg_number(iarg); long ntot[1] = {1}; long dims[Y_DIMSIZE]; double* dates = NULL; double dummy[]= {1.}; if (yarg_nil(iarg)) { // void is same as 1 in this context argt=1; *ntot=1; dims[0]=0; dates=dummy; } else dates = ygeta_d(iarg, ntot, dims); if (debug()) cerr << "DEBUG: gyoto_StarTrace(get_coord=array(" << (argt==1?"long":"double") << ", " << *ntot << ") (rank=" << dims[0] << ", dates[0]=" << dates[0] << ")" << endl; if (dims[0] == 0 && argt == 1 && dates[0] == 1) { if(debug()) cerr << "DEBUG: retrieving all already computed coordinates" << endl; int nel =(*ao)->get_nelements(); long ddims[] = {2, nel, 8}; double * data = ypush_d(ddims); (*ao)->getCoord(data, data+nel, data+2*nel, data+3*nel); (*ao)->get_dot(data+4*nel, data+5*nel, data+6*nel, data+7*nel); } else { if(debug()) cerr << "DEBUG: retrieving coordinates for specified date(s)"<< endl; if (dims[0] > Y_DIMSIZE-2) y_errorn("gyoto_StarTrace(get_coord=dates): DATES must have at most %ld " "dimensions", Y_DIMSIZE-2); dims[0] += 1; dims[dims[0]] = 7; double * data = ypush_d(dims); size_t nel = *ntot; (*ao) -> getCoord(dates, nel, data, data+ nel,data+2* nel,data+3* nel, data+4* nel, data+5* nel, data+6* nel); } } if ((iarg=kiargs[++k])>=0) { // get_cartesian if ((*rvset)++) y_error(rmsg); long ntot[1] = {1}; long dims[Y_DIMSIZE]; double* dates = ygeta_d(iarg, ntot, dims); if(debug()) cerr << "DEBUG: gyoto_StarTrace(get_cartesian=dates)"<< endl; if (dims[0] > Y_DIMSIZE-2) y_errorn("gyoto_StarTrace(get_cartesian=dates): DATES must have at most %ld " "dimensions", Y_DIMSIZE-2); dims[0] += 1; dims[dims[0]] = 6; double * data = ypush_d(dims); size_t nel = *ntot; (*ao) -> getCartesian(dates, nel, data, data + nel, data + 2*nel, data + 3*nel, data + 4*nel, data + 5*nel); } if ((iarg=kiargs[++k])>=0) { // star if ((*rvset)++) y_error(rmsg); *ypush_Astrobj() = new Star (**ao); } } extern "C" { void Y__gyoto_StarTrace_register_as_Astrobj(){ ygyoto_Astrobj_register("StarTrace",&ygyoto_StarTrace_eval); } // Generic constructor/accessor void Y_gyoto_StarTrace(int argc) { GYOTO_DEBUG << endl; YGYOTO_CONSTRUCTOR_INIT2(Astrobj, Astrobj::Generic, StarTrace, astrobj); if ((*ao)->kind().compare("StarTrace")) y_error("Expecting Astrobj of kind StarTrace"); ygyoto_StarTrace_eval(ao, argc); } } Gyoto-1.2.0/yorick/stdplug/gyoto_Torus.C000066400000000000000000000035321302352257300202430ustar00rootroot00000000000000/* Copyright 2011, 2013 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #include #include #include "../ygyoto.h" #include "yapi.h" using namespace Gyoto; using namespace Gyoto::Astrobj; #include using namespace std; // on_eval worker void ygyoto_Torus_eval(SmartPointer* OBJ_, int argc) { static char const * knames[]={ "unit", "largeradius", "smallradius", "spectrum", "opacity", YGYOTO_ASTROBJ_GENERIC_KW, 0 }; YGYOTO_WORKER_INIT(Astrobj, Torus, knames, YGYOTO_ASTROBJ_GENERIC_KW_N+5); YGYOTO_WORKER_SET_UNIT; YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(largeRadius); YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(smallRadius); YGYOTO_WORKER_GETSET_OBJECT2(spectrum,Spectrum); YGYOTO_WORKER_GETSET_OBJECT2(opacity,Spectrum); YGYOTO_WORKER_CALL_GENERIC(Astrobj); } extern "C" { void Y__gyoto_Torus_register_as_Astrobj(){ ygyoto_Astrobj_register("Torus",&ygyoto_Torus_eval); } // Generic constructor/accessor void Y_gyoto_Torus(int argc) { YGYOTO_CONSTRUCTOR_INIT2(Astrobj, Astrobj::Generic, Torus, astrobj); if ((*OBJ)->kind().compare("Torus")) y_error("Expecting Astrobj of kind Torus"); ygyoto_Torus_eval(OBJ, argc); } } Gyoto-1.2.0/yorick/stdplug/gyoto_std.i000066400000000000000000000535361302352257300200000ustar00rootroot00000000000000require, "gyoto.i"; gyoto_requirePlugin, "stdplug"; plug_in, "gyoto_std"; /* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ extern __set_GyotoStdPlugSupplier; /* xxDOCUMENT __set_GyotoStdPlugSupplier Retrieve the functions from gyoto.so. Using a plug-in from another plu-gin is not easy. */ __set_GyotoStdPlugSupplier, __gyoto_exportSupplier(); extern _gyoto_KerrBL_register_as_Metric; _gyoto_KerrBL_register_as_Metric; extern _gyoto_KerrKS_register_as_Metric; _gyoto_KerrKS_register_as_Metric; /* xDOCUMENT _gyoto_KerrBL_register_as_Metric should be called once so that gg(get_spin=1...) works. */ extern gyoto_KerrBL; extern gyoto_KerrKS; /* DOCUMENT gg = gyoto_KerrBL([filename,][members=values]) or gg = gyoto_KerrKS([filename,][members=values]) or gg, members=values or value = gg(member=) or coord = gg(makecoord=yinit, cst) // KerrBL only or coefs = gg(position, mu, nu) PURPOSE Instanciate and use a GYOTO KerrBL (for Kerr Boyer-Lindquist) or Kerr (for Kerr Kerr-Schild) Metric. For basics, first read "help, gyoto" and "help, gyoto_Metric". SPECIFIC MEMBER In addition to the generic Metric members, KerrBL and KerrKS metrics have a spin that can be set and retrieved as follows: gg, spin=value; value = gg(spin=) Furthermore, KerrBL has two numerical tuning parameters: difftol= and deltamaxoverr=. Low values yield more accurate results at the expanse of computing time. Investigating the MinDistance map of a FixedStar helps finding the right hyper parameter set for investingating an object at a given location and a given resolution. SPECIFIC METHOD In addition to the generic methods provided by gyoto_Metric, KerrBL metrics provide the following: coord=gg(get_coord=yinit, cst) get 8-coordinate (4-position & 4-velocity) COORD corresponding to the 6 coordinate (4-position & 2 momenta) YINIT and the 3 motion constants in CST. SEE ALSO: gyoto, gyoto_Metric */ gyoto_namespace, KerrKS=gyoto_KerrKS; gyoto_namespace, KerrBL=gyoto_KerrBL; /////////// STAR extern _gyoto_Star_register_as_Astrobj; _gyoto_Star_register_as_Astrobj /* xDOCUMENT _gyoto_Star_register_as_Astrobj To be called exactly once ins gyoto_Star.i */ extern gyoto_Star; /* DOCUMENT st = gyoto_Star([filename, ][members=values]) or st, [members=values] or value = st(member=) or st, xfill=tlim; or data = st(function_method=parameters) PURPOSE: Create and manipulate GYOTO Star objects. Stars are a specific kind of Gyoto Astrobj which move in the metric following time-like geodesics and are sort of spherical (although what "spherical" means is coordinate-system-dependent and purely geometrical). There are two uses for GYOTO Stars: - for computing the trajectory of a massive particle in the metric; - as the light source for ray-tracing. For basic concepts, see gyoto and gyoto_Astrobj. MEMBERS: In addition to the generic members described in gyoto_Astrobj, Stars have the following members (which can be set with "st, member=value" and retrieved with "value=st(member=)"): radius= the radius of the sperical star, in geometrical units; metric= the metric of which the Stars follows the geodesics; initcoord=[x0, x1, x2, x3], [dx1/dx0, dx2/dx0, dx3/dx0] or initcoord=[x0, x1, x2, x3, dx1/dx0, dx2/dx0, dx3/dx0] or initcoord=[x0, x1, x2, x3, x0dot, x1dot, x2dot, x3dot] initial position of velocity, requires metric to have been set previously; delta= integration step (initial if adaptive). adaptive= whether the integration uses adaptive step. maxiter= maximum number of iterations in integration. deltamaxoverradius, deltamaxoverdistance: numerical parameters integrator= "Legacy" | "runge_kutta_fehlberg78" | "runge_kutta_cash_karp54" |"runge_kutta_dopri5" | "runge_kutta_cash_karp54_classic" The integrator to use. deltamin=, deltamax=, deltamaxoverr=, abstol, reltol: numerical tuning parameters for the integrators other than Legacy (the tuning parameters for the Legacy integrator are set in the Metric object). You should normally need to tweak only abstol and reltol. If you find you need to change the others, try a higher order integrator, such as runge_kutta_fehlberg78. METHODS In addition to the generic Astrobj methods, stars provide the following: Subroutine-like (st, subroutine_keyword=parameters): reset=anything (e.g.: st, reset=; ) Forget the result of a previous integration (see XFILL below). xfill=tlim The orbit is computed between x0 (in INITCOORD) and tlim. XFILL requires INITIALCOOORD to have been set. It is not guaranteed that any of the computed dates is actually tlim, merely that the orbit is computed a least from T0 to TLIM. The result of the integretation is cached inside the star object and can be retrieved with the various get_* methods below. Beware that changing a parameter in the metric will ne be taken into account in the retrieved results. To start again the integration, do one of the following: st, metric=new_metric; st, initcoord=conditions; st, reset=; setparameter=name,string_value Function-like (retval=st(function_method=parameters)): startrace=tmin, tmax : make a StarTrace object. See gyoto_StarTrace. The following return the position of the star for all the dates that where evaluated by the integrated when XFILL, above, was called, in various coordinate systems: get_skypos=screen Retrieve RA, Dec and depth data = st(get_skypos=screen); da=data(,1), dd=data(,2), dD=data(,3); SCREEN is a gyoto_Screen; da, dd and dD are the offsets from the center of the Metric in RA, Dec and along the line-of-sight. get_txyz=anything Retrieve Cartesian coordinates data = st(get_txyz=); t=data(,1), x=data(,2), y=data(,3), z=data(,4); ANYTHING can be anything, including nil. get_coord= Retrieve 8-coordinates (in Metric-prefered coord system) data = st(get_coord=); data(i, )=[t_i, x1_i, x2_i, x3_i, x0dot_i, x1dot_i, x2dot_i, x3dot_i] get_prime= Retrieve 3-velocity coordinates (in Metric-prefered coord system) data = st(get_prime=); data(i, )=[x1dot_i/x0dot_i, x2dot_i/x0dot_i, x3dot_i/x0dot_i] The following retrieve coordinates for specific dates. There is some interpolation involved which is done rather precisely. DATES is a scalar double or an array of doubles of any shape. All the output sub-arrays DATA(..,i) are conformable with DATES: get_coord=dates Retrieve 7 coordinates: data = star (get_coord=dates); STAR is a Star and DATES is an array of double with N elements. DATA will be an array of Nx7 elements where each of the 7 subarrays DATA(,i) is conformable with DATES. In the following, i is the index in the usual physical notation (X0 = time): X0 = DATES for i in {1, 2, 3}, Xi = DATA(..,i); for i in {0, 1, 2, 3} Xidot = DATA(..,i+4). get_cartesian=dates Retrieve 6-coordinates: data = star (get_cartesian=dates); STAR is a Star and DATES is an array of double with N elements. DATA will be an array of Nx6 elements where each of the 7 subarrays DATA(,i) is conformable with DATES. X = DATA(..,1); Y = DATA(..,2); Z = DATA(..,3); dX/dt = DATA(..,4); dY/dt = DATA(..,5); dZ/dt = DATA(..,6); EXAMPLE: data = gyoto_Star(get_txyz=1, initialpos=pos, v, xfill=tlim, metric=gyoto_KerrBL(spin=a)); SEE ALSO: gyoto_Metric, gyoto_Kerr, gyoto_StarTrace */ gyoto_namespace, Star=gyoto_Star; /////////// STARTRACE extern _gyoto_StarTrace_register_as_Astrobj; _gyoto_StarTrace_register_as_Astrobj /* xDOCUMENT _gyoto_StarTrace_register_as_Astrobj To be called exactly once ins gyoto_std.i */ extern gyoto_StarTrace; /* DOCUMENT st = gyoto_StarTrace([filename, ][members=values]) A StarTrace is like a Star that is at all time ubiquitous on its orbit. This allows efficiently precomputing a mask for ray-tracing many images of the star on its orbit. A StarTrace accepts all the same keywords as a Star, except the STARTRACE keyword itself. StarTrace accepts the STAR keyword instead to retrieve the underlying Star object. EXAMPLE: sc = gyoto_Scenery("file.xml"); star = sc.astrobj; startrace = star(startrace=0, 100); startrace, adaptive=0, opticallythin=0, delta=1; sc, astrobj=startrace; mask = sc(,,"Intensity"); noop, sc.screen(mask=mask); sc, astrobj=star; image = sc(,,); SEE ALSO: gyoto, gyoto_Star */ gyoto_namespace, StarTrace=gyoto_StarTrace; ///////// FIXEDSTAR extern _gyoto_FixedStar_register_as_Astrobj; _gyoto_FixedStar_register_as_Astrobj; extern gyoto_FixedStar; /* DOCUMENT fs = gyoto_FixedStar([filename, ][members=values]) fs, members=values; retval = fs(member=) fs, xmlwrite=filename; A GYOTO astrophysicla object: a non-moving, coordinate-spherical blob. See GYOTO for basic concepts. This star is fixed in the coordinate system with 3D position POS3D, for any time. The time coordinate is missing in POS3D. RADIUS is the stars radius. MEMBER KEYWORDS: Members can be set with "fs, member=val" or retrieved with "relval=fs(member=)" where member is one of: metric= any GYOTO Metric object position= 3D position of the star radius= radius of the star, in geometrical units deltamaxoverradius, deltamaxoverdistance: numerical parameters In addition, the standard gyoto_Astrobj members and methods are supported. SEE ALSO: gyoto, gyoto_Astrobj, gyoto_Metric */ gyoto_namespace, FixedStar=gyoto_FixedStar; //// TORUS extern _gyoto_Torus_register_as_Astrobj; _gyoto_Torus_register_as_Astrobj; extern gyoto_Torus; /* DOCUMENT torus = gyoto_Torus([filename, ][members=values]); torus, members=values; or value = torus(member=); or torus, xmlwrite=filename A simple Torus for use with GYOTO. See "help, gyoto" for basics. The Torus is in solid rotation at the circular velocity along the circle of diameter LARGERADIUS. SMALLRADIUS is the radius of a vertical cross-section. Torus emission is set using SPECTRUM and OPACITY. MEMBERS: largeradius, smallradius, spectrum, opacity SEE ALSO: gyoto, gyoto_Astrobj, gyoto_Star, gyoto_Spectrum */ gyoto_namespace, Torus=gyoto_Torus; //// PATTERNDISK extern _gyoto_PatternDisk_register_as_Astrobj; _gyoto_PatternDisk_register_as_Astrobj; extern gyoto_PatternDisk; /* DOCUMENT disk = gyotoPatternDisk(...) disk, member=value... This is a subkind of gyoto_ThinDisk. The disk is "painted" with a pattern, hence the name. The grid for the pattern is set by three numbers: NPHI (number of grid points in the azimuthal direction), REPEATPHI if the pattern must be repeated several times in the azimuthal direction (i.e. if the angular periodicity of the pattern is a fraction of 2*pi), and NR (number of grid points in the radial direction). The disk extends from INNERRADIUS to OUTERRADIUS (see gyoto_ThinDisk) with a regular spacing along the radial direction, unless RADIUS is specified. The pattern is specified by the surface brightness EMISSION==Jnu at NNU frequencies going from NU0 to NU0*DNU*(NNU-1). The cube EMISSION is an array(double, NNU, NPHI, NR). An optional OPACITY cube with the same dimensions as EMISSION can be provided. This allows using PatternDisk for any solid object confined in the equatorial plane and orbiting the central object in circular motion. By default, the fluid is supposed to be corotating at the local circular velocity, but the fluid velocity field can be specified with VELOCITY==array(double, 2, NPHI, NR). VELOCITY(1,..)==dphi/dt; VELOCITY(2,..)==dr/dt. The fluid VELOCITY field must not be mistaken by the apparent pattern velocity. The pattern is is solid (apparent) rotation at angular velocity PATTERNVELOCITY. KEYWORDS: fitsread="filename.fits" read pattern from FITS file. fitswrite="filename.fits" write pattern to FITS file. patternvelocity=double(value) set (or get) pattern angular velocity. repeatphi=N the pattern angular periodicity is 2*pi/N. nu0= first frequency (Hz) dnu= frequencty spacing (Hz) copyintensity=EMISSION * if EMISSION is nil, retrieve the surface brightness cube; * if EMISSION==0, free the cube; * if EMISSION is an array of NNU x NPHI x NR doubles, attach (copy) this array into DISK as the surface brightness cube. If this cube doesn't have the same dimensions as the previously set one, the velocity and radius arrays will also be freed (as they have inconsistent dimensions). copyopacity=OPACITY same as above for the opacity cube. copyvelocity=VELOCITY same as COPYINTENSITY but to attach the fluid velocity field, a 2 x NPHI x NR array where VELOCITY(1,..)==dphi/dt and VELOCITY(2,..)==dr/dt. copygridradius=RADIUS same as above, but RADIUS is a NR element vector specifying the R coordinate of the grid points. If RADIUS is not attached (if set, it can be detached with copygridradius=0), the grid points are regularly spaced between INNERRADIUS and OUTERRADIUS (see gyoto_ThinDisk). SEE ALSO: gyoto_Astrobj, gyoto_ThinDisk */ gyoto_namespace, PatternDisk=gyoto_PatternDisk; //// DIRECTIONAL DISK extern _gyoto_DirectionalDisk_register_as_Astrobj; _gyoto_DirectionalDisk_register_as_Astrobj; extern gyoto_DirectionalDisk; /* DOCUMENT disk = gyotoDirectionalDisk(...) disk, member=value... This is a subkind of gyoto_ThinDisk. The disk is 2D with emitted intensity depending only on the coordinate radius and on the direction of emission cos(i), where i is the angle between the direction of emission and the local normal. Intensity is given in an array EMISSION, array(double, NNU, NI, NR), with NNU the number of emitted frequencies, NI the number of direction cosines, NR the number of radii. The radii and direction cosine must be supplied in RADIUS and COSI. KEYWORDS: fitsread="filename.fits" read pattern from FITS file. fitswrite="filename.fits" write pattern to FITS file. copyintensity=EMISSION * if EMISSION is nil, retrieve the surface brightness cube; * if EMISSION==0, free the cube; * if EMISSION is an array of NNU x NPHI x NR doubles, attach (copy) this array into DISK as the surface brightness cube. If this cube doesn't have the same dimensions as the previously set one, the velocity and radius arrays will also be freed (as they have inconsistent dimensions). copygridfreq=FREQ a NNU element vector containing the frequencies of emission copygridcosi=COSI a NI element vector containing the direction cosine copygridradius=RADIUS a NR element vector specifying the R coordinate of the grid points SEE ALSO: gyoto_PatternDisk */ gyoto_namespace, DirectionalDisk=gyoto_DirectionalDisk; //// DISK3D extern _gyoto_Disk3D_register_as_Astrobj; _gyoto_Disk3D_register_as_Astrobj; extern gyoto_Disk3D; /* DOCUMENT disk = gyoto_Disk3D(...) disk, member=value... Geometrically thick disk. The grid for the pattern is set by 4 numbers: NPHI (number of grid points in the azimuthal direction), REPEATPHI if the pattern must be repeated several times in the azimuthal direction (i.e. if the angular periodicity of the pattern is a fraction of 2*pi), NZ (number of grid points in the vertical direction), and NR (number of grid points in the radial direction). The disk extends from RIN to ROUT with a regular spacing along all directions. The pattern is specified by the surface brightness which can be computed from EMISSQUANT which is typically the temperature at NNU frequencies going from NU0 to NU0*DNU*(NNU-1). The cube EMISSQUANT is an array(double, NNU, NPHI, NZ, NR). Optional opacity field may be provided, with same dimensions as emissquant. The fluid velocity field must be specified with VELOCITY==array(double, 3, NPHI, NZ, NR). VELOCITY(1,..)==dphi/dt; VELOCITY(2,..)==dz/dt; VELOCITY(3,..)==dr/dt. KEYWORDS: fitsread="filename.fits" read pattern from FITS file. fitswrite="filename.fits" write pattern to FITS file. repeatphi=N the pattern angular periodicity is 2*pi/N. nu0= first frequency (Hz) dnu= frequencty spacing (Hz) rin= inner radius rout= outer radius zmin= smallest z value (if >=0 then the disk is assumed to be symmetric by z->-z transformation) zmax= biggest z value copyemissquant=EMISSQUANT * if EMISSQUANT is nil, retrieve the cube; * if EMISSQUANT==0, free the cube; * if EMISSQUANT is an array of NNU x NPHI x NZ x NR doubles, attach (copy) this array into DISK. If this cube doesn't have the same dimensions as the previously set one, the velocity array will also be freed (as it has inconsistent dimensions). copyopacity=OPACITY same as COPYEMISSQUANT for opacity field. copyvelocity=VELOCITY same as COPYEMISSQUANT but to attach the fluid velocity field, a 3 x NPHI x NZ x NR array where VELOCITY(1,..)==dphi/dt, VELOCITY(2,..)==dz/dt and VELOCITY(3,..)==dr/dt SEE ALSO: gyoto_Astrobj, gyoto_PatternDisk */ gyoto_namespace, Disk3D=gyoto_Disk3D; //// POLISHDOUGHNUT extern _gyoto_PolishDoughnut_register_as_Astrobj; _gyoto_PolishDoughnut_register_as_Astrobj; /* xDOCUMENT _gyoto__register_as_Astrobj To be called exactly once in gyoto_.i */ extern gyoto_PolishDoughnut; /* DOCUMENT pd = gyoto_PolishDoughnut([filename, ][members=values]) or pd, members=values or value = pd(member=) PURPOSE: Create and manipulate GYOTO PolishDoughnut objects. PolishDoughnuts are toroidal accretion structures in KerrBL metric. They can be optically thin or optically thick and the spectrum can be computed. For basic syntax, see "help, gyoto" and "help, gyoto_Astrobj". MEMBERS: In addition to those listed in "help, gyoto_Astrobj": lambda= (a double) the lambda parameter tempratio, centraldensity, centraltempovervirial, beta metric= a gyoto_Metric object (KerrBL only) METHODS: Some characteristic values can be retrieved with value=pd(keyword=): l0, Wsurface, Wcentre, rcusp, rcentre SEE ALSO: gyoto, gyoto_Astrobj, gyoto_KerrBL */ gyoto_namespace, PolishDoughnut=gyoto_PolishDoughnut; /////// SPECTRUM KIND /////// /* PowerLaw */ extern gyoto_PowerLawSpectrum; /* DOCUMENT spectrum = gyoto_PowerLawSpectrum([filename, ][members=values]); spectrum, members=values; value = spectrum(member=); Inu = spectrum(nu) SEE ALSO: gyoto, gyoto_Spectrum */ gyoto_namespace, PowerLawSpectrum=gyoto_PowerLawSpectrum; extern _gyoto_PowerLawSpectrum_register_as_Metric; _gyoto_PowerLawSpectrum_register_as_Metric; /* BlackBody */ extern gyoto_BlackBodySpectrum; /* DOCUMENT spectrum = gyoto_BlackBodySpectrum([filename, ][members=values]); spectrum, members=values; value = spectrum(member=); Inu = spectrum(nu) SEE ALSO: gyoto, gyoto_Spectrum */ gyoto_namespace, BlackBodySpectrum=gyoto_BlackBodySpectrum; extern _gyoto_BlackBodySpectrum_register_as_Metric; _gyoto_BlackBodySpectrum_register_as_Metric; Gyoto-1.2.0/yorick/ygyoto.h000066400000000000000000000620011302352257300156170ustar00rootroot00000000000000/* Copyright 2011-2015 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __YGYOTO_H #define __YGYOTO_H #include "GyotoConfig.h" #include "GyotoMetric.h" #include "GyotoAstrobj.h" #include "GyotoThinDisk.h" #include "GyotoSpectrum.h" #include "GyotoScreen.h" #include "GyotoPhoton.h" #include "GyotoScenery.h" #include "GyotoScreen.h" #include #include #define YGYOTO_TYPE_LEN 21 #define YGYOTO_STD_CATCH catch(Gyoto::Error e) \ { y_error(e.get_message().c_str()); } #define YGYOTO_MAX_REGISTERED 20 typedef void ygyoto_Metric_eval_worker_t(Gyoto::SmartPointer*, int); typedef void ygyoto_Astrobj_eval_worker_t(Gyoto::SmartPointer*, int); typedef void ygyoto_Spectrum_eval_worker_t(Gyoto::SmartPointer*,\ int); typedef void ygyoto_Spectrometer_eval_worker_t(Gyoto::SmartPointer*, int); #ifndef YGYOTO_LOCAL_SUPPLIER /* To push or get a Gyoto Object or to check if iarg is a Gyoto object of a given type, use the following wrappers around the YAPI functions ypush_obj() and yget_obj(). yarg_OBJTYPE return 1 if iarg is an object of that type. */ Gyoto::SmartPointer *yget_Metric(int iarg); Gyoto::SmartPointer *ypush_Metric(); int yarg_Metric(int iarg); Gyoto::SmartPointer* yget_Astrobj(int iarg); Gyoto::SmartPointer* ypush_Astrobj(); int yarg_Astrobj(int iarg); Gyoto::SmartPointer* yget_Screen(int iarg); Gyoto::SmartPointer* ypush_Screen(); int yarg_Screen(int iarg); Gyoto::SmartPointer* yget_Photon(int iarg); Gyoto::SmartPointer* ypush_Photon(); int yarg_Photon(int iarg) ; Gyoto::SmartPointer* yget_Scenery(int iarg); Gyoto::SmartPointer* ypush_Scenery(); int yarg_Scenery(int iarg); Gyoto::SmartPointer* yget_Screen(int iarg); Gyoto::SmartPointer* ypush_Screen(); int yarg_Screen(int iarg); Gyoto::SmartPointer* yget_Spectrum(int iarg); Gyoto::SmartPointer* ypush_Spectrum(); int yarg_Spectrum(int iarg); Gyoto::SmartPointer* yget_Spectrometer(int iarg); Gyoto::SmartPointer* ypush_Spectrometer(); int yarg_Spectrometer(int iarg); void ypush_property(Gyoto::SmartPointer, Gyoto::Property const&, std::string, std::string); void yget_property(Gyoto::SmartPointer, Gyoto::Property const&, int, std::string, std::string); /* You can register your own on_eval worker. It will be called when a Metric object GG_OBJ of your specific kind is called as gg_obj(arguments). (Resp. Astrobj.) In your own routins, you can also call the generic eval (and you certainly should, it's the one that processes the generic keywords below). The generic Metric on eval must be called at the end of your specific on eval because it will try to return the metric coefficients if no other outpur value has been pushed. */ void ygyoto_Metric_register(char const * const kind, ygyoto_Metric_eval_worker_t* on_eval); void ygyoto_Metric_generic_eval(Gyoto::SmartPointer*, int *kiargs, int *piargs, int *rvset, int *paUsed, char * unit); void ygyoto_Astrobj_register(char const * const kind, ygyoto_Astrobj_eval_worker_t* on_eval); void ygyoto_Astrobj_generic_eval(Gyoto::SmartPointer*, int *kiargs, int *piargs, int *rvset, int *paUsed, char * unit); void ygyoto_ThinDisk_generic_eval(Gyoto::SmartPointer*, int *kiargs, int *piargs, int *rvset, int *paUsed, char * unit); void ygyoto_Spectrum_register(char const * const kind, ygyoto_Spectrum_eval_worker_t*on_eval); void ygyoto_Spectrum_generic_eval (Gyoto::SmartPointer *, int *kiargs, int *piargs, int *rvset, int *paUsed, char *unit); void ygyoto_Spectrometer_register(char const * const kind, ygyoto_Spectrometer_eval_worker_t*on_eval); void ygyoto_Spectrometer_generic_eval (Gyoto::SmartPointer *, int *kiargs, int *piargs, int *rvset, int *paUsed, char * unit); #endif /* The generic on_eval will process these keywords. You need to have initiated the kiargs table. You should call the generic on_eval after processing your SET keywords and before processing your GET keywords. rvset and paUsed are input _and_ output. *rvset == 1 if a return value (ypush_*) is already defined, *rvset == 0 if not. Likewise, *paUsed means that (at least) one positional argument has already been used. Attempting to set the return value twice or to use a positional argument twice is to be considered an error condition. */ // Keywords processed by ygyoto_Metric_generic_eval #define YGYOTO_METRIC_GENERIC_KW "prime2tdot", \ "nullifycoord", "kind", "coordkind", "setparameter", "scalarprod", \ "mass", "deltamin", "deltamax", "keplerian", \ "unitlength", "circularvelocity", \ "christoffel", "xmlwrite", "clone", "help" // Number of those keywords #define YGYOTO_METRIC_GENERIC_KW_N 16 // Keywords processed by ygyoto_Astrobj_generic_eval #define YGYOTO_ASTROBJ_GENERIC_KW "metric", "rmax", "opticallythin", \ "xmlwrite", "kind", "setparameter", "clone", "help" // number of those keywords #define YGYOTO_ASTROBJ_GENERIC_KW_N 8 // Keywords processed by ygyoto_ThinDisk_generic_eval #define YGYOTO_THINDISK_GENERIC_KW \ "innerradius", "outerradius", "thickness", "dir", \ YGYOTO_ASTROBJ_GENERIC_KW // number of those keywords #define YGYOTO_THINDISK_GENERIC_KW_N 4+YGYOTO_ASTROBJ_GENERIC_KW_N // maximum number of keywords accepted by a base Astrobj class #define YGYOTO_ASTROBJ_BASE_MAX_KW_N YGYOTO_THINDISK_GENERIC_KW_N // Keywords processed by ygyoto_Spectrum_generic_eval #define YGYOTO_SPECTRUM_GENERIC_KW \ "xmlwrite", "kind", "setparameter", "clone", "help", "integrate" // number of those keywords #define YGYOTO_SPECTRUM_GENERIC_KW_N 6 // Keywords processed by ygyoto_Spectrometer_generic_eval #define YGYOTO_SPECTROMETER_GENERIC_KW \ "kind", "xmlwrite", "clone", "help", "nsamples", \ "setparameter", "channels", "midpoints", "widths" // number of those keywords #define YGYOTO_SPECTROMETER_GENERIC_KW_N 9 /* The following are neat for writing workers. The worker needs to abide by my unwritten coding style. Assume MyKind is a subclass of MyBase. MyBase is one of Metric, Astrobj, Spectrum, Spectrometer. void ygyoto_MyKind_eval(SmartPointer* OBJ_, int argc) { // Define keywords static char const * knames[]={ "unit", "keyword1", "keyword2", ..., "keywordN", YGYOTO_MYBASE_GENERIC_KW, 0 }; // Parse arguments YGYOTO_WORKER_INIT(MyBase, MyKind, knames, YGYOTO_MYBASE_GENERIC_KW_N+N+1); // Read unit keyword YGYOTO_WORKER_SET_UNIT; // process individual keywords YGYOTO_WORKER_GETSET_DOUBLE_UNIT(Keyword1); ... YGYOTO_WORKER_GETSET...(KeywordN); // Call generic worker YGYOTO_WORKER_CALL_GENERIC(MyBase); } */ #define YGYOTO_STR1(X) #X #define YGYOTO_STR(X) YGYOTO_STR1(X) #define YGYOTO_CAT1(X, Y) X##Y #define YGYOTO_CAT(X, Y) YGYOTO_CAT1(X,Y) #ifdef GYOTO_USE_XERCES # define YGYOTO_CONSTRUCTOR_INIT2_XML(BASENAME, GETTER) \ char * fname = ygets_q(argc-1); \ OBJ = ypush_##BASENAME(); \ GYOTO_DEBUG_EXPR(OBJ); \ * OBJ = Gyoto::Factory(fname).GETTER(); \ GYOTO_DEBUG << "Swapping object for filename\n"; \ yarg_swap(0, argc); \ GYOTO_DEBUG << "Dropping filename from stack\n"; \ yarg_drop(1); \ GYOTO_DEBUG << "Dropped filename from stack\n"; \ --argc; #else # define YGYOTO_CONSTRUCTOR_INIT2_XML(BASENAME, GETTER) \ y_error("this gyoto was built without XML support"); #endif #define YGYOTO_CONSTRUCTOR_INIT2(BASENAME, BASECLASS, DERIVEDCLASS, GETTER)\ Gyoto::SmartPointer *OBJ = NULL; \ if (yarg_##BASENAME(argc-1)) { \ OBJ = yget_##BASENAME(--argc); \ GYOTO_DEBUG_EXPR(OBJ); \ } else if (yarg_string(argc-1)) { \ YGYOTO_CONSTRUCTOR_INIT2_XML(BASENAME, GETTER); \ } else { \ OBJ = ypush_##BASENAME(); \ GYOTO_DEBUG_EXPR(OBJ); \ *OBJ = new DERIVEDCLASS(); \ GYOTO_DEBUG << "object created" << endl; \ for (int arg=0; arg 0 ) && \ ( (kidx=yarg_key(argc-1)) >=0 ) && \ ( (prop=(*YGYOTO_CAT(OBJ, _)) \ ->property(pname=yfind_name(kidx)))) ) { \ if ( (kidx=yarg_key(argc-3)) >=0 && \ !strcmp(yfind_name(kidx),"unit") ) { \ unit=ygets_q(argc-4); \ unit_found=true; \ } else { \ unit_found=false; \ unit=""; \ } \ if (yarg_nil(argc-2)) { \ if (prop_pushed) y_error("Can push only one return value"); \ prop_pushed=true; \ yarg_drop(1); \ ypush_property(*YGYOTO_CAT(OBJ, _), *prop, pname, unit); \ } \ else yget_property(*YGYOTO_CAT(OBJ, _), *prop, argc-2, pname, unit); \ argc -= unit_found?4:2; \ } \ if (prop_pushed) ++*rvset; \ --argc; \ } \ Gyoto::SmartPointer *OBJ = \ (Gyoto::SmartPointer *)YGYOTO_CAT(OBJ, _); \ static long kglobs[NKW+1]; \ int kiargs[NKW]; \ int piargs[]={-1,-1,-1,-1,-1}; \ yarg_kw_init(const_cast(KNAMES), kglobs, kiargs); \ int iarg=argc, parg=0; \ while (iarg>=1) { \ iarg = yarg_kw(iarg, kglobs, kiargs); \ if (iarg>=1) { \ if (parg<5) piargs[parg++]=iarg--; \ else y_error( #CLASS " worker takes at most 5 positional arguments"); \ } \ } \ GYOTO_DEBUG_ARRAY(piargs, 5); \ GYOTO_DEBUG_ARRAY(kiargs, NKW); \ int k=-1; \ char const * rmsg="Cannot set return value more than once"; \ char const * pmsg="Cannot use positional argument more than once"; \ char * unit=NULL; \ /* make sure we use the variables at least once */ \ if (OBJ && rmsg && pmsg && unit && k && *paUsed) {} #define YGYOTO_WORKER_GETSET_VECTOR(MEMBER, N) \ if ((iarg=kiargs[++k])>=0) { \ iarg+=*rvset; \ if (yarg_nil(iarg)) { \ if ((*rvset)++) y_error(rmsg); \ long dims[] = {1,N}; \ double * coord=ypush_d(dims); \ (*OBJ)-> get##MEMBER (coord); \ } else { \ long ntot; \ double * pos = ygeta_d(iarg, &ntot, NULL); \ if (ntot set##MEMBER (pos); \ } \ } #define YGYOTO_WORKER_GETSET4(MEMBER) \ YGYOTO_WORKER_GETSET_VECTOR(MEMBER, 4) #define YGYOTO_WORKER_GETSET_DOUBLE_UNIT(MEMBER) \ if ((iarg=kiargs[++k])>=0) { \ iarg+=*rvset; \ if (yarg_nil(iarg)) { \ if ((*rvset)++) y_error("Only one return value possible"); \ ypush_double((*OBJ) -> get##MEMBER (unit?unit:"")); \ } else \ (*OBJ) -> set##MEMBER (ygets_d(iarg), unit?unit:""); \ } #define YGYOTO_WORKER_GETSET_DOUBLE2_UNIT(MEMBER) \ if ((iarg=kiargs[++k])>=0) { \ iarg+=*rvset; \ if (yarg_nil(iarg)) { \ if ((*rvset)++) y_error("Only one return value possible"); \ ypush_double((*OBJ) -> MEMBER (unit?unit:"")); \ } else \ (*OBJ) -> MEMBER (ygets_d(iarg), unit?unit:""); \ } #define YGYOTO_WORKER_GETSET_DOUBLE(MEMBER) \ if ((iarg=kiargs[++k])>=0) { \ iarg+=*rvset; \ if (yarg_nil(iarg)) { \ if ((*rvset)++) y_error("Only one return value possible"); \ ypush_double((*OBJ) -> get##MEMBER ()); \ } else \ (*OBJ) -> set##MEMBER (ygets_d(iarg)); \ } #define YGYOTO_WORKER_GET_DOUBLE(MEMBER) \ if ((iarg=kiargs[++k])>=0) { \ iarg+=*rvset; \ if (yarg_nil(iarg)) { \ if ((*rvset)++) y_error("Only one return value possible"); \ ypush_double((*OBJ) -> MEMBER ()); \ } else \ y_error( #MEMBER " is read only"); \ } #define YGYOTO_WORKER_GETSET_DOUBLE2(MEMBER) \ if ((iarg=kiargs[++k])>=0) { \ iarg+=*rvset; \ if (yarg_nil(iarg)) { \ if ((*rvset)++) y_error("Only one return value possible"); \ ypush_double((*OBJ) -> MEMBER ()); \ } else \ (*OBJ) -> MEMBER (ygets_d(iarg)); \ } #define YGYOTO_WORKER_GETSET_STRING2(MEMBER) \ if ((iarg=kiargs[++k])>=0) { \ iarg+=*rvset; \ if (yarg_nil(iarg)) { \ if ((*rvset)++) y_error("Only one return value possible"); \ *ypush_q(0) = p_strcpy((*OBJ) -> MEMBER () . c_str() ); \ } else \ (*OBJ) -> MEMBER (std::string(ygets_q(iarg))); \ } #define YGYOTO_WORKER_GETSET_LONG(MEMBER) \ if ((iarg=kiargs[++k])>=0) { \ iarg+=*rvset; \ if (yarg_nil(iarg)) { \ if ((*rvset)++) y_error("Only one return value possible"); \ ypush_long((*OBJ) -> get##MEMBER ()); \ } else \ (*OBJ) -> set##MEMBER (ygets_l(iarg)); \ } #define YGYOTO_WORKER_GETSET_LONG2(MEMBER) \ if ((iarg=kiargs[++k])>=0) { \ iarg+=*rvset; \ if (yarg_nil(iarg)) { \ if ((*rvset)++) y_error("Only one return value possible"); \ ypush_long((*OBJ) -> MEMBER ()); \ } else \ (*OBJ) -> MEMBER (ygets_l(iarg)); \ } #define YGYOTO_WORKER_GETSET_OBJECT0(SETMEMBER,GETMEMBER,YMEMBER) \ if ((iarg=kiargs[++k])>=0) { \ iarg+=*rvset; \ if (yarg_nil(iarg)) { \ GYOTO_DEBUG << "pushing " #YMEMBER << std::endl; \ if ((*rvset)++) y_error("Only one return value possible"); \ void * tmp = (*OBJ) -> GETMEMBER (); \ if (tmp) \ *ypush_##YMEMBER () = (*OBJ) -> GETMEMBER (); \ else ypush_long(0); \ } else { \ GYOTO_DEBUG << "setting " #YMEMBER << std::endl; \ if (yarg_number(iarg)) { \ if (ygets_l(iarg) != 0) \ y_error("Argument should be a " #YMEMBER " or 0"); \ (*OBJ) -> SETMEMBER (0); \ } else \ (*OBJ) -> SETMEMBER (*yget_##YMEMBER (kiargs[k])); \ } \ } #define YGYOTO_WORKER_GETSET_OBJECT(MEMBER) \ YGYOTO_WORKER_GETSET_OBJECT0(set##MEMBER,get##MEMBER,MEMBER) #define YGYOTO_WORKER_GETSET_OBJECT2(MEMBER,YMEMBER) \ YGYOTO_WORKER_GETSET_OBJECT0(MEMBER,MEMBER,YMEMBER) #define YGYOTO_WORKER_SET_UNIT \ if ((iarg=kiargs[++k])>=0) { \ iarg+=*rvset; \ GYOTO_DEBUG << "set unit" << std::endl; \ unit = ygets_q(iarg); \ } #define YGYOTO_WORKER_SETPARAMETER \ if ((iarg=kiargs[++k])>=0) { \ iarg+=*rvset; \ if ((*paUsed)++) y_error("pmsg"); \ string name = ygets_q(iarg); \ string content = ""; \ if (piargs[0] >= 0) content = ygets_q(*piargs); \ try { \ (*OBJ)->setParameter(name, content, unit?unit:""); \ } YGYOTO_STD_CATCH; \ } #ifdef GYOTO_USE_XERCES # define YGYOTO_WORKER_XMLWRITE \ if ((iarg=kiargs[++k])>=0) { \ iarg+=*rvset; \ char *filename=ygets_q(iarg); \ Gyoto::Factory(*OBJ).write(filename); \ } #else # define YGYOTO_WORKER_XMLWRITE \ if ((iarg=kiargs[++k])>=0) { \ y_error("This GYOTO was compiled without xerces: no xml i/o"); \ } #endif #define YGYOTO_WORKER_CLONE(TYPE) \ if ((iarg=kiargs[++k])>=0) { \ if ((*rvset)++) y_error(rmsg); \ *ypush_##TYPE () = (*OBJ)->clone(); \ } #define YGYOTO_WORKER_RUN(METHOD) \ if ((iarg=kiargs[++k])>=0) { \ GYOTO_DEBUG << #METHOD << std::endl ; \ iarg+=*rvset; \ (*OBJ)-> METHOD ; \ } #define YGYOTO_WORKER_HELP \ if ((iarg=kiargs[++k])>=0) { \ GYOTO_DEBUG << "help" << std::endl ; \ iarg+=*rvset; \ (*OBJ)-> help() ; \ ypush_nil(); \ } #define YGYOTO_WORKER_CALL_GENERIC(BASE) \ ygyoto_##BASE##_generic_eval(YGYOTO_CAT(OBJ,_), \ kiargs+k+1, piargs, rvset, paUsed, unit); /* The following are needed to export the ABI to other plug-ins. You usually don't need to read below this line. */ typedef Gyoto::SmartPointer *ygyoto_yget_Metric_t(int); typedef Gyoto::SmartPointer *ygyoto_ypush_Metric_t(); typedef void ygyoto_ypush_property_t (Gyoto::SmartPointer, Gyoto::Property const&, std::string, std::string); typedef void ygyoto_yget_property_t (Gyoto::SmartPointer, Gyoto::Property const&, int, std::string, std::string); typedef int yarg_OBJTYPE_t(int); typedef void ygyoto_Metric_register_t(char const * const, ygyoto_Metric_eval_worker_t*); typedef void ygyoto_Metric_generic_eval_t(Gyoto::SmartPointer*, \ int *, int *, int*, int*, char *); typedef Gyoto::SmartPointer *ygyoto_yget_Astrobj_t(int); typedef Gyoto::SmartPointer *ygyoto_ypush_Astrobj_t(); //typedef int yarg_Astrobj_t(int); typedef void ygyoto_Astrobj_register_t(char const * const, ygyoto_Astrobj_eval_worker_t*); typedef void ygyoto_Astrobj_generic_eval_t \ (Gyoto::SmartPointer*, int *, int *, int*, int*, char *); typedef Gyoto::SmartPointer *\ ygyoto_yget_Spectrum_t(int); typedef Gyoto::SmartPointer *\ ygyoto_ypush_Spectrum_t(); //typedef int yarg_Spectrum::Generic_t(int); typedef void ygyoto_Spectrum_register_t\ (char const*const, ygyoto_Spectrum_eval_worker_t*); typedef void ygyoto_Spectrum_generic_eval_t \ (Gyoto::SmartPointer*, int *, int *, int*, int*, char*); typedef Gyoto::SmartPointer *ygyoto_yget_Screen_t(int); typedef Gyoto::SmartPointer *ygyoto_ypush_Screen_t(); typedef Gyoto::SmartPointer *ygyoto_yget_Scenery_t(int); typedef Gyoto::SmartPointer *ygyoto_ypush_Scenery_t(); typedef Gyoto::SmartPointer *ygyoto_yget_Photon_t(int); typedef Gyoto::SmartPointer *ygyoto_ypush_Photon_t(); typedef Gyoto::SmartPointer *\ ygyoto_yget_Spectrometer_t(int); typedef Gyoto::SmartPointer *\ ygyoto_ypush_Spectrometer_t(); //typedef int yarg_Spectrometer::Generic_t(int); typedef void ygyoto_Spectrometer_register_t\ (char const*const, ygyoto_Spectrometer_eval_worker_t*); typedef void ygyoto_Spectrometer_generic_eval_t \ (Gyoto::SmartPointer*, int *, int *, int*, int*, char*); typedef struct YGyotoSupplier { // Metric ygyoto_yget_Metric_t *yget_Metric; ygyoto_ypush_Metric_t *ypush_Metric; yarg_OBJTYPE_t *yarg_Metric; ygyoto_Metric_register_t *ygyoto_Metric_register; ygyoto_Metric_generic_eval_t* ygyoto_Metric_generic_eval; // Astrobj ygyoto_yget_Astrobj_t *yget_Astrobj; ygyoto_ypush_Astrobj_t *ypush_Astrobj; yarg_OBJTYPE_t *yarg_Astrobj; ygyoto_Astrobj_register_t *ygyoto_Astrobj_register; ygyoto_Astrobj_generic_eval_t* ygyoto_Astrobj_generic_eval; ygyoto_Astrobj_generic_eval_t* ygyoto_ThinDisk_generic_eval; // Spectrum ygyoto_yget_Spectrum_t *yget_Spectrum; ygyoto_ypush_Spectrum_t *ypush_Spectrum; yarg_OBJTYPE_t *yarg_Spectrum; ygyoto_Spectrum_register_t *ygyoto_Spectrum_register; ygyoto_Spectrum_generic_eval_t* ygyoto_Spectrum_generic_eval; // Screen ygyoto_yget_Screen_t *yget_Screen; ygyoto_ypush_Screen_t *ypush_Screen; yarg_OBJTYPE_t *yarg_Screen; // Scenery ygyoto_yget_Scenery_t *yget_Scenery; ygyoto_ypush_Scenery_t *ypush_Scenery; yarg_OBJTYPE_t *yarg_Scenery; // Photon ygyoto_yget_Photon_t *yget_Photon; ygyoto_ypush_Photon_t *ypush_Photon; yarg_OBJTYPE_t *yarg_Photon; // Spectrometer ygyoto_yget_Spectrometer_t *yget_Spectrometer; ygyoto_ypush_Spectrometer_t *ypush_Spectrometer; yarg_OBJTYPE_t *yarg_Spectrometer; ygyoto_Spectrometer_register_t *ygyoto_Spectrometer_register; ygyoto_Spectrometer_generic_eval_t* ygyoto_Spectrometer_generic_eval; // Properties ygyoto_ypush_property_t *ypush_property; ygyoto_yget_property_t *yget_property; } YGyotoSupplier_t; #ifdef YGYOTO_LOCAL_SUPPLIER // The above ABI is exposed as macros in external plug-ins extern YGyotoSupplier_t* YGYOTO_LOCAL_SUPPLIER; #define yget_Metric(iarg) YGYOTO_LOCAL_SUPPLIER -> yget_Metric(iarg) #define ypush_Metric() YGYOTO_LOCAL_SUPPLIER -> ypush_Metric() #define yget_property(a, b, c, d, e) \ YGYOTO_LOCAL_SUPPLIER -> yget_property(a, b, c, d, e) #define ypush_property(a, b, c, d)\ YGYOTO_LOCAL_SUPPLIER -> ypush_property(a, b, c, d) #define yarg_Metric(iarg) YGYOTO_LOCAL_SUPPLIER -> yarg_Metric(iarg) #define ygyoto_Metric_register(kind, on_eval) \ YGYOTO_LOCAL_SUPPLIER -> \ ygyoto_Metric_register(kind, on_eval) #define ygyoto_Metric_generic_eval(gg, kiargs, piargs, rvset, paUsed, unit) \ YGYOTO_LOCAL_SUPPLIER -> \ ygyoto_Metric_generic_eval(gg, kiargs, piargs, rvset, paUsed, unit) #define yget_Astrobj(iarg) YGYOTO_LOCAL_SUPPLIER -> yget_Astrobj(iarg) #define ypush_Astrobj() YGYOTO_LOCAL_SUPPLIER -> ypush_Astrobj() #define yarg_Astrobj(iarg) YGYOTO_LOCAL_SUPPLIER -> yarg_Astrobj(iarg) #define ygyoto_Astrobj_register(kind, on_eval) \ YGYOTO_LOCAL_SUPPLIER -> \ ygyoto_Astrobj_register(kind, on_eval) #define ygyoto_Astrobj_generic_eval(gg, kiargs, piargs, rvset, paUsed, unit) \ YGYOTO_LOCAL_SUPPLIER -> \ ygyoto_Astrobj_generic_eval(gg, kiargs, piargs, rvset, paUsed, unit) #define ygyoto_ThinDisk_generic_eval(gg, kiargs, piargs, rvset, paUsed, unit) \ YGYOTO_LOCAL_SUPPLIER -> \ ygyoto_ThinDisk_generic_eval(gg, kiargs, piargs, rvset, paUsed, unit) #define yget_Spectrum(iarg) YGYOTO_LOCAL_SUPPLIER -> yget_Spectrum(iarg) #define ypush_Spectrum() YGYOTO_LOCAL_SUPPLIER -> ypush_Spectrum() #define yarg_Spectrum(iarg) YGYOTO_LOCAL_SUPPLIER -> yarg_Spectrum(iarg) #define ygyoto_Spectrum_register(kind, on_eval) \ YGYOTO_LOCAL_SUPPLIER -> \ ygyoto_Spectrum_register(kind, on_eval) #define ygyoto_Spectrum_generic_eval(gg, kiargs, piargs, rvset, paUsed, unit) \ YGYOTO_LOCAL_SUPPLIER -> \ ygyoto_Spectrum_generic_eval(gg, kiargs, piargs, rvset, paUsed, unit) #define yget_Screen(iarg) YGYOTO_LOCAL_SUPPLIER -> yget_Screen(iarg) #define ypush_Screen() YGYOTO_LOCAL_SUPPLIER -> ypush_Screen() #define yarg_Screen(iarg) YGYOTO_LOCAL_SUPPLIER -> yarg_Screen(iarg) #define yget_Scenery(iarg) YGYOTO_LOCAL_SUPPLIER -> yget_Scenery(iarg) #define ypush_Scenery() YGYOTO_LOCAL_SUPPLIER -> ypush_Scenery() #define yarg_Scenery(iarg) YGYOTO_LOCAL_SUPPLIER -> yarg_Scenery(iarg) #define yget_Photon(iarg) YGYOTO_LOCAL_SUPPLIER -> yget_Photon(iarg) #define ypush_Photon() YGYOTO_LOCAL_SUPPLIER -> ypush_Photon() #define yarg_Photon(iarg) YGYOTO_LOCAL_SUPPLIER -> yarg_Photon(iarg) #define yget_Spectrometer(iarg) YGYOTO_LOCAL_SUPPLIER -> yget_Spectrometer(iarg) #define ypush_Spectrometer() YGYOTO_LOCAL_SUPPLIER -> ypush_Spectrometer() #define yarg_Spectrometer(iarg) YGYOTO_LOCAL_SUPPLIER -> yarg_Spectrometer(iarg) #define ygyoto_Spectrometer_register(kind, on_eval) \ YGYOTO_LOCAL_SUPPLIER -> \ ygyoto_Spectrometer_register(kind, on_eval) #define ygyoto_Spectrometer_generic_eval(gg, kiargs, piargs, rvset, paUsed) \ YGYOTO_LOCAL_SUPPLIER -> \ ygyoto_Spectrometer_generic_eval(gg, kiargs, piargs, rvset,paUsed) #endif #endif Gyoto-1.2.0/yorick/ygyoto_idx.h000066400000000000000000000031371302352257300164700ustar00rootroot00000000000000/* Copyright 2011 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ #ifndef __YGYOTO_IDX_H #define __YGYOTO_IDX_H #include "yapi.h" namespace YGyoto { class Idx; } class YGyoto::Idx { private: int _is_nuller; int _is_range; int _is_list; int _is_scalar; int _is_double; int _is_dlist; int _is_first; long _range[3]; long _dims[Y_DIMSIZE]; double _dval; double *_buf; long *_idx; long _nel; long _cur; int _valid; public: Idx(int iarg, int res); int isNuller() const; int getNDims() const; long getNElements() const; long first(); int valid() const; long next(); long current() const; double getDVal() const; int isDouble() const; int isDoubleArray() const; int isRangeOrScalar() const; int isFirst() const; int isLast() const; long range_min() const; long range_max() const; long range_dlt() const; long const * getBuffer() const; double const * getDoubleBuffer() const; long const * getDims() const; }; #endif Gyoto-1.2.0/yorick/ygyoto_private.h000066400000000000000000000234331302352257300173570ustar00rootroot00000000000000/* Copyright 2011-2014, 2016 Thibaut Paumard This file is part of Gyoto. Gyoto 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 3 of the License, or (at your option) any later version. Gyoto is distributed in the hope that 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 Gyoto. If not, see . */ /* This header should be used only for the main gyoto.so plug-in, not in additional plug-ins such as gyoto_std.so. */ #ifndef __YGYOTO_PRIVATE_H #define __YGYOTO_PRIVATE_H #include "GyotoSmartPointer.h" /* The following are to declare a new base (such as Metric or Astrobj) or independent (such as Photon) class. Seldom used in a Gyoto extension. */ #ifdef GYOTO_USE_XERCES # define YGYOTO_PRINT_YUSEROBJ(NAME) \ void gyoto_##NAME##_print(void *obj) { \ string rest="", sub=""; \ size_t pos=0, len=0; \ try {rest = Factory(((gyoto_##NAME*)obj)->smptr).format();} \ YGYOTO_STD_CATCH; \ while ( ( len=rest.length() ) ) { \ sub=rest.substr(0, pos=rest.find_first_of("\n",0)); \ rest=rest.substr(pos+1, len-1); \ y_print( sub.c_str(),1 ); \ } \ } #else # define YGYOTO_PRINT_YUSEROBJ(NAME) \ void gyoto_##NAME##_print(void *obj) { \ y_print("GYOTO " #NAME,0); \ } #endif // Two helper functions for the dot operator below; // these are *not* public API, don't (ab)use them /* return "__gyoto_var" */ char const * const __ygyoto_var_name(size_t id); /* return the index of "__gyoto_var" */ long int __ygyoto_var_idx(size_t id); #define YGYOTO_YUSEROBJ(NAME, CLASS) \ extern "C" { \ typedef struct gyoto_##NAME { \ Gyoto::SmartPointer smptr; \ } gyoto_##NAME; \ typedef struct gyoto_##NAME##_closure { \ Gyoto::SmartPointer smptr; \ char * member; \ } gyoto_##NAME##_closure; \ void gyoto_##NAME##_free(void *obj) { \ if (((gyoto_##NAME*)obj)->smptr) { \ ((gyoto_##NAME*)obj)->smptr=NULL; \ } else printf("null pointer\n"); \ } \ void gyoto_##NAME##_closure_free(void *obj) { \ if (((gyoto_##NAME##_closure*)obj)->smptr) { \ ((gyoto_##NAME##_closure*)obj)->smptr=NULL; \ p_free(((gyoto_##NAME##_closure*)obj)->member); \ } else printf("null pointer\n"); \ } \ YGYOTO_PRINT_YUSEROBJ(NAME) \ void gyoto_##NAME##_closure_print(void *obj) { \ std::string phrase = "Gyoto closure. Class: \"" #NAME "\", method: \""; \ phrase.append(((gyoto_##NAME##_closure*)obj)->member).append("\""); \ y_print(phrase.c_str(),1); \ y_print("(Hint: I'm a functor, call me as a function)", 0); \ } \ void gyoto_##NAME##_eval(void *obj, int argc); \ void gyoto_##NAME##_closure_eval(void *obj, int argc) { \ Property const * prop = \ ((Gyoto::Object*)((gyoto_##NAME##_closure*)obj)->smptr()) \ ->property(((gyoto_##NAME##_closure*)obj)->member); \ GYOTO_DEBUG_EXPR(prop); \ if (prop) { \ std::string unit=""; \ std::string kwd=""; \ int parg=-1; \ long kidx=0; \ for (int iarg =argc-1; iarg>=0; --iarg) { \ if ((kidx=yarg_key(iarg))>=0) { \ /* this is a keyword */ \ if (strcmp(yfind_name(kidx),"unit")) \ y_error("Only the 'unit' keyword is supported"); \ unit=ygets_q(--iarg); \ } else { \ if (parg!=-1) \ y_error("Only one positional argument accepted"); \ parg=iarg; \ } \ } \ if (yarg_nil(parg)) parg=-1; \ if (parg==-1) \ ypush_property(((gyoto_##NAME##_closure*)obj)->smptr, \ *prop, \ ((gyoto_##NAME##_closure*)obj)->member, \ unit); \ else { \ yget_property(((gyoto_##NAME##_closure*)obj)->smptr, \ *prop, parg, \ ((gyoto_##NAME##_closure*)obj)->member, \ unit); \ *ypush_##NAME()= ((gyoto_##NAME##_closure*)obj)->smptr; \ } \ return; \ } \ long used_var=0; \ /* we build a yorick statement into ss */ \ stringstream ss; \ /* first variable (used_var=0) will be output */ \ ss << "eq_nocopy, " << __ygyoto_var_name(used_var++) << ", "; \ /* push object second variable */ \ *ypush_##NAME()= ((gyoto_##NAME##_closure*)obj)->smptr; \ yput_global(__ygyoto_var_idx(used_var), 0); \ yarg_drop(1); \ ss << __ygyoto_var_name(used_var++) << "("; \ /* use "member=" keyword */ \ ss << ((gyoto_##NAME##_closure*)obj)->member << "="; \ bool coma=false; \ /* process arguments */ \ long kidx=0; \ for (int iarg =argc-1; iarg>=0; --iarg) { \ if ((kidx=yarg_key(iarg))>=0) { \ /* this is a keyword */ \ ss << ", " << yfind_name(kidx) << "="; \ coma=false; \ } else { \ /* add coma if preceding argument was not a keyword */ \ if (coma) ss << ", "; \ ypush_use(yget_use(iarg)); \ yput_global(__ygyoto_var_idx(used_var), 0); \ yarg_drop(1); \ ss << __ygyoto_var_name(used_var++); \ coma=true; \ } \ } \ /* terminate statement */ \ ss << ");"; \ /* interpret statement */ \ long dims[Y_DIMSIZE]={1,1}; \ *ypush_q(dims)=p_strcpy(ss.str().c_str()); \ yexec_include(0, 1); \ yarg_drop(1); \ /* result is in var #0, push it on the stack */ \ ypush_global(__ygyoto_var_idx(0)); \ /* clean variables */ \ ypush_nil(); \ for (long k=0; ksmptr; \ yput_global(idxo, 0); \ yarg_drop(1); \ long dims[Y_DIMSIZE]={1,1}; \ string stmt = "eq_nocopy, __gyoto_res, __gyoto_obj("; \ stmt.append(((gyoto_##NAME##_closure*)obj)->member).append("=).")\ .append(member); \ *ypush_q(dims)=p_strcpy(stmt.c_str()); \ yexec_include(0, 1); \ yarg_drop(1); \ ypush_global(idxr); \ } \ static y_userobj_t gyoto_##NAME##_closure_obj = \ {const_cast("gyoto_" #NAME), \ &gyoto_##NAME##_closure_free, \ &gyoto_##NAME##_closure_print, \ &gyoto_##NAME##_closure_eval, \ &gyoto_##NAME##_closure_extract, \ 0}; \ void gyoto_##NAME##_extract(void *obj, char *member) { \ gyoto_##NAME##_closure * CLOSURE = \ (gyoto_##NAME##_closure *)ypush_obj(&gyoto_##NAME##_closure_obj, \ sizeof(gyoto_##NAME##_closure)); \ CLOSURE -> smptr=((gyoto_##NAME*)obj)->smptr; \ CLOSURE -> member = p_strcpy(member); \ } \ static y_userobj_t gyoto_##NAME##_obj = \ {const_cast("gyoto_" #NAME), \ &gyoto_##NAME##_free, \ &gyoto_##NAME##_print, \ &gyoto_##NAME##_eval, \ &gyoto_##NAME##_extract, \ 0}; \ } \ Gyoto::SmartPointer* yget_##NAME(int iarg) { \ return &(((gyoto_##NAME*)yget_obj(iarg, &gyoto_##NAME##_obj))->smptr); \ } \ Gyoto::SmartPointer* ypush_##NAME() { \ return &(((gyoto_##NAME*)ypush_obj(&gyoto_##NAME##_obj, \ sizeof(gyoto_##NAME)))->smptr); \ } \ int yarg_##NAME(int iarg) { \ return yget_obj(iarg,0)==gyoto_##NAME##_obj.type_name; \ } \ extern "C" { \ void Y_is_gyoto_##NAME(int) \ { \ ypush_long(yarg_##NAME(0)); \ } \ } #ifdef GYOTO_USE_XERCES # define YGYOTO_BASE_CONSTRUCTOR1_XML(GETBASE) \ GYOTO_DEBUG << "found no subcontractor for \"" << fname \ << "\", calling Factory now\n"; \ *OBJ = Factory(fname).GETBASE(); #else # define YGYOTO_BASE_CONSTRUCTOR1_XML(GETBASE) \ y_error("no XML support in this gyoto"); #endif #define YGYOTO_BASE_CONSTRUCTOR1(BASE,GETBASE) \ extern "C" { \ void Y_gyoto_##BASE(int argc) { \ Gyoto::SmartPointer *OBJ = NULL; \ if (yarg_##BASE(argc-1)) { \ OBJ = yget_##BASE(argc); \ } else { \ if (!yarg_string(argc-1)) \ y_error("Cannot allocate object of virtual class " #BASE); \ char * fname = ygets_q(argc-1); \ std::vector plugin; \ if (argc >= 2 && yarg_string(argc-2)) { \ long ntot=0; \ ystring_t * plugs = ygeta_q(argc-2, &ntot, NULL); \ for (size_t i=0; i. */ #include #include #define JOIN(x, y) JOIN_AGAIN(x, y) #define JOIN_AGAIN(x, y) x ## y #define Y___SET_YGYOTO_LOCAL_SUPPLIER JOIN(Y___set_, YGYOTO_LOCAL_SUPPLIER) YGyotoSupplier_t* YGYOTO_LOCAL_SUPPLIER = 0; extern "C" { void Y___SET_YGYOTO_LOCAL_SUPPLIER (int argc) { YGYOTO_LOCAL_SUPPLIER = (YGyotoSupplier_t*) ygets_l(0); ypush_nil(); } } Gyoto-1.2.0/yorick/yorick-gyoto.aliases000066400000000000000000000001371302352257300201200ustar00rootroot00000000000000gyoto gyoto_constants gyoto_Metric gyoto_Photon gyoto_Scenery gyoto_std gyoto_Kerr gyoto_Star Gyoto-1.2.0/yorick/yorick-gyoto.keywords000066400000000000000000000000651302352257300203460ustar00rootroot00000000000000relativity ray-tracing geodesic scenery metric orbit Gyoto-1.2.0/yorick/yorick-gyoto.packinfo000066400000000000000000000004471302352257300202750ustar00rootroot00000000000000:newsubsection gyoto: the General relativitY Orbit Tracer of Observatoire de Paris :gyoto computing orbits in curved space-times, relativistic ray-tracing :gyoto_std low level access to the objects and metrics in Gyoto's standard plug-in :gyotoy graphical tool to visualize a single geodesic Gyoto-1.2.0/yorick/yorick1.in000066400000000000000000000022311302352257300160240ustar00rootroot00000000000000#!/bin/bash # Copyright 2014 Thibaut Paumard # # This file is part of Gyoto. # # Gyoto 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 3 of the License, or # (at your option) any later version. # # Gyoto is distributed in the hope that 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 Gyoto. If not, see . # This script is a wrapper around the yorick interpreter meant to run # the gyoto plug-in from the built source tree. It is not supposed to # be installed on the system. DYLIB_VAR=@DYLIB_VAR@ abs_top_builddir=@abs_top_builddir@ YORICK=@YORICK@ export ${DYLIB_VAR}=${abs_top_builddir}/lib/.libs:${!DYLIB_VAR} export PATH=${abs_top_builddir}/bin:${PATH} ${YORICK} -i ${abs_top_builddir}/yorick/setpaths.i $@ -i ${abs_top_builddir}/yorick/setpaths.i exit 0