1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/mythtv_plugin/AUTHORS Wed Sep 20 23:59:48 2006 +0100
1.3 @@ -0,0 +1,2 @@
1.4 +Rosfran Borges <rosfran dot borges at indt dot org dot br>
1.5 +and the GMyth Team
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/mythtv_plugin/COPYING Wed Sep 20 23:59:48 2006 +0100
2.3 @@ -0,0 +1,504 @@
2.4 + GNU LESSER GENERAL PUBLIC LICENSE
2.5 + Version 2.1, February 1999
2.6 +
2.7 + Copyright (C) 1991, 1999 Free Software Foundation, Inc.
2.8 + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2.9 + Everyone is permitted to copy and distribute verbatim copies
2.10 + of this license document, but changing it is not allowed.
2.11 +
2.12 +[This is the first released version of the Lesser GPL. It also counts
2.13 + as the successor of the GNU Library Public License, version 2, hence
2.14 + the version number 2.1.]
2.15 +
2.16 + Preamble
2.17 +
2.18 + The licenses for most software are designed to take away your
2.19 +freedom to share and change it. By contrast, the GNU General Public
2.20 +Licenses are intended to guarantee your freedom to share and change
2.21 +free software--to make sure the software is free for all its users.
2.22 +
2.23 + This license, the Lesser General Public License, applies to some
2.24 +specially designated software packages--typically libraries--of the
2.25 +Free Software Foundation and other authors who decide to use it. You
2.26 +can use it too, but we suggest you first think carefully about whether
2.27 +this license or the ordinary General Public License is the better
2.28 +strategy to use in any particular case, based on the explanations below.
2.29 +
2.30 + When we speak of free software, we are referring to freedom of use,
2.31 +not price. Our General Public Licenses are designed to make sure that
2.32 +you have the freedom to distribute copies of free software (and charge
2.33 +for this service if you wish); that you receive source code or can get
2.34 +it if you want it; that you can change the software and use pieces of
2.35 +it in new free programs; and that you are informed that you can do
2.36 +these things.
2.37 +
2.38 + To protect your rights, we need to make restrictions that forbid
2.39 +distributors to deny you these rights or to ask you to surrender these
2.40 +rights. These restrictions translate to certain responsibilities for
2.41 +you if you distribute copies of the library or if you modify it.
2.42 +
2.43 + For example, if you distribute copies of the library, whether gratis
2.44 +or for a fee, you must give the recipients all the rights that we gave
2.45 +you. You must make sure that they, too, receive or can get the source
2.46 +code. If you link other code with the library, you must provide
2.47 +complete object files to the recipients, so that they can relink them
2.48 +with the library after making changes to the library and recompiling
2.49 +it. And you must show them these terms so they know their rights.
2.50 +
2.51 + We protect your rights with a two-step method: (1) we copyright the
2.52 +library, and (2) we offer you this license, which gives you legal
2.53 +permission to copy, distribute and/or modify the library.
2.54 +
2.55 + To protect each distributor, we want to make it very clear that
2.56 +there is no warranty for the free library. Also, if the library is
2.57 +modified by someone else and passed on, the recipients should know
2.58 +that what they have is not the original version, so that the original
2.59 +author's reputation will not be affected by problems that might be
2.60 +introduced by others.
2.61 +
2.62 + Finally, software patents pose a constant threat to the existence of
2.63 +any free program. We wish to make sure that a company cannot
2.64 +effectively restrict the users of a free program by obtaining a
2.65 +restrictive license from a patent holder. Therefore, we insist that
2.66 +any patent license obtained for a version of the library must be
2.67 +consistent with the full freedom of use specified in this license.
2.68 +
2.69 + Most GNU software, including some libraries, is covered by the
2.70 +ordinary GNU General Public License. This license, the GNU Lesser
2.71 +General Public License, applies to certain designated libraries, and
2.72 +is quite different from the ordinary General Public License. We use
2.73 +this license for certain libraries in order to permit linking those
2.74 +libraries into non-free programs.
2.75 +
2.76 + When a program is linked with a library, whether statically or using
2.77 +a shared library, the combination of the two is legally speaking a
2.78 +combined work, a derivative of the original library. The ordinary
2.79 +General Public License therefore permits such linking only if the
2.80 +entire combination fits its criteria of freedom. The Lesser General
2.81 +Public License permits more lax criteria for linking other code with
2.82 +the library.
2.83 +
2.84 + We call this license the "Lesser" General Public License because it
2.85 +does Less to protect the user's freedom than the ordinary General
2.86 +Public License. It also provides other free software developers Less
2.87 +of an advantage over competing non-free programs. These disadvantages
2.88 +are the reason we use the ordinary General Public License for many
2.89 +libraries. However, the Lesser license provides advantages in certain
2.90 +special circumstances.
2.91 +
2.92 + For example, on rare occasions, there may be a special need to
2.93 +encourage the widest possible use of a certain library, so that it becomes
2.94 +a de-facto standard. To achieve this, non-free programs must be
2.95 +allowed to use the library. A more frequent case is that a free
2.96 +library does the same job as widely used non-free libraries. In this
2.97 +case, there is little to gain by limiting the free library to free
2.98 +software only, so we use the Lesser General Public License.
2.99 +
2.100 + In other cases, permission to use a particular library in non-free
2.101 +programs enables a greater number of people to use a large body of
2.102 +free software. For example, permission to use the GNU C Library in
2.103 +non-free programs enables many more people to use the whole GNU
2.104 +operating system, as well as its variant, the GNU/Linux operating
2.105 +system.
2.106 +
2.107 + Although the Lesser General Public License is Less protective of the
2.108 +users' freedom, it does ensure that the user of a program that is
2.109 +linked with the Library has the freedom and the wherewithal to run
2.110 +that program using a modified version of the Library.
2.111 +
2.112 + The precise terms and conditions for copying, distribution and
2.113 +modification follow. Pay close attention to the difference between a
2.114 +"work based on the library" and a "work that uses the library". The
2.115 +former contains code derived from the library, whereas the latter must
2.116 +be combined with the library in order to run.
2.117 +
2.118 + GNU LESSER GENERAL PUBLIC LICENSE
2.119 + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2.120 +
2.121 + 0. This License Agreement applies to any software library or other
2.122 +program which contains a notice placed by the copyright holder or
2.123 +other authorized party saying it may be distributed under the terms of
2.124 +this Lesser General Public License (also called "this License").
2.125 +Each licensee is addressed as "you".
2.126 +
2.127 + A "library" means a collection of software functions and/or data
2.128 +prepared so as to be conveniently linked with application programs
2.129 +(which use some of those functions and data) to form executables.
2.130 +
2.131 + The "Library", below, refers to any such software library or work
2.132 +which has been distributed under these terms. A "work based on the
2.133 +Library" means either the Library or any derivative work under
2.134 +copyright law: that is to say, a work containing the Library or a
2.135 +portion of it, either verbatim or with modifications and/or translated
2.136 +straightforwardly into another language. (Hereinafter, translation is
2.137 +included without limitation in the term "modification".)
2.138 +
2.139 + "Source code" for a work means the preferred form of the work for
2.140 +making modifications to it. For a library, complete source code means
2.141 +all the source code for all modules it contains, plus any associated
2.142 +interface definition files, plus the scripts used to control compilation
2.143 +and installation of the library.
2.144 +
2.145 + Activities other than copying, distribution and modification are not
2.146 +covered by this License; they are outside its scope. The act of
2.147 +running a program using the Library is not restricted, and output from
2.148 +such a program is covered only if its contents constitute a work based
2.149 +on the Library (independent of the use of the Library in a tool for
2.150 +writing it). Whether that is true depends on what the Library does
2.151 +and what the program that uses the Library does.
2.152 +
2.153 + 1. You may copy and distribute verbatim copies of the Library's
2.154 +complete source code as you receive it, in any medium, provided that
2.155 +you conspicuously and appropriately publish on each copy an
2.156 +appropriate copyright notice and disclaimer of warranty; keep intact
2.157 +all the notices that refer to this License and to the absence of any
2.158 +warranty; and distribute a copy of this License along with the
2.159 +Library.
2.160 +
2.161 + You may charge a fee for the physical act of transferring a copy,
2.162 +and you may at your option offer warranty protection in exchange for a
2.163 +fee.
2.164 +
2.165 + 2. You may modify your copy or copies of the Library or any portion
2.166 +of it, thus forming a work based on the Library, and copy and
2.167 +distribute such modifications or work under the terms of Section 1
2.168 +above, provided that you also meet all of these conditions:
2.169 +
2.170 + a) The modified work must itself be a software library.
2.171 +
2.172 + b) You must cause the files modified to carry prominent notices
2.173 + stating that you changed the files and the date of any change.
2.174 +
2.175 + c) You must cause the whole of the work to be licensed at no
2.176 + charge to all third parties under the terms of this License.
2.177 +
2.178 + d) If a facility in the modified Library refers to a function or a
2.179 + table of data to be supplied by an application program that uses
2.180 + the facility, other than as an argument passed when the facility
2.181 + is invoked, then you must make a good faith effort to ensure that,
2.182 + in the event an application does not supply such function or
2.183 + table, the facility still operates, and performs whatever part of
2.184 + its purpose remains meaningful.
2.185 +
2.186 + (For example, a function in a library to compute square roots has
2.187 + a purpose that is entirely well-defined independent of the
2.188 + application. Therefore, Subsection 2d requires that any
2.189 + application-supplied function or table used by this function must
2.190 + be optional: if the application does not supply it, the square
2.191 + root function must still compute square roots.)
2.192 +
2.193 +These requirements apply to the modified work as a whole. If
2.194 +identifiable sections of that work are not derived from the Library,
2.195 +and can be reasonably considered independent and separate works in
2.196 +themselves, then this License, and its terms, do not apply to those
2.197 +sections when you distribute them as separate works. But when you
2.198 +distribute the same sections as part of a whole which is a work based
2.199 +on the Library, the distribution of the whole must be on the terms of
2.200 +this License, whose permissions for other licensees extend to the
2.201 +entire whole, and thus to each and every part regardless of who wrote
2.202 +it.
2.203 +
2.204 +Thus, it is not the intent of this section to claim rights or contest
2.205 +your rights to work written entirely by you; rather, the intent is to
2.206 +exercise the right to control the distribution of derivative or
2.207 +collective works based on the Library.
2.208 +
2.209 +In addition, mere aggregation of another work not based on the Library
2.210 +with the Library (or with a work based on the Library) on a volume of
2.211 +a storage or distribution medium does not bring the other work under
2.212 +the scope of this License.
2.213 +
2.214 + 3. You may opt to apply the terms of the ordinary GNU General Public
2.215 +License instead of this License to a given copy of the Library. To do
2.216 +this, you must alter all the notices that refer to this License, so
2.217 +that they refer to the ordinary GNU General Public License, version 2,
2.218 +instead of to this License. (If a newer version than version 2 of the
2.219 +ordinary GNU General Public License has appeared, then you can specify
2.220 +that version instead if you wish.) Do not make any other change in
2.221 +these notices.
2.222 +
2.223 + Once this change is made in a given copy, it is irreversible for
2.224 +that copy, so the ordinary GNU General Public License applies to all
2.225 +subsequent copies and derivative works made from that copy.
2.226 +
2.227 + This option is useful when you wish to copy part of the code of
2.228 +the Library into a program that is not a library.
2.229 +
2.230 + 4. You may copy and distribute the Library (or a portion or
2.231 +derivative of it, under Section 2) in object code or executable form
2.232 +under the terms of Sections 1 and 2 above provided that you accompany
2.233 +it with the complete corresponding machine-readable source code, which
2.234 +must be distributed under the terms of Sections 1 and 2 above on a
2.235 +medium customarily used for software interchange.
2.236 +
2.237 + If distribution of object code is made by offering access to copy
2.238 +from a designated place, then offering equivalent access to copy the
2.239 +source code from the same place satisfies the requirement to
2.240 +distribute the source code, even though third parties are not
2.241 +compelled to copy the source along with the object code.
2.242 +
2.243 + 5. A program that contains no derivative of any portion of the
2.244 +Library, but is designed to work with the Library by being compiled or
2.245 +linked with it, is called a "work that uses the Library". Such a
2.246 +work, in isolation, is not a derivative work of the Library, and
2.247 +therefore falls outside the scope of this License.
2.248 +
2.249 + However, linking a "work that uses the Library" with the Library
2.250 +creates an executable that is a derivative of the Library (because it
2.251 +contains portions of the Library), rather than a "work that uses the
2.252 +library". The executable is therefore covered by this License.
2.253 +Section 6 states terms for distribution of such executables.
2.254 +
2.255 + When a "work that uses the Library" uses material from a header file
2.256 +that is part of the Library, the object code for the work may be a
2.257 +derivative work of the Library even though the source code is not.
2.258 +Whether this is true is especially significant if the work can be
2.259 +linked without the Library, or if the work is itself a library. The
2.260 +threshold for this to be true is not precisely defined by law.
2.261 +
2.262 + If such an object file uses only numerical parameters, data
2.263 +structure layouts and accessors, and small macros and small inline
2.264 +functions (ten lines or less in length), then the use of the object
2.265 +file is unrestricted, regardless of whether it is legally a derivative
2.266 +work. (Executables containing this object code plus portions of the
2.267 +Library will still fall under Section 6.)
2.268 +
2.269 + Otherwise, if the work is a derivative of the Library, you may
2.270 +distribute the object code for the work under the terms of Section 6.
2.271 +Any executables containing that work also fall under Section 6,
2.272 +whether or not they are linked directly with the Library itself.
2.273 +
2.274 + 6. As an exception to the Sections above, you may also combine or
2.275 +link a "work that uses the Library" with the Library to produce a
2.276 +work containing portions of the Library, and distribute that work
2.277 +under terms of your choice, provided that the terms permit
2.278 +modification of the work for the customer's own use and reverse
2.279 +engineering for debugging such modifications.
2.280 +
2.281 + You must give prominent notice with each copy of the work that the
2.282 +Library is used in it and that the Library and its use are covered by
2.283 +this License. You must supply a copy of this License. If the work
2.284 +during execution displays copyright notices, you must include the
2.285 +copyright notice for the Library among them, as well as a reference
2.286 +directing the user to the copy of this License. Also, you must do one
2.287 +of these things:
2.288 +
2.289 + a) Accompany the work with the complete corresponding
2.290 + machine-readable source code for the Library including whatever
2.291 + changes were used in the work (which must be distributed under
2.292 + Sections 1 and 2 above); and, if the work is an executable linked
2.293 + with the Library, with the complete machine-readable "work that
2.294 + uses the Library", as object code and/or source code, so that the
2.295 + user can modify the Library and then relink to produce a modified
2.296 + executable containing the modified Library. (It is understood
2.297 + that the user who changes the contents of definitions files in the
2.298 + Library will not necessarily be able to recompile the application
2.299 + to use the modified definitions.)
2.300 +
2.301 + b) Use a suitable shared library mechanism for linking with the
2.302 + Library. A suitable mechanism is one that (1) uses at run time a
2.303 + copy of the library already present on the user's computer system,
2.304 + rather than copying library functions into the executable, and (2)
2.305 + will operate properly with a modified version of the library, if
2.306 + the user installs one, as long as the modified version is
2.307 + interface-compatible with the version that the work was made with.
2.308 +
2.309 + c) Accompany the work with a written offer, valid for at
2.310 + least three years, to give the same user the materials
2.311 + specified in Subsection 6a, above, for a charge no more
2.312 + than the cost of performing this distribution.
2.313 +
2.314 + d) If distribution of the work is made by offering access to copy
2.315 + from a designated place, offer equivalent access to copy the above
2.316 + specified materials from the same place.
2.317 +
2.318 + e) Verify that the user has already received a copy of these
2.319 + materials or that you have already sent this user a copy.
2.320 +
2.321 + For an executable, the required form of the "work that uses the
2.322 +Library" must include any data and utility programs needed for
2.323 +reproducing the executable from it. However, as a special exception,
2.324 +the materials to be distributed need not include anything that is
2.325 +normally distributed (in either source or binary form) with the major
2.326 +components (compiler, kernel, and so on) of the operating system on
2.327 +which the executable runs, unless that component itself accompanies
2.328 +the executable.
2.329 +
2.330 + It may happen that this requirement contradicts the license
2.331 +restrictions of other proprietary libraries that do not normally
2.332 +accompany the operating system. Such a contradiction means you cannot
2.333 +use both them and the Library together in an executable that you
2.334 +distribute.
2.335 +
2.336 + 7. You may place library facilities that are a work based on the
2.337 +Library side-by-side in a single library together with other library
2.338 +facilities not covered by this License, and distribute such a combined
2.339 +library, provided that the separate distribution of the work based on
2.340 +the Library and of the other library facilities is otherwise
2.341 +permitted, and provided that you do these two things:
2.342 +
2.343 + a) Accompany the combined library with a copy of the same work
2.344 + based on the Library, uncombined with any other library
2.345 + facilities. This must be distributed under the terms of the
2.346 + Sections above.
2.347 +
2.348 + b) Give prominent notice with the combined library of the fact
2.349 + that part of it is a work based on the Library, and explaining
2.350 + where to find the accompanying uncombined form of the same work.
2.351 +
2.352 + 8. You may not copy, modify, sublicense, link with, or distribute
2.353 +the Library except as expressly provided under this License. Any
2.354 +attempt otherwise to copy, modify, sublicense, link with, or
2.355 +distribute the Library is void, and will automatically terminate your
2.356 +rights under this License. However, parties who have received copies,
2.357 +or rights, from you under this License will not have their licenses
2.358 +terminated so long as such parties remain in full compliance.
2.359 +
2.360 + 9. You are not required to accept this License, since you have not
2.361 +signed it. However, nothing else grants you permission to modify or
2.362 +distribute the Library or its derivative works. These actions are
2.363 +prohibited by law if you do not accept this License. Therefore, by
2.364 +modifying or distributing the Library (or any work based on the
2.365 +Library), you indicate your acceptance of this License to do so, and
2.366 +all its terms and conditions for copying, distributing or modifying
2.367 +the Library or works based on it.
2.368 +
2.369 + 10. Each time you redistribute the Library (or any work based on the
2.370 +Library), the recipient automatically receives a license from the
2.371 +original licensor to copy, distribute, link with or modify the Library
2.372 +subject to these terms and conditions. You may not impose any further
2.373 +restrictions on the recipients' exercise of the rights granted herein.
2.374 +You are not responsible for enforcing compliance by third parties with
2.375 +this License.
2.376 +
2.377 + 11. If, as a consequence of a court judgment or allegation of patent
2.378 +infringement or for any other reason (not limited to patent issues),
2.379 +conditions are imposed on you (whether by court order, agreement or
2.380 +otherwise) that contradict the conditions of this License, they do not
2.381 +excuse you from the conditions of this License. If you cannot
2.382 +distribute so as to satisfy simultaneously your obligations under this
2.383 +License and any other pertinent obligations, then as a consequence you
2.384 +may not distribute the Library at all. For example, if a patent
2.385 +license would not permit royalty-free redistribution of the Library by
2.386 +all those who receive copies directly or indirectly through you, then
2.387 +the only way you could satisfy both it and this License would be to
2.388 +refrain entirely from distribution of the Library.
2.389 +
2.390 +If any portion of this section is held invalid or unenforceable under any
2.391 +particular circumstance, the balance of the section is intended to apply,
2.392 +and the section as a whole is intended to apply in other circumstances.
2.393 +
2.394 +It is not the purpose of this section to induce you to infringe any
2.395 +patents or other property right claims or to contest validity of any
2.396 +such claims; this section has the sole purpose of protecting the
2.397 +integrity of the free software distribution system which is
2.398 +implemented by public license practices. Many people have made
2.399 +generous contributions to the wide range of software distributed
2.400 +through that system in reliance on consistent application of that
2.401 +system; it is up to the author/donor to decide if he or she is willing
2.402 +to distribute software through any other system and a licensee cannot
2.403 +impose that choice.
2.404 +
2.405 +This section is intended to make thoroughly clear what is believed to
2.406 +be a consequence of the rest of this License.
2.407 +
2.408 + 12. If the distribution and/or use of the Library is restricted in
2.409 +certain countries either by patents or by copyrighted interfaces, the
2.410 +original copyright holder who places the Library under this License may add
2.411 +an explicit geographical distribution limitation excluding those countries,
2.412 +so that distribution is permitted only in or among countries not thus
2.413 +excluded. In such case, this License incorporates the limitation as if
2.414 +written in the body of this License.
2.415 +
2.416 + 13. The Free Software Foundation may publish revised and/or new
2.417 +versions of the Lesser General Public License from time to time.
2.418 +Such new versions will be similar in spirit to the present version,
2.419 +but may differ in detail to address new problems or concerns.
2.420 +
2.421 +Each version is given a distinguishing version number. If the Library
2.422 +specifies a version number of this License which applies to it and
2.423 +"any later version", you have the option of following the terms and
2.424 +conditions either of that version or of any later version published by
2.425 +the Free Software Foundation. If the Library does not specify a
2.426 +license version number, you may choose any version ever published by
2.427 +the Free Software Foundation.
2.428 +
2.429 + 14. If you wish to incorporate parts of the Library into other free
2.430 +programs whose distribution conditions are incompatible with these,
2.431 +write to the author to ask for permission. For software which is
2.432 +copyrighted by the Free Software Foundation, write to the Free
2.433 +Software Foundation; we sometimes make exceptions for this. Our
2.434 +decision will be guided by the two goals of preserving the free status
2.435 +of all derivatives of our free software and of promoting the sharing
2.436 +and reuse of software generally.
2.437 +
2.438 + NO WARRANTY
2.439 +
2.440 + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
2.441 +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
2.442 +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
2.443 +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
2.444 +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
2.445 +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2.446 +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
2.447 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
2.448 +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
2.449 +
2.450 + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
2.451 +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
2.452 +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
2.453 +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
2.454 +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
2.455 +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
2.456 +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
2.457 +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
2.458 +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
2.459 +DAMAGES.
2.460 +
2.461 + END OF TERMS AND CONDITIONS
2.462 +
2.463 + How to Apply These Terms to Your New Libraries
2.464 +
2.465 + If you develop a new library, and you want it to be of the greatest
2.466 +possible use to the public, we recommend making it free software that
2.467 +everyone can redistribute and change. You can do so by permitting
2.468 +redistribution under these terms (or, alternatively, under the terms of the
2.469 +ordinary General Public License).
2.470 +
2.471 + To apply these terms, attach the following notices to the library. It is
2.472 +safest to attach them to the start of each source file to most effectively
2.473 +convey the exclusion of warranty; and each file should have at least the
2.474 +"copyright" line and a pointer to where the full notice is found.
2.475 +
2.476 + <one line to give the library's name and a brief idea of what it does.>
2.477 + Copyright (C) <year> <name of author>
2.478 +
2.479 + This library is free software; you can redistribute it and/or
2.480 + modify it under the terms of the GNU Lesser General Public
2.481 + License as published by the Free Software Foundation; either
2.482 + version 2.1 of the License, or (at your option) any later version.
2.483 +
2.484 + This library is distributed in the hope that it will be useful,
2.485 + but WITHOUT ANY WARRANTY; without even the implied warranty of
2.486 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2.487 + Lesser General Public License for more details.
2.488 +
2.489 + You should have received a copy of the GNU Lesser General Public
2.490 + License along with this library; if not, write to the Free Software
2.491 + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2.492 +
2.493 +Also add information on how to contact you by electronic and paper mail.
2.494 +
2.495 +You should also get your employer (if you work as a programmer) or your
2.496 +school, if any, to sign a "copyright disclaimer" for the library, if
2.497 +necessary. Here is a sample; alter the names:
2.498 +
2.499 + Yoyodyne, Inc., hereby disclaims all copyright interest in the
2.500 + library `Frob' (a library for tweaking knobs) written by James Random Hacker.
2.501 +
2.502 + <signature of Ty Coon>, 1 April 1990
2.503 + Ty Coon, President of Vice
2.504 +
2.505 +That's all there is to it!
2.506 +
2.507 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/mythtv_plugin/ChangeLog Wed Sep 20 23:59:48 2006 +0100
3.3 @@ -0,0 +1,24 @@
3.4 +2006-08-17 Rosfran Borges <rosfran.borges@indt.org.br>
3.5 + * Added the correct gstreamer-base package (GSTBASE) at the configure.ac;
3.6 + GSTBASE_CFLAGS and GSTBASE_LIBS variables had the same values from
3.7 + the GST_CFLAGS/GST_LIBS.
3.8 +
3.9 +2006-08-16 Rosfran Borges <rosfran.borges@indt.org.br>
3.10 + * Fixed some installation issues, regarding lib-installing to the
3.11 + correct directory, and copying the header files to the destination
3.12 + dir (make install).
3.13 + * Put 'pkg-config' resource to the Maemo Myth library. The name of the
3.14 + PKG-CONFIG resource is 'maemo-myth', plus the minor and major version.
3.15 + Actually, the version is '0.1', so the library config file is:
3.16 + 'maemo-myth-0.1.pc'. You can type: 'pkg-config --cflags --libs
3.17 + maemo-myth-0.1'.
3.18 + * Many adjustments in the automake/autoconf configuration files
3.19 + (configure.ac, Makefile.am) - some autotools misusage fixed.
3.20 + * Added the MythURI structure, and the URI parsing utility functions
3.21 + (missing in the GLib).
3.22 + * Some functions were exported (myth_socket, mmyth_context), that's
3.23 + why many ther modules need to use them.
3.24 + * Fixed some library dependencies.
3.25 + * Prepared to be used inside the GStreamer (linking with the MythTV
3.26 + plug-in).
3.27 +
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/mythtv_plugin/INSTALL Wed Sep 20 23:59:48 2006 +0100
4.3 @@ -0,0 +1,182 @@
4.4 +Basic Installation
4.5 +==================
4.6 +
4.7 + These are generic installation instructions.
4.8 +
4.9 + The `configure' shell script attempts to guess correct values for
4.10 +various system-dependent variables used during compilation. It uses
4.11 +those values to create a `Makefile' in each directory of the package.
4.12 +It may also create one or more `.h' files containing system-dependent
4.13 +definitions. Finally, it creates a shell script `config.status' that
4.14 +you can run in the future to recreate the current configuration, a file
4.15 +`config.cache' that saves the results of its tests to speed up
4.16 +reconfiguring, and a file `config.log' containing compiler output
4.17 +(useful mainly for debugging `configure').
4.18 +
4.19 + If you need to do unusual things to compile the package, please try
4.20 +to figure out how `configure' could check whether to do them, and mail
4.21 +diffs or instructions to the address given in the `README' so they can
4.22 +be considered for the next release. If at some point `config.cache'
4.23 +contains results you don't want to keep, you may remove or edit it.
4.24 +
4.25 + The file `configure.in' is used to create `configure' by a program
4.26 +called `autoconf'. You only need `configure.in' if you want to change
4.27 +it or regenerate `configure' using a newer version of `autoconf'.
4.28 +
4.29 +The simplest way to compile this package is:
4.30 +
4.31 + 1. `cd' to the directory containing the package's source code and type
4.32 + `./configure' to configure the package for your system. If you're
4.33 + using `csh' on an old version of System V, you might need to type
4.34 + `sh ./configure' instead to prevent `csh' from trying to execute
4.35 + `configure' itself.
4.36 +
4.37 + Running `configure' takes awhile. While running, it prints some
4.38 + messages telling which features it is checking for.
4.39 +
4.40 + 2. Type `make' to compile the package.
4.41 +
4.42 + 3. Optionally, type `make check' to run any self-tests that come with
4.43 + the package.
4.44 +
4.45 + 4. Type `make install' to install the programs and any data files and
4.46 + documentation.
4.47 +
4.48 + 5. You can remove the program binaries and object files from the
4.49 + source code directory by typing `make clean'. To also remove the
4.50 + files that `configure' created (so you can compile the package for
4.51 + a different kind of computer), type `make distclean'. There is
4.52 + also a `make maintainer-clean' target, but that is intended mainly
4.53 + for the package's developers. If you use it, you may have to get
4.54 + all sorts of other programs in order to regenerate files that came
4.55 + with the distribution.
4.56 +
4.57 +Compilers and Options
4.58 +=====================
4.59 +
4.60 + Some systems require unusual options for compilation or linking that
4.61 +the `configure' script does not know about. You can give `configure'
4.62 +initial values for variables by setting them in the environment. Using
4.63 +a Bourne-compatible shell, you can do that on the command line like
4.64 +this:
4.65 + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
4.66 +
4.67 +Or on systems that have the `env' program, you can do it like this:
4.68 + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
4.69 +
4.70 +Compiling For Multiple Architectures
4.71 +====================================
4.72 +
4.73 + You can compile the package for more than one kind of computer at the
4.74 +same time, by placing the object files for each architecture in their
4.75 +own directory. To do this, you must use a version of `make' that
4.76 +supports the `VPATH' variable, such as GNU `make'. `cd' to the
4.77 +directory where you want the object files and executables to go and run
4.78 +the `configure' script. `configure' automatically checks for the
4.79 +source code in the directory that `configure' is in and in `..'.
4.80 +
4.81 + If you have to use a `make' that does not supports the `VPATH'
4.82 +variable, you have to compile the package for one architecture at a time
4.83 +in the source code directory. After you have installed the package for
4.84 +one architecture, use `make distclean' before reconfiguring for another
4.85 +architecture.
4.86 +
4.87 +Installation Names
4.88 +==================
4.89 +
4.90 + By default, `make install' will install the package's files in
4.91 +`/usr/local/bin', `/usr/local/man', etc. You can specify an
4.92 +installation prefix other than `/usr/local' by giving `configure' the
4.93 +option `--prefix=PATH'.
4.94 +
4.95 + You can specify separate installation prefixes for
4.96 +architecture-specific files and architecture-independent files. If you
4.97 +give `configure' the option `--exec-prefix=PATH', the package will use
4.98 +PATH as the prefix for installing programs and libraries.
4.99 +Documentation and other data files will still use the regular prefix.
4.100 +
4.101 + In addition, if you use an unusual directory layout you can give
4.102 +options like `--bindir=PATH' to specify different values for particular
4.103 +kinds of files. Run `configure --help' for a list of the directories
4.104 +you can set and what kinds of files go in them.
4.105 +
4.106 + If the package supports it, you can cause programs to be installed
4.107 +with an extra prefix or suffix on their names by giving `configure' the
4.108 +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
4.109 +
4.110 +Optional Features
4.111 +=================
4.112 +
4.113 + Some packages pay attention to `--enable-FEATURE' options to
4.114 +`configure', where FEATURE indicates an optional part of the package.
4.115 +They may also pay attention to `--with-PACKAGE' options, where PACKAGE
4.116 +is something like `gnu-as' or `x' (for the X Window System). The
4.117 +`README' should mention any `--enable-' and `--with-' options that the
4.118 +package recognizes.
4.119 +
4.120 + For packages that use the X Window System, `configure' can usually
4.121 +find the X include and library files automatically, but if it doesn't,
4.122 +you can use the `configure' options `--x-includes=DIR' and
4.123 +`--x-libraries=DIR' to specify their locations.
4.124 +
4.125 +Specifying the System Type
4.126 +==========================
4.127 +
4.128 + There may be some features `configure' can not figure out
4.129 +automatically, but needs to determine by the type of host the package
4.130 +will run on. Usually `configure' can figure that out, but if it prints
4.131 +a message saying it can not guess the host type, give it the
4.132 +`--host=TYPE' option. TYPE can either be a short name for the system
4.133 +type, such as `sun4', or a canonical name with three fields:
4.134 + CPU-COMPANY-SYSTEM
4.135 +
4.136 +See the file `config.sub' for the possible values of each field. If
4.137 +`config.sub' isn't included in this package, then this package doesn't
4.138 +need to know the host type.
4.139 +
4.140 + If you are building compiler tools for cross-compiling, you can also
4.141 +use the `--target=TYPE' option to select the type of system they will
4.142 +produce code for and the `--build=TYPE' option to select the type of
4.143 +system on which you are compiling the package.
4.144 +
4.145 +Sharing Defaults
4.146 +================
4.147 +
4.148 + If you want to set default values for `configure' scripts to share,
4.149 +you can create a site shell script called `config.site' that gives
4.150 +default values for variables like `CC', `cache_file', and `prefix'.
4.151 +`configure' looks for `PREFIX/share/config.site' if it exists, then
4.152 +`PREFIX/etc/config.site' if it exists. Or, you can set the
4.153 +`CONFIG_SITE' environment variable to the location of the site script.
4.154 +A warning: not all `configure' scripts look for a site script.
4.155 +
4.156 +Operation Controls
4.157 +==================
4.158 +
4.159 + `configure' recognizes the following options to control how it
4.160 +operates.
4.161 +
4.162 +`--cache-file=FILE'
4.163 + Use and save the results of the tests in FILE instead of
4.164 + `./config.cache'. Set FILE to `/dev/null' to disable caching, for
4.165 + debugging `configure'.
4.166 +
4.167 +`--help'
4.168 + Print a summary of the options to `configure', and exit.
4.169 +
4.170 +`--quiet'
4.171 +`--silent'
4.172 +`-q'
4.173 + Do not print messages saying which checks are being made. To
4.174 + suppress all normal output, redirect it to `/dev/null' (any error
4.175 + messages will still be shown).
4.176 +
4.177 +`--srcdir=DIR'
4.178 + Look for the package's source code in directory DIR. Usually
4.179 + `configure' can determine that directory automatically.
4.180 +
4.181 +`--version'
4.182 + Print the version of Autoconf used to generate the `configure'
4.183 + script, and exit.
4.184 +
4.185 +`configure' also accepts some other, not widely useful, options.
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/mythtv_plugin/Makefile.am Wed Sep 20 23:59:48 2006 +0100
5.3 @@ -0,0 +1,27 @@
5.4 +plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@
5.5 +
5.6 +plugin_LTLIBRARIES = libgstmythtvsrc.la
5.7 +
5.8 +libgstmythtvsrc_la_SOURCES = \
5.9 + gstmythtvsrc.c \
5.10 + myth_uri.c \
5.11 + myth_file_transfer.c \
5.12 + myth_livetv.c
5.13 +
5.14 +libgstmythtvsrc_la_CFLAGS = \
5.15 + $(GST_CFLAGS) \
5.16 + $(GMYTH_CFLAGS)
5.17 +
5.18 +libgstmythtvsrc_la_LDFLAGS = \
5.19 + $(GST_PLUGIN_LDFLAGS)
5.20 +
5.21 +libgstmythtvsrc_la_LIBADD = \
5.22 + $(GST_BASE_LIBS) \
5.23 + $(GMYTH_LIBS)
5.24 +
5.25 +noinst_HEADERS = \
5.26 + gstmythtvsrc.h \
5.27 + myth_uri.h \
5.28 + myth_file_transfer.h \
5.29 + myth_livetv.h
5.30 +
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/mythtv_plugin/aclocal.m4 Wed Sep 20 23:59:48 2006 +0100
6.3 @@ -0,0 +1,6928 @@
6.4 +# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
6.5 +
6.6 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
6.7 +# 2005 Free Software Foundation, Inc.
6.8 +# This file is free software; the Free Software Foundation
6.9 +# gives unlimited permission to copy and/or distribute it,
6.10 +# with or without modifications, as long as this notice is preserved.
6.11 +
6.12 +# This program is distributed in the hope that it will be useful,
6.13 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
6.14 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
6.15 +# PARTICULAR PURPOSE.
6.16 +
6.17 +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
6.18 +
6.19 +# serial 47 AC_PROG_LIBTOOL
6.20 +# Debian $Rev: 214 $
6.21 +
6.22 +
6.23 +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
6.24 +# -----------------------------------------------------------
6.25 +# If this macro is not defined by Autoconf, define it here.
6.26 +m4_ifdef([AC_PROVIDE_IFELSE],
6.27 + [],
6.28 + [m4_define([AC_PROVIDE_IFELSE],
6.29 + [m4_ifdef([AC_PROVIDE_$1],
6.30 + [$2], [$3])])])
6.31 +
6.32 +
6.33 +# AC_PROG_LIBTOOL
6.34 +# ---------------
6.35 +AC_DEFUN([AC_PROG_LIBTOOL],
6.36 +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
6.37 +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
6.38 +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
6.39 + AC_PROVIDE_IFELSE([AC_PROG_CXX],
6.40 + [AC_LIBTOOL_CXX],
6.41 + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
6.42 + ])])
6.43 +dnl And a similar setup for Fortran 77 support
6.44 + AC_PROVIDE_IFELSE([AC_PROG_F77],
6.45 + [AC_LIBTOOL_F77],
6.46 + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
6.47 +])])
6.48 +
6.49 +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
6.50 +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
6.51 +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
6.52 + AC_PROVIDE_IFELSE([AC_PROG_GCJ],
6.53 + [AC_LIBTOOL_GCJ],
6.54 + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
6.55 + [AC_LIBTOOL_GCJ],
6.56 + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
6.57 + [AC_LIBTOOL_GCJ],
6.58 + [ifdef([AC_PROG_GCJ],
6.59 + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6.60 + ifdef([A][M_PROG_GCJ],
6.61 + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6.62 + ifdef([LT_AC_PROG_GCJ],
6.63 + [define([LT_AC_PROG_GCJ],
6.64 + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
6.65 +])])# AC_PROG_LIBTOOL
6.66 +
6.67 +
6.68 +# _AC_PROG_LIBTOOL
6.69 +# ----------------
6.70 +AC_DEFUN([_AC_PROG_LIBTOOL],
6.71 +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
6.72 +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
6.73 +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
6.74 +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
6.75 +
6.76 +# This can be used to rebuild libtool when needed
6.77 +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
6.78 +
6.79 +# Always use our own libtool.
6.80 +LIBTOOL='$(SHELL) $(top_builddir)/libtool'
6.81 +AC_SUBST(LIBTOOL)dnl
6.82 +
6.83 +# Prevent multiple expansion
6.84 +define([AC_PROG_LIBTOOL], [])
6.85 +])# _AC_PROG_LIBTOOL
6.86 +
6.87 +
6.88 +# AC_LIBTOOL_SETUP
6.89 +# ----------------
6.90 +AC_DEFUN([AC_LIBTOOL_SETUP],
6.91 +[AC_PREREQ(2.50)dnl
6.92 +AC_REQUIRE([AC_ENABLE_SHARED])dnl
6.93 +AC_REQUIRE([AC_ENABLE_STATIC])dnl
6.94 +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
6.95 +AC_REQUIRE([AC_CANONICAL_HOST])dnl
6.96 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
6.97 +AC_REQUIRE([AC_PROG_CC])dnl
6.98 +AC_REQUIRE([AC_PROG_LD])dnl
6.99 +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
6.100 +AC_REQUIRE([AC_PROG_NM])dnl
6.101 +
6.102 +AC_REQUIRE([AC_PROG_LN_S])dnl
6.103 +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
6.104 +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6.105 +AC_REQUIRE([AC_OBJEXT])dnl
6.106 +AC_REQUIRE([AC_EXEEXT])dnl
6.107 +dnl
6.108 +
6.109 +AC_LIBTOOL_SYS_MAX_CMD_LEN
6.110 +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6.111 +AC_LIBTOOL_OBJDIR
6.112 +
6.113 +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6.114 +_LT_AC_PROG_ECHO_BACKSLASH
6.115 +
6.116 +case $host_os in
6.117 +aix3*)
6.118 + # AIX sometimes has problems with the GCC collect2 program. For some
6.119 + # reason, if we set the COLLECT_NAMES environment variable, the problems
6.120 + # vanish in a puff of smoke.
6.121 + if test "X${COLLECT_NAMES+set}" != Xset; then
6.122 + COLLECT_NAMES=
6.123 + export COLLECT_NAMES
6.124 + fi
6.125 + ;;
6.126 +esac
6.127 +
6.128 +# Sed substitution that helps us do robust quoting. It backslashifies
6.129 +# metacharacters that are still active within double-quoted strings.
6.130 +Xsed='sed -e s/^X//'
6.131 +[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
6.132 +
6.133 +# Same as above, but do not quote variable references.
6.134 +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
6.135 +
6.136 +# Sed substitution to delay expansion of an escaped shell variable in a
6.137 +# double_quote_subst'ed string.
6.138 +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6.139 +
6.140 +# Sed substitution to avoid accidental globbing in evaled expressions
6.141 +no_glob_subst='s/\*/\\\*/g'
6.142 +
6.143 +# Constants:
6.144 +rm="rm -f"
6.145 +
6.146 +# Global variables:
6.147 +default_ofile=libtool
6.148 +can_build_shared=yes
6.149 +
6.150 +# All known linkers require a `.a' archive for static linking (except M$VC,
6.151 +# which needs '.lib').
6.152 +libext=a
6.153 +ltmain="$ac_aux_dir/ltmain.sh"
6.154 +ofile="$default_ofile"
6.155 +with_gnu_ld="$lt_cv_prog_gnu_ld"
6.156 +
6.157 +AC_CHECK_TOOL(AR, ar, false)
6.158 +AC_CHECK_TOOL(RANLIB, ranlib, :)
6.159 +AC_CHECK_TOOL(STRIP, strip, :)
6.160 +
6.161 +old_CC="$CC"
6.162 +old_CFLAGS="$CFLAGS"
6.163 +
6.164 +# Set sane defaults for various variables
6.165 +test -z "$AR" && AR=ar
6.166 +test -z "$AR_FLAGS" && AR_FLAGS=cru
6.167 +test -z "$AS" && AS=as
6.168 +test -z "$CC" && CC=cc
6.169 +test -z "$LTCC" && LTCC=$CC
6.170 +test -z "$DLLTOOL" && DLLTOOL=dlltool
6.171 +test -z "$LD" && LD=ld
6.172 +test -z "$LN_S" && LN_S="ln -s"
6.173 +test -z "$MAGIC_CMD" && MAGIC_CMD=file
6.174 +test -z "$NM" && NM=nm
6.175 +test -z "$SED" && SED=sed
6.176 +test -z "$OBJDUMP" && OBJDUMP=objdump
6.177 +test -z "$RANLIB" && RANLIB=:
6.178 +test -z "$STRIP" && STRIP=:
6.179 +test -z "$ac_objext" && ac_objext=o
6.180 +
6.181 +# Determine commands to create old-style static archives.
6.182 +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
6.183 +old_postinstall_cmds='chmod 644 $oldlib'
6.184 +old_postuninstall_cmds=
6.185 +
6.186 +if test -n "$RANLIB"; then
6.187 + case $host_os in
6.188 + openbsd*)
6.189 + old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
6.190 + ;;
6.191 + *)
6.192 + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
6.193 + ;;
6.194 + esac
6.195 + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6.196 +fi
6.197 +
6.198 +# Only perform the check for file, if the check method requires it
6.199 +case $deplibs_check_method in
6.200 +file_magic*)
6.201 + if test "$file_magic_cmd" = '$MAGIC_CMD'; then
6.202 + AC_PATH_MAGIC
6.203 + fi
6.204 + ;;
6.205 +esac
6.206 +
6.207 +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
6.208 +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6.209 +enable_win32_dll=yes, enable_win32_dll=no)
6.210 +
6.211 +AC_ARG_ENABLE([libtool-lock],
6.212 + [AC_HELP_STRING([--disable-libtool-lock],
6.213 + [avoid locking (might break parallel builds)])])
6.214 +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6.215 +
6.216 +AC_ARG_WITH([pic],
6.217 + [AC_HELP_STRING([--with-pic],
6.218 + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
6.219 + [pic_mode="$withval"],
6.220 + [pic_mode=default])
6.221 +test -z "$pic_mode" && pic_mode=default
6.222 +
6.223 +# Use C for the default configuration in the libtool script
6.224 +tagname=
6.225 +AC_LIBTOOL_LANG_C_CONFIG
6.226 +_LT_AC_TAGCONFIG
6.227 +])# AC_LIBTOOL_SETUP
6.228 +
6.229 +
6.230 +# _LT_AC_SYS_COMPILER
6.231 +# -------------------
6.232 +AC_DEFUN([_LT_AC_SYS_COMPILER],
6.233 +[AC_REQUIRE([AC_PROG_CC])dnl
6.234 +
6.235 +# If no C compiler was specified, use CC.
6.236 +LTCC=${LTCC-"$CC"}
6.237 +
6.238 +# Allow CC to be a program name with arguments.
6.239 +compiler=$CC
6.240 +])# _LT_AC_SYS_COMPILER
6.241 +
6.242 +
6.243 +# _LT_AC_SYS_LIBPATH_AIX
6.244 +# ----------------------
6.245 +# Links a minimal program and checks the executable
6.246 +# for the system default hardcoded library path. In most cases,
6.247 +# this is /usr/lib:/lib, but when the MPI compilers are used
6.248 +# the location of the communication and MPI libs are included too.
6.249 +# If we don't find anything, use the default library path according
6.250 +# to the aix ld manual.
6.251 +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
6.252 +[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
6.253 +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
6.254 +}'`
6.255 +# Check for a 64-bit object if we didn't find anything.
6.256 +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
6.257 +}'`; fi],[])
6.258 +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
6.259 +])# _LT_AC_SYS_LIBPATH_AIX
6.260 +
6.261 +
6.262 +# _LT_AC_SHELL_INIT(ARG)
6.263 +# ----------------------
6.264 +AC_DEFUN([_LT_AC_SHELL_INIT],
6.265 +[ifdef([AC_DIVERSION_NOTICE],
6.266 + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
6.267 + [AC_DIVERT_PUSH(NOTICE)])
6.268 +$1
6.269 +AC_DIVERT_POP
6.270 +])# _LT_AC_SHELL_INIT
6.271 +
6.272 +
6.273 +# _LT_AC_PROG_ECHO_BACKSLASH
6.274 +# --------------------------
6.275 +# Add some code to the start of the generated configure script which
6.276 +# will find an echo command which doesn't interpret backslashes.
6.277 +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
6.278 +[_LT_AC_SHELL_INIT([
6.279 +# Check that we are running under the correct shell.
6.280 +SHELL=${CONFIG_SHELL-/bin/sh}
6.281 +
6.282 +case X$ECHO in
6.283 +X*--fallback-echo)
6.284 + # Remove one level of quotation (which was required for Make).
6.285 + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
6.286 + ;;
6.287 +esac
6.288 +
6.289 +echo=${ECHO-echo}
6.290 +if test "X[$]1" = X--no-reexec; then
6.291 + # Discard the --no-reexec flag, and continue.
6.292 + shift
6.293 +elif test "X[$]1" = X--fallback-echo; then
6.294 + # Avoid inline document here, it may be left over
6.295 + :
6.296 +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
6.297 + # Yippee, $echo works!
6.298 + :
6.299 +else
6.300 + # Restart under the correct shell.
6.301 + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
6.302 +fi
6.303 +
6.304 +if test "X[$]1" = X--fallback-echo; then
6.305 + # used as fallback echo
6.306 + shift
6.307 + cat <<EOF
6.308 +[$]*
6.309 +EOF
6.310 + exit 0
6.311 +fi
6.312 +
6.313 +# The HP-UX ksh and POSIX shell print the target directory to stdout
6.314 +# if CDPATH is set.
6.315 +if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6.316 +
6.317 +if test -z "$ECHO"; then
6.318 +if test "X${echo_test_string+set}" != Xset; then
6.319 +# find a string as large as possible, as long as the shell can cope with it
6.320 + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
6.321 + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
6.322 + if (echo_test_string="`eval $cmd`") 2>/dev/null &&
6.323 + echo_test_string="`eval $cmd`" &&
6.324 + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
6.325 + then
6.326 + break
6.327 + fi
6.328 + done
6.329 +fi
6.330 +
6.331 +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6.332 + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6.333 + test "X$echo_testing_string" = "X$echo_test_string"; then
6.334 + :
6.335 +else
6.336 + # The Solaris, AIX, and Digital Unix default echo programs unquote
6.337 + # backslashes. This makes it impossible to quote backslashes using
6.338 + # echo "$something" | sed 's/\\/\\\\/g'
6.339 + #
6.340 + # So, first we look for a working echo in the user's PATH.
6.341 +
6.342 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6.343 + for dir in $PATH /usr/ucb; do
6.344 + IFS="$lt_save_ifs"
6.345 + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
6.346 + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
6.347 + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
6.348 + test "X$echo_testing_string" = "X$echo_test_string"; then
6.349 + echo="$dir/echo"
6.350 + break
6.351 + fi
6.352 + done
6.353 + IFS="$lt_save_ifs"
6.354 +
6.355 + if test "X$echo" = Xecho; then
6.356 + # We didn't find a better echo, so look for alternatives.
6.357 + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
6.358 + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
6.359 + test "X$echo_testing_string" = "X$echo_test_string"; then
6.360 + # This shell has a builtin print -r that does the trick.
6.361 + echo='print -r'
6.362 + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
6.363 + test "X$CONFIG_SHELL" != X/bin/ksh; then
6.364 + # If we have ksh, try running configure again with it.
6.365 + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
6.366 + export ORIGINAL_CONFIG_SHELL
6.367 + CONFIG_SHELL=/bin/ksh
6.368 + export CONFIG_SHELL
6.369 + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
6.370 + else
6.371 + # Try using printf.
6.372 + echo='printf %s\n'
6.373 + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6.374 + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6.375 + test "X$echo_testing_string" = "X$echo_test_string"; then
6.376 + # Cool, printf works
6.377 + :
6.378 + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6.379 + test "X$echo_testing_string" = 'X\t' &&
6.380 + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6.381 + test "X$echo_testing_string" = "X$echo_test_string"; then
6.382 + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
6.383 + export CONFIG_SHELL
6.384 + SHELL="$CONFIG_SHELL"
6.385 + export SHELL
6.386 + echo="$CONFIG_SHELL [$]0 --fallback-echo"
6.387 + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6.388 + test "X$echo_testing_string" = 'X\t' &&
6.389 + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6.390 + test "X$echo_testing_string" = "X$echo_test_string"; then
6.391 + echo="$CONFIG_SHELL [$]0 --fallback-echo"
6.392 + else
6.393 + # maybe with a smaller string...
6.394 + prev=:
6.395 +
6.396 + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
6.397 + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
6.398 + then
6.399 + break
6.400 + fi
6.401 + prev="$cmd"
6.402 + done
6.403 +
6.404 + if test "$prev" != 'sed 50q "[$]0"'; then
6.405 + echo_test_string=`eval $prev`
6.406 + export echo_test_string
6.407 + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
6.408 + else
6.409 + # Oops. We lost completely, so just stick with echo.
6.410 + echo=echo
6.411 + fi
6.412 + fi
6.413 + fi
6.414 + fi
6.415 +fi
6.416 +fi
6.417 +
6.418 +# Copy echo and quote the copy suitably for passing to libtool from
6.419 +# the Makefile, instead of quoting the original, which is used later.
6.420 +ECHO=$echo
6.421 +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
6.422 + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
6.423 +fi
6.424 +
6.425 +AC_SUBST(ECHO)
6.426 +])])# _LT_AC_PROG_ECHO_BACKSLASH
6.427 +
6.428 +
6.429 +# _LT_AC_LOCK
6.430 +# -----------
6.431 +AC_DEFUN([_LT_AC_LOCK],
6.432 +[AC_ARG_ENABLE([libtool-lock],
6.433 + [AC_HELP_STRING([--disable-libtool-lock],
6.434 + [avoid locking (might break parallel builds)])])
6.435 +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6.436 +
6.437 +# Some flags need to be propagated to the compiler or linker for good
6.438 +# libtool support.
6.439 +case $host in
6.440 +ia64-*-hpux*)
6.441 + # Find out which ABI we are using.
6.442 + echo 'int i;' > conftest.$ac_ext
6.443 + if AC_TRY_EVAL(ac_compile); then
6.444 + case `/usr/bin/file conftest.$ac_objext` in
6.445 + *ELF-32*)
6.446 + HPUX_IA64_MODE="32"
6.447 + ;;
6.448 + *ELF-64*)
6.449 + HPUX_IA64_MODE="64"
6.450 + ;;
6.451 + esac
6.452 + fi
6.453 + rm -rf conftest*
6.454 + ;;
6.455 +*-*-irix6*)
6.456 + # Find out which ABI we are using.
6.457 + echo '[#]line __oline__ "configure"' > conftest.$ac_ext
6.458 + if AC_TRY_EVAL(ac_compile); then
6.459 + if test "$lt_cv_prog_gnu_ld" = yes; then
6.460 + case `/usr/bin/file conftest.$ac_objext` in
6.461 + *32-bit*)
6.462 + LD="${LD-ld} -melf32bsmip"
6.463 + ;;
6.464 + *N32*)
6.465 + LD="${LD-ld} -melf32bmipn32"
6.466 + ;;
6.467 + *64-bit*)
6.468 + LD="${LD-ld} -melf64bmip"
6.469 + ;;
6.470 + esac
6.471 + else
6.472 + case `/usr/bin/file conftest.$ac_objext` in
6.473 + *32-bit*)
6.474 + LD="${LD-ld} -32"
6.475 + ;;
6.476 + *N32*)
6.477 + LD="${LD-ld} -n32"
6.478 + ;;
6.479 + *64-bit*)
6.480 + LD="${LD-ld} -64"
6.481 + ;;
6.482 + esac
6.483 + fi
6.484 + fi
6.485 + rm -rf conftest*
6.486 + ;;
6.487 +
6.488 +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6.489 + # Find out which ABI we are using.
6.490 + echo 'int i;' > conftest.$ac_ext
6.491 + if AC_TRY_EVAL(ac_compile); then
6.492 + case "`/usr/bin/file conftest.o`" in
6.493 + *32-bit*)
6.494 + case $host in
6.495 + x86_64-*linux*)
6.496 + LD="${LD-ld} -m elf_i386"
6.497 + ;;
6.498 + ppc64-*linux*|powerpc64-*linux*)
6.499 + LD="${LD-ld} -m elf32ppclinux"
6.500 + ;;
6.501 + s390x-*linux*)
6.502 + LD="${LD-ld} -m elf_s390"
6.503 + ;;
6.504 + sparc64-*linux*)
6.505 + LD="${LD-ld} -m elf32_sparc"
6.506 + ;;
6.507 + esac
6.508 + ;;
6.509 + *64-bit*)
6.510 + case $host in
6.511 + x86_64-*linux*)
6.512 + LD="${LD-ld} -m elf_x86_64"
6.513 + ;;
6.514 + ppc*-*linux*|powerpc*-*linux*)
6.515 + LD="${LD-ld} -m elf64ppc"
6.516 + ;;
6.517 + s390*-*linux*)
6.518 + LD="${LD-ld} -m elf64_s390"
6.519 + ;;
6.520 + sparc*-*linux*)
6.521 + LD="${LD-ld} -m elf64_sparc"
6.522 + ;;
6.523 + esac
6.524 + ;;
6.525 + esac
6.526 + fi
6.527 + rm -rf conftest*
6.528 + ;;
6.529 +
6.530 +*-*-sco3.2v5*)
6.531 + # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6.532 + SAVE_CFLAGS="$CFLAGS"
6.533 + CFLAGS="$CFLAGS -belf"
6.534 + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
6.535 + [AC_LANG_PUSH(C)
6.536 + AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
6.537 + AC_LANG_POP])
6.538 + if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6.539 + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6.540 + CFLAGS="$SAVE_CFLAGS"
6.541 + fi
6.542 + ;;
6.543 +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6.544 +[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
6.545 + AC_CHECK_TOOL(DLLTOOL, dlltool, false)
6.546 + AC_CHECK_TOOL(AS, as, false)
6.547 + AC_CHECK_TOOL(OBJDUMP, objdump, false)
6.548 + ;;
6.549 + ])
6.550 +esac
6.551 +
6.552 +need_locks="$enable_libtool_lock"
6.553 +
6.554 +])# _LT_AC_LOCK
6.555 +
6.556 +
6.557 +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6.558 +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6.559 +# ----------------------------------------------------------------
6.560 +# Check whether the given compiler option works
6.561 +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6.562 +[AC_REQUIRE([LT_AC_PROG_SED])
6.563 +AC_CACHE_CHECK([$1], [$2],
6.564 + [$2=no
6.565 + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6.566 + printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6.567 + lt_compiler_flag="$3"
6.568 + # Insert the option either (1) after the last *FLAGS variable, or
6.569 + # (2) before a word containing "conftest.", or (3) at the end.
6.570 + # Note that $ac_compile itself does not contain backslashes and begins
6.571 + # with a dollar sign (not a hyphen), so the echo should work correctly.
6.572 + # The option is referenced via a variable to avoid confusing sed.
6.573 + lt_compile=`echo "$ac_compile" | $SED \
6.574 + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6.575 + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6.576 + -e 's:$: $lt_compiler_flag:'`
6.577 + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6.578 + (eval "$lt_compile" 2>conftest.err)
6.579 + ac_status=$?
6.580 + cat conftest.err >&AS_MESSAGE_LOG_FD
6.581 + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6.582 + if (exit $ac_status) && test -s "$ac_outfile"; then
6.583 + # The compiler can only warn and ignore the option if not recognized
6.584 + # So say no if there are warnings
6.585 + if test ! -s conftest.err; then
6.586 + $2=yes
6.587 + fi
6.588 + fi
6.589 + $rm conftest*
6.590 +])
6.591 +
6.592 +if test x"[$]$2" = xyes; then
6.593 + ifelse([$5], , :, [$5])
6.594 +else
6.595 + ifelse([$6], , :, [$6])
6.596 +fi
6.597 +])# AC_LIBTOOL_COMPILER_OPTION
6.598 +
6.599 +
6.600 +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6.601 +# [ACTION-SUCCESS], [ACTION-FAILURE])
6.602 +# ------------------------------------------------------------
6.603 +# Check whether the given compiler option works
6.604 +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6.605 +[AC_CACHE_CHECK([$1], [$2],
6.606 + [$2=no
6.607 + save_LDFLAGS="$LDFLAGS"
6.608 + LDFLAGS="$LDFLAGS $3"
6.609 + printf "$lt_simple_link_test_code" > conftest.$ac_ext
6.610 + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6.611 + # The compiler can only warn and ignore the option if not recognized
6.612 + # So say no if there are warnings
6.613 + if test -s conftest.err; then
6.614 + # Append any errors to the config.log.
6.615 + cat conftest.err 1>&AS_MESSAGE_LOG_FD
6.616 + else
6.617 + $2=yes
6.618 + fi
6.619 + fi
6.620 + $rm conftest*
6.621 + LDFLAGS="$save_LDFLAGS"
6.622 +])
6.623 +
6.624 +if test x"[$]$2" = xyes; then
6.625 + ifelse([$4], , :, [$4])
6.626 +else
6.627 + ifelse([$5], , :, [$5])
6.628 +fi
6.629 +])# AC_LIBTOOL_LINKER_OPTION
6.630 +
6.631 +
6.632 +# AC_LIBTOOL_SYS_MAX_CMD_LEN
6.633 +# --------------------------
6.634 +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
6.635 +[# find the maximum length of command line arguments
6.636 +AC_MSG_CHECKING([the maximum length of command line arguments])
6.637 +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6.638 + i=0
6.639 + teststring="ABCD"
6.640 +
6.641 + case $build_os in
6.642 + msdosdjgpp*)
6.643 + # On DJGPP, this test can blow up pretty badly due to problems in libc
6.644 + # (any single argument exceeding 2000 bytes causes a buffer overrun
6.645 + # during glob expansion). Even if it were fixed, the result of this
6.646 + # check would be larger than it should be.
6.647 + lt_cv_sys_max_cmd_len=12288; # 12K is about right
6.648 + ;;
6.649 +
6.650 + gnu*)
6.651 + # Under GNU Hurd, this test is not required because there is
6.652 + # no limit to the length of command line arguments.
6.653 + # Libtool will interpret -1 as no limit whatsoever
6.654 + lt_cv_sys_max_cmd_len=-1;
6.655 + ;;
6.656 +
6.657 + cygwin* | mingw*)
6.658 + # On Win9x/ME, this test blows up -- it succeeds, but takes
6.659 + # about 5 minutes as the teststring grows exponentially.
6.660 + # Worse, since 9x/ME are not pre-emptively multitasking,
6.661 + # you end up with a "frozen" computer, even though with patience
6.662 + # the test eventually succeeds (with a max line length of 256k).
6.663 + # Instead, let's just punt: use the minimum linelength reported by
6.664 + # all of the supported platforms: 8192 (on NT/2K/XP).
6.665 + lt_cv_sys_max_cmd_len=8192;
6.666 + ;;
6.667 +
6.668 + amigaos*)
6.669 + # On AmigaOS with pdksh, this test takes hours, literally.
6.670 + # So we just punt and use a minimum line length of 8192.
6.671 + lt_cv_sys_max_cmd_len=8192;
6.672 + ;;
6.673 +
6.674 + *)
6.675 + # If test is not a shell built-in, we'll probably end up computing a
6.676 + # maximum length that is only half of the actual maximum length, but
6.677 + # we can't tell.
6.678 + while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
6.679 + = "XX$teststring") >/dev/null 2>&1 &&
6.680 + new_result=`expr "X$teststring" : ".*" 2>&1` &&
6.681 + lt_cv_sys_max_cmd_len=$new_result &&
6.682 + test $i != 17 # 1/2 MB should be enough
6.683 + do
6.684 + i=`expr $i + 1`
6.685 + teststring=$teststring$teststring
6.686 + done
6.687 + teststring=
6.688 + # Add a significant safety factor because C++ compilers can tack on massive
6.689 + # amounts of additional arguments before passing them to the linker.
6.690 + # It appears as though 1/2 is a usable value.
6.691 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6.692 + ;;
6.693 + esac
6.694 +])
6.695 +if test -n $lt_cv_sys_max_cmd_len ; then
6.696 + AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6.697 +else
6.698 + AC_MSG_RESULT(none)
6.699 +fi
6.700 +])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6.701 +
6.702 +
6.703 +# _LT_AC_CHECK_DLFCN
6.704 +# --------------------
6.705 +AC_DEFUN([_LT_AC_CHECK_DLFCN],
6.706 +[AC_CHECK_HEADERS(dlfcn.h)dnl
6.707 +])# _LT_AC_CHECK_DLFCN
6.708 +
6.709 +
6.710 +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6.711 +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6.712 +# ------------------------------------------------------------------
6.713 +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6.714 +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6.715 +if test "$cross_compiling" = yes; then :
6.716 + [$4]
6.717 +else
6.718 + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6.719 + lt_status=$lt_dlunknown
6.720 + cat > conftest.$ac_ext <<EOF
6.721 +[#line __oline__ "configure"
6.722 +#include "confdefs.h"
6.723 +
6.724 +#if HAVE_DLFCN_H
6.725 +#include <dlfcn.h>
6.726 +#endif
6.727 +
6.728 +#include <stdio.h>
6.729 +
6.730 +#ifdef RTLD_GLOBAL
6.731 +# define LT_DLGLOBAL RTLD_GLOBAL
6.732 +#else
6.733 +# ifdef DL_GLOBAL
6.734 +# define LT_DLGLOBAL DL_GLOBAL
6.735 +# else
6.736 +# define LT_DLGLOBAL 0
6.737 +# endif
6.738 +#endif
6.739 +
6.740 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6.741 + find out it does not work in some platform. */
6.742 +#ifndef LT_DLLAZY_OR_NOW
6.743 +# ifdef RTLD_LAZY
6.744 +# define LT_DLLAZY_OR_NOW RTLD_LAZY
6.745 +# else
6.746 +# ifdef DL_LAZY
6.747 +# define LT_DLLAZY_OR_NOW DL_LAZY
6.748 +# else
6.749 +# ifdef RTLD_NOW
6.750 +# define LT_DLLAZY_OR_NOW RTLD_NOW
6.751 +# else
6.752 +# ifdef DL_NOW
6.753 +# define LT_DLLAZY_OR_NOW DL_NOW
6.754 +# else
6.755 +# define LT_DLLAZY_OR_NOW 0
6.756 +# endif
6.757 +# endif
6.758 +# endif
6.759 +# endif
6.760 +#endif
6.761 +
6.762 +#ifdef __cplusplus
6.763 +extern "C" void exit (int);
6.764 +#endif
6.765 +
6.766 +void fnord() { int i=42;}
6.767 +int main ()
6.768 +{
6.769 + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6.770 + int status = $lt_dlunknown;
6.771 +
6.772 + if (self)
6.773 + {
6.774 + if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
6.775 + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6.776 + /* dlclose (self); */
6.777 + }
6.778 +
6.779 + exit (status);
6.780 +}]
6.781 +EOF
6.782 + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6.783 + (./conftest; exit; ) 2>/dev/null
6.784 + lt_status=$?
6.785 + case x$lt_status in
6.786 + x$lt_dlno_uscore) $1 ;;
6.787 + x$lt_dlneed_uscore) $2 ;;
6.788 + x$lt_unknown|x*) $3 ;;
6.789 + esac
6.790 + else :
6.791 + # compilation failed
6.792 + $3
6.793 + fi
6.794 +fi
6.795 +rm -fr conftest*
6.796 +])# _LT_AC_TRY_DLOPEN_SELF
6.797 +
6.798 +
6.799 +# AC_LIBTOOL_DLOPEN_SELF
6.800 +# -------------------
6.801 +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6.802 +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6.803 +if test "x$enable_dlopen" != xyes; then
6.804 + enable_dlopen=unknown
6.805 + enable_dlopen_self=unknown
6.806 + enable_dlopen_self_static=unknown
6.807 +else
6.808 + lt_cv_dlopen=no
6.809 + lt_cv_dlopen_libs=
6.810 +
6.811 + case $host_os in
6.812 + beos*)
6.813 + lt_cv_dlopen="load_add_on"
6.814 + lt_cv_dlopen_libs=
6.815 + lt_cv_dlopen_self=yes
6.816 + ;;
6.817 +
6.818 + mingw* | pw32*)
6.819 + lt_cv_dlopen="LoadLibrary"
6.820 + lt_cv_dlopen_libs=
6.821 + ;;
6.822 +
6.823 + cygwin*)
6.824 + lt_cv_dlopen="dlopen"
6.825 + lt_cv_dlopen_libs=
6.826 + ;;
6.827 +
6.828 + darwin*)
6.829 + # if libdl is installed we need to link against it
6.830 + AC_CHECK_LIB([dl], [dlopen],
6.831 + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
6.832 + lt_cv_dlopen="dyld"
6.833 + lt_cv_dlopen_libs=
6.834 + lt_cv_dlopen_self=yes
6.835 + ])
6.836 + ;;
6.837 +
6.838 + *)
6.839 + AC_CHECK_FUNC([shl_load],
6.840 + [lt_cv_dlopen="shl_load"],
6.841 + [AC_CHECK_LIB([dld], [shl_load],
6.842 + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6.843 + [AC_CHECK_FUNC([dlopen],
6.844 + [lt_cv_dlopen="dlopen"],
6.845 + [AC_CHECK_LIB([dl], [dlopen],
6.846 + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6.847 + [AC_CHECK_LIB([svld], [dlopen],
6.848 + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6.849 + [AC_CHECK_LIB([dld], [dld_link],
6.850 + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6.851 + ])
6.852 + ])
6.853 + ])
6.854 + ])
6.855 + ])
6.856 + ;;
6.857 + esac
6.858 +
6.859 + if test "x$lt_cv_dlopen" != xno; then
6.860 + enable_dlopen=yes
6.861 + else
6.862 + enable_dlopen=no
6.863 + fi
6.864 +
6.865 + case $lt_cv_dlopen in
6.866 + dlopen)
6.867 + save_CPPFLAGS="$CPPFLAGS"
6.868 + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6.869 +
6.870 + save_LDFLAGS="$LDFLAGS"
6.871 + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6.872 +
6.873 + save_LIBS="$LIBS"
6.874 + LIBS="$lt_cv_dlopen_libs $LIBS"
6.875 +
6.876 + AC_CACHE_CHECK([whether a program can dlopen itself],
6.877 + lt_cv_dlopen_self, [dnl
6.878 + _LT_AC_TRY_DLOPEN_SELF(
6.879 + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6.880 + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6.881 + ])
6.882 +
6.883 + if test "x$lt_cv_dlopen_self" = xyes; then
6.884 + LDFLAGS="$LDFLAGS $link_static_flag"
6.885 + AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6.886 + lt_cv_dlopen_self_static, [dnl
6.887 + _LT_AC_TRY_DLOPEN_SELF(
6.888 + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6.889 + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
6.890 + ])
6.891 + fi
6.892 +
6.893 + CPPFLAGS="$save_CPPFLAGS"
6.894 + LDFLAGS="$save_LDFLAGS"
6.895 + LIBS="$save_LIBS"
6.896 + ;;
6.897 + esac
6.898 +
6.899 + case $lt_cv_dlopen_self in
6.900 + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6.901 + *) enable_dlopen_self=unknown ;;
6.902 + esac
6.903 +
6.904 + case $lt_cv_dlopen_self_static in
6.905 + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6.906 + *) enable_dlopen_self_static=unknown ;;
6.907 + esac
6.908 +fi
6.909 +])# AC_LIBTOOL_DLOPEN_SELF
6.910 +
6.911 +
6.912 +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6.913 +# ---------------------------------
6.914 +# Check to see if options -c and -o are simultaneously supported by compiler
6.915 +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6.916 +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6.917 +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6.918 + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6.919 + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6.920 + $rm -r conftest 2>/dev/null
6.921 + mkdir conftest
6.922 + cd conftest
6.923 + mkdir out
6.924 + printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6.925 +
6.926 + lt_compiler_flag="-o out/conftest2.$ac_objext"
6.927 + # Insert the option either (1) after the last *FLAGS variable, or
6.928 + # (2) before a word containing "conftest.", or (3) at the end.
6.929 + # Note that $ac_compile itself does not contain backslashes and begins
6.930 + # with a dollar sign (not a hyphen), so the echo should work correctly.
6.931 + lt_compile=`echo "$ac_compile" | $SED \
6.932 + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6.933 + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6.934 + -e 's:$: $lt_compiler_flag:'`
6.935 + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6.936 + (eval "$lt_compile" 2>out/conftest.err)
6.937 + ac_status=$?
6.938 + cat out/conftest.err >&AS_MESSAGE_LOG_FD
6.939 + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6.940 + if (exit $ac_status) && test -s out/conftest2.$ac_objext
6.941 + then
6.942 + # The compiler can only warn and ignore the option if not recognized
6.943 + # So say no if there are warnings
6.944 + if test ! -s out/conftest.err; then
6.945 + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6.946 + fi
6.947 + fi
6.948 + chmod u+w .
6.949 + $rm conftest*
6.950 + # SGI C++ compiler will create directory out/ii_files/ for
6.951 + # template instantiation
6.952 + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
6.953 + $rm out/* && rmdir out
6.954 + cd ..
6.955 + rmdir conftest
6.956 + $rm conftest*
6.957 +])
6.958 +])# AC_LIBTOOL_PROG_CC_C_O
6.959 +
6.960 +
6.961 +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6.962 +# -----------------------------------------
6.963 +# Check to see if we can do hard links to lock some files if needed
6.964 +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6.965 +[AC_REQUIRE([_LT_AC_LOCK])dnl
6.966 +
6.967 +hard_links="nottested"
6.968 +if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6.969 + # do not overwrite the value of need_locks provided by the user
6.970 + AC_MSG_CHECKING([if we can lock with hard links])
6.971 + hard_links=yes
6.972 + $rm conftest*
6.973 + ln conftest.a conftest.b 2>/dev/null && hard_links=no
6.974 + touch conftest.a
6.975 + ln conftest.a conftest.b 2>&5 || hard_links=no
6.976 + ln conftest.a conftest.b 2>/dev/null && hard_links=no
6.977 + AC_MSG_RESULT([$hard_links])
6.978 + if test "$hard_links" = no; then
6.979 + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6.980 + need_locks=warn
6.981 + fi
6.982 +else
6.983 + need_locks=no
6.984 +fi
6.985 +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6.986 +
6.987 +
6.988 +# AC_LIBTOOL_OBJDIR
6.989 +# -----------------
6.990 +AC_DEFUN([AC_LIBTOOL_OBJDIR],
6.991 +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6.992 +[rm -f .libs 2>/dev/null
6.993 +mkdir .libs 2>/dev/null
6.994 +if test -d .libs; then
6.995 + lt_cv_objdir=.libs
6.996 +else
6.997 + # MS-DOS does not allow filenames that begin with a dot.
6.998 + lt_cv_objdir=_libs
6.999 +fi
6.1000 +rmdir .libs 2>/dev/null])
6.1001 +objdir=$lt_cv_objdir
6.1002 +])# AC_LIBTOOL_OBJDIR
6.1003 +
6.1004 +
6.1005 +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
6.1006 +# ----------------------------------------------
6.1007 +# Check hardcoding attributes.
6.1008 +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
6.1009 +[AC_MSG_CHECKING([how to hardcode library paths into programs])
6.1010 +_LT_AC_TAGVAR(hardcode_action, $1)=
6.1011 +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6.1012 + test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
6.1013 + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
6.1014 +
6.1015 + # We can hardcode non-existant directories.
6.1016 + if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6.1017 + # If the only mechanism to avoid hardcoding is shlibpath_var, we
6.1018 + # have to relink, otherwise we might link with an installed library
6.1019 + # when we should be linking with a yet-to-be-installed one
6.1020 + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6.1021 + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6.1022 + # Linking always hardcodes the temporary library directory.
6.1023 + _LT_AC_TAGVAR(hardcode_action, $1)=relink
6.1024 + else
6.1025 + # We can link without hardcoding, and we can hardcode nonexisting dirs.
6.1026 + _LT_AC_TAGVAR(hardcode_action, $1)=immediate
6.1027 + fi
6.1028 +else
6.1029 + # We cannot hardcode anything, or else we can only hardcode existing
6.1030 + # directories.
6.1031 + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6.1032 +fi
6.1033 +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6.1034 +
6.1035 +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6.1036 + # Fast installation is not supported
6.1037 + enable_fast_install=no
6.1038 +elif test "$shlibpath_overrides_runpath" = yes ||
6.1039 + test "$enable_shared" = no; then
6.1040 + # Fast installation is not necessary
6.1041 + enable_fast_install=needless
6.1042 +fi
6.1043 +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6.1044 +
6.1045 +
6.1046 +# AC_LIBTOOL_SYS_LIB_STRIP
6.1047 +# ------------------------
6.1048 +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
6.1049 +[striplib=
6.1050 +old_striplib=
6.1051 +AC_MSG_CHECKING([whether stripping libraries is possible])
6.1052 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6.1053 + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6.1054 + test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6.1055 + AC_MSG_RESULT([yes])
6.1056 +else
6.1057 +# FIXME - insert some real tests, host_os isn't really good enough
6.1058 + case $host_os in
6.1059 + darwin*)
6.1060 + if test -n "$STRIP" ; then
6.1061 + striplib="$STRIP -x"
6.1062 + AC_MSG_RESULT([yes])
6.1063 + else
6.1064 + AC_MSG_RESULT([no])
6.1065 +fi
6.1066 + ;;
6.1067 + *)
6.1068 + AC_MSG_RESULT([no])
6.1069 + ;;
6.1070 + esac
6.1071 +fi
6.1072 +])# AC_LIBTOOL_SYS_LIB_STRIP
6.1073 +
6.1074 +
6.1075 +# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6.1076 +# -----------------------------
6.1077 +# PORTME Fill in your ld.so characteristics
6.1078 +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
6.1079 +[AC_MSG_CHECKING([dynamic linker characteristics])
6.1080 +library_names_spec=
6.1081 +libname_spec='lib$name'
6.1082 +soname_spec=
6.1083 +shrext_cmds=".so"
6.1084 +postinstall_cmds=
6.1085 +postuninstall_cmds=
6.1086 +finish_cmds=
6.1087 +finish_eval=
6.1088 +shlibpath_var=
6.1089 +shlibpath_overrides_runpath=unknown
6.1090 +version_type=none
6.1091 +dynamic_linker="$host_os ld.so"
6.1092 +sys_lib_dlsearch_path_spec="/lib /usr/lib"
6.1093 +if test "$GCC" = yes; then
6.1094 + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
6.1095 + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
6.1096 + # if the path contains ";" then we assume it to be the separator
6.1097 + # otherwise default to the standard path separator (i.e. ":") - it is
6.1098 + # assumed that no part of a normal pathname contains ";" but that should
6.1099 + # okay in the real world where ";" in dirpaths is itself problematic.
6.1100 + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
6.1101 + else
6.1102 + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6.1103 + fi
6.1104 +else
6.1105 + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6.1106 +fi
6.1107 +need_lib_prefix=unknown
6.1108 +hardcode_into_libs=no
6.1109 +
6.1110 +# when you set need_version to no, make sure it does not cause -set_version
6.1111 +# flags to be left without arguments
6.1112 +need_version=unknown
6.1113 +
6.1114 +case $host_os in
6.1115 +aix3*)
6.1116 + version_type=linux
6.1117 + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
6.1118 + shlibpath_var=LIBPATH
6.1119 +
6.1120 + # AIX 3 has no versioning support, so we append a major version to the name.
6.1121 + soname_spec='${libname}${release}${shared_ext}$major'
6.1122 + ;;
6.1123 +
6.1124 +aix4* | aix5*)
6.1125 + version_type=linux
6.1126 + need_lib_prefix=no
6.1127 + need_version=no
6.1128 + hardcode_into_libs=yes
6.1129 + if test "$host_cpu" = ia64; then
6.1130 + # AIX 5 supports IA64
6.1131 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
6.1132 + shlibpath_var=LD_LIBRARY_PATH
6.1133 + else
6.1134 + # With GCC up to 2.95.x, collect2 would create an import file
6.1135 + # for dependence libraries. The import file would start with
6.1136 + # the line `#! .'. This would cause the generated library to
6.1137 + # depend on `.', always an invalid library. This was fixed in
6.1138 + # development snapshots of GCC prior to 3.0.
6.1139 + case $host_os in
6.1140 + aix4 | aix4.[[01]] | aix4.[[01]].*)
6.1141 + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6.1142 + echo ' yes '
6.1143 + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6.1144 + :
6.1145 + else
6.1146 + can_build_shared=no
6.1147 + fi
6.1148 + ;;
6.1149 + esac
6.1150 + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
6.1151 + # soname into executable. Probably we can add versioning support to
6.1152 + # collect2, so additional links can be useful in future.
6.1153 + if test "$aix_use_runtimelinking" = yes; then
6.1154 + # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6.1155 + # instead of lib<name>.a to let people know that these are not
6.1156 + # typical AIX shared libraries.
6.1157 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6.1158 + else
6.1159 + # We preserve .a as extension for shared libraries through AIX4.2
6.1160 + # and later when we are not doing run time linking.
6.1161 + library_names_spec='${libname}${release}.a $libname.a'
6.1162 + soname_spec='${libname}${release}${shared_ext}$major'
6.1163 + fi
6.1164 + shlibpath_var=LIBPATH
6.1165 + fi
6.1166 + ;;
6.1167 +
6.1168 +amigaos*)
6.1169 + library_names_spec='$libname.ixlibrary $libname.a'
6.1170 + # Create ${libname}_ixlibrary.a entries in /sys/libs.
6.1171 + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
6.1172 + ;;
6.1173 +
6.1174 +beos*)
6.1175 + library_names_spec='${libname}${shared_ext}'
6.1176 + dynamic_linker="$host_os ld.so"
6.1177 + shlibpath_var=LIBRARY_PATH
6.1178 + ;;
6.1179 +
6.1180 +bsdi4*)
6.1181 + version_type=linux
6.1182 + need_version=no
6.1183 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6.1184 + soname_spec='${libname}${release}${shared_ext}$major'
6.1185 + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6.1186 + shlibpath_var=LD_LIBRARY_PATH
6.1187 + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6.1188 + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6.1189 + # the default ld.so.conf also contains /usr/contrib/lib and
6.1190 + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6.1191 + # libtool to hard-code these into programs
6.1192 + ;;
6.1193 +
6.1194 +cygwin* | mingw* | pw32*)
6.1195 + version_type=windows
6.1196 + shrext_cmds=".dll"
6.1197 + need_version=no
6.1198 + need_lib_prefix=no
6.1199 +
6.1200 + case $GCC,$host_os in
6.1201 + yes,cygwin* | yes,mingw* | yes,pw32*)
6.1202 + library_names_spec='$libname.dll.a'
6.1203 + # DLL is installed to $(libdir)/../bin by postinstall_cmds
6.1204 + postinstall_cmds='base_file=`basename \${file}`~
6.1205 + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
6.1206 + dldir=$destdir/`dirname \$dlpath`~
6.1207 + test -d \$dldir || mkdir -p \$dldir~
6.1208 + $install_prog $dir/$dlname \$dldir/$dlname'
6.1209 + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6.1210 + dlpath=$dir/\$dldll~
6.1211 + $rm \$dlpath'
6.1212 + shlibpath_overrides_runpath=yes
6.1213 +
6.1214 + case $host_os in
6.1215 + cygwin*)
6.1216 + # Cygwin DLLs use 'cyg' prefix rather than 'lib'
6.1217 + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6.1218 + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
6.1219 + ;;
6.1220 + mingw*)
6.1221 + # MinGW DLLs use traditional 'lib' prefix
6.1222 + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6.1223 + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
6.1224 + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
6.1225 + # It is most probably a Windows format PATH printed by
6.1226 + # mingw gcc, but we are running on Cygwin. Gcc prints its search
6.1227 + # path with ; separators, and with drive letters. We can handle the
6.1228 + # drive letters (cygwin fileutils understands them), so leave them,
6.1229 + # especially as we might pass files found there to a mingw objdump,
6.1230 + # which wouldn't understand a cygwinified path. Ahh.
6.1231 + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
6.1232 + else
6.1233 + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6.1234 + fi
6.1235 + ;;
6.1236 + pw32*)
6.1237 + # pw32 DLLs use 'pw' prefix rather than 'lib'
6.1238 + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
6.1239 + ;;
6.1240 + esac
6.1241 + ;;
6.1242 +
6.1243 + *)
6.1244 + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
6.1245 + ;;
6.1246 + esac
6.1247 + dynamic_linker='Win32 ld.exe'
6.1248 + # FIXME: first we should search . and the directory the executable is in
6.1249 + shlibpath_var=PATH
6.1250 + ;;
6.1251 +
6.1252 +darwin* | rhapsody*)
6.1253 + dynamic_linker="$host_os dyld"
6.1254 + version_type=darwin
6.1255 + need_lib_prefix=no
6.1256 + need_version=no
6.1257 + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
6.1258 + soname_spec='${libname}${release}${major}$shared_ext'
6.1259 + shlibpath_overrides_runpath=yes
6.1260 + shlibpath_var=DYLD_LIBRARY_PATH
6.1261 + shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
6.1262 + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
6.1263 + if test "$GCC" = yes; then
6.1264 + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
6.1265 + else
6.1266 + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
6.1267 + fi
6.1268 + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
6.1269 + ;;
6.1270 +
6.1271 +dgux*)
6.1272 + version_type=linux
6.1273 + need_lib_prefix=no
6.1274 + need_version=no
6.1275 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
6.1276 + soname_spec='${libname}${release}${shared_ext}$major'
6.1277 + shlibpath_var=LD_LIBRARY_PATH
6.1278 + ;;
6.1279 +
6.1280 +freebsd1*)
6.1281 + dynamic_linker=no
6.1282 + ;;
6.1283 +
6.1284 +kfreebsd*-gnu)
6.1285 + version_type=linux
6.1286 + need_lib_prefix=no
6.1287 + need_version=no
6.1288 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
6.1289 + soname_spec='${libname}${release}${shared_ext}$major'
6.1290 + shlibpath_var=LD_LIBRARY_PATH
6.1291 + shlibpath_overrides_runpath=no
6.1292 + hardcode_into_libs=yes
6.1293 + dynamic_linker='GNU ld.so'
6.1294 + ;;
6.1295 +
6.1296 +freebsd*)
6.1297 + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6.1298 + version_type=freebsd-$objformat
6.1299 + case $version_type in
6.1300 + freebsd-elf*)
6.1301 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
6.1302 + need_version=no
6.1303 + need_lib_prefix=no
6.1304 + ;;
6.1305 + freebsd-*)
6.1306 + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
6.1307 + need_version=yes
6.1308 + ;;
6.1309 + esac
6.1310 + shlibpath_var=LD_LIBRARY_PATH
6.1311 + case $host_os in
6.1312 + freebsd2*)
6.1313 + shlibpath_overrides_runpath=yes
6.1314 + ;;
6.1315 + freebsd3.[01]* | freebsdelf3.[01]*)
6.1316 + shlibpath_overrides_runpath=yes
6.1317 + hardcode_into_libs=yes
6.1318 + ;;
6.1319 + *) # from 3.2 on
6.1320 + shlibpath_overrides_runpath=no
6.1321 + hardcode_into_libs=yes
6.1322 + ;;
6.1323 + esac
6.1324 + ;;
6.1325 +
6.1326 +gnu*)
6.1327 + version_type=linux
6.1328 + need_lib_prefix=no
6.1329 + need_version=no
6.1330 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
6.1331 + soname_spec='${libname}${release}${shared_ext}$major'
6.1332 + shlibpath_var=LD_LIBRARY_PATH
6.1333 + hardcode_into_libs=yes
6.1334 + ;;
6.1335 +
6.1336 +hpux9* | hpux10* | hpux11*)
6.1337 + # Give a soname corresponding to the major version so that dld.sl refuses to
6.1338 + # link against other versions.
6.1339 + version_type=sunos
6.1340 + need_lib_prefix=no
6.1341 + need_version=no
6.1342 + case "$host_cpu" in
6.1343 + ia64*)
6.1344 + shrext_cmds='.so'
6.1345 + hardcode_into_libs=yes
6.1346 + dynamic_linker="$host_os dld.so"
6.1347 + shlibpath_var=LD_LIBRARY_PATH
6.1348 + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6.1349 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6.1350 + soname_spec='${libname}${release}${shared_ext}$major'
6.1351 + if test "X$HPUX_IA64_MODE" = X32; then
6.1352 + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6.1353 + else
6.1354 + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6.1355 + fi
6.1356 + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6.1357 + ;;
6.1358 + hppa*64*)
6.1359 + shrext_cmds='.sl'
6.1360 + hardcode_into_libs=yes
6.1361 + dynamic_linker="$host_os dld.sl"
6.1362 + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
6.1363 + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6.1364 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6.1365 + soname_spec='${libname}${release}${shared_ext}$major'
6.1366 + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
6.1367 + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6.1368 + ;;
6.1369 + *)
6.1370 + shrext_cmds='.sl'
6.1371 + dynamic_linker="$host_os dld.sl"
6.1372 + shlibpath_var=SHLIB_PATH
6.1373 + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6.1374 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6.1375 + soname_spec='${libname}${release}${shared_ext}$major'
6.1376 + ;;
6.1377 + esac
6.1378 + # HP-UX runs *really* slowly unless shared libraries are mode 555.
6.1379 + postinstall_cmds='chmod 555 $lib'
6.1380 + ;;
6.1381 +
6.1382 +irix5* | irix6* | nonstopux*)
6.1383 + case $host_os in
6.1384 + nonstopux*) version_type=nonstopux ;;
6.1385 + *)
6.1386 + if test "$lt_cv_prog_gnu_ld" = yes; then
6.1387 + version_type=linux
6.1388 + else
6.1389 + version_type=irix
6.1390 + fi ;;
6.1391 + esac
6.1392 + need_lib_prefix=no
6.1393 + need_version=no
6.1394 + soname_spec='${libname}${release}${shared_ext}$major'
6.1395 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
6.1396 + case $host_os in
6.1397 + irix5* | nonstopux*)
6.1398 + libsuff= shlibsuff=
6.1399 + ;;
6.1400 + *)
6.1401 + case $LD in # libtool.m4 will add one of these switches to LD
6.1402 + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
6.1403 + libsuff= shlibsuff= libmagic=32-bit;;
6.1404 + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
6.1405 + libsuff=32 shlibsuff=N32 libmagic=N32;;
6.1406 + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
6.1407 + libsuff=64 shlibsuff=64 libmagic=64-bit;;
6.1408 + *) libsuff= shlibsuff= libmagic=never-match;;
6.1409 + esac
6.1410 + ;;
6.1411 + esac
6.1412 + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6.1413 + shlibpath_overrides_runpath=no
6.1414 + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6.1415 + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6.1416 + hardcode_into_libs=yes
6.1417 + ;;
6.1418 +
6.1419 +# No shared lib support for Linux oldld, aout, or coff.
6.1420 +linux*oldld* | linux*aout* | linux*coff*)
6.1421 + dynamic_linker=no
6.1422 + ;;
6.1423 +
6.1424 +# This must be Linux ELF.
6.1425 +linux*)
6.1426 + version_type=linux
6.1427 + need_lib_prefix=no
6.1428 + need_version=no
6.1429 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6.1430 + soname_spec='${libname}${release}${shared_ext}$major'
6.1431 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6.1432 + shlibpath_var=LD_LIBRARY_PATH
6.1433 + shlibpath_overrides_runpath=no
6.1434 + # This implies no fast_install, which is unacceptable.
6.1435 + # Some rework will be needed to allow for fast_install
6.1436 + # before this can be enabled.
6.1437 + hardcode_into_libs=yes
6.1438 +
6.1439 + # Append ld.so.conf contents to the search path
6.1440 + if test -f /etc/ld.so.conf; then
6.1441 + lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
6.1442 + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
6.1443 + fi
6.1444 +
6.1445 + # We used to test for /lib/ld.so.1 and disable shared libraries on
6.1446 + # powerpc, because MkLinux only supported shared libraries with the
6.1447 + # GNU dynamic linker. Since this was broken with cross compilers,
6.1448 + # most powerpc-linux boxes support dynamic linking these days and
6.1449 + # people can always --disable-shared, the test was removed, and we
6.1450 + # assume the GNU/Linux dynamic linker is in use.
6.1451 + dynamic_linker='GNU/Linux ld.so'
6.1452 + ;;
6.1453 +
6.1454 +netbsdelf*-gnu)
6.1455 + version_type=linux
6.1456 + need_lib_prefix=no
6.1457 + need_version=no
6.1458 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
6.1459 + soname_spec='${libname}${release}${shared_ext}$major'
6.1460 + shlibpath_var=LD_LIBRARY_PATH
6.1461 + shlibpath_overrides_runpath=no
6.1462 + hardcode_into_libs=yes
6.1463 + dynamic_linker='NetBSD ld.elf_so'
6.1464 + ;;
6.1465 +
6.1466 +knetbsd*-gnu)
6.1467 + version_type=linux
6.1468 + need_lib_prefix=no
6.1469 + need_version=no
6.1470 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
6.1471 + soname_spec='${libname}${release}${shared_ext}$major'
6.1472 + shlibpath_var=LD_LIBRARY_PATH
6.1473 + shlibpath_overrides_runpath=no
6.1474 + hardcode_into_libs=yes
6.1475 + dynamic_linker='GNU ld.so'
6.1476 + ;;
6.1477 +
6.1478 +netbsd*)
6.1479 + version_type=sunos
6.1480 + need_lib_prefix=no
6.1481 + need_version=no
6.1482 + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6.1483 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
6.1484 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6.1485 + dynamic_linker='NetBSD (a.out) ld.so'
6.1486 + else
6.1487 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
6.1488 + soname_spec='${libname}${release}${shared_ext}$major'
6.1489 + dynamic_linker='NetBSD ld.elf_so'
6.1490 + fi
6.1491 + shlibpath_var=LD_LIBRARY_PATH
6.1492 + shlibpath_overrides_runpath=yes
6.1493 + hardcode_into_libs=yes
6.1494 + ;;
6.1495 +
6.1496 +newsos6)
6.1497 + version_type=linux
6.1498 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6.1499 + shlibpath_var=LD_LIBRARY_PATH
6.1500 + shlibpath_overrides_runpath=yes
6.1501 + ;;
6.1502 +
6.1503 +nto-qnx*)
6.1504 + version_type=linux
6.1505 + need_lib_prefix=no
6.1506 + need_version=no
6.1507 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6.1508 + soname_spec='${libname}${release}${shared_ext}$major'
6.1509 + shlibpath_var=LD_LIBRARY_PATH
6.1510 + shlibpath_overrides_runpath=yes
6.1511 + ;;
6.1512 +
6.1513 +openbsd*)
6.1514 + version_type=sunos
6.1515 + need_lib_prefix=no
6.1516 + need_version=yes
6.1517 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
6.1518 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6.1519 + shlibpath_var=LD_LIBRARY_PATH
6.1520 + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6.1521 + case $host_os in
6.1522 + openbsd2.[[89]] | openbsd2.[[89]].*)
6.1523 + shlibpath_overrides_runpath=no
6.1524 + ;;
6.1525 + *)
6.1526 + shlibpath_overrides_runpath=yes
6.1527 + ;;
6.1528 + esac
6.1529 + else
6.1530 + shlibpath_overrides_runpath=yes
6.1531 + fi
6.1532 + ;;
6.1533 +
6.1534 +os2*)
6.1535 + libname_spec='$name'
6.1536 + shrext_cmds=".dll"
6.1537 + need_lib_prefix=no
6.1538 + library_names_spec='$libname${shared_ext} $libname.a'
6.1539 + dynamic_linker='OS/2 ld.exe'
6.1540 + shlibpath_var=LIBPATH
6.1541 + ;;
6.1542 +
6.1543 +osf3* | osf4* | osf5*)
6.1544 + version_type=osf
6.1545 + need_lib_prefix=no
6.1546 + need_version=no
6.1547 + soname_spec='${libname}${release}${shared_ext}$major'
6.1548 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6.1549 + shlibpath_var=LD_LIBRARY_PATH
6.1550 + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6.1551 + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6.1552 + ;;
6.1553 +
6.1554 +sco3.2v5*)
6.1555 + version_type=osf
6.1556 + soname_spec='${libname}${release}${shared_ext}$major'
6.1557 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6.1558 + shlibpath_var=LD_LIBRARY_PATH
6.1559 + ;;
6.1560 +
6.1561 +solaris*)
6.1562 + version_type=linux
6.1563 + need_lib_prefix=no
6.1564 + need_version=no
6.1565 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6.1566 + soname_spec='${libname}${release}${shared_ext}$major'
6.1567 + shlibpath_var=LD_LIBRARY_PATH
6.1568 + shlibpath_overrides_runpath=yes
6.1569 + hardcode_into_libs=yes
6.1570 + # ldd complains unless libraries are executable
6.1571 + postinstall_cmds='chmod +x $lib'
6.1572 + ;;
6.1573 +
6.1574 +sunos4*)
6.1575 + version_type=sunos
6.1576 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
6.1577 + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6.1578 + shlibpath_var=LD_LIBRARY_PATH
6.1579 + shlibpath_overrides_runpath=yes
6.1580 + if test "$with_gnu_ld" = yes; then
6.1581 + need_lib_prefix=no
6.1582 + fi
6.1583 + need_version=yes
6.1584 + ;;
6.1585 +
6.1586 +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6.1587 + version_type=linux
6.1588 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6.1589 + soname_spec='${libname}${release}${shared_ext}$major'
6.1590 + shlibpath_var=LD_LIBRARY_PATH
6.1591 + case $host_vendor in
6.1592 + sni)
6.1593 + shlibpath_overrides_runpath=no
6.1594 + need_lib_prefix=no
6.1595 + export_dynamic_flag_spec='${wl}-Blargedynsym'
6.1596 + runpath_var=LD_RUN_PATH
6.1597 + ;;
6.1598 + siemens)
6.1599 + need_lib_prefix=no
6.1600 + ;;
6.1601 + motorola)
6.1602 + need_lib_prefix=no
6.1603 + need_version=no
6.1604 + shlibpath_overrides_runpath=no
6.1605 + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6.1606 + ;;
6.1607 + esac
6.1608 + ;;
6.1609 +
6.1610 +sysv4*MP*)
6.1611 + if test -d /usr/nec ;then
6.1612 + version_type=linux
6.1613 + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
6.1614 + soname_spec='$libname${shared_ext}.$major'
6.1615 + shlibpath_var=LD_LIBRARY_PATH
6.1616 + fi
6.1617 + ;;
6.1618 +
6.1619 +uts4*)
6.1620 + version_type=linux
6.1621 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6.1622 + soname_spec='${libname}${release}${shared_ext}$major'
6.1623 + shlibpath_var=LD_LIBRARY_PATH
6.1624 + ;;
6.1625 +
6.1626 +*)
6.1627 + dynamic_linker=no
6.1628 + ;;
6.1629 +esac
6.1630 +AC_MSG_RESULT([$dynamic_linker])
6.1631 +test "$dynamic_linker" = no && can_build_shared=no
6.1632 +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6.1633 +
6.1634 +
6.1635 +# _LT_AC_TAGCONFIG
6.1636 +# ----------------
6.1637 +AC_DEFUN([_LT_AC_TAGCONFIG],
6.1638 +[AC_ARG_WITH([tags],
6.1639 + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
6.1640 + [include additional configurations @<:@automatic@:>@])],
6.1641 + [tagnames="$withval"])
6.1642 +
6.1643 +if test -f "$ltmain" && test -n "$tagnames"; then
6.1644 + if test ! -f "${ofile}"; then
6.1645 + AC_MSG_WARN([output file `$ofile' does not exist])
6.1646 + fi
6.1647 +
6.1648 + if test -z "$LTCC"; then
6.1649 + eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
6.1650 + if test -z "$LTCC"; then
6.1651 + AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
6.1652 + else
6.1653 + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
6.1654 + fi
6.1655 + fi
6.1656 +
6.1657 + # Extract list of available tagged configurations in $ofile.
6.1658 + # Note that this assumes the entire list is on one line.
6.1659 + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
6.1660 +
6.1661 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6.1662 + for tagname in $tagnames; do
6.1663 + IFS="$lt_save_ifs"
6.1664 + # Check whether tagname contains only valid characters
6.1665 + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
6.1666 + "") ;;
6.1667 + *) AC_MSG_ERROR([invalid tag name: $tagname])
6.1668 + ;;
6.1669 + esac
6.1670 +
6.1671 + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
6.1672 + then
6.1673 + AC_MSG_ERROR([tag name \"$tagname\" already exists])
6.1674 + fi
6.1675 +
6.1676 + # Update the list of available tags.
6.1677 + if test -n "$tagname"; then
6.1678 + echo appending configuration tag \"$tagname\" to $ofile
6.1679 +
6.1680 + case $tagname in
6.1681 + CXX)
6.1682 + if test -n "$CXX" && test "X$CXX" != "Xno"; then
6.1683 + AC_LIBTOOL_LANG_CXX_CONFIG
6.1684 + else
6.1685 + tagname=""
6.1686 + fi
6.1687 + ;;
6.1688 +
6.1689 + F77)
6.1690 + if test -n "$F77" && test "X$F77" != "Xno"; then
6.1691 + AC_LIBTOOL_LANG_F77_CONFIG
6.1692 + else
6.1693 + tagname=""
6.1694 + fi
6.1695 + ;;
6.1696 +
6.1697 + GCJ)
6.1698 + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
6.1699 + AC_LIBTOOL_LANG_GCJ_CONFIG
6.1700 + else
6.1701 + tagname=""
6.1702 + fi
6.1703 + ;;
6.1704 +
6.1705 + RC)
6.1706 + AC_LIBTOOL_LANG_RC_CONFIG
6.1707 + ;;
6.1708 +
6.1709 + *)
6.1710 + AC_MSG_ERROR([Unsupported tag name: $tagname])
6.1711 + ;;
6.1712 + esac
6.1713 +
6.1714 + # Append the new tag name to the list of available tags.
6.1715 + if test -n "$tagname" ; then
6.1716 + available_tags="$available_tags $tagname"
6.1717 + fi
6.1718 + fi
6.1719 + done
6.1720 + IFS="$lt_save_ifs"
6.1721 +
6.1722 + # Now substitute the updated list of available tags.
6.1723 + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
6.1724 + mv "${ofile}T" "$ofile"
6.1725 + chmod +x "$ofile"
6.1726 + else
6.1727 + rm -f "${ofile}T"
6.1728 + AC_MSG_ERROR([unable to update list of available tagged configurations.])
6.1729 + fi
6.1730 +fi
6.1731 +])# _LT_AC_TAGCONFIG
6.1732 +
6.1733 +
6.1734 +# AC_LIBTOOL_DLOPEN
6.1735 +# -----------------
6.1736 +# enable checks for dlopen support
6.1737 +AC_DEFUN([AC_LIBTOOL_DLOPEN],
6.1738 + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
6.1739 +])# AC_LIBTOOL_DLOPEN
6.1740 +
6.1741 +
6.1742 +# AC_LIBTOOL_WIN32_DLL
6.1743 +# --------------------
6.1744 +# declare package support for building win32 dll's
6.1745 +AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
6.1746 +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
6.1747 +])# AC_LIBTOOL_WIN32_DLL
6.1748 +
6.1749 +
6.1750 +# AC_ENABLE_SHARED([DEFAULT])
6.1751 +# ---------------------------
6.1752 +# implement the --enable-shared flag
6.1753 +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
6.1754 +AC_DEFUN([AC_ENABLE_SHARED],
6.1755 +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
6.1756 +AC_ARG_ENABLE([shared],
6.1757 + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
6.1758 + [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
6.1759 + [p=${PACKAGE-default}
6.1760 + case $enableval in
6.1761 + yes) enable_shared=yes ;;
6.1762 + no) enable_shared=no ;;
6.1763 + *)
6.1764 + enable_shared=no
6.1765 + # Look at the argument we got. We use all the common list separators.
6.1766 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6.1767 + for pkg in $enableval; do
6.1768 + IFS="$lt_save_ifs"
6.1769 + if test "X$pkg" = "X$p"; then
6.1770 + enable_shared=yes
6.1771 + fi
6.1772 + done
6.1773 + IFS="$lt_save_ifs"
6.1774 + ;;
6.1775 + esac],
6.1776 + [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
6.1777 +])# AC_ENABLE_SHARED
6.1778 +
6.1779 +
6.1780 +# AC_DISABLE_SHARED
6.1781 +# -----------------
6.1782 +#- set the default shared flag to --disable-shared
6.1783 +AC_DEFUN([AC_DISABLE_SHARED],
6.1784 +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6.1785 +AC_ENABLE_SHARED(no)
6.1786 +])# AC_DISABLE_SHARED
6.1787 +
6.1788 +
6.1789 +# AC_ENABLE_STATIC([DEFAULT])
6.1790 +# ---------------------------
6.1791 +# implement the --enable-static flag
6.1792 +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
6.1793 +AC_DEFUN([AC_ENABLE_STATIC],
6.1794 +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
6.1795 +AC_ARG_ENABLE([static],
6.1796 + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
6.1797 + [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
6.1798 + [p=${PACKAGE-default}
6.1799 + case $enableval in
6.1800 + yes) enable_static=yes ;;
6.1801 + no) enable_static=no ;;
6.1802 + *)
6.1803 + enable_static=no
6.1804 + # Look at the argument we got. We use all the common list separators.
6.1805 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6.1806 + for pkg in $enableval; do
6.1807 + IFS="$lt_save_ifs"
6.1808 + if test "X$pkg" = "X$p"; then
6.1809 + enable_static=yes
6.1810 + fi
6.1811 + done
6.1812 + IFS="$lt_save_ifs"
6.1813 + ;;
6.1814 + esac],
6.1815 + [enable_static=]AC_ENABLE_STATIC_DEFAULT)
6.1816 +])# AC_ENABLE_STATIC
6.1817 +
6.1818 +
6.1819 +# AC_DISABLE_STATIC
6.1820 +# -----------------
6.1821 +# set the default static flag to --disable-static
6.1822 +AC_DEFUN([AC_DISABLE_STATIC],
6.1823 +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6.1824 +AC_ENABLE_STATIC(no)
6.1825 +])# AC_DISABLE_STATIC
6.1826 +
6.1827 +
6.1828 +# AC_ENABLE_FAST_INSTALL([DEFAULT])
6.1829 +# ---------------------------------
6.1830 +# implement the --enable-fast-install flag
6.1831 +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
6.1832 +AC_DEFUN([AC_ENABLE_FAST_INSTALL],
6.1833 +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
6.1834 +AC_ARG_ENABLE([fast-install],
6.1835 + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
6.1836 + [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
6.1837 + [p=${PACKAGE-default}
6.1838 + case $enableval in
6.1839 + yes) enable_fast_install=yes ;;
6.1840 + no) enable_fast_install=no ;;
6.1841 + *)
6.1842 + enable_fast_install=no
6.1843 + # Look at the argument we got. We use all the common list separators.
6.1844 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6.1845 + for pkg in $enableval; do
6.1846 + IFS="$lt_save_ifs"
6.1847 + if test "X$pkg" = "X$p"; then
6.1848 + enable_fast_install=yes
6.1849 + fi
6.1850 + done
6.1851 + IFS="$lt_save_ifs"
6.1852 + ;;
6.1853 + esac],
6.1854 + [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
6.1855 +])# AC_ENABLE_FAST_INSTALL
6.1856 +
6.1857 +
6.1858 +# AC_DISABLE_FAST_INSTALL
6.1859 +# -----------------------
6.1860 +# set the default to --disable-fast-install
6.1861 +AC_DEFUN([AC_DISABLE_FAST_INSTALL],
6.1862 +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6.1863 +AC_ENABLE_FAST_INSTALL(no)
6.1864 +])# AC_DISABLE_FAST_INSTALL
6.1865 +
6.1866 +
6.1867 +# AC_LIBTOOL_PICMODE([MODE])
6.1868 +# --------------------------
6.1869 +# implement the --with-pic flag
6.1870 +# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
6.1871 +AC_DEFUN([AC_LIBTOOL_PICMODE],
6.1872 +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6.1873 +pic_mode=ifelse($#,1,$1,default)
6.1874 +])# AC_LIBTOOL_PICMODE
6.1875 +
6.1876 +
6.1877 +# AC_PROG_EGREP
6.1878 +# -------------
6.1879 +# This is predefined starting with Autoconf 2.54, so this conditional
6.1880 +# definition can be removed once we require Autoconf 2.54 or later.
6.1881 +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
6.1882 +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
6.1883 + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
6.1884 + then ac_cv_prog_egrep='grep -E'
6.1885 + else ac_cv_prog_egrep='egrep'
6.1886 + fi])
6.1887 + EGREP=$ac_cv_prog_egrep
6.1888 + AC_SUBST([EGREP])
6.1889 +])])
6.1890 +
6.1891 +
6.1892 +# AC_PATH_TOOL_PREFIX
6.1893 +# -------------------
6.1894 +# find a file program which can recognise shared library
6.1895 +AC_DEFUN([AC_PATH_TOOL_PREFIX],
6.1896 +[AC_REQUIRE([AC_PROG_EGREP])dnl
6.1897 +AC_MSG_CHECKING([for $1])
6.1898 +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
6.1899 +[case $MAGIC_CMD in
6.1900 +[[\\/*] | ?:[\\/]*])
6.1901 + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
6.1902 + ;;
6.1903 +*)
6.1904 + lt_save_MAGIC_CMD="$MAGIC_CMD"
6.1905 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6.1906 +dnl $ac_dummy forces splitting on constant user-supplied paths.
6.1907 +dnl POSIX.2 word splitting is done only on the output of word expansions,
6.1908 +dnl not every word. This closes a longstanding sh security hole.
6.1909 + ac_dummy="ifelse([$2], , $PATH, [$2])"
6.1910 + for ac_dir in $ac_dummy; do
6.1911 + IFS="$lt_save_ifs"
6.1912 + test -z "$ac_dir" && ac_dir=.
6.1913 + if test -f $ac_dir/$1; then
6.1914 + lt_cv_path_MAGIC_CMD="$ac_dir/$1"
6.1915 + if test -n "$file_magic_test_file"; then
6.1916 + case $deplibs_check_method in
6.1917 + "file_magic "*)
6.1918 + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
6.1919 + MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6.1920 + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
6.1921 + $EGREP "$file_magic_regex" > /dev/null; then
6.1922 + :
6.1923 + else
6.1924 + cat <<EOF 1>&2
6.1925 +
6.1926 +*** Warning: the command libtool uses to detect shared libraries,
6.1927 +*** $file_magic_cmd, produces output that libtool cannot recognize.
6.1928 +*** The result is that libtool may fail to recognize shared libraries
6.1929 +*** as such. This will affect the creation of libtool libraries that
6.1930 +*** depend on shared libraries, but programs linked with such libtool
6.1931 +*** libraries will work regardless of this problem. Nevertheless, you
6.1932 +*** may want to report the problem to your system manager and/or to
6.1933 +*** bug-libtool@gnu.org
6.1934 +
6.1935 +EOF
6.1936 + fi ;;
6.1937 + esac
6.1938 + fi
6.1939 + break
6.1940 + fi
6.1941 + done
6.1942 + IFS="$lt_save_ifs"
6.1943 + MAGIC_CMD="$lt_save_MAGIC_CMD"
6.1944 + ;;
6.1945 +esac])
6.1946 +MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6.1947 +if test -n "$MAGIC_CMD"; then
6.1948 + AC_MSG_RESULT($MAGIC_CMD)
6.1949 +else
6.1950 + AC_MSG_RESULT(no)
6.1951 +fi
6.1952 +])# AC_PATH_TOOL_PREFIX
6.1953 +
6.1954 +
6.1955 +# AC_PATH_MAGIC
6.1956 +# -------------
6.1957 +# find a file program which can recognise a shared library
6.1958 +AC_DEFUN([AC_PATH_MAGIC],
6.1959 +[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
6.1960 +if test -z "$lt_cv_path_MAGIC_CMD"; then
6.1961 + if test -n "$ac_tool_prefix"; then
6.1962 + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
6.1963 + else
6.1964 + MAGIC_CMD=:
6.1965 + fi
6.1966 +fi
6.1967 +])# AC_PATH_MAGIC
6.1968 +
6.1969 +
6.1970 +# AC_PROG_LD
6.1971 +# ----------
6.1972 +# find the pathname to the GNU or non-GNU linker
6.1973 +AC_DEFUN([AC_PROG_LD],
6.1974 +[AC_ARG_WITH([gnu-ld],
6.1975 + [AC_HELP_STRING([--with-gnu-ld],
6.1976 + [assume the C compiler uses GNU ld @<:@default=no@:>@])],
6.1977 + [test "$withval" = no || with_gnu_ld=yes],
6.1978 + [with_gnu_ld=no])
6.1979 +AC_REQUIRE([LT_AC_PROG_SED])dnl
6.1980 +AC_REQUIRE([AC_PROG_CC])dnl
6.1981 +AC_REQUIRE([AC_CANONICAL_HOST])dnl
6.1982 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
6.1983 +ac_prog=ld
6.1984 +if test "$GCC" = yes; then
6.1985 + # Check if gcc -print-prog-name=ld gives a path.
6.1986 + AC_MSG_CHECKING([for ld used by $CC])
6.1987 + case $host in
6.1988 + *-*-mingw*)
6.1989 + # gcc leaves a trailing carriage return which upsets mingw
6.1990 + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6.1991 + *)
6.1992 + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6.1993 + esac
6.1994 + case $ac_prog in
6.1995 + # Accept absolute paths.
6.1996 + [[\\/]]* | ?:[[\\/]]*)
6.1997 + re_direlt='/[[^/]][[^/]]*/\.\./'
6.1998 + # Canonicalize the pathname of ld
6.1999 + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
6.2000 + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6.2001 + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
6.2002 + done
6.2003 + test -z "$LD" && LD="$ac_prog"
6.2004 + ;;
6.2005 + "")
6.2006 + # If it fails, then pretend we aren't using GCC.
6.2007 + ac_prog=ld
6.2008 + ;;
6.2009 + *)
6.2010 + # If it is relative, then search for the first ld in PATH.
6.2011 + with_gnu_ld=unknown
6.2012 + ;;
6.2013 + esac
6.2014 +elif test "$with_gnu_ld" = yes; then
6.2015 + AC_MSG_CHECKING([for GNU ld])
6.2016 +else
6.2017 + AC_MSG_CHECKING([for non-GNU ld])
6.2018 +fi
6.2019 +AC_CACHE_VAL(lt_cv_path_LD,
6.2020 +[if test -z "$LD"; then
6.2021 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6.2022 + for ac_dir in $PATH; do
6.2023 + IFS="$lt_save_ifs"
6.2024 + test -z "$ac_dir" && ac_dir=.
6.2025 + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6.2026 + lt_cv_path_LD="$ac_dir/$ac_prog"
6.2027 + # Check to see if the program is GNU ld. I'd rather use --version,
6.2028 + # but apparently some GNU ld's only accept -v.
6.2029 + # Break only if it was the GNU/non-GNU ld that we prefer.
6.2030 + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6.2031 + *GNU* | *'with BFD'*)
6.2032 + test "$with_gnu_ld" != no && break
6.2033 + ;;
6.2034 + *)
6.2035 + test "$with_gnu_ld" != yes && break
6.2036 + ;;
6.2037 + esac
6.2038 + fi
6.2039 + done
6.2040 + IFS="$lt_save_ifs"
6.2041 +else
6.2042 + lt_cv_path_LD="$LD" # Let the user override the test with a path.
6.2043 +fi])
6.2044 +LD="$lt_cv_path_LD"
6.2045 +if test -n "$LD"; then
6.2046 + AC_MSG_RESULT($LD)
6.2047 +else
6.2048 + AC_MSG_RESULT(no)
6.2049 +fi
6.2050 +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
6.2051 +AC_PROG_LD_GNU
6.2052 +])# AC_PROG_LD
6.2053 +
6.2054 +
6.2055 +# AC_PROG_LD_GNU
6.2056 +# --------------
6.2057 +AC_DEFUN([AC_PROG_LD_GNU],
6.2058 +[AC_REQUIRE([AC_PROG_EGREP])dnl
6.2059 +AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
6.2060 +[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
6.2061 +case `$LD -v 2>&1 </dev/null` in
6.2062 +*GNU* | *'with BFD'*)
6.2063 + lt_cv_prog_gnu_ld=yes
6.2064 + ;;
6.2065 +*)
6.2066 + lt_cv_prog_gnu_ld=no
6.2067 + ;;
6.2068 +esac])
6.2069 +with_gnu_ld=$lt_cv_prog_gnu_ld
6.2070 +])# AC_PROG_LD_GNU
6.2071 +
6.2072 +
6.2073 +# AC_PROG_LD_RELOAD_FLAG
6.2074 +# ----------------------
6.2075 +# find reload flag for linker
6.2076 +# -- PORTME Some linkers may need a different reload flag.
6.2077 +AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
6.2078 +[AC_CACHE_CHECK([for $LD option to reload object files],
6.2079 + lt_cv_ld_reload_flag,
6.2080 + [lt_cv_ld_reload_flag='-r'])
6.2081 +reload_flag=$lt_cv_ld_reload_flag
6.2082 +case $reload_flag in
6.2083 +"" | " "*) ;;
6.2084 +*) reload_flag=" $reload_flag" ;;
6.2085 +esac
6.2086 +reload_cmds='$LD$reload_flag -o $output$reload_objs'
6.2087 +])# AC_PROG_LD_RELOAD_FLAG
6.2088 +
6.2089 +
6.2090 +# AC_DEPLIBS_CHECK_METHOD
6.2091 +# -----------------------
6.2092 +# how to check for library dependencies
6.2093 +# -- PORTME fill in with the dynamic library characteristics
6.2094 +AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
6.2095 +[AC_CACHE_CHECK([how to recognise dependent libraries],
6.2096 +lt_cv_deplibs_check_method,
6.2097 +[lt_cv_file_magic_cmd='$MAGIC_CMD'
6.2098 +lt_cv_file_magic_test_file=
6.2099 +lt_cv_deplibs_check_method='unknown'
6.2100 +# Need to set the preceding variable on all platforms that support
6.2101 +# interlibrary dependencies.
6.2102 +# 'none' -- dependencies not supported.
6.2103 +# `unknown' -- same as none, but documents that we really don't know.
6.2104 +# 'pass_all' -- all dependencies passed with no checks.
6.2105 +# 'test_compile' -- check by making test program.
6.2106 +# 'file_magic [[regex]]' -- check by looking for files in library path
6.2107 +# which responds to the $file_magic_cmd with a given extended regex.
6.2108 +# If you have `file' or equivalent on your system and you're not sure
6.2109 +# whether `pass_all' will *always* work, you probably want this one.
6.2110 +
6.2111 +case $host_os in
6.2112 +aix4* | aix5*)
6.2113 + lt_cv_deplibs_check_method=pass_all
6.2114 + ;;
6.2115 +
6.2116 +beos*)
6.2117 + lt_cv_deplibs_check_method=pass_all
6.2118 + ;;
6.2119 +
6.2120 +bsdi4*)
6.2121 + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
6.2122 + lt_cv_file_magic_cmd='/usr/bin/file -L'
6.2123 + lt_cv_file_magic_test_file=/shlib/libc.so
6.2124 + ;;
6.2125 +
6.2126 +cygwin*)
6.2127 + # func_win32_libid is a shell function defined in ltmain.sh
6.2128 + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6.2129 + lt_cv_file_magic_cmd='func_win32_libid'
6.2130 + ;;
6.2131 +
6.2132 +mingw* | pw32*)
6.2133 + # Base MSYS/MinGW do not provide the 'file' command needed by
6.2134 + # func_win32_libid shell function, so use a weaker test based on 'objdump'.
6.2135 + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6.2136 + lt_cv_file_magic_cmd='$OBJDUMP -f'
6.2137 + ;;
6.2138 +
6.2139 +darwin* | rhapsody*)
6.2140 + lt_cv_deplibs_check_method=pass_all
6.2141 + ;;
6.2142 +
6.2143 +freebsd* | kfreebsd*-gnu)
6.2144 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6.2145 + case $host_cpu in
6.2146 + i*86 )
6.2147 + # Not sure whether the presence of OpenBSD here was a mistake.
6.2148 + # Let's accept both of them until this is cleared up.
6.2149 + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
6.2150 + lt_cv_file_magic_cmd=/usr/bin/file
6.2151 + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6.2152 + ;;
6.2153 + esac
6.2154 + else
6.2155 + lt_cv_deplibs_check_method=pass_all
6.2156 + fi
6.2157 + ;;
6.2158 +
6.2159 +gnu*)
6.2160 + lt_cv_deplibs_check_method=pass_all
6.2161 + ;;
6.2162 +
6.2163 +hpux10.20* | hpux11*)
6.2164 + lt_cv_file_magic_cmd=/usr/bin/file
6.2165 + case "$host_cpu" in
6.2166 + ia64*)
6.2167 + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
6.2168 + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6.2169 + ;;
6.2170 + hppa*64*)
6.2171 + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
6.2172 + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6.2173 + ;;
6.2174 + *)
6.2175 + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
6.2176 + lt_cv_file_magic_test_file=/usr/lib/libc.sl
6.2177 + ;;
6.2178 + esac
6.2179 + ;;
6.2180 +
6.2181 +irix5* | irix6* | nonstopux*)
6.2182 + case $LD in
6.2183 + *-32|*"-32 ") libmagic=32-bit;;
6.2184 + *-n32|*"-n32 ") libmagic=N32;;
6.2185 + *-64|*"-64 ") libmagic=64-bit;;
6.2186 + *) libmagic=never-match;;
6.2187 + esac
6.2188 + lt_cv_deplibs_check_method=pass_all
6.2189 + ;;
6.2190 +
6.2191 +# This must be Linux ELF.
6.2192 +linux*)
6.2193 + lt_cv_deplibs_check_method=pass_all
6.2194 + ;;
6.2195 +
6.2196 +netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6.2197 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6.2198 + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
6.2199 + else
6.2200 + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
6.2201 + fi
6.2202 + ;;
6.2203 +
6.2204 +newos6*)
6.2205 + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
6.2206 + lt_cv_file_magic_cmd=/usr/bin/file
6.2207 + lt_cv_file_magic_test_file=/usr/lib/libnls.so
6.2208 + ;;
6.2209 +
6.2210 +nto-qnx*)
6.2211 + lt_cv_deplibs_check_method=unknown
6.2212 + ;;
6.2213 +
6.2214 +openbsd*)
6.2215 + lt_cv_file_magic_cmd=/usr/bin/file
6.2216 + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6.2217 + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6.2218 + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
6.2219 + else
6.2220 + lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
6.2221 + fi
6.2222 + ;;
6.2223 +
6.2224 +osf3* | osf4* | osf5*)
6.2225 + lt_cv_deplibs_check_method=pass_all
6.2226 + ;;
6.2227 +
6.2228 +sco3.2v5*)
6.2229 + lt_cv_deplibs_check_method=pass_all
6.2230 + ;;
6.2231 +
6.2232 +solaris*)
6.2233 + lt_cv_deplibs_check_method=pass_all
6.2234 + ;;
6.2235 +
6.2236 +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6.2237 + case $host_vendor in
6.2238 + motorola)
6.2239 + 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]]'
6.2240 + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6.2241 + ;;
6.2242 + ncr)
6.2243 + lt_cv_deplibs_check_method=pass_all
6.2244 + ;;
6.2245 + sequent)
6.2246 + lt_cv_file_magic_cmd='/bin/file'
6.2247 + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
6.2248 + ;;
6.2249 + sni)
6.2250 + lt_cv_file_magic_cmd='/bin/file'
6.2251 + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
6.2252 + lt_cv_file_magic_test_file=/lib/libc.so
6.2253 + ;;
6.2254 + siemens)
6.2255 + lt_cv_deplibs_check_method=pass_all
6.2256 + ;;
6.2257 + esac
6.2258 + ;;
6.2259 +
6.2260 +sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
6.2261 + lt_cv_deplibs_check_method=pass_all
6.2262 + ;;
6.2263 +esac
6.2264 +])
6.2265 +file_magic_cmd=$lt_cv_file_magic_cmd
6.2266 +deplibs_check_method=$lt_cv_deplibs_check_method
6.2267 +test -z "$deplibs_check_method" && deplibs_check_method=unknown
6.2268 +])# AC_DEPLIBS_CHECK_METHOD
6.2269 +
6.2270 +
6.2271 +# AC_PROG_NM
6.2272 +# ----------
6.2273 +# find the pathname to a BSD-compatible name lister
6.2274 +AC_DEFUN([AC_PROG_NM],
6.2275 +[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
6.2276 +[if test -n "$NM"; then
6.2277 + # Let the user override the test.
6.2278 + lt_cv_path_NM="$NM"
6.2279 +else
6.2280 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6.2281 + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
6.2282 + IFS="$lt_save_ifs"
6.2283 + test -z "$ac_dir" && ac_dir=.
6.2284 + tmp_nm="$ac_dir/${ac_tool_prefix}nm"
6.2285 + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
6.2286 + # Check to see if the nm accepts a BSD-compat flag.
6.2287 + # Adding the `sed 1q' prevents false positives on HP-UX, which says:
6.2288 + # nm: unknown option "B" ignored
6.2289 + # Tru64's nm complains that /dev/null is an invalid object file
6.2290 + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
6.2291 + */dev/null* | *'Invalid file or object type'*)
6.2292 + lt_cv_path_NM="$tmp_nm -B"
6.2293 + break
6.2294 + ;;
6.2295 + *)
6.2296 + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
6.2297 + */dev/null*)
6.2298 + lt_cv_path_NM="$tmp_nm -p"
6.2299 + break
6.2300 + ;;
6.2301 + *)
6.2302 + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
6.2303 + continue # so that we can try to find one that supports BSD flags
6.2304 + ;;
6.2305 + esac
6.2306 + esac
6.2307 + fi
6.2308 + done
6.2309 + IFS="$lt_save_ifs"
6.2310 + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
6.2311 +fi])
6.2312 +NM="$lt_cv_path_NM"
6.2313 +])# AC_PROG_NM
6.2314 +
6.2315 +
6.2316 +# AC_CHECK_LIBM
6.2317 +# -------------
6.2318 +# check for math library
6.2319 +AC_DEFUN([AC_CHECK_LIBM],
6.2320 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl
6.2321 +LIBM=
6.2322 +case $host in
6.2323 +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
6.2324 + # These system don't have libm, or don't need it
6.2325 + ;;
6.2326 +*-ncr-sysv4.3*)
6.2327 + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
6.2328 + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
6.2329 + ;;
6.2330 +*)
6.2331 + AC_CHECK_LIB(m, cos, LIBM="-lm")
6.2332 + ;;
6.2333 +esac
6.2334 +])# AC_CHECK_LIBM
6.2335 +
6.2336 +
6.2337 +# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
6.2338 +# -----------------------------------
6.2339 +# sets LIBLTDL to the link flags for the libltdl convenience library and
6.2340 +# LTDLINCL to the include flags for the libltdl header and adds
6.2341 +# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
6.2342 +# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
6.2343 +# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
6.2344 +# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
6.2345 +# '${top_srcdir}/' (note the single quotes!). If your package is not
6.2346 +# flat and you're not using automake, define top_builddir and
6.2347 +# top_srcdir appropriately in the Makefiles.
6.2348 +AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
6.2349 +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6.2350 + case $enable_ltdl_convenience in
6.2351 + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
6.2352 + "") enable_ltdl_convenience=yes
6.2353 + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
6.2354 + esac
6.2355 + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
6.2356 + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
6.2357 + # For backwards non-gettext consistent compatibility...
6.2358 + INCLTDL="$LTDLINCL"
6.2359 +])# AC_LIBLTDL_CONVENIENCE
6.2360 +
6.2361 +
6.2362 +# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
6.2363 +# -----------------------------------
6.2364 +# sets LIBLTDL to the link flags for the libltdl installable library and
6.2365 +# LTDLINCL to the include flags for the libltdl header and adds
6.2366 +# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
6.2367 +# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
6.2368 +# DIRECTORY is not provided and an installed libltdl is not found, it is
6.2369 +# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
6.2370 +# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
6.2371 +# quotes!). If your package is not flat and you're not using automake,
6.2372 +# define top_builddir and top_srcdir appropriately in the Makefiles.
6.2373 +# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
6.2374 +AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
6.2375 +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6.2376 + AC_CHECK_LIB(ltdl, lt_dlinit,
6.2377 + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
6.2378 + [if test x"$enable_ltdl_install" = xno; then
6.2379 + AC_MSG_WARN([libltdl not installed, but installation disabled])
6.2380 + else
6.2381 + enable_ltdl_install=yes
6.2382 + fi
6.2383 + ])
6.2384 + if test x"$enable_ltdl_install" = x"yes"; then
6.2385 + ac_configure_args="$ac_configure_args --enable-ltdl-install"
6.2386 + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
6.2387 + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
6.2388 + else
6.2389 + ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
6.2390 + LIBLTDL="-lltdl"
6.2391 + LTDLINCL=
6.2392 + fi
6.2393 + # For backwards non-gettext consistent compatibility...
6.2394 + INCLTDL="$LTDLINCL"
6.2395 +])# AC_LIBLTDL_INSTALLABLE
6.2396 +
6.2397 +
6.2398 +# AC_LIBTOOL_CXX
6.2399 +# --------------
6.2400 +# enable support for C++ libraries
6.2401 +AC_DEFUN([AC_LIBTOOL_CXX],
6.2402 +[AC_REQUIRE([_LT_AC_LANG_CXX])
6.2403 +])# AC_LIBTOOL_CXX
6.2404 +
6.2405 +
6.2406 +# _LT_AC_LANG_CXX
6.2407 +# ---------------
6.2408 +AC_DEFUN([_LT_AC_LANG_CXX],
6.2409 +[AC_REQUIRE([AC_PROG_CXX])
6.2410 +AC_REQUIRE([AC_PROG_CXXCPP])
6.2411 +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
6.2412 +])# _LT_AC_LANG_CXX
6.2413 +
6.2414 +
6.2415 +# AC_LIBTOOL_F77
6.2416 +# --------------
6.2417 +# enable support for Fortran 77 libraries
6.2418 +AC_DEFUN([AC_LIBTOOL_F77],
6.2419 +[AC_REQUIRE([_LT_AC_LANG_F77])
6.2420 +])# AC_LIBTOOL_F77
6.2421 +
6.2422 +
6.2423 +# _LT_AC_LANG_F77
6.2424 +# ---------------
6.2425 +AC_DEFUN([_LT_AC_LANG_F77],
6.2426 +[AC_REQUIRE([AC_PROG_F77])
6.2427 +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
6.2428 +])# _LT_AC_LANG_F77
6.2429 +
6.2430 +
6.2431 +# AC_LIBTOOL_GCJ
6.2432 +# --------------
6.2433 +# enable support for GCJ libraries
6.2434 +AC_DEFUN([AC_LIBTOOL_GCJ],
6.2435 +[AC_REQUIRE([_LT_AC_LANG_GCJ])
6.2436 +])# AC_LIBTOOL_GCJ
6.2437 +
6.2438 +
6.2439 +# _LT_AC_LANG_GCJ
6.2440 +# ---------------
6.2441 +AC_DEFUN([_LT_AC_LANG_GCJ],
6.2442 +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
6.2443 + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
6.2444 + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
6.2445 + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
6.2446 + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
6.2447 + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
6.2448 +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
6.2449 +])# _LT_AC_LANG_GCJ
6.2450 +
6.2451 +
6.2452 +# AC_LIBTOOL_RC
6.2453 +# --------------
6.2454 +# enable support for Windows resource files
6.2455 +AC_DEFUN([AC_LIBTOOL_RC],
6.2456 +[AC_REQUIRE([LT_AC_PROG_RC])
6.2457 +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
6.2458 +])# AC_LIBTOOL_RC
6.2459 +
6.2460 +
6.2461 +# AC_LIBTOOL_LANG_C_CONFIG
6.2462 +# ------------------------
6.2463 +# Ensure that the configuration vars for the C compiler are
6.2464 +# suitably defined. Those variables are subsequently used by
6.2465 +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
6.2466 +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
6.2467 +AC_DEFUN([_LT_AC_LANG_C_CONFIG],
6.2468 +[lt_save_CC="$CC"
6.2469 +AC_LANG_PUSH(C)
6.2470 +
6.2471 +# Source file extension for C test sources.
6.2472 +ac_ext=c
6.2473 +
6.2474 +# Object file extension for compiled C test sources.
6.2475 +objext=o
6.2476 +_LT_AC_TAGVAR(objext, $1)=$objext
6.2477 +
6.2478 +# Code to be used in simple compile tests
6.2479 +lt_simple_compile_test_code="int some_variable = 0;\n"
6.2480 +
6.2481 +# Code to be used in simple link tests
6.2482 +lt_simple_link_test_code='int main(){return(0);}\n'
6.2483 +
6.2484 +_LT_AC_SYS_COMPILER
6.2485 +
6.2486 +#
6.2487 +# Check for any special shared library compilation flags.
6.2488 +#
6.2489 +_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
6.2490 +if test "$GCC" = no; then
6.2491 + case $host_os in
6.2492 + sco3.2v5*)
6.2493 + _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
6.2494 + ;;
6.2495 + esac
6.2496 +fi
6.2497 +if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
6.2498 + AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
6.2499 + if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
6.2500 + else
6.2501 + AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
6.2502 + _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
6.2503 + fi
6.2504 +fi
6.2505 +
6.2506 +
6.2507 +#
6.2508 +# Check to make sure the static flag actually works.
6.2509 +#
6.2510 +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
6.2511 + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
6.2512 + $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
6.2513 + [],
6.2514 + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
6.2515 +
6.2516 +
6.2517 +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
6.2518 +AC_LIBTOOL_PROG_COMPILER_PIC($1)
6.2519 +AC_LIBTOOL_PROG_CC_C_O($1)
6.2520 +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6.2521 +AC_LIBTOOL_PROG_LD_SHLIBS($1)
6.2522 +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6.2523 +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6.2524 +AC_LIBTOOL_SYS_LIB_STRIP
6.2525 +AC_LIBTOOL_DLOPEN_SELF($1)
6.2526 +
6.2527 +# Report which librarie types wil actually be built
6.2528 +AC_MSG_CHECKING([if libtool supports shared libraries])
6.2529 +AC_MSG_RESULT([$can_build_shared])
6.2530 +
6.2531 +AC_MSG_CHECKING([whether to build shared libraries])
6.2532 +test "$can_build_shared" = "no" && enable_shared=no
6.2533 +
6.2534 +# On AIX, shared libraries and static libraries use the same namespace, and
6.2535 +# are all built from PIC.
6.2536 +case "$host_os" in
6.2537 +aix3*)
6.2538 + test "$enable_shared" = yes && enable_static=no
6.2539 + if test -n "$RANLIB"; then
6.2540 + archive_cmds="$archive_cmds~\$RANLIB \$lib"
6.2541 + postinstall_cmds='$RANLIB $lib'
6.2542 + fi
6.2543 + ;;
6.2544 +
6.2545 +aix4* | aix5*)
6.2546 + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6.2547 + test "$enable_shared" = yes && enable_static=no
6.2548 + fi
6.2549 + ;;
6.2550 + darwin* | rhapsody*)
6.2551 + if test "$GCC" = yes; then
6.2552 + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6.2553 + case "$host_os" in
6.2554 + rhapsody* | darwin1.[[012]])
6.2555 + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6.2556 + ;;
6.2557 + *) # Darwin 1.3 on
6.2558 + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6.2559 + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6.2560 + else
6.2561 + case ${MACOSX_DEPLOYMENT_TARGET} in
6.2562 + 10.[[012]])
6.2563 + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6.2564 + ;;
6.2565 + 10.*)
6.2566 + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
6.2567 + ;;
6.2568 + esac
6.2569 + fi
6.2570 + ;;
6.2571 + esac
6.2572 + output_verbose_link_cmd='echo'
6.2573 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
6.2574 + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6.2575 + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6.2576 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6.2577 + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6.2578 + _LT_AC_TAGVAR(hardcode_direct, $1)=no
6.2579 + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6.2580 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6.2581 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6.2582 + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6.2583 + else
6.2584 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.2585 + fi
6.2586 + ;;
6.2587 +esac
6.2588 +AC_MSG_RESULT([$enable_shared])
6.2589 +
6.2590 +AC_MSG_CHECKING([whether to build static libraries])
6.2591 +# Make sure either enable_shared or enable_static is yes.
6.2592 +test "$enable_shared" = yes || enable_static=yes
6.2593 +AC_MSG_RESULT([$enable_static])
6.2594 +
6.2595 +AC_LIBTOOL_CONFIG($1)
6.2596 +
6.2597 +AC_LANG_POP
6.2598 +CC="$lt_save_CC"
6.2599 +])# AC_LIBTOOL_LANG_C_CONFIG
6.2600 +
6.2601 +
6.2602 +# AC_LIBTOOL_LANG_CXX_CONFIG
6.2603 +# --------------------------
6.2604 +# Ensure that the configuration vars for the C compiler are
6.2605 +# suitably defined. Those variables are subsequently used by
6.2606 +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
6.2607 +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
6.2608 +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
6.2609 +[AC_LANG_PUSH(C++)
6.2610 +AC_REQUIRE([AC_PROG_CXX])
6.2611 +AC_REQUIRE([AC_PROG_CXXCPP])
6.2612 +
6.2613 +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6.2614 +_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6.2615 +_LT_AC_TAGVAR(always_export_symbols, $1)=no
6.2616 +_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6.2617 +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6.2618 +_LT_AC_TAGVAR(hardcode_direct, $1)=no
6.2619 +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6.2620 +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6.2621 +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6.2622 +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6.2623 +_LT_AC_TAGVAR(hardcode_automatic, $1)=no
6.2624 +_LT_AC_TAGVAR(module_cmds, $1)=
6.2625 +_LT_AC_TAGVAR(module_expsym_cmds, $1)=
6.2626 +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6.2627 +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6.2628 +_LT_AC_TAGVAR(no_undefined_flag, $1)=
6.2629 +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6.2630 +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6.2631 +
6.2632 +# Dependencies to place before and after the object being linked:
6.2633 +_LT_AC_TAGVAR(predep_objects, $1)=
6.2634 +_LT_AC_TAGVAR(postdep_objects, $1)=
6.2635 +_LT_AC_TAGVAR(predeps, $1)=
6.2636 +_LT_AC_TAGVAR(postdeps, $1)=
6.2637 +_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
6.2638 +
6.2639 +# Source file extension for C++ test sources.
6.2640 +ac_ext=cc
6.2641 +
6.2642 +# Object file extension for compiled C++ test sources.
6.2643 +objext=o
6.2644 +_LT_AC_TAGVAR(objext, $1)=$objext
6.2645 +
6.2646 +# Code to be used in simple compile tests
6.2647 +lt_simple_compile_test_code="int some_variable = 0;\n"
6.2648 +
6.2649 +# Code to be used in simple link tests
6.2650 +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
6.2651 +
6.2652 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6.2653 +_LT_AC_SYS_COMPILER
6.2654 +
6.2655 +# Allow CC to be a program name with arguments.
6.2656 +lt_save_CC=$CC
6.2657 +lt_save_LD=$LD
6.2658 +lt_save_GCC=$GCC
6.2659 +GCC=$GXX
6.2660 +lt_save_with_gnu_ld=$with_gnu_ld
6.2661 +lt_save_path_LD=$lt_cv_path_LD
6.2662 +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6.2663 + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6.2664 +else
6.2665 + unset lt_cv_prog_gnu_ld
6.2666 +fi
6.2667 +if test -n "${lt_cv_path_LDCXX+set}"; then
6.2668 + lt_cv_path_LD=$lt_cv_path_LDCXX
6.2669 +else
6.2670 + unset lt_cv_path_LD
6.2671 +fi
6.2672 +test -z "${LDCXX+set}" || LD=$LDCXX
6.2673 +CC=${CXX-"c++"}
6.2674 +compiler=$CC
6.2675 +_LT_AC_TAGVAR(compiler, $1)=$CC
6.2676 +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
6.2677 +
6.2678 +# We don't want -fno-exception wen compiling C++ code, so set the
6.2679 +# no_builtin_flag separately
6.2680 +if test "$GXX" = yes; then
6.2681 + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6.2682 +else
6.2683 + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6.2684 +fi
6.2685 +
6.2686 +if test "$GXX" = yes; then
6.2687 + # Set up default GNU C++ configuration
6.2688 +
6.2689 + AC_PROG_LD
6.2690 +
6.2691 + # Check if GNU C++ uses GNU ld as the underlying linker, since the
6.2692 + # archiving commands below assume that GNU ld is being used.
6.2693 + if test "$with_gnu_ld" = yes; then
6.2694 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6.2695 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6.2696 +
6.2697 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6.2698 + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6.2699 +
6.2700 + # If archive_cmds runs LD, not CC, wlarc should be empty
6.2701 + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6.2702 + # investigate it a little bit more. (MM)
6.2703 + wlarc='${wl}'
6.2704 +
6.2705 + # ancient GNU ld didn't support --whole-archive et. al.
6.2706 + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
6.2707 + grep 'no-whole-archive' > /dev/null; then
6.2708 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6.2709 + else
6.2710 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6.2711 + fi
6.2712 + else
6.2713 + with_gnu_ld=no
6.2714 + wlarc=
6.2715 +
6.2716 + # A generic and very simple default shared library creation
6.2717 + # command for GNU C++ for the case where it uses the native
6.2718 + # linker, instead of GNU ld. If possible, this setting should
6.2719 + # overridden to take advantage of the native linker features on
6.2720 + # the platform it is being used on.
6.2721 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6.2722 + fi
6.2723 +
6.2724 + # Commands to make compiler produce verbose output that lists
6.2725 + # what "hidden" libraries, object files and flags are used when
6.2726 + # linking a shared library.
6.2727 + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
6.2728 +
6.2729 +else
6.2730 + GXX=no
6.2731 + with_gnu_ld=no
6.2732 + wlarc=
6.2733 +fi
6.2734 +
6.2735 +# PORTME: fill in a description of your system's C++ link characteristics
6.2736 +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6.2737 +_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6.2738 +case $host_os in
6.2739 + aix3*)
6.2740 + # FIXME: insert proper C++ library support
6.2741 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.2742 + ;;
6.2743 + aix4* | aix5*)
6.2744 + if test "$host_cpu" = ia64; then
6.2745 + # On IA64, the linker does run time linking by default, so we don't
6.2746 + # have to do anything special.
6.2747 + aix_use_runtimelinking=no
6.2748 + exp_sym_flag='-Bexport'
6.2749 + no_entry_flag=""
6.2750 + else
6.2751 + aix_use_runtimelinking=no
6.2752 +
6.2753 + # Test if we are trying to use run time linking or normal
6.2754 + # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6.2755 + # need to do runtime linking.
6.2756 + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6.2757 + for ld_flag in $LDFLAGS; do
6.2758 + case $ld_flag in
6.2759 + *-brtl*)
6.2760 + aix_use_runtimelinking=yes
6.2761 + break
6.2762 + ;;
6.2763 + esac
6.2764 + done
6.2765 + esac
6.2766 +
6.2767 + exp_sym_flag='-bexport'
6.2768 + no_entry_flag='-bnoentry'
6.2769 + fi
6.2770 +
6.2771 + # When large executables or shared objects are built, AIX ld can
6.2772 + # have problems creating the table of contents. If linking a library
6.2773 + # or program results in "error TOC overflow" add -mminimal-toc to
6.2774 + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6.2775 + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6.2776 +
6.2777 + _LT_AC_TAGVAR(archive_cmds, $1)=''
6.2778 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.2779 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6.2780 + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6.2781 +
6.2782 + if test "$GXX" = yes; then
6.2783 + case $host_os in aix4.[012]|aix4.[012].*)
6.2784 + # We only want to do this on AIX 4.2 and lower, the check
6.2785 + # below for broken collect2 doesn't work under 4.3+
6.2786 + collect2name=`${CC} -print-prog-name=collect2`
6.2787 + if test -f "$collect2name" && \
6.2788 + strings "$collect2name" | grep resolve_lib_name >/dev/null
6.2789 + then
6.2790 + # We have reworked collect2
6.2791 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.2792 + else
6.2793 + # We have old collect2
6.2794 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6.2795 + # It fails to find uninstalled libraries when the uninstalled
6.2796 + # path is not listed in the libpath. Setting hardcode_minus_L
6.2797 + # to unsupported forces relinking
6.2798 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6.2799 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6.2800 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6.2801 + fi
6.2802 + esac
6.2803 + shared_flag='-shared'
6.2804 + else
6.2805 + # not using gcc
6.2806 + if test "$host_cpu" = ia64; then
6.2807 + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6.2808 + # chokes on -Wl,-G. The following line is correct:
6.2809 + shared_flag='-G'
6.2810 + else
6.2811 + if test "$aix_use_runtimelinking" = yes; then
6.2812 + shared_flag='${wl}-G'
6.2813 + else
6.2814 + shared_flag='${wl}-bM:SRE'
6.2815 + fi
6.2816 + fi
6.2817 + fi
6.2818 +
6.2819 + # It seems that -bexpall does not export symbols beginning with
6.2820 + # underscore (_), so it is better to generate a list of symbols to export.
6.2821 + _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6.2822 + if test "$aix_use_runtimelinking" = yes; then
6.2823 + # Warning - without using the other runtime loading flags (-brtl),
6.2824 + # -berok will link without error, but may produce a broken library.
6.2825 + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6.2826 + # Determine the default libpath from the value encoded in an empty executable.
6.2827 + _LT_AC_SYS_LIBPATH_AIX
6.2828 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6.2829 +
6.2830 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6.2831 + else
6.2832 + if test "$host_cpu" = ia64; then
6.2833 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6.2834 + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6.2835 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
6.2836 + else
6.2837 + # Determine the default libpath from the value encoded in an empty executable.
6.2838 + _LT_AC_SYS_LIBPATH_AIX
6.2839 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6.2840 + # Warning - without using the other run time loading flags,
6.2841 + # -berok will link without error, but may produce a broken library.
6.2842 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6.2843 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6.2844 + # -bexpall does not export symbols beginning with underscore (_)
6.2845 + _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6.2846 + # Exported symbols can be pulled into shared objects from archives
6.2847 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6.2848 + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6.2849 + # This is similar to how AIX traditionally builds it's shared libraries.
6.2850 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6.2851 + fi
6.2852 + fi
6.2853 + ;;
6.2854 + chorus*)
6.2855 + case $cc_basename in
6.2856 + *)
6.2857 + # FIXME: insert proper C++ library support
6.2858 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.2859 + ;;
6.2860 + esac
6.2861 + ;;
6.2862 +
6.2863 + cygwin* | mingw* | pw32*)
6.2864 + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6.2865 + # as there is no search path for DLLs.
6.2866 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6.2867 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6.2868 + _LT_AC_TAGVAR(always_export_symbols, $1)=no
6.2869 + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6.2870 +
6.2871 + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6.2872 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6.2873 + # If the export-symbols file already is a .def file (1st line
6.2874 + # is EXPORTS), use it as is; otherwise, prepend...
6.2875 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6.2876 + cp $export_symbols $output_objdir/$soname.def;
6.2877 + else
6.2878 + echo EXPORTS > $output_objdir/$soname.def;
6.2879 + cat $export_symbols >> $output_objdir/$soname.def;
6.2880 + fi~
6.2881 + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6.2882 + else
6.2883 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.2884 + fi
6.2885 + ;;
6.2886 +
6.2887 + darwin* | rhapsody*)
6.2888 + if test "$GXX" = yes; then
6.2889 + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6.2890 + case "$host_os" in
6.2891 + rhapsody* | darwin1.[[012]])
6.2892 + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6.2893 + ;;
6.2894 + *) # Darwin 1.3 on
6.2895 + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6.2896 + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6.2897 + else
6.2898 + case ${MACOSX_DEPLOYMENT_TARGET} in
6.2899 + 10.[[012]])
6.2900 + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6.2901 + ;;
6.2902 + 10.*)
6.2903 + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
6.2904 + ;;
6.2905 + esac
6.2906 + fi
6.2907 + ;;
6.2908 + esac
6.2909 + lt_int_apple_cc_single_mod=no
6.2910 + output_verbose_link_cmd='echo'
6.2911 + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6.2912 + lt_int_apple_cc_single_mod=yes
6.2913 + fi
6.2914 + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6.2915 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6.2916 + else
6.2917 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
6.2918 + fi
6.2919 + _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6.2920 +
6.2921 + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6.2922 + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6.2923 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6.2924 + else
6.2925 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6.2926 + fi
6.2927 + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6.2928 + _LT_AC_TAGVAR(hardcode_direct, $1)=no
6.2929 + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6.2930 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6.2931 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6.2932 + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6.2933 + else
6.2934 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.2935 + fi
6.2936 + ;;
6.2937 +
6.2938 + dgux*)
6.2939 + case $cc_basename in
6.2940 + ec++)
6.2941 + # FIXME: insert proper C++ library support
6.2942 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.2943 + ;;
6.2944 + ghcx)
6.2945 + # Green Hills C++ Compiler
6.2946 + # FIXME: insert proper C++ library support
6.2947 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.2948 + ;;
6.2949 + *)
6.2950 + # FIXME: insert proper C++ library support
6.2951 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.2952 + ;;
6.2953 + esac
6.2954 + ;;
6.2955 + freebsd[12]*)
6.2956 + # C++ shared libraries reported to be fairly broken before switch to ELF
6.2957 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.2958 + ;;
6.2959 + freebsd-elf*)
6.2960 + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6.2961 + ;;
6.2962 + freebsd* | kfreebsd*-gnu)
6.2963 + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6.2964 + # conventions
6.2965 + _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6.2966 + ;;
6.2967 + gnu*)
6.2968 + ;;
6.2969 + hpux9*)
6.2970 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6.2971 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.2972 + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6.2973 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.2974 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6.2975 + # but as the default
6.2976 + # location of the library.
6.2977 +
6.2978 + case $cc_basename in
6.2979 + CC)
6.2980 + # FIXME: insert proper C++ library support
6.2981 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.2982 + ;;
6.2983 + aCC)
6.2984 + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6.2985 + # Commands to make compiler produce verbose output that lists
6.2986 + # what "hidden" libraries, object files and flags are used when
6.2987 + # linking a shared library.
6.2988 + #
6.2989 + # There doesn't appear to be a way to prevent this compiler from
6.2990 + # explicitly linking system object files so we need to strip them
6.2991 + # from the output so that they don't get included in the library
6.2992 + # dependencies.
6.2993 + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
6.2994 + ;;
6.2995 + *)
6.2996 + if test "$GXX" = yes; then
6.2997 + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6.2998 + else
6.2999 + # FIXME: insert proper C++ library support
6.3000 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3001 + fi
6.3002 + ;;
6.3003 + esac
6.3004 + ;;
6.3005 + hpux10*|hpux11*)
6.3006 + if test $with_gnu_ld = no; then
6.3007 + case "$host_cpu" in
6.3008 + hppa*64*)
6.3009 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6.3010 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6.3011 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.3012 + ;;
6.3013 + ia64*)
6.3014 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6.3015 + ;;
6.3016 + *)
6.3017 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6.3018 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.3019 + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6.3020 + ;;
6.3021 + esac
6.3022 + fi
6.3023 + case "$host_cpu" in
6.3024 + hppa*64*)
6.3025 + _LT_AC_TAGVAR(hardcode_direct, $1)=no
6.3026 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.3027 + ;;
6.3028 + ia64*)
6.3029 + _LT_AC_TAGVAR(hardcode_direct, $1)=no
6.3030 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.3031 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6.3032 + # but as the default
6.3033 + # location of the library.
6.3034 + ;;
6.3035 + *)
6.3036 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.3037 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6.3038 + # but as the default
6.3039 + # location of the library.
6.3040 + ;;
6.3041 + esac
6.3042 +
6.3043 + case $cc_basename in
6.3044 + CC)
6.3045 + # FIXME: insert proper C++ library support
6.3046 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3047 + ;;
6.3048 + aCC)
6.3049 + case "$host_cpu" in
6.3050 + hppa*64*|ia64*)
6.3051 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
6.3052 + ;;
6.3053 + *)
6.3054 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6.3055 + ;;
6.3056 + esac
6.3057 + # Commands to make compiler produce verbose output that lists
6.3058 + # what "hidden" libraries, object files and flags are used when
6.3059 + # linking a shared library.
6.3060 + #
6.3061 + # There doesn't appear to be a way to prevent this compiler from
6.3062 + # explicitly linking system object files so we need to strip them
6.3063 + # from the output so that they don't get included in the library
6.3064 + # dependencies.
6.3065 + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
6.3066 + ;;
6.3067 + *)
6.3068 + if test "$GXX" = yes; then
6.3069 + if test $with_gnu_ld = no; then
6.3070 + case "$host_cpu" in
6.3071 + ia64*|hppa*64*)
6.3072 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
6.3073 + ;;
6.3074 + *)
6.3075 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6.3076 + ;;
6.3077 + esac
6.3078 + fi
6.3079 + else
6.3080 + # FIXME: insert proper C++ library support
6.3081 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3082 + fi
6.3083 + ;;
6.3084 + esac
6.3085 + ;;
6.3086 + irix5* | irix6*)
6.3087 + case $cc_basename in
6.3088 + CC)
6.3089 + # SGI C++
6.3090 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
6.3091 +
6.3092 + # Archives containing C++ object files must be created using
6.3093 + # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6.3094 + # necessary to make sure instantiated templates are included
6.3095 + # in the archive.
6.3096 + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6.3097 + ;;
6.3098 + *)
6.3099 + if test "$GXX" = yes; then
6.3100 + if test "$with_gnu_ld" = no; then
6.3101 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
6.3102 + else
6.3103 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
6.3104 + fi
6.3105 + fi
6.3106 + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6.3107 + ;;
6.3108 + esac
6.3109 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6.3110 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.3111 + ;;
6.3112 + linux*)
6.3113 + case $cc_basename in
6.3114 + KCC)
6.3115 + # Kuck and Associates, Inc. (KAI) C++ Compiler
6.3116 +
6.3117 + # KCC will only create a shared library if the output file
6.3118 + # ends with ".so" (or ".sl" for HP-UX), so rename the library
6.3119 + # to its proper name (with version) after linking.
6.3120 + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6.3121 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6.3122 + # Commands to make compiler produce verbose output that lists
6.3123 + # what "hidden" libraries, object files and flags are used when
6.3124 + # linking a shared library.
6.3125 + #
6.3126 + # There doesn't appear to be a way to prevent this compiler from
6.3127 + # explicitly linking system object files so we need to strip them
6.3128 + # from the output so that they don't get included in the library
6.3129 + # dependencies.
6.3130 + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
6.3131 +
6.3132 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
6.3133 + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6.3134 +
6.3135 + # Archives containing C++ object files must be created using
6.3136 + # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6.3137 + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6.3138 + ;;
6.3139 + icpc)
6.3140 + # Intel C++
6.3141 + with_gnu_ld=yes
6.3142 + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6.3143 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6.3144 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6.3145 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6.3146 + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6.3147 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6.3148 + ;;
6.3149 + cxx)
6.3150 + # Compaq C++
6.3151 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6.3152 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6.3153 +
6.3154 + runpath_var=LD_RUN_PATH
6.3155 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6.3156 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.3157 +
6.3158 + # Commands to make compiler produce verbose output that lists
6.3159 + # what "hidden" libraries, object files and flags are used when
6.3160 + # linking a shared library.
6.3161 + #
6.3162 + # There doesn't appear to be a way to prevent this compiler from
6.3163 + # explicitly linking system object files so we need to strip them
6.3164 + # from the output so that they don't get included in the library
6.3165 + # dependencies.
6.3166 + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
6.3167 + ;;
6.3168 + esac
6.3169 + ;;
6.3170 + lynxos*)
6.3171 + # FIXME: insert proper C++ library support
6.3172 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3173 + ;;
6.3174 + m88k*)
6.3175 + # FIXME: insert proper C++ library support
6.3176 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3177 + ;;
6.3178 + mvs*)
6.3179 + case $cc_basename in
6.3180 + cxx)
6.3181 + # FIXME: insert proper C++ library support
6.3182 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3183 + ;;
6.3184 + *)
6.3185 + # FIXME: insert proper C++ library support
6.3186 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3187 + ;;
6.3188 + esac
6.3189 + ;;
6.3190 + netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6.3191 + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6.3192 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6.3193 + wlarc=
6.3194 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6.3195 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.3196 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.3197 + fi
6.3198 + # Workaround some broken pre-1.5 toolchains
6.3199 + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6.3200 + ;;
6.3201 + osf3*)
6.3202 + case $cc_basename in
6.3203 + KCC)
6.3204 + # Kuck and Associates, Inc. (KAI) C++ Compiler
6.3205 +
6.3206 + # KCC will only create a shared library if the output file
6.3207 + # ends with ".so" (or ".sl" for HP-UX), so rename the library
6.3208 + # to its proper name (with version) after linking.
6.3209 + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6.3210 +
6.3211 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6.3212 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.3213 +
6.3214 + # Archives containing C++ object files must be created using
6.3215 + # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6.3216 + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6.3217 +
6.3218 + ;;
6.3219 + RCC)
6.3220 + # Rational C++ 2.4.1
6.3221 + # FIXME: insert proper C++ library support
6.3222 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3223 + ;;
6.3224 + cxx)
6.3225 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6.3226 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
6.3227 +
6.3228 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6.3229 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.3230 +
6.3231 + # Commands to make compiler produce verbose output that lists
6.3232 + # what "hidden" libraries, object files and flags are used when
6.3233 + # linking a shared library.
6.3234 + #
6.3235 + # There doesn't appear to be a way to prevent this compiler from
6.3236 + # explicitly linking system object files so we need to strip them
6.3237 + # from the output so that they don't get included in the library
6.3238 + # dependencies.
6.3239 + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
6.3240 + ;;
6.3241 + *)
6.3242 + if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6.3243 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6.3244 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
6.3245 +
6.3246 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6.3247 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.3248 +
6.3249 + # Commands to make compiler produce verbose output that lists
6.3250 + # what "hidden" libraries, object files and flags are used when
6.3251 + # linking a shared library.
6.3252 + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
6.3253 +
6.3254 + else
6.3255 + # FIXME: insert proper C++ library support
6.3256 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3257 + fi
6.3258 + ;;
6.3259 + esac
6.3260 + ;;
6.3261 + osf4* | osf5*)
6.3262 + case $cc_basename in
6.3263 + KCC)
6.3264 + # Kuck and Associates, Inc. (KAI) C++ Compiler
6.3265 +
6.3266 + # KCC will only create a shared library if the output file
6.3267 + # ends with ".so" (or ".sl" for HP-UX), so rename the library
6.3268 + # to its proper name (with version) after linking.
6.3269 + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6.3270 +
6.3271 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6.3272 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.3273 +
6.3274 + # Archives containing C++ object files must be created using
6.3275 + # the KAI C++ compiler.
6.3276 + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
6.3277 + ;;
6.3278 + RCC)
6.3279 + # Rational C++ 2.4.1
6.3280 + # FIXME: insert proper C++ library support
6.3281 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3282 + ;;
6.3283 + cxx)
6.3284 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6.3285 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
6.3286 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6.3287 + echo "-hidden">> $lib.exp~
6.3288 + $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 $objdir/so_locations -o $lib~
6.3289 + $rm $lib.exp'
6.3290 +
6.3291 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6.3292 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.3293 +
6.3294 + # Commands to make compiler produce verbose output that lists
6.3295 + # what "hidden" libraries, object files and flags are used when
6.3296 + # linking a shared library.
6.3297 + #
6.3298 + # There doesn't appear to be a way to prevent this compiler from
6.3299 + # explicitly linking system object files so we need to strip them
6.3300 + # from the output so that they don't get included in the library
6.3301 + # dependencies.
6.3302 + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
6.3303 + ;;
6.3304 + *)
6.3305 + if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6.3306 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6.3307 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
6.3308 +
6.3309 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6.3310 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.3311 +
6.3312 + # Commands to make compiler produce verbose output that lists
6.3313 + # what "hidden" libraries, object files and flags are used when
6.3314 + # linking a shared library.
6.3315 + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
6.3316 +
6.3317 + else
6.3318 + # FIXME: insert proper C++ library support
6.3319 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3320 + fi
6.3321 + ;;
6.3322 + esac
6.3323 + ;;
6.3324 + psos*)
6.3325 + # FIXME: insert proper C++ library support
6.3326 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3327 + ;;
6.3328 + sco*)
6.3329 + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6.3330 + case $cc_basename in
6.3331 + CC)
6.3332 + # FIXME: insert proper C++ library support
6.3333 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3334 + ;;
6.3335 + *)
6.3336 + # FIXME: insert proper C++ library support
6.3337 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3338 + ;;
6.3339 + esac
6.3340 + ;;
6.3341 + sunos4*)
6.3342 + case $cc_basename in
6.3343 + CC)
6.3344 + # Sun C++ 4.x
6.3345 + # FIXME: insert proper C++ library support
6.3346 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3347 + ;;
6.3348 + lcc)
6.3349 + # Lucid
6.3350 + # FIXME: insert proper C++ library support
6.3351 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3352 + ;;
6.3353 + *)
6.3354 + # FIXME: insert proper C++ library support
6.3355 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3356 + ;;
6.3357 + esac
6.3358 + ;;
6.3359 + solaris*)
6.3360 + case $cc_basename in
6.3361 + CC)
6.3362 + # Sun C++ 4.2, 5.x and Centerline C++
6.3363 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6.3364 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6.3365 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6.3366 + $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
6.3367 +
6.3368 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6.3369 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.3370 + case $host_os in
6.3371 + solaris2.[0-5] | solaris2.[0-5].*) ;;
6.3372 + *)
6.3373 + # The C++ compiler is used as linker so we must use $wl
6.3374 + # flag to pass the commands to the underlying system
6.3375 + # linker.
6.3376 + # Supported since Solaris 2.6 (maybe 2.5.1?)
6.3377 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6.3378 + ;;
6.3379 + esac
6.3380 + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6.3381 +
6.3382 + # Commands to make compiler produce verbose output that lists
6.3383 + # what "hidden" libraries, object files and flags are used when
6.3384 + # linking a shared library.
6.3385 + #
6.3386 + # There doesn't appear to be a way to prevent this compiler from
6.3387 + # explicitly linking system object files so we need to strip them
6.3388 + # from the output so that they don't get included in the library
6.3389 + # dependencies.
6.3390 + output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
6.3391 +
6.3392 + # Archives containing C++ object files must be created using
6.3393 + # "CC -xar", where "CC" is the Sun C++ compiler. This is
6.3394 + # necessary to make sure instantiated templates are included
6.3395 + # in the archive.
6.3396 + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6.3397 + ;;
6.3398 + gcx)
6.3399 + # Green Hills C++ Compiler
6.3400 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6.3401 +
6.3402 + # The C++ compiler must be used to create the archive.
6.3403 + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6.3404 + ;;
6.3405 + *)
6.3406 + # GNU C++ compiler with Solaris linker
6.3407 + if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6.3408 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6.3409 + if $CC --version | grep -v '^2\.7' > /dev/null; then
6.3410 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6.3411 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6.3412 + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
6.3413 +
6.3414 + # Commands to make compiler produce verbose output that lists
6.3415 + # what "hidden" libraries, object files and flags are used when
6.3416 + # linking a shared library.
6.3417 + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
6.3418 + else
6.3419 + # g++ 2.7 appears to require `-G' NOT `-shared' on this
6.3420 + # platform.
6.3421 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6.3422 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6.3423 + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
6.3424 +
6.3425 + # Commands to make compiler produce verbose output that lists
6.3426 + # what "hidden" libraries, object files and flags are used when
6.3427 + # linking a shared library.
6.3428 + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
6.3429 + fi
6.3430 +
6.3431 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6.3432 + fi
6.3433 + ;;
6.3434 + esac
6.3435 + ;;
6.3436 + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6.3437 + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6.3438 + ;;
6.3439 + tandem*)
6.3440 + case $cc_basename in
6.3441 + NCC)
6.3442 + # NonStop-UX NCC 3.20
6.3443 + # FIXME: insert proper C++ library support
6.3444 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3445 + ;;
6.3446 + *)
6.3447 + # FIXME: insert proper C++ library support
6.3448 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3449 + ;;
6.3450 + esac
6.3451 + ;;
6.3452 + vxworks*)
6.3453 + # FIXME: insert proper C++ library support
6.3454 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3455 + ;;
6.3456 + *)
6.3457 + # FIXME: insert proper C++ library support
6.3458 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.3459 + ;;
6.3460 +esac
6.3461 +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6.3462 +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6.3463 +
6.3464 +_LT_AC_TAGVAR(GCC, $1)="$GXX"
6.3465 +_LT_AC_TAGVAR(LD, $1)="$LD"
6.3466 +
6.3467 +AC_LIBTOOL_POSTDEP_PREDEP($1)
6.3468 +AC_LIBTOOL_PROG_COMPILER_PIC($1)
6.3469 +AC_LIBTOOL_PROG_CC_C_O($1)
6.3470 +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6.3471 +AC_LIBTOOL_PROG_LD_SHLIBS($1)
6.3472 +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6.3473 +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6.3474 +AC_LIBTOOL_SYS_LIB_STRIP
6.3475 +AC_LIBTOOL_DLOPEN_SELF($1)
6.3476 +
6.3477 +AC_LIBTOOL_CONFIG($1)
6.3478 +
6.3479 +AC_LANG_POP
6.3480 +CC=$lt_save_CC
6.3481 +LDCXX=$LD
6.3482 +LD=$lt_save_LD
6.3483 +GCC=$lt_save_GCC
6.3484 +with_gnu_ldcxx=$with_gnu_ld
6.3485 +with_gnu_ld=$lt_save_with_gnu_ld
6.3486 +lt_cv_path_LDCXX=$lt_cv_path_LD
6.3487 +lt_cv_path_LD=$lt_save_path_LD
6.3488 +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6.3489 +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6.3490 +])# AC_LIBTOOL_LANG_CXX_CONFIG
6.3491 +
6.3492 +# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
6.3493 +# ------------------------
6.3494 +# Figure out "hidden" library dependencies from verbose
6.3495 +# compiler output when linking a shared library.
6.3496 +# Parse the compiler output and extract the necessary
6.3497 +# objects, libraries and library flags.
6.3498 +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
6.3499 +dnl we can't use the lt_simple_compile_test_code here,
6.3500 +dnl because it contains code intended for an executable,
6.3501 +dnl not a library. It's possible we should let each
6.3502 +dnl tag define a new lt_????_link_test_code variable,
6.3503 +dnl but it's only used here...
6.3504 +ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
6.3505 +int a;
6.3506 +void foo (void) { a = 0; }
6.3507 +EOF
6.3508 +],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
6.3509 +class Foo
6.3510 +{
6.3511 +public:
6.3512 + Foo (void) { a = 0; }
6.3513 +private:
6.3514 + int a;
6.3515 +};
6.3516 +EOF
6.3517 +],[$1],[F77],[cat > conftest.$ac_ext <<EOF
6.3518 + subroutine foo
6.3519 + implicit none
6.3520 + integer*4 a
6.3521 + a=0
6.3522 + return
6.3523 + end
6.3524 +EOF
6.3525 +],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
6.3526 +public class foo {
6.3527 + private int a;
6.3528 + public void bar (void) {
6.3529 + a = 0;
6.3530 + }
6.3531 +};
6.3532 +EOF
6.3533 +])
6.3534 +dnl Parse the compiler output and extract the necessary
6.3535 +dnl objects, libraries and library flags.
6.3536 +if AC_TRY_EVAL(ac_compile); then
6.3537 + # Parse the compiler output and extract the necessary
6.3538 + # objects, libraries and library flags.
6.3539 +
6.3540 + # Sentinel used to keep track of whether or not we are before
6.3541 + # the conftest object file.
6.3542 + pre_test_object_deps_done=no
6.3543 +
6.3544 + # The `*' in the case matches for architectures that use `case' in
6.3545 + # $output_verbose_cmd can trigger glob expansion during the loop
6.3546 + # eval without this substitution.
6.3547 + output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
6.3548 +
6.3549 + for p in `eval $output_verbose_link_cmd`; do
6.3550 + case $p in
6.3551 +
6.3552 + -L* | -R* | -l*)
6.3553 + # Some compilers place space between "-{L,R}" and the path.
6.3554 + # Remove the space.
6.3555 + if test $p = "-L" \
6.3556 + || test $p = "-R"; then
6.3557 + prev=$p
6.3558 + continue
6.3559 + else
6.3560 + prev=
6.3561 + fi
6.3562 +
6.3563 + if test "$pre_test_object_deps_done" = no; then
6.3564 + case $p in
6.3565 + -L* | -R*)
6.3566 + # Internal compiler library paths should come after those
6.3567 + # provided the user. The postdeps already come after the
6.3568 + # user supplied libs so there is no need to process them.
6.3569 + if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
6.3570 + _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6.3571 + else
6.3572 + _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6.3573 + fi
6.3574 + ;;
6.3575 + # The "-l" case would never come before the object being
6.3576 + # linked, so don't bother handling this case.
6.3577 + esac
6.3578 + else
6.3579 + if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
6.3580 + _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
6.3581 + else
6.3582 + _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
6.3583 + fi
6.3584 + fi
6.3585 + ;;
6.3586 +
6.3587 + *.$objext)
6.3588 + # This assumes that the test object file only shows up
6.3589 + # once in the compiler output.
6.3590 + if test "$p" = "conftest.$objext"; then
6.3591 + pre_test_object_deps_done=yes
6.3592 + continue
6.3593 + fi
6.3594 +
6.3595 + if test "$pre_test_object_deps_done" = no; then
6.3596 + if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
6.3597 + _LT_AC_TAGVAR(predep_objects, $1)="$p"
6.3598 + else
6.3599 + _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
6.3600 + fi
6.3601 + else
6.3602 + if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
6.3603 + _LT_AC_TAGVAR(postdep_objects, $1)="$p"
6.3604 + else
6.3605 + _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
6.3606 + fi
6.3607 + fi
6.3608 + ;;
6.3609 +
6.3610 + *) ;; # Ignore the rest.
6.3611 +
6.3612 + esac
6.3613 + done
6.3614 +
6.3615 + # Clean up.
6.3616 + rm -f a.out a.exe
6.3617 +else
6.3618 + echo "libtool.m4: error: problem compiling $1 test program"
6.3619 +fi
6.3620 +
6.3621 +$rm -f confest.$objext
6.3622 +
6.3623 +case " $_LT_AC_TAGVAR(postdeps, $1) " in
6.3624 +*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6.3625 +esac
6.3626 +])# AC_LIBTOOL_POSTDEP_PREDEP
6.3627 +
6.3628 +# AC_LIBTOOL_LANG_F77_CONFIG
6.3629 +# ------------------------
6.3630 +# Ensure that the configuration vars for the C compiler are
6.3631 +# suitably defined. Those variables are subsequently used by
6.3632 +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
6.3633 +AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
6.3634 +AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
6.3635 +[AC_REQUIRE([AC_PROG_F77])
6.3636 +AC_LANG_PUSH(Fortran 77)
6.3637 +
6.3638 +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6.3639 +_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6.3640 +_LT_AC_TAGVAR(always_export_symbols, $1)=no
6.3641 +_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6.3642 +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6.3643 +_LT_AC_TAGVAR(hardcode_direct, $1)=no
6.3644 +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6.3645 +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6.3646 +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6.3647 +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6.3648 +_LT_AC_TAGVAR(hardcode_automatic, $1)=no
6.3649 +_LT_AC_TAGVAR(module_cmds, $1)=
6.3650 +_LT_AC_TAGVAR(module_expsym_cmds, $1)=
6.3651 +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6.3652 +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6.3653 +_LT_AC_TAGVAR(no_undefined_flag, $1)=
6.3654 +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6.3655 +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6.3656 +
6.3657 +# Source file extension for f77 test sources.
6.3658 +ac_ext=f
6.3659 +
6.3660 +# Object file extension for compiled f77 test sources.
6.3661 +objext=o
6.3662 +_LT_AC_TAGVAR(objext, $1)=$objext
6.3663 +
6.3664 +# Code to be used in simple compile tests
6.3665 +lt_simple_compile_test_code=" subroutine t\n return\n end\n"
6.3666 +
6.3667 +# Code to be used in simple link tests
6.3668 +lt_simple_link_test_code=" program t\n end\n"
6.3669 +
6.3670 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6.3671 +_LT_AC_SYS_COMPILER
6.3672 +
6.3673 +# Allow CC to be a program name with arguments.
6.3674 +lt_save_CC="$CC"
6.3675 +CC=${F77-"f77"}
6.3676 +compiler=$CC
6.3677 +_LT_AC_TAGVAR(compiler, $1)=$CC
6.3678 +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
6.3679 +
6.3680 +AC_MSG_CHECKING([if libtool supports shared libraries])
6.3681 +AC_MSG_RESULT([$can_build_shared])
6.3682 +
6.3683 +AC_MSG_CHECKING([whether to build shared libraries])
6.3684 +test "$can_build_shared" = "no" && enable_shared=no
6.3685 +
6.3686 +# On AIX, shared libraries and static libraries use the same namespace, and
6.3687 +# are all built from PIC.
6.3688 +case "$host_os" in
6.3689 +aix3*)
6.3690 + test "$enable_shared" = yes && enable_static=no
6.3691 + if test -n "$RANLIB"; then
6.3692 + archive_cmds="$archive_cmds~\$RANLIB \$lib"
6.3693 + postinstall_cmds='$RANLIB $lib'
6.3694 + fi
6.3695 + ;;
6.3696 +aix4* | aix5*)
6.3697 + test "$enable_shared" = yes && enable_static=no
6.3698 + ;;
6.3699 +esac
6.3700 +AC_MSG_RESULT([$enable_shared])
6.3701 +
6.3702 +AC_MSG_CHECKING([whether to build static libraries])
6.3703 +# Make sure either enable_shared or enable_static is yes.
6.3704 +test "$enable_shared" = yes || enable_static=yes
6.3705 +AC_MSG_RESULT([$enable_static])
6.3706 +
6.3707 +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6.3708 +
6.3709 +_LT_AC_TAGVAR(GCC, $1)="$G77"
6.3710 +_LT_AC_TAGVAR(LD, $1)="$LD"
6.3711 +
6.3712 +AC_LIBTOOL_PROG_COMPILER_PIC($1)
6.3713 +AC_LIBTOOL_PROG_CC_C_O($1)
6.3714 +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6.3715 +AC_LIBTOOL_PROG_LD_SHLIBS($1)
6.3716 +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6.3717 +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6.3718 +AC_LIBTOOL_SYS_LIB_STRIP
6.3719 +
6.3720 +
6.3721 +AC_LIBTOOL_CONFIG($1)
6.3722 +
6.3723 +AC_LANG_POP
6.3724 +CC="$lt_save_CC"
6.3725 +])# AC_LIBTOOL_LANG_F77_CONFIG
6.3726 +
6.3727 +
6.3728 +# AC_LIBTOOL_LANG_GCJ_CONFIG
6.3729 +# --------------------------
6.3730 +# Ensure that the configuration vars for the C compiler are
6.3731 +# suitably defined. Those variables are subsequently used by
6.3732 +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
6.3733 +AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
6.3734 +AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
6.3735 +[AC_LANG_SAVE
6.3736 +
6.3737 +# Source file extension for Java test sources.
6.3738 +ac_ext=java
6.3739 +
6.3740 +# Object file extension for compiled Java test sources.
6.3741 +objext=o
6.3742 +_LT_AC_TAGVAR(objext, $1)=$objext
6.3743 +
6.3744 +# Code to be used in simple compile tests
6.3745 +lt_simple_compile_test_code="class foo {}\n"
6.3746 +
6.3747 +# Code to be used in simple link tests
6.3748 +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
6.3749 +
6.3750 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6.3751 +_LT_AC_SYS_COMPILER
6.3752 +
6.3753 +# Allow CC to be a program name with arguments.
6.3754 +lt_save_CC="$CC"
6.3755 +CC=${GCJ-"gcj"}
6.3756 +compiler=$CC
6.3757 +_LT_AC_TAGVAR(compiler, $1)=$CC
6.3758 +
6.3759 +# GCJ did not exist at the time GCC didn't implicitly link libc in.
6.3760 +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6.3761 +
6.3762 +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
6.3763 +AC_LIBTOOL_PROG_COMPILER_PIC($1)
6.3764 +AC_LIBTOOL_PROG_CC_C_O($1)
6.3765 +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6.3766 +AC_LIBTOOL_PROG_LD_SHLIBS($1)
6.3767 +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6.3768 +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6.3769 +AC_LIBTOOL_SYS_LIB_STRIP
6.3770 +AC_LIBTOOL_DLOPEN_SELF($1)
6.3771 +
6.3772 +AC_LIBTOOL_CONFIG($1)
6.3773 +
6.3774 +AC_LANG_RESTORE
6.3775 +CC="$lt_save_CC"
6.3776 +])# AC_LIBTOOL_LANG_GCJ_CONFIG
6.3777 +
6.3778 +
6.3779 +# AC_LIBTOOL_LANG_RC_CONFIG
6.3780 +# --------------------------
6.3781 +# Ensure that the configuration vars for the Windows resource compiler are
6.3782 +# suitably defined. Those variables are subsequently used by
6.3783 +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
6.3784 +AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
6.3785 +AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
6.3786 +[AC_LANG_SAVE
6.3787 +
6.3788 +# Source file extension for RC test sources.
6.3789 +ac_ext=rc
6.3790 +
6.3791 +# Object file extension for compiled RC test sources.
6.3792 +objext=o
6.3793 +_LT_AC_TAGVAR(objext, $1)=$objext
6.3794 +
6.3795 +# Code to be used in simple compile tests
6.3796 +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
6.3797 +
6.3798 +# Code to be used in simple link tests
6.3799 +lt_simple_link_test_code="$lt_simple_compile_test_code"
6.3800 +
6.3801 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6.3802 +_LT_AC_SYS_COMPILER
6.3803 +
6.3804 +# Allow CC to be a program name with arguments.
6.3805 +lt_save_CC="$CC"
6.3806 +CC=${RC-"windres"}
6.3807 +compiler=$CC
6.3808 +_LT_AC_TAGVAR(compiler, $1)=$CC
6.3809 +_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6.3810 +
6.3811 +AC_LIBTOOL_CONFIG($1)
6.3812 +
6.3813 +AC_LANG_RESTORE
6.3814 +CC="$lt_save_CC"
6.3815 +])# AC_LIBTOOL_LANG_RC_CONFIG
6.3816 +
6.3817 +
6.3818 +# AC_LIBTOOL_CONFIG([TAGNAME])
6.3819 +# ----------------------------
6.3820 +# If TAGNAME is not passed, then create an initial libtool script
6.3821 +# with a default configuration from the untagged config vars. Otherwise
6.3822 +# add code to config.status for appending the configuration named by
6.3823 +# TAGNAME from the matching tagged config vars.
6.3824 +AC_DEFUN([AC_LIBTOOL_CONFIG],
6.3825 +[# The else clause should only fire when bootstrapping the
6.3826 +# libtool distribution, otherwise you forgot to ship ltmain.sh
6.3827 +# with your package, and you will get complaints that there are
6.3828 +# no rules to generate ltmain.sh.
6.3829 +if test -f "$ltmain"; then
6.3830 + # See if we are running on zsh, and set the options which allow our commands through
6.3831 + # without removal of \ escapes.
6.3832 + if test -n "${ZSH_VERSION+set}" ; then
6.3833 + setopt NO_GLOB_SUBST
6.3834 + fi
6.3835 + # Now quote all the things that may contain metacharacters while being
6.3836 + # careful not to overquote the AC_SUBSTed values. We take copies of the
6.3837 + # variables and quote the copies for generation of the libtool script.
6.3838 + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
6.3839 + SED SHELL STRIP \
6.3840 + libname_spec library_names_spec soname_spec extract_expsyms_cmds \
6.3841 + old_striplib striplib file_magic_cmd finish_cmds finish_eval \
6.3842 + deplibs_check_method reload_flag reload_cmds need_locks \
6.3843 + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
6.3844 + lt_cv_sys_global_symbol_to_c_name_address \
6.3845 + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
6.3846 + old_postinstall_cmds old_postuninstall_cmds \
6.3847 + _LT_AC_TAGVAR(compiler, $1) \
6.3848 + _LT_AC_TAGVAR(CC, $1) \
6.3849 + _LT_AC_TAGVAR(LD, $1) \
6.3850 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
6.3851 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
6.3852 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
6.3853 + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
6.3854 + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
6.3855 + _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
6.3856 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
6.3857 + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
6.3858 + _LT_AC_TAGVAR(old_archive_cmds, $1) \
6.3859 + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
6.3860 + _LT_AC_TAGVAR(predep_objects, $1) \
6.3861 + _LT_AC_TAGVAR(postdep_objects, $1) \
6.3862 + _LT_AC_TAGVAR(predeps, $1) \
6.3863 + _LT_AC_TAGVAR(postdeps, $1) \
6.3864 + _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
6.3865 + _LT_AC_TAGVAR(archive_cmds, $1) \
6.3866 + _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
6.3867 + _LT_AC_TAGVAR(postinstall_cmds, $1) \
6.3868 + _LT_AC_TAGVAR(postuninstall_cmds, $1) \
6.3869 + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
6.3870 + _LT_AC_TAGVAR(allow_undefined_flag, $1) \
6.3871 + _LT_AC_TAGVAR(no_undefined_flag, $1) \
6.3872 + _LT_AC_TAGVAR(export_symbols_cmds, $1) \
6.3873 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
6.3874 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
6.3875 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
6.3876 + _LT_AC_TAGVAR(hardcode_automatic, $1) \
6.3877 + _LT_AC_TAGVAR(module_cmds, $1) \
6.3878 + _LT_AC_TAGVAR(module_expsym_cmds, $1) \
6.3879 + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
6.3880 + _LT_AC_TAGVAR(exclude_expsyms, $1) \
6.3881 + _LT_AC_TAGVAR(include_expsyms, $1); do
6.3882 +
6.3883 + case $var in
6.3884 + _LT_AC_TAGVAR(old_archive_cmds, $1) | \
6.3885 + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
6.3886 + _LT_AC_TAGVAR(archive_cmds, $1) | \
6.3887 + _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
6.3888 + _LT_AC_TAGVAR(module_cmds, $1) | \
6.3889 + _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
6.3890 + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
6.3891 + _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
6.3892 + extract_expsyms_cmds | reload_cmds | finish_cmds | \
6.3893 + postinstall_cmds | postuninstall_cmds | \
6.3894 + old_postinstall_cmds | old_postuninstall_cmds | \
6.3895 + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
6.3896 + # Double-quote double-evaled strings.
6.3897 + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
6.3898 + ;;
6.3899 + *)
6.3900 + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
6.3901 + ;;
6.3902 + esac
6.3903 + done
6.3904 +
6.3905 + case $lt_echo in
6.3906 + *'\[$]0 --fallback-echo"')
6.3907 + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
6.3908 + ;;
6.3909 + esac
6.3910 +
6.3911 +ifelse([$1], [],
6.3912 + [cfgfile="${ofile}T"
6.3913 + trap "$rm \"$cfgfile\"; exit 1" 1 2 15
6.3914 + $rm -f "$cfgfile"
6.3915 + AC_MSG_NOTICE([creating $ofile])],
6.3916 + [cfgfile="$ofile"])
6.3917 +
6.3918 + cat <<__EOF__ >> "$cfgfile"
6.3919 +ifelse([$1], [],
6.3920 +[#! $SHELL
6.3921 +
6.3922 +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
6.3923 +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
6.3924 +# NOTE: Changes made to this file will be lost: look at ltmain.sh.
6.3925 +#
6.3926 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
6.3927 +# Free Software Foundation, Inc.
6.3928 +#
6.3929 +# This file is part of GNU Libtool:
6.3930 +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6.3931 +#
6.3932 +# This program is free software; you can redistribute it and/or modify
6.3933 +# it under the terms of the GNU General Public License as published by
6.3934 +# the Free Software Foundation; either version 2 of the License, or
6.3935 +# (at your option) any later version.
6.3936 +#
6.3937 +# This program is distributed in the hope that it will be useful, but
6.3938 +# WITHOUT ANY WARRANTY; without even the implied warranty of
6.3939 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6.3940 +# General Public License for more details.
6.3941 +#
6.3942 +# You should have received a copy of the GNU General Public License
6.3943 +# along with this program; if not, write to the Free Software
6.3944 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6.3945 +#
6.3946 +# As a special exception to the GNU General Public License, if you
6.3947 +# distribute this file as part of a program that contains a
6.3948 +# configuration script generated by Autoconf, you may include it under
6.3949 +# the same distribution terms that you use for the rest of that program.
6.3950 +
6.3951 +# A sed program that does not truncate output.
6.3952 +SED=$lt_SED
6.3953 +
6.3954 +# Sed that helps us avoid accidentally triggering echo(1) options like -n.
6.3955 +Xsed="$SED -e s/^X//"
6.3956 +
6.3957 +# The HP-UX ksh and POSIX shell print the target directory to stdout
6.3958 +# if CDPATH is set.
6.3959 +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6.3960 +
6.3961 +# The names of the tagged configurations supported by this script.
6.3962 +available_tags=
6.3963 +
6.3964 +# ### BEGIN LIBTOOL CONFIG],
6.3965 +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
6.3966 +
6.3967 +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6.3968 +
6.3969 +# Shell to use when invoking shell scripts.
6.3970 +SHELL=$lt_SHELL
6.3971 +
6.3972 +# Whether or not to build shared libraries.
6.3973 +build_libtool_libs=$enable_shared
6.3974 +
6.3975 +# Whether or not to build static libraries.
6.3976 +build_old_libs=$enable_static
6.3977 +
6.3978 +# Whether or not to add -lc for building shared libraries.
6.3979 +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
6.3980 +
6.3981 +# Whether or not to disallow shared libs when runtime libs are static
6.3982 +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
6.3983 +
6.3984 +# Whether or not to optimize for fast installation.
6.3985 +fast_install=$enable_fast_install
6.3986 +
6.3987 +# The host system.
6.3988 +host_alias=$host_alias
6.3989 +host=$host
6.3990 +
6.3991 +# An echo program that does not interpret backslashes.
6.3992 +echo=$lt_echo
6.3993 +
6.3994 +# The archiver.
6.3995 +AR=$lt_AR
6.3996 +AR_FLAGS=$lt_AR_FLAGS
6.3997 +
6.3998 +# A C compiler.
6.3999 +LTCC=$lt_LTCC
6.4000 +
6.4001 +# A language-specific compiler.
6.4002 +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
6.4003 +
6.4004 +# Is the compiler the GNU C compiler?
6.4005 +with_gcc=$_LT_AC_TAGVAR(GCC, $1)
6.4006 +
6.4007 +# An ERE matcher.
6.4008 +EGREP=$lt_EGREP
6.4009 +
6.4010 +# The linker used to build libraries.
6.4011 +LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
6.4012 +
6.4013 +# Whether we need hard or soft links.
6.4014 +LN_S=$lt_LN_S
6.4015 +
6.4016 +# A BSD-compatible nm program.
6.4017 +NM=$lt_NM
6.4018 +
6.4019 +# A symbol stripping program
6.4020 +STRIP=$lt_STRIP
6.4021 +
6.4022 +# Used to examine libraries when file_magic_cmd begins "file"
6.4023 +MAGIC_CMD=$MAGIC_CMD
6.4024 +
6.4025 +# Used on cygwin: DLL creation program.
6.4026 +DLLTOOL="$DLLTOOL"
6.4027 +
6.4028 +# Used on cygwin: object dumper.
6.4029 +OBJDUMP="$OBJDUMP"
6.4030 +
6.4031 +# Used on cygwin: assembler.
6.4032 +AS="$AS"
6.4033 +
6.4034 +# The name of the directory that contains temporary libtool files.
6.4035 +objdir=$objdir
6.4036 +
6.4037 +# How to create reloadable object files.
6.4038 +reload_flag=$lt_reload_flag
6.4039 +reload_cmds=$lt_reload_cmds
6.4040 +
6.4041 +# How to pass a linker flag through the compiler.
6.4042 +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6.4043 +
6.4044 +# Object file suffix (normally "o").
6.4045 +objext="$ac_objext"
6.4046 +
6.4047 +# Old archive suffix (normally "a").
6.4048 +libext="$libext"
6.4049 +
6.4050 +# Shared library suffix (normally ".so").
6.4051 +shrext_cmds='$shrext_cmds'
6.4052 +
6.4053 +# Executable file suffix (normally "").
6.4054 +exeext="$exeext"
6.4055 +
6.4056 +# Additional compiler flags for building library objects.
6.4057 +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6.4058 +pic_mode=$pic_mode
6.4059 +
6.4060 +# What is the maximum length of a command?
6.4061 +max_cmd_len=$lt_cv_sys_max_cmd_len
6.4062 +
6.4063 +# Does compiler simultaneously support -c and -o options?
6.4064 +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
6.4065 +
6.4066 +# Must we lock files when doing compilation ?
6.4067 +need_locks=$lt_need_locks
6.4068 +
6.4069 +# Do we need the lib prefix for modules?
6.4070 +need_lib_prefix=$need_lib_prefix
6.4071 +
6.4072 +# Do we need a version for libraries?
6.4073 +need_version=$need_version
6.4074 +
6.4075 +# Whether dlopen is supported.
6.4076 +dlopen_support=$enable_dlopen
6.4077 +
6.4078 +# Whether dlopen of programs is supported.
6.4079 +dlopen_self=$enable_dlopen_self
6.4080 +
6.4081 +# Whether dlopen of statically linked programs is supported.
6.4082 +dlopen_self_static=$enable_dlopen_self_static
6.4083 +
6.4084 +# Compiler flag to prevent dynamic linking.
6.4085 +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
6.4086 +
6.4087 +# Compiler flag to turn off builtin functions.
6.4088 +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
6.4089 +
6.4090 +# Compiler flag to allow reflexive dlopens.
6.4091 +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
6.4092 +
6.4093 +# Compiler flag to generate shared objects directly from archives.
6.4094 +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
6.4095 +
6.4096 +# Compiler flag to generate thread-safe objects.
6.4097 +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
6.4098 +
6.4099 +# Library versioning type.
6.4100 +version_type=$version_type
6.4101 +
6.4102 +# Format of library name prefix.
6.4103 +libname_spec=$lt_libname_spec
6.4104 +
6.4105 +# List of archive names. First name is the real one, the rest are links.
6.4106 +# The last name is the one that the linker finds with -lNAME.
6.4107 +library_names_spec=$lt_library_names_spec
6.4108 +
6.4109 +# The coded name of the library, if different from the real name.
6.4110 +soname_spec=$lt_soname_spec
6.4111 +
6.4112 +# Commands used to build and install an old-style archive.
6.4113 +RANLIB=$lt_RANLIB
6.4114 +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
6.4115 +old_postinstall_cmds=$lt_old_postinstall_cmds
6.4116 +old_postuninstall_cmds=$lt_old_postuninstall_cmds
6.4117 +
6.4118 +# Create an old-style archive from a shared archive.
6.4119 +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
6.4120 +
6.4121 +# Create a temporary old-style archive to link instead of a shared archive.
6.4122 +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
6.4123 +
6.4124 +# Commands used to build and install a shared archive.
6.4125 +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
6.4126 +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
6.4127 +postinstall_cmds=$lt_postinstall_cmds
6.4128 +postuninstall_cmds=$lt_postuninstall_cmds
6.4129 +
6.4130 +# Commands used to build a loadable module (assumed same as above if empty)
6.4131 +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
6.4132 +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
6.4133 +
6.4134 +# Commands to strip libraries.
6.4135 +old_striplib=$lt_old_striplib
6.4136 +striplib=$lt_striplib
6.4137 +
6.4138 +# Dependencies to place before the objects being linked to create a
6.4139 +# shared library.
6.4140 +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
6.4141 +
6.4142 +# Dependencies to place after the objects being linked to create a
6.4143 +# shared library.
6.4144 +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
6.4145 +
6.4146 +# Dependencies to place before the objects being linked to create a
6.4147 +# shared library.
6.4148 +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
6.4149 +
6.4150 +# Dependencies to place after the objects being linked to create a
6.4151 +# shared library.
6.4152 +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
6.4153 +
6.4154 +# The library search path used internally by the compiler when linking
6.4155 +# a shared library.
6.4156 +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
6.4157 +
6.4158 +# Method to check whether dependent libraries are shared objects.
6.4159 +deplibs_check_method=$lt_deplibs_check_method
6.4160 +
6.4161 +# Command to use when deplibs_check_method == file_magic.
6.4162 +file_magic_cmd=$lt_file_magic_cmd
6.4163 +
6.4164 +# Flag that allows shared libraries with undefined symbols to be built.
6.4165 +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
6.4166 +
6.4167 +# Flag that forces no undefined symbols.
6.4168 +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
6.4169 +
6.4170 +# Commands used to finish a libtool library installation in a directory.
6.4171 +finish_cmds=$lt_finish_cmds
6.4172 +
6.4173 +# Same as above, but a single script fragment to be evaled but not shown.
6.4174 +finish_eval=$lt_finish_eval
6.4175 +
6.4176 +# Take the output of nm and produce a listing of raw symbols and C names.
6.4177 +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
6.4178 +
6.4179 +# Transform the output of nm in a proper C declaration
6.4180 +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
6.4181 +
6.4182 +# Transform the output of nm in a C name address pair
6.4183 +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
6.4184 +
6.4185 +# This is the shared library runtime path variable.
6.4186 +runpath_var=$runpath_var
6.4187 +
6.4188 +# This is the shared library path variable.
6.4189 +shlibpath_var=$shlibpath_var
6.4190 +
6.4191 +# Is shlibpath searched before the hard-coded library search path?
6.4192 +shlibpath_overrides_runpath=$shlibpath_overrides_runpath
6.4193 +
6.4194 +# How to hardcode a shared library path into an executable.
6.4195 +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
6.4196 +
6.4197 +# Whether we should hardcode library paths into libraries.
6.4198 +hardcode_into_libs=$hardcode_into_libs
6.4199 +
6.4200 +# Flag to hardcode \$libdir into a binary during linking.
6.4201 +# This must work even if \$libdir does not exist.
6.4202 +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
6.4203 +
6.4204 +# If ld is used when linking, flag to hardcode \$libdir into
6.4205 +# a binary during linking. This must work even if \$libdir does
6.4206 +# not exist.
6.4207 +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
6.4208 +
6.4209 +# Whether we need a single -rpath flag with a separated argument.
6.4210 +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
6.4211 +
6.4212 +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
6.4213 +# resulting binary.
6.4214 +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
6.4215 +
6.4216 +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6.4217 +# resulting binary.
6.4218 +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
6.4219 +
6.4220 +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6.4221 +# the resulting binary.
6.4222 +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
6.4223 +
6.4224 +# Set to yes if building a shared library automatically hardcodes DIR into the library
6.4225 +# and all subsequent libraries and executables linked against it.
6.4226 +hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
6.4227 +
6.4228 +# Variables whose values should be saved in libtool wrapper scripts and
6.4229 +# restored at relink time.
6.4230 +variables_saved_for_relink="$variables_saved_for_relink"
6.4231 +
6.4232 +# Whether libtool must link a program against all its dependency libraries.
6.4233 +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
6.4234 +
6.4235 +# Compile-time system search path for libraries
6.4236 +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
6.4237 +
6.4238 +# Run-time system search path for libraries
6.4239 +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
6.4240 +
6.4241 +# Fix the shell variable \$srcfile for the compiler.
6.4242 +fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
6.4243 +
6.4244 +# Set to yes if exported symbols are required.
6.4245 +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
6.4246 +
6.4247 +# The commands to list exported symbols.
6.4248 +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
6.4249 +
6.4250 +# The commands to extract the exported symbol list from a shared archive.
6.4251 +extract_expsyms_cmds=$lt_extract_expsyms_cmds
6.4252 +
6.4253 +# Symbols that should not be listed in the preloaded symbols.
6.4254 +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
6.4255 +
6.4256 +# Symbols that must always be exported.
6.4257 +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
6.4258 +
6.4259 +ifelse([$1],[],
6.4260 +[# ### END LIBTOOL CONFIG],
6.4261 +[# ### END LIBTOOL TAG CONFIG: $tagname])
6.4262 +
6.4263 +__EOF__
6.4264 +
6.4265 +ifelse([$1],[], [
6.4266 + case $host_os in
6.4267 + aix3*)
6.4268 + cat <<\EOF >> "$cfgfile"
6.4269 +
6.4270 +# AIX sometimes has problems with the GCC collect2 program. For some
6.4271 +# reason, if we set the COLLECT_NAMES environment variable, the problems
6.4272 +# vanish in a puff of smoke.
6.4273 +if test "X${COLLECT_NAMES+set}" != Xset; then
6.4274 + COLLECT_NAMES=
6.4275 + export COLLECT_NAMES
6.4276 +fi
6.4277 +EOF
6.4278 + ;;
6.4279 + esac
6.4280 +
6.4281 + # We use sed instead of cat because bash on DJGPP gets confused if
6.4282 + # if finds mixed CR/LF and LF-only lines. Since sed operates in
6.4283 + # text mode, it properly converts lines to CR/LF. This bash problem
6.4284 + # is reportedly fixed, but why not run on old versions too?
6.4285 + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
6.4286 +
6.4287 + mv -f "$cfgfile" "$ofile" || \
6.4288 + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
6.4289 + chmod +x "$ofile"
6.4290 +])
6.4291 +else
6.4292 + # If there is no Makefile yet, we rely on a make rule to execute
6.4293 + # `config.status --recheck' to rerun these tests and create the
6.4294 + # libtool script then.
6.4295 + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
6.4296 + if test -f "$ltmain_in"; then
6.4297 + test -f Makefile && make "$ltmain"
6.4298 + fi
6.4299 +fi
6.4300 +])# AC_LIBTOOL_CONFIG
6.4301 +
6.4302 +
6.4303 +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
6.4304 +# -------------------------------------------
6.4305 +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
6.4306 +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6.4307 +
6.4308 +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6.4309 +
6.4310 +if test "$GCC" = yes; then
6.4311 + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6.4312 +
6.4313 + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
6.4314 + lt_cv_prog_compiler_rtti_exceptions,
6.4315 + [-fno-rtti -fno-exceptions], [],
6.4316 + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
6.4317 +fi
6.4318 +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
6.4319 +
6.4320 +
6.4321 +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6.4322 +# ---------------------------------
6.4323 +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
6.4324 +[AC_REQUIRE([AC_CANONICAL_HOST])
6.4325 +AC_REQUIRE([AC_PROG_NM])
6.4326 +AC_REQUIRE([AC_OBJEXT])
6.4327 +# Check for command to grab the raw symbol name followed by C symbol from nm.
6.4328 +AC_MSG_CHECKING([command to parse $NM output from $compiler object])
6.4329 +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
6.4330 +[
6.4331 +# These are sane defaults that work on at least a few old systems.
6.4332 +# [They come from Ultrix. What could be older than Ultrix?!! ;)]
6.4333 +
6.4334 +# Character class describing NM global symbol codes.
6.4335 +symcode='[[BCDEGRST]]'
6.4336 +
6.4337 +# Regexp to match symbols that can be accessed directly from C.
6.4338 +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6.4339 +
6.4340 +# Transform the above into a raw symbol and a C symbol.
6.4341 +symxfrm='\1 \2\3 \3'
6.4342 +
6.4343 +# Transform an extracted symbol line into a proper C declaration
6.4344 +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6.4345 +
6.4346 +# Transform an extracted symbol line into symbol name and symbol address
6.4347 +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6.4348 +
6.4349 +# Define system-specific variables.
6.4350 +case $host_os in
6.4351 +aix*)
6.4352 + symcode='[[BCDT]]'
6.4353 + ;;
6.4354 +cygwin* | mingw* | pw32*)
6.4355 + symcode='[[ABCDGISTW]]'
6.4356 + ;;
6.4357 +hpux*) # Its linker distinguishes data from code symbols
6.4358 + if test "$host_cpu" = ia64; then
6.4359 + symcode='[[ABCDEGRST]]'
6.4360 + fi
6.4361 + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6.4362 + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6.4363 + ;;
6.4364 +irix* | nonstopux*)
6.4365 + symcode='[[BCDEGRST]]'
6.4366 + ;;
6.4367 +osf*)
6.4368 + symcode='[[BCDEGQRST]]'
6.4369 + ;;
6.4370 +solaris* | sysv5*)
6.4371 + symcode='[[BDRT]]'
6.4372 + ;;
6.4373 +sysv4)
6.4374 + symcode='[[DFNSTU]]'
6.4375 + ;;
6.4376 +esac
6.4377 +
6.4378 +# Handle CRLF in mingw tool chain
6.4379 +opt_cr=
6.4380 +case $build_os in
6.4381 +mingw*)
6.4382 + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6.4383 + ;;
6.4384 +esac
6.4385 +
6.4386 +# If we're using GNU nm, then use its standard symbol codes.
6.4387 +case `$NM -V 2>&1` in
6.4388 +*GNU* | *'with BFD'*)
6.4389 + symcode='[[ABCDGIRSTW]]' ;;
6.4390 +esac
6.4391 +
6.4392 +# Try without a prefix undercore, then with it.
6.4393 +for ac_symprfx in "" "_"; do
6.4394 +
6.4395 + # Write the raw and C identifiers.
6.4396 + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
6.4397 +
6.4398 + # Check to see that the pipe works correctly.
6.4399 + pipe_works=no
6.4400 +
6.4401 + rm -f conftest*
6.4402 + cat > conftest.$ac_ext <<EOF
6.4403 +#ifdef __cplusplus
6.4404 +extern "C" {
6.4405 +#endif
6.4406 +char nm_test_var;
6.4407 +void nm_test_func(){}
6.4408 +#ifdef __cplusplus
6.4409 +}
6.4410 +#endif
6.4411 +int main(){nm_test_var='a';nm_test_func();return(0);}
6.4412 +EOF
6.4413 +
6.4414 + if AC_TRY_EVAL(ac_compile); then
6.4415 + # Now try to grab the symbols.
6.4416 + nlist=conftest.nm
6.4417 + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
6.4418 + # Try sorting and uniquifying the output.
6.4419 + if sort "$nlist" | uniq > "$nlist"T; then
6.4420 + mv -f "$nlist"T "$nlist"
6.4421 + else
6.4422 + rm -f "$nlist"T
6.4423 + fi
6.4424 +
6.4425 + # Make sure that we snagged all the symbols we need.
6.4426 + if grep ' nm_test_var$' "$nlist" >/dev/null; then
6.4427 + if grep ' nm_test_func$' "$nlist" >/dev/null; then
6.4428 + cat <<EOF > conftest.$ac_ext
6.4429 +#ifdef __cplusplus
6.4430 +extern "C" {
6.4431 +#endif
6.4432 +
6.4433 +EOF
6.4434 + # Now generate the symbol file.
6.4435 + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6.4436 +
6.4437 + cat <<EOF >> conftest.$ac_ext
6.4438 +#if defined (__STDC__) && __STDC__
6.4439 +# define lt_ptr_t void *
6.4440 +#else
6.4441 +# define lt_ptr_t char *
6.4442 +# define const
6.4443 +#endif
6.4444 +
6.4445 +/* The mapping between symbol names and symbols. */
6.4446 +const struct {
6.4447 + const char *name;
6.4448 + lt_ptr_t address;
6.4449 +}
6.4450 +lt_preloaded_symbols[[]] =
6.4451 +{
6.4452 +EOF
6.4453 + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6.4454 + cat <<\EOF >> conftest.$ac_ext
6.4455 + {0, (lt_ptr_t) 0}
6.4456 +};
6.4457 +
6.4458 +#ifdef __cplusplus
6.4459 +}
6.4460 +#endif
6.4461 +EOF
6.4462 + # Now try linking the two files.
6.4463 + mv conftest.$ac_objext conftstm.$ac_objext
6.4464 + lt_save_LIBS="$LIBS"
6.4465 + lt_save_CFLAGS="$CFLAGS"
6.4466 + LIBS="conftstm.$ac_objext"
6.4467 + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6.4468 + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6.4469 + pipe_works=yes
6.4470 + fi
6.4471 + LIBS="$lt_save_LIBS"
6.4472 + CFLAGS="$lt_save_CFLAGS"
6.4473 + else
6.4474 + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6.4475 + fi
6.4476 + else
6.4477 + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6.4478 + fi
6.4479 + else
6.4480 + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6.4481 + fi
6.4482 + else
6.4483 + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6.4484 + cat conftest.$ac_ext >&5
6.4485 + fi
6.4486 + rm -f conftest* conftst*
6.4487 +
6.4488 + # Do not use the global_symbol_pipe unless it works.
6.4489 + if test "$pipe_works" = yes; then
6.4490 + break
6.4491 + else
6.4492 + lt_cv_sys_global_symbol_pipe=
6.4493 + fi
6.4494 +done
6.4495 +])
6.4496 +if test -z "$lt_cv_sys_global_symbol_pipe"; then
6.4497 + lt_cv_sys_global_symbol_to_cdecl=
6.4498 +fi
6.4499 +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6.4500 + AC_MSG_RESULT(failed)
6.4501 +else
6.4502 + AC_MSG_RESULT(ok)
6.4503 +fi
6.4504 +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6.4505 +
6.4506 +
6.4507 +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
6.4508 +# ---------------------------------------
6.4509 +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
6.4510 +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
6.4511 +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6.4512 +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
6.4513 +
6.4514 +AC_MSG_CHECKING([for $compiler option to produce PIC])
6.4515 + ifelse([$1],[CXX],[
6.4516 + # C++ specific cases for pic, static, wl, etc.
6.4517 + if test "$GXX" = yes; then
6.4518 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4519 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6.4520 +
6.4521 + case $host_os in
6.4522 + aix*)
6.4523 + # All AIX code is PIC.
6.4524 + if test "$host_cpu" = ia64; then
6.4525 + # AIX 5 now supports IA64 processor
6.4526 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6.4527 + fi
6.4528 + ;;
6.4529 + amigaos*)
6.4530 + # FIXME: we need at least 68020 code to build shared libraries, but
6.4531 + # adding the `-m68020' flag to GCC prevents building anything better,
6.4532 + # like `-m68040'.
6.4533 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6.4534 + ;;
6.4535 + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6.4536 + # PIC is the default for these OSes.
6.4537 + ;;
6.4538 + mingw* | os2* | pw32*)
6.4539 + # This hack is so that the source file can tell whether it is being
6.4540 + # built for inclusion in a dll (and should export symbols for example).
6.4541 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6.4542 + ;;
6.4543 + darwin* | rhapsody*)
6.4544 + # PIC is the default on this platform
6.4545 + # Common symbols not allowed in MH_DYLIB files
6.4546 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6.4547 + ;;
6.4548 + *djgpp*)
6.4549 + # DJGPP does not support shared libraries at all
6.4550 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6.4551 + ;;
6.4552 + sysv4*MP*)
6.4553 + if test -d /usr/nec; then
6.4554 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6.4555 + fi
6.4556 + ;;
6.4557 + hpux*)
6.4558 + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6.4559 + # not for PA HP-UX.
6.4560 + case "$host_cpu" in
6.4561 + hppa*64*|ia64*)
6.4562 + ;;
6.4563 + *)
6.4564 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6.4565 + ;;
6.4566 + esac
6.4567 + ;;
6.4568 + *)
6.4569 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6.4570 + ;;
6.4571 + esac
6.4572 + else
6.4573 + case $host_os in
6.4574 + aix4* | aix5*)
6.4575 + # All AIX code is PIC.
6.4576 + if test "$host_cpu" = ia64; then
6.4577 + # AIX 5 now supports IA64 processor
6.4578 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6.4579 + else
6.4580 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6.4581 + fi
6.4582 + ;;
6.4583 + chorus*)
6.4584 + case $cc_basename in
6.4585 + cxch68)
6.4586 + # Green Hills C++ Compiler
6.4587 + # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
6.4588 + ;;
6.4589 + esac
6.4590 + ;;
6.4591 + dgux*)
6.4592 + case $cc_basename in
6.4593 + ec++)
6.4594 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6.4595 + ;;
6.4596 + ghcx)
6.4597 + # Green Hills C++ Compiler
6.4598 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6.4599 + ;;
6.4600 + *)
6.4601 + ;;
6.4602 + esac
6.4603 + ;;
6.4604 + freebsd* | kfreebsd*-gnu)
6.4605 + # FreeBSD uses GNU C++
6.4606 + ;;
6.4607 + hpux9* | hpux10* | hpux11*)
6.4608 + case $cc_basename in
6.4609 + CC)
6.4610 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4611 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
6.4612 + if test "$host_cpu" != ia64; then
6.4613 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6.4614 + fi
6.4615 + ;;
6.4616 + aCC)
6.4617 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4618 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
6.4619 + case "$host_cpu" in
6.4620 + hppa*64*|ia64*)
6.4621 + # +Z the default
6.4622 + ;;
6.4623 + *)
6.4624 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6.4625 + ;;
6.4626 + esac
6.4627 + ;;
6.4628 + *)
6.4629 + ;;
6.4630 + esac
6.4631 + ;;
6.4632 + irix5* | irix6* | nonstopux*)
6.4633 + case $cc_basename in
6.4634 + CC)
6.4635 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4636 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6.4637 + # CC pic flag -KPIC is the default.
6.4638 + ;;
6.4639 + *)
6.4640 + ;;
6.4641 + esac
6.4642 + ;;
6.4643 + linux*)
6.4644 + case $cc_basename in
6.4645 + KCC)
6.4646 + # KAI C++ Compiler
6.4647 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6.4648 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6.4649 + ;;
6.4650 + icpc)
6.4651 + # Intel C++
6.4652 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4653 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6.4654 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6.4655 + ;;
6.4656 + cxx)
6.4657 + # Compaq C++
6.4658 + # Make sure the PIC flag is empty. It appears that all Alpha
6.4659 + # Linux and Compaq Tru64 Unix objects are PIC.
6.4660 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6.4661 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6.4662 + ;;
6.4663 + *)
6.4664 + ;;
6.4665 + esac
6.4666 + ;;
6.4667 + lynxos*)
6.4668 + ;;
6.4669 + m88k*)
6.4670 + ;;
6.4671 + mvs*)
6.4672 + case $cc_basename in
6.4673 + cxx)
6.4674 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6.4675 + ;;
6.4676 + *)
6.4677 + ;;
6.4678 + esac
6.4679 + ;;
6.4680 + netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6.4681 + ;;
6.4682 + osf3* | osf4* | osf5*)
6.4683 + case $cc_basename in
6.4684 + KCC)
6.4685 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6.4686 + ;;
6.4687 + RCC)
6.4688 + # Rational C++ 2.4.1
6.4689 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6.4690 + ;;
6.4691 + cxx)
6.4692 + # Digital/Compaq C++
6.4693 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4694 + # Make sure the PIC flag is empty. It appears that all Alpha
6.4695 + # Linux and Compaq Tru64 Unix objects are PIC.
6.4696 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6.4697 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6.4698 + ;;
6.4699 + *)
6.4700 + ;;
6.4701 + esac
6.4702 + ;;
6.4703 + psos*)
6.4704 + ;;
6.4705 + sco*)
6.4706 + case $cc_basename in
6.4707 + CC)
6.4708 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6.4709 + ;;
6.4710 + *)
6.4711 + ;;
6.4712 + esac
6.4713 + ;;
6.4714 + solaris*)
6.4715 + case $cc_basename in
6.4716 + CC)
6.4717 + # Sun C++ 4.2, 5.x and Centerline C++
6.4718 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6.4719 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6.4720 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6.4721 + ;;
6.4722 + gcx)
6.4723 + # Green Hills C++ Compiler
6.4724 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6.4725 + ;;
6.4726 + *)
6.4727 + ;;
6.4728 + esac
6.4729 + ;;
6.4730 + sunos4*)
6.4731 + case $cc_basename in
6.4732 + CC)
6.4733 + # Sun C++ 4.x
6.4734 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6.4735 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6.4736 + ;;
6.4737 + lcc)
6.4738 + # Lucid
6.4739 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6.4740 + ;;
6.4741 + *)
6.4742 + ;;
6.4743 + esac
6.4744 + ;;
6.4745 + tandem*)
6.4746 + case $cc_basename in
6.4747 + NCC)
6.4748 + # NonStop-UX NCC 3.20
6.4749 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6.4750 + ;;
6.4751 + *)
6.4752 + ;;
6.4753 + esac
6.4754 + ;;
6.4755 + unixware*)
6.4756 + ;;
6.4757 + vxworks*)
6.4758 + ;;
6.4759 + *)
6.4760 + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6.4761 + ;;
6.4762 + esac
6.4763 + fi
6.4764 +],
6.4765 +[
6.4766 + if test "$GCC" = yes; then
6.4767 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4768 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6.4769 +
6.4770 + case $host_os in
6.4771 + aix*)
6.4772 + # All AIX code is PIC.
6.4773 + if test "$host_cpu" = ia64; then
6.4774 + # AIX 5 now supports IA64 processor
6.4775 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6.4776 + fi
6.4777 + ;;
6.4778 +
6.4779 + amigaos*)
6.4780 + # FIXME: we need at least 68020 code to build shared libraries, but
6.4781 + # adding the `-m68020' flag to GCC prevents building anything better,
6.4782 + # like `-m68040'.
6.4783 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6.4784 + ;;
6.4785 +
6.4786 + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6.4787 + # PIC is the default for these OSes.
6.4788 + ;;
6.4789 +
6.4790 + mingw* | pw32* | os2*)
6.4791 + # This hack is so that the source file can tell whether it is being
6.4792 + # built for inclusion in a dll (and should export symbols for example).
6.4793 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6.4794 + ;;
6.4795 +
6.4796 + darwin* | rhapsody*)
6.4797 + # PIC is the default on this platform
6.4798 + # Common symbols not allowed in MH_DYLIB files
6.4799 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6.4800 + ;;
6.4801 +
6.4802 + msdosdjgpp*)
6.4803 + # Just because we use GCC doesn't mean we suddenly get shared libraries
6.4804 + # on systems that don't support them.
6.4805 + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6.4806 + enable_shared=no
6.4807 + ;;
6.4808 +
6.4809 + sysv4*MP*)
6.4810 + if test -d /usr/nec; then
6.4811 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6.4812 + fi
6.4813 + ;;
6.4814 +
6.4815 + hpux*)
6.4816 + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6.4817 + # not for PA HP-UX.
6.4818 + case "$host_cpu" in
6.4819 + hppa*64*|ia64*)
6.4820 + # +Z the default
6.4821 + ;;
6.4822 + *)
6.4823 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6.4824 + ;;
6.4825 + esac
6.4826 + ;;
6.4827 +
6.4828 + *)
6.4829 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6.4830 + ;;
6.4831 + esac
6.4832 + else
6.4833 + # PORTME Check for flag to pass linker flags through the system compiler.
6.4834 + case $host_os in
6.4835 + aix*)
6.4836 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4837 + if test "$host_cpu" = ia64; then
6.4838 + # AIX 5 now supports IA64 processor
6.4839 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6.4840 + else
6.4841 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6.4842 + fi
6.4843 + ;;
6.4844 +
6.4845 + mingw* | pw32* | os2*)
6.4846 + # This hack is so that the source file can tell whether it is being
6.4847 + # built for inclusion in a dll (and should export symbols for example).
6.4848 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6.4849 + ;;
6.4850 +
6.4851 + hpux9* | hpux10* | hpux11*)
6.4852 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4853 + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6.4854 + # not for PA HP-UX.
6.4855 + case "$host_cpu" in
6.4856 + hppa*64*|ia64*)
6.4857 + # +Z the default
6.4858 + ;;
6.4859 + *)
6.4860 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6.4861 + ;;
6.4862 + esac
6.4863 + # Is there a better lt_prog_compiler_static that works with the bundled CC?
6.4864 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6.4865 + ;;
6.4866 +
6.4867 + irix5* | irix6* | nonstopux*)
6.4868 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4869 + # PIC (with -KPIC) is the default.
6.4870 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6.4871 + ;;
6.4872 +
6.4873 + newsos6)
6.4874 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6.4875 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6.4876 + ;;
6.4877 +
6.4878 + linux*)
6.4879 + case $CC in
6.4880 + icc* | ecc*)
6.4881 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4882 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6.4883 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6.4884 + ;;
6.4885 + ccc*)
6.4886 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4887 + # All Alpha code is PIC.
6.4888 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6.4889 + ;;
6.4890 + esac
6.4891 + ;;
6.4892 +
6.4893 + osf3* | osf4* | osf5*)
6.4894 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4895 + # All OSF/1 code is PIC.
6.4896 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6.4897 + ;;
6.4898 +
6.4899 + sco3.2v5*)
6.4900 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
6.4901 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
6.4902 + ;;
6.4903 +
6.4904 + solaris*)
6.4905 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4906 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6.4907 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6.4908 + ;;
6.4909 +
6.4910 + sunos4*)
6.4911 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6.4912 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6.4913 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6.4914 + ;;
6.4915 +
6.4916 + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6.4917 + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6.4918 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6.4919 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6.4920 + ;;
6.4921 +
6.4922 + sysv4*MP*)
6.4923 + if test -d /usr/nec ;then
6.4924 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6.4925 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6.4926 + fi
6.4927 + ;;
6.4928 +
6.4929 + uts4*)
6.4930 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6.4931 + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6.4932 + ;;
6.4933 +
6.4934 + *)
6.4935 + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6.4936 + ;;
6.4937 + esac
6.4938 + fi
6.4939 +])
6.4940 +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6.4941 +
6.4942 +#
6.4943 +# Check to make sure the PIC flag actually works.
6.4944 +#
6.4945 +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6.4946 + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6.4947 + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6.4948 + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6.4949 + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6.4950 + "" | " "*) ;;
6.4951 + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6.4952 + esac],
6.4953 + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6.4954 + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6.4955 +fi
6.4956 +case "$host_os" in
6.4957 + # For platforms which do not support PIC, -DPIC is meaningless:
6.4958 + *djgpp*)
6.4959 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6.4960 + ;;
6.4961 + *)
6.4962 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6.4963 + ;;
6.4964 +esac
6.4965 +])
6.4966 +
6.4967 +
6.4968 +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6.4969 +# ------------------------------------
6.4970 +# See if the linker supports building shared libraries.
6.4971 +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6.4972 +[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6.4973 +ifelse([$1],[CXX],[
6.4974 + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6.4975 + case $host_os in
6.4976 + aix4* | aix5*)
6.4977 + # If we're using GNU nm, then we don't want the "-C" option.
6.4978 + # -C means demangle to AIX nm, but means don't demangle with GNU nm
6.4979 + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6.4980 + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6.4981 + else
6.4982 + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6.4983 + fi
6.4984 + ;;
6.4985 + pw32*)
6.4986 + _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6.4987 + ;;
6.4988 + cygwin* | mingw*)
6.4989 + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6.4990 + ;;
6.4991 + linux*)
6.4992 + _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6.4993 + ;;
6.4994 + *)
6.4995 + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6.4996 + ;;
6.4997 + esac
6.4998 +],[
6.4999 + runpath_var=
6.5000 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6.5001 + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6.5002 + _LT_AC_TAGVAR(archive_cmds, $1)=
6.5003 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6.5004 + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6.5005 + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6.5006 + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6.5007 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6.5008 + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6.5009 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6.5010 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6.5011 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6.5012 + _LT_AC_TAGVAR(hardcode_direct, $1)=no
6.5013 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6.5014 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6.5015 + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6.5016 + _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6.5017 + _LT_AC_TAGVAR(module_cmds, $1)=
6.5018 + _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6.5019 + _LT_AC_TAGVAR(always_export_symbols, $1)=no
6.5020 + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6.5021 + # include_expsyms should be a list of space-separated symbols to be *always*
6.5022 + # included in the symbol list
6.5023 + _LT_AC_TAGVAR(include_expsyms, $1)=
6.5024 + # exclude_expsyms can be an extended regexp of symbols to exclude
6.5025 + # it will be wrapped by ` (' and `)$', so one must not match beginning or
6.5026 + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6.5027 + # as well as any symbol that contains `d'.
6.5028 + _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6.5029 + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6.5030 + # platforms (ab)use it in PIC code, but their linkers get confused if
6.5031 + # the symbol is explicitly referenced. Since portable code cannot
6.5032 + # rely on this symbol name, it's probably fine to never include it in
6.5033 + # preloaded symbol tables.
6.5034 + extract_expsyms_cmds=
6.5035 +
6.5036 + case $host_os in
6.5037 + cygwin* | mingw* | pw32*)
6.5038 + # FIXME: the MSVC++ port hasn't been tested in a loooong time
6.5039 + # When not using gcc, we currently assume that we are using
6.5040 + # Microsoft Visual C++.
6.5041 + if test "$GCC" != yes; then
6.5042 + with_gnu_ld=no
6.5043 + fi
6.5044 + ;;
6.5045 + openbsd*)
6.5046 + with_gnu_ld=no
6.5047 + ;;
6.5048 + esac
6.5049 +
6.5050 + _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6.5051 + if test "$with_gnu_ld" = yes; then
6.5052 + # If archive_cmds runs LD, not CC, wlarc should be empty
6.5053 + wlarc='${wl}'
6.5054 +
6.5055 + # See if GNU ld supports shared libraries.
6.5056 + case $host_os in
6.5057 + aix3* | aix4* | aix5*)
6.5058 + # On AIX/PPC, the GNU linker is very broken
6.5059 + if test "$host_cpu" != ia64; then
6.5060 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.5061 + cat <<EOF 1>&2
6.5062 +
6.5063 +*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6.5064 +*** to be unable to reliably create shared libraries on AIX.
6.5065 +*** Therefore, libtool is disabling shared libraries support. If you
6.5066 +*** really care for shared libraries, you may want to modify your PATH
6.5067 +*** so that a non-GNU linker is found, and then restart.
6.5068 +
6.5069 +EOF
6.5070 + fi
6.5071 + ;;
6.5072 +
6.5073 + amigaos*)
6.5074 + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6.5075 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6.5076 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6.5077 +
6.5078 + # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6.5079 + # that the semantics of dynamic libraries on AmigaOS, at least up
6.5080 + # to version 4, is to share data among multiple programs linked
6.5081 + # with the same dynamic library. Since this doesn't match the
6.5082 + # behavior of shared libraries on other platforms, we can't use
6.5083 + # them.
6.5084 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.5085 + ;;
6.5086 +
6.5087 + beos*)
6.5088 + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6.5089 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6.5090 + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6.5091 + # support --undefined. This deserves some investigation. FIXME
6.5092 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6.5093 + else
6.5094 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.5095 + fi
6.5096 + ;;
6.5097 +
6.5098 + cygwin* | mingw* | pw32*)
6.5099 + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6.5100 + # as there is no search path for DLLs.
6.5101 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6.5102 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6.5103 + _LT_AC_TAGVAR(always_export_symbols, $1)=no
6.5104 + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6.5105 + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6.5106 +
6.5107 + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6.5108 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6.5109 + # If the export-symbols file already is a .def file (1st line
6.5110 + # is EXPORTS), use it as is; otherwise, prepend...
6.5111 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6.5112 + cp $export_symbols $output_objdir/$soname.def;
6.5113 + else
6.5114 + echo EXPORTS > $output_objdir/$soname.def;
6.5115 + cat $export_symbols >> $output_objdir/$soname.def;
6.5116 + fi~
6.5117 + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6.5118 + else
6.5119 + ld_shlibs=no
6.5120 + fi
6.5121 + ;;
6.5122 +
6.5123 + netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6.5124 + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6.5125 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6.5126 + wlarc=
6.5127 + else
6.5128 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6.5129 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6.5130 + fi
6.5131 + ;;
6.5132 +
6.5133 + solaris* | sysv5*)
6.5134 + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6.5135 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.5136 + cat <<EOF 1>&2
6.5137 +
6.5138 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6.5139 +*** create shared libraries on Solaris systems. Therefore, libtool
6.5140 +*** is disabling shared libraries support. We urge you to upgrade GNU
6.5141 +*** binutils to release 2.9.1 or newer. Another option is to modify
6.5142 +*** your PATH or compiler configuration so that the native linker is
6.5143 +*** used, and then restart.
6.5144 +
6.5145 +EOF
6.5146 + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6.5147 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6.5148 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6.5149 + else
6.5150 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.5151 + fi
6.5152 + ;;
6.5153 +
6.5154 + sunos4*)
6.5155 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6.5156 + wlarc=
6.5157 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.5158 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5159 + ;;
6.5160 +
6.5161 + linux*)
6.5162 + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6.5163 + tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6.5164 + _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
6.5165 + supports_anon_versioning=no
6.5166 + case `$LD -v 2>/dev/null` in
6.5167 + *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6.5168 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6.5169 + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6.5170 + *\ 2.11.*) ;; # other 2.11 versions
6.5171 + *) supports_anon_versioning=yes ;;
6.5172 + esac
6.5173 + if test $supports_anon_versioning = yes; then
6.5174 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6.5175 +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6.5176 +$echo "local: *; };" >> $output_objdir/$libname.ver~
6.5177 + $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6.5178 + else
6.5179 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
6.5180 + fi
6.5181 + _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6.5182 + else
6.5183 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.5184 + fi
6.5185 + ;;
6.5186 +
6.5187 + *)
6.5188 + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6.5189 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6.5190 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6.5191 + else
6.5192 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.5193 + fi
6.5194 + ;;
6.5195 + esac
6.5196 +
6.5197 + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
6.5198 + runpath_var=LD_RUN_PATH
6.5199 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6.5200 + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6.5201 + # ancient GNU ld didn't support --whole-archive et. al.
6.5202 + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6.5203 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6.5204 + else
6.5205 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6.5206 + fi
6.5207 + fi
6.5208 + else
6.5209 + # PORTME fill in a description of your system's linker (not GNU ld)
6.5210 + case $host_os in
6.5211 + aix3*)
6.5212 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6.5213 + _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6.5214 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6.5215 + # Note: this linker hardcodes the directories in LIBPATH if there
6.5216 + # are no directories specified by -L.
6.5217 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6.5218 + if test "$GCC" = yes && test -z "$link_static_flag"; then
6.5219 + # Neither direct hardcoding nor static linking is supported with a
6.5220 + # broken collect2.
6.5221 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6.5222 + fi
6.5223 + ;;
6.5224 +
6.5225 + aix4* | aix5*)
6.5226 + if test "$host_cpu" = ia64; then
6.5227 + # On IA64, the linker does run time linking by default, so we don't
6.5228 + # have to do anything special.
6.5229 + aix_use_runtimelinking=no
6.5230 + exp_sym_flag='-Bexport'
6.5231 + no_entry_flag=""
6.5232 + else
6.5233 + # If we're using GNU nm, then we don't want the "-C" option.
6.5234 + # -C means demangle to AIX nm, but means don't demangle with GNU nm
6.5235 + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6.5236 + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6.5237 + else
6.5238 + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6.5239 + fi
6.5240 + aix_use_runtimelinking=no
6.5241 +
6.5242 + # Test if we are trying to use run time linking or normal
6.5243 + # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6.5244 + # need to do runtime linking.
6.5245 + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6.5246 + for ld_flag in $LDFLAGS; do
6.5247 + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6.5248 + aix_use_runtimelinking=yes
6.5249 + break
6.5250 + fi
6.5251 + done
6.5252 + esac
6.5253 +
6.5254 + exp_sym_flag='-bexport'
6.5255 + no_entry_flag='-bnoentry'
6.5256 + fi
6.5257 +
6.5258 + # When large executables or shared objects are built, AIX ld can
6.5259 + # have problems creating the table of contents. If linking a library
6.5260 + # or program results in "error TOC overflow" add -mminimal-toc to
6.5261 + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6.5262 + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6.5263 +
6.5264 + _LT_AC_TAGVAR(archive_cmds, $1)=''
6.5265 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.5266 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6.5267 + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6.5268 +
6.5269 + if test "$GCC" = yes; then
6.5270 + case $host_os in aix4.[012]|aix4.[012].*)
6.5271 + # We only want to do this on AIX 4.2 and lower, the check
6.5272 + # below for broken collect2 doesn't work under 4.3+
6.5273 + collect2name=`${CC} -print-prog-name=collect2`
6.5274 + if test -f "$collect2name" && \
6.5275 + strings "$collect2name" | grep resolve_lib_name >/dev/null
6.5276 + then
6.5277 + # We have reworked collect2
6.5278 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.5279 + else
6.5280 + # We have old collect2
6.5281 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6.5282 + # It fails to find uninstalled libraries when the uninstalled
6.5283 + # path is not listed in the libpath. Setting hardcode_minus_L
6.5284 + # to unsupported forces relinking
6.5285 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6.5286 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6.5287 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6.5288 + fi
6.5289 + esac
6.5290 + shared_flag='-shared'
6.5291 + else
6.5292 + # not using gcc
6.5293 + if test "$host_cpu" = ia64; then
6.5294 + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6.5295 + # chokes on -Wl,-G. The following line is correct:
6.5296 + shared_flag='-G'
6.5297 + else
6.5298 + if test "$aix_use_runtimelinking" = yes; then
6.5299 + shared_flag='${wl}-G'
6.5300 + else
6.5301 + shared_flag='${wl}-bM:SRE'
6.5302 + fi
6.5303 + fi
6.5304 + fi
6.5305 +
6.5306 + # It seems that -bexpall does not export symbols beginning with
6.5307 + # underscore (_), so it is better to generate a list of symbols to export.
6.5308 + _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6.5309 + if test "$aix_use_runtimelinking" = yes; then
6.5310 + # Warning - without using the other runtime loading flags (-brtl),
6.5311 + # -berok will link without error, but may produce a broken library.
6.5312 + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6.5313 + # Determine the default libpath from the value encoded in an empty executable.
6.5314 + _LT_AC_SYS_LIBPATH_AIX
6.5315 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6.5316 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6.5317 + else
6.5318 + if test "$host_cpu" = ia64; then
6.5319 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6.5320 + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6.5321 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
6.5322 + else
6.5323 + # Determine the default libpath from the value encoded in an empty executable.
6.5324 + _LT_AC_SYS_LIBPATH_AIX
6.5325 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6.5326 + # Warning - without using the other run time loading flags,
6.5327 + # -berok will link without error, but may produce a broken library.
6.5328 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6.5329 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6.5330 + # -bexpall does not export symbols beginning with underscore (_)
6.5331 + _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6.5332 + # Exported symbols can be pulled into shared objects from archives
6.5333 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6.5334 + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6.5335 + # This is similar to how AIX traditionally builds it's shared libraries.
6.5336 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6.5337 + fi
6.5338 + fi
6.5339 + ;;
6.5340 +
6.5341 + amigaos*)
6.5342 + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6.5343 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6.5344 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6.5345 + # see comment about different semantics on the GNU ld section
6.5346 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.5347 + ;;
6.5348 +
6.5349 + bsdi4*)
6.5350 + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6.5351 + ;;
6.5352 +
6.5353 + cygwin* | mingw* | pw32*)
6.5354 + # When not using gcc, we currently assume that we are using
6.5355 + # Microsoft Visual C++.
6.5356 + # hardcode_libdir_flag_spec is actually meaningless, as there is
6.5357 + # no search path for DLLs.
6.5358 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6.5359 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6.5360 + # Tell ltmain to make .lib files, not .a files.
6.5361 + libext=lib
6.5362 + # Tell ltmain to make .dll files, not .so files.
6.5363 + shrext_cmds=".dll"
6.5364 + # FIXME: Setting linknames here is a bad hack.
6.5365 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6.5366 + # The linker will automatically build a .lib file if we build a DLL.
6.5367 + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6.5368 + # FIXME: Should let the user specify the lib program.
6.5369 + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6.5370 + fix_srcfile_path='`cygpath -w "$srcfile"`'
6.5371 + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6.5372 + ;;
6.5373 +
6.5374 + darwin* | rhapsody*)
6.5375 + if test "$GXX" = yes ; then
6.5376 + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6.5377 + case "$host_os" in
6.5378 + rhapsody* | darwin1.[[012]])
6.5379 + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6.5380 + ;;
6.5381 + *) # Darwin 1.3 on
6.5382 + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6.5383 + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6.5384 + else
6.5385 + case ${MACOSX_DEPLOYMENT_TARGET} in
6.5386 + 10.[[012]])
6.5387 + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6.5388 + ;;
6.5389 + 10.*)
6.5390 + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
6.5391 + ;;
6.5392 + esac
6.5393 + fi
6.5394 + ;;
6.5395 + esac
6.5396 + lt_int_apple_cc_single_mod=no
6.5397 + output_verbose_link_cmd='echo'
6.5398 + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6.5399 + lt_int_apple_cc_single_mod=yes
6.5400 + fi
6.5401 + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6.5402 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6.5403 + else
6.5404 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
6.5405 + fi
6.5406 + _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6.5407 + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6.5408 + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6.5409 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6.5410 + else
6.5411 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6.5412 + fi
6.5413 + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6.5414 + _LT_AC_TAGVAR(hardcode_direct, $1)=no
6.5415 + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6.5416 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6.5417 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6.5418 + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6.5419 + else
6.5420 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.5421 + fi
6.5422 + ;;
6.5423 +
6.5424 + dgux*)
6.5425 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6.5426 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6.5427 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5428 + ;;
6.5429 +
6.5430 + freebsd1*)
6.5431 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.5432 + ;;
6.5433 +
6.5434 + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6.5435 + # support. Future versions do this automatically, but an explicit c++rt0.o
6.5436 + # does not break anything, and helps significantly (at the cost of a little
6.5437 + # extra space).
6.5438 + freebsd2.2*)
6.5439 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6.5440 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6.5441 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.5442 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5443 + ;;
6.5444 +
6.5445 + # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6.5446 + freebsd2*)
6.5447 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6.5448 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.5449 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6.5450 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5451 + ;;
6.5452 +
6.5453 + # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6.5454 + freebsd* | kfreebsd*-gnu)
6.5455 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6.5456 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6.5457 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.5458 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5459 + ;;
6.5460 +
6.5461 + hpux9*)
6.5462 + if test "$GCC" = yes; then
6.5463 + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6.5464 + else
6.5465 + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6.5466 + fi
6.5467 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6.5468 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.5469 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.5470 +
6.5471 + # hardcode_minus_L: Not really in the search PATH,
6.5472 + # but as the default location of the library.
6.5473 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6.5474 + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6.5475 + ;;
6.5476 +
6.5477 + hpux10* | hpux11*)
6.5478 + if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6.5479 + case "$host_cpu" in
6.5480 + hppa*64*|ia64*)
6.5481 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6.5482 + ;;
6.5483 + *)
6.5484 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6.5485 + ;;
6.5486 + esac
6.5487 + else
6.5488 + case "$host_cpu" in
6.5489 + hppa*64*|ia64*)
6.5490 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6.5491 + ;;
6.5492 + *)
6.5493 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6.5494 + ;;
6.5495 + esac
6.5496 + fi
6.5497 + if test "$with_gnu_ld" = no; then
6.5498 + case "$host_cpu" in
6.5499 + hppa*64*)
6.5500 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6.5501 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6.5502 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.5503 + _LT_AC_TAGVAR(hardcode_direct, $1)=no
6.5504 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5505 + ;;
6.5506 + ia64*)
6.5507 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6.5508 + _LT_AC_TAGVAR(hardcode_direct, $1)=no
6.5509 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5510 +
6.5511 + # hardcode_minus_L: Not really in the search PATH,
6.5512 + # but as the default location of the library.
6.5513 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6.5514 + ;;
6.5515 + *)
6.5516 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6.5517 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.5518 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.5519 + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6.5520 +
6.5521 + # hardcode_minus_L: Not really in the search PATH,
6.5522 + # but as the default location of the library.
6.5523 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6.5524 + ;;
6.5525 + esac
6.5526 + fi
6.5527 + ;;
6.5528 +
6.5529 + irix5* | irix6* | nonstopux*)
6.5530 + if test "$GCC" = yes; then
6.5531 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6.5532 + else
6.5533 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6.5534 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6.5535 + fi
6.5536 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6.5537 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.5538 + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6.5539 + ;;
6.5540 +
6.5541 + netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6.5542 + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6.5543 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6.5544 + else
6.5545 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6.5546 + fi
6.5547 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6.5548 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.5549 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5550 + ;;
6.5551 +
6.5552 + newsos6)
6.5553 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6.5554 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.5555 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6.5556 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.5557 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5558 + ;;
6.5559 +
6.5560 + openbsd*)
6.5561 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.5562 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5563 + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6.5564 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6.5565 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6.5566 + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6.5567 + else
6.5568 + case $host_os in
6.5569 + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6.5570 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6.5571 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6.5572 + ;;
6.5573 + *)
6.5574 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6.5575 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6.5576 + ;;
6.5577 + esac
6.5578 + fi
6.5579 + ;;
6.5580 +
6.5581 + os2*)
6.5582 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6.5583 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6.5584 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6.5585 + _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6.5586 + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6.5587 + ;;
6.5588 +
6.5589 + osf3*)
6.5590 + if test "$GCC" = yes; then
6.5591 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6.5592 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6.5593 + else
6.5594 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6.5595 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6.5596 + fi
6.5597 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6.5598 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.5599 + ;;
6.5600 +
6.5601 + osf4* | osf5*) # as osf3* with the addition of -msym flag
6.5602 + if test "$GCC" = yes; then
6.5603 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6.5604 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6.5605 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6.5606 + else
6.5607 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6.5608 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6.5609 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6.5610 + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
6.5611 +
6.5612 + # Both c and cxx compiler support -rpath directly
6.5613 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6.5614 + fi
6.5615 + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6.5616 + ;;
6.5617 +
6.5618 + sco3.2v5*)
6.5619 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6.5620 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5621 + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6.5622 + runpath_var=LD_RUN_PATH
6.5623 + hardcode_runpath_var=yes
6.5624 + ;;
6.5625 +
6.5626 + solaris*)
6.5627 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6.5628 + if test "$GCC" = yes; then
6.5629 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6.5630 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6.5631 + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6.5632 + else
6.5633 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6.5634 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6.5635 + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6.5636 + fi
6.5637 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6.5638 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5639 + case $host_os in
6.5640 + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6.5641 + *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6.5642 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6.5643 + esac
6.5644 + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6.5645 + ;;
6.5646 +
6.5647 + sunos4*)
6.5648 + if test "x$host_vendor" = xsequent; then
6.5649 + # Use $CC to link under sequent, because it throws in some extra .o
6.5650 + # files that make .init and .fini sections work.
6.5651 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6.5652 + else
6.5653 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6.5654 + fi
6.5655 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6.5656 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.5657 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6.5658 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5659 + ;;
6.5660 +
6.5661 + sysv4)
6.5662 + case $host_vendor in
6.5663 + sni)
6.5664 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6.5665 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6.5666 + ;;
6.5667 + siemens)
6.5668 + ## LD is ld it makes a PLAMLIB
6.5669 + ## CC just makes a GrossModule.
6.5670 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6.5671 + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6.5672 + _LT_AC_TAGVAR(hardcode_direct, $1)=no
6.5673 + ;;
6.5674 + motorola)
6.5675 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6.5676 + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6.5677 + ;;
6.5678 + esac
6.5679 + runpath_var='LD_RUN_PATH'
6.5680 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5681 + ;;
6.5682 +
6.5683 + sysv4.3*)
6.5684 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6.5685 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5686 + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6.5687 + ;;
6.5688 +
6.5689 + sysv4*MP*)
6.5690 + if test -d /usr/nec; then
6.5691 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6.5692 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5693 + runpath_var=LD_RUN_PATH
6.5694 + hardcode_runpath_var=yes
6.5695 + _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6.5696 + fi
6.5697 + ;;
6.5698 +
6.5699 + sysv4.2uw2*)
6.5700 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6.5701 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6.5702 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6.5703 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5704 + hardcode_runpath_var=yes
6.5705 + runpath_var=LD_RUN_PATH
6.5706 + ;;
6.5707 +
6.5708 + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6.5709 + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6.5710 + if test "$GCC" = yes; then
6.5711 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6.5712 + else
6.5713 + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6.5714 + fi
6.5715 + runpath_var='LD_RUN_PATH'
6.5716 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5717 + ;;
6.5718 +
6.5719 + sysv5*)
6.5720 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6.5721 + # $CC -shared without GNU ld will not create a library from C++
6.5722 + # object files and a static libstdc++, better avoid it by now
6.5723 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6.5724 + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6.5725 + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6.5726 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6.5727 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5728 + runpath_var='LD_RUN_PATH'
6.5729 + ;;
6.5730 +
6.5731 + uts4*)
6.5732 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6.5733 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6.5734 + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6.5735 + ;;
6.5736 +
6.5737 + *)
6.5738 + _LT_AC_TAGVAR(ld_shlibs, $1)=no
6.5739 + ;;
6.5740 + esac
6.5741 + fi
6.5742 +])
6.5743 +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6.5744 +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6.5745 +
6.5746 +variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6.5747 +if test "$GCC" = yes; then
6.5748 + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6.5749 +fi
6.5750 +
6.5751 +#
6.5752 +# Do we need to explicitly link libc?
6.5753 +#
6.5754 +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6.5755 +x|xyes)
6.5756 + # Assume -lc should be added
6.5757 + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6.5758 +
6.5759 + if test "$enable_shared" = yes && test "$GCC" = yes; then
6.5760 + case $_LT_AC_TAGVAR(archive_cmds, $1) in
6.5761 + *'~'*)
6.5762 + # FIXME: we may have to deal with multi-command sequences.
6.5763 + ;;
6.5764 + '$CC '*)
6.5765 + # Test whether the compiler implicitly links with -lc since on some
6.5766 + # systems, -lgcc has to come before -lc. If gcc already passes -lc
6.5767 + # to ld, don't add -lc before -lgcc.
6.5768 + AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6.5769 + $rm conftest*
6.5770 + printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6.5771 +
6.5772 + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6.5773 + soname=conftest
6.5774 + lib=conftest
6.5775 + libobjs=conftest.$ac_objext
6.5776 + deplibs=
6.5777 + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6.5778 + compiler_flags=-v
6.5779 + linker_flags=-v
6.5780 + verstring=
6.5781 + output_objdir=.
6.5782 + libname=conftest
6.5783 + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6.5784 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6.5785 + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6.5786 + then
6.5787 + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6.5788 + else
6.5789 + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6.5790 + fi
6.5791 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6.5792 + else
6.5793 + cat conftest.err 1>&5
6.5794 + fi
6.5795 + $rm conftest*
6.5796 + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6.5797 + ;;
6.5798 + esac
6.5799 + fi
6.5800 + ;;
6.5801 +esac
6.5802 +])# AC_LIBTOOL_PROG_LD_SHLIBS
6.5803 +
6.5804 +
6.5805 +# _LT_AC_FILE_LTDLL_C
6.5806 +# -------------------
6.5807 +# Be careful that the start marker always follows a newline.
6.5808 +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6.5809 +# /* ltdll.c starts here */
6.5810 +# #define WIN32_LEAN_AND_MEAN
6.5811 +# #include <windows.h>
6.5812 +# #undef WIN32_LEAN_AND_MEAN
6.5813 +# #include <stdio.h>
6.5814 +#
6.5815 +# #ifndef __CYGWIN__
6.5816 +# # ifdef __CYGWIN32__
6.5817 +# # define __CYGWIN__ __CYGWIN32__
6.5818 +# # endif
6.5819 +# #endif
6.5820 +#
6.5821 +# #ifdef __cplusplus
6.5822 +# extern "C" {
6.5823 +# #endif
6.5824 +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6.5825 +# #ifdef __cplusplus
6.5826 +# }
6.5827 +# #endif
6.5828 +#
6.5829 +# #ifdef __CYGWIN__
6.5830 +# #include <cygwin/cygwin_dll.h>
6.5831 +# DECLARE_CYGWIN_DLL( DllMain );
6.5832 +# #endif
6.5833 +# HINSTANCE __hDllInstance_base;
6.5834 +#
6.5835 +# BOOL APIENTRY
6.5836 +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6.5837 +# {
6.5838 +# __hDllInstance_base = hInst;
6.5839 +# return TRUE;
6.5840 +# }
6.5841 +# /* ltdll.c ends here */
6.5842 +])# _LT_AC_FILE_LTDLL_C
6.5843 +
6.5844 +
6.5845 +# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6.5846 +# ---------------------------------
6.5847 +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6.5848 +
6.5849 +
6.5850 +# old names
6.5851 +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6.5852 +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6.5853 +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6.5854 +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6.5855 +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6.5856 +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6.5857 +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6.5858 +
6.5859 +# This is just to silence aclocal about the macro not being used
6.5860 +ifelse([AC_DISABLE_FAST_INSTALL])
6.5861 +
6.5862 +AC_DEFUN([LT_AC_PROG_GCJ],
6.5863 +[AC_CHECK_TOOL(GCJ, gcj, no)
6.5864 + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6.5865 + AC_SUBST(GCJFLAGS)
6.5866 +])
6.5867 +
6.5868 +AC_DEFUN([LT_AC_PROG_RC],
6.5869 +[AC_CHECK_TOOL(RC, windres, no)
6.5870 +])
6.5871 +
6.5872 +# NOTE: This macro has been submitted for inclusion into #
6.5873 +# GNU Autoconf as AC_PROG_SED. When it is available in #
6.5874 +# a released version of Autoconf we should remove this #
6.5875 +# macro and use it instead. #
6.5876 +# LT_AC_PROG_SED
6.5877 +# --------------
6.5878 +# Check for a fully-functional sed program, that truncates
6.5879 +# as few characters as possible. Prefer GNU sed if found.
6.5880 +AC_DEFUN([LT_AC_PROG_SED],
6.5881 +[AC_MSG_CHECKING([for a sed that does not truncate output])
6.5882 +AC_CACHE_VAL(lt_cv_path_SED,
6.5883 +[# Loop through the user's path and test for sed and gsed.
6.5884 +# Then use that list of sed's as ones to test for truncation.
6.5885 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6.5886 +for as_dir in $PATH
6.5887 +do
6.5888 + IFS=$as_save_IFS
6.5889 + test -z "$as_dir" && as_dir=.
6.5890 + for lt_ac_prog in sed gsed; do
6.5891 + for ac_exec_ext in '' $ac_executable_extensions; do
6.5892 + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6.5893 + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6.5894 + fi
6.5895 + done
6.5896 + done
6.5897 +done
6.5898 +lt_ac_max=0
6.5899 +lt_ac_count=0
6.5900 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6.5901 +# along with /bin/sed that truncates output.
6.5902 +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6.5903 + test ! -f $lt_ac_sed && break
6.5904 + cat /dev/null > conftest.in
6.5905 + lt_ac_count=0
6.5906 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6.5907 + # Check for GNU sed and select it if it is found.
6.5908 + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6.5909 + lt_cv_path_SED=$lt_ac_sed
6.5910 + break
6.5911 + fi
6.5912 + while true; do
6.5913 + cat conftest.in conftest.in >conftest.tmp
6.5914 + mv conftest.tmp conftest.in
6.5915 + cp conftest.in conftest.nl
6.5916 + echo >>conftest.nl
6.5917 + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6.5918 + cmp -s conftest.out conftest.nl || break
6.5919 + # 10000 chars as input seems more than enough
6.5920 + test $lt_ac_count -gt 10 && break
6.5921 + lt_ac_count=`expr $lt_ac_count + 1`
6.5922 + if test $lt_ac_count -gt $lt_ac_max; then
6.5923 + lt_ac_max=$lt_ac_count
6.5924 + lt_cv_path_SED=$lt_ac_sed
6.5925 + fi
6.5926 + done
6.5927 +done
6.5928 +SED=$lt_cv_path_SED
6.5929 +])
6.5930 +AC_MSG_RESULT([$SED])
6.5931 +])
6.5932 +
6.5933 +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
6.5934 +#
6.5935 +# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
6.5936 +#
6.5937 +# This program is free software; you can redistribute it and/or modify
6.5938 +# it under the terms of the GNU General Public License as published by
6.5939 +# the Free Software Foundation; either version 2 of the License, or
6.5940 +# (at your option) any later version.
6.5941 +#
6.5942 +# This program is distributed in the hope that it will be useful, but
6.5943 +# WITHOUT ANY WARRANTY; without even the implied warranty of
6.5944 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6.5945 +# General Public License for more details.
6.5946 +#
6.5947 +# You should have received a copy of the GNU General Public License
6.5948 +# along with this program; if not, write to the Free Software
6.5949 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6.5950 +#
6.5951 +# As a special exception to the GNU General Public License, if you
6.5952 +# distribute this file as part of a program that contains a
6.5953 +# configuration script generated by Autoconf, you may include it under
6.5954 +# the same distribution terms that you use for the rest of that program.
6.5955 +
6.5956 +# PKG_PROG_PKG_CONFIG([MIN-VERSION])
6.5957 +# ----------------------------------
6.5958 +AC_DEFUN([PKG_PROG_PKG_CONFIG],
6.5959 +[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
6.5960 +m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
6.5961 +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
6.5962 +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6.5963 + AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6.5964 +fi
6.5965 +if test -n "$PKG_CONFIG"; then
6.5966 + _pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
6.5967 + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6.5968 + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6.5969 + AC_MSG_RESULT([yes])
6.5970 + else
6.5971 + AC_MSG_RESULT([no])
6.5972 + PKG_CONFIG=""
6.5973 + fi
6.5974 +
6.5975 +fi[]dnl
6.5976 +])# PKG_PROG_PKG_CONFIG
6.5977 +
6.5978 +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6.5979 +#
6.5980 +# Check to see whether a particular set of modules exists. Similar
6.5981 +# to PKG_CHECK_MODULES(), but does not set variables or print errors.
6.5982 +#
6.5983 +#
6.5984 +# Similar to PKG_CHECK_MODULES, make sure that the first instance of
6.5985 +# this or PKG_CHECK_MODULES is called, or make sure to call
6.5986 +# PKG_CHECK_EXISTS manually
6.5987 +# --------------------------------------------------------------
6.5988 +AC_DEFUN([PKG_CHECK_EXISTS],
6.5989 +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6.5990 +if test -n "$PKG_CONFIG" && \
6.5991 + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
6.5992 + m4_ifval([$2], [$2], [:])
6.5993 +m4_ifvaln([$3], [else
6.5994 + $3])dnl
6.5995 +fi])
6.5996 +
6.5997 +
6.5998 +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6.5999 +# ---------------------------------------------
6.6000 +m4_define([_PKG_CONFIG],
6.6001 +[if test -n "$PKG_CONFIG"; then
6.6002 + PKG_CHECK_EXISTS([$3],
6.6003 + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6.6004 + [pkg_failed=yes])
6.6005 +else
6.6006 + pkg_failed=untried
6.6007 +fi[]dnl
6.6008 +])# _PKG_CONFIG
6.6009 +
6.6010 +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6.6011 +# [ACTION-IF-NOT-FOUND])
6.6012 +#
6.6013 +#
6.6014 +# Note that if there is a possibility the first call to
6.6015 +# PKG_CHECK_MODULES might not happen, you should be sure to include an
6.6016 +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
6.6017 +#
6.6018 +#
6.6019 +# --------------------------------------------------------------
6.6020 +AC_DEFUN([PKG_CHECK_MODULES],
6.6021 +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6.6022 +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
6.6023 +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6.6024 +
6.6025 +pkg_failed=no
6.6026 +AC_MSG_CHECKING([for $1])
6.6027 +
6.6028 +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6.6029 +_PKG_CONFIG([$1][_LIBS], [libs], [$2])
6.6030 +
6.6031 +if test $pkg_failed = yes; then
6.6032 + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6.6033 + # Put the nasty error message in config.log where it belongs
6.6034 + echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
6.6035 +
6.6036 + ifelse([$4], , [AC_MSG_ERROR(dnl
6.6037 +[Package requirements ($2) were not met.
6.6038 +Consider adjusting the PKG_CONFIG_PATH environment variable if you
6.6039 +installed software in a non-standard prefix.
6.6040 +
6.6041 +Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
6.6042 +to avoid the need to call pkg-config. See the pkg-config man page for
6.6043 +more details.])],
6.6044 + [$4])
6.6045 +elif test $pkg_failed = untried; then
6.6046 + ifelse([$4], , [AC_MSG_FAILURE(dnl
6.6047 +[The pkg-config script could not be found or is too old. Make sure it
6.6048 +is in your PATH or set the PKG_CONFIG environment variable to the full
6.6049 +path to pkg-config.
6.6050 +
6.6051 +Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
6.6052 +to avoid the need to call pkg-config. See the pkg-config man page for
6.6053 +more details.
6.6054 +
6.6055 +To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
6.6056 + [$4])
6.6057 +else
6.6058 + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6.6059 + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
6.6060 + AC_MSG_RESULT([yes])
6.6061 + ifelse([$3], , :, [$3])
6.6062 +fi[]dnl
6.6063 +])# PKG_CHECK_MODULES
6.6064 +
6.6065 +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
6.6066 +#
6.6067 +# This file is free software; the Free Software Foundation
6.6068 +# gives unlimited permission to copy and/or distribute it,
6.6069 +# with or without modifications, as long as this notice is preserved.
6.6070 +
6.6071 +# AM_AUTOMAKE_VERSION(VERSION)
6.6072 +# ----------------------------
6.6073 +# Automake X.Y traces this macro to ensure aclocal.m4 has been
6.6074 +# generated from the m4 files accompanying Automake X.Y.
6.6075 +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
6.6076 +
6.6077 +# AM_SET_CURRENT_AUTOMAKE_VERSION
6.6078 +# -------------------------------
6.6079 +# Call AM_AUTOMAKE_VERSION so it can be traced.
6.6080 +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6.6081 +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6.6082 + [AM_AUTOMAKE_VERSION([1.9.5])])
6.6083 +
6.6084 +# AM_AUX_DIR_EXPAND -*- Autoconf -*-
6.6085 +
6.6086 +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6.6087 +#
6.6088 +# This file is free software; the Free Software Foundation
6.6089 +# gives unlimited permission to copy and/or distribute it,
6.6090 +# with or without modifications, as long as this notice is preserved.
6.6091 +
6.6092 +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6.6093 +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
6.6094 +# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6.6095 +#
6.6096 +# Of course, Automake must honor this variable whenever it calls a
6.6097 +# tool from the auxiliary directory. The problem is that $srcdir (and
6.6098 +# therefore $ac_aux_dir as well) can be either absolute or relative,
6.6099 +# depending on how configure is run. This is pretty annoying, since
6.6100 +# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6.6101 +# source directory, any form will work fine, but in subdirectories a
6.6102 +# relative path needs to be adjusted first.
6.6103 +#
6.6104 +# $ac_aux_dir/missing
6.6105 +# fails when called from a subdirectory if $ac_aux_dir is relative
6.6106 +# $top_srcdir/$ac_aux_dir/missing
6.6107 +# fails if $ac_aux_dir is absolute,
6.6108 +# fails when called from a subdirectory in a VPATH build with
6.6109 +# a relative $ac_aux_dir
6.6110 +#
6.6111 +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6.6112 +# are both prefixed by $srcdir. In an in-source build this is usually
6.6113 +# harmless because $srcdir is `.', but things will broke when you
6.6114 +# start a VPATH build or use an absolute $srcdir.
6.6115 +#
6.6116 +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6.6117 +# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
6.6118 +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6.6119 +# and then we would define $MISSING as
6.6120 +# MISSING="\${SHELL} $am_aux_dir/missing"
6.6121 +# This will work as long as MISSING is not called from configure, because
6.6122 +# unfortunately $(top_srcdir) has no meaning in configure.
6.6123 +# However there are other variables, like CC, which are often used in
6.6124 +# configure, and could therefore not use this "fixed" $ac_aux_dir.
6.6125 +#
6.6126 +# Another solution, used here, is to always expand $ac_aux_dir to an
6.6127 +# absolute PATH. The drawback is that using absolute paths prevent a
6.6128 +# configured tree to be moved without reconfiguration.
6.6129 +
6.6130 +AC_DEFUN([AM_AUX_DIR_EXPAND],
6.6131 +[dnl Rely on autoconf to set up CDPATH properly.
6.6132 +AC_PREREQ([2.50])dnl
6.6133 +# expand $ac_aux_dir to an absolute path
6.6134 +am_aux_dir=`cd $ac_aux_dir && pwd`
6.6135 +])
6.6136 +
6.6137 +# AM_CONDITIONAL -*- Autoconf -*-
6.6138 +
6.6139 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
6.6140 +# Free Software Foundation, Inc.
6.6141 +#
6.6142 +# This file is free software; the Free Software Foundation
6.6143 +# gives unlimited permission to copy and/or distribute it,
6.6144 +# with or without modifications, as long as this notice is preserved.
6.6145 +
6.6146 +# serial 7
6.6147 +
6.6148 +# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6.6149 +# -------------------------------------
6.6150 +# Define a conditional.
6.6151 +AC_DEFUN([AM_CONDITIONAL],
6.6152 +[AC_PREREQ(2.52)dnl
6.6153 + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
6.6154 + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6.6155 +AC_SUBST([$1_TRUE])
6.6156 +AC_SUBST([$1_FALSE])
6.6157 +if $2; then
6.6158 + $1_TRUE=
6.6159 + $1_FALSE='#'
6.6160 +else
6.6161 + $1_TRUE='#'
6.6162 + $1_FALSE=
6.6163 +fi
6.6164 +AC_CONFIG_COMMANDS_PRE(
6.6165 +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6.6166 + AC_MSG_ERROR([[conditional "$1" was never defined.
6.6167 +Usually this means the macro was only invoked conditionally.]])
6.6168 +fi])])
6.6169 +
6.6170 +
6.6171 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6.6172 +# Free Software Foundation, Inc.
6.6173 +#
6.6174 +# This file is free software; the Free Software Foundation
6.6175 +# gives unlimited permission to copy and/or distribute it,
6.6176 +# with or without modifications, as long as this notice is preserved.
6.6177 +
6.6178 +# serial 8
6.6179 +
6.6180 +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6.6181 +# written in clear, in which case automake, when reading aclocal.m4,
6.6182 +# will think it sees a *use*, and therefore will trigger all it's
6.6183 +# C support machinery. Also note that it means that autoscan, seeing
6.6184 +# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6.6185 +
6.6186 +
6.6187 +# _AM_DEPENDENCIES(NAME)
6.6188 +# ----------------------
6.6189 +# See how the compiler implements dependency checking.
6.6190 +# NAME is "CC", "CXX", "GCJ", or "OBJC".
6.6191 +# We try a few techniques and use that to set a single cache variable.
6.6192 +#
6.6193 +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6.6194 +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6.6195 +# dependency, and given that the user is not expected to run this macro,
6.6196 +# just rely on AC_PROG_CC.
6.6197 +AC_DEFUN([_AM_DEPENDENCIES],
6.6198 +[AC_REQUIRE([AM_SET_DEPDIR])dnl
6.6199 +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6.6200 +AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6.6201 +AC_REQUIRE([AM_DEP_TRACK])dnl
6.6202 +
6.6203 +ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
6.6204 + [$1], CXX, [depcc="$CXX" am_compiler_list=],
6.6205 + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6.6206 + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
6.6207 + [depcc="$$1" am_compiler_list=])
6.6208 +
6.6209 +AC_CACHE_CHECK([dependency style of $depcc],
6.6210 + [am_cv_$1_dependencies_compiler_type],
6.6211 +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6.6212 + # We make a subdir and do the tests there. Otherwise we can end up
6.6213 + # making bogus files that we don't know about and never remove. For
6.6214 + # instance it was reported that on HP-UX the gcc test will end up
6.6215 + # making a dummy file named `D' -- because `-MD' means `put the output
6.6216 + # in D'.
6.6217 + mkdir conftest.dir
6.6218 + # Copy depcomp to subdir because otherwise we won't find it if we're
6.6219 + # using a relative directory.
6.6220 + cp "$am_depcomp" conftest.dir
6.6221 + cd conftest.dir
6.6222 + # We will build objects and dependencies in a subdirectory because
6.6223 + # it helps to detect inapplicable dependency modes. For instance
6.6224 + # both Tru64's cc and ICC support -MD to output dependencies as a
6.6225 + # side effect of compilation, but ICC will put the dependencies in
6.6226 + # the current directory while Tru64 will put them in the object
6.6227 + # directory.
6.6228 + mkdir sub
6.6229 +
6.6230 + am_cv_$1_dependencies_compiler_type=none
6.6231 + if test "$am_compiler_list" = ""; then
6.6232 + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6.6233 + fi
6.6234 + for depmode in $am_compiler_list; do
6.6235 + # Setup a source with many dependencies, because some compilers
6.6236 + # like to wrap large dependency lists on column 80 (with \), and
6.6237 + # we should not choose a depcomp mode which is confused by this.
6.6238 + #
6.6239 + # We need to recreate these files for each test, as the compiler may
6.6240 + # overwrite some of them when testing with obscure command lines.
6.6241 + # This happens at least with the AIX C compiler.
6.6242 + : > sub/conftest.c
6.6243 + for i in 1 2 3 4 5 6; do
6.6244 + echo '#include "conftst'$i'.h"' >> sub/conftest.c
6.6245 + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6.6246 + # Solaris 8's {/usr,}/bin/sh.
6.6247 + touch sub/conftst$i.h
6.6248 + done
6.6249 + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6.6250 +
6.6251 + case $depmode in
6.6252 + nosideeffect)
6.6253 + # after this tag, mechanisms are not by side-effect, so they'll
6.6254 + # only be used when explicitly requested
6.6255 + if test "x$enable_dependency_tracking" = xyes; then
6.6256 + continue
6.6257 + else
6.6258 + break
6.6259 + fi
6.6260 + ;;
6.6261 + none) break ;;
6.6262 + esac
6.6263 + # We check with `-c' and `-o' for the sake of the "dashmstdout"
6.6264 + # mode. It turns out that the SunPro C++ compiler does not properly
6.6265 + # handle `-M -o', and we need to detect this.
6.6266 + if depmode=$depmode \
6.6267 + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6.6268 + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6.6269 + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6.6270 + >/dev/null 2>conftest.err &&
6.6271 + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6.6272 + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6.6273 + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6.6274 + # icc doesn't choke on unknown options, it will just issue warnings
6.6275 + # or remarks (even with -Werror). So we grep stderr for any message
6.6276 + # that says an option was ignored or not supported.
6.6277 + # When given -MP, icc 7.0 and 7.1 complain thusly:
6.6278 + # icc: Command line warning: ignoring option '-M'; no argument required
6.6279 + # The diagnosis changed in icc 8.0:
6.6280 + # icc: Command line remark: option '-MP' not supported
6.6281 + if (grep 'ignoring option' conftest.err ||
6.6282 + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6.6283 + am_cv_$1_dependencies_compiler_type=$depmode
6.6284 + break
6.6285 + fi
6.6286 + fi
6.6287 + done
6.6288 +
6.6289 + cd ..
6.6290 + rm -rf conftest.dir
6.6291 +else
6.6292 + am_cv_$1_dependencies_compiler_type=none
6.6293 +fi
6.6294 +])
6.6295 +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6.6296 +AM_CONDITIONAL([am__fastdep$1], [
6.6297 + test "x$enable_dependency_tracking" != xno \
6.6298 + && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6.6299 +])
6.6300 +
6.6301 +
6.6302 +# AM_SET_DEPDIR
6.6303 +# -------------
6.6304 +# Choose a directory name for dependency files.
6.6305 +# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6.6306 +AC_DEFUN([AM_SET_DEPDIR],
6.6307 +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6.6308 +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6.6309 +])
6.6310 +
6.6311 +
6.6312 +# AM_DEP_TRACK
6.6313 +# ------------
6.6314 +AC_DEFUN([AM_DEP_TRACK],
6.6315 +[AC_ARG_ENABLE(dependency-tracking,
6.6316 +[ --disable-dependency-tracking speeds up one-time build
6.6317 + --enable-dependency-tracking do not reject slow dependency extractors])
6.6318 +if test "x$enable_dependency_tracking" != xno; then
6.6319 + am_depcomp="$ac_aux_dir/depcomp"
6.6320 + AMDEPBACKSLASH='\'
6.6321 +fi
6.6322 +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6.6323 +AC_SUBST([AMDEPBACKSLASH])
6.6324 +])
6.6325 +
6.6326 +# Generate code to set up dependency tracking. -*- Autoconf -*-
6.6327 +
6.6328 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6.6329 +# Free Software Foundation, Inc.
6.6330 +#
6.6331 +# This file is free software; the Free Software Foundation
6.6332 +# gives unlimited permission to copy and/or distribute it,
6.6333 +# with or without modifications, as long as this notice is preserved.
6.6334 +
6.6335 +#serial 3
6.6336 +
6.6337 +# _AM_OUTPUT_DEPENDENCY_COMMANDS
6.6338 +# ------------------------------
6.6339 +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6.6340 +[for mf in $CONFIG_FILES; do
6.6341 + # Strip MF so we end up with the name of the file.
6.6342 + mf=`echo "$mf" | sed -e 's/:.*$//'`
6.6343 + # Check whether this is an Automake generated Makefile or not.
6.6344 + # We used to match only the files named `Makefile.in', but
6.6345 + # some people rename them; so instead we look at the file content.
6.6346 + # Grep'ing the first line is not enough: some people post-process
6.6347 + # each Makefile.in and add a new line on top of each file to say so.
6.6348 + # So let's grep whole file.
6.6349 + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6.6350 + dirpart=`AS_DIRNAME("$mf")`
6.6351 + else
6.6352 + continue
6.6353 + fi
6.6354 + # Extract the definition of DEPDIR, am__include, and am__quote
6.6355 + # from the Makefile without running `make'.
6.6356 + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6.6357 + test -z "$DEPDIR" && continue
6.6358 + am__include=`sed -n 's/^am__include = //p' < "$mf"`
6.6359 + test -z "am__include" && continue
6.6360 + am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6.6361 + # When using ansi2knr, U may be empty or an underscore; expand it
6.6362 + U=`sed -n 's/^U = //p' < "$mf"`
6.6363 + # Find all dependency output files, they are included files with
6.6364 + # $(DEPDIR) in their names. We invoke sed twice because it is the
6.6365 + # simplest approach to changing $(DEPDIR) to its actual value in the
6.6366 + # expansion.
6.6367 + for file in `sed -n "
6.6368 + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6.6369 + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6.6370 + # Make sure the directory exists.
6.6371 + test -f "$dirpart/$file" && continue
6.6372 + fdir=`AS_DIRNAME(["$file"])`
6.6373 + AS_MKDIR_P([$dirpart/$fdir])
6.6374 + # echo "creating $dirpart/$file"
6.6375 + echo '# dummy' > "$dirpart/$file"
6.6376 + done
6.6377 +done
6.6378 +])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6.6379 +
6.6380 +
6.6381 +# AM_OUTPUT_DEPENDENCY_COMMANDS
6.6382 +# -----------------------------
6.6383 +# This macro should only be invoked once -- use via AC_REQUIRE.
6.6384 +#
6.6385 +# This code is only required when automatic dependency tracking
6.6386 +# is enabled. FIXME. This creates each `.P' file that we will
6.6387 +# need in order to bootstrap the dependency handling code.
6.6388 +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6.6389 +[AC_CONFIG_COMMANDS([depfiles],
6.6390 + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6.6391 + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6.6392 +])
6.6393 +
6.6394 +# Do all the work for Automake. -*- Autoconf -*-
6.6395 +
6.6396 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
6.6397 +# Free Software Foundation, Inc.
6.6398 +#
6.6399 +# This file is free software; the Free Software Foundation
6.6400 +# gives unlimited permission to copy and/or distribute it,
6.6401 +# with or without modifications, as long as this notice is preserved.
6.6402 +
6.6403 +# serial 12
6.6404 +
6.6405 +# This macro actually does too much. Some checks are only needed if
6.6406 +# your package does certain things. But this isn't really a big deal.
6.6407 +
6.6408 +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6.6409 +# AM_INIT_AUTOMAKE([OPTIONS])
6.6410 +# -----------------------------------------------
6.6411 +# The call with PACKAGE and VERSION arguments is the old style
6.6412 +# call (pre autoconf-2.50), which is being phased out. PACKAGE
6.6413 +# and VERSION should now be passed to AC_INIT and removed from
6.6414 +# the call to AM_INIT_AUTOMAKE.
6.6415 +# We support both call styles for the transition. After
6.6416 +# the next Automake release, Autoconf can make the AC_INIT
6.6417 +# arguments mandatory, and then we can depend on a new Autoconf
6.6418 +# release and drop the old call support.
6.6419 +AC_DEFUN([AM_INIT_AUTOMAKE],
6.6420 +[AC_PREREQ([2.58])dnl
6.6421 +dnl Autoconf wants to disallow AM_ names. We explicitly allow
6.6422 +dnl the ones we care about.
6.6423 +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6.6424 +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6.6425 +AC_REQUIRE([AC_PROG_INSTALL])dnl
6.6426 +# test to see if srcdir already configured
6.6427 +if test "`cd $srcdir && pwd`" != "`pwd`" &&
6.6428 + test -f $srcdir/config.status; then
6.6429 + AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6.6430 +fi
6.6431 +
6.6432 +# test whether we have cygpath
6.6433 +if test -z "$CYGPATH_W"; then
6.6434 + if (cygpath --version) >/dev/null 2>/dev/null; then
6.6435 + CYGPATH_W='cygpath -w'
6.6436 + else
6.6437 + CYGPATH_W=echo
6.6438 + fi
6.6439 +fi
6.6440 +AC_SUBST([CYGPATH_W])
6.6441 +
6.6442 +# Define the identity of the package.
6.6443 +dnl Distinguish between old-style and new-style calls.
6.6444 +m4_ifval([$2],
6.6445 +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6.6446 + AC_SUBST([PACKAGE], [$1])dnl
6.6447 + AC_SUBST([VERSION], [$2])],
6.6448 +[_AM_SET_OPTIONS([$1])dnl
6.6449 + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6.6450 + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6.6451 +
6.6452 +_AM_IF_OPTION([no-define],,
6.6453 +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6.6454 + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
6.6455 +
6.6456 +# Some tools Automake needs.
6.6457 +AC_REQUIRE([AM_SANITY_CHECK])dnl
6.6458 +AC_REQUIRE([AC_ARG_PROGRAM])dnl
6.6459 +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6.6460 +AM_MISSING_PROG(AUTOCONF, autoconf)
6.6461 +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6.6462 +AM_MISSING_PROG(AUTOHEADER, autoheader)
6.6463 +AM_MISSING_PROG(MAKEINFO, makeinfo)
6.6464 +AM_PROG_INSTALL_SH
6.6465 +AM_PROG_INSTALL_STRIP
6.6466 +AC_REQUIRE([AM_PROG_MKDIR_P])dnl
6.6467 +# We need awk for the "check" target. The system "awk" is bad on
6.6468 +# some platforms.
6.6469 +AC_REQUIRE([AC_PROG_AWK])dnl
6.6470 +AC_REQUIRE([AC_PROG_MAKE_SET])dnl
6.6471 +AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6.6472 +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
6.6473 + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
6.6474 + [_AM_PROG_TAR([v7])])])
6.6475 +_AM_IF_OPTION([no-dependencies],,
6.6476 +[AC_PROVIDE_IFELSE([AC_PROG_CC],
6.6477 + [_AM_DEPENDENCIES(CC)],
6.6478 + [define([AC_PROG_CC],
6.6479 + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6.6480 +AC_PROVIDE_IFELSE([AC_PROG_CXX],
6.6481 + [_AM_DEPENDENCIES(CXX)],
6.6482 + [define([AC_PROG_CXX],
6.6483 + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
6.6484 +])
6.6485 +])
6.6486 +
6.6487 +
6.6488 +# When config.status generates a header, we must update the stamp-h file.
6.6489 +# This file resides in the same directory as the config header
6.6490 +# that is generated. The stamp files are numbered to have different names.
6.6491 +
6.6492 +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6.6493 +# loop where config.status creates the headers, so we can generate
6.6494 +# our stamp files there.
6.6495 +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6.6496 +[# Compute $1's index in $config_headers.
6.6497 +_am_stamp_count=1
6.6498 +for _am_header in $config_headers :; do
6.6499 + case $_am_header in
6.6500 + $1 | $1:* )
6.6501 + break ;;
6.6502 + * )
6.6503 + _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6.6504 + esac
6.6505 +done
6.6506 +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
6.6507 +
6.6508 +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6.6509 +#
6.6510 +# This file is free software; the Free Software Foundation
6.6511 +# gives unlimited permission to copy and/or distribute it,
6.6512 +# with or without modifications, as long as this notice is preserved.
6.6513 +
6.6514 +# AM_PROG_INSTALL_SH
6.6515 +# ------------------
6.6516 +# Define $install_sh.
6.6517 +AC_DEFUN([AM_PROG_INSTALL_SH],
6.6518 +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6.6519 +install_sh=${install_sh-"$am_aux_dir/install-sh"}
6.6520 +AC_SUBST(install_sh)])
6.6521 +
6.6522 +# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
6.6523 +#
6.6524 +# This file is free software; the Free Software Foundation
6.6525 +# gives unlimited permission to copy and/or distribute it,
6.6526 +# with or without modifications, as long as this notice is preserved.
6.6527 +
6.6528 +# serial 2
6.6529 +
6.6530 +# Check whether the underlying file-system supports filenames
6.6531 +# with a leading dot. For instance MS-DOS doesn't.
6.6532 +AC_DEFUN([AM_SET_LEADING_DOT],
6.6533 +[rm -rf .tst 2>/dev/null
6.6534 +mkdir .tst 2>/dev/null
6.6535 +if test -d .tst; then
6.6536 + am__leading_dot=.
6.6537 +else
6.6538 + am__leading_dot=_
6.6539 +fi
6.6540 +rmdir .tst 2>/dev/null
6.6541 +AC_SUBST([am__leading_dot])])
6.6542 +
6.6543 +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
6.6544 +# From Jim Meyering
6.6545 +
6.6546 +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
6.6547 +# Free Software Foundation, Inc.
6.6548 +#
6.6549 +# This file is free software; the Free Software Foundation
6.6550 +# gives unlimited permission to copy and/or distribute it,
6.6551 +# with or without modifications, as long as this notice is preserved.
6.6552 +
6.6553 +# serial 4
6.6554 +
6.6555 +AC_DEFUN([AM_MAINTAINER_MODE],
6.6556 +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
6.6557 + dnl maintainer-mode is disabled by default
6.6558 + AC_ARG_ENABLE(maintainer-mode,
6.6559 +[ --enable-maintainer-mode enable make rules and dependencies not useful
6.6560 + (and sometimes confusing) to the casual installer],
6.6561 + USE_MAINTAINER_MODE=$enableval,
6.6562 + USE_MAINTAINER_MODE=no)
6.6563 + AC_MSG_RESULT([$USE_MAINTAINER_MODE])
6.6564 + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
6.6565 + MAINT=$MAINTAINER_MODE_TRUE
6.6566 + AC_SUBST(MAINT)dnl
6.6567 +]
6.6568 +)
6.6569 +
6.6570 +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
6.6571 +
6.6572 +# Check to see how 'make' treats includes. -*- Autoconf -*-
6.6573 +
6.6574 +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
6.6575 +#
6.6576 +# This file is free software; the Free Software Foundation
6.6577 +# gives unlimited permission to copy and/or distribute it,
6.6578 +# with or without modifications, as long as this notice is preserved.
6.6579 +
6.6580 +# serial 3
6.6581 +
6.6582 +# AM_MAKE_INCLUDE()
6.6583 +# -----------------
6.6584 +# Check to see how make treats includes.
6.6585 +AC_DEFUN([AM_MAKE_INCLUDE],
6.6586 +[am_make=${MAKE-make}
6.6587 +cat > confinc << 'END'
6.6588 +am__doit:
6.6589 + @echo done
6.6590 +.PHONY: am__doit
6.6591 +END
6.6592 +# If we don't find an include directive, just comment out the code.
6.6593 +AC_MSG_CHECKING([for style of include used by $am_make])
6.6594 +am__include="#"
6.6595 +am__quote=
6.6596 +_am_result=none
6.6597 +# First try GNU make style include.
6.6598 +echo "include confinc" > confmf
6.6599 +# We grep out `Entering directory' and `Leaving directory'
6.6600 +# messages which can occur if `w' ends up in MAKEFLAGS.
6.6601 +# In particular we don't look at `^make:' because GNU make might
6.6602 +# be invoked under some other name (usually "gmake"), in which
6.6603 +# case it prints its new name instead of `make'.
6.6604 +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6.6605 + am__include=include
6.6606 + am__quote=
6.6607 + _am_result=GNU
6.6608 +fi
6.6609 +# Now try BSD make style include.
6.6610 +if test "$am__include" = "#"; then
6.6611 + echo '.include "confinc"' > confmf
6.6612 + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6.6613 + am__include=.include
6.6614 + am__quote="\""
6.6615 + _am_result=BSD
6.6616 + fi
6.6617 +fi
6.6618 +AC_SUBST([am__include])
6.6619 +AC_SUBST([am__quote])
6.6620 +AC_MSG_RESULT([$_am_result])
6.6621 +rm -f confinc confmf
6.6622 +])
6.6623 +
6.6624 +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
6.6625 +
6.6626 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
6.6627 +# Free Software Foundation, Inc.
6.6628 +#
6.6629 +# This file is free software; the Free Software Foundation
6.6630 +# gives unlimited permission to copy and/or distribute it,
6.6631 +# with or without modifications, as long as this notice is preserved.
6.6632 +
6.6633 +# serial 4
6.6634 +
6.6635 +# AM_MISSING_PROG(NAME, PROGRAM)
6.6636 +# ------------------------------
6.6637 +AC_DEFUN([AM_MISSING_PROG],
6.6638 +[AC_REQUIRE([AM_MISSING_HAS_RUN])
6.6639 +$1=${$1-"${am_missing_run}$2"}
6.6640 +AC_SUBST($1)])
6.6641 +
6.6642 +
6.6643 +# AM_MISSING_HAS_RUN
6.6644 +# ------------------
6.6645 +# Define MISSING if not defined so far and test if it supports --run.
6.6646 +# If it does, set am_missing_run to use it, otherwise, to nothing.
6.6647 +AC_DEFUN([AM_MISSING_HAS_RUN],
6.6648 +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6.6649 +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6.6650 +# Use eval to expand $SHELL
6.6651 +if eval "$MISSING --run true"; then
6.6652 + am_missing_run="$MISSING --run "
6.6653 +else
6.6654 + am_missing_run=
6.6655 + AC_MSG_WARN([`missing' script is too old or missing])
6.6656 +fi
6.6657 +])
6.6658 +
6.6659 +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
6.6660 +#
6.6661 +# This file is free software; the Free Software Foundation
6.6662 +# gives unlimited permission to copy and/or distribute it,
6.6663 +# with or without modifications, as long as this notice is preserved.
6.6664 +
6.6665 +# AM_PROG_MKDIR_P
6.6666 +# ---------------
6.6667 +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
6.6668 +#
6.6669 +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
6.6670 +# created by `make install' are always world readable, even if the
6.6671 +# installer happens to have an overly restrictive umask (e.g. 077).
6.6672 +# This was a mistake. There are at least two reasons why we must not
6.6673 +# use `-m 0755':
6.6674 +# - it causes special bits like SGID to be ignored,
6.6675 +# - it may be too restrictive (some setups expect 775 directories).
6.6676 +#
6.6677 +# Do not use -m 0755 and let people choose whatever they expect by
6.6678 +# setting umask.
6.6679 +#
6.6680 +# We cannot accept any implementation of `mkdir' that recognizes `-p'.
6.6681 +# Some implementations (such as Solaris 8's) are not thread-safe: if a
6.6682 +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
6.6683 +# concurrently, both version can detect that a/ is missing, but only
6.6684 +# one can create it and the other will error out. Consequently we
6.6685 +# restrict ourselves to GNU make (using the --version option ensures
6.6686 +# this.)
6.6687 +AC_DEFUN([AM_PROG_MKDIR_P],
6.6688 +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6.6689 + # We used to keeping the `.' as first argument, in order to
6.6690 + # allow $(mkdir_p) to be used without argument. As in
6.6691 + # $(mkdir_p) $(somedir)
6.6692 + # where $(somedir) is conditionally defined. However this is wrong
6.6693 + # for two reasons:
6.6694 + # 1. if the package is installed by a user who cannot write `.'
6.6695 + # make install will fail,
6.6696 + # 2. the above comment should most certainly read
6.6697 + # $(mkdir_p) $(DESTDIR)$(somedir)
6.6698 + # so it does not work when $(somedir) is undefined and
6.6699 + # $(DESTDIR) is not.
6.6700 + # To support the latter case, we have to write
6.6701 + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
6.6702 + # so the `.' trick is pointless.
6.6703 + mkdir_p='mkdir -p --'
6.6704 +else
6.6705 + # On NextStep and OpenStep, the `mkdir' command does not
6.6706 + # recognize any option. It will interpret all options as
6.6707 + # directories to create, and then abort because `.' already
6.6708 + # exists.
6.6709 + for d in ./-p ./--version;
6.6710 + do
6.6711 + test -d $d && rmdir $d
6.6712 + done
6.6713 + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6.6714 + if test -f "$ac_aux_dir/mkinstalldirs"; then
6.6715 + mkdir_p='$(mkinstalldirs)'
6.6716 + else
6.6717 + mkdir_p='$(install_sh) -d'
6.6718 + fi
6.6719 +fi
6.6720 +AC_SUBST([mkdir_p])])
6.6721 +
6.6722 +# Helper functions for option handling. -*- Autoconf -*-
6.6723 +
6.6724 +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
6.6725 +#
6.6726 +# This file is free software; the Free Software Foundation
6.6727 +# gives unlimited permission to copy and/or distribute it,
6.6728 +# with or without modifications, as long as this notice is preserved.
6.6729 +
6.6730 +# serial 3
6.6731 +
6.6732 +# _AM_MANGLE_OPTION(NAME)
6.6733 +# -----------------------
6.6734 +AC_DEFUN([_AM_MANGLE_OPTION],
6.6735 +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
6.6736 +
6.6737 +# _AM_SET_OPTION(NAME)
6.6738 +# ------------------------------
6.6739 +# Set option NAME. Presently that only means defining a flag for this option.
6.6740 +AC_DEFUN([_AM_SET_OPTION],
6.6741 +[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
6.6742 +
6.6743 +# _AM_SET_OPTIONS(OPTIONS)
6.6744 +# ----------------------------------
6.6745 +# OPTIONS is a space-separated list of Automake options.
6.6746 +AC_DEFUN([_AM_SET_OPTIONS],
6.6747 +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
6.6748 +
6.6749 +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
6.6750 +# -------------------------------------------
6.6751 +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
6.6752 +AC_DEFUN([_AM_IF_OPTION],
6.6753 +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
6.6754 +
6.6755 +# Check to make sure that the build environment is sane. -*- Autoconf -*-
6.6756 +
6.6757 +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
6.6758 +# Free Software Foundation, Inc.
6.6759 +#
6.6760 +# This file is free software; the Free Software Foundation
6.6761 +# gives unlimited permission to copy and/or distribute it,
6.6762 +# with or without modifications, as long as this notice is preserved.
6.6763 +
6.6764 +# serial 4
6.6765 +
6.6766 +# AM_SANITY_CHECK
6.6767 +# ---------------
6.6768 +AC_DEFUN([AM_SANITY_CHECK],
6.6769 +[AC_MSG_CHECKING([whether build environment is sane])
6.6770 +# Just in case
6.6771 +sleep 1
6.6772 +echo timestamp > conftest.file
6.6773 +# Do `set' in a subshell so we don't clobber the current shell's
6.6774 +# arguments. Must try -L first in case configure is actually a
6.6775 +# symlink; some systems play weird games with the mod time of symlinks
6.6776 +# (eg FreeBSD returns the mod time of the symlink's containing
6.6777 +# directory).
6.6778 +if (
6.6779 + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
6.6780 + if test "$[*]" = "X"; then
6.6781 + # -L didn't work.
6.6782 + set X `ls -t $srcdir/configure conftest.file`
6.6783 + fi
6.6784 + rm -f conftest.file
6.6785 + if test "$[*]" != "X $srcdir/configure conftest.file" \
6.6786 + && test "$[*]" != "X conftest.file $srcdir/configure"; then
6.6787 +
6.6788 + # If neither matched, then we have a broken ls. This can happen
6.6789 + # if, for instance, CONFIG_SHELL is bash and it inherits a
6.6790 + # broken ls alias from the environment. This has actually
6.6791 + # happened. Such a system could not be considered "sane".
6.6792 + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
6.6793 +alias in your environment])
6.6794 + fi
6.6795 +
6.6796 + test "$[2]" = conftest.file
6.6797 + )
6.6798 +then
6.6799 + # Ok.
6.6800 + :
6.6801 +else
6.6802 + AC_MSG_ERROR([newly created file is older than distributed files!
6.6803 +Check your system clock])
6.6804 +fi
6.6805 +AC_MSG_RESULT(yes)])
6.6806 +
6.6807 +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6.6808 +#
6.6809 +# This file is free software; the Free Software Foundation
6.6810 +# gives unlimited permission to copy and/or distribute it,
6.6811 +# with or without modifications, as long as this notice is preserved.
6.6812 +
6.6813 +# AM_PROG_INSTALL_STRIP
6.6814 +# ---------------------
6.6815 +# One issue with vendor `install' (even GNU) is that you can't
6.6816 +# specify the program used to strip binaries. This is especially
6.6817 +# annoying in cross-compiling environments, where the build's strip
6.6818 +# is unlikely to handle the host's binaries.
6.6819 +# Fortunately install-sh will honor a STRIPPROG variable, so we
6.6820 +# always use install-sh in `make install-strip', and initialize
6.6821 +# STRIPPROG with the value of the STRIP variable (set by the user).
6.6822 +AC_DEFUN([AM_PROG_INSTALL_STRIP],
6.6823 +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
6.6824 +# Installed binaries are usually stripped using `strip' when the user
6.6825 +# run `make install-strip'. However `strip' might not be the right
6.6826 +# tool to use in cross-compilation environments, therefore Automake
6.6827 +# will honor the `STRIP' environment variable to overrule this program.
6.6828 +dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
6.6829 +if test "$cross_compiling" != no; then
6.6830 + AC_CHECK_TOOL([STRIP], [strip], :)
6.6831 +fi
6.6832 +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
6.6833 +AC_SUBST([INSTALL_STRIP_PROGRAM])])
6.6834 +
6.6835 +# Check how to create a tarball. -*- Autoconf -*-
6.6836 +
6.6837 +# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
6.6838 +#
6.6839 +# This file is free software; the Free Software Foundation
6.6840 +# gives unlimited permission to copy and/or distribute it,
6.6841 +# with or without modifications, as long as this notice is preserved.
6.6842 +
6.6843 +# serial 2
6.6844 +
6.6845 +# _AM_PROG_TAR(FORMAT)
6.6846 +# --------------------
6.6847 +# Check how to create a tarball in format FORMAT.
6.6848 +# FORMAT should be one of `v7', `ustar', or `pax'.
6.6849 +#
6.6850 +# Substitute a variable $(am__tar) that is a command
6.6851 +# writing to stdout a FORMAT-tarball containing the directory
6.6852 +# $tardir.
6.6853 +# tardir=directory && $(am__tar) > result.tar
6.6854 +#
6.6855 +# Substitute a variable $(am__untar) that extract such
6.6856 +# a tarball read from stdin.
6.6857 +# $(am__untar) < result.tar
6.6858 +AC_DEFUN([_AM_PROG_TAR],
6.6859 +[# Always define AMTAR for backward compatibility.
6.6860 +AM_MISSING_PROG([AMTAR], [tar])
6.6861 +m4_if([$1], [v7],
6.6862 + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
6.6863 + [m4_case([$1], [ustar],, [pax],,
6.6864 + [m4_fatal([Unknown tar format])])
6.6865 +AC_MSG_CHECKING([how to create a $1 tar archive])
6.6866 +# Loop over all known methods to create a tar archive until one works.
6.6867 +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
6.6868 +_am_tools=${am_cv_prog_tar_$1-$_am_tools}
6.6869 +# Do not fold the above two line into one, because Tru64 sh and
6.6870 +# Solaris sh will not grok spaces in the rhs of `-'.
6.6871 +for _am_tool in $_am_tools
6.6872 +do
6.6873 + case $_am_tool in
6.6874 + gnutar)
6.6875 + for _am_tar in tar gnutar gtar;
6.6876 + do
6.6877 + AM_RUN_LOG([$_am_tar --version]) && break
6.6878 + done
6.6879 + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
6.6880 + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
6.6881 + am__untar="$_am_tar -xf -"
6.6882 + ;;
6.6883 + plaintar)
6.6884 + # Must skip GNU tar: if it does not support --format= it doesn't create
6.6885 + # ustar tarball either.
6.6886 + (tar --version) >/dev/null 2>&1 && continue
6.6887 + am__tar='tar chf - "$$tardir"'
6.6888 + am__tar_='tar chf - "$tardir"'
6.6889 + am__untar='tar xf -'
6.6890 + ;;
6.6891 + pax)
6.6892 + am__tar='pax -L -x $1 -w "$$tardir"'
6.6893 + am__tar_='pax -L -x $1 -w "$tardir"'
6.6894 + am__untar='pax -r'
6.6895 + ;;
6.6896 + cpio)
6.6897 + am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
6.6898 + am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
6.6899 + am__untar='cpio -i -H $1 -d'
6.6900 + ;;
6.6901 + none)
6.6902 + am__tar=false
6.6903 + am__tar_=false
6.6904 + am__untar=false
6.6905 + ;;
6.6906 + esac
6.6907 +
6.6908 + # If the value was cached, stop now. We just wanted to have am__tar
6.6909 + # and am__untar set.
6.6910 + test -n "${am_cv_prog_tar_$1}" && break
6.6911 +
6.6912 + # tar/untar a dummy directory, and stop if the command works
6.6913 + rm -rf conftest.dir
6.6914 + mkdir conftest.dir
6.6915 + echo GrepMe > conftest.dir/file
6.6916 + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
6.6917 + rm -rf conftest.dir
6.6918 + if test -s conftest.tar; then
6.6919 + AM_RUN_LOG([$am__untar <conftest.tar])
6.6920 + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
6.6921 + fi
6.6922 +done
6.6923 +rm -rf conftest.dir
6.6924 +
6.6925 +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
6.6926 +AC_MSG_RESULT([$am_cv_prog_tar_$1])])
6.6927 +AC_SUBST([am__tar])
6.6928 +AC_SUBST([am__untar])
6.6929 +]) # _AM_PROG_TAR
6.6930 +
6.6931 +m4_include([m4/as-version.m4])
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/mythtv_plugin/autogen.sh Wed Sep 20 23:59:48 2006 +0100
7.3 @@ -0,0 +1,99 @@
7.4 +#!/bin/sh
7.5 +# Run this to generate all the initial makefiles, etc.
7.6 +
7.7 +DIE=0
7.8 +package=mythtvsrc
7.9 +srcfile=configure.ac
7.10 +
7.11 +# a quick cvs co if necessary to alleviate the pain - may remove this
7.12 +# when developers get a clue ;)
7.13 +if test ! -d common;
7.14 +then
7.15 + echo "+ getting common/ from svn"
7.16 + svn co common
7.17 +fi
7.18 +
7.19 +# source helper functions
7.20 +if test ! -f common/autogen-helper.sh;
7.21 +then
7.22 + echo There is something wrong with your source tree.
7.23 + echo You are missing common/autogen-helper.sh
7.24 + exit 1
7.25 +fi
7.26 +. common/autogen-helper.sh
7.27 +
7.28 +CONFIGURE_DEF_OPT='--enable-maintainer-mode'
7.29 +
7.30 +autogen_options
7.31 +
7.32 +echo -n "+ check for build tools"
7.33 +if test ! -z "$NOCHECK"; then echo " skipped"; else echo; fi
7.34 +version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53" \
7.35 + "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 53 || DIE=1
7.36 +version_check "automake" "$AUTOMAKE automake automake-1.9 automake-1.8 automake-1.7 automake-1.6" \
7.37 + "ftp://ftp.gnu.org/pub/gnu/automake/" 1 6 || DIE=1
7.38 +version_check "libtoolize" "$LIBTOOLIZE libtoolize" \
7.39 + "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
7.40 +version_check "pkg-config" "" \
7.41 + "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
7.42 +
7.43 +die_check $DIE
7.44 +
7.45 +aclocal_check || DIE=1
7.46 +autoheader_check || DIE=1
7.47 +
7.48 +die_check $DIE
7.49 +
7.50 +# if no arguments specified then this will be printed
7.51 +if test -z "$*"; then
7.52 + echo "+ checking for autogen.sh options"
7.53 + echo " This autogen script will automatically run ./configure as:"
7.54 + echo " ./configure $CONFIGURE_DEF_OPT"
7.55 + echo " To pass any additional options, please specify them on the $0"
7.56 + echo " command line."
7.57 +fi
7.58 +
7.59 +toplevel_check $srcfile
7.60 +
7.61 +tool_run "$aclocal" "-I m4 $ACLOCAL_FLAGS"
7.62 +tool_run "$libtoolize" "--copy --force"
7.63 +tool_run "$autoheader"
7.64 +
7.65 +# touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
7.66 +echo timestamp > stamp-h.in 2> /dev/null
7.67 +
7.68 +tool_run "$autoconf"
7.69 +tool_run "$automake" "-a -c"
7.70 +
7.71 +# if enable exists, add an -enable option for each of the lines in that file
7.72 +if test -f enable; then
7.73 + for a in `cat enable`; do
7.74 + CONFIGURE_FILE_OPT="--enable-$a"
7.75 + done
7.76 +fi
7.77 +
7.78 +# if disable exists, add an -disable option for each of the lines in that file
7.79 +if test -f disable; then
7.80 + for a in `cat disable`; do
7.81 + CONFIGURE_FILE_OPT="$CONFIGURE_FILE_OPT --disable-$a"
7.82 + done
7.83 +fi
7.84 +
7.85 +test -n "$NOCONFIGURE" && {
7.86 + echo "+ skipping configure stage for package $package, as requested."
7.87 + echo "+ autogen.sh done."
7.88 + exit 0
7.89 +}
7.90 +
7.91 +echo "+ running configure ... "
7.92 +test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
7.93 +test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
7.94 +test ! -z "$CONFIGURE_FILE_OPT" && echo " ./configure enable/disable flags: $CONFIGURE_FILE_OPT"
7.95 +echo
7.96 +
7.97 +./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || {
7.98 + echo " configure failed"
7.99 + exit 1
7.100 +}
7.101 +
7.102 +echo "Now type 'make' to compile $package."
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/mythtv_plugin/autoregen.sh Wed Sep 20 23:59:48 2006 +0100
8.3 @@ -0,0 +1,2 @@
8.4 +#!/bin/sh
8.5 +./autogen.sh $@
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/mythtv_plugin/common/Makefile.am Wed Sep 20 23:59:48 2006 +0100
9.3 @@ -0,0 +1,1 @@
9.4 +EXTRA_DIST = autogen-helper.sh
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/mythtv_plugin/common/autogen-helper.sh Wed Sep 20 23:59:48 2006 +0100
10.3 @@ -0,0 +1,302 @@
10.4 +# a silly hack that generates autoregen.sh but it's handy
10.5 +echo "#!/bin/sh" > autoregen.sh
10.6 +echo "./autogen.sh $@ \$@" >> autoregen.sh
10.7 +chmod +x autoregen.sh
10.8 +
10.9 +# helper functions for autogen.sh
10.10 +
10.11 +debug ()
10.12 +# print out a debug message if DEBUG is a defined variable
10.13 +{
10.14 + if test ! -z "$DEBUG"
10.15 + then
10.16 + echo "DEBUG: $1"
10.17 + fi
10.18 +}
10.19 +
10.20 +version_check ()
10.21 +# check the version of a package
10.22 +# first argument : package name (executable)
10.23 +# second argument : optional path where to look for it instead
10.24 +# third argument : source download url
10.25 +# rest of arguments : major, minor, micro version
10.26 +# all consecutive ones : suggestions for binaries to use
10.27 +# (if not specified in second argument)
10.28 +{
10.29 + PACKAGE=$1
10.30 + PKG_PATH=$2
10.31 + URL=$3
10.32 + MAJOR=$4
10.33 + MINOR=$5
10.34 + MICRO=$6
10.35 +
10.36 + # for backwards compatibility, we let PKG_PATH=PACKAGE when PKG_PATH null
10.37 + if test -z "$PKG_PATH"; then PKG_PATH=$PACKAGE; fi
10.38 + debug "major $MAJOR minor $MINOR micro $MICRO"
10.39 + VERSION=$MAJOR
10.40 + if test ! -z "$MINOR"; then VERSION=$VERSION.$MINOR; else MINOR=0; fi
10.41 + if test ! -z "$MICRO"; then VERSION=$VERSION.$MICRO; else MICRO=0; fi
10.42 +
10.43 + debug "major $MAJOR minor $MINOR micro $MICRO"
10.44 +
10.45 + for SUGGESTION in $PKG_PATH; do
10.46 + COMMAND="$SUGGESTION"
10.47 +
10.48 + # don't check if asked not to
10.49 + test -z "$NOCHECK" && {
10.50 + echo -n " checking for $COMMAND >= $VERSION ... "
10.51 + } || {
10.52 + # we set a var with the same name as the package, but stripped of
10.53 + # unwanted chars
10.54 + VAR=`echo $PACKAGE | sed 's/-//g'`
10.55 + debug "setting $VAR"
10.56 + eval $VAR="$COMMAND"
10.57 + return 0
10.58 + }
10.59 +
10.60 + debug "checking version with $COMMAND"
10.61 + ($COMMAND --version) < /dev/null > /dev/null 2>&1 ||
10.62 + {
10.63 + echo "not found."
10.64 + continue
10.65 + }
10.66 + # strip everything that's not a digit, then use cut to get the first field
10.67 + pkg_version=`$COMMAND --version|head -n 1|sed 's/^[^0-9]*//'|cut -d' ' -f1`
10.68 + debug "pkg_version $pkg_version"
10.69 + # remove any non-digit characters from the version numbers to permit numeric
10.70 + # comparison
10.71 + pkg_major=`echo $pkg_version | cut -d. -f1 | sed s/[a-zA-Z\-].*//g`
10.72 + pkg_minor=`echo $pkg_version | cut -d. -f2 | sed s/[a-zA-Z\-].*//g`
10.73 + pkg_micro=`echo $pkg_version | cut -d. -f3 | sed s/[a-zA-Z\-].*//g`
10.74 + test -z "$pkg_major" && pkg_major=0
10.75 + test -z "$pkg_minor" && pkg_minor=0
10.76 + test -z "$pkg_micro" && pkg_micro=0
10.77 + debug "found major $pkg_major minor $pkg_minor micro $pkg_micro"
10.78 +
10.79 + #start checking the version
10.80 + debug "version check"
10.81 +
10.82 + # reset check
10.83 + WRONG=
10.84 +
10.85 + if [ ! "$pkg_major" -gt "$MAJOR" ]; then
10.86 + debug "major: $pkg_major <= $MAJOR"
10.87 + if [ "$pkg_major" -lt "$MAJOR" ]; then
10.88 + debug "major: $pkg_major < $MAJOR"
10.89 + WRONG=1
10.90 + elif [ ! "$pkg_minor" -gt "$MINOR" ]; then
10.91 + debug "minor: $pkg_minor <= $MINOR"
10.92 + if [ "$pkg_minor" -lt "$MINOR" ]; then
10.93 + debug "minor: $pkg_minor < $MINOR"
10.94 + WRONG=1
10.95 + elif [ "$pkg_micro" -lt "$MICRO" ]; then
10.96 + debug "micro: $pkg_micro < $MICRO"
10.97 + WRONG=1
10.98 + fi
10.99 + fi
10.100 + fi
10.101 +
10.102 + if test ! -z "$WRONG"; then
10.103 + echo "found $pkg_version, not ok !"
10.104 + continue
10.105 + else
10.106 + echo "found $pkg_version, ok."
10.107 + # we set a var with the same name as the package, but stripped of
10.108 + # unwanted chars
10.109 + VAR=`echo $PACKAGE | sed 's/-//g'`
10.110 + debug "setting $VAR"
10.111 + eval $VAR="$COMMAND"
10.112 + return 0
10.113 + fi
10.114 + done
10.115 +
10.116 + echo "not found !"
10.117 + echo "You must have $PACKAGE installed to compile $package."
10.118 + echo "Download the appropriate package for your distribution,"
10.119 + echo "or get the source tarball at $URL"
10.120 + return 1;
10.121 +}
10.122 +
10.123 +aclocal_check ()
10.124 +{
10.125 + # normally aclocal is part of automake
10.126 + # so we expect it to be in the same place as automake
10.127 + # so if a different automake is supplied, we need to adapt as well
10.128 + # so how's about replacing automake with aclocal in the set var,
10.129 + # and saving that in $aclocal ?
10.130 + # note, this will fail if the actual automake isn't called automake*
10.131 + # or if part of the path before it contains it
10.132 + if [ -z "$automake" ]; then
10.133 + echo "Error: no automake variable set !"
10.134 + return 1
10.135 + else
10.136 + aclocal=`echo $automake | sed s/automake/aclocal/`
10.137 + debug "aclocal: $aclocal"
10.138 + if [ "$aclocal" != "aclocal" ];
10.139 + then
10.140 + CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-aclocal=$aclocal"
10.141 + fi
10.142 + if [ ! -x `which $aclocal` ]; then
10.143 + echo "Error: cannot execute $aclocal !"
10.144 + return 1
10.145 + fi
10.146 + fi
10.147 +}
10.148 +
10.149 +autoheader_check ()
10.150 +{
10.151 + # same here - autoheader is part of autoconf
10.152 + # use the same voodoo
10.153 + if [ -z "$autoconf" ]; then
10.154 + echo "Error: no autoconf variable set !"
10.155 + return 1
10.156 + else
10.157 + autoheader=`echo $autoconf | sed s/autoconf/autoheader/`
10.158 + debug "autoheader: $autoheader"
10.159 + if [ "$autoheader" != "autoheader" ];
10.160 + then
10.161 + CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-autoheader=$autoheader"
10.162 + fi
10.163 + if [ ! -x `which $autoheader` ]; then
10.164 + echo "Error: cannot execute $autoheader !"
10.165 + return 1
10.166 + fi
10.167 + fi
10.168 +
10.169 +}
10.170 +
10.171 +autoconf_2_52d_check ()
10.172 +{
10.173 + # autoconf 2.52d has a weird issue involving a yes:no error
10.174 + # so don't allow it's use
10.175 + test -z "$NOCHECK" && {
10.176 + ac_version=`$autoconf --version|head -n 1|sed 's/^[a-zA-Z\.\ ()]*//;s/ .*$//'`
10.177 + if test "$ac_version" = "2.52d"; then
10.178 + echo "autoconf 2.52d has an issue with our current build."
10.179 + echo "We don't know who's to blame however. So until we do, get a"
10.180 + echo "regular version. RPM's of a working version are on the gstreamer site."
10.181 + exit 1
10.182 + fi
10.183 + }
10.184 + return 0
10.185 +}
10.186 +
10.187 +die_check ()
10.188 +{
10.189 + # call with $DIE
10.190 + # if set to 1, we need to print something helpful then die
10.191 + DIE=$1
10.192 + if test "x$DIE" = "x1";
10.193 + then
10.194 + echo
10.195 + echo "- Please get the right tools before proceeding."
10.196 + echo "- Alternatively, if you're sure we're wrong, run with --nocheck."
10.197 + exit 1
10.198 + fi
10.199 +}
10.200 +
10.201 +autogen_options ()
10.202 +{
10.203 + if test "x$1" = "x"; then
10.204 + return 0
10.205 + fi
10.206 +
10.207 + while test "x$1" != "x" ; do
10.208 + optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
10.209 + case "$1" in
10.210 + --noconfigure)
10.211 + NOCONFIGURE=defined
10.212 + AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --noconfigure"
10.213 + echo "+ configure run disabled"
10.214 + shift
10.215 + ;;
10.216 + --nocheck)
10.217 + AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --nocheck"
10.218 + NOCHECK=defined
10.219 + echo "+ autotools version check disabled"
10.220 + shift
10.221 + ;;
10.222 + --debug)
10.223 + DEBUG=defined
10.224 + AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --debug"
10.225 + echo "+ debug output enabled"
10.226 + shift
10.227 + ;;
10.228 + --prefix=*)
10.229 + CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT --prefix=$optarg"
10.230 + echo "+ passing --prefix=$optarg to configure"
10.231 + shift
10.232 + ;;
10.233 + --prefix)
10.234 + shift
10.235 + echo "DEBUG: $1"
10.236 + CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT --prefix=$1"
10.237 + echo "+ passing --prefix=$1 to configure"
10.238 + shift
10.239 + ;;
10.240 + -h|--help)
10.241 + echo "autogen.sh (autogen options) -- (configure options)"
10.242 + echo "autogen.sh help options: "
10.243 + echo " --noconfigure don't run the configure script"
10.244 + echo " --nocheck don't do version checks"
10.245 + echo " --debug debug the autogen process"
10.246 + echo " --prefix will be passed on to configure"
10.247 + echo
10.248 + echo " --with-autoconf PATH use autoconf in PATH"
10.249 + echo " --with-automake PATH use automake in PATH"
10.250 + echo
10.251 + echo "to pass options to configure, put them as arguments after -- "
10.252 + exit 1
10.253 + ;;
10.254 + --with-automake=*)
10.255 + AUTOMAKE=$optarg
10.256 + echo "+ using alternate automake in $optarg"
10.257 + CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-automake=$AUTOMAKE"
10.258 + shift
10.259 + ;;
10.260 + --with-autoconf=*)
10.261 + AUTOCONF=$optarg
10.262 + echo "+ using alternate autoconf in $optarg"
10.263 + CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-autoconf=$AUTOCONF"
10.264 + shift
10.265 + ;;
10.266 + --disable*|--enable*|--with*)
10.267 + echo "+ passing option $1 to configure"
10.268 + CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $1"
10.269 + shift
10.270 + ;;
10.271 + --) shift ; break ;;
10.272 + *) echo "- ignoring unknown autogen.sh argument $1"; shift ;;
10.273 + esac
10.274 + done
10.275 +
10.276 + for arg do CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $arg"; done
10.277 + if test ! -z "$CONFIGURE_EXT_OPT"
10.278 + then
10.279 + echo "+ options passed to configure: $CONFIGURE_EXT_OPT"
10.280 + fi
10.281 +}
10.282 +
10.283 +toplevel_check ()
10.284 +{
10.285 + srcfile=$1
10.286 + test -f $srcfile || {
10.287 + echo "You must run this script in the top-level $package directory"
10.288 + exit 1
10.289 + }
10.290 +}
10.291 +
10.292 +
10.293 +tool_run ()
10.294 +{
10.295 + tool=$1
10.296 + options=$2
10.297 + run_if_fail=$3
10.298 + echo "+ running $tool $options..."
10.299 + $tool $options || {
10.300 + echo
10.301 + echo $tool failed
10.302 + eval $run_if_fail
10.303 + exit 1
10.304 + }
10.305 +}
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/mythtv_plugin/compile Wed Sep 20 23:59:48 2006 +0100
11.3 @@ -0,0 +1,136 @@
11.4 +#! /bin/sh
11.5 +# Wrapper for compilers which do not understand `-c -o'.
11.6 +
11.7 +scriptversion=2003-11-09.00
11.8 +
11.9 +# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
11.10 +# Written by Tom Tromey <tromey@cygnus.com>.
11.11 +#
11.12 +# This program is free software; you can redistribute it and/or modify
11.13 +# it under the terms of the GNU General Public License as published by
11.14 +# the Free Software Foundation; either version 2, or (at your option)
11.15 +# any later version.
11.16 +#
11.17 +# This program is distributed in the hope that it will be useful,
11.18 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
11.19 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11.20 +# GNU General Public License for more details.
11.21 +#
11.22 +# You should have received a copy of the GNU General Public License
11.23 +# along with this program; if not, write to the Free Software
11.24 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
11.25 +
11.26 +# As a special exception to the GNU General Public License, if you
11.27 +# distribute this file as part of a program that contains a
11.28 +# configuration script generated by Autoconf, you may include it under
11.29 +# the same distribution terms that you use for the rest of that program.
11.30 +
11.31 +# This file is maintained in Automake, please report
11.32 +# bugs to <bug-automake@gnu.org> or send patches to
11.33 +# <automake-patches@gnu.org>.
11.34 +
11.35 +case $1 in
11.36 + '')
11.37 + echo "$0: No command. Try \`$0 --help' for more information." 1>&2
11.38 + exit 1;
11.39 + ;;
11.40 + -h | --h*)
11.41 + cat <<\EOF
11.42 +Usage: compile [--help] [--version] PROGRAM [ARGS]
11.43 +
11.44 +Wrapper for compilers which do not understand `-c -o'.
11.45 +Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
11.46 +arguments, and rename the output as expected.
11.47 +
11.48 +If you are trying to build a whole package this is not the
11.49 +right script to run: please start by reading the file `INSTALL'.
11.50 +
11.51 +Report bugs to <bug-automake@gnu.org>.
11.52 +EOF
11.53 + exit 0
11.54 + ;;
11.55 + -v | --v*)
11.56 + echo "compile $scriptversion"
11.57 + exit 0
11.58 + ;;
11.59 +esac
11.60 +
11.61 +
11.62 +prog=$1
11.63 +shift
11.64 +
11.65 +ofile=
11.66 +cfile=
11.67 +args=
11.68 +while test $# -gt 0; do
11.69 + case "$1" in
11.70 + -o)
11.71 + # configure might choose to run compile as `compile cc -o foo foo.c'.
11.72 + # So we do something ugly here.
11.73 + ofile=$2
11.74 + shift
11.75 + case "$ofile" in
11.76 + *.o | *.obj)
11.77 + ;;
11.78 + *)
11.79 + args="$args -o $ofile"
11.80 + ofile=
11.81 + ;;
11.82 + esac
11.83 + ;;
11.84 + *.c)
11.85 + cfile=$1
11.86 + args="$args $1"
11.87 + ;;
11.88 + *)
11.89 + args="$args $1"
11.90 + ;;
11.91 + esac
11.92 + shift
11.93 +done
11.94 +
11.95 +if test -z "$ofile" || test -z "$cfile"; then
11.96 + # If no `-o' option was seen then we might have been invoked from a
11.97 + # pattern rule where we don't need one. That is ok -- this is a
11.98 + # normal compilation that the losing compiler can handle. If no
11.99 + # `.c' file was seen then we are probably linking. That is also
11.100 + # ok.
11.101 + exec "$prog" $args
11.102 +fi
11.103 +
11.104 +# Name of file we expect compiler to create.
11.105 +cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
11.106 +
11.107 +# Create the lock directory.
11.108 +# Note: use `[/.-]' here to ensure that we don't use the same name
11.109 +# that we are using for the .o file. Also, base the name on the expected
11.110 +# object file name, since that is what matters with a parallel build.
11.111 +lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
11.112 +while true; do
11.113 + if mkdir $lockdir > /dev/null 2>&1; then
11.114 + break
11.115 + fi
11.116 + sleep 1
11.117 +done
11.118 +# FIXME: race condition here if user kills between mkdir and trap.
11.119 +trap "rmdir $lockdir; exit 1" 1 2 15
11.120 +
11.121 +# Run the compile.
11.122 +"$prog" $args
11.123 +status=$?
11.124 +
11.125 +if test -f "$cofile"; then
11.126 + mv "$cofile" "$ofile"
11.127 +fi
11.128 +
11.129 +rmdir $lockdir
11.130 +exit $status
11.131 +
11.132 +# Local Variables:
11.133 +# mode: shell-script
11.134 +# sh-indentation: 2
11.135 +# eval: (add-hook 'write-file-hooks 'time-stamp)
11.136 +# time-stamp-start: "scriptversion="
11.137 +# time-stamp-format: "%:y-%02m-%02d.%02H"
11.138 +# time-stamp-end: "$"
11.139 +# End:
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/mythtv_plugin/compile-myth-tests.sh Wed Sep 20 23:59:48 2006 +0100
12.3 @@ -0,0 +1,3 @@
12.4 +#! /bin/sh
12.5 +gcc `pkg-config --cflags maemo-myth-0.1 gobject-2.0 glib-2.0 gtk+-2.0 gstreamer-base-0.10 gstreamer-0.10 gstreamer-dataprotocol-0.10 gstreamer-plugins-base-0.10 gstreamer-net-0.10` -DDO_TESTING -c myth_file_transfer.c
12.6 +gcc `pkg-config --cflags --libs maemo-myth-0.1 gobject-2.0 glib-2.0 gtk+-2.0 gstreamer-base-0.10 gstreamer-0.10` -DDO_TESTING -o mmyth-tests myth_file_transfer.o
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/mythtv_plugin/config.guess Wed Sep 20 23:59:48 2006 +0100
13.3 @@ -0,0 +1,1465 @@
13.4 +#! /bin/sh
13.5 +# Attempt to guess a canonical system name.
13.6 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
13.7 +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
13.8 +
13.9 +timestamp='2005-04-22'
13.10 +
13.11 +# This file is free software; you can redistribute it and/or modify it
13.12 +# under the terms of the GNU General Public License as published by
13.13 +# the Free Software Foundation; either version 2 of the License, or
13.14 +# (at your option) any later version.
13.15 +#
13.16 +# This program is distributed in the hope that it will be useful, but
13.17 +# WITHOUT ANY WARRANTY; without even the implied warranty of
13.18 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13.19 +# General Public License for more details.
13.20 +#
13.21 +# You should have received a copy of the GNU General Public License
13.22 +# along with this program; if not, write to the Free Software
13.23 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
13.24 +#
13.25 +# As a special exception to the GNU General Public License, if you
13.26 +# distribute this file as part of a program that contains a
13.27 +# configuration script generated by Autoconf, you may include it under
13.28 +# the same distribution terms that you use for the rest of that program.
13.29 +
13.30 +# Originally written by Per Bothner <per@bothner.com>.
13.31 +# Please send patches to <config-patches@gnu.org>. Submit a context
13.32 +# diff and a properly formatted ChangeLog entry.
13.33 +#
13.34 +# This script attempts to guess a canonical system name similar to
13.35 +# config.sub. If it succeeds, it prints the system name on stdout, and
13.36 +# exits with 0. Otherwise, it exits with 1.
13.37 +#
13.38 +# The plan is that this can be called by configure scripts if you
13.39 +# don't specify an explicit build system type.
13.40 +
13.41 +me=`echo "$0" | sed -e 's,.*/,,'`
13.42 +
13.43 +usage="\
13.44 +Usage: $0 [OPTION]
13.45 +
13.46 +Output the configuration name of the system \`$me' is run on.
13.47 +
13.48 +Operation modes:
13.49 + -h, --help print this help, then exit
13.50 + -t, --time-stamp print date of last modification, then exit
13.51 + -v, --version print version number, then exit
13.52 +
13.53 +Report bugs and patches to <config-patches@gnu.org>."
13.54 +
13.55 +version="\
13.56 +GNU config.guess ($timestamp)
13.57 +
13.58 +Originally written by Per Bothner.
13.59 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
13.60 +Free Software Foundation, Inc.
13.61 +
13.62 +This is free software; see the source for copying conditions. There is NO
13.63 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
13.64 +
13.65 +help="
13.66 +Try \`$me --help' for more information."
13.67 +
13.68 +# Parse command line
13.69 +while test $# -gt 0 ; do
13.70 + case $1 in
13.71 + --time-stamp | --time* | -t )
13.72 + echo "$timestamp" ; exit 0 ;;
13.73 + --version | -v )
13.74 + echo "$version" ; exit 0 ;;
13.75 + --help | --h* | -h )
13.76 + echo "$usage"; exit 0 ;;
13.77 + -- ) # Stop option processing
13.78 + shift; break ;;
13.79 + - ) # Use stdin as input.
13.80 + break ;;
13.81 + -* )
13.82 + echo "$me: invalid option $1$help" >&2
13.83 + exit 1 ;;
13.84 + * )
13.85 + break ;;
13.86 + esac
13.87 +done
13.88 +
13.89 +if test $# != 0; then
13.90 + echo "$me: too many arguments$help" >&2
13.91 + exit 1
13.92 +fi
13.93 +
13.94 +trap 'exit 1' 1 2 15
13.95 +
13.96 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
13.97 +# compiler to aid in system detection is discouraged as it requires
13.98 +# temporary files to be created and, as you can see below, it is a
13.99 +# headache to deal with in a portable fashion.
13.100 +
13.101 +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
13.102 +# use `HOST_CC' if defined, but it is deprecated.
13.103 +
13.104 +# Portable tmp directory creation inspired by the Autoconf team.
13.105 +
13.106 +set_cc_for_build='
13.107 +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
13.108 +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
13.109 +: ${TMPDIR=/tmp} ;
13.110 + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
13.111 + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
13.112 + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
13.113 + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
13.114 +dummy=$tmp/dummy ;
13.115 +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
13.116 +case $CC_FOR_BUILD,$HOST_CC,$CC in
13.117 + ,,) echo "int x;" > $dummy.c ;
13.118 + for c in cc gcc c89 c99 ; do
13.119 + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
13.120 + CC_FOR_BUILD="$c"; break ;
13.121 + fi ;
13.122 + done ;
13.123 + if test x"$CC_FOR_BUILD" = x ; then
13.124 + CC_FOR_BUILD=no_compiler_found ;
13.125 + fi
13.126 + ;;
13.127 + ,,*) CC_FOR_BUILD=$CC ;;
13.128 + ,*,*) CC_FOR_BUILD=$HOST_CC ;;
13.129 +esac ;'
13.130 +
13.131 +# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
13.132 +# (ghazi@noc.rutgers.edu 1994-08-24)
13.133 +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
13.134 + PATH=$PATH:/.attbin ; export PATH
13.135 +fi
13.136 +
13.137 +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
13.138 +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
13.139 +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
13.140 +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
13.141 +
13.142 +# Note: order is significant - the case branches are not exclusive.
13.143 +
13.144 +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
13.145 + *:NetBSD:*:*)
13.146 + # NetBSD (nbsd) targets should (where applicable) match one or
13.147 + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
13.148 + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
13.149 + # switched to ELF, *-*-netbsd* would select the old
13.150 + # object file format. This provides both forward
13.151 + # compatibility and a consistent mechanism for selecting the
13.152 + # object file format.
13.153 + #
13.154 + # Note: NetBSD doesn't particularly care about the vendor
13.155 + # portion of the name. We always set it to "unknown".
13.156 + sysctl="sysctl -n hw.machine_arch"
13.157 + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
13.158 + /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
13.159 + case "${UNAME_MACHINE_ARCH}" in
13.160 + armeb) machine=armeb-unknown ;;
13.161 + arm*) machine=arm-unknown ;;
13.162 + sh3el) machine=shl-unknown ;;
13.163 + sh3eb) machine=sh-unknown ;;
13.164 + *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
13.165 + esac
13.166 + # The Operating System including object format, if it has switched
13.167 + # to ELF recently, or will in the future.
13.168 + case "${UNAME_MACHINE_ARCH}" in
13.169 + arm*|i386|m68k|ns32k|sh3*|sparc|vax)
13.170 + eval $set_cc_for_build
13.171 + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
13.172 + | grep __ELF__ >/dev/null
13.173 + then
13.174 + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
13.175 + # Return netbsd for either. FIX?
13.176 + os=netbsd
13.177 + else
13.178 + os=netbsdelf
13.179 + fi
13.180 + ;;
13.181 + *)
13.182 + os=netbsd
13.183 + ;;
13.184 + esac
13.185 + # The OS release
13.186 + # Debian GNU/NetBSD machines have a different userland, and
13.187 + # thus, need a distinct triplet. However, they do not need
13.188 + # kernel version information, so it can be replaced with a
13.189 + # suitable tag, in the style of linux-gnu.
13.190 + case "${UNAME_VERSION}" in
13.191 + Debian*)
13.192 + release='-gnu'
13.193 + ;;
13.194 + *)
13.195 + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
13.196 + ;;
13.197 + esac
13.198 + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
13.199 + # contains redundant information, the shorter form:
13.200 + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
13.201 + echo "${machine}-${os}${release}"
13.202 + exit 0 ;;
13.203 + amd64:OpenBSD:*:*)
13.204 + echo x86_64-unknown-openbsd${UNAME_RELEASE}
13.205 + exit 0 ;;
13.206 + amiga:OpenBSD:*:*)
13.207 + echo m68k-unknown-openbsd${UNAME_RELEASE}
13.208 + exit 0 ;;
13.209 + cats:OpenBSD:*:*)
13.210 + echo arm-unknown-openbsd${UNAME_RELEASE}
13.211 + exit 0 ;;
13.212 + hp300:OpenBSD:*:*)
13.213 + echo m68k-unknown-openbsd${UNAME_RELEASE}
13.214 + exit 0 ;;
13.215 + luna88k:OpenBSD:*:*)
13.216 + echo m88k-unknown-openbsd${UNAME_RELEASE}
13.217 + exit 0 ;;
13.218 + mac68k:OpenBSD:*:*)
13.219 + echo m68k-unknown-openbsd${UNAME_RELEASE}
13.220 + exit 0 ;;
13.221 + macppc:OpenBSD:*:*)
13.222 + echo powerpc-unknown-openbsd${UNAME_RELEASE}
13.223 + exit 0 ;;
13.224 + mvme68k:OpenBSD:*:*)
13.225 + echo m68k-unknown-openbsd${UNAME_RELEASE}
13.226 + exit 0 ;;
13.227 + mvme88k:OpenBSD:*:*)
13.228 + echo m88k-unknown-openbsd${UNAME_RELEASE}
13.229 + exit 0 ;;
13.230 + mvmeppc:OpenBSD:*:*)
13.231 + echo powerpc-unknown-openbsd${UNAME_RELEASE}
13.232 + exit 0 ;;
13.233 + sgi:OpenBSD:*:*)
13.234 + echo mips64-unknown-openbsd${UNAME_RELEASE}
13.235 + exit 0 ;;
13.236 + sun3:OpenBSD:*:*)
13.237 + echo m68k-unknown-openbsd${UNAME_RELEASE}
13.238 + exit 0 ;;
13.239 + *:OpenBSD:*:*)
13.240 + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
13.241 + exit 0 ;;
13.242 + *:ekkoBSD:*:*)
13.243 + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
13.244 + exit 0 ;;
13.245 + macppc:MirBSD:*:*)
13.246 + echo powerppc-unknown-mirbsd${UNAME_RELEASE}
13.247 + exit 0 ;;
13.248 + *:MirBSD:*:*)
13.249 + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
13.250 + exit 0 ;;
13.251 + alpha:OSF1:*:*)
13.252 + case $UNAME_RELEASE in
13.253 + *4.0)
13.254 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
13.255 + ;;
13.256 + *5.*)
13.257 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
13.258 + ;;
13.259 + esac
13.260 + # According to Compaq, /usr/sbin/psrinfo has been available on
13.261 + # OSF/1 and Tru64 systems produced since 1995. I hope that
13.262 + # covers most systems running today. This code pipes the CPU
13.263 + # types through head -n 1, so we only detect the type of CPU 0.
13.264 + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
13.265 + case "$ALPHA_CPU_TYPE" in
13.266 + "EV4 (21064)")
13.267 + UNAME_MACHINE="alpha" ;;
13.268 + "EV4.5 (21064)")
13.269 + UNAME_MACHINE="alpha" ;;
13.270 + "LCA4 (21066/21068)")
13.271 + UNAME_MACHINE="alpha" ;;
13.272 + "EV5 (21164)")
13.273 + UNAME_MACHINE="alphaev5" ;;
13.274 + "EV5.6 (21164A)")
13.275 + UNAME_MACHINE="alphaev56" ;;
13.276 + "EV5.6 (21164PC)")
13.277 + UNAME_MACHINE="alphapca56" ;;
13.278 + "EV5.7 (21164PC)")
13.279 + UNAME_MACHINE="alphapca57" ;;
13.280 + "EV6 (21264)")
13.281 + UNAME_MACHINE="alphaev6" ;;
13.282 + "EV6.7 (21264A)")
13.283 + UNAME_MACHINE="alphaev67" ;;
13.284 + "EV6.8CB (21264C)")
13.285 + UNAME_MACHINE="alphaev68" ;;
13.286 + "EV6.8AL (21264B)")
13.287 + UNAME_MACHINE="alphaev68" ;;
13.288 + "EV6.8CX (21264D)")
13.289 + UNAME_MACHINE="alphaev68" ;;
13.290 + "EV6.9A (21264/EV69A)")
13.291 + UNAME_MACHINE="alphaev69" ;;
13.292 + "EV7 (21364)")
13.293 + UNAME_MACHINE="alphaev7" ;;
13.294 + "EV7.9 (21364A)")
13.295 + UNAME_MACHINE="alphaev79" ;;
13.296 + esac
13.297 + # A Pn.n version is a patched version.
13.298 + # A Vn.n version is a released version.
13.299 + # A Tn.n version is a released field test version.
13.300 + # A Xn.n version is an unreleased experimental baselevel.
13.301 + # 1.2 uses "1.2" for uname -r.
13.302 + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13.303 + exit 0 ;;
13.304 + Alpha\ *:Windows_NT*:*)
13.305 + # How do we know it's Interix rather than the generic POSIX subsystem?
13.306 + # Should we change UNAME_MACHINE based on the output of uname instead
13.307 + # of the specific Alpha model?
13.308 + echo alpha-pc-interix
13.309 + exit 0 ;;
13.310 + 21064:Windows_NT:50:3)
13.311 + echo alpha-dec-winnt3.5
13.312 + exit 0 ;;
13.313 + Amiga*:UNIX_System_V:4.0:*)
13.314 + echo m68k-unknown-sysv4
13.315 + exit 0;;
13.316 + *:[Aa]miga[Oo][Ss]:*:*)
13.317 + echo ${UNAME_MACHINE}-unknown-amigaos
13.318 + exit 0 ;;
13.319 + *:[Mm]orph[Oo][Ss]:*:*)
13.320 + echo ${UNAME_MACHINE}-unknown-morphos
13.321 + exit 0 ;;
13.322 + *:OS/390:*:*)
13.323 + echo i370-ibm-openedition
13.324 + exit 0 ;;
13.325 + *:z/VM:*:*)
13.326 + echo s390-ibm-zvmoe
13.327 + exit 0 ;;
13.328 + *:OS400:*:*)
13.329 + echo powerpc-ibm-os400
13.330 + exit 0 ;;
13.331 + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
13.332 + echo arm-acorn-riscix${UNAME_RELEASE}
13.333 + exit 0;;
13.334 + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
13.335 + echo hppa1.1-hitachi-hiuxmpp
13.336 + exit 0;;
13.337 + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
13.338 + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
13.339 + if test "`(/bin/universe) 2>/dev/null`" = att ; then
13.340 + echo pyramid-pyramid-sysv3
13.341 + else
13.342 + echo pyramid-pyramid-bsd
13.343 + fi
13.344 + exit 0 ;;
13.345 + NILE*:*:*:dcosx)
13.346 + echo pyramid-pyramid-svr4
13.347 + exit 0 ;;
13.348 + DRS?6000:unix:4.0:6*)
13.349 + echo sparc-icl-nx6
13.350 + exit 0 ;;
13.351 + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
13.352 + case `/usr/bin/uname -p` in
13.353 + sparc) echo sparc-icl-nx7 && exit 0 ;;
13.354 + esac ;;
13.355 + sun4H:SunOS:5.*:*)
13.356 + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
13.357 + exit 0 ;;
13.358 + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
13.359 + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
13.360 + exit 0 ;;
13.361 + i86pc:SunOS:5.*:*)
13.362 + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
13.363 + exit 0 ;;
13.364 + sun4*:SunOS:6*:*)
13.365 + # According to config.sub, this is the proper way to canonicalize
13.366 + # SunOS6. Hard to guess exactly what SunOS6 will be like, but
13.367 + # it's likely to be more like Solaris than SunOS4.
13.368 + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
13.369 + exit 0 ;;
13.370 + sun4*:SunOS:*:*)
13.371 + case "`/usr/bin/arch -k`" in
13.372 + Series*|S4*)
13.373 + UNAME_RELEASE=`uname -v`
13.374 + ;;
13.375 + esac
13.376 + # Japanese Language versions have a version number like `4.1.3-JL'.
13.377 + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
13.378 + exit 0 ;;
13.379 + sun3*:SunOS:*:*)
13.380 + echo m68k-sun-sunos${UNAME_RELEASE}
13.381 + exit 0 ;;
13.382 + sun*:*:4.2BSD:*)
13.383 + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
13.384 + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
13.385 + case "`/bin/arch`" in
13.386 + sun3)
13.387 + echo m68k-sun-sunos${UNAME_RELEASE}
13.388 + ;;
13.389 + sun4)
13.390 + echo sparc-sun-sunos${UNAME_RELEASE}
13.391 + ;;
13.392 + esac
13.393 + exit 0 ;;
13.394 + aushp:SunOS:*:*)
13.395 + echo sparc-auspex-sunos${UNAME_RELEASE}
13.396 + exit 0 ;;
13.397 + # The situation for MiNT is a little confusing. The machine name
13.398 + # can be virtually everything (everything which is not
13.399 + # "atarist" or "atariste" at least should have a processor
13.400 + # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
13.401 + # to the lowercase version "mint" (or "freemint"). Finally
13.402 + # the system name "TOS" denotes a system which is actually not
13.403 + # MiNT. But MiNT is downward compatible to TOS, so this should
13.404 + # be no problem.
13.405 + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
13.406 + echo m68k-atari-mint${UNAME_RELEASE}
13.407 + exit 0 ;;
13.408 + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
13.409 + echo m68k-atari-mint${UNAME_RELEASE}
13.410 + exit 0 ;;
13.411 + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
13.412 + echo m68k-atari-mint${UNAME_RELEASE}
13.413 + exit 0 ;;
13.414 + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
13.415 + echo m68k-milan-mint${UNAME_RELEASE}
13.416 + exit 0 ;;
13.417 + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
13.418 + echo m68k-hades-mint${UNAME_RELEASE}
13.419 + exit 0 ;;
13.420 + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
13.421 + echo m68k-unknown-mint${UNAME_RELEASE}
13.422 + exit 0 ;;
13.423 + m68k:machten:*:*)
13.424 + echo m68k-apple-machten${UNAME_RELEASE}
13.425 + exit 0 ;;
13.426 + powerpc:machten:*:*)
13.427 + echo powerpc-apple-machten${UNAME_RELEASE}
13.428 + exit 0 ;;
13.429 + RISC*:Mach:*:*)
13.430 + echo mips-dec-mach_bsd4.3
13.431 + exit 0 ;;
13.432 + RISC*:ULTRIX:*:*)
13.433 + echo mips-dec-ultrix${UNAME_RELEASE}
13.434 + exit 0 ;;
13.435 + VAX*:ULTRIX*:*:*)
13.436 + echo vax-dec-ultrix${UNAME_RELEASE}
13.437 + exit 0 ;;
13.438 + 2020:CLIX:*:* | 2430:CLIX:*:*)
13.439 + echo clipper-intergraph-clix${UNAME_RELEASE}
13.440 + exit 0 ;;
13.441 + mips:*:*:UMIPS | mips:*:*:RISCos)
13.442 + eval $set_cc_for_build
13.443 + sed 's/^ //' << EOF >$dummy.c
13.444 +#ifdef __cplusplus
13.445 +#include <stdio.h> /* for printf() prototype */
13.446 + int main (int argc, char *argv[]) {
13.447 +#else
13.448 + int main (argc, argv) int argc; char *argv[]; {
13.449 +#endif
13.450 + #if defined (host_mips) && defined (MIPSEB)
13.451 + #if defined (SYSTYPE_SYSV)
13.452 + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
13.453 + #endif
13.454 + #if defined (SYSTYPE_SVR4)
13.455 + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
13.456 + #endif
13.457 + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
13.458 + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
13.459 + #endif
13.460 + #endif
13.461 + exit (-1);
13.462 + }
13.463 +EOF
13.464 + $CC_FOR_BUILD -o $dummy $dummy.c \
13.465 + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
13.466 + && exit 0
13.467 + echo mips-mips-riscos${UNAME_RELEASE}
13.468 + exit 0 ;;
13.469 + Motorola:PowerMAX_OS:*:*)
13.470 + echo powerpc-motorola-powermax
13.471 + exit 0 ;;
13.472 + Motorola:*:4.3:PL8-*)
13.473 + echo powerpc-harris-powermax
13.474 + exit 0 ;;
13.475 + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
13.476 + echo powerpc-harris-powermax
13.477 + exit 0 ;;
13.478 + Night_Hawk:Power_UNIX:*:*)
13.479 + echo powerpc-harris-powerunix
13.480 + exit 0 ;;
13.481 + m88k:CX/UX:7*:*)
13.482 + echo m88k-harris-cxux7
13.483 + exit 0 ;;
13.484 + m88k:*:4*:R4*)
13.485 + echo m88k-motorola-sysv4
13.486 + exit 0 ;;
13.487 + m88k:*:3*:R3*)
13.488 + echo m88k-motorola-sysv3
13.489 + exit 0 ;;
13.490 + AViiON:dgux:*:*)
13.491 + # DG/UX returns AViiON for all architectures
13.492 + UNAME_PROCESSOR=`/usr/bin/uname -p`
13.493 + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
13.494 + then
13.495 + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
13.496 + [ ${TARGET_BINARY_INTERFACE}x = x ]
13.497 + then
13.498 + echo m88k-dg-dgux${UNAME_RELEASE}
13.499 + else
13.500 + echo m88k-dg-dguxbcs${UNAME_RELEASE}
13.501 + fi
13.502 + else
13.503 + echo i586-dg-dgux${UNAME_RELEASE}
13.504 + fi
13.505 + exit 0 ;;
13.506 + M88*:DolphinOS:*:*) # DolphinOS (SVR3)
13.507 + echo m88k-dolphin-sysv3
13.508 + exit 0 ;;
13.509 + M88*:*:R3*:*)
13.510 + # Delta 88k system running SVR3
13.511 + echo m88k-motorola-sysv3
13.512 + exit 0 ;;
13.513 + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
13.514 + echo m88k-tektronix-sysv3
13.515 + exit 0 ;;
13.516 + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
13.517 + echo m68k-tektronix-bsd
13.518 + exit 0 ;;
13.519 + *:IRIX*:*:*)
13.520 + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
13.521 + exit 0 ;;
13.522 + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
13.523 + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
13.524 + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
13.525 + i*86:AIX:*:*)
13.526 + echo i386-ibm-aix
13.527 + exit 0 ;;
13.528 + ia64:AIX:*:*)
13.529 + if [ -x /usr/bin/oslevel ] ; then
13.530 + IBM_REV=`/usr/bin/oslevel`
13.531 + else
13.532 + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
13.533 + fi
13.534 + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
13.535 + exit 0 ;;
13.536 + *:AIX:2:3)
13.537 + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
13.538 + eval $set_cc_for_build
13.539 + sed 's/^ //' << EOF >$dummy.c
13.540 + #include <sys/systemcfg.h>
13.541 +
13.542 + main()
13.543 + {
13.544 + if (!__power_pc())
13.545 + exit(1);
13.546 + puts("powerpc-ibm-aix3.2.5");
13.547 + exit(0);
13.548 + }
13.549 +EOF
13.550 + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
13.551 + echo rs6000-ibm-aix3.2.5
13.552 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
13.553 + echo rs6000-ibm-aix3.2.4
13.554 + else
13.555 + echo rs6000-ibm-aix3.2
13.556 + fi
13.557 + exit 0 ;;
13.558 + *:AIX:*:[45])
13.559 + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
13.560 + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
13.561 + IBM_ARCH=rs6000
13.562 + else
13.563 + IBM_ARCH=powerpc
13.564 + fi
13.565 + if [ -x /usr/bin/oslevel ] ; then
13.566 + IBM_REV=`/usr/bin/oslevel`
13.567 + else
13.568 + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
13.569 + fi
13.570 + echo ${IBM_ARCH}-ibm-aix${IBM_REV}
13.571 + exit 0 ;;
13.572 + *:AIX:*:*)
13.573 + echo rs6000-ibm-aix
13.574 + exit 0 ;;
13.575 + ibmrt:4.4BSD:*|romp-ibm:BSD:*)
13.576 + echo romp-ibm-bsd4.4
13.577 + exit 0 ;;
13.578 + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
13.579 + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
13.580 + exit 0 ;; # report: romp-ibm BSD 4.3
13.581 + *:BOSX:*:*)
13.582 + echo rs6000-bull-bosx
13.583 + exit 0 ;;
13.584 + DPX/2?00:B.O.S.:*:*)
13.585 + echo m68k-bull-sysv3
13.586 + exit 0 ;;
13.587 + 9000/[34]??:4.3bsd:1.*:*)
13.588 + echo m68k-hp-bsd
13.589 + exit 0 ;;
13.590 + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
13.591 + echo m68k-hp-bsd4.4
13.592 + exit 0 ;;
13.593 + 9000/[34678]??:HP-UX:*:*)
13.594 + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
13.595 + case "${UNAME_MACHINE}" in
13.596 + 9000/31? ) HP_ARCH=m68000 ;;
13.597 + 9000/[34]?? ) HP_ARCH=m68k ;;
13.598 + 9000/[678][0-9][0-9])
13.599 + if [ -x /usr/bin/getconf ]; then
13.600 + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
13.601 + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
13.602 + case "${sc_cpu_version}" in
13.603 + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
13.604 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
13.605 + 532) # CPU_PA_RISC2_0
13.606 + case "${sc_kernel_bits}" in
13.607 + 32) HP_ARCH="hppa2.0n" ;;
13.608 + 64) HP_ARCH="hppa2.0w" ;;
13.609 + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
13.610 + esac ;;
13.611 + esac
13.612 + fi
13.613 + if [ "${HP_ARCH}" = "" ]; then
13.614 + eval $set_cc_for_build
13.615 + sed 's/^ //' << EOF >$dummy.c
13.616 +
13.617 + #define _HPUX_SOURCE
13.618 + #include <stdlib.h>
13.619 + #include <unistd.h>
13.620 +
13.621 + int main ()
13.622 + {
13.623 + #if defined(_SC_KERNEL_BITS)
13.624 + long bits = sysconf(_SC_KERNEL_BITS);
13.625 + #endif
13.626 + long cpu = sysconf (_SC_CPU_VERSION);
13.627 +
13.628 + switch (cpu)
13.629 + {
13.630 + case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
13.631 + case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
13.632 + case CPU_PA_RISC2_0:
13.633 + #if defined(_SC_KERNEL_BITS)
13.634 + switch (bits)
13.635 + {
13.636 + case 64: puts ("hppa2.0w"); break;
13.637 + case 32: puts ("hppa2.0n"); break;
13.638 + default: puts ("hppa2.0"); break;
13.639 + } break;
13.640 + #else /* !defined(_SC_KERNEL_BITS) */
13.641 + puts ("hppa2.0"); break;
13.642 + #endif
13.643 + default: puts ("hppa1.0"); break;
13.644 + }
13.645 + exit (0);
13.646 + }
13.647 +EOF
13.648 + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
13.649 + test -z "$HP_ARCH" && HP_ARCH=hppa
13.650 + fi ;;
13.651 + esac
13.652 + if [ ${HP_ARCH} = "hppa2.0w" ]
13.653 + then
13.654 + # avoid double evaluation of $set_cc_for_build
13.655 + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
13.656 + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
13.657 + then
13.658 + HP_ARCH="hppa2.0w"
13.659 + else
13.660 + HP_ARCH="hppa64"
13.661 + fi
13.662 + fi
13.663 + echo ${HP_ARCH}-hp-hpux${HPUX_REV}
13.664 + exit 0 ;;
13.665 + ia64:HP-UX:*:*)
13.666 + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
13.667 + echo ia64-hp-hpux${HPUX_REV}
13.668 + exit 0 ;;
13.669 + 3050*:HI-UX:*:*)
13.670 + eval $set_cc_for_build
13.671 + sed 's/^ //' << EOF >$dummy.c
13.672 + #include <unistd.h>
13.673 + int
13.674 + main ()
13.675 + {
13.676 + long cpu = sysconf (_SC_CPU_VERSION);
13.677 + /* The order matters, because CPU_IS_HP_MC68K erroneously returns
13.678 + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
13.679 + results, however. */
13.680 + if (CPU_IS_PA_RISC (cpu))
13.681 + {
13.682 + switch (cpu)
13.683 + {
13.684 + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
13.685 + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
13.686 + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
13.687 + default: puts ("hppa-hitachi-hiuxwe2"); break;
13.688 + }
13.689 + }
13.690 + else if (CPU_IS_HP_MC68K (cpu))
13.691 + puts ("m68k-hitachi-hiuxwe2");
13.692 + else puts ("unknown-hitachi-hiuxwe2");
13.693 + exit (0);
13.694 + }
13.695 +EOF
13.696 + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
13.697 + echo unknown-hitachi-hiuxwe2
13.698 + exit 0 ;;
13.699 + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
13.700 + echo hppa1.1-hp-bsd
13.701 + exit 0 ;;
13.702 + 9000/8??:4.3bsd:*:*)
13.703 + echo hppa1.0-hp-bsd
13.704 + exit 0 ;;
13.705 + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
13.706 + echo hppa1.0-hp-mpeix
13.707 + exit 0 ;;
13.708 + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
13.709 + echo hppa1.1-hp-osf
13.710 + exit 0 ;;
13.711 + hp8??:OSF1:*:*)
13.712 + echo hppa1.0-hp-osf
13.713 + exit 0 ;;
13.714 + i*86:OSF1:*:*)
13.715 + if [ -x /usr/sbin/sysversion ] ; then
13.716 + echo ${UNAME_MACHINE}-unknown-osf1mk
13.717 + else
13.718 + echo ${UNAME_MACHINE}-unknown-osf1
13.719 + fi
13.720 + exit 0 ;;
13.721 + parisc*:Lites*:*:*)
13.722 + echo hppa1.1-hp-lites
13.723 + exit 0 ;;
13.724 + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
13.725 + echo c1-convex-bsd
13.726 + exit 0 ;;
13.727 + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
13.728 + if getsysinfo -f scalar_acc
13.729 + then echo c32-convex-bsd
13.730 + else echo c2-convex-bsd
13.731 + fi
13.732 + exit 0 ;;
13.733 + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
13.734 + echo c34-convex-bsd
13.735 + exit 0 ;;
13.736 + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
13.737 + echo c38-convex-bsd
13.738 + exit 0 ;;
13.739 + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
13.740 + echo c4-convex-bsd
13.741 + exit 0 ;;
13.742 + CRAY*Y-MP:*:*:*)
13.743 + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
13.744 + exit 0 ;;
13.745 + CRAY*[A-Z]90:*:*:*)
13.746 + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
13.747 + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
13.748 + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
13.749 + -e 's/\.[^.]*$/.X/'
13.750 + exit 0 ;;
13.751 + CRAY*TS:*:*:*)
13.752 + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
13.753 + exit 0 ;;
13.754 + CRAY*T3E:*:*:*)
13.755 + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
13.756 + exit 0 ;;
13.757 + CRAY*SV1:*:*:*)
13.758 + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
13.759 + exit 0 ;;
13.760 + *:UNICOS/mp:*:*)
13.761 + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
13.762 + exit 0 ;;
13.763 + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
13.764 + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13.765 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
13.766 + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
13.767 + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
13.768 + exit 0 ;;
13.769 + 5000:UNIX_System_V:4.*:*)
13.770 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
13.771 + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
13.772 + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
13.773 + exit 0 ;;
13.774 + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
13.775 + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
13.776 + exit 0 ;;
13.777 + sparc*:BSD/OS:*:*)
13.778 + echo sparc-unknown-bsdi${UNAME_RELEASE}
13.779 + exit 0 ;;
13.780 + *:BSD/OS:*:*)
13.781 + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
13.782 + exit 0 ;;
13.783 + *:FreeBSD:*:*)
13.784 + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
13.785 + exit 0 ;;
13.786 + i*:CYGWIN*:*)
13.787 + echo ${UNAME_MACHINE}-pc-cygwin
13.788 + exit 0 ;;
13.789 + i*:MINGW*:*)
13.790 + echo ${UNAME_MACHINE}-pc-mingw32
13.791 + exit 0 ;;
13.792 + i*:PW*:*)
13.793 + echo ${UNAME_MACHINE}-pc-pw32
13.794 + exit 0 ;;
13.795 + x86:Interix*:[34]*)
13.796 + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
13.797 + exit 0 ;;
13.798 + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
13.799 + echo i${UNAME_MACHINE}-pc-mks
13.800 + exit 0 ;;
13.801 + i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
13.802 + # How do we know it's Interix rather than the generic POSIX subsystem?
13.803 + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
13.804 + # UNAME_MACHINE based on the output of uname instead of i386?
13.805 + echo i586-pc-interix
13.806 + exit 0 ;;
13.807 + i*:UWIN*:*)
13.808 + echo ${UNAME_MACHINE}-pc-uwin
13.809 + exit 0 ;;
13.810 + amd64:CYGWIN*:*:*)
13.811 + echo x86_64-unknown-cygwin
13.812 + exit 0 ;;
13.813 + p*:CYGWIN*:*)
13.814 + echo powerpcle-unknown-cygwin
13.815 + exit 0 ;;
13.816 + prep*:SunOS:5.*:*)
13.817 + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
13.818 + exit 0 ;;
13.819 + *:GNU:*:*)
13.820 + # the GNU system
13.821 + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
13.822 + exit 0 ;;
13.823 + *:GNU/*:*:*)
13.824 + # other systems with GNU libc and userland
13.825 + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
13.826 + exit 0 ;;
13.827 + i*86:Minix:*:*)
13.828 + echo ${UNAME_MACHINE}-pc-minix
13.829 + exit 0 ;;
13.830 + arm*:Linux:*:*)
13.831 + echo ${UNAME_MACHINE}-unknown-linux-gnu
13.832 + exit 0 ;;
13.833 + cris:Linux:*:*)
13.834 + echo cris-axis-linux-gnu
13.835 + exit 0 ;;
13.836 + crisv32:Linux:*:*)
13.837 + echo crisv32-axis-linux-gnu
13.838 + exit 0 ;;
13.839 + frv:Linux:*:*)
13.840 + echo frv-unknown-linux-gnu
13.841 + exit 0 ;;
13.842 + ia64:Linux:*:*)
13.843 + echo ${UNAME_MACHINE}-unknown-linux-gnu
13.844 + exit 0 ;;
13.845 + m32r*:Linux:*:*)
13.846 + echo ${UNAME_MACHINE}-unknown-linux-gnu
13.847 + exit 0 ;;
13.848 + m68*:Linux:*:*)
13.849 + echo ${UNAME_MACHINE}-unknown-linux-gnu
13.850 + exit 0 ;;
13.851 + mips:Linux:*:*)
13.852 + eval $set_cc_for_build
13.853 + sed 's/^ //' << EOF >$dummy.c
13.854 + #undef CPU
13.855 + #undef mips
13.856 + #undef mipsel
13.857 + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
13.858 + CPU=mipsel
13.859 + #else
13.860 + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
13.861 + CPU=mips
13.862 + #else
13.863 + CPU=
13.864 + #endif
13.865 + #endif
13.866 +EOF
13.867 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
13.868 + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
13.869 + ;;
13.870 + mips64:Linux:*:*)
13.871 + eval $set_cc_for_build
13.872 + sed 's/^ //' << EOF >$dummy.c
13.873 + #undef CPU
13.874 + #undef mips64
13.875 + #undef mips64el
13.876 + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
13.877 + CPU=mips64el
13.878 + #else
13.879 + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
13.880 + CPU=mips64
13.881 + #else
13.882 + CPU=
13.883 + #endif
13.884 + #endif
13.885 +EOF
13.886 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
13.887 + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
13.888 + ;;
13.889 + ppc:Linux:*:*)
13.890 + echo powerpc-unknown-linux-gnu
13.891 + exit 0 ;;
13.892 + ppc64:Linux:*:*)
13.893 + echo powerpc64-unknown-linux-gnu
13.894 + exit 0 ;;
13.895 + alpha:Linux:*:*)
13.896 + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
13.897 + EV5) UNAME_MACHINE=alphaev5 ;;
13.898 + EV56) UNAME_MACHINE=alphaev56 ;;
13.899 + PCA56) UNAME_MACHINE=alphapca56 ;;
13.900 + PCA57) UNAME_MACHINE=alphapca56 ;;
13.901 + EV6) UNAME_MACHINE=alphaev6 ;;
13.902 + EV67) UNAME_MACHINE=alphaev67 ;;
13.903 + EV68*) UNAME_MACHINE=alphaev68 ;;
13.904 + esac
13.905 + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
13.906 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
13.907 + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
13.908 + exit 0 ;;
13.909 + parisc:Linux:*:* | hppa:Linux:*:*)
13.910 + # Look for CPU level
13.911 + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
13.912 + PA7*) echo hppa1.1-unknown-linux-gnu ;;
13.913 + PA8*) echo hppa2.0-unknown-linux-gnu ;;
13.914 + *) echo hppa-unknown-linux-gnu ;;
13.915 + esac
13.916 + exit 0 ;;
13.917 + parisc64:Linux:*:* | hppa64:Linux:*:*)
13.918 + echo hppa64-unknown-linux-gnu
13.919 + exit 0 ;;
13.920 + s390:Linux:*:* | s390x:Linux:*:*)
13.921 + echo ${UNAME_MACHINE}-ibm-linux
13.922 + exit 0 ;;
13.923 + sh64*:Linux:*:*)
13.924 + echo ${UNAME_MACHINE}-unknown-linux-gnu
13.925 + exit 0 ;;
13.926 + sh*:Linux:*:*)
13.927 + echo ${UNAME_MACHINE}-unknown-linux-gnu
13.928 + exit 0 ;;
13.929 + sparc:Linux:*:* | sparc64:Linux:*:*)
13.930 + echo ${UNAME_MACHINE}-unknown-linux-gnu
13.931 + exit 0 ;;
13.932 + x86_64:Linux:*:*)
13.933 + echo x86_64-unknown-linux-gnu
13.934 + exit 0 ;;
13.935 + i*86:Linux:*:*)
13.936 + # The BFD linker knows what the default object file format is, so
13.937 + # first see if it will tell us. cd to the root directory to prevent
13.938 + # problems with other programs or directories called `ld' in the path.
13.939 + # Set LC_ALL=C to ensure ld outputs messages in English.
13.940 + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
13.941 + | sed -ne '/supported targets:/!d
13.942 + s/[ ][ ]*/ /g
13.943 + s/.*supported targets: *//
13.944 + s/ .*//
13.945 + p'`
13.946 + case "$ld_supported_targets" in
13.947 + elf32-i386)
13.948 + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
13.949 + ;;
13.950 + a.out-i386-linux)
13.951 + echo "${UNAME_MACHINE}-pc-linux-gnuaout"
13.952 + exit 0 ;;
13.953 + coff-i386)
13.954 + echo "${UNAME_MACHINE}-pc-linux-gnucoff"
13.955 + exit 0 ;;
13.956 + "")
13.957 + # Either a pre-BFD a.out linker (linux-gnuoldld) or
13.958 + # one that does not give us useful --help.
13.959 + echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
13.960 + exit 0 ;;
13.961 + esac
13.962 + # Determine whether the default compiler is a.out or elf
13.963 + eval $set_cc_for_build
13.964 + sed 's/^ //' << EOF >$dummy.c
13.965 + #include <features.h>
13.966 + #ifdef __ELF__
13.967 + # ifdef __GLIBC__
13.968 + # if __GLIBC__ >= 2
13.969 + LIBC=gnu
13.970 + # else
13.971 + LIBC=gnulibc1
13.972 + # endif
13.973 + # else
13.974 + LIBC=gnulibc1
13.975 + # endif
13.976 + #else
13.977 + #ifdef __INTEL_COMPILER
13.978 + LIBC=gnu
13.979 + #else
13.980 + LIBC=gnuaout
13.981 + #endif
13.982 + #endif
13.983 + #ifdef __dietlibc__
13.984 + LIBC=dietlibc
13.985 + #endif
13.986 +EOF
13.987 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
13.988 + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
13.989 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
13.990 + ;;
13.991 + i*86:DYNIX/ptx:4*:*)
13.992 + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
13.993 + # earlier versions are messed up and put the nodename in both
13.994 + # sysname and nodename.
13.995 + echo i386-sequent-sysv4
13.996 + exit 0 ;;
13.997 + i*86:UNIX_SV:4.2MP:2.*)
13.998 + # Unixware is an offshoot of SVR4, but it has its own version
13.999 + # number series starting with 2...
13.1000 + # I am not positive that other SVR4 systems won't match this,
13.1001 + # I just have to hope. -- rms.
13.1002 + # Use sysv4.2uw... so that sysv4* matches it.
13.1003 + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
13.1004 + exit 0 ;;
13.1005 + i*86:OS/2:*:*)
13.1006 + # If we were able to find `uname', then EMX Unix compatibility
13.1007 + # is probably installed.
13.1008 + echo ${UNAME_MACHINE}-pc-os2-emx
13.1009 + exit 0 ;;
13.1010 + i*86:XTS-300:*:STOP)
13.1011 + echo ${UNAME_MACHINE}-unknown-stop
13.1012 + exit 0 ;;
13.1013 + i*86:atheos:*:*)
13.1014 + echo ${UNAME_MACHINE}-unknown-atheos
13.1015 + exit 0 ;;
13.1016 + i*86:syllable:*:*)
13.1017 + echo ${UNAME_MACHINE}-pc-syllable
13.1018 + exit 0 ;;
13.1019 + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
13.1020 + echo i386-unknown-lynxos${UNAME_RELEASE}
13.1021 + exit 0 ;;
13.1022 + i*86:*DOS:*:*)
13.1023 + echo ${UNAME_MACHINE}-pc-msdosdjgpp
13.1024 + exit 0 ;;
13.1025 + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
13.1026 + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
13.1027 + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
13.1028 + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
13.1029 + else
13.1030 + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
13.1031 + fi
13.1032 + exit 0 ;;
13.1033 + i*86:*:5:[78]*)
13.1034 + case `/bin/uname -X | grep "^Machine"` in
13.1035 + *486*) UNAME_MACHINE=i486 ;;
13.1036 + *Pentium) UNAME_MACHINE=i586 ;;
13.1037 + *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
13.1038 + esac
13.1039 + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
13.1040 + exit 0 ;;
13.1041 + i*86:*:3.2:*)
13.1042 + if test -f /usr/options/cb.name; then
13.1043 + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
13.1044 + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
13.1045 + elif /bin/uname -X 2>/dev/null >/dev/null ; then
13.1046 + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
13.1047 + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
13.1048 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
13.1049 + && UNAME_MACHINE=i586
13.1050 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
13.1051 + && UNAME_MACHINE=i686
13.1052 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
13.1053 + && UNAME_MACHINE=i686
13.1054 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
13.1055 + else
13.1056 + echo ${UNAME_MACHINE}-pc-sysv32
13.1057 + fi
13.1058 + exit 0 ;;
13.1059 + pc:*:*:*)
13.1060 + # Left here for compatibility:
13.1061 + # uname -m prints for DJGPP always 'pc', but it prints nothing about
13.1062 + # the processor, so we play safe by assuming i386.
13.1063 + echo i386-pc-msdosdjgpp
13.1064 + exit 0 ;;
13.1065 + Intel:Mach:3*:*)
13.1066 + echo i386-pc-mach3
13.1067 + exit 0 ;;
13.1068 + paragon:*:*:*)
13.1069 + echo i860-intel-osf1
13.1070 + exit 0 ;;
13.1071 + i860:*:4.*:*) # i860-SVR4
13.1072 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
13.1073 + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
13.1074 + else # Add other i860-SVR4 vendors below as they are discovered.
13.1075 + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
13.1076 + fi
13.1077 + exit 0 ;;
13.1078 + mini*:CTIX:SYS*5:*)
13.1079 + # "miniframe"
13.1080 + echo m68010-convergent-sysv
13.1081 + exit 0 ;;
13.1082 + mc68k:UNIX:SYSTEM5:3.51m)
13.1083 + echo m68k-convergent-sysv
13.1084 + exit 0 ;;
13.1085 + M680?0:D-NIX:5.3:*)
13.1086 + echo m68k-diab-dnix
13.1087 + exit 0 ;;
13.1088 + M68*:*:R3V[5678]*:*)
13.1089 + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
13.1090 + 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)
13.1091 + OS_REL=''
13.1092 + test -r /etc/.relid \
13.1093 + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
13.1094 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
13.1095 + && echo i486-ncr-sysv4.3${OS_REL} && exit 0
13.1096 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
13.1097 + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
13.1098 + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
13.1099 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
13.1100 + && echo i486-ncr-sysv4 && exit 0 ;;
13.1101 + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
13.1102 + echo m68k-unknown-lynxos${UNAME_RELEASE}
13.1103 + exit 0 ;;
13.1104 + mc68030:UNIX_System_V:4.*:*)
13.1105 + echo m68k-atari-sysv4
13.1106 + exit 0 ;;
13.1107 + TSUNAMI:LynxOS:2.*:*)
13.1108 + echo sparc-unknown-lynxos${UNAME_RELEASE}
13.1109 + exit 0 ;;
13.1110 + rs6000:LynxOS:2.*:*)
13.1111 + echo rs6000-unknown-lynxos${UNAME_RELEASE}
13.1112 + exit 0 ;;
13.1113 + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
13.1114 + echo powerpc-unknown-lynxos${UNAME_RELEASE}
13.1115 + exit 0 ;;
13.1116 + SM[BE]S:UNIX_SV:*:*)
13.1117 + echo mips-dde-sysv${UNAME_RELEASE}
13.1118 + exit 0 ;;
13.1119 + RM*:ReliantUNIX-*:*:*)
13.1120 + echo mips-sni-sysv4
13.1121 + exit 0 ;;
13.1122 + RM*:SINIX-*:*:*)
13.1123 + echo mips-sni-sysv4
13.1124 + exit 0 ;;
13.1125 + *:SINIX-*:*:*)
13.1126 + if uname -p 2>/dev/null >/dev/null ; then
13.1127 + UNAME_MACHINE=`(uname -p) 2>/dev/null`
13.1128 + echo ${UNAME_MACHINE}-sni-sysv4
13.1129 + else
13.1130 + echo ns32k-sni-sysv
13.1131 + fi
13.1132 + exit 0 ;;
13.1133 + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
13.1134 + # says <Richard.M.Bartel@ccMail.Census.GOV>
13.1135 + echo i586-unisys-sysv4
13.1136 + exit 0 ;;
13.1137 + *:UNIX_System_V:4*:FTX*)
13.1138 + # From Gerald Hewes <hewes@openmarket.com>.
13.1139 + # How about differentiating between stratus architectures? -djm
13.1140 + echo hppa1.1-stratus-sysv4
13.1141 + exit 0 ;;
13.1142 + *:*:*:FTX*)
13.1143 + # From seanf@swdc.stratus.com.
13.1144 + echo i860-stratus-sysv4
13.1145 + exit 0 ;;
13.1146 + i*86:VOS:*:*)
13.1147 + # From Paul.Green@stratus.com.
13.1148 + echo ${UNAME_MACHINE}-stratus-vos
13.1149 + exit 0 ;;
13.1150 + *:VOS:*:*)
13.1151 + # From Paul.Green@stratus.com.
13.1152 + echo hppa1.1-stratus-vos
13.1153 + exit 0 ;;
13.1154 + mc68*:A/UX:*:*)
13.1155 + echo m68k-apple-aux${UNAME_RELEASE}
13.1156 + exit 0 ;;
13.1157 + news*:NEWS-OS:6*:*)
13.1158 + echo mips-sony-newsos6
13.1159 + exit 0 ;;
13.1160 + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
13.1161 + if [ -d /usr/nec ]; then
13.1162 + echo mips-nec-sysv${UNAME_RELEASE}
13.1163 + else
13.1164 + echo mips-unknown-sysv${UNAME_RELEASE}
13.1165 + fi
13.1166 + exit 0 ;;
13.1167 + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
13.1168 + echo powerpc-be-beos
13.1169 + exit 0 ;;
13.1170 + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
13.1171 + echo powerpc-apple-beos
13.1172 + exit 0 ;;
13.1173 + BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
13.1174 + echo i586-pc-beos
13.1175 + exit 0 ;;
13.1176 + SX-4:SUPER-UX:*:*)
13.1177 + echo sx4-nec-superux${UNAME_RELEASE}
13.1178 + exit 0 ;;
13.1179 + SX-5:SUPER-UX:*:*)
13.1180 + echo sx5-nec-superux${UNAME_RELEASE}
13.1181 + exit 0 ;;
13.1182 + SX-6:SUPER-UX:*:*)
13.1183 + echo sx6-nec-superux${UNAME_RELEASE}
13.1184 + exit 0 ;;
13.1185 + Power*:Rhapsody:*:*)
13.1186 + echo powerpc-apple-rhapsody${UNAME_RELEASE}
13.1187 + exit 0 ;;
13.1188 + *:Rhapsody:*:*)
13.1189 + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
13.1190 + exit 0 ;;
13.1191 + *:Darwin:*:*)
13.1192 + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
13.1193 + case $UNAME_PROCESSOR in
13.1194 + *86) UNAME_PROCESSOR=i686 ;;
13.1195 + unknown) UNAME_PROCESSOR=powerpc ;;
13.1196 + esac
13.1197 + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
13.1198 + exit 0 ;;
13.1199 + *:procnto*:*:* | *:QNX:[0123456789]*:*)
13.1200 + UNAME_PROCESSOR=`uname -p`
13.1201 + if test "$UNAME_PROCESSOR" = "x86"; then
13.1202 + UNAME_PROCESSOR=i386
13.1203 + UNAME_MACHINE=pc
13.1204 + fi
13.1205 + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
13.1206 + exit 0 ;;
13.1207 + *:QNX:*:4*)
13.1208 + echo i386-pc-qnx
13.1209 + exit 0 ;;
13.1210 + NSE-?:NONSTOP_KERNEL:*:*)
13.1211 + echo nse-tandem-nsk${UNAME_RELEASE}
13.1212 + exit 0 ;;
13.1213 + NSR-?:NONSTOP_KERNEL:*:*)
13.1214 + echo nsr-tandem-nsk${UNAME_RELEASE}
13.1215 + exit 0 ;;
13.1216 + *:NonStop-UX:*:*)
13.1217 + echo mips-compaq-nonstopux
13.1218 + exit 0 ;;
13.1219 + BS2000:POSIX*:*:*)
13.1220 + echo bs2000-siemens-sysv
13.1221 + exit 0 ;;
13.1222 + DS/*:UNIX_System_V:*:*)
13.1223 + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
13.1224 + exit 0 ;;
13.1225 + *:Plan9:*:*)
13.1226 + # "uname -m" is not consistent, so use $cputype instead. 386
13.1227 + # is converted to i386 for consistency with other x86
13.1228 + # operating systems.
13.1229 + if test "$cputype" = "386"; then
13.1230 + UNAME_MACHINE=i386
13.1231 + else
13.1232 + UNAME_MACHINE="$cputype"
13.1233 + fi
13.1234 + echo ${UNAME_MACHINE}-unknown-plan9
13.1235 + exit 0 ;;
13.1236 + *:TOPS-10:*:*)
13.1237 + echo pdp10-unknown-tops10
13.1238 + exit 0 ;;
13.1239 + *:TENEX:*:*)
13.1240 + echo pdp10-unknown-tenex
13.1241 + exit 0 ;;
13.1242 + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
13.1243 + echo pdp10-dec-tops20
13.1244 + exit 0 ;;
13.1245 + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
13.1246 + echo pdp10-xkl-tops20
13.1247 + exit 0 ;;
13.1248 + *:TOPS-20:*:*)
13.1249 + echo pdp10-unknown-tops20
13.1250 + exit 0 ;;
13.1251 + *:ITS:*:*)
13.1252 + echo pdp10-unknown-its
13.1253 + exit 0 ;;
13.1254 + SEI:*:*:SEIUX)
13.1255 + echo mips-sei-seiux${UNAME_RELEASE}
13.1256 + exit 0 ;;
13.1257 + *:DragonFly:*:*)
13.1258 + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
13.1259 + exit 0 ;;
13.1260 + *:*VMS:*:*)
13.1261 + UNAME_MACHINE=`(uname -p) 2>/dev/null`
13.1262 + case "${UNAME_MACHINE}" in
13.1263 + A*) echo alpha-dec-vms && exit 0 ;;
13.1264 + I*) echo ia64-dec-vms && exit 0 ;;
13.1265 + V*) echo vax-dec-vms && exit 0 ;;
13.1266 + esac ;;
13.1267 + *:XENIX:*:SysV)
13.1268 + echo i386-pc-xenix
13.1269 + exit 0 ;;
13.1270 +esac
13.1271 +
13.1272 +#echo '(No uname command or uname output not recognized.)' 1>&2
13.1273 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
13.1274 +
13.1275 +eval $set_cc_for_build
13.1276 +cat >$dummy.c <<EOF
13.1277 +#ifdef _SEQUENT_
13.1278 +# include <sys/types.h>
13.1279 +# include <sys/utsname.h>
13.1280 +#endif
13.1281 +main ()
13.1282 +{
13.1283 +#if defined (sony)
13.1284 +#if defined (MIPSEB)
13.1285 + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
13.1286 + I don't know.... */
13.1287 + printf ("mips-sony-bsd\n"); exit (0);
13.1288 +#else
13.1289 +#include <sys/param.h>
13.1290 + printf ("m68k-sony-newsos%s\n",
13.1291 +#ifdef NEWSOS4
13.1292 + "4"
13.1293 +#else
13.1294 + ""
13.1295 +#endif
13.1296 + ); exit (0);
13.1297 +#endif
13.1298 +#endif
13.1299 +
13.1300 +#if defined (__arm) && defined (__acorn) && defined (__unix)
13.1301 + printf ("arm-acorn-riscix"); exit (0);
13.1302 +#endif
13.1303 +
13.1304 +#if defined (hp300) && !defined (hpux)
13.1305 + printf ("m68k-hp-bsd\n"); exit (0);
13.1306 +#endif
13.1307 +
13.1308 +#if defined (NeXT)
13.1309 +#if !defined (__ARCHITECTURE__)
13.1310 +#define __ARCHITECTURE__ "m68k"
13.1311 +#endif
13.1312 + int version;
13.1313 + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
13.1314 + if (version < 4)
13.1315 + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
13.1316 + else
13.1317 + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
13.1318 + exit (0);
13.1319 +#endif
13.1320 +
13.1321 +#if defined (MULTIMAX) || defined (n16)
13.1322 +#if defined (UMAXV)
13.1323 + printf ("ns32k-encore-sysv\n"); exit (0);
13.1324 +#else
13.1325 +#if defined (CMU)
13.1326 + printf ("ns32k-encore-mach\n"); exit (0);
13.1327 +#else
13.1328 + printf ("ns32k-encore-bsd\n"); exit (0);
13.1329 +#endif
13.1330 +#endif
13.1331 +#endif
13.1332 +
13.1333 +#if defined (__386BSD__)
13.1334 + printf ("i386-pc-bsd\n"); exit (0);
13.1335 +#endif
13.1336 +
13.1337 +#if defined (sequent)
13.1338 +#if defined (i386)
13.1339 + printf ("i386-sequent-dynix\n"); exit (0);
13.1340 +#endif
13.1341 +#if defined (ns32000)
13.1342 + printf ("ns32k-sequent-dynix\n"); exit (0);
13.1343 +#endif
13.1344 +#endif
13.1345 +
13.1346 +#if defined (_SEQUENT_)
13.1347 + struct utsname un;
13.1348 +
13.1349 + uname(&un);
13.1350 +
13.1351 + if (strncmp(un.version, "V2", 2) == 0) {
13.1352 + printf ("i386-sequent-ptx2\n"); exit (0);
13.1353 + }
13.1354 + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
13.1355 + printf ("i386-sequent-ptx1\n"); exit (0);
13.1356 + }
13.1357 + printf ("i386-sequent-ptx\n"); exit (0);
13.1358 +
13.1359 +#endif
13.1360 +
13.1361 +#if defined (vax)
13.1362 +# if !defined (ultrix)
13.1363 +# include <sys/param.h>
13.1364 +# if defined (BSD)
13.1365 +# if BSD == 43
13.1366 + printf ("vax-dec-bsd4.3\n"); exit (0);
13.1367 +# else
13.1368 +# if BSD == 199006
13.1369 + printf ("vax-dec-bsd4.3reno\n"); exit (0);
13.1370 +# else
13.1371 + printf ("vax-dec-bsd\n"); exit (0);
13.1372 +# endif
13.1373 +# endif
13.1374 +# else
13.1375 + printf ("vax-dec-bsd\n"); exit (0);
13.1376 +# endif
13.1377 +# else
13.1378 + printf ("vax-dec-ultrix\n"); exit (0);
13.1379 +# endif
13.1380 +#endif
13.1381 +
13.1382 +#if defined (alliant) && defined (i860)
13.1383 + printf ("i860-alliant-bsd\n"); exit (0);
13.1384 +#endif
13.1385 +
13.1386 + exit (1);
13.1387 +}
13.1388 +EOF
13.1389 +
13.1390 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
13.1391 +
13.1392 +# Apollos put the system type in the environment.
13.1393 +
13.1394 +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
13.1395 +
13.1396 +# Convex versions that predate uname can use getsysinfo(1)
13.1397 +
13.1398 +if [ -x /usr/convex/getsysinfo ]
13.1399 +then
13.1400 + case `getsysinfo -f cpu_type` in
13.1401 + c1*)
13.1402 + echo c1-convex-bsd
13.1403 + exit 0 ;;
13.1404 + c2*)
13.1405 + if getsysinfo -f scalar_acc
13.1406 + then echo c32-convex-bsd
13.1407 + else echo c2-convex-bsd
13.1408 + fi
13.1409 + exit 0 ;;
13.1410 + c34*)
13.1411 + echo c34-convex-bsd
13.1412 + exit 0 ;;
13.1413 + c38*)
13.1414 + echo c38-convex-bsd
13.1415 + exit 0 ;;
13.1416 + c4*)
13.1417 + echo c4-convex-bsd
13.1418 + exit 0 ;;
13.1419 + esac
13.1420 +fi
13.1421 +
13.1422 +cat >&2 <<EOF
13.1423 +$0: unable to guess system type
13.1424 +
13.1425 +This script, last modified $timestamp, has failed to recognize
13.1426 +the operating system you are using. It is advised that you
13.1427 +download the most up to date version of the config scripts from
13.1428 +
13.1429 + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
13.1430 +and
13.1431 + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
13.1432 +
13.1433 +If the version you run ($0) is already up to date, please
13.1434 +send the following data and any information you think might be
13.1435 +pertinent to <config-patches@gnu.org> in order to provide the needed
13.1436 +information to handle your system.
13.1437 +
13.1438 +config.guess timestamp = $timestamp
13.1439 +
13.1440 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
13.1441 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
13.1442 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
13.1443 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
13.1444 +
13.1445 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
13.1446 +/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
13.1447 +
13.1448 +hostinfo = `(hostinfo) 2>/dev/null`
13.1449 +/bin/universe = `(/bin/universe) 2>/dev/null`
13.1450 +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
13.1451 +/bin/arch = `(/bin/arch) 2>/dev/null`
13.1452 +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
13.1453 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
13.1454 +
13.1455 +UNAME_MACHINE = ${UNAME_MACHINE}
13.1456 +UNAME_RELEASE = ${UNAME_RELEASE}
13.1457 +UNAME_SYSTEM = ${UNAME_SYSTEM}
13.1458 +UNAME_VERSION = ${UNAME_VERSION}
13.1459 +EOF
13.1460 +
13.1461 +exit 1
13.1462 +
13.1463 +# Local variables:
13.1464 +# eval: (add-hook 'write-file-hooks 'time-stamp)
13.1465 +# time-stamp-start: "timestamp='"
13.1466 +# time-stamp-format: "%:y-%02m-%02d"
13.1467 +# time-stamp-end: "'"
13.1468 +# End:
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/mythtv_plugin/config.sub Wed Sep 20 23:59:48 2006 +0100
14.3 @@ -0,0 +1,1569 @@
14.4 +#! /bin/sh
14.5 +# Configuration validation subroutine script.
14.6 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
14.7 +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
14.8 +
14.9 +timestamp='2005-04-22'
14.10 +
14.11 +# This file is (in principle) common to ALL GNU software.
14.12 +# The presence of a machine in this file suggests that SOME GNU software
14.13 +# can handle that machine. It does not imply ALL GNU software can.
14.14 +#
14.15 +# This file is free software; you can redistribute it and/or modify
14.16 +# it under the terms of the GNU General Public License as published by
14.17 +# the Free Software Foundation; either version 2 of the License, or
14.18 +# (at your option) any later version.
14.19 +#
14.20 +# This program is distributed in the hope that it will be useful,
14.21 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
14.22 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14.23 +# GNU General Public License for more details.
14.24 +#
14.25 +# You should have received a copy of the GNU General Public License
14.26 +# along with this program; if not, write to the Free Software
14.27 +# Foundation, Inc., 59 Temple Place - Suite 330,
14.28 +# Boston, MA 02111-1307, USA.
14.29 +
14.30 +# As a special exception to the GNU General Public License, if you
14.31 +# distribute this file as part of a program that contains a
14.32 +# configuration script generated by Autoconf, you may include it under
14.33 +# the same distribution terms that you use for the rest of that program.
14.34 +
14.35 +# Please send patches to <config-patches@gnu.org>. Submit a context
14.36 +# diff and a properly formatted ChangeLog entry.
14.37 +#
14.38 +# Configuration subroutine to validate and canonicalize a configuration type.
14.39 +# Supply the specified configuration type as an argument.
14.40 +# If it is invalid, we print an error message on stderr and exit with code 1.
14.41 +# Otherwise, we print the canonical config type on stdout and succeed.
14.42 +
14.43 +# This file is supposed to be the same for all GNU packages
14.44 +# and recognize all the CPU types, system types and aliases
14.45 +# that are meaningful with *any* GNU software.
14.46 +# Each package is responsible for reporting which valid configurations
14.47 +# it does not support. The user should be able to distinguish
14.48 +# a failure to support a valid configuration from a meaningless
14.49 +# configuration.
14.50 +
14.51 +# The goal of this file is to map all the various variations of a given
14.52 +# machine specification into a single specification in the form:
14.53 +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
14.54 +# or in some cases, the newer four-part form:
14.55 +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
14.56 +# It is wrong to echo any other type of specification.
14.57 +
14.58 +me=`echo "$0" | sed -e 's,.*/,,'`
14.59 +
14.60 +usage="\
14.61 +Usage: $0 [OPTION] CPU-MFR-OPSYS
14.62 + $0 [OPTION] ALIAS
14.63 +
14.64 +Canonicalize a configuration name.
14.65 +
14.66 +Operation modes:
14.67 + -h, --help print this help, then exit
14.68 + -t, --time-stamp print date of last modification, then exit
14.69 + -v, --version print version number, then exit
14.70 +
14.71 +Report bugs and patches to <config-patches@gnu.org>."
14.72 +
14.73 +version="\
14.74 +GNU config.sub ($timestamp)
14.75 +
14.76 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
14.77 +Free Software Foundation, Inc.
14.78 +
14.79 +This is free software; see the source for copying conditions. There is NO
14.80 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
14.81 +
14.82 +help="
14.83 +Try \`$me --help' for more information."
14.84 +
14.85 +# Parse command line
14.86 +while test $# -gt 0 ; do
14.87 + case $1 in
14.88 + --time-stamp | --time* | -t )
14.89 + echo "$timestamp" ; exit 0 ;;
14.90 + --version | -v )
14.91 + echo "$version" ; exit 0 ;;
14.92 + --help | --h* | -h )
14.93 + echo "$usage"; exit 0 ;;
14.94 + -- ) # Stop option processing
14.95 + shift; break ;;
14.96 + - ) # Use stdin as input.
14.97 + break ;;
14.98 + -* )
14.99 + echo "$me: invalid option $1$help"
14.100 + exit 1 ;;
14.101 +
14.102 + *local*)
14.103 + # First pass through any local machine types.
14.104 + echo $1
14.105 + exit 0;;
14.106 +
14.107 + * )
14.108 + break ;;
14.109 + esac
14.110 +done
14.111 +
14.112 +case $# in
14.113 + 0) echo "$me: missing argument$help" >&2
14.114 + exit 1;;
14.115 + 1) ;;
14.116 + *) echo "$me: too many arguments$help" >&2
14.117 + exit 1;;
14.118 +esac
14.119 +
14.120 +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
14.121 +# Here we must recognize all the valid KERNEL-OS combinations.
14.122 +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
14.123 +case $maybe_os in
14.124 + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
14.125 + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
14.126 + os=-$maybe_os
14.127 + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
14.128 + ;;
14.129 + *)
14.130 + basic_machine=`echo $1 | sed 's/-[^-]*$//'`
14.131 + if [ $basic_machine != $1 ]
14.132 + then os=`echo $1 | sed 's/.*-/-/'`
14.133 + else os=; fi
14.134 + ;;
14.135 +esac
14.136 +
14.137 +### Let's recognize common machines as not being operating systems so
14.138 +### that things like config.sub decstation-3100 work. We also
14.139 +### recognize some manufacturers as not being operating systems, so we
14.140 +### can provide default operating systems below.
14.141 +case $os in
14.142 + -sun*os*)
14.143 + # Prevent following clause from handling this invalid input.
14.144 + ;;
14.145 + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
14.146 + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
14.147 + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
14.148 + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
14.149 + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
14.150 + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
14.151 + -apple | -axis | -knuth | -cray)
14.152 + os=
14.153 + basic_machine=$1
14.154 + ;;
14.155 + -sim | -cisco | -oki | -wec | -winbond)
14.156 + os=
14.157 + basic_machine=$1
14.158 + ;;
14.159 + -scout)
14.160 + ;;
14.161 + -wrs)
14.162 + os=-vxworks
14.163 + basic_machine=$1
14.164 + ;;
14.165 + -chorusos*)
14.166 + os=-chorusos
14.167 + basic_machine=$1
14.168 + ;;
14.169 + -chorusrdb)
14.170 + os=-chorusrdb
14.171 + basic_machine=$1
14.172 + ;;
14.173 + -hiux*)
14.174 + os=-hiuxwe2
14.175 + ;;
14.176 + -sco5)
14.177 + os=-sco3.2v5
14.178 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
14.179 + ;;
14.180 + -sco4)
14.181 + os=-sco3.2v4
14.182 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
14.183 + ;;
14.184 + -sco3.2.[4-9]*)
14.185 + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
14.186 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
14.187 + ;;
14.188 + -sco3.2v[4-9]*)
14.189 + # Don't forget version if it is 3.2v4 or newer.
14.190 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
14.191 + ;;
14.192 + -sco*)
14.193 + os=-sco3.2v2
14.194 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
14.195 + ;;
14.196 + -udk*)
14.197 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
14.198 + ;;
14.199 + -isc)
14.200 + os=-isc2.2
14.201 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
14.202 + ;;
14.203 + -clix*)
14.204 + basic_machine=clipper-intergraph
14.205 + ;;
14.206 + -isc*)
14.207 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
14.208 + ;;
14.209 + -lynx*)
14.210 + os=-lynxos
14.211 + ;;
14.212 + -ptx*)
14.213 + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
14.214 + ;;
14.215 + -windowsnt*)
14.216 + os=`echo $os | sed -e 's/windowsnt/winnt/'`
14.217 + ;;
14.218 + -psos*)
14.219 + os=-psos
14.220 + ;;
14.221 + -mint | -mint[0-9]*)
14.222 + basic_machine=m68k-atari
14.223 + os=-mint
14.224 + ;;
14.225 +esac
14.226 +
14.227 +# Decode aliases for certain CPU-COMPANY combinations.
14.228 +case $basic_machine in
14.229 + # Recognize the basic CPU types without company name.
14.230 + # Some are omitted here because they have special meanings below.
14.231 + 1750a | 580 \
14.232 + | a29k \
14.233 + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
14.234 + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
14.235 + | am33_2.0 \
14.236 + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
14.237 + | bfin \
14.238 + | c4x | clipper \
14.239 + | d10v | d30v | dlx | dsp16xx \
14.240 + | fr30 | frv \
14.241 + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
14.242 + | i370 | i860 | i960 | ia64 \
14.243 + | ip2k | iq2000 \
14.244 + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
14.245 + | mips | mipsbe | mipseb | mipsel | mipsle \
14.246 + | mips16 \
14.247 + | mips64 | mips64el \
14.248 + | mips64vr | mips64vrel \
14.249 + | mips64orion | mips64orionel \
14.250 + | mips64vr4100 | mips64vr4100el \
14.251 + | mips64vr4300 | mips64vr4300el \
14.252 + | mips64vr5000 | mips64vr5000el \
14.253 + | mipsisa32 | mipsisa32el \
14.254 + | mipsisa32r2 | mipsisa32r2el \
14.255 + | mipsisa64 | mipsisa64el \
14.256 + | mipsisa64r2 | mipsisa64r2el \
14.257 + | mipsisa64sb1 | mipsisa64sb1el \
14.258 + | mipsisa64sr71k | mipsisa64sr71kel \
14.259 + | mipstx39 | mipstx39el \
14.260 + | mn10200 | mn10300 \
14.261 + | msp430 \
14.262 + | ns16k | ns32k \
14.263 + | openrisc | or32 \
14.264 + | pdp10 | pdp11 | pj | pjl \
14.265 + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
14.266 + | pyramid \
14.267 + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
14.268 + | sh64 | sh64le \
14.269 + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
14.270 + | sparcv8 | sparcv9 | sparcv9b \
14.271 + | strongarm \
14.272 + | tahoe | thumb | tic4x | tic80 | tron \
14.273 + | v850 | v850e \
14.274 + | we32k \
14.275 + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
14.276 + | z8k)
14.277 + basic_machine=$basic_machine-unknown
14.278 + ;;
14.279 + m6811 | m68hc11 | m6812 | m68hc12)
14.280 + # Motorola 68HC11/12.
14.281 + basic_machine=$basic_machine-unknown
14.282 + os=-none
14.283 + ;;
14.284 + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
14.285 + ;;
14.286 +
14.287 + # We use `pc' rather than `unknown'
14.288 + # because (1) that's what they normally are, and
14.289 + # (2) the word "unknown" tends to confuse beginning users.
14.290 + i*86 | x86_64)
14.291 + basic_machine=$basic_machine-pc
14.292 + ;;
14.293 + # Object if more than one company name word.
14.294 + *-*-*)
14.295 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
14.296 + exit 1
14.297 + ;;
14.298 + # Recognize the basic CPU types with company name.
14.299 + 580-* \
14.300 + | a29k-* \
14.301 + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
14.302 + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
14.303 + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
14.304 + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
14.305 + | avr-* \
14.306 + | bfin-* | bs2000-* \
14.307 + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
14.308 + | clipper-* | craynv-* | cydra-* \
14.309 + | d10v-* | d30v-* | dlx-* \
14.310 + | elxsi-* \
14.311 + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
14.312 + | h8300-* | h8500-* \
14.313 + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
14.314 + | i*86-* | i860-* | i960-* | ia64-* \
14.315 + | ip2k-* | iq2000-* \
14.316 + | m32r-* | m32rle-* \
14.317 + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
14.318 + | m88110-* | m88k-* | maxq-* | mcore-* \
14.319 + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
14.320 + | mips16-* \
14.321 + | mips64-* | mips64el-* \
14.322 + | mips64vr-* | mips64vrel-* \
14.323 + | mips64orion-* | mips64orionel-* \
14.324 + | mips64vr4100-* | mips64vr4100el-* \
14.325 + | mips64vr4300-* | mips64vr4300el-* \
14.326 + | mips64vr5000-* | mips64vr5000el-* \
14.327 + | mipsisa32-* | mipsisa32el-* \
14.328 + | mipsisa32r2-* | mipsisa32r2el-* \
14.329 + | mipsisa64-* | mipsisa64el-* \
14.330 + | mipsisa64r2-* | mipsisa64r2el-* \
14.331 + | mipsisa64sb1-* | mipsisa64sb1el-* \
14.332 + | mipsisa64sr71k-* | mipsisa64sr71kel-* \
14.333 + | mipstx39-* | mipstx39el-* \
14.334 + | mmix-* \
14.335 + | msp430-* \
14.336 + | none-* | np1-* | ns16k-* | ns32k-* \
14.337 + | orion-* \
14.338 + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
14.339 + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
14.340 + | pyramid-* \
14.341 + | romp-* | rs6000-* \
14.342 + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
14.343 + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
14.344 + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
14.345 + | sparclite-* \
14.346 + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
14.347 + | tahoe-* | thumb-* \
14.348 + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
14.349 + | tron-* \
14.350 + | v850-* | v850e-* | vax-* \
14.351 + | we32k-* \
14.352 + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
14.353 + | xstormy16-* | xtensa-* \
14.354 + | ymp-* \
14.355 + | z8k-*)
14.356 + ;;
14.357 + # Recognize the various machine names and aliases which stand
14.358 + # for a CPU type and a company and sometimes even an OS.
14.359 + 386bsd)
14.360 + basic_machine=i386-unknown
14.361 + os=-bsd
14.362 + ;;
14.363 + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
14.364 + basic_machine=m68000-att
14.365 + ;;
14.366 + 3b*)
14.367 + basic_machine=we32k-att
14.368 + ;;
14.369 + a29khif)
14.370 + basic_machine=a29k-amd
14.371 + os=-udi
14.372 + ;;
14.373 + abacus)
14.374 + basic_machine=abacus-unknown
14.375 + ;;
14.376 + adobe68k)
14.377 + basic_machine=m68010-adobe
14.378 + os=-scout
14.379 + ;;
14.380 + alliant | fx80)
14.381 + basic_machine=fx80-alliant
14.382 + ;;
14.383 + altos | altos3068)
14.384 + basic_machine=m68k-altos
14.385 + ;;
14.386 + am29k)
14.387 + basic_machine=a29k-none
14.388 + os=-bsd
14.389 + ;;
14.390 + amd64)
14.391 + basic_machine=x86_64-pc
14.392 + ;;
14.393 + amd64-*)
14.394 + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
14.395 + ;;
14.396 + amdahl)
14.397 + basic_machine=580-amdahl
14.398 + os=-sysv
14.399 + ;;
14.400 + amiga | amiga-*)
14.401 + basic_machine=m68k-unknown
14.402 + ;;
14.403 + amigaos | amigados)
14.404 + basic_machine=m68k-unknown
14.405 + os=-amigaos
14.406 + ;;
14.407 + amigaunix | amix)
14.408 + basic_machine=m68k-unknown
14.409 + os=-sysv4
14.410 + ;;
14.411 + apollo68)
14.412 + basic_machine=m68k-apollo
14.413 + os=-sysv
14.414 + ;;
14.415 + apollo68bsd)
14.416 + basic_machine=m68k-apollo
14.417 + os=-bsd
14.418 + ;;
14.419 + aux)
14.420 + basic_machine=m68k-apple
14.421 + os=-aux
14.422 + ;;
14.423 + balance)
14.424 + basic_machine=ns32k-sequent
14.425 + os=-dynix
14.426 + ;;
14.427 + c90)
14.428 + basic_machine=c90-cray
14.429 + os=-unicos
14.430 + ;;
14.431 + convex-c1)
14.432 + basic_machine=c1-convex
14.433 + os=-bsd
14.434 + ;;
14.435 + convex-c2)
14.436 + basic_machine=c2-convex
14.437 + os=-bsd
14.438 + ;;
14.439 + convex-c32)
14.440 + basic_machine=c32-convex
14.441 + os=-bsd
14.442 + ;;
14.443 + convex-c34)
14.444 + basic_machine=c34-convex
14.445 + os=-bsd
14.446 + ;;
14.447 + convex-c38)
14.448 + basic_machine=c38-convex
14.449 + os=-bsd
14.450 + ;;
14.451 + cray | j90)
14.452 + basic_machine=j90-cray
14.453 + os=-unicos
14.454 + ;;
14.455 + craynv)
14.456 + basic_machine=craynv-cray
14.457 + os=-unicosmp
14.458 + ;;
14.459 + cr16c)
14.460 + basic_machine=cr16c-unknown
14.461 + os=-elf
14.462 + ;;
14.463 + crds | unos)
14.464 + basic_machine=m68k-crds
14.465 + ;;
14.466 + crisv32 | crisv32-* | etraxfs*)
14.467 + basic_machine=crisv32-axis
14.468 + ;;
14.469 + cris | cris-* | etrax*)
14.470 + basic_machine=cris-axis
14.471 + ;;
14.472 + crx)
14.473 + basic_machine=crx-unknown
14.474 + os=-elf
14.475 + ;;
14.476 + da30 | da30-*)
14.477 + basic_machine=m68k-da30
14.478 + ;;
14.479 + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
14.480 + basic_machine=mips-dec
14.481 + ;;
14.482 + decsystem10* | dec10*)
14.483 + basic_machine=pdp10-dec
14.484 + os=-tops10
14.485 + ;;
14.486 + decsystem20* | dec20*)
14.487 + basic_machine=pdp10-dec
14.488 + os=-tops20
14.489 + ;;
14.490 + delta | 3300 | motorola-3300 | motorola-delta \
14.491 + | 3300-motorola | delta-motorola)
14.492 + basic_machine=m68k-motorola
14.493 + ;;
14.494 + delta88)
14.495 + basic_machine=m88k-motorola
14.496 + os=-sysv3
14.497 + ;;
14.498 + djgpp)
14.499 + basic_machine=i586-pc
14.500 + os=-msdosdjgpp
14.501 + ;;
14.502 + dpx20 | dpx20-*)
14.503 + basic_machine=rs6000-bull
14.504 + os=-bosx
14.505 + ;;
14.506 + dpx2* | dpx2*-bull)
14.507 + basic_machine=m68k-bull
14.508 + os=-sysv3
14.509 + ;;
14.510 + ebmon29k)
14.511 + basic_machine=a29k-amd
14.512 + os=-ebmon
14.513 + ;;
14.514 + elxsi)
14.515 + basic_machine=elxsi-elxsi
14.516 + os=-bsd
14.517 + ;;
14.518 + encore | umax | mmax)
14.519 + basic_machine=ns32k-encore
14.520 + ;;
14.521 + es1800 | OSE68k | ose68k | ose | OSE)
14.522 + basic_machine=m68k-ericsson
14.523 + os=-ose
14.524 + ;;
14.525 + fx2800)
14.526 + basic_machine=i860-alliant
14.527 + ;;
14.528 + genix)
14.529 + basic_machine=ns32k-ns
14.530 + ;;
14.531 + gmicro)
14.532 + basic_machine=tron-gmicro
14.533 + os=-sysv
14.534 + ;;
14.535 + go32)
14.536 + basic_machine=i386-pc
14.537 + os=-go32
14.538 + ;;
14.539 + h3050r* | hiux*)
14.540 + basic_machine=hppa1.1-hitachi
14.541 + os=-hiuxwe2
14.542 + ;;
14.543 + h8300hms)
14.544 + basic_machine=h8300-hitachi
14.545 + os=-hms
14.546 + ;;
14.547 + h8300xray)
14.548 + basic_machine=h8300-hitachi
14.549 + os=-xray
14.550 + ;;
14.551 + h8500hms)
14.552 + basic_machine=h8500-hitachi
14.553 + os=-hms
14.554 + ;;
14.555 + harris)
14.556 + basic_machine=m88k-harris
14.557 + os=-sysv3
14.558 + ;;
14.559 + hp300-*)
14.560 + basic_machine=m68k-hp
14.561 + ;;
14.562 + hp300bsd)
14.563 + basic_machine=m68k-hp
14.564 + os=-bsd
14.565 + ;;
14.566 + hp300hpux)
14.567 + basic_machine=m68k-hp
14.568 + os=-hpux
14.569 + ;;
14.570 + hp3k9[0-9][0-9] | hp9[0-9][0-9])
14.571 + basic_machine=hppa1.0-hp
14.572 + ;;
14.573 + hp9k2[0-9][0-9] | hp9k31[0-9])
14.574 + basic_machine=m68000-hp
14.575 + ;;
14.576 + hp9k3[2-9][0-9])
14.577 + basic_machine=m68k-hp
14.578 + ;;
14.579 + hp9k6[0-9][0-9] | hp6[0-9][0-9])
14.580 + basic_machine=hppa1.0-hp
14.581 + ;;
14.582 + hp9k7[0-79][0-9] | hp7[0-79][0-9])
14.583 + basic_machine=hppa1.1-hp
14.584 + ;;
14.585 + hp9k78[0-9] | hp78[0-9])
14.586 + # FIXME: really hppa2.0-hp
14.587 + basic_machine=hppa1.1-hp
14.588 + ;;
14.589 + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
14.590 + # FIXME: really hppa2.0-hp
14.591 + basic_machine=hppa1.1-hp
14.592 + ;;
14.593 + hp9k8[0-9][13679] | hp8[0-9][13679])
14.594 + basic_machine=hppa1.1-hp
14.595 + ;;
14.596 + hp9k8[0-9][0-9] | hp8[0-9][0-9])
14.597 + basic_machine=hppa1.0-hp
14.598 + ;;
14.599 + hppa-next)
14.600 + os=-nextstep3
14.601 + ;;
14.602 + hppaosf)
14.603 + basic_machine=hppa1.1-hp
14.604 + os=-osf
14.605 + ;;
14.606 + hppro)
14.607 + basic_machine=hppa1.1-hp
14.608 + os=-proelf
14.609 + ;;
14.610 + i370-ibm* | ibm*)
14.611 + basic_machine=i370-ibm
14.612 + ;;
14.613 +# I'm not sure what "Sysv32" means. Should this be sysv3.2?
14.614 + i*86v32)
14.615 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
14.616 + os=-sysv32
14.617 + ;;
14.618 + i*86v4*)
14.619 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
14.620 + os=-sysv4
14.621 + ;;
14.622 + i*86v)
14.623 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
14.624 + os=-sysv
14.625 + ;;
14.626 + i*86sol2)
14.627 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
14.628 + os=-solaris2
14.629 + ;;
14.630 + i386mach)
14.631 + basic_machine=i386-mach
14.632 + os=-mach
14.633 + ;;
14.634 + i386-vsta | vsta)
14.635 + basic_machine=i386-unknown
14.636 + os=-vsta
14.637 + ;;
14.638 + iris | iris4d)
14.639 + basic_machine=mips-sgi
14.640 + case $os in
14.641 + -irix*)
14.642 + ;;
14.643 + *)
14.644 + os=-irix4
14.645 + ;;
14.646 + esac
14.647 + ;;
14.648 + isi68 | isi)
14.649 + basic_machine=m68k-isi
14.650 + os=-sysv
14.651 + ;;
14.652 + m88k-omron*)
14.653 + basic_machine=m88k-omron
14.654 + ;;
14.655 + magnum | m3230)
14.656 + basic_machine=mips-mips
14.657 + os=-sysv
14.658 + ;;
14.659 + merlin)
14.660 + basic_machine=ns32k-utek
14.661 + os=-sysv
14.662 + ;;
14.663 + mingw32)
14.664 + basic_machine=i386-pc
14.665 + os=-mingw32
14.666 + ;;
14.667 + miniframe)
14.668 + basic_machine=m68000-convergent
14.669 + ;;
14.670 + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
14.671 + basic_machine=m68k-atari
14.672 + os=-mint
14.673 + ;;
14.674 + mips3*-*)
14.675 + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
14.676 + ;;
14.677 + mips3*)
14.678 + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
14.679 + ;;
14.680 + monitor)
14.681 + basic_machine=m68k-rom68k
14.682 + os=-coff
14.683 + ;;
14.684 + morphos)
14.685 + basic_machine=powerpc-unknown
14.686 + os=-morphos
14.687 + ;;
14.688 + msdos)
14.689 + basic_machine=i386-pc
14.690 + os=-msdos
14.691 + ;;
14.692 + mvs)
14.693 + basic_machine=i370-ibm
14.694 + os=-mvs
14.695 + ;;
14.696 + ncr3000)
14.697 + basic_machine=i486-ncr
14.698 + os=-sysv4
14.699 + ;;
14.700 + netbsd386)
14.701 + basic_machine=i386-unknown
14.702 + os=-netbsd
14.703 + ;;
14.704 + netwinder)
14.705 + basic_machine=armv4l-rebel
14.706 + os=-linux
14.707 + ;;
14.708 + news | news700 | news800 | news900)
14.709 + basic_machine=m68k-sony
14.710 + os=-newsos
14.711 + ;;
14.712 + news1000)
14.713 + basic_machine=m68030-sony
14.714 + os=-newsos
14.715 + ;;
14.716 + news-3600 | risc-news)
14.717 + basic_machine=mips-sony
14.718 + os=-newsos
14.719 + ;;
14.720 + necv70)
14.721 + basic_machine=v70-nec
14.722 + os=-sysv
14.723 + ;;
14.724 + next | m*-next )
14.725 + basic_machine=m68k-next
14.726 + case $os in
14.727 + -nextstep* )
14.728 + ;;
14.729 + -ns2*)
14.730 + os=-nextstep2
14.731 + ;;
14.732 + *)
14.733 + os=-nextstep3
14.734 + ;;
14.735 + esac
14.736 + ;;
14.737 + nh3000)
14.738 + basic_machine=m68k-harris
14.739 + os=-cxux
14.740 + ;;
14.741 + nh[45]000)
14.742 + basic_machine=m88k-harris
14.743 + os=-cxux
14.744 + ;;
14.745 + nindy960)
14.746 + basic_machine=i960-intel
14.747 + os=-nindy
14.748 + ;;
14.749 + mon960)
14.750 + basic_machine=i960-intel
14.751 + os=-mon960
14.752 + ;;
14.753 + nonstopux)
14.754 + basic_machine=mips-compaq
14.755 + os=-nonstopux
14.756 + ;;
14.757 + np1)
14.758 + basic_machine=np1-gould
14.759 + ;;
14.760 + nsr-tandem)
14.761 + basic_machine=nsr-tandem
14.762 + ;;
14.763 + op50n-* | op60c-*)
14.764 + basic_machine=hppa1.1-oki
14.765 + os=-proelf
14.766 + ;;
14.767 + or32 | or32-*)
14.768 + basic_machine=or32-unknown
14.769 + os=-coff
14.770 + ;;
14.771 + os400)
14.772 + basic_machine=powerpc-ibm
14.773 + os=-os400
14.774 + ;;
14.775 + OSE68000 | ose68000)
14.776 + basic_machine=m68000-ericsson
14.777 + os=-ose
14.778 + ;;
14.779 + os68k)
14.780 + basic_machine=m68k-none
14.781 + os=-os68k
14.782 + ;;
14.783 + pa-hitachi)
14.784 + basic_machine=hppa1.1-hitachi
14.785 + os=-hiuxwe2
14.786 + ;;
14.787 + paragon)
14.788 + basic_machine=i860-intel
14.789 + os=-osf
14.790 + ;;
14.791 + pbd)
14.792 + basic_machine=sparc-tti
14.793 + ;;
14.794 + pbb)
14.795 + basic_machine=m68k-tti
14.796 + ;;
14.797 + pc532 | pc532-*)
14.798 + basic_machine=ns32k-pc532
14.799 + ;;
14.800 + pentium | p5 | k5 | k6 | nexgen | viac3)
14.801 + basic_machine=i586-pc
14.802 + ;;
14.803 + pentiumpro | p6 | 6x86 | athlon | athlon_*)
14.804 + basic_machine=i686-pc
14.805 + ;;
14.806 + pentiumii | pentium2 | pentiumiii | pentium3)
14.807 + basic_machine=i686-pc
14.808 + ;;
14.809 + pentium4)
14.810 + basic_machine=i786-pc
14.811 + ;;
14.812 + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
14.813 + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
14.814 + ;;
14.815 + pentiumpro-* | p6-* | 6x86-* | athlon-*)
14.816 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
14.817 + ;;
14.818 + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
14.819 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
14.820 + ;;
14.821 + pentium4-*)
14.822 + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
14.823 + ;;
14.824 + pn)
14.825 + basic_machine=pn-gould
14.826 + ;;
14.827 + power) basic_machine=power-ibm
14.828 + ;;
14.829 + ppc) basic_machine=powerpc-unknown
14.830 + ;;
14.831 + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
14.832 + ;;
14.833 + ppcle | powerpclittle | ppc-le | powerpc-little)
14.834 + basic_machine=powerpcle-unknown
14.835 + ;;
14.836 + ppcle-* | powerpclittle-*)
14.837 + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
14.838 + ;;
14.839 + ppc64) basic_machine=powerpc64-unknown
14.840 + ;;
14.841 + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
14.842 + ;;
14.843 + ppc64le | powerpc64little | ppc64-le | powerpc64-little)
14.844 + basic_machine=powerpc64le-unknown
14.845 + ;;
14.846 + ppc64le-* | powerpc64little-*)
14.847 + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
14.848 + ;;
14.849 + ps2)
14.850 + basic_machine=i386-ibm
14.851 + ;;
14.852 + pw32)
14.853 + basic_machine=i586-unknown
14.854 + os=-pw32
14.855 + ;;
14.856 + rom68k)
14.857 + basic_machine=m68k-rom68k
14.858 + os=-coff
14.859 + ;;
14.860 + rm[46]00)
14.861 + basic_machine=mips-siemens
14.862 + ;;
14.863 + rtpc | rtpc-*)
14.864 + basic_machine=romp-ibm
14.865 + ;;
14.866 + s390 | s390-*)
14.867 + basic_machine=s390-ibm
14.868 + ;;
14.869 + s390x | s390x-*)
14.870 + basic_machine=s390x-ibm
14.871 + ;;
14.872 + sa29200)
14.873 + basic_machine=a29k-amd
14.874 + os=-udi
14.875 + ;;
14.876 + sb1)
14.877 + basic_machine=mipsisa64sb1-unknown
14.878 + ;;
14.879 + sb1el)
14.880 + basic_machine=mipsisa64sb1el-unknown
14.881 + ;;
14.882 + sei)
14.883 + basic_machine=mips-sei
14.884 + os=-seiux
14.885 + ;;
14.886 + sequent)
14.887 + basic_machine=i386-sequent
14.888 + ;;
14.889 + sh)
14.890 + basic_machine=sh-hitachi
14.891 + os=-hms
14.892 + ;;
14.893 + sh64)
14.894 + basic_machine=sh64-unknown
14.895 + ;;
14.896 + sparclite-wrs | simso-wrs)
14.897 + basic_machine=sparclite-wrs
14.898 + os=-vxworks
14.899 + ;;
14.900 + sps7)
14.901 + basic_machine=m68k-bull
14.902 + os=-sysv2
14.903 + ;;
14.904 + spur)
14.905 + basic_machine=spur-unknown
14.906 + ;;
14.907 + st2000)
14.908 + basic_machine=m68k-tandem
14.909 + ;;
14.910 + stratus)
14.911 + basic_machine=i860-stratus
14.912 + os=-sysv4
14.913 + ;;
14.914 + sun2)
14.915 + basic_machine=m68000-sun
14.916 + ;;
14.917 + sun2os3)
14.918 + basic_machine=m68000-sun
14.919 + os=-sunos3
14.920 + ;;
14.921 + sun2os4)
14.922 + basic_machine=m68000-sun
14.923 + os=-sunos4
14.924 + ;;
14.925 + sun3os3)
14.926 + basic_machine=m68k-sun
14.927 + os=-sunos3
14.928 + ;;
14.929 + sun3os4)
14.930 + basic_machine=m68k-sun
14.931 + os=-sunos4
14.932 + ;;
14.933 + sun4os3)
14.934 + basic_machine=sparc-sun
14.935 + os=-sunos3
14.936 + ;;
14.937 + sun4os4)
14.938 + basic_machine=sparc-sun
14.939 + os=-sunos4
14.940 + ;;
14.941 + sun4sol2)
14.942 + basic_machine=sparc-sun
14.943 + os=-solaris2
14.944 + ;;
14.945 + sun3 | sun3-*)
14.946 + basic_machine=m68k-sun
14.947 + ;;
14.948 + sun4)
14.949 + basic_machine=sparc-sun
14.950 + ;;
14.951 + sun386 | sun386i | roadrunner)
14.952 + basic_machine=i386-sun
14.953 + ;;
14.954 + sv1)
14.955 + basic_machine=sv1-cray
14.956 + os=-unicos
14.957 + ;;
14.958 + symmetry)
14.959 + basic_machine=i386-sequent
14.960 + os=-dynix
14.961 + ;;
14.962 + t3e)
14.963 + basic_machine=alphaev5-cray
14.964 + os=-unicos
14.965 + ;;
14.966 + t90)
14.967 + basic_machine=t90-cray
14.968 + os=-unicos
14.969 + ;;
14.970 + tic54x | c54x*)
14.971 + basic_machine=tic54x-unknown
14.972 + os=-coff
14.973 + ;;
14.974 + tic55x | c55x*)
14.975 + basic_machine=tic55x-unknown
14.976 + os=-coff
14.977 + ;;
14.978 + tic6x | c6x*)
14.979 + basic_machine=tic6x-unknown
14.980 + os=-coff
14.981 + ;;
14.982 + tx39)
14.983 + basic_machine=mipstx39-unknown
14.984 + ;;
14.985 + tx39el)
14.986 + basic_machine=mipstx39el-unknown
14.987 + ;;
14.988 + toad1)
14.989 + basic_machine=pdp10-xkl
14.990 + os=-tops20
14.991 + ;;
14.992 + tower | tower-32)
14.993 + basic_machine=m68k-ncr
14.994 + ;;
14.995 + tpf)
14.996 + basic_machine=s390x-ibm
14.997 + os=-tpf
14.998 + ;;
14.999 + udi29k)
14.1000 + basic_machine=a29k-amd
14.1001 + os=-udi
14.1002 + ;;
14.1003 + ultra3)
14.1004 + basic_machine=a29k-nyu
14.1005 + os=-sym1
14.1006 + ;;
14.1007 + v810 | necv810)
14.1008 + basic_machine=v810-nec
14.1009 + os=-none
14.1010 + ;;
14.1011 + vaxv)
14.1012 + basic_machine=vax-dec
14.1013 + os=-sysv
14.1014 + ;;
14.1015 + vms)
14.1016 + basic_machine=vax-dec
14.1017 + os=-vms
14.1018 + ;;
14.1019 + vpp*|vx|vx-*)
14.1020 + basic_machine=f301-fujitsu
14.1021 + ;;
14.1022 + vxworks960)
14.1023 + basic_machine=i960-wrs
14.1024 + os=-vxworks
14.1025 + ;;
14.1026 + vxworks68)
14.1027 + basic_machine=m68k-wrs
14.1028 + os=-vxworks
14.1029 + ;;
14.1030 + vxworks29k)
14.1031 + basic_machine=a29k-wrs
14.1032 + os=-vxworks
14.1033 + ;;
14.1034 + w65*)
14.1035 + basic_machine=w65-wdc
14.1036 + os=-none
14.1037 + ;;
14.1038 + w89k-*)
14.1039 + basic_machine=hppa1.1-winbond
14.1040 + os=-proelf
14.1041 + ;;
14.1042 + xbox)
14.1043 + basic_machine=i686-pc
14.1044 + os=-mingw32
14.1045 + ;;
14.1046 + xps | xps100)
14.1047 + basic_machine=xps100-honeywell
14.1048 + ;;
14.1049 + ymp)
14.1050 + basic_machine=ymp-cray
14.1051 + os=-unicos
14.1052 + ;;
14.1053 + z8k-*-coff)
14.1054 + basic_machine=z8k-unknown
14.1055 + os=-sim
14.1056 + ;;
14.1057 + none)
14.1058 + basic_machine=none-none
14.1059 + os=-none
14.1060 + ;;
14.1061 +
14.1062 +# Here we handle the default manufacturer of certain CPU types. It is in
14.1063 +# some cases the only manufacturer, in others, it is the most popular.
14.1064 + w89k)
14.1065 + basic_machine=hppa1.1-winbond
14.1066 + ;;
14.1067 + op50n)
14.1068 + basic_machine=hppa1.1-oki
14.1069 + ;;
14.1070 + op60c)
14.1071 + basic_machine=hppa1.1-oki
14.1072 + ;;
14.1073 + romp)
14.1074 + basic_machine=romp-ibm
14.1075 + ;;
14.1076 + mmix)
14.1077 + basic_machine=mmix-knuth
14.1078 + ;;
14.1079 + rs6000)
14.1080 + basic_machine=rs6000-ibm
14.1081 + ;;
14.1082 + vax)
14.1083 + basic_machine=vax-dec
14.1084 + ;;
14.1085 + pdp10)
14.1086 + # there are many clones, so DEC is not a safe bet
14.1087 + basic_machine=pdp10-unknown
14.1088 + ;;
14.1089 + pdp11)
14.1090 + basic_machine=pdp11-dec
14.1091 + ;;
14.1092 + we32k)
14.1093 + basic_machine=we32k-att
14.1094 + ;;
14.1095 + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
14.1096 + basic_machine=sh-unknown
14.1097 + ;;
14.1098 + sh64)
14.1099 + basic_machine=sh64-unknown
14.1100 + ;;
14.1101 + sparc | sparcv8 | sparcv9 | sparcv9b)
14.1102 + basic_machine=sparc-sun
14.1103 + ;;
14.1104 + cydra)
14.1105 + basic_machine=cydra-cydrome
14.1106 + ;;
14.1107 + orion)
14.1108 + basic_machine=orion-highlevel
14.1109 + ;;
14.1110 + orion105)
14.1111 + basic_machine=clipper-highlevel
14.1112 + ;;
14.1113 + mac | mpw | mac-mpw)
14.1114 + basic_machine=m68k-apple
14.1115 + ;;
14.1116 + pmac | pmac-mpw)
14.1117 + basic_machine=powerpc-apple
14.1118 + ;;
14.1119 + *-unknown)
14.1120 + # Make sure to match an already-canonicalized machine name.
14.1121 + ;;
14.1122 + *)
14.1123 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
14.1124 + exit 1
14.1125 + ;;
14.1126 +esac
14.1127 +
14.1128 +# Here we canonicalize certain aliases for manufacturers.
14.1129 +case $basic_machine in
14.1130 + *-digital*)
14.1131 + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
14.1132 + ;;
14.1133 + *-commodore*)
14.1134 + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
14.1135 + ;;
14.1136 + *)
14.1137 + ;;
14.1138 +esac
14.1139 +
14.1140 +# Decode manufacturer-specific aliases for certain operating systems.
14.1141 +
14.1142 +if [ x"$os" != x"" ]
14.1143 +then
14.1144 +case $os in
14.1145 + # First match some system type aliases
14.1146 + # that might get confused with valid system types.
14.1147 + # -solaris* is a basic system type, with this one exception.
14.1148 + -solaris1 | -solaris1.*)
14.1149 + os=`echo $os | sed -e 's|solaris1|sunos4|'`
14.1150 + ;;
14.1151 + -solaris)
14.1152 + os=-solaris2
14.1153 + ;;
14.1154 + -svr4*)
14.1155 + os=-sysv4
14.1156 + ;;
14.1157 + -unixware*)
14.1158 + os=-sysv4.2uw
14.1159 + ;;
14.1160 + -gnu/linux*)
14.1161 + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
14.1162 + ;;
14.1163 + # First accept the basic system types.
14.1164 + # The portable systems comes first.
14.1165 + # Each alternative MUST END IN A *, to match a version number.
14.1166 + # -sysv* is not here because it comes later, after sysvr4.
14.1167 + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
14.1168 + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
14.1169 + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
14.1170 + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
14.1171 + | -aos* \
14.1172 + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
14.1173 + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
14.1174 + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
14.1175 + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
14.1176 + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
14.1177 + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
14.1178 + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
14.1179 + | -chorusos* | -chorusrdb* \
14.1180 + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
14.1181 + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
14.1182 + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
14.1183 + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
14.1184 + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
14.1185 + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
14.1186 + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
14.1187 + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
14.1188 + # Remember, each alternative MUST END IN *, to match a version number.
14.1189 + ;;
14.1190 + -qnx*)
14.1191 + case $basic_machine in
14.1192 + x86-* | i*86-*)
14.1193 + ;;
14.1194 + *)
14.1195 + os=-nto$os
14.1196 + ;;
14.1197 + esac
14.1198 + ;;
14.1199 + -nto-qnx*)
14.1200 + ;;
14.1201 + -nto*)
14.1202 + os=`echo $os | sed -e 's|nto|nto-qnx|'`
14.1203 + ;;
14.1204 + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
14.1205 + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
14.1206 + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
14.1207 + ;;
14.1208 + -mac*)
14.1209 + os=`echo $os | sed -e 's|mac|macos|'`
14.1210 + ;;
14.1211 + -linux-dietlibc)
14.1212 + os=-linux-dietlibc
14.1213 + ;;
14.1214 + -linux*)
14.1215 + os=`echo $os | sed -e 's|linux|linux-gnu|'`
14.1216 + ;;
14.1217 + -sunos5*)
14.1218 + os=`echo $os | sed -e 's|sunos5|solaris2|'`
14.1219 + ;;
14.1220 + -sunos6*)
14.1221 + os=`echo $os | sed -e 's|sunos6|solaris3|'`
14.1222 + ;;
14.1223 + -opened*)
14.1224 + os=-openedition
14.1225 + ;;
14.1226 + -os400*)
14.1227 + os=-os400
14.1228 + ;;
14.1229 + -wince*)
14.1230 + os=-wince
14.1231 + ;;
14.1232 + -osfrose*)
14.1233 + os=-osfrose
14.1234 + ;;
14.1235 + -osf*)
14.1236 + os=-osf
14.1237 + ;;
14.1238 + -utek*)
14.1239 + os=-bsd
14.1240 + ;;
14.1241 + -dynix*)
14.1242 + os=-bsd
14.1243 + ;;
14.1244 + -acis*)
14.1245 + os=-aos
14.1246 + ;;
14.1247 + -atheos*)
14.1248 + os=-atheos
14.1249 + ;;
14.1250 + -syllable*)
14.1251 + os=-syllable
14.1252 + ;;
14.1253 + -386bsd)
14.1254 + os=-bsd
14.1255 + ;;
14.1256 + -ctix* | -uts*)
14.1257 + os=-sysv
14.1258 + ;;
14.1259 + -nova*)
14.1260 + os=-rtmk-nova
14.1261 + ;;
14.1262 + -ns2 )
14.1263 + os=-nextstep2
14.1264 + ;;
14.1265 + -nsk*)
14.1266 + os=-nsk
14.1267 + ;;
14.1268 + # Preserve the version number of sinix5.
14.1269 + -sinix5.*)
14.1270 + os=`echo $os | sed -e 's|sinix|sysv|'`
14.1271 + ;;
14.1272 + -sinix*)
14.1273 + os=-sysv4
14.1274 + ;;
14.1275 + -tpf*)
14.1276 + os=-tpf
14.1277 + ;;
14.1278 + -triton*)
14.1279 + os=-sysv3
14.1280 + ;;
14.1281 + -oss*)
14.1282 + os=-sysv3
14.1283 + ;;
14.1284 + -svr4)
14.1285 + os=-sysv4
14.1286 + ;;
14.1287 + -svr3)
14.1288 + os=-sysv3
14.1289 + ;;
14.1290 + -sysvr4)
14.1291 + os=-sysv4
14.1292 + ;;
14.1293 + # This must come after -sysvr4.
14.1294 + -sysv*)
14.1295 + ;;
14.1296 + -ose*)
14.1297 + os=-ose
14.1298 + ;;
14.1299 + -es1800*)
14.1300 + os=-ose
14.1301 + ;;
14.1302 + -xenix)
14.1303 + os=-xenix
14.1304 + ;;
14.1305 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
14.1306 + os=-mint
14.1307 + ;;
14.1308 + -aros*)
14.1309 + os=-aros
14.1310 + ;;
14.1311 + -kaos*)
14.1312 + os=-kaos
14.1313 + ;;
14.1314 + -zvmoe)
14.1315 + os=-zvmoe
14.1316 + ;;
14.1317 + -none)
14.1318 + ;;
14.1319 + *)
14.1320 + # Get rid of the `-' at the beginning of $os.
14.1321 + os=`echo $os | sed 's/[^-]*-//'`
14.1322 + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
14.1323 + exit 1
14.1324 + ;;
14.1325 +esac
14.1326 +else
14.1327 +
14.1328 +# Here we handle the default operating systems that come with various machines.
14.1329 +# The value should be what the vendor currently ships out the door with their
14.1330 +# machine or put another way, the most popular os provided with the machine.
14.1331 +
14.1332 +# Note that if you're going to try to match "-MANUFACTURER" here (say,
14.1333 +# "-sun"), then you have to tell the case statement up towards the top
14.1334 +# that MANUFACTURER isn't an operating system. Otherwise, code above
14.1335 +# will signal an error saying that MANUFACTURER isn't an operating
14.1336 +# system, and we'll never get to this point.
14.1337 +
14.1338 +case $basic_machine in
14.1339 + *-acorn)
14.1340 + os=-riscix1.2
14.1341 + ;;
14.1342 + arm*-rebel)
14.1343 + os=-linux
14.1344 + ;;
14.1345 + arm*-semi)
14.1346 + os=-aout
14.1347 + ;;
14.1348 + c4x-* | tic4x-*)
14.1349 + os=-coff
14.1350 + ;;
14.1351 + # This must come before the *-dec entry.
14.1352 + pdp10-*)
14.1353 + os=-tops20
14.1354 + ;;
14.1355 + pdp11-*)
14.1356 + os=-none
14.1357 + ;;
14.1358 + *-dec | vax-*)
14.1359 + os=-ultrix4.2
14.1360 + ;;
14.1361 + m68*-apollo)
14.1362 + os=-domain
14.1363 + ;;
14.1364 + i386-sun)
14.1365 + os=-sunos4.0.2
14.1366 + ;;
14.1367 + m68000-sun)
14.1368 + os=-sunos3
14.1369 + # This also exists in the configure program, but was not the
14.1370 + # default.
14.1371 + # os=-sunos4
14.1372 + ;;
14.1373 + m68*-cisco)
14.1374 + os=-aout
14.1375 + ;;
14.1376 + mips*-cisco)
14.1377 + os=-elf
14.1378 + ;;
14.1379 + mips*-*)
14.1380 + os=-elf
14.1381 + ;;
14.1382 + or32-*)
14.1383 + os=-coff
14.1384 + ;;
14.1385 + *-tti) # must be before sparc entry or we get the wrong os.
14.1386 + os=-sysv3
14.1387 + ;;
14.1388 + sparc-* | *-sun)
14.1389 + os=-sunos4.1.1
14.1390 + ;;
14.1391 + *-be)
14.1392 + os=-beos
14.1393 + ;;
14.1394 + *-ibm)
14.1395 + os=-aix
14.1396 + ;;
14.1397 + *-knuth)
14.1398 + os=-mmixware
14.1399 + ;;
14.1400 + *-wec)
14.1401 + os=-proelf
14.1402 + ;;
14.1403 + *-winbond)
14.1404 + os=-proelf
14.1405 + ;;
14.1406 + *-oki)
14.1407 + os=-proelf
14.1408 + ;;
14.1409 + *-hp)
14.1410 + os=-hpux
14.1411 + ;;
14.1412 + *-hitachi)
14.1413 + os=-hiux
14.1414 + ;;
14.1415 + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
14.1416 + os=-sysv
14.1417 + ;;
14.1418 + *-cbm)
14.1419 + os=-amigaos
14.1420 + ;;
14.1421 + *-dg)
14.1422 + os=-dgux
14.1423 + ;;
14.1424 + *-dolphin)
14.1425 + os=-sysv3
14.1426 + ;;
14.1427 + m68k-ccur)
14.1428 + os=-rtu
14.1429 + ;;
14.1430 + m88k-omron*)
14.1431 + os=-luna
14.1432 + ;;
14.1433 + *-next )
14.1434 + os=-nextstep
14.1435 + ;;
14.1436 + *-sequent)
14.1437 + os=-ptx
14.1438 + ;;
14.1439 + *-crds)
14.1440 + os=-unos
14.1441 + ;;
14.1442 + *-ns)
14.1443 + os=-genix
14.1444 + ;;
14.1445 + i370-*)
14.1446 + os=-mvs
14.1447 + ;;
14.1448 + *-next)
14.1449 + os=-nextstep3
14.1450 + ;;
14.1451 + *-gould)
14.1452 + os=-sysv
14.1453 + ;;
14.1454 + *-highlevel)
14.1455 + os=-bsd
14.1456 + ;;
14.1457 + *-encore)
14.1458 + os=-bsd
14.1459 + ;;
14.1460 + *-sgi)
14.1461 + os=-irix
14.1462 + ;;
14.1463 + *-siemens)
14.1464 + os=-sysv4
14.1465 + ;;
14.1466 + *-masscomp)
14.1467 + os=-rtu
14.1468 + ;;
14.1469 + f30[01]-fujitsu | f700-fujitsu)
14.1470 + os=-uxpv
14.1471 + ;;
14.1472 + *-rom68k)
14.1473 + os=-coff
14.1474 + ;;
14.1475 + *-*bug)
14.1476 + os=-coff
14.1477 + ;;
14.1478 + *-apple)
14.1479 + os=-macos
14.1480 + ;;
14.1481 + *-atari*)
14.1482 + os=-mint
14.1483 + ;;
14.1484 + *)
14.1485 + os=-none
14.1486 + ;;
14.1487 +esac
14.1488 +fi
14.1489 +
14.1490 +# Here we handle the case where we know the os, and the CPU type, but not the
14.1491 +# manufacturer. We pick the logical manufacturer.
14.1492 +vendor=unknown
14.1493 +case $basic_machine in
14.1494 + *-unknown)
14.1495 + case $os in
14.1496 + -riscix*)
14.1497 + vendor=acorn
14.1498 + ;;
14.1499 + -sunos*)
14.1500 + vendor=sun
14.1501 + ;;
14.1502 + -aix*)
14.1503 + vendor=ibm
14.1504 + ;;
14.1505 + -beos*)
14.1506 + vendor=be
14.1507 + ;;
14.1508 + -hpux*)
14.1509 + vendor=hp
14.1510 + ;;
14.1511 + -mpeix*)
14.1512 + vendor=hp
14.1513 + ;;
14.1514 + -hiux*)
14.1515 + vendor=hitachi
14.1516 + ;;
14.1517 + -unos*)
14.1518 + vendor=crds
14.1519 + ;;
14.1520 + -dgux*)
14.1521 + vendor=dg
14.1522 + ;;
14.1523 + -luna*)
14.1524 + vendor=omron
14.1525 + ;;
14.1526 + -genix*)
14.1527 + vendor=ns
14.1528 + ;;
14.1529 + -mvs* | -opened*)
14.1530 + vendor=ibm
14.1531 + ;;
14.1532 + -os400*)
14.1533 + vendor=ibm
14.1534 + ;;
14.1535 + -ptx*)
14.1536 + vendor=sequent
14.1537 + ;;
14.1538 + -tpf*)
14.1539 + vendor=ibm
14.1540 + ;;
14.1541 + -vxsim* | -vxworks* | -windiss*)
14.1542 + vendor=wrs
14.1543 + ;;
14.1544 + -aux*)
14.1545 + vendor=apple
14.1546 + ;;
14.1547 + -hms*)
14.1548 + vendor=hitachi
14.1549 + ;;
14.1550 + -mpw* | -macos*)
14.1551 + vendor=apple
14.1552 + ;;
14.1553 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
14.1554 + vendor=atari
14.1555 + ;;
14.1556 + -vos*)
14.1557 + vendor=stratus
14.1558 + ;;
14.1559 + esac
14.1560 + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
14.1561 + ;;
14.1562 +esac
14.1563 +
14.1564 +echo $basic_machine$os
14.1565 +exit 0
14.1566 +
14.1567 +# Local variables:
14.1568 +# eval: (add-hook 'write-file-hooks 'time-stamp)
14.1569 +# time-stamp-start: "timestamp='"
14.1570 +# time-stamp-format: "%:y-%02m-%02d"
14.1571 +# time-stamp-end: "'"
14.1572 +# End:
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
15.2 +++ b/mythtv_plugin/configure.ac Wed Sep 20 23:59:48 2006 +0100
15.3 @@ -0,0 +1,170 @@
15.4 +# -*- Autoconf -*-
15.5 +# Process this file with autoconf to produce a configure script.
15.6 +
15.7 +AC_PREREQ(2.50)
15.8 +
15.9 +AC_INIT([mythtvsrc],[0.1])
15.10 +
15.11 +dnl AC_CONFIG_SRCDIR([src/mmyth_main.c])
15.12 +AC_CONFIG_HEADER(config.h)
15.13 +
15.14 +dnl when going to/from release please set the nano (fourth number) right !
15.15 +dnl releases only do Wall, SVN and prerelease does Werror too
15.16 +AS_VERSION(mythtvsrc, MYTHTVSRC, 0, 1, 0, 3, MYTHTVSRC_SVN="no", MYTHTVSRC_SVN="yes")
15.17 +
15.18 +MYTHTVSRC_MAJORMINOR=$MYTHTVSRC_MAJOR_VERSION.$MYTHTVSRC_MINOR_VERSION
15.19 +
15.20 +AC_SUBST(MYTHTVSRC_MAJORMINOR)
15.21 +
15.22 +dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
15.23 +AM_MAINTAINER_MODE
15.24 +dnl make aclocal work in maintainer mode
15.25 +AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
15.26 +
15.27 +# Checks for programs.
15.28 +# check for tools
15.29 +# Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
15.30 +CFLAGS="$CFLAGS -Wall"
15.31 +AC_PROG_CC
15.32 +AC_PROG_LIBTOOL
15.33 +# Checks for libraries.
15.34 +
15.35 +# Checks for header files.
15.36 +AC_HEADER_STDC
15.37 +AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
15.38 +
15.39 +# Checks for typedefs, structures, and compiler characteristics.
15.40 +AC_C_CONST
15.41 +AC_TYPE_PID_T
15.42 +AC_STRUCT_TM
15.43 +
15.44 +# Checks for library functions.
15.45 +AC_FUNC_FORK
15.46 +AC_PROG_GCC_TRADITIONAL
15.47 +AC_FUNC_MALLOC
15.48 +AC_FUNC_MKTIME
15.49 +AC_FUNC_VPRINTF
15.50 +AC_CHECK_FUNCS([memset socket stime strstr strtoul])
15.51 +
15.52 +AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
15.53 +
15.54 +# Checks required packages
15.55 +
15.56 +dnl Test if --disable-debug given
15.57 +AC_ARG_ENABLE(debug,
15.58 + [AC_HELP_STRING([--disable-debug], [disable debugging mode])],
15.59 + enable_debug="$enableval",
15.60 + enable_debug=yes)
15.61 +
15.62 +if test "x$enable_debug" = "xyes" ; then
15.63 + CFLAGS="$CFLAGS -g"
15.64 +else
15.65 + AC_DEFINE( NDEBUG, 1, [disable debug messages] )
15.66 + CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS -DNDEBUG"
15.67 +fi
15.68 +
15.69 +AM_CONDITIONAL( NDEBUG, test "x$enable_debug" = "xyes" )
15.70 +
15.71 +# Check for pkgconfig
15.72 +AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
15.73 +# Give error and exit if we don't have pkgconfig
15.74 +if test "x$HAVE_PKGCONFIG" = "xno"; then
15.75 + AC_MSG_ERROR(you need to have pkgconfig installed !)
15.76 +fi
15.77 +
15.78 +# Check for Glib2.0
15.79 +PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
15.80 +
15.81 +# Give error and exit if we don't have glib
15.82 +if test "x$HAVE_GLIB" = "xno"; then
15.83 + AC_MSG_ERROR(you need glib-2.0 installed)
15.84 +fi
15.85 +
15.86 +# make GLIB_CFLAGS and GLIB_LIBS available
15.87 +AC_SUBST(GLIB_CFLAGS)
15.88 +AC_SUBST(GLIB_LIBS)
15.89 +
15.90 +# Check for GObject2.0
15.91 +PKG_CHECK_MODULES(GOBJECT,
15.92 + gobject-2.0,
15.93 + HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
15.94 +
15.95 +# Give error and exit if we don't have gobject
15.96 +if test "x$HAVE_GOBJECT" = "xno"; then
15.97 + AC_MSG_ERROR(you need gobject-2.0 installed)
15.98 +fi
15.99 +
15.100 +# make GOBJECT_CFLAGS and GOBJECT_LIBS available
15.101 +AC_SUBST(GOBJECT_CFLAGS)
15.102 +AC_SUBST(GOBJECT_LIBS)
15.103 +
15.104 +dnl ========== Check for Hildon Libraries
15.105 +PKG_CHECK_MODULES(HILDON,
15.106 + hildon-lgpl libosso hildon-status-bar-lib libhildonmenu hildon-base-lib hildon-control-panel hildon-libs,
15.107 + HAVE_HILDON=yes, HAVE_HILDON=no)
15.108 +
15.109 +if test "x$HAVE_HILDON" = "xyes"; then
15.110 + AC_DEFINE(MAEMO_PLATFORM, 1, [build with hildon libs])
15.111 + HILDON_CFLAGS="$HILDON_CFLAGS -DMAEMO_PLATFORM=1"
15.112 +else
15.113 + AC_MSG_RESULT(no)
15.114 +fi
15.115 +
15.116 +AM_CONDITIONAL(MAEMO_PLATFORM, test "x$HAVE_HILDON" = "xyes")
15.117 +
15.118 +dnl make HILDON_CFLAGS and HILDON_LIBS available
15.119 +AC_SUBST(HILDON_CFLAGS)
15.120 +AC_SUBST(HILDON_LIBS)
15.121 +
15.122 +dnl *** MythTV ***
15.123 +PKG_CHECK_MODULES(GMYTH,
15.124 + gmyth-0.1,
15.125 + HAVE_GMYTH=yes, HAVE_GMYTH=no)
15.126 +
15.127 +# Give error and exit if we don't have gobject
15.128 +if test "x$HAVE_GMYTH" = "xno"; then
15.129 + AC_MSG_ERROR(you need gmyth-0.1 must to be installed)
15.130 +fi
15.131 +
15.132 +# make GMYTH_CFLAGS and GMYTH_LIBS available
15.133 +AC_SUBST(GMYTH_CFLAGS)
15.134 +AC_SUBST(GMYTH_LIBS)
15.135 +
15.136 +# check for gstreamer development files
15.137 +GST_REQUIRED=0.10
15.138 +GST_MAJORMINOR=0.10
15.139 +PKG_CHECK_MODULES(GST, \
15.140 + gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
15.141 + HAVE_GST=yes, HAVE_GST=no)
15.142 +
15.143 +# Give error and exit if we don't have gstreamer
15.144 +if test "x$HAVE_GST" = "xno"; then
15.145 + AC_MSG_ERROR(you need gstreamer development packages installed !)
15.146 +fi
15.147 +
15.148 +# make GST_CFLAGS and GST_LIBS available
15.149 +AC_SUBST(GST_CFLAGS)
15.150 +AC_SUBST(GST_LIBS)
15.151 +
15.152 +# check for gstreamer-base plugins (xoverlay interface)
15.153 +GSTBASE_REQUIRED=0.10
15.154 +GSTBASE_MAJORMINOR=0.10
15.155 +PKG_CHECK_MODULES(GSTBASE, \
15.156 + gstreamer-base-$GSTBASE_MAJORMINOR >= $GSTBASE_REQUIRED,
15.157 + HAVE_GSTBASE=yes, HAVE_GSTBASE=no)
15.158 +
15.159 +# Give error and exit if we don't have gstreamer base libraries
15.160 +if test "x$HAVE_GSTBASE" = "xno"; then
15.161 + AC_MSG_ERROR(you need gstreamer base development packages installed !)
15.162 +fi
15.163 +
15.164 +# make GSTBASE_CFLAGS and GSTBASE_LIBS available
15.165 +AC_SUBST(GSTBASE_CFLAGS)
15.166 +AC_SUBST(GSTBASE_LIBS)
15.167 +
15.168 +# make GST_MAJORMINOR available in Makefile.am
15.169 +AC_SUBST(GST_MAJORMINOR)
15.170 +
15.171 +AC_CONFIG_FILES([Makefile])
15.172 +
15.173 +AC_OUTPUT
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
16.2 +++ b/mythtv_plugin/depcomp Wed Sep 20 23:59:48 2006 +0100
16.3 @@ -0,0 +1,526 @@
16.4 +#! /bin/sh
16.5 +# depcomp - compile a program generating dependencies as side-effects
16.6 +
16.7 +scriptversion=2004-04-25.13
16.8 +
16.9 +# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
16.10 +
16.11 +# This program is free software; you can redistribute it and/or modify
16.12 +# it under the terms of the GNU General Public License as published by
16.13 +# the Free Software Foundation; either version 2, or (at your option)
16.14 +# any later version.
16.15 +
16.16 +# This program is distributed in the hope that it will be useful,
16.17 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
16.18 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16.19 +# GNU General Public License for more details.
16.20 +
16.21 +# You should have received a copy of the GNU General Public License
16.22 +# along with this program; if not, write to the Free Software
16.23 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
16.24 +# 02111-1307, USA.
16.25 +
16.26 +# As a special exception to the GNU General Public License, if you
16.27 +# distribute this file as part of a program that contains a
16.28 +# configuration script generated by Autoconf, you may include it under
16.29 +# the same distribution terms that you use for the rest of that program.
16.30 +
16.31 +# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
16.32 +
16.33 +case $1 in
16.34 + '')
16.35 + echo "$0: No command. Try \`$0 --help' for more information." 1>&2
16.36 + exit 1;
16.37 + ;;
16.38 + -h | --h*)
16.39 + cat <<\EOF
16.40 +Usage: depcomp [--help] [--version] PROGRAM [ARGS]
16.41 +
16.42 +Run PROGRAMS ARGS to compile a file, generating dependencies
16.43 +as side-effects.
16.44 +
16.45 +Environment variables:
16.46 + depmode Dependency tracking mode.
16.47 + source Source file read by `PROGRAMS ARGS'.
16.48 + object Object file output by `PROGRAMS ARGS'.
16.49 + depfile Dependency file to output.
16.50 + tmpdepfile Temporary file to use when outputing dependencies.
16.51 + libtool Whether libtool is used (yes/no).
16.52 +
16.53 +Report bugs to <bug-automake@gnu.org>.
16.54 +EOF
16.55 + exit 0
16.56 + ;;
16.57 + -v | --v*)
16.58 + echo "depcomp $scriptversion"
16.59 + exit 0
16.60 + ;;
16.61 +esac
16.62 +
16.63 +if test -z "$depmode" || test -z "$source" || test -z "$object"; then
16.64 + echo "depcomp: Variables source, object and depmode must be set" 1>&2
16.65 + exit 1
16.66 +fi
16.67 +# `libtool' can also be set to `yes' or `no'.
16.68 +
16.69 +if test -z "$depfile"; then
16.70 + base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
16.71 + dir=`echo "$object" | sed 's,/.*$,/,'`
16.72 + if test "$dir" = "$object"; then
16.73 + dir=
16.74 + fi
16.75 + # FIXME: should be _deps on DOS.
16.76 + depfile="$dir.deps/$base"
16.77 +fi
16.78 +
16.79 +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
16.80 +
16.81 +rm -f "$tmpdepfile"
16.82 +
16.83 +# Some modes work just like other modes, but use different flags. We
16.84 +# parameterize here, but still list the modes in the big case below,
16.85 +# to make depend.m4 easier to write. Note that we *cannot* use a case
16.86 +# here, because this file can only contain one case statement.
16.87 +if test "$depmode" = hp; then
16.88 + # HP compiler uses -M and no extra arg.
16.89 + gccflag=-M
16.90 + depmode=gcc
16.91 +fi
16.92 +
16.93 +if test "$depmode" = dashXmstdout; then
16.94 + # This is just like dashmstdout with a different argument.
16.95 + dashmflag=-xM
16.96 + depmode=dashmstdout
16.97 +fi
16.98 +
16.99 +case "$depmode" in
16.100 +gcc3)
16.101 +## gcc 3 implements dependency tracking that does exactly what
16.102 +## we want. Yay! Note: for some reason libtool 1.4 doesn't like
16.103 +## it if -MD -MP comes after the -MF stuff. Hmm.
16.104 + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
16.105 + stat=$?
16.106 + if test $stat -eq 0; then :
16.107 + else
16.108 + rm -f "$tmpdepfile"
16.109 + exit $stat
16.110 + fi
16.111 + mv "$tmpdepfile" "$depfile"
16.112 + ;;
16.113 +
16.114 +gcc)
16.115 +## There are various ways to get dependency output from gcc. Here's
16.116 +## why we pick this rather obscure method:
16.117 +## - Don't want to use -MD because we'd like the dependencies to end
16.118 +## up in a subdir. Having to rename by hand is ugly.
16.119 +## (We might end up doing this anyway to support other compilers.)
16.120 +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
16.121 +## -MM, not -M (despite what the docs say).
16.122 +## - Using -M directly means running the compiler twice (even worse
16.123 +## than renaming).
16.124 + if test -z "$gccflag"; then
16.125 + gccflag=-MD,
16.126 + fi
16.127 + "$@" -Wp,"$gccflag$tmpdepfile"
16.128 + stat=$?
16.129 + if test $stat -eq 0; then :
16.130 + else
16.131 + rm -f "$tmpdepfile"
16.132 + exit $stat
16.133 + fi
16.134 + rm -f "$depfile"
16.135 + echo "$object : \\" > "$depfile"
16.136 + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
16.137 +## The second -e expression handles DOS-style file names with drive letters.
16.138 + sed -e 's/^[^:]*: / /' \
16.139 + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
16.140 +## This next piece of magic avoids the `deleted header file' problem.
16.141 +## The problem is that when a header file which appears in a .P file
16.142 +## is deleted, the dependency causes make to die (because there is
16.143 +## typically no way to rebuild the header). We avoid this by adding
16.144 +## dummy dependencies for each header file. Too bad gcc doesn't do
16.145 +## this for us directly.
16.146 + tr ' ' '
16.147 +' < "$tmpdepfile" |
16.148 +## Some versions of gcc put a space before the `:'. On the theory
16.149 +## that the space means something, we add a space to the output as
16.150 +## well.
16.151 +## Some versions of the HPUX 10.20 sed can't process this invocation
16.152 +## correctly. Breaking it into two sed invocations is a workaround.
16.153 + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
16.154 + rm -f "$tmpdepfile"
16.155 + ;;
16.156 +
16.157 +hp)
16.158 + # This case exists only to let depend.m4 do its work. It works by
16.159 + # looking at the text of this script. This case will never be run,
16.160 + # since it is checked for above.
16.161 + exit 1
16.162 + ;;
16.163 +
16.164 +sgi)
16.165 + if test "$libtool" = yes; then
16.166 + "$@" "-Wp,-MDupdate,$tmpdepfile"
16.167 + else
16.168 + "$@" -MDupdate "$tmpdepfile"
16.169 + fi
16.170 + stat=$?
16.171 + if test $stat -eq 0; then :
16.172 + else
16.173 + rm -f "$tmpdepfile"
16.174 + exit $stat
16.175 + fi
16.176 + rm -f "$depfile"
16.177 +
16.178 + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
16.179 + echo "$object : \\" > "$depfile"
16.180 +
16.181 + # Clip off the initial element (the dependent). Don't try to be
16.182 + # clever and replace this with sed code, as IRIX sed won't handle
16.183 + # lines with more than a fixed number of characters (4096 in
16.184 + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
16.185 + # the IRIX cc adds comments like `#:fec' to the end of the
16.186 + # dependency line.
16.187 + tr ' ' '
16.188 +' < "$tmpdepfile" \
16.189 + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
16.190 + tr '
16.191 +' ' ' >> $depfile
16.192 + echo >> $depfile
16.193 +
16.194 + # The second pass generates a dummy entry for each header file.
16.195 + tr ' ' '
16.196 +' < "$tmpdepfile" \
16.197 + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
16.198 + >> $depfile
16.199 + else
16.200 + # The sourcefile does not contain any dependencies, so just
16.201 + # store a dummy comment line, to avoid errors with the Makefile
16.202 + # "include basename.Plo" scheme.
16.203 + echo "#dummy" > "$depfile"
16.204 + fi
16.205 + rm -f "$tmpdepfile"
16.206 + ;;
16.207 +
16.208 +aix)
16.209 + # The C for AIX Compiler uses -M and outputs the dependencies
16.210 + # in a .u file. In older versions, this file always lives in the
16.211 + # current directory. Also, the AIX compiler puts `$object:' at the
16.212 + # start of each line; $object doesn't have directory information.
16.213 + # Version 6 uses the directory in both cases.
16.214 + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
16.215 + tmpdepfile="$stripped.u"
16.216 + if test "$libtool" = yes; then
16.217 + "$@" -Wc,-M
16.218 + else
16.219 + "$@" -M
16.220 + fi
16.221 + stat=$?
16.222 +
16.223 + if test -f "$tmpdepfile"; then :
16.224 + else
16.225 + stripped=`echo "$stripped" | sed 's,^.*/,,'`
16.226 + tmpdepfile="$stripped.u"
16.227 + fi
16.228 +
16.229 + if test $stat -eq 0; then :
16.230 + else
16.231 + rm -f "$tmpdepfile"
16.232 + exit $stat
16.233 + fi
16.234 +
16.235 + if test -f "$tmpdepfile"; then
16.236 + outname="$stripped.o"
16.237 + # Each line is of the form `foo.o: dependent.h'.
16.238 + # Do two passes, one to just change these to
16.239 + # `$object: dependent.h' and one to simply `dependent.h:'.
16.240 + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
16.241 + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
16.242 + else
16.243 + # The sourcefile does not contain any dependencies, so just
16.244 + # store a dummy comment line, to avoid errors with the Makefile
16.245 + # "include basename.Plo" scheme.
16.246 + echo "#dummy" > "$depfile"
16.247 + fi
16.248 + rm -f "$tmpdepfile"
16.249 + ;;
16.250 +
16.251 +icc)
16.252 + # Intel's C compiler understands `-MD -MF file'. However on
16.253 + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
16.254 + # ICC 7.0 will fill foo.d with something like
16.255 + # foo.o: sub/foo.c
16.256 + # foo.o: sub/foo.h
16.257 + # which is wrong. We want:
16.258 + # sub/foo.o: sub/foo.c
16.259 + # sub/foo.o: sub/foo.h
16.260 + # sub/foo.c:
16.261 + # sub/foo.h:
16.262 + # ICC 7.1 will output
16.263 + # foo.o: sub/foo.c sub/foo.h
16.264 + # and will wrap long lines using \ :
16.265 + # foo.o: sub/foo.c ... \
16.266 + # sub/foo.h ... \
16.267 + # ...
16.268 +
16.269 + "$@" -MD -MF "$tmpdepfile"
16.270 + stat=$?
16.271 + if test $stat -eq 0; then :
16.272 + else
16.273 + rm -f "$tmpdepfile"
16.274 + exit $stat
16.275 + fi
16.276 + rm -f "$depfile"
16.277 + # Each line is of the form `foo.o: dependent.h',
16.278 + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
16.279 + # Do two passes, one to just change these to
16.280 + # `$object: dependent.h' and one to simply `dependent.h:'.
16.281 + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
16.282 + # Some versions of the HPUX 10.20 sed can't process this invocation
16.283 + # correctly. Breaking it into two sed invocations is a workaround.
16.284 + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
16.285 + sed -e 's/$/ :/' >> "$depfile"
16.286 + rm -f "$tmpdepfile"
16.287 + ;;
16.288 +
16.289 +tru64)
16.290 + # The Tru64 compiler uses -MD to generate dependencies as a side
16.291 + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
16.292 + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
16.293 + # dependencies in `foo.d' instead, so we check for that too.
16.294 + # Subdirectories are respected.
16.295 + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
16.296 + test "x$dir" = "x$object" && dir=
16.297 + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
16.298 +
16.299 + if test "$libtool" = yes; then
16.300 + # Dependencies are output in .lo.d with libtool 1.4.
16.301 + # They are output in .o.d with libtool 1.5.
16.302 + tmpdepfile1="$dir.libs/$base.lo.d"
16.303 + tmpdepfile2="$dir.libs/$base.o.d"
16.304 + tmpdepfile3="$dir.libs/$base.d"
16.305 + "$@" -Wc,-MD
16.306 + else
16.307 + tmpdepfile1="$dir$base.o.d"
16.308 + tmpdepfile2="$dir$base.d"
16.309 + tmpdepfile3="$dir$base.d"
16.310 + "$@" -MD
16.311 + fi
16.312 +
16.313 + stat=$?
16.314 + if test $stat -eq 0; then :
16.315 + else
16.316 + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
16.317 + exit $stat
16.318 + fi
16.319 +
16.320 + if test -f "$tmpdepfile1"; then
16.321 + tmpdepfile="$tmpdepfile1"
16.322 + elif test -f "$tmpdepfile2"; then
16.323 + tmpdepfile="$tmpdepfile2"
16.324 + else
16.325 + tmpdepfile="$tmpdepfile3"
16.326 + fi
16.327 + if test -f "$tmpdepfile"; then
16.328 + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
16.329 + # That's a tab and a space in the [].
16.330 + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
16.331 + else
16.332 + echo "#dummy" > "$depfile"
16.333 + fi
16.334 + rm -f "$tmpdepfile"
16.335 + ;;
16.336 +
16.337 +#nosideeffect)
16.338 + # This comment above is used by automake to tell side-effect
16.339 + # dependency tracking mechanisms from slower ones.
16.340 +
16.341 +dashmstdout)
16.342 + # Important note: in order to support this mode, a compiler *must*
16.343 + # always write the preprocessed file to stdout, regardless of -o.
16.344 + "$@" || exit $?
16.345 +
16.346 + # Remove the call to Libtool.
16.347 + if test "$libtool" = yes; then
16.348 + while test $1 != '--mode=compile'; do
16.349 + shift
16.350 + done
16.351 + shift
16.352 + fi
16.353 +
16.354 + # Remove `-o $object'.
16.355 + IFS=" "
16.356 + for arg
16.357 + do
16.358 + case $arg in
16.359 + -o)
16.360 + shift
16.361 + ;;
16.362 + $object)
16.363 + shift
16.364 + ;;
16.365 + *)
16.366 + set fnord "$@" "$arg"
16.367 + shift # fnord
16.368 + shift # $arg
16.369 + ;;
16.370 + esac
16.371 + done
16.372 +
16.373 + test -z "$dashmflag" && dashmflag=-M
16.374 + # Require at least two characters before searching for `:'
16.375 + # in the target name. This is to cope with DOS-style filenames:
16.376 + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
16.377 + "$@" $dashmflag |
16.378 + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
16.379 + rm -f "$depfile"
16.380 + cat < "$tmpdepfile" > "$depfile"
16.381 + tr ' ' '
16.382 +' < "$tmpdepfile" | \
16.383 +## Some versions of the HPUX 10.20 sed can't process this invocation
16.384 +## correctly. Breaking it into two sed invocations is a workaround.
16.385 + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
16.386 + rm -f "$tmpdepfile"
16.387 + ;;
16.388 +
16.389 +dashXmstdout)
16.390 + # This case only exists to satisfy depend.m4. It is never actually
16.391 + # run, as this mode is specially recognized in the preamble.
16.392 + exit 1
16.393 + ;;
16.394 +
16.395 +makedepend)
16.396 + "$@" || exit $?
16.397 + # Remove any Libtool call
16.398 + if test "$libtool" = yes; then
16.399 + while test $1 != '--mode=compile'; do
16.400 + shift
16.401 + done
16.402 + shift
16.403 + fi
16.404 + # X makedepend
16.405 + shift
16.406 + cleared=no
16.407 + for arg in "$@"; do
16.408 + case $cleared in
16.409 + no)
16.410 + set ""; shift
16.411 + cleared=yes ;;
16.412 + esac
16.413 + case "$arg" in
16.414 + -D*|-I*)
16.415 + set fnord "$@" "$arg"; shift ;;
16.416 + # Strip any option that makedepend may not understand. Remove
16.417 + # the object too, otherwise makedepend will parse it as a source file.
16.418 + -*|$object)
16.419 + ;;
16.420 + *)
16.421 + set fnord "$@" "$arg"; shift ;;
16.422 + esac
16.423 + done
16.424 + obj_suffix="`echo $object | sed 's/^.*\././'`"
16.425 + touch "$tmpdepfile"
16.426 + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
16.427 + rm -f "$depfile"
16.428 + cat < "$tmpdepfile" > "$depfile"
16.429 + sed '1,2d' "$tmpdepfile" | tr ' ' '
16.430 +' | \
16.431 +## Some versions of the HPUX 10.20 sed can't process this invocation
16.432 +## correctly. Breaking it into two sed invocations is a workaround.
16.433 + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
16.434 + rm -f "$tmpdepfile" "$tmpdepfile".bak
16.435 + ;;
16.436 +
16.437 +cpp)
16.438 + # Important note: in order to support this mode, a compiler *must*
16.439 + # always write the preprocessed file to stdout.
16.440 + "$@" || exit $?
16.441 +
16.442 + # Remove the call to Libtool.
16.443 + if test "$libtool" = yes; then
16.444 + while test $1 != '--mode=compile'; do
16.445 + shift
16.446 + done
16.447 + shift
16.448 + fi
16.449 +
16.450 + # Remove `-o $object'.
16.451 + IFS=" "
16.452 + for arg
16.453 + do
16.454 + case $arg in
16.455 + -o)
16.456 + shift
16.457 + ;;
16.458 + $object)
16.459 + shift
16.460 + ;;
16.461 + *)
16.462 + set fnord "$@" "$arg"
16.463 + shift # fnord
16.464 + shift # $arg
16.465 + ;;
16.466 + esac
16.467 + done
16.468 +
16.469 + "$@" -E |
16.470 + sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
16.471 + sed '$ s: \\$::' > "$tmpdepfile"
16.472 + rm -f "$depfile"
16.473 + echo "$object : \\" > "$depfile"
16.474 + cat < "$tmpdepfile" >> "$depfile"
16.475 + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
16.476 + rm -f "$tmpdepfile"
16.477 + ;;
16.478 +
16.479 +msvisualcpp)
16.480 + # Important note: in order to support this mode, a compiler *must*
16.481 + # always write the preprocessed file to stdout, regardless of -o,
16.482 + # because we must use -o when running libtool.
16.483 + "$@" || exit $?
16.484 + IFS=" "
16.485 + for arg
16.486 + do
16.487 + case "$arg" in
16.488 + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
16.489 + set fnord "$@"
16.490 + shift
16.491 + shift
16.492 + ;;
16.493 + *)
16.494 + set fnord "$@" "$arg"
16.495 + shift
16.496 + shift
16.497 + ;;
16.498 + esac
16.499 + done
16.500 + "$@" -E |
16.501 + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
16.502 + rm -f "$depfile"
16.503 + echo "$object : \\" > "$depfile"
16.504 + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
16.505 + echo " " >> "$depfile"
16.506 + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
16.507 + rm -f "$tmpdepfile"
16.508 + ;;
16.509 +
16.510 +none)
16.511 + exec "$@"
16.512 + ;;
16.513 +
16.514 +*)
16.515 + echo "Unknown depmode $depmode" 1>&2
16.516 + exit 1
16.517 + ;;
16.518 +esac
16.519 +
16.520 +exit 0
16.521 +
16.522 +# Local Variables:
16.523 +# mode: shell-script
16.524 +# sh-indentation: 2
16.525 +# eval: (add-hook 'write-file-hooks 'time-stamp)
16.526 +# time-stamp-start: "scriptversion="
16.527 +# time-stamp-format: "%:y-%02m-%02d.%02H"
16.528 +# time-stamp-end: "$"
16.529 +# End:
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
17.2 +++ b/mythtv_plugin/gstmythtvsrc.c Wed Sep 20 23:59:48 2006 +0100
17.3 @@ -0,0 +1,900 @@
17.4 +/* vim: set sw=2: -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2; c-indent-level: 2 -*- */
17.5 +/* GStreamer MythTV Plug-in
17.6 + * Copyright (C) <2006> Rosfran Borges <rosfran.borges@indt.org.br>
17.7 + *
17.8 + * This library is free software; you can redistribute it and/or
17.9 + * modify it under the terms of the GNU Library General Public
17.10 + * License as published by the Free Software Foundation; either
17.11 + * version 2 of the License, or (at your option) any later version.
17.12 + *
17.13 + * This library is distributed in the hope that it will be useful,
17.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
17.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17.16 + * Library General Public License for more
17.17 + */
17.18 +
17.19 +#ifdef HAVE_CONFIG_H
17.20 +#include "config.h"
17.21 +#endif
17.22 +
17.23 +#include "gstmythtvsrc.h"
17.24 +#include "myth_file_transfer.h"
17.25 +#include "myth_livetv.h"
17.26 +
17.27 +#include <gmyth/gmyth_socket.h>
17.28 +#include <gmyth/gmyth_tvchain.h>
17.29 +
17.30 +#include <string.h>
17.31 +#include <unistd.h>
17.32 +
17.33 +GST_DEBUG_CATEGORY_STATIC (mythtvsrc_debug);
17.34 +#define GST_CAT_DEFAULT mythtvsrc_debug
17.35 +
17.36 +#define GST_MYTHTV_ID_NUM 1
17.37 +
17.38 +#define MYTHTV_VERSION_DEFAULT 30
17.39 +
17.40 +#define MYTHTV_TRANSFER_MAX_WAITS 100
17.41 +
17.42 +#define MYTHTV_TRANSFER_MAX_BUFFER ( 32*1024 )
17.43 +
17.44 +/* 4*1024 ??? */
17.45 +#define MAX_READ_SIZE ( 32*1024 )
17.46 +
17.47 +#define ENABLE_TIMING_POSITION 1
17.48 +
17.49 +/* stablish a maximum iteration value to the IS_RECORDING message */
17.50 +static guint wait_to_transfer = 0;
17.51 +
17.52 +static const GstElementDetails gst_mythtv_src_details =
17.53 +GST_ELEMENT_DETAILS ("MythTV client source",
17.54 + "Source/Network",
17.55 + "Control and receive data as a client over the network via raw socket connections using the MythTV protocol",
17.56 + "Rosfran Borges <rosfran.borges@indt.org.br>");
17.57 +
17.58 +static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
17.59 + GST_PAD_SRC,
17.60 + GST_PAD_ALWAYS,
17.61 + GST_STATIC_CAPS_ANY);
17.62 +
17.63 +enum
17.64 +{
17.65 + PROP_0,
17.66 + PROP_LOCATION,
17.67 + PROP_URI,
17.68 +#ifndef GST_DISABLE_GST_DEBUG
17.69 + PROP_MYTHTV_DBG,
17.70 +#endif
17.71 + PROP_MYTHTV_VERSION,
17.72 + PROP_MYTHTV_LIVE,
17.73 + PROP_MYTHTV_LIVEID,
17.74 + PROP_MYTHTV_LIVE_CHAINID
17.75 +};
17.76 +
17.77 +static void gst_mythtv_src_finalize (GObject * gobject);
17.78 +
17.79 +static GstFlowReturn gst_mythtv_src_create (GstBaseSrc * psrc,
17.80 + guint64 offset, guint size, GstBuffer ** outbuf);
17.81 +static gboolean gst_mythtv_src_start (GstBaseSrc * bsrc);
17.82 +static gboolean gst_mythtv_src_stop (GstBaseSrc * bsrc);
17.83 +static gboolean gst_mythtv_src_get_size (GstBaseSrc * bsrc, guint64 * size);
17.84 +static gboolean gst_mythtv_src_is_seekable( GstBaseSrc *base_src );
17.85 +
17.86 +static void gst_mythtv_src_set_property (GObject * object, guint prop_id,
17.87 + const GValue * value, GParamSpec * pspec);
17.88 +static void gst_mythtv_src_get_property (GObject * object, guint prop_id,
17.89 + GValue * value, GParamSpec * pspec);
17.90 +
17.91 +static void
17.92 +gst_mythtv_src_uri_handler_init (gpointer g_iface, gpointer iface_data);
17.93 +
17.94 +static gboolean
17.95 +gst_mythtv_src_handle_event (GstPad * pad, GstEvent * event);
17.96 +
17.97 + static void
17.98 +_urihandler_init (GType type)
17.99 +{
17.100 + static const GInterfaceInfo urihandler_info = {
17.101 + gst_mythtv_src_uri_handler_init,
17.102 + NULL,
17.103 + NULL
17.104 + };
17.105 +
17.106 + g_type_add_interface_static (type, GST_TYPE_URI_HANDLER, &urihandler_info);
17.107 +
17.108 + GST_DEBUG_CATEGORY_INIT (mythtvsrc_debug, "mythtvsrc", 0,
17.109 + "MythTV src");
17.110 +}
17.111 +
17.112 +GST_BOILERPLATE_FULL (GstMythtvSrc, gst_mythtv_src, GstBaseSrc,
17.113 + GST_TYPE_BASE_SRC, _urihandler_init);
17.114 +
17.115 + static void
17.116 +gst_mythtv_src_base_init (gpointer g_class)
17.117 +{
17.118 + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
17.119 +
17.120 + gst_element_class_add_pad_template (element_class,
17.121 + gst_static_pad_template_get (&srctemplate));
17.122 +
17.123 + gst_element_class_set_details (element_class, &gst_mythtv_src_details);
17.124 +}
17.125 +
17.126 + static void
17.127 +gst_mythtv_src_class_init (GstMythtvSrcClass * klass)
17.128 +{
17.129 + GObjectClass *gobject_class;
17.130 + GstBaseSrcClass *gstbasesrc_class;
17.131 +
17.132 + gobject_class = (GObjectClass *) klass;
17.133 + gstbasesrc_class = (GstBaseSrcClass *) klass;
17.134 +
17.135 + gobject_class->set_property = gst_mythtv_src_set_property;
17.136 + gobject_class->get_property = gst_mythtv_src_get_property;
17.137 + gobject_class->finalize = gst_mythtv_src_finalize;
17.138 +
17.139 + g_object_class_install_property
17.140 + (gobject_class, PROP_LOCATION,
17.141 + g_param_spec_string ("location", "Location",
17.142 + "The location. In the form:"
17.143 + "\n\t\t\tmyth://a.com/file.nuv"
17.144 + "\n\t\t\tmyth://a.com:23223/file.nuv "
17.145 + "\n\t\t\ta.com/file.nuv - default scheme 'myth'",
17.146 + "", G_PARAM_READWRITE));
17.147 +
17.148 + g_object_class_install_property
17.149 + (gobject_class, PROP_URI,
17.150 + g_param_spec_string ("uri", "Uri",
17.151 + "The location in form of a URI (deprecated; use location)",
17.152 + "", G_PARAM_READWRITE));
17.153 +
17.154 + g_object_class_install_property
17.155 + (gobject_class, PROP_MYTHTV_VERSION,
17.156 + g_param_spec_int ("mythtv-version", "mythtv-version",
17.157 + "Change Myth TV version",
17.158 + 26, 30, 26, G_PARAM_READWRITE));
17.159 +
17.160 + g_object_class_install_property
17.161 + (gobject_class, PROP_MYTHTV_LIVEID,
17.162 + g_param_spec_int ("mythtv-live-id", "mythtv-live-id",
17.163 + "Change Myth TV version",
17.164 + 0, 200, GST_MYTHTV_ID_NUM, G_PARAM_READWRITE));
17.165 +
17.166 + g_object_class_install_property
17.167 + (gobject_class, PROP_MYTHTV_LIVE_CHAINID,
17.168 + g_param_spec_string ("mythtv-live-chainid", "mythtv-live-chainid",
17.169 + "Sets the Myth TV chain ID (from TV Chain)",
17.170 + "", G_PARAM_READWRITE));
17.171 +
17.172 + g_object_class_install_property
17.173 + (gobject_class, PROP_MYTHTV_LIVE,
17.174 + g_param_spec_boolean ("mythtv-live", "mythtv-live",
17.175 + "Enable MythTV Live TV content streaming",
17.176 + FALSE, G_PARAM_READWRITE));
17.177 +
17.178 +#ifndef GST_DISABLE_GST_DEBUG
17.179 + g_object_class_install_property
17.180 + (gobject_class, PROP_MYTHTV_DBG,
17.181 + g_param_spec_boolean ("mythtv-debug", "mythtv-debug",
17.182 + "Enable MythTV debug messages",
17.183 + FALSE, G_PARAM_READWRITE));
17.184 +#endif
17.185 +
17.186 + gstbasesrc_class->start = gst_mythtv_src_start;
17.187 + gstbasesrc_class->stop = gst_mythtv_src_stop;
17.188 + gstbasesrc_class->get_size = gst_mythtv_src_get_size;
17.189 + gstbasesrc_class->is_seekable = gst_mythtv_src_is_seekable;
17.190 +
17.191 + gstbasesrc_class->create = gst_mythtv_src_create;
17.192 +
17.193 +
17.194 + GST_DEBUG_CATEGORY_INIT (mythtvsrc_debug, "mythtvsrc", 0,
17.195 + "MythTV Client Source");
17.196 +}
17.197 +
17.198 + static void
17.199 +gst_mythtv_src_init (GstMythtvSrc * this, GstMythtvSrcClass * g_class)
17.200 +{
17.201 + this->file_transfer = NULL;
17.202 +
17.203 + this->unique_setup = FALSE;
17.204 +
17.205 + this->mythtv_version = MYTHTV_VERSION_DEFAULT;
17.206 +
17.207 + this->bytes_read = 0;
17.208 +
17.209 + this->content_size = -1;
17.210 + this->read_offset = 0;
17.211 +
17.212 + this->live_tv = FALSE;
17.213 +
17.214 + this->user_agent = g_strdup ("mythtvsrc");
17.215 + this->mythtv_caps = NULL;
17.216 +
17.217 + gst_pad_set_event_function (GST_BASE_SRC_PAD(GST_BASE_SRC(this)),
17.218 + GST_DEBUG_FUNCPTR (gst_mythtv_src_handle_event));
17.219 +
17.220 +}
17.221 +
17.222 + static void
17.223 +gst_mythtv_src_finalize (GObject * gobject)
17.224 +{
17.225 + GstMythtvSrc *this = GST_MYTHTV_SRC (gobject);
17.226 +
17.227 + g_free (this->user_agent);
17.228 +
17.229 + if (this->mythtv_caps) {
17.230 + gst_caps_unref (this->mythtv_caps);
17.231 + this->mythtv_caps = NULL;
17.232 + }
17.233 +
17.234 + if (this->file_transfer) {
17.235 + g_object_unref (this->file_transfer);
17.236 + this->file_transfer = NULL;
17.237 + }
17.238 +
17.239 + if (this->uri_name) {
17.240 + g_free (this->uri_name);
17.241 + }
17.242 +
17.243 + if (this->user_agent) {
17.244 + g_free (this->user_agent);
17.245 + }
17.246 +
17.247 + G_OBJECT_CLASS (parent_class)->finalize (gobject);
17.248 +}
17.249 +
17.250 +#if 0
17.251 + static guint
17.252 +do_seek( GstMythtvSrc *src, guint64 offset, guint size, GstBuffer *outbuf )
17.253 +{
17.254 + guint64 off_uint64 = myth_file_transfer_seek(src->file_transfer, offset, 1);
17.255 +
17.256 + g_print( "[%s] Call MythTV SEEK with offset %llu, got a new one %llu...\n", __FUNCTION__,
17.257 + offset, off_uint64 );
17.258 +
17.259 + return off_uint64;
17.260 +
17.261 +}
17.262 +#endif
17.263 +
17.264 + static guint
17.265 +do_read_request_response (GstMythtvSrc * src, guint64 offset, guint size, GstBuffer * outbuf)
17.266 +{
17.267 + guint read = 0;
17.268 + guint sizetoread = size; //GST_BUFFER_SIZE (outbuf);
17.269 +
17.270 + g_print( "[%s] Reading %d bytes...\n", __FUNCTION__, sizetoread );
17.271 +
17.272 + /* Loop sending the request:
17.273 + * Retry whilst authentication fails and we supply it. */
17.274 +
17.275 + ssize_t len = 0;
17.276 +
17.277 + GST_OBJECT_LOCK(src);
17.278 +
17.279 + while ( sizetoread > 0 ) {
17.280 +
17.281 + len = myth_file_transfer_read( src->file_transfer,
17.282 + GST_BUFFER_DATA (outbuf) + read, sizetoread, TRUE );
17.283 +
17.284 + if ( len > 0 ) {
17.285 + read += len;
17.286 + src->read_offset += read;
17.287 + sizetoread -= len;
17.288 + } else if ( len < 0 ) {
17.289 + goto done;
17.290 + }
17.291 + /*else if ( len == 0 ) {
17.292 + goto eos;
17.293 + }*/
17.294 +
17.295 + if ( len == sizetoread )
17.296 + break;
17.297 +
17.298 + }
17.299 +
17.300 + if ( read > 0 ) {
17.301 + src->bytes_read += read;
17.302 +
17.303 + GST_BUFFER_SIZE (outbuf) = read;
17.304 + } else if ( read <= 0 || len <= 0 ) {
17.305 + if ( src->live_tv == FALSE )
17.306 + goto eos;
17.307 + else
17.308 + goto done;
17.309 + }
17.310 + //GST_BUFFER_OFFSET (outbuf) = src->read_offset;
17.311 +
17.312 + g_print( "[%s]\tBYTES READ (actual) = %d, BYTES READ (cumulative) = %llu, "\
17.313 + "OFFSET = %llu, CONTENT SIZE = %llu.\n", __FUNCTION__, read, src->bytes_read,
17.314 + src->read_offset, src->content_size );
17.315 +
17.316 + GST_OBJECT_UNLOCK(src);
17.317 +
17.318 + if ( len < 0 ) {
17.319 + read = len;
17.320 + if ( src->live_tv == FALSE )
17.321 + goto eos;
17.322 + else
17.323 + goto done;
17.324 + }
17.325 +
17.326 + if ( src->bytes_read < src->content_size )
17.327 + goto done;
17.328 +
17.329 +eos:
17.330 + GST_OBJECT_UNLOCK(src);
17.331 +
17.332 + src->eos = TRUE;
17.333 +done:
17.334 + GST_OBJECT_UNLOCK(src);
17.335 +
17.336 + return read;
17.337 +}
17.338 +
17.339 + static GstFlowReturn
17.340 +gst_mythtv_src_create ( GstBaseSrc * psrc, guint64 offset,
17.341 + guint size, GstBuffer **outbuf )
17.342 +{
17.343 + GstMythtvSrc *src;
17.344 + GstFlowReturn ret = GST_FLOW_OK;
17.345 + guint read;
17.346 + guint64 size_tmp = 0;
17.347 +
17.348 + src = GST_MYTHTV_SRC (psrc);
17.349 +
17.350 + g_print( "[%s]\tBUFFER OFFSET = %llu, BUFFER SIZE = %d.\n", __FUNCTION__, offset,
17.351 + size );
17.352 +
17.353 +
17.354 + /* The caller should know the number of bytes and not read beyond EOS. */
17.355 + if (G_UNLIKELY (src->eos))
17.356 + goto eos;
17.357 +
17.358 + /* Create the buffer. */
17.359 + ret = gst_pad_alloc_buffer ( GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)),
17.360 + // GST_BUFFER_OFFSET_NONE, GST_BASE_SRC (psrc)->blocksize,
17.361 + offset, size,
17.362 + src->mythtv_caps ? src->mythtv_caps :
17.363 + GST_PAD_CAPS (GST_BASE_SRC_PAD (GST_BASE_SRC (psrc))), outbuf );
17.364 +
17.365 + if (G_UNLIKELY (ret == GST_FLOW_UNEXPECTED))
17.366 + goto eos;
17.367 +
17.368 + if (G_UNLIKELY (ret != GST_FLOW_OK))
17.369 + goto done;
17.370 +
17.371 + read = do_read_request_response ( src, offset, size, *outbuf );
17.372 +
17.373 +#if ENABLE_TIMING_POSITION == 1
17.374 + if (src->live_tv == TRUE) {
17.375 + g_usleep( 1000 );
17.376 +get_file_pos:
17.377 + g_usleep( 100 );
17.378 + size_tmp = myth_file_transfer_get_file_position( src->file_transfer );
17.379 + if ( size_tmp > ( src->content_size + MYTHTV_TRANSFER_MAX_BUFFER ) )
17.380 + src->content_size = size_tmp;
17.381 + else
17.382 + goto get_file_pos;
17.383 + g_print( "\t[%s]\tGET_POSITION: file_position = %llu\n",
17.384 + __FUNCTION__, size_tmp);
17.385 +
17.386 + }
17.387 +#endif
17.388 +
17.389 + if (G_UNLIKELY (read < 0))
17.390 + goto read_error;
17.391 +
17.392 + if (G_UNLIKELY(src->eos))
17.393 + goto eos;
17.394 +
17.395 +done:
17.396 + return ret;
17.397 +eos:
17.398 +#if ENABLE_TIMING_POSITION == 1
17.399 + if (src->live_tv == TRUE) {
17.400 + g_usleep( 1000 );
17.401 + guint64 size_tmp = 0;
17.402 +get_file_pos_eos:
17.403 + g_usleep( 100 );
17.404 + size_tmp = myth_file_transfer_get_file_position( src->file_transfer );
17.405 + if ( size_tmp > ( src->content_size + MYTHTV_TRANSFER_MAX_BUFFER ) )
17.406 + src->content_size = size_tmp;
17.407 + else
17.408 + goto get_file_pos_eos;
17.409 + g_print( "\t[%s]\tGET_POSITION: file_position = %llu\n",
17.410 + __FUNCTION__, size_tmp);
17.411 + goto done;
17.412 + } else
17.413 +#endif
17.414 + {
17.415 + GST_DEBUG_OBJECT (src, "EOS reached");
17.416 + return GST_FLOW_UNEXPECTED;
17.417 + }
17.418 + /* ERRORS */
17.419 +read_error:
17.420 + {
17.421 + GST_ELEMENT_ERROR (src, RESOURCE, READ,
17.422 + (NULL), ("Could not read any bytes (%i, %s)", read,
17.423 + src->uri_name));
17.424 + return GST_FLOW_ERROR;
17.425 + }
17.426 +}
17.427 +
17.428 +#if 0
17.429 +/* The following two charset mangling functions were copied from gnomevfssrc.
17.430 + * Preserve them under the unverified assumption that they do something vaguely
17.431 + * worthwhile.
17.432 + */
17.433 + static char *
17.434 +unicodify (const char *str, int len, ...)
17.435 +{
17.436 + char *ret = NULL, *cset;
17.437 + va_list args;
17.438 + gsize bytes_read, bytes_written;
17.439 +
17.440 + if (g_utf8_validate (str, len, NULL))
17.441 + return g_strndup (str, len >= 0 ? len : strlen (str));
17.442 +
17.443 + va_start (args, len);
17.444 + while ((cset = va_arg (args, char *)) != NULL)
17.445 + {
17.446 + if (!strcmp (cset, "locale"))
17.447 + ret = g_locale_to_utf8 (str, len, &bytes_read, &bytes_written, NULL);
17.448 + else
17.449 + ret = g_convert (str, len, "UTF-8", cset,
17.450 + &bytes_read, &bytes_written, NULL);
17.451 + if (ret)
17.452 + break;
17.453 + }
17.454 + va_end (args);
17.455 +
17.456 + return ret;
17.457 +}
17.458 +
17.459 + static char *
17.460 +gst_mythtv_src_unicodify (const char *str)
17.461 +{
17.462 + return unicodify (str, -1, "locale", "ISO-8859-1", NULL);
17.463 +}
17.464 +#endif
17.465 +
17.466 +/* create a socket for connecting to remote server */
17.467 + static gboolean
17.468 +gst_mythtv_src_start ( GstBaseSrc * bsrc )
17.469 +{
17.470 + GstMythtvSrc *src = GST_MYTHTV_SRC (bsrc);
17.471 +
17.472 + GString *chain_id_local = NULL;
17.473 +
17.474 + gboolean ret = TRUE;
17.475 +#if 0
17.476 + if (src->live_tv == TRUE && src->file_transfer != NULL) {
17.477 + guint64 size_tmp = myth_file_transfer_get_file_position( src->file_transfer );
17.478 + if (size_tmp > src->content_size)
17.479 + src->content_size = size_tmp;
17.480 + g_print( "\t[%s]\tGET_POSITION: file_position = %llu\n",
17.481 + __FUNCTION__, size_tmp);
17.482 + }
17.483 +#endif
17.484 + if (src->unique_setup == FALSE) {
17.485 + src->unique_setup = TRUE;
17.486 + } else {
17.487 + goto done;
17.488 + }
17.489 +
17.490 + GST_OBJECT_LOCK(src);
17.491 +
17.492 + if ( src->live_tv ) {
17.493 + src->spawn_livetv = myth_livetv_new( );
17.494 + if ( myth_livetv_setup( src->spawn_livetv ) == FALSE ) {
17.495 + ret = FALSE;
17.496 + goto init_failed;
17.497 + }
17.498 + /* set up the uri variable */
17.499 + src->uri_name = g_strdup( src->spawn_livetv->proginfo->pathname->str );
17.500 + chain_id_local = gmyth_tvchain_get_id( src->spawn_livetv->tvchain );
17.501 + if ( chain_id_local != NULL ) {
17.502 + src->live_chain_id = g_strdup( chain_id_local->str );
17.503 + g_print( "\t[%s]\tLocal chain ID = %s.\n", __FUNCTION__, src->live_chain_id );
17.504 + }
17.505 + src->live_tv_id = src->spawn_livetv->remote_encoder->recorder_num;
17.506 + g_print ( "[%s] LiveTV id = %d, URI path = %s.\n", __FUNCTION__, src->live_tv_id, src->uri_name );
17.507 + }
17.508 +
17.509 + src->file_transfer = myth_file_transfer_new( src->live_tv_id,
17.510 + g_string_new( src->uri_name ), -1, src->mythtv_version );
17.511 +
17.512 + if ( src->file_transfer == NULL ) {
17.513 + GST_OBJECT_UNLOCK(src);
17.514 +
17.515 + goto init_failed;
17.516 + }
17.517 +
17.518 + if ( src->live_tv ) {
17.519 + g_print ( "[%s] GST MYTHTVSRC: live_chain_id = %s\n", __FUNCTION__, src->live_chain_id );
17.520 + /* sets the MythSocket to the FileTransfer */
17.521 + //ret = myth_file_transfer_livetv_setup( &(src->file_transfer), src->spawn_livetv->remote_encoder->myth_socket );
17.522 + }
17.523 + /* sets the Playback monitor connection */
17.524 + ret = myth_file_transfer_playback_setup( &(src->file_transfer), src->live_tv );
17.525 +
17.526 + if ( src->live_tv == TRUE && ret == TRUE ) {
17.527 + /* loop finished, set the max tries variable to zero again... */
17.528 + wait_to_transfer = 0;
17.529 +
17.530 + while ( wait_to_transfer++ < MYTHTV_TRANSFER_MAX_WAITS && ( myth_file_transfer_is_recording( src->file_transfer ) == FALSE
17.531 + /*|| ( myth_file_transfer_get_file_position( src->file_transfer ) < ( src->content_size + 327680 ) )*/ ) )
17.532 + g_usleep( 100 );
17.533 + }
17.534 +
17.535 + /* sets the FileTransfer instance connection (video/audio download) */
17.536 + ret = myth_file_transfer_setup( &(src->file_transfer), src->live_tv );
17.537 +
17.538 + if ( ret == FALSE ) {
17.539 + GST_OBJECT_UNLOCK(src);
17.540 +#ifndef GST_DISABLE_GST_DEBUG
17.541 + if ( src->mythtv_msgs_dbg )
17.542 + g_printerr( "MythTV FileTransfer request failed when setting up socket connection!\n" );
17.543 +#endif
17.544 + goto begin_req_failed;
17.545 + }
17.546 +
17.547 + src->content_size = src->file_transfer->filesize;
17.548 +
17.549 + GST_OBJECT_UNLOCK(src);
17.550 +
17.551 +#if 0
17.552 + const char *str_value;
17.553 + gint gint_value;
17.554 +
17.555 + str_value = ne_get_response_header (src->request, "myth-metaint");
17.556 + if (str_value) {
17.557 + if ( sscanf (str_value, "%d", &gint_value) == 1 ) {
17.558 + if (src->myth_caps) {
17.559 + gst_caps_unref (src->myth_caps);
17.560 + src->myth_caps = NULL;
17.561 + }
17.562 + src->myth_metaint = gint_value;
17.563 +#endif
17.564 + //src->mythtv_caps = gst_caps_new_simple ("application/x-gst_ff-nuv", NULL);
17.565 + // }
17.566 + // }
17.567 +done:
17.568 + return TRUE;
17.569 +
17.570 + /* ERRORS */
17.571 +init_failed:
17.572 + {
17.573 + if (src->spawn_livetv != NULL )
17.574 + g_object_unref( src->spawn_livetv );
17.575 +
17.576 + GST_ELEMENT_ERROR (src, LIBRARY, INIT,
17.577 + (NULL), ("Could not initialize MythTV library (%i, %s)", ret, src->uri_name));
17.578 + return FALSE;
17.579 + }
17.580 +begin_req_failed:
17.581 + {
17.582 + GST_ELEMENT_ERROR (src, LIBRARY, INIT,
17.583 + (NULL), ("Could not begin request sent to MythTV server (%i, %s)", ret, src->uri_name));
17.584 + return FALSE;
17.585 + }
17.586 +}
17.587 +
17.588 + static gboolean
17.589 +gst_mythtv_src_get_size (GstBaseSrc * bsrc, guint64 * size)
17.590 +{
17.591 + GstMythtvSrc *src;
17.592 +
17.593 + src = GST_MYTHTV_SRC (bsrc);
17.594 +#if ENABLE_TIMING_POSITION == 1
17.595 + if (src->live_tv == TRUE) {
17.596 +get_file_pos:
17.597 + g_usleep( 100 );
17.598 + guint64 size_tmp = myth_file_transfer_get_file_position( src->file_transfer );
17.599 + if ( size_tmp > ( src->content_size + MYTHTV_TRANSFER_MAX_BUFFER ) )
17.600 + src->content_size = size_tmp;
17.601 + else
17.602 + goto get_file_pos;
17.603 + g_print( "\t[%s]\tGET_POSITION: file_position = %llu\n",
17.604 + __FUNCTION__, size_tmp);
17.605 + }
17.606 +#endif
17.607 + if (src->content_size <= 0)
17.608 + return FALSE;
17.609 +
17.610 + *size = src->content_size;
17.611 +
17.612 + return TRUE;
17.613 +}
17.614 +
17.615 +/* close the socket and associated resources
17.616 + * used both to recover from errors and go to NULL state */
17.617 + static gboolean
17.618 +gst_mythtv_src_stop (GstBaseSrc * bsrc)
17.619 +{
17.620 + GstMythtvSrc *src;
17.621 +
17.622 + src = GST_MYTHTV_SRC (bsrc);
17.623 +
17.624 + if (src->uri_name) {
17.625 + g_free (src->uri_name);
17.626 + src->uri_name = NULL;
17.627 + }
17.628 +
17.629 + if (src->mythtv_caps) {
17.630 + gst_caps_unref (src->mythtv_caps);
17.631 + src->mythtv_caps = NULL;
17.632 + }
17.633 +
17.634 + src->eos = FALSE;
17.635 +
17.636 + return TRUE;
17.637 +}
17.638 +
17.639 + static gboolean
17.640 +gst_mythtv_src_handle_event (GstPad * pad, GstEvent * event)
17.641 +{
17.642 + GstMythtvSrc *src = GST_MYTHTV_SRC (GST_PAD_PARENT (pad));
17.643 +
17.644 + switch (GST_EVENT_TYPE (event)) {
17.645 + case GST_EVENT_FLUSH_START:
17.646 + src->eos = FALSE;
17.647 + break;
17.648 + //return TRUE;
17.649 + case GST_EVENT_FLUSH_STOP:
17.650 + src->do_start = TRUE;
17.651 + src->eos = FALSE;
17.652 + gst_element_set_state (GST_ELEMENT(src), GST_STATE_NULL);
17.653 + gst_element_set_locked_state (GST_ELEMENT(src), TRUE);
17.654 + break;
17.655 + case GST_EVENT_SEEK:
17.656 + {
17.657 + gdouble rate;
17.658 + //gboolean update = TRUE;
17.659 + GstFormat format;
17.660 + GstSeekType cur_type, stop_type;
17.661 + GstSeekFlags flags;
17.662 + gint64 cur = 0, stop = 0;
17.663 + gst_event_parse_seek ( event, &rate, &format,
17.664 + &flags, &cur_type, &cur,
17.665 + &stop_type, &stop );
17.666 +
17.667 + g_print( "[%s] Got EVENT_SEEK.\n", __FUNCTION__ );
17.668 + if ( !( flags & GST_SEEK_FLAG_FLUSH ) ) {
17.669 + g_print( "[%s] Could get the FLAG_FLUSH message.\n", __FUNCTION__ );
17.670 + }
17.671 + //gboolean ret = gst_event_parse_new_segment ( event,
17.672 + // &update, &rate, &format, &start, &stop,
17.673 + // &position );
17.674 + //GstFlowReturn flow_ret = gst_mythtv_src_create (GST_BASE_SRC( GST_PAD_PARENT( psrc ) ),
17.675 + // cur, stop - cur + 1, GstBuffer)
17.676 +
17.677 + }
17.678 + default:
17.679 + return gst_pad_event_default (pad, event);
17.680 + }
17.681 +
17.682 + return gst_pad_event_default (pad, event);
17.683 +}
17.684 +
17.685 + static gboolean
17.686 +gst_mythtv_src_is_seekable( GstBaseSrc *base_src )
17.687 +{
17.688 + return TRUE;
17.689 +}
17.690 +
17.691 + static void
17.692 +gst_mythtv_src_set_property (GObject * object, guint prop_id,
17.693 + const GValue * value, GParamSpec * pspec)
17.694 +{
17.695 + GstMythtvSrc *mythtvsrc = GST_MYTHTV_SRC (object);
17.696 +
17.697 + GST_OBJECT_LOCK (mythtvsrc);
17.698 + switch (prop_id) {
17.699 + case PROP_URI:
17.700 + case PROP_LOCATION:
17.701 + {
17.702 + if (!g_value_get_string (value)) {
17.703 + GST_WARNING ("location property cannot be NULL");
17.704 + goto done;
17.705 + }
17.706 +
17.707 + if (mythtvsrc->uri_name != NULL) {
17.708 + g_free (mythtvsrc->uri_name);
17.709 + mythtvsrc->uri_name = NULL;
17.710 + }
17.711 + mythtvsrc->uri_name = g_value_dup_string (value);
17.712 +
17.713 + break;
17.714 + }
17.715 +#ifndef GST_DISABLE_GST_DEBUG
17.716 + case PROP_MYTHTV_DBG:
17.717 + {
17.718 + mythtvsrc->mythtv_msgs_dbg = g_value_get_boolean (value);
17.719 + break;
17.720 + }
17.721 +#endif
17.722 + case PROP_MYTHTV_VERSION:
17.723 + {
17.724 + mythtvsrc->mythtv_version = g_value_get_int (value);
17.725 + break;
17.726 + }
17.727 + case PROP_MYTHTV_LIVEID:
17.728 + {
17.729 + mythtvsrc->live_tv_id = g_value_get_int (value);
17.730 + break;
17.731 + }
17.732 + case PROP_MYTHTV_LIVE:
17.733 + {
17.734 + mythtvsrc->live_tv = g_value_get_boolean (value);
17.735 + break;
17.736 + }
17.737 + case PROP_MYTHTV_LIVE_CHAINID:
17.738 + {
17.739 + if (!g_value_get_string (value)) {
17.740 + GST_WARNING ("MythTV Live chainid property cannot be NULL");
17.741 + goto done;
17.742 + }
17.743 +
17.744 + if (mythtvsrc->live_chain_id != NULL) {
17.745 + g_free (mythtvsrc->live_chain_id);
17.746 + mythtvsrc->live_chain_id = NULL;
17.747 + }
17.748 + mythtvsrc->live_chain_id = g_value_dup_string (value);
17.749 +
17.750 + break;
17.751 + }
17.752 +
17.753 + default:
17.754 + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
17.755 + break;
17.756 + }
17.757 + GST_OBJECT_UNLOCK (mythtvsrc);
17.758 +done:
17.759 + return;
17.760 +}
17.761 +
17.762 + static void
17.763 +gst_mythtv_src_get_property (GObject * object, guint prop_id,
17.764 + GValue * value, GParamSpec * pspec)
17.765 +{
17.766 + GstMythtvSrc *mythtvsrc = GST_MYTHTV_SRC (object);
17.767 +
17.768 + GST_OBJECT_LOCK (mythtvsrc);
17.769 + switch (prop_id) {
17.770 + case PROP_URI:
17.771 + case PROP_LOCATION:
17.772 + {
17.773 + gchar *str = g_strdup( "" );
17.774 +
17.775 + if ( mythtvsrc->uri_name == NULL ) {
17.776 + g_free (mythtvsrc->uri_name);
17.777 + mythtvsrc->uri_name = NULL;
17.778 + } else {
17.779 + str = g_strdup( mythtvsrc->uri_name );
17.780 + }
17.781 + g_value_set_string ( value, str );
17.782 + break;
17.783 + }
17.784 +#ifndef GST_DISABLE_GST_DEBUG
17.785 + case PROP_MYTHTV_DBG:
17.786 + g_value_set_boolean ( value, mythtvsrc->mythtv_msgs_dbg );
17.787 + break;
17.788 +#endif
17.789 + case PROP_MYTHTV_VERSION:
17.790 + {
17.791 + g_value_set_int ( value, mythtvsrc->mythtv_version );
17.792 + break;
17.793 + }
17.794 + case PROP_MYTHTV_LIVEID:
17.795 + {
17.796 + g_value_set_int ( value, mythtvsrc->live_tv_id );
17.797 + break;
17.798 + }
17.799 + case PROP_MYTHTV_LIVE:
17.800 + g_value_set_boolean ( value, mythtvsrc->live_tv );
17.801 + break;
17.802 + case PROP_MYTHTV_LIVE_CHAINID:
17.803 + {
17.804 + gchar *str = g_strdup( "" );
17.805 +
17.806 + if ( mythtvsrc->live_chain_id == NULL ) {
17.807 + g_free (mythtvsrc->live_chain_id);
17.808 + mythtvsrc->live_chain_id = NULL;
17.809 + } else {
17.810 + str = g_strdup( mythtvsrc->live_chain_id );
17.811 + }
17.812 + g_value_set_string ( value, str );
17.813 + break;
17.814 + }
17.815 + default:
17.816 + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
17.817 + break;
17.818 + }
17.819 + GST_OBJECT_UNLOCK (mythtvsrc);
17.820 +}
17.821 +
17.822 +/* entry point to initialize the plug-in
17.823 + * initialize the plug-in itself
17.824 + * register the element factories and pad templates
17.825 + * register the features
17.826 + */
17.827 + static gboolean
17.828 +plugin_init (GstPlugin * plugin)
17.829 +{
17.830 + return gst_element_register (plugin, "mythtvsrc", GST_RANK_NONE,
17.831 + GST_TYPE_MYTHTV_SRC);
17.832 +}
17.833 +
17.834 +/* this is the structure that gst-register looks for
17.835 + * so keep the name plugin_desc, or you cannot get your plug-in registered */
17.836 +GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
17.837 + GST_VERSION_MINOR,
17.838 + "mythtv",
17.839 + "lib MythTV src",
17.840 + plugin_init, VERSION, "LGPL", "GStreamer", "http://gstreamer.net/")
17.841 +
17.842 +
17.843 +/*** GSTURIHANDLER INTERFACE *************************************************/
17.844 + static guint
17.845 +gst_mythtv_src_uri_get_type (void)
17.846 +{
17.847 + return GST_URI_SRC;
17.848 +}
17.849 +
17.850 + static gchar **
17.851 +gst_mythtv_src_uri_get_protocols (void)
17.852 +{
17.853 + static gchar *protocols[] = { "myth", "myths", NULL };
17.854 +
17.855 + return protocols;
17.856 +}
17.857 +
17.858 + static const gchar *
17.859 +gst_mythtv_src_uri_get_uri (GstURIHandler * handler)
17.860 +{
17.861 + GstMythtvSrc *src = GST_MYTHTV_SRC (handler);
17.862 +
17.863 + return src->uri_name;
17.864 +}
17.865 +
17.866 + static gboolean
17.867 +gst_mythtv_src_uri_set_uri (GstURIHandler * handler, const gchar * uri)
17.868 +{
17.869 + GstMythtvSrc *src = GST_MYTHTV_SRC (handler);
17.870 +
17.871 + gchar *protocol;
17.872 +
17.873 + protocol = gst_uri_get_protocol (uri);
17.874 + if ((strcmp (protocol, "myth") != 0) && (strcmp (protocol, "myths") != 0)) {
17.875 + g_free (protocol);
17.876 + return FALSE;
17.877 + }
17.878 + g_free (protocol);
17.879 + g_object_set (src, "location", uri, NULL);
17.880 +
17.881 + return TRUE;
17.882 +}
17.883 +
17.884 + static void
17.885 +gst_mythtv_src_uri_handler_init (gpointer g_iface, gpointer iface_data)
17.886 +{
17.887 + GstURIHandlerInterface *iface = (GstURIHandlerInterface *) g_iface;
17.888 +
17.889 + iface->get_type = gst_mythtv_src_uri_get_type;
17.890 + iface->get_protocols = gst_mythtv_src_uri_get_protocols;
17.891 + iface->get_uri = gst_mythtv_src_uri_get_uri;
17.892 + iface->set_uri = gst_mythtv_src_uri_set_uri;
17.893 +}
17.894 +
17.895 + void
17.896 +size_header_handler (void *userdata, const char *value)
17.897 +{
17.898 + GstMythtvSrc *src = GST_MYTHTV_SRC (userdata);
17.899 +
17.900 + //src->content_size = g_ascii_strtoull (value, NULL, 10);
17.901 +
17.902 + GST_DEBUG_OBJECT (src, "content size = %lld bytes", src->content_size);
17.903 +}
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
18.2 +++ b/mythtv_plugin/gstmythtvsrc.h Wed Sep 20 23:59:48 2006 +0100
18.3 @@ -0,0 +1,89 @@
18.4 +/* vim: set sw=2: -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2; c-indent-level: 2 -*- */
18.5 +/* GStreamer
18.6 + * Copyright (C) <2006> Rosfran Borges <rosfran.borges@indt.org.br>
18.7 + *
18.8 + * This library is free software; you can redistribute it and/or
18.9 + * modify it under the terms of the GNU Library General Public
18.10 + * License as published by the Free Software Foundation; either
18.11 + * version 2 of the License, or (at your option) any later version.
18.12 + *
18.13 + * This library is distributed in the hope that it will be useful,
18.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
18.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18.16 + * Library General Public License for more
18.17 + */
18.18 +
18.19 +#ifndef __GST_MYTHTV_SRC_H__
18.20 +#define __GST_MYTHTV_SRC_H__
18.21 +
18.22 +#include <gst/gst.h>
18.23 +#include <gst/base/gstpushsrc.h>
18.24 +#include <stdio.h>
18.25 +
18.26 +#include <gmyth/gmyth_socket.h>
18.27 +#include "myth_file_transfer.h"
18.28 +#include "myth_livetv.h"
18.29 +
18.30 +G_BEGIN_DECLS
18.31 +
18.32 +#define GST_TYPE_MYTHTV_SRC \
18.33 + (gst_mythtv_src_get_type())
18.34 +#define GST_MYTHTV_SRC(obj) \
18.35 + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MYTHTV_SRC,GstMythtvSrc))
18.36 +#define GST_MYTHTV_SRC_CLASS(klass) \
18.37 + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MYTHTV_SRC,GstMythtvSrcClass))
18.38 +#define GST_IS_MYTHTV_SRC(obj) \
18.39 + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MYTHTV_SRC))
18.40 +#define GST_IS_MYTHTV_SRC_CLASS(klass) \
18.41 + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MYTHTV_SRC))
18.42 +
18.43 +typedef struct _GstMythtvSrc GstMythtvSrc;
18.44 +typedef struct _GstMythtvSrcClass GstMythtvSrcClass;
18.45 +
18.46 +struct _GstMythtvSrc {
18.47 + GstBaseSrc element;
18.48 +
18.49 + /* MythFileTransfer */
18.50 + MythFileTransfer *file_transfer;
18.51 +
18.52 + MythLiveTV *spawn_livetv;
18.53 +
18.54 + gchar *uri_name;
18.55 + gchar *user_agent;
18.56 +
18.57 + gchar *live_chain_id;
18.58 +
18.59 + gint mythtv_version;
18.60 +
18.61 + guint64 content_size;
18.62 +
18.63 + guint64 bytes_read;
18.64 +
18.65 + guint64 read_offset;
18.66 +
18.67 + gboolean eos;
18.68 +
18.69 + gboolean do_start;
18.70 +
18.71 + gboolean unique_setup;
18.72 +
18.73 + gboolean live_tv;
18.74 +
18.75 + gint live_tv_id;
18.76 +
18.77 + /* MythTV capabilities */
18.78 + GstCaps *mythtv_caps;
18.79 +
18.80 + /* enable Myth TV debug messages */
18.81 + gboolean mythtv_msgs_dbg;
18.82 +};
18.83 +
18.84 +struct _GstMythtvSrcClass {
18.85 + GstBaseSrcClass parent_class;
18.86 +};
18.87 +
18.88 +GType gst_mythtv_src_get_type (void);
18.89 +
18.90 +G_END_DECLS
18.91 +
18.92 +#endif /* __GST_MYTHTV_SRC_H__ */
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/mythtv_plugin/install-sh Wed Sep 20 23:59:48 2006 +0100
19.3 @@ -0,0 +1,325 @@
19.4 +#!/bin/sh
19.5 +# install - install a program, script, or datafile
19.6 +
19.7 +scriptversion=2004-04-01.17
19.8 +
19.9 +# This originates from X11R5 (mit/util/scripts/install.sh), which was
19.10 +# later released in X11R6 (xc/config/util/install.sh) with the
19.11 +# following copyright and license.
19.12 +#
19.13 +# Copyright (C) 1994 X Consortium
19.14 +#
19.15 +# Permission is hereby granted, free of charge, to any person obtaining a copy
19.16 +# of this software and associated documentation files (the "Software"), to
19.17 +# deal in the Software without restriction, including without limitation the
19.18 +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
19.19 +# sell copies of the Software, and to permit persons to whom the Software is
19.20 +# furnished to do so, subject to the following conditions:
19.21 +#
19.22 +# The above copyright notice and this permission notice shall be included in
19.23 +# all copies or substantial portions of the Software.
19.24 +#
19.25 +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19.26 +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19.27 +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19.28 +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19.29 +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
19.30 +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19.31 +#
19.32 +# Except as contained in this notice, the name of the X Consortium shall not
19.33 +# be used in advertising or otherwise to promote the sale, use or other deal-
19.34 +# ings in this Software without prior written authorization from the X Consor-
19.35 +# tium.
19.36 +#
19.37 +#
19.38 +# FSF changes to this file are in the public domain.
19.39 +#
19.40 +# Calling this script install-sh is preferred over install.sh, to prevent
19.41 +# `make' implicit rules from creating a file called install from it
19.42 +# when there is no Makefile.
19.43 +#
19.44 +# This script is compatible with the BSD install script, but was written
19.45 +# from scratch. It can only install one file at a time, a restriction
19.46 +# shared with many OS's install programs.
19.47 +
19.48 +# set DOITPROG to echo to test this script
19.49 +
19.50 +# Don't use :- since 4.3BSD and earlier shells don't like it.
19.51 +doit="${DOITPROG-}"
19.52 +
19.53 +# put in absolute paths if you don't have them in your path; or use env. vars.
19.54 +
19.55 +mvprog="${MVPROG-mv}"
19.56 +cpprog="${CPPROG-cp}"
19.57 +chmodprog="${CHMODPROG-chmod}"
19.58 +chownprog="${CHOWNPROG-chown}"
19.59 +chgrpprog="${CHGRPPROG-chgrp}"
19.60 +stripprog="${STRIPPROG-strip}"
19.61 +rmprog="${RMPROG-rm}"
19.62 +mkdirprog="${MKDIRPROG-mkdir}"
19.63 +
19.64 +transformbasename=
19.65 +transform_arg=
19.66 +instcmd="$mvprog"
19.67 +chmodcmd="$chmodprog 0755"
19.68 +chowncmd=
19.69 +chgrpcmd=
19.70 +stripcmd=
19.71 +rmcmd="$rmprog -f"
19.72 +mvcmd="$mvprog"
19.73 +src=
19.74 +dst=
19.75 +dir_arg=
19.76 +
19.77 +usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
19.78 + or: $0 [OPTION]... SRCFILES... DIRECTORY
19.79 + or: $0 -d DIRECTORIES...
19.80 +
19.81 +In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
19.82 +In the second, create the directory path DIR.
19.83 +
19.84 +Options:
19.85 +-b=TRANSFORMBASENAME
19.86 +-c copy source (using $cpprog) instead of moving (using $mvprog).
19.87 +-d create directories instead of installing files.
19.88 +-g GROUP $chgrp installed files to GROUP.
19.89 +-m MODE $chmod installed files to MODE.
19.90 +-o USER $chown installed files to USER.
19.91 +-s strip installed files (using $stripprog).
19.92 +-t=TRANSFORM
19.93 +--help display this help and exit.
19.94 +--version display version info and exit.
19.95 +
19.96 +Environment variables override the default commands:
19.97 + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
19.98 +"
19.99 +
19.100 +while test -n "$1"; do
19.101 + case $1 in
19.102 + -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
19.103 + shift
19.104 + continue;;
19.105 +
19.106 + -c) instcmd=$cpprog
19.107 + shift
19.108 + continue;;
19.109 +
19.110 + -d) dir_arg=true
19.111 + shift
19.112 + continue;;
19.113 +
19.114 + -g) chgrpcmd="$chgrpprog $2"
19.115 + shift
19.116 + shift
19.117 + continue;;
19.118 +
19.119 + --help) echo "$usage"; exit 0;;
19.120 +
19.121 + -m) chmodcmd="$chmodprog $2"
19.122 + shift
19.123 + shift
19.124 + continue;;
19.125 +
19.126 + -o) chowncmd="$chownprog $2"
19.127 + shift
19.128 + shift
19.129 + continue;;
19.130 +
19.131 + -s) stripcmd=$stripprog
19.132 + shift
19.133 + continue;;
19.134 +
19.135 + -t=*) transformarg=`echo $1 | sed 's/-t=//'`
19.136 + shift
19.137 + continue;;
19.138 +
19.139 + --version) echo "$0 $scriptversion"; exit 0;;
19.140 +
19.141 + *) # When -d is used, all remaining arguments are directories to create.
19.142 + test -n "$dir_arg" && break
19.143 + # Otherwise, the last argument is the destination. Remove it from $@.
19.144 + for arg
19.145 + do
19.146 + if test -n "$dstarg"; then
19.147 + # $@ is not empty: it contains at least $arg.
19.148 + set fnord "$@" "$dstarg"
19.149 + shift # fnord
19.150 + fi
19.151 + shift # arg
19.152 + dstarg=$arg
19.153 + done
19.154 + break;;
19.155 + esac
19.156 +done
19.157 +
19.158 +if test -z "$1"; then
19.159 + if test -z "$dir_arg"; then
19.160 + echo "$0: no input file specified." >&2
19.161 + exit 1
19.162 + fi
19.163 + # It's OK to call `install-sh -d' without argument.
19.164 + # This can happen when creating conditional directories.
19.165 + exit 0
19.166 +fi
19.167 +
19.168 +for src
19.169 +do
19.170 + # Protect names starting with `-'.
19.171 + case $src in
19.172 + -*) src=./$src ;;
19.173 + esac
19.174 +
19.175 + if test -n "$dir_arg"; then
19.176 + dst=$src
19.177 + src=
19.178 +
19.179 + if test -d "$dst"; then
19.180 + instcmd=:
19.181 + chmodcmd=
19.182 + else
19.183 + instcmd=$mkdirprog
19.184 + fi
19.185 + else
19.186 + # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
19.187 + # might cause directories to be created, which would be especially bad
19.188 + # if $src (and thus $dsttmp) contains '*'.
19.189 + if test ! -f "$src" && test ! -d "$src"; then
19.190 + echo "$0: $src does not exist." >&2
19.191 + exit 1
19.192 + fi
19.193 +
19.194 + if test -z "$dstarg"; then
19.195 + echo "$0: no destination specified." >&2
19.196 + exit 1
19.197 + fi
19.198 +
19.199 + dst=$dstarg
19.200 + # Protect names starting with `-'.
19.201 + case $dst in
19.202 + -*) dst=./$dst ;;
19.203 + esac
19.204 +
19.205 + # If destination is a directory, append the input filename; won't work
19.206 + # if double slashes aren't ignored.
19.207 + if test -d "$dst"; then
19.208 + dst=$dst/`basename "$src"`
19.209 + fi
19.210 + fi
19.211 +
19.212 + # This sed command emulates the dirname command.
19.213 + dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
19.214 +
19.215 + # Make sure that the destination directory exists.
19.216 +
19.217 + # Skip lots of stat calls in the usual case.
19.218 + if test ! -d "$dstdir"; then
19.219 + defaultIFS='
19.220 + '
19.221 + IFS="${IFS-$defaultIFS}"
19.222 +
19.223 + oIFS=$IFS
19.224 + # Some sh's can't handle IFS=/ for some reason.
19.225 + IFS='%'
19.226 + set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
19.227 + IFS=$oIFS
19.228 +
19.229 + pathcomp=
19.230 +
19.231 + while test $# -ne 0 ; do
19.232 + pathcomp=$pathcomp$1
19.233 + shift
19.234 + if test ! -d "$pathcomp"; then
19.235 + $mkdirprog "$pathcomp" || lasterr=$?
19.236 + # mkdir can fail with a `File exist' error in case several
19.237 + # install-sh are creating the directory concurrently. This
19.238 + # is OK.
19.239 + test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; }
19.240 + fi
19.241 + pathcomp=$pathcomp/
19.242 + done
19.243 + fi
19.244 +
19.245 + if test -n "$dir_arg"; then
19.246 + $doit $instcmd "$dst" \
19.247 + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
19.248 + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
19.249 + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
19.250 + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
19.251 +
19.252 + else
19.253 + # If we're going to rename the final executable, determine the name now.
19.254 + if test -z "$transformarg"; then
19.255 + dstfile=`basename "$dst"`
19.256 + else
19.257 + dstfile=`basename "$dst" $transformbasename \
19.258 + | sed $transformarg`$transformbasename
19.259 + fi
19.260 +
19.261 + # don't allow the sed command to completely eliminate the filename.
19.262 + test -z "$dstfile" && dstfile=`basename "$dst"`
19.263 +
19.264 + # Make a couple of temp file names in the proper directory.
19.265 + dsttmp=$dstdir/_inst.$$_
19.266 + rmtmp=$dstdir/_rm.$$_
19.267 +
19.268 + # Trap to clean up those temp files at exit.
19.269 + trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
19.270 + trap '(exit $?); exit' 1 2 13 15
19.271 +
19.272 + # Move or copy the file name to the temp name
19.273 + $doit $instcmd "$src" "$dsttmp" &&
19.274 +
19.275 + # and set any options; do chmod last to preserve setuid bits.
19.276 + #
19.277 + # If any of these fail, we abort the whole thing. If we want to
19.278 + # ignore errors from any of these, just make sure not to ignore
19.279 + # errors from the above "$doit $instcmd $src $dsttmp" command.
19.280 + #
19.281 + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
19.282 + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
19.283 + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
19.284 + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
19.285 +
19.286 + # Now rename the file to the real destination.
19.287 + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
19.288 + || {
19.289 + # The rename failed, perhaps because mv can't rename something else
19.290 + # to itself, or perhaps because mv is so ancient that it does not
19.291 + # support -f.
19.292 +
19.293 + # Now remove or move aside any old file at destination location.
19.294 + # We try this two ways since rm can't unlink itself on some
19.295 + # systems and the destination file might be busy for other
19.296 + # reasons. In this case, the final cleanup might fail but the new
19.297 + # file should still install successfully.
19.298 + {
19.299 + if test -f "$dstdir/$dstfile"; then
19.300 + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
19.301 + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
19.302 + || {
19.303 + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
19.304 + (exit 1); exit
19.305 + }
19.306 + else
19.307 + :
19.308 + fi
19.309 + } &&
19.310 +
19.311 + # Now rename the file to the real destination.
19.312 + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
19.313 + }
19.314 + }
19.315 + fi || { (exit 1); exit; }
19.316 +done
19.317 +
19.318 +# The final little trick to "correctly" pass the exit status to the exit trap.
19.319 +{
19.320 + (exit 0); exit
19.321 +}
19.322 +
19.323 +# Local variables:
19.324 +# eval: (add-hook 'write-file-hooks 'time-stamp)
19.325 +# time-stamp-start: "scriptversion="
19.326 +# time-stamp-format: "%:y-%02m-%02d.%02H"
19.327 +# time-stamp-end: "$"
19.328 +# End:
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
20.2 +++ b/mythtv_plugin/list_nuvs.txt Wed Sep 20 23:59:48 2006 +0100
20.3 @@ -0,0 +1,12 @@
20.4 +-rw-r--r-- 1 root root 18571375 2006-08-01 11:13 1000_20060801111003.nuv
20.5 +-rw-r--r-- 1 root root 54497771 2006-08-01 11:35 1000_20060801112503.nuv
20.6 +-rw-rw-rw- 1 root root 13014 2006-08-01 11:35 1000_20060801112503.nuv.png
20.7 +-rw-r--r-- 1 root root 9426451 2006-08-10 19:00 1000_20060810185736.nuv
20.8 +-rw-rw-rw- 1 root root 1994 2006-08-10 19:00 1000_20060810185736.nuv.png
20.9 +-rw-r--r-- 1 root root 117860332 2006-08-10 19:30 1000_20060810190003.nuv
20.10 +-rw-r--r-- 1 root root 21139175 2006-08-17 15:15 1000_20060817151003.nuv
20.11 +-rw-rw-rw- 1 root root 8703 2006-08-17 15:15 1000_20060817151003.nuv.png
20.12 +
20.13 +
20.14 +hallyson's perfomance:
20.15 +mplayer 1000_20060801112503.nuv
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
21.2 +++ b/mythtv_plugin/ltmain.sh Wed Sep 20 23:59:48 2006 +0100
21.3 @@ -0,0 +1,6426 @@
21.4 +# ltmain.sh - Provide generalized library-building support services.
21.5 +# NOTE: Changing this file will not affect anything until you rerun configure.
21.6 +#
21.7 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
21.8 +# Free Software Foundation, Inc.
21.9 +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
21.10 +#
21.11 +# This program is free software; you can redistribute it and/or modify
21.12 +# it under the terms of the GNU General Public License as published by
21.13 +# the Free Software Foundation; either version 2 of the License, or
21.14 +# (at your option) any later version.
21.15 +#
21.16 +# This program is distributed in the hope that it will be useful, but
21.17 +# WITHOUT ANY WARRANTY; without even the implied warranty of
21.18 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21.19 +# General Public License for more details.
21.20 +#
21.21 +# You should have received a copy of the GNU General Public License
21.22 +# along with this program; if not, write to the Free Software
21.23 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21.24 +#
21.25 +# As a special exception to the GNU General Public License, if you
21.26 +# distribute this file as part of a program that contains a
21.27 +# configuration script generated by Autoconf, you may include it under
21.28 +# the same distribution terms that you use for the rest of that program.
21.29 +
21.30 +basename="s,^.*/,,g"
21.31 +
21.32 +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
21.33 +# is ksh but when the shell is invoked as "sh" and the current value of
21.34 +# the _XPG environment variable is not equal to 1 (one), the special
21.35 +# positional parameter $0, within a function call, is the name of the
21.36 +# function.
21.37 +progpath="$0"
21.38 +
21.39 +# The name of this program:
21.40 +progname=`echo "$progpath" | $SED $basename`
21.41 +modename="$progname"
21.42 +
21.43 +# Global variables:
21.44 +EXIT_SUCCESS=0
21.45 +EXIT_FAILURE=1
21.46 +
21.47 +PROGRAM=ltmain.sh
21.48 +PACKAGE=libtool
21.49 +VERSION=1.5.6
21.50 +TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42) Debian$Rev: 224 $"
21.51 +
21.52 +
21.53 +# Check that we have a working $echo.
21.54 +if test "X$1" = X--no-reexec; then
21.55 + # Discard the --no-reexec flag, and continue.
21.56 + shift
21.57 +elif test "X$1" = X--fallback-echo; then
21.58 + # Avoid inline document here, it may be left over
21.59 + :
21.60 +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
21.61 + # Yippee, $echo works!
21.62 + :
21.63 +else
21.64 + # Restart under the correct shell, and then maybe $echo will work.
21.65 + exec $SHELL "$progpath" --no-reexec ${1+"$@"}
21.66 +fi
21.67 +
21.68 +if test "X$1" = X--fallback-echo; then
21.69 + # used as fallback echo
21.70 + shift
21.71 + cat <<EOF
21.72 +$*
21.73 +EOF
21.74 + exit $EXIT_SUCCESS
21.75 +fi
21.76 +
21.77 +default_mode=
21.78 +help="Try \`$progname --help' for more information."
21.79 +magic="%%%MAGIC variable%%%"
21.80 +mkdir="mkdir"
21.81 +mv="mv -f"
21.82 +rm="rm -f"
21.83 +
21.84 +# Sed substitution that helps us do robust quoting. It backslashifies
21.85 +# metacharacters that are still active within double-quoted strings.
21.86 +Xsed="${SED}"' -e 1s/^X//'
21.87 +sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
21.88 +# test EBCDIC or ASCII
21.89 +case `echo A|tr A '\301'` in
21.90 + A) # EBCDIC based system
21.91 + SP2NL="tr '\100' '\n'"
21.92 + NL2SP="tr '\r\n' '\100\100'"
21.93 + ;;
21.94 + *) # Assume ASCII based system
21.95 + SP2NL="tr '\040' '\012'"
21.96 + NL2SP="tr '\015\012' '\040\040'"
21.97 + ;;
21.98 +esac
21.99 +
21.100 +# NLS nuisances.
21.101 +# Only set LANG and LC_ALL to C if already set.
21.102 +# These must not be set unconditionally because not all systems understand
21.103 +# e.g. LANG=C (notably SCO).
21.104 +# We save the old values to restore during execute mode.
21.105 +if test "${LC_ALL+set}" = set; then
21.106 + save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
21.107 +fi
21.108 +if test "${LANG+set}" = set; then
21.109 + save_LANG="$LANG"; LANG=C; export LANG
21.110 +fi
21.111 +
21.112 +# Make sure IFS has a sensible default
21.113 +: ${IFS="
21.114 +"}
21.115 +
21.116 +if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
21.117 + $echo "$modename: not configured to build any kind of library" 1>&2
21.118 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
21.119 + exit $EXIT_FAILURE
21.120 +fi
21.121 +
21.122 +# Global variables.
21.123 +mode=$default_mode
21.124 +nonopt=
21.125 +prev=
21.126 +prevopt=
21.127 +run=
21.128 +show="$echo"
21.129 +show_help=
21.130 +execute_dlfiles=
21.131 +lo2o="s/\\.lo\$/.${objext}/"
21.132 +o2lo="s/\\.${objext}\$/.lo/"
21.133 +
21.134 +#####################################
21.135 +# Shell function definitions:
21.136 +# This seems to be the best place for them
21.137 +
21.138 +# func_win32_libid arg
21.139 +# return the library type of file 'arg'
21.140 +#
21.141 +# Need a lot of goo to handle *both* DLLs and import libs
21.142 +# Has to be a shell function in order to 'eat' the argument
21.143 +# that is supplied when $file_magic_command is called.
21.144 +func_win32_libid () {
21.145 + win32_libid_type="unknown"
21.146 + win32_fileres=`file -L $1 2>/dev/null`
21.147 + case $win32_fileres in
21.148 + *ar\ archive\ import\ library*) # definitely import
21.149 + win32_libid_type="x86 archive import"
21.150 + ;;
21.151 + *ar\ archive*) # could be an import, or static
21.152 + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
21.153 + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
21.154 + win32_nmres=`eval $NM -f posix -A $1 | \
21.155 + sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
21.156 + if test "X$win32_nmres" = "Ximport" ; then
21.157 + win32_libid_type="x86 archive import"
21.158 + else
21.159 + win32_libid_type="x86 archive static"
21.160 + fi
21.161 + fi
21.162 + ;;
21.163 + *DLL*)
21.164 + win32_libid_type="x86 DLL"
21.165 + ;;
21.166 + *executable*) # but shell scripts are "executable" too...
21.167 + case $win32_fileres in
21.168 + *MS\ Windows\ PE\ Intel*)
21.169 + win32_libid_type="x86 DLL"
21.170 + ;;
21.171 + esac
21.172 + ;;
21.173 + esac
21.174 + $echo $win32_libid_type
21.175 +}
21.176 +
21.177 +
21.178 +# func_infer_tag arg
21.179 +# Infer tagged configuration to use if any are available and
21.180 +# if one wasn't chosen via the "--tag" command line option.
21.181 +# Only attempt this if the compiler in the base compile
21.182 +# command doesn't match the default compiler.
21.183 +# arg is usually of the form 'gcc ...'
21.184 +func_infer_tag () {
21.185 + if test -n "$available_tags" && test -z "$tagname"; then
21.186 + CC_quoted=
21.187 + for arg in $CC; do
21.188 + case $arg in
21.189 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
21.190 + arg="\"$arg\""
21.191 + ;;
21.192 + esac
21.193 + CC_quoted="$CC_quoted $arg"
21.194 + done
21.195 + case $@ in
21.196 + # Blanks in the command may have been stripped by the calling shell,
21.197 + # but not from the CC environment variable when configure was run.
21.198 + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
21.199 + # Blanks at the start of $base_compile will cause this to fail
21.200 + # if we don't check for them as well.
21.201 + *)
21.202 + for z in $available_tags; do
21.203 + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
21.204 + # Evaluate the configuration.
21.205 + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
21.206 + CC_quoted=
21.207 + for arg in $CC; do
21.208 + # Double-quote args containing other shell metacharacters.
21.209 + case $arg in
21.210 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
21.211 + arg="\"$arg\""
21.212 + ;;
21.213 + esac
21.214 + CC_quoted="$CC_quoted $arg"
21.215 + done
21.216 + case "$@ " in
21.217 + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
21.218 + # The compiler in the base compile command matches
21.219 + # the one in the tagged configuration.
21.220 + # Assume this is the tagged configuration we want.
21.221 + tagname=$z
21.222 + break
21.223 + ;;
21.224 + esac
21.225 + fi
21.226 + done
21.227 + # If $tagname still isn't set, then no tagged configuration
21.228 + # was found and let the user know that the "--tag" command
21.229 + # line option must be used.
21.230 + if test -z "$tagname"; then
21.231 + $echo "$modename: unable to infer tagged configuration"
21.232 + $echo "$modename: specify a tag with \`--tag'" 1>&2
21.233 + exit $EXIT_FAILURE
21.234 +# else
21.235 +# $echo "$modename: using $tagname tagged configuration"
21.236 + fi
21.237 + ;;
21.238 + esac
21.239 + fi
21.240 +}
21.241 +# End of Shell function definitions
21.242 +#####################################
21.243 +
21.244 +# Darwin sucks
21.245 +eval std_shrext=\"$shrext_cmds\"
21.246 +
21.247 +# Parse our command line options once, thoroughly.
21.248 +while test "$#" -gt 0
21.249 +do
21.250 + arg="$1"
21.251 + shift
21.252 +
21.253 + case $arg in
21.254 + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
21.255 + *) optarg= ;;
21.256 + esac
21.257 +
21.258 + # If the previous option needs an argument, assign it.
21.259 + if test -n "$prev"; then
21.260 + case $prev in
21.261 + execute_dlfiles)
21.262 + execute_dlfiles="$execute_dlfiles $arg"
21.263 + ;;
21.264 + tag)
21.265 + tagname="$arg"
21.266 + preserve_args="${preserve_args}=$arg"
21.267 +
21.268 + # Check whether tagname contains only valid characters
21.269 + case $tagname in
21.270 + *[!-_A-Za-z0-9,/]*)
21.271 + $echo "$progname: invalid tag name: $tagname" 1>&2
21.272 + exit $EXIT_FAILURE
21.273 + ;;
21.274 + esac
21.275 +
21.276 + case $tagname in
21.277 + CC)
21.278 + # Don't test for the "default" C tag, as we know, it's there, but
21.279 + # not specially marked.
21.280 + ;;
21.281 + *)
21.282 + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
21.283 + taglist="$taglist $tagname"
21.284 + # Evaluate the configuration.
21.285 + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
21.286 + else
21.287 + $echo "$progname: ignoring unknown tag $tagname" 1>&2
21.288 + fi
21.289 + ;;
21.290 + esac
21.291 + ;;
21.292 + *)
21.293 + eval "$prev=\$arg"
21.294 + ;;
21.295 + esac
21.296 +
21.297 + prev=
21.298 + prevopt=
21.299 + continue
21.300 + fi
21.301 +
21.302 + # Have we seen a non-optional argument yet?
21.303 + case $arg in
21.304 + --help)
21.305 + show_help=yes
21.306 + ;;
21.307 +
21.308 + --version)
21.309 + $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
21.310 + $echo
21.311 + $echo "Copyright (C) 2003 Free Software Foundation, Inc."
21.312 + $echo "This is free software; see the source for copying conditions. There is NO"
21.313 + $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
21.314 + exit $EXIT_SUCCESS
21.315 + ;;
21.316 +
21.317 + --config)
21.318 + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
21.319 + # Now print the configurations for the tags.
21.320 + for tagname in $taglist; do
21.321 + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
21.322 + done
21.323 + exit $EXIT_SUCCESS
21.324 + ;;
21.325 +
21.326 + --debug)
21.327 + $echo "$progname: enabling shell trace mode"
21.328 + set -x
21.329 + preserve_args="$preserve_args $arg"
21.330 + ;;
21.331 +
21.332 + --dry-run | -n)
21.333 + run=:
21.334 + ;;
21.335 +
21.336 + --features)
21.337 + $echo "host: $host"
21.338 + if test "$build_libtool_libs" = yes; then
21.339 + $echo "enable shared libraries"
21.340 + else
21.341 + $echo "disable shared libraries"
21.342 + fi
21.343 + if test "$build_old_libs" = yes; then
21.344 + $echo "enable static libraries"
21.345 + else
21.346 + $echo "disable static libraries"
21.347 + fi
21.348 + exit $EXIT_SUCCESS
21.349 + ;;
21.350 +
21.351 + --finish) mode="finish" ;;
21.352 +
21.353 + --mode) prevopt="--mode" prev=mode ;;
21.354 + --mode=*) mode="$optarg" ;;
21.355 +
21.356 + --preserve-dup-deps) duplicate_deps="yes" ;;
21.357 +
21.358 + --quiet | --silent)
21.359 + show=:
21.360 + preserve_args="$preserve_args $arg"
21.361 + ;;
21.362 +
21.363 + --tag) prevopt="--tag" prev=tag ;;
21.364 + --tag=*)
21.365 + set tag "$optarg" ${1+"$@"}
21.366 + shift
21.367 + prev=tag
21.368 + preserve_args="$preserve_args --tag"
21.369 + ;;
21.370 +
21.371 + -dlopen)
21.372 + prevopt="-dlopen"
21.373 + prev=execute_dlfiles
21.374 + ;;
21.375 +
21.376 + -*)
21.377 + $echo "$modename: unrecognized option \`$arg'" 1>&2
21.378 + $echo "$help" 1>&2
21.379 + exit $EXIT_FAILURE
21.380 + ;;
21.381 +
21.382 + *)
21.383 + nonopt="$arg"
21.384 + break
21.385 + ;;
21.386 + esac
21.387 +done
21.388 +
21.389 +if test -n "$prevopt"; then
21.390 + $echo "$modename: option \`$prevopt' requires an argument" 1>&2
21.391 + $echo "$help" 1>&2
21.392 + exit $EXIT_FAILURE
21.393 +fi
21.394 +
21.395 +# If this variable is set in any of the actions, the command in it
21.396 +# will be execed at the end. This prevents here-documents from being
21.397 +# left over by shells.
21.398 +exec_cmd=
21.399 +
21.400 +if test -z "$show_help"; then
21.401 +
21.402 + # Infer the operation mode.
21.403 + if test -z "$mode"; then
21.404 + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
21.405 + $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
21.406 + case $nonopt in
21.407 + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
21.408 + mode=link
21.409 + for arg
21.410 + do
21.411 + case $arg in
21.412 + -c)
21.413 + mode=compile
21.414 + break
21.415 + ;;
21.416 + esac
21.417 + done
21.418 + ;;
21.419 + *db | *dbx | *strace | *truss)
21.420 + mode=execute
21.421 + ;;
21.422 + *install*|cp|mv)
21.423 + mode=install
21.424 + ;;
21.425 + *rm)
21.426 + mode=uninstall
21.427 + ;;
21.428 + *)
21.429 + # If we have no mode, but dlfiles were specified, then do execute mode.
21.430 + test -n "$execute_dlfiles" && mode=execute
21.431 +
21.432 + # Just use the default operation mode.
21.433 + if test -z "$mode"; then
21.434 + if test -n "$nonopt"; then
21.435 + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
21.436 + else
21.437 + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
21.438 + fi
21.439 + fi
21.440 + ;;
21.441 + esac
21.442 + fi
21.443 +
21.444 + # Only execute mode is allowed to have -dlopen flags.
21.445 + if test -n "$execute_dlfiles" && test "$mode" != execute; then
21.446 + $echo "$modename: unrecognized option \`-dlopen'" 1>&2
21.447 + $echo "$help" 1>&2
21.448 + exit $EXIT_FAILURE
21.449 + fi
21.450 +
21.451 + # Change the help message to a mode-specific one.
21.452 + generic_help="$help"
21.453 + help="Try \`$modename --help --mode=$mode' for more information."
21.454 +
21.455 + # These modes are in order of execution frequency so that they run quickly.
21.456 + case $mode in
21.457 + # libtool compile mode
21.458 + compile)
21.459 + modename="$modename: compile"
21.460 + # Get the compilation command and the source file.
21.461 + base_compile=
21.462 + srcfile="$nonopt" # always keep a non-empty value in "srcfile"
21.463 + suppress_opt=yes
21.464 + suppress_output=
21.465 + arg_mode=normal
21.466 + libobj=
21.467 + later=
21.468 +
21.469 + for arg
21.470 + do
21.471 + case "$arg_mode" in
21.472 + arg )
21.473 + # do not "continue". Instead, add this to base_compile
21.474 + lastarg="$arg"
21.475 + arg_mode=normal
21.476 + ;;
21.477 +
21.478 + target )
21.479 + libobj="$arg"
21.480 + arg_mode=normal
21.481 + continue
21.482 + ;;
21.483 +
21.484 + normal )
21.485 + # Accept any command-line options.
21.486 + case $arg in
21.487 + -o)
21.488 + if test -n "$libobj" ; then
21.489 + $echo "$modename: you cannot specify \`-o' more than once" 1>&2
21.490 + exit $EXIT_FAILURE
21.491 + fi
21.492 + arg_mode=target
21.493 + continue
21.494 + ;;
21.495 +
21.496 + -static | -prefer-pic | -prefer-non-pic)
21.497 + later="$later $arg"
21.498 + continue
21.499 + ;;
21.500 +
21.501 + -no-suppress)
21.502 + suppress_opt=no
21.503 + continue
21.504 + ;;
21.505 +
21.506 + -Xcompiler)
21.507 + arg_mode=arg # the next one goes into the "base_compile" arg list
21.508 + continue # The current "srcfile" will either be retained or
21.509 + ;; # replaced later. I would guess that would be a bug.
21.510 +
21.511 + -Wc,*)
21.512 + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
21.513 + lastarg=
21.514 + save_ifs="$IFS"; IFS=','
21.515 + for arg in $args; do
21.516 + IFS="$save_ifs"
21.517 +
21.518 + # Double-quote args containing other shell metacharacters.
21.519 + # Many Bourne shells cannot handle close brackets correctly
21.520 + # in scan sets, so we specify it separately.
21.521 + case $arg in
21.522 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
21.523 + arg="\"$arg\""
21.524 + ;;
21.525 + esac
21.526 + lastarg="$lastarg $arg"
21.527 + done
21.528 + IFS="$save_ifs"
21.529 + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
21.530 +
21.531 + # Add the arguments to base_compile.
21.532 + base_compile="$base_compile $lastarg"
21.533 + continue
21.534 + ;;
21.535 +
21.536 + * )
21.537 + # Accept the current argument as the source file.
21.538 + # The previous "srcfile" becomes the current argument.
21.539 + #
21.540 + lastarg="$srcfile"
21.541 + srcfile="$arg"
21.542 + ;;
21.543 + esac # case $arg
21.544 + ;;
21.545 + esac # case $arg_mode
21.546 +
21.547 + # Aesthetically quote the previous argument.
21.548 + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
21.549 +
21.550 + case $lastarg in
21.551 + # Double-quote args containing other shell metacharacters.
21.552 + # Many Bourne shells cannot handle close brackets correctly
21.553 + # in scan sets, so we specify it separately.
21.554 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
21.555 + lastarg="\"$lastarg\""
21.556 + ;;
21.557 + esac
21.558 +
21.559 + base_compile="$base_compile $lastarg"
21.560 + done # for arg
21.561 +
21.562 + case $arg_mode in
21.563 + arg)
21.564 + $echo "$modename: you must specify an argument for -Xcompile"
21.565 + exit $EXIT_FAILURE
21.566 + ;;
21.567 + target)
21.568 + $echo "$modename: you must specify a target with \`-o'" 1>&2
21.569 + exit $EXIT_FAILURE
21.570 + ;;
21.571 + *)
21.572 + # Get the name of the library object.
21.573 + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
21.574 + ;;
21.575 + esac
21.576 +
21.577 + # Recognize several different file suffixes.
21.578 + # If the user specifies -o file.o, it is replaced with file.lo
21.579 + xform='[cCFSifmso]'
21.580 + case $libobj in
21.581 + *.ada) xform=ada ;;
21.582 + *.adb) xform=adb ;;
21.583 + *.ads) xform=ads ;;
21.584 + *.asm) xform=asm ;;
21.585 + *.c++) xform=c++ ;;
21.586 + *.cc) xform=cc ;;
21.587 + *.ii) xform=ii ;;
21.588 + *.class) xform=class ;;
21.589 + *.cpp) xform=cpp ;;
21.590 + *.cxx) xform=cxx ;;
21.591 + *.f90) xform=f90 ;;
21.592 + *.for) xform=for ;;
21.593 + *.java) xform=java ;;
21.594 + esac
21.595 +
21.596 + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
21.597 +
21.598 + case $libobj in
21.599 + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
21.600 + *)
21.601 + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
21.602 + exit $EXIT_FAILURE
21.603 + ;;
21.604 + esac
21.605 +
21.606 + func_infer_tag $base_compile
21.607 +
21.608 + for arg in $later; do
21.609 + case $arg in
21.610 + -static)
21.611 + build_old_libs=yes
21.612 + continue
21.613 + ;;
21.614 +
21.615 + -prefer-pic)
21.616 + pic_mode=yes
21.617 + continue
21.618 + ;;
21.619 +
21.620 + -prefer-non-pic)
21.621 + pic_mode=no
21.622 + continue
21.623 + ;;
21.624 + esac
21.625 + done
21.626 +
21.627 + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
21.628 + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
21.629 + if test "X$xdir" = "X$obj"; then
21.630 + xdir=
21.631 + else
21.632 + xdir=$xdir/
21.633 + fi
21.634 + lobj=${xdir}$objdir/$objname
21.635 +
21.636 + if test -z "$base_compile"; then
21.637 + $echo "$modename: you must specify a compilation command" 1>&2
21.638 + $echo "$help" 1>&2
21.639 + exit $EXIT_FAILURE
21.640 + fi
21.641 +
21.642 + # Delete any leftover library objects.
21.643 + if test "$build_old_libs" = yes; then
21.644 + removelist="$obj $lobj $libobj ${libobj}T"
21.645 + else
21.646 + removelist="$lobj $libobj ${libobj}T"
21.647 + fi
21.648 +
21.649 + $run $rm $removelist
21.650 + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
21.651 +
21.652 + # On Cygwin there's no "real" PIC flag so we must build both object types
21.653 + case $host_os in
21.654 + cygwin* | mingw* | pw32* | os2*)
21.655 + pic_mode=default
21.656 + ;;
21.657 + esac
21.658 + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
21.659 + # non-PIC code in shared libraries is not supported
21.660 + pic_mode=default
21.661 + fi
21.662 +
21.663 + # Calculate the filename of the output object if compiler does
21.664 + # not support -o with -c
21.665 + if test "$compiler_c_o" = no; then
21.666 + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
21.667 + lockfile="$output_obj.lock"
21.668 + removelist="$removelist $output_obj $lockfile"
21.669 + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
21.670 + else
21.671 + output_obj=
21.672 + need_locks=no
21.673 + lockfile=
21.674 + fi
21.675 +
21.676 + # Lock this critical section if it is needed
21.677 + # We use this script file to make the link, it avoids creating a new file
21.678 + if test "$need_locks" = yes; then
21.679 + until $run ln "$progpath" "$lockfile" 2>/dev/null; do
21.680 + $show "Waiting for $lockfile to be removed"
21.681 + sleep 2
21.682 + done
21.683 + elif test "$need_locks" = warn; then
21.684 + if test -f "$lockfile"; then
21.685 + $echo "\
21.686 +*** ERROR, $lockfile exists and contains:
21.687 +`cat $lockfile 2>/dev/null`
21.688 +
21.689 +This indicates that another process is trying to use the same
21.690 +temporary object file, and libtool could not work around it because
21.691 +your compiler does not support \`-c' and \`-o' together. If you
21.692 +repeat this compilation, it may succeed, by chance, but you had better
21.693 +avoid parallel builds (make -j) in this platform, or get a better
21.694 +compiler."
21.695 +
21.696 + $run $rm $removelist
21.697 + exit $EXIT_FAILURE
21.698 + fi
21.699 + $echo $srcfile > "$lockfile"
21.700 + fi
21.701 +
21.702 + if test -n "$fix_srcfile_path"; then
21.703 + eval srcfile=\"$fix_srcfile_path\"
21.704 + fi
21.705 +
21.706 + $run $rm "$libobj" "${libobj}T"
21.707 +
21.708 + # Create a libtool object file (analogous to a ".la" file),
21.709 + # but don't create it if we're doing a dry run.
21.710 + test -z "$run" && cat > ${libobj}T <<EOF
21.711 +# $libobj - a libtool object file
21.712 +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
21.713 +#
21.714 +# Please DO NOT delete this file!
21.715 +# It is necessary for linking the library.
21.716 +
21.717 +# Name of the PIC object.
21.718 +EOF
21.719 +
21.720 + # Only build a PIC object if we are building libtool libraries.
21.721 + if test "$build_libtool_libs" = yes; then
21.722 + # Without this assignment, base_compile gets emptied.
21.723 + fbsd_hideous_sh_bug=$base_compile
21.724 +
21.725 + if test "$pic_mode" != no; then
21.726 + command="$base_compile $srcfile $pic_flag"
21.727 + else
21.728 + # Don't build PIC code
21.729 + command="$base_compile $srcfile"
21.730 + fi
21.731 +
21.732 + if test ! -d "${xdir}$objdir"; then
21.733 + $show "$mkdir ${xdir}$objdir"
21.734 + $run $mkdir ${xdir}$objdir
21.735 + status=$?
21.736 + if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
21.737 + exit $status
21.738 + fi
21.739 + fi
21.740 +
21.741 + if test -z "$output_obj"; then
21.742 + # Place PIC objects in $objdir
21.743 + command="$command -o $lobj"
21.744 + fi
21.745 +
21.746 + $run $rm "$lobj" "$output_obj"
21.747 +
21.748 + $show "$command"
21.749 + if $run eval "$command"; then :
21.750 + else
21.751 + test -n "$output_obj" && $run $rm $removelist
21.752 + exit $EXIT_FAILURE
21.753 + fi
21.754 +
21.755 + if test "$need_locks" = warn &&
21.756 + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
21.757 + $echo "\
21.758 +*** ERROR, $lockfile contains:
21.759 +`cat $lockfile 2>/dev/null`
21.760 +
21.761 +but it should contain:
21.762 +$srcfile
21.763 +
21.764 +This indicates that another process is trying to use the same
21.765 +temporary object file, and libtool could not work around it because
21.766 +your compiler does not support \`-c' and \`-o' together. If you
21.767 +repeat this compilation, it may succeed, by chance, but you had better
21.768 +avoid parallel builds (make -j) in this platform, or get a better
21.769 +compiler."
21.770 +
21.771 + $run $rm $removelist
21.772 + exit $EXIT_FAILURE
21.773 + fi
21.774 +
21.775 + # Just move the object if needed, then go on to compile the next one
21.776 + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
21.777 + $show "$mv $output_obj $lobj"
21.778 + if $run $mv $output_obj $lobj; then :
21.779 + else
21.780 + error=$?
21.781 + $run $rm $removelist
21.782 + exit $error
21.783 + fi
21.784 + fi
21.785 +
21.786 + # Append the name of the PIC object to the libtool object file.
21.787 + test -z "$run" && cat >> ${libobj}T <<EOF
21.788 +pic_object='$objdir/$objname'
21.789 +
21.790 +EOF
21.791 +
21.792 + # Allow error messages only from the first compilation.
21.793 + if test "$suppress_opt" = yes; then
21.794 + suppress_output=' >/dev/null 2>&1'
21.795 + fi
21.796 + else
21.797 + # No PIC object so indicate it doesn't exist in the libtool
21.798 + # object file.
21.799 + test -z "$run" && cat >> ${libobj}T <<EOF
21.800 +pic_object=none
21.801 +
21.802 +EOF
21.803 + fi
21.804 +
21.805 + # Only build a position-dependent object if we build old libraries.
21.806 + if test "$build_old_libs" = yes; then
21.807 + if test "$pic_mode" != yes; then
21.808 + # Don't build PIC code
21.809 + command="$base_compile $srcfile"
21.810 + else
21.811 + command="$base_compile $srcfile $pic_flag"
21.812 + fi
21.813 + if test "$compiler_c_o" = yes; then
21.814 + command="$command -o $obj"
21.815 + fi
21.816 +
21.817 + # Suppress compiler output if we already did a PIC compilation.
21.818 + command="$command$suppress_output"
21.819 + $run $rm "$obj" "$output_obj"
21.820 + $show "$command"
21.821 + if $run eval "$command"; then :
21.822 + else
21.823 + $run $rm $removelist
21.824 + exit $EXIT_FAILURE
21.825 + fi
21.826 +
21.827 + if test "$need_locks" = warn &&
21.828 + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
21.829 + $echo "\
21.830 +*** ERROR, $lockfile contains:
21.831 +`cat $lockfile 2>/dev/null`
21.832 +
21.833 +but it should contain:
21.834 +$srcfile
21.835 +
21.836 +This indicates that another process is trying to use the same
21.837 +temporary object file, and libtool could not work around it because
21.838 +your compiler does not support \`-c' and \`-o' together. If you
21.839 +repeat this compilation, it may succeed, by chance, but you had better
21.840 +avoid parallel builds (make -j) in this platform, or get a better
21.841 +compiler."
21.842 +
21.843 + $run $rm $removelist
21.844 + exit $EXIT_FAILURE
21.845 + fi
21.846 +
21.847 + # Just move the object if needed
21.848 + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
21.849 + $show "$mv $output_obj $obj"
21.850 + if $run $mv $output_obj $obj; then :
21.851 + else
21.852 + error=$?
21.853 + $run $rm $removelist
21.854 + exit $error
21.855 + fi
21.856 + fi
21.857 +
21.858 + # Append the name of the non-PIC object the libtool object file.
21.859 + # Only append if the libtool object file exists.
21.860 + test -z "$run" && cat >> ${libobj}T <<EOF
21.861 +# Name of the non-PIC object.
21.862 +non_pic_object='$objname'
21.863 +
21.864 +EOF
21.865 + else
21.866 + # Append the name of the non-PIC object the libtool object file.
21.867 + # Only append if the libtool object file exists.
21.868 + test -z "$run" && cat >> ${libobj}T <<EOF
21.869 +# Name of the non-PIC object.
21.870 +non_pic_object=none
21.871 +
21.872 +EOF
21.873 + fi
21.874 +
21.875 + $run $mv "${libobj}T" "${libobj}"
21.876 +
21.877 + # Unlock the critical section if it was locked
21.878 + if test "$need_locks" != no; then
21.879 + $run $rm "$lockfile"
21.880 + fi
21.881 +
21.882 + exit $EXIT_SUCCESS
21.883 + ;;
21.884 +
21.885 + # libtool link mode
21.886 + link | relink)
21.887 + modename="$modename: link"
21.888 + case $host in
21.889 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
21.890 + # It is impossible to link a dll without this setting, and
21.891 + # we shouldn't force the makefile maintainer to figure out
21.892 + # which system we are compiling for in order to pass an extra
21.893 + # flag for every libtool invocation.
21.894 + # allow_undefined=no
21.895 +
21.896 + # FIXME: Unfortunately, there are problems with the above when trying
21.897 + # to make a dll which has undefined symbols, in which case not
21.898 + # even a static library is built. For now, we need to specify
21.899 + # -no-undefined on the libtool link line when we can be certain
21.900 + # that all symbols are satisfied, otherwise we get a static library.
21.901 + allow_undefined=yes
21.902 + ;;
21.903 + *)
21.904 + allow_undefined=yes
21.905 + ;;
21.906 + esac
21.907 + libtool_args="$nonopt"
21.908 + base_compile="$nonopt $@"
21.909 + compile_command="$nonopt"
21.910 + finalize_command="$nonopt"
21.911 +
21.912 + compile_rpath=
21.913 + finalize_rpath=
21.914 + compile_shlibpath=
21.915 + finalize_shlibpath=
21.916 + convenience=
21.917 + old_convenience=
21.918 + deplibs=
21.919 + old_deplibs=
21.920 + compiler_flags=
21.921 + linker_flags=
21.922 + dllsearchpath=
21.923 + lib_search_path=`pwd`
21.924 + inst_prefix_dir=
21.925 +
21.926 + avoid_version=no
21.927 + dlfiles=
21.928 + dlprefiles=
21.929 + dlself=no
21.930 + export_dynamic=no
21.931 + export_symbols=
21.932 + export_symbols_regex=
21.933 + generated=
21.934 + libobjs=
21.935 + ltlibs=
21.936 + module=no
21.937 + no_install=no
21.938 + objs=
21.939 + non_pic_objects=
21.940 + precious_files_regex=
21.941 + prefer_static_libs=no
21.942 + preload=no
21.943 + prev=
21.944 + prevarg=
21.945 + release=
21.946 + rpath=
21.947 + xrpath=
21.948 + perm_rpath=
21.949 + temp_rpath=
21.950 + thread_safe=no
21.951 + vinfo=
21.952 + vinfo_number=no
21.953 +
21.954 + func_infer_tag $base_compile
21.955 +
21.956 + # We need to know -static, to get the right output filenames.
21.957 + for arg
21.958 + do
21.959 + case $arg in
21.960 + -all-static | -static)
21.961 + if test "X$arg" = "X-all-static"; then
21.962 + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
21.963 + $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
21.964 + fi
21.965 + if test -n "$link_static_flag"; then
21.966 + dlopen_self=$dlopen_self_static
21.967 + fi
21.968 + else
21.969 + if test -z "$pic_flag" && test -n "$link_static_flag"; then
21.970 + dlopen_self=$dlopen_self_static
21.971 + fi
21.972 + fi
21.973 + build_libtool_libs=no
21.974 + build_old_libs=yes
21.975 + prefer_static_libs=yes
21.976 + break
21.977 + ;;
21.978 + esac
21.979 + done
21.980 +
21.981 + # See if our shared archives depend on static archives.
21.982 + test -n "$old_archive_from_new_cmds" && build_old_libs=yes
21.983 +
21.984 + # Go through the arguments, transforming them on the way.
21.985 + while test "$#" -gt 0; do
21.986 + arg="$1"
21.987 + shift
21.988 + case $arg in
21.989 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
21.990 + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
21.991 + ;;
21.992 + *) qarg=$arg ;;
21.993 + esac
21.994 + libtool_args="$libtool_args $qarg"
21.995 +
21.996 + # If the previous option needs an argument, assign it.
21.997 + if test -n "$prev"; then
21.998 + case $prev in
21.999 + output)
21.1000 + compile_command="$compile_command @OUTPUT@"
21.1001 + finalize_command="$finalize_command @OUTPUT@"
21.1002 + ;;
21.1003 + esac
21.1004 +
21.1005 + case $prev in
21.1006 + dlfiles|dlprefiles)
21.1007 + if test "$preload" = no; then
21.1008 + # Add the symbol object into the linking commands.
21.1009 + compile_command="$compile_command @SYMFILE@"
21.1010 + finalize_command="$finalize_command @SYMFILE@"
21.1011 + preload=yes
21.1012 + fi
21.1013 + case $arg in
21.1014 + *.la | *.lo) ;; # We handle these cases below.
21.1015 + force)
21.1016 + if test "$dlself" = no; then
21.1017 + dlself=needless
21.1018 + export_dynamic=yes
21.1019 + fi
21.1020 + prev=
21.1021 + continue
21.1022 + ;;
21.1023 + self)
21.1024 + if test "$prev" = dlprefiles; then
21.1025 + dlself=yes
21.1026 + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
21.1027 + dlself=yes
21.1028 + else
21.1029 + dlself=needless
21.1030 + export_dynamic=yes
21.1031 + fi
21.1032 + prev=
21.1033 + continue
21.1034 + ;;
21.1035 + *)
21.1036 + if test "$prev" = dlfiles; then
21.1037 + dlfiles="$dlfiles $arg"
21.1038 + else
21.1039 + dlprefiles="$dlprefiles $arg"
21.1040 + fi
21.1041 + prev=
21.1042 + continue
21.1043 + ;;
21.1044 + esac
21.1045 + ;;
21.1046 + expsyms)
21.1047 + export_symbols="$arg"
21.1048 + if test ! -f "$arg"; then
21.1049 + $echo "$modename: symbol file \`$arg' does not exist"
21.1050 + exit $EXIT_FAILURE
21.1051 + fi
21.1052 + prev=
21.1053 + continue
21.1054 + ;;
21.1055 + expsyms_regex)
21.1056 + export_symbols_regex="$arg"
21.1057 + prev=
21.1058 + continue
21.1059 + ;;
21.1060 + inst_prefix)
21.1061 + inst_prefix_dir="$arg"
21.1062 + prev=
21.1063 + continue
21.1064 + ;;
21.1065 + precious_regex)
21.1066 + precious_files_regex="$arg"
21.1067 + prev=
21.1068 + continue
21.1069 + ;;
21.1070 + release)
21.1071 + release="-$arg"
21.1072 + prev=
21.1073 + continue
21.1074 + ;;
21.1075 + objectlist)
21.1076 + if test -f "$arg"; then
21.1077 + save_arg=$arg
21.1078 + moreargs=
21.1079 + for fil in `cat $save_arg`
21.1080 + do
21.1081 +# moreargs="$moreargs $fil"
21.1082 + arg=$fil
21.1083 + # A libtool-controlled object.
21.1084 +
21.1085 + # Check to see that this really is a libtool object.
21.1086 + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
21.1087 + pic_object=
21.1088 + non_pic_object=
21.1089 +
21.1090 + # Read the .lo file
21.1091 + # If there is no directory component, then add one.
21.1092 + case $arg in
21.1093 + */* | *\\*) . $arg ;;
21.1094 + *) . ./$arg ;;
21.1095 + esac
21.1096 +
21.1097 + if test -z "$pic_object" || \
21.1098 + test -z "$non_pic_object" ||
21.1099 + test "$pic_object" = none && \
21.1100 + test "$non_pic_object" = none; then
21.1101 + $echo "$modename: cannot find name of object for \`$arg'" 1>&2
21.1102 + exit $EXIT_FAILURE
21.1103 + fi
21.1104 +
21.1105 + # Extract subdirectory from the argument.
21.1106 + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
21.1107 + if test "X$xdir" = "X$arg"; then
21.1108 + xdir=
21.1109 + else
21.1110 + xdir="$xdir/"
21.1111 + fi
21.1112 +
21.1113 + if test "$pic_object" != none; then
21.1114 + # Prepend the subdirectory the object is found in.
21.1115 + pic_object="$xdir$pic_object"
21.1116 +
21.1117 + if test "$prev" = dlfiles; then
21.1118 + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
21.1119 + dlfiles="$dlfiles $pic_object"
21.1120 + prev=
21.1121 + continue
21.1122 + else
21.1123 + # If libtool objects are unsupported, then we need to preload.
21.1124 + prev=dlprefiles
21.1125 + fi
21.1126 + fi
21.1127 +
21.1128 + # CHECK ME: I think I busted this. -Ossama
21.1129 + if test "$prev" = dlprefiles; then
21.1130 + # Preload the old-style object.
21.1131 + dlprefiles="$dlprefiles $pic_object"
21.1132 + prev=
21.1133 + fi
21.1134 +
21.1135 + # A PIC object.
21.1136 + libobjs="$libobjs $pic_object"
21.1137 + arg="$pic_object"
21.1138 + fi
21.1139 +
21.1140 + # Non-PIC object.
21.1141 + if test "$non_pic_object" != none; then
21.1142 + # Prepend the subdirectory the object is found in.
21.1143 + non_pic_object="$xdir$non_pic_object"
21.1144 +
21.1145 + # A standard non-PIC object
21.1146 + non_pic_objects="$non_pic_objects $non_pic_object"
21.1147 + if test -z "$pic_object" || test "$pic_object" = none ; then
21.1148 + arg="$non_pic_object"
21.1149 + fi
21.1150 + fi
21.1151 + else
21.1152 + # Only an error if not doing a dry-run.
21.1153 + if test -z "$run"; then
21.1154 + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
21.1155 + exit $EXIT_FAILURE
21.1156 + else
21.1157 + # Dry-run case.
21.1158 +
21.1159 + # Extract subdirectory from the argument.
21.1160 + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
21.1161 + if test "X$xdir" = "X$arg"; then
21.1162 + xdir=
21.1163 + else
21.1164 + xdir="$xdir/"
21.1165 + fi
21.1166 +
21.1167 + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
21.1168 + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
21.1169 + libobjs="$libobjs $pic_object"
21.1170 + non_pic_objects="$non_pic_objects $non_pic_object"
21.1171 + fi
21.1172 + fi
21.1173 + done
21.1174 + else
21.1175 + $echo "$modename: link input file \`$save_arg' does not exist"
21.1176 + exit $EXIT_FAILURE
21.1177 + fi
21.1178 + arg=$save_arg
21.1179 + prev=
21.1180 + continue
21.1181 + ;;
21.1182 + rpath | xrpath)
21.1183 + # We need an absolute path.
21.1184 + case $arg in
21.1185 + [\\/]* | [A-Za-z]:[\\/]*) ;;
21.1186 + *)
21.1187 + $echo "$modename: only absolute run-paths are allowed" 1>&2
21.1188 + exit $EXIT_FAILURE
21.1189 + ;;
21.1190 + esac
21.1191 + if test "$prev" = rpath; then
21.1192 + case "$rpath " in
21.1193 + *" $arg "*) ;;
21.1194 + *) rpath="$rpath $arg" ;;
21.1195 + esac
21.1196 + else
21.1197 + case "$xrpath " in
21.1198 + *" $arg "*) ;;
21.1199 + *) xrpath="$xrpath $arg" ;;
21.1200 + esac
21.1201 + fi
21.1202 + prev=
21.1203 + continue
21.1204 + ;;
21.1205 + xcompiler)
21.1206 + compiler_flags="$compiler_flags $qarg"
21.1207 + prev=
21.1208 + compile_command="$compile_command $qarg"
21.1209 + finalize_command="$finalize_command $qarg"
21.1210 + continue
21.1211 + ;;
21.1212 + xlinker)
21.1213 + linker_flags="$linker_flags $qarg"
21.1214 + compiler_flags="$compiler_flags $wl$qarg"
21.1215 + prev=
21.1216 + compile_command="$compile_command $wl$qarg"
21.1217 + finalize_command="$finalize_command $wl$qarg"
21.1218 + continue
21.1219 + ;;
21.1220 + xcclinker)
21.1221 + linker_flags="$linker_flags $qarg"
21.1222 + compiler_flags="$compiler_flags $qarg"
21.1223 + prev=
21.1224 + compile_command="$compile_command $qarg"
21.1225 + finalize_command="$finalize_command $qarg"
21.1226 + continue
21.1227 + ;;
21.1228 + shrext)
21.1229 + shrext_cmds="$arg"
21.1230 + prev=
21.1231 + continue
21.1232 + ;;
21.1233 + *)
21.1234 + eval "$prev=\"\$arg\""
21.1235 + prev=
21.1236 + continue
21.1237 + ;;
21.1238 + esac
21.1239 + fi # test -n "$prev"
21.1240 +
21.1241 + prevarg="$arg"
21.1242 +
21.1243 + case $arg in
21.1244 + -all-static)
21.1245 + if test -n "$link_static_flag"; then
21.1246 + compile_command="$compile_command $link_static_flag"
21.1247 + finalize_command="$finalize_command $link_static_flag"
21.1248 + fi
21.1249 + continue
21.1250 + ;;
21.1251 +
21.1252 + -allow-undefined)
21.1253 + # FIXME: remove this flag sometime in the future.
21.1254 + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
21.1255 + continue
21.1256 + ;;
21.1257 +
21.1258 + -avoid-version)
21.1259 + avoid_version=yes
21.1260 + continue
21.1261 + ;;
21.1262 +
21.1263 + -dlopen)
21.1264 + prev=dlfiles
21.1265 + continue
21.1266 + ;;
21.1267 +
21.1268 + -dlpreopen)
21.1269 + prev=dlprefiles
21.1270 + continue
21.1271 + ;;
21.1272 +
21.1273 + -export-dynamic)
21.1274 + export_dynamic=yes
21.1275 + continue
21.1276 + ;;
21.1277 +
21.1278 + -export-symbols | -export-symbols-regex)
21.1279 + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
21.1280 + $echo "$modename: more than one -exported-symbols argument is not allowed"
21.1281 + exit $EXIT_FAILURE
21.1282 + fi
21.1283 + if test "X$arg" = "X-export-symbols"; then
21.1284 + prev=expsyms
21.1285 + else
21.1286 + prev=expsyms_regex
21.1287 + fi
21.1288 + continue
21.1289 + ;;
21.1290 +
21.1291 + -inst-prefix-dir)
21.1292 + prev=inst_prefix
21.1293 + continue
21.1294 + ;;
21.1295 +
21.1296 + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
21.1297 + # so, if we see these flags be careful not to treat them like -L
21.1298 + -L[A-Z][A-Z]*:*)
21.1299 + case $with_gcc/$host in
21.1300 + no/*-*-irix* | /*-*-irix*)
21.1301 + compile_command="$compile_command $arg"
21.1302 + finalize_command="$finalize_command $arg"
21.1303 + ;;
21.1304 + esac
21.1305 + continue
21.1306 + ;;
21.1307 +
21.1308 + -L*)
21.1309 + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
21.1310 + # We need an absolute path.
21.1311 + case $dir in
21.1312 + [\\/]* | [A-Za-z]:[\\/]*) ;;
21.1313 + *)
21.1314 + absdir=`cd "$dir" && pwd`
21.1315 + if test -z "$absdir"; then
21.1316 + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
21.1317 + exit $EXIT_FAILURE
21.1318 + fi
21.1319 + dir="$absdir"
21.1320 + ;;
21.1321 + esac
21.1322 + case "$deplibs " in
21.1323 + *" -L$dir "*) ;;
21.1324 + *)
21.1325 + deplibs="$deplibs -L$dir"
21.1326 + lib_search_path="$lib_search_path $dir"
21.1327 + ;;
21.1328 + esac
21.1329 + case $host in
21.1330 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
21.1331 + case :$dllsearchpath: in
21.1332 + *":$dir:"*) ;;
21.1333 + *) dllsearchpath="$dllsearchpath:$dir";;
21.1334 + esac
21.1335 + ;;
21.1336 + esac
21.1337 + continue
21.1338 + ;;
21.1339 +
21.1340 + -l*)
21.1341 + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
21.1342 + case $host in
21.1343 + *-*-cygwin* | *-*-pw32* | *-*-beos*)
21.1344 + # These systems don't actually have a C or math library (as such)
21.1345 + continue
21.1346 + ;;
21.1347 + *-*-mingw* | *-*-os2*)
21.1348 + # These systems don't actually have a C library (as such)
21.1349 + test "X$arg" = "X-lc" && continue
21.1350 + ;;
21.1351 + *-*-openbsd* | *-*-freebsd*)
21.1352 + # Do not include libc due to us having libc/libc_r.
21.1353 + test "X$arg" = "X-lc" && continue
21.1354 + ;;
21.1355 + *-*-rhapsody* | *-*-darwin1.[012])
21.1356 + # Rhapsody C and math libraries are in the System framework
21.1357 + deplibs="$deplibs -framework System"
21.1358 + continue
21.1359 + esac
21.1360 + elif test "X$arg" = "X-lc_r"; then
21.1361 + case $host in
21.1362 + *-*-openbsd* | *-*-freebsd*)
21.1363 + # Do not include libc_r directly, use -pthread flag.
21.1364 + continue
21.1365 + ;;
21.1366 + esac
21.1367 + fi
21.1368 + deplibs="$deplibs $arg"
21.1369 + continue
21.1370 + ;;
21.1371 +
21.1372 + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
21.1373 + deplibs="$deplibs $arg"
21.1374 + continue
21.1375 + ;;
21.1376 +
21.1377 + -module)
21.1378 + module=yes
21.1379 + continue
21.1380 + ;;
21.1381 +
21.1382 + # gcc -m* arguments should be passed to the linker via $compiler_flags
21.1383 + # in order to pass architecture information to the linker
21.1384 + # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
21.1385 + # but this is not reliable with gcc because gcc may use -mfoo to
21.1386 + # select a different linker, different libraries, etc, while
21.1387 + # -Wl,-mfoo simply passes -mfoo to the linker.
21.1388 + -m*)
21.1389 + # Unknown arguments in both finalize_command and compile_command need
21.1390 + # to be aesthetically quoted because they are evaled later.
21.1391 + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
21.1392 + case $arg in
21.1393 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
21.1394 + arg="\"$arg\""
21.1395 + ;;
21.1396 + esac
21.1397 + compile_command="$compile_command $arg"
21.1398 + finalize_command="$finalize_command $arg"
21.1399 + if test "$with_gcc" = "yes" ; then
21.1400 + compiler_flags="$compiler_flags $arg"
21.1401 + fi
21.1402 + continue
21.1403 + ;;
21.1404 +
21.1405 + -shrext)
21.1406 + prev=shrext
21.1407 + continue
21.1408 + ;;
21.1409 +
21.1410 + -no-fast-install)
21.1411 + fast_install=no
21.1412 + continue
21.1413 + ;;
21.1414 +
21.1415 + -no-install)
21.1416 + case $host in
21.1417 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
21.1418 + # The PATH hackery in wrapper scripts is required on Windows
21.1419 + # in order for the loader to find any dlls it needs.
21.1420 + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
21.1421 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
21.1422 + fast_install=no
21.1423 + ;;
21.1424 + *) no_install=yes ;;
21.1425 + esac
21.1426 + continue
21.1427 + ;;
21.1428 +
21.1429 + -no-undefined)
21.1430 + allow_undefined=no
21.1431 + continue
21.1432 + ;;
21.1433 +
21.1434 + -objectlist)
21.1435 + prev=objectlist
21.1436 + continue
21.1437 + ;;
21.1438 +
21.1439 + -o) prev=output ;;
21.1440 +
21.1441 + -precious-files-regex)
21.1442 + prev=precious_regex
21.1443 + continue
21.1444 + ;;
21.1445 +
21.1446 + -release)
21.1447 + prev=release
21.1448 + continue
21.1449 + ;;
21.1450 +
21.1451 + -rpath)
21.1452 + prev=rpath
21.1453 + continue
21.1454 + ;;
21.1455 +
21.1456 + -R)
21.1457 + prev=xrpath
21.1458 + continue
21.1459 + ;;
21.1460 +
21.1461 + -R*)
21.1462 + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
21.1463 + # We need an absolute path.
21.1464 + case $dir in
21.1465 + [\\/]* | [A-Za-z]:[\\/]*) ;;
21.1466 + *)
21.1467 + $echo "$modename: only absolute run-paths are allowed" 1>&2
21.1468 + exit $EXIT_FAILURE
21.1469 + ;;
21.1470 + esac
21.1471 + case "$xrpath " in
21.1472 + *" $dir "*) ;;
21.1473 + *) xrpath="$xrpath $dir" ;;
21.1474 + esac
21.1475 + continue
21.1476 + ;;
21.1477 +
21.1478 + -static)
21.1479 + # The effects of -static are defined in a previous loop.
21.1480 + # We used to do the same as -all-static on platforms that
21.1481 + # didn't have a PIC flag, but the assumption that the effects
21.1482 + # would be equivalent was wrong. It would break on at least
21.1483 + # Digital Unix and AIX.
21.1484 + continue
21.1485 + ;;
21.1486 +
21.1487 + -thread-safe)
21.1488 + thread_safe=yes
21.1489 + continue
21.1490 + ;;
21.1491 +
21.1492 + -version-info)
21.1493 + prev=vinfo
21.1494 + continue
21.1495 + ;;
21.1496 + -version-number)
21.1497 + prev=vinfo
21.1498 + vinfo_number=yes
21.1499 + continue
21.1500 + ;;
21.1501 +
21.1502 + -Wc,*)
21.1503 + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
21.1504 + arg=
21.1505 + save_ifs="$IFS"; IFS=','
21.1506 + for flag in $args; do
21.1507 + IFS="$save_ifs"
21.1508 + case $flag in
21.1509 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
21.1510 + flag="\"$flag\""
21.1511 + ;;
21.1512 + esac
21.1513 + arg="$arg $wl$flag"
21.1514 + compiler_flags="$compiler_flags $flag"
21.1515 + done
21.1516 + IFS="$save_ifs"
21.1517 + arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
21.1518 + ;;
21.1519 +
21.1520 + -Wl,*)
21.1521 + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
21.1522 + arg=
21.1523 + save_ifs="$IFS"; IFS=','
21.1524 + for flag in $args; do
21.1525 + IFS="$save_ifs"
21.1526 + case $flag in
21.1527 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
21.1528 + flag="\"$flag\""
21.1529 + ;;
21.1530 + esac
21.1531 + arg="$arg $wl$flag"
21.1532 + compiler_flags="$compiler_flags $wl$flag"
21.1533 + linker_flags="$linker_flags $flag"
21.1534 + done
21.1535 + IFS="$save_ifs"
21.1536 + arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
21.1537 + ;;
21.1538 +
21.1539 + -Xcompiler)
21.1540 + prev=xcompiler
21.1541 + continue
21.1542 + ;;
21.1543 +
21.1544 + -Xlinker)
21.1545 + prev=xlinker
21.1546 + continue
21.1547 + ;;
21.1548 +
21.1549 + -XCClinker)
21.1550 + prev=xcclinker
21.1551 + continue
21.1552 + ;;
21.1553 +
21.1554 + # Some other compiler flag.
21.1555 + -* | +*)
21.1556 + # Unknown arguments in both finalize_command and compile_command need
21.1557 + # to be aesthetically quoted because they are evaled later.
21.1558 + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
21.1559 + case $arg in
21.1560 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
21.1561 + arg="\"$arg\""
21.1562 + ;;
21.1563 + esac
21.1564 + ;;
21.1565 +
21.1566 + *.$objext)
21.1567 + # A standard object.
21.1568 + objs="$objs $arg"
21.1569 + ;;
21.1570 +
21.1571 + *.lo)
21.1572 + # A libtool-controlled object.
21.1573 +
21.1574 + # Check to see that this really is a libtool object.
21.1575 + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
21.1576 + pic_object=
21.1577 + non_pic_object=
21.1578 +
21.1579 + # Read the .lo file
21.1580 + # If there is no directory component, then add one.
21.1581 + case $arg in
21.1582 + */* | *\\*) . $arg ;;
21.1583 + *) . ./$arg ;;
21.1584 + esac
21.1585 +
21.1586 + if test -z "$pic_object" || \
21.1587 + test -z "$non_pic_object" ||
21.1588 + test "$pic_object" = none && \
21.1589 + test "$non_pic_object" = none; then
21.1590 + $echo "$modename: cannot find name of object for \`$arg'" 1>&2
21.1591 + exit $EXIT_FAILURE
21.1592 + fi
21.1593 +
21.1594 + # Extract subdirectory from the argument.
21.1595 + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
21.1596 + if test "X$xdir" = "X$arg"; then
21.1597 + xdir=
21.1598 + else
21.1599 + xdir="$xdir/"
21.1600 + fi
21.1601 +
21.1602 + if test "$pic_object" != none; then
21.1603 + # Prepend the subdirectory the object is found in.
21.1604 + pic_object="$xdir$pic_object"
21.1605 +
21.1606 + if test "$prev" = dlfiles; then
21.1607 + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
21.1608 + dlfiles="$dlfiles $pic_object"
21.1609 + prev=
21.1610 + continue
21.1611 + else
21.1612 + # If libtool objects are unsupported, then we need to preload.
21.1613 + prev=dlprefiles
21.1614 + fi
21.1615 + fi
21.1616 +
21.1617 + # CHECK ME: I think I busted this. -Ossama
21.1618 + if test "$prev" = dlprefiles; then
21.1619 + # Preload the old-style object.
21.1620 + dlprefiles="$dlprefiles $pic_object"
21.1621 + prev=
21.1622 + fi
21.1623 +
21.1624 + # A PIC object.
21.1625 + libobjs="$libobjs $pic_object"
21.1626 + arg="$pic_object"
21.1627 + fi
21.1628 +
21.1629 + # Non-PIC object.
21.1630 + if test "$non_pic_object" != none; then
21.1631 + # Prepend the subdirectory the object is found in.
21.1632 + non_pic_object="$xdir$non_pic_object"
21.1633 +
21.1634 + # A standard non-PIC object
21.1635 + non_pic_objects="$non_pic_objects $non_pic_object"
21.1636 + if test -z "$pic_object" || test "$pic_object" = none ; then
21.1637 + arg="$non_pic_object"
21.1638 + fi
21.1639 + fi
21.1640 + else
21.1641 + # Only an error if not doing a dry-run.
21.1642 + if test -z "$run"; then
21.1643 + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
21.1644 + exit $EXIT_FAILURE
21.1645 + else
21.1646 + # Dry-run case.
21.1647 +
21.1648 + # Extract subdirectory from the argument.
21.1649 + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
21.1650 + if test "X$xdir" = "X$arg"; then
21.1651 + xdir=
21.1652 + else
21.1653 + xdir="$xdir/"
21.1654 + fi
21.1655 +
21.1656 + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
21.1657 + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
21.1658 + libobjs="$libobjs $pic_object"
21.1659 + non_pic_objects="$non_pic_objects $non_pic_object"
21.1660 + fi
21.1661 + fi
21.1662 + ;;
21.1663 +
21.1664 + *.$libext)
21.1665 + # An archive.
21.1666 + deplibs="$deplibs $arg"
21.1667 + old_deplibs="$old_deplibs $arg"
21.1668 + continue
21.1669 + ;;
21.1670 +
21.1671 + *.la)
21.1672 + # A libtool-controlled library.
21.1673 +
21.1674 + if test "$prev" = dlfiles; then
21.1675 + # This library was specified with -dlopen.
21.1676 + dlfiles="$dlfiles $arg"
21.1677 + prev=
21.1678 + elif test "$prev" = dlprefiles; then
21.1679 + # The library was specified with -dlpreopen.
21.1680 + dlprefiles="$dlprefiles $arg"
21.1681 + prev=
21.1682 + else
21.1683 + deplibs="$deplibs $arg"
21.1684 + fi
21.1685 + continue
21.1686 + ;;
21.1687 +
21.1688 + # Some other compiler argument.
21.1689 + *)
21.1690 + # Unknown arguments in both finalize_command and compile_command need
21.1691 + # to be aesthetically quoted because they are evaled later.
21.1692 + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
21.1693 + case $arg in
21.1694 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
21.1695 + arg="\"$arg\""
21.1696 + ;;
21.1697 + esac
21.1698 + ;;
21.1699 + esac # arg
21.1700 +
21.1701 + # Now actually substitute the argument into the commands.
21.1702 + if test -n "$arg"; then
21.1703 + compile_command="$compile_command $arg"
21.1704 + finalize_command="$finalize_command $arg"
21.1705 + fi
21.1706 + done # argument parsing loop
21.1707 +
21.1708 + if test -n "$prev"; then
21.1709 + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
21.1710 + $echo "$help" 1>&2
21.1711 + exit $EXIT_FAILURE
21.1712 + fi
21.1713 +
21.1714 + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
21.1715 + eval arg=\"$export_dynamic_flag_spec\"
21.1716 + compile_command="$compile_command $arg"
21.1717 + finalize_command="$finalize_command $arg"
21.1718 + fi
21.1719 +
21.1720 + oldlibs=
21.1721 + # calculate the name of the file, without its directory
21.1722 + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
21.1723 + libobjs_save="$libobjs"
21.1724 +
21.1725 + if test -n "$shlibpath_var"; then
21.1726 + # get the directories listed in $shlibpath_var
21.1727 + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
21.1728 + else
21.1729 + shlib_search_path=
21.1730 + fi
21.1731 + eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
21.1732 + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
21.1733 +
21.1734 + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
21.1735 + if test "X$output_objdir" = "X$output"; then
21.1736 + output_objdir="$objdir"
21.1737 + else
21.1738 + output_objdir="$output_objdir/$objdir"
21.1739 + fi
21.1740 + # Create the object directory.
21.1741 + if test ! -d "$output_objdir"; then
21.1742 + $show "$mkdir $output_objdir"
21.1743 + $run $mkdir $output_objdir
21.1744 + status=$?
21.1745 + if test "$status" -ne 0 && test ! -d "$output_objdir"; then
21.1746 + exit $status
21.1747 + fi
21.1748 + fi
21.1749 +
21.1750 + # Determine the type of output
21.1751 + case $output in
21.1752 + "")
21.1753 + $echo "$modename: you must specify an output file" 1>&2
21.1754 + $echo "$help" 1>&2
21.1755 + exit $EXIT_FAILURE
21.1756 + ;;
21.1757 + *.$libext) linkmode=oldlib ;;
21.1758 + *.lo | *.$objext) linkmode=obj ;;
21.1759 + *.la) linkmode=lib ;;
21.1760 + *) linkmode=prog ;; # Anything else should be a program.
21.1761 + esac
21.1762 +
21.1763 + case $host in
21.1764 + *cygwin* | *mingw* | *pw32*)
21.1765 + # don't eliminate duplications in $postdeps and $predeps
21.1766 + duplicate_compiler_generated_deps=yes
21.1767 + ;;
21.1768 + *)
21.1769 + duplicate_compiler_generated_deps=$duplicate_deps
21.1770 + ;;
21.1771 + esac
21.1772 + specialdeplibs=
21.1773 +
21.1774 + libs=
21.1775 + # Find all interdependent deplibs by searching for libraries
21.1776 + # that are linked more than once (e.g. -la -lb -la)
21.1777 + for deplib in $deplibs; do
21.1778 + if test "X$duplicate_deps" = "Xyes" ; then
21.1779 + case "$libs " in
21.1780 + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
21.1781 + esac
21.1782 + fi
21.1783 + libs="$libs $deplib"
21.1784 + done
21.1785 +
21.1786 + if test "$linkmode" = lib; then
21.1787 + libs="$predeps $libs $compiler_lib_search_path $postdeps"
21.1788 +
21.1789 + # Compute libraries that are listed more than once in $predeps
21.1790 + # $postdeps and mark them as special (i.e., whose duplicates are
21.1791 + # not to be eliminated).
21.1792 + pre_post_deps=
21.1793 + if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
21.1794 + for pre_post_dep in $predeps $postdeps; do
21.1795 + case "$pre_post_deps " in
21.1796 + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
21.1797 + esac
21.1798 + pre_post_deps="$pre_post_deps $pre_post_dep"
21.1799 + done
21.1800 + fi
21.1801 + pre_post_deps=
21.1802 + fi
21.1803 +
21.1804 + deplibs=
21.1805 + newdependency_libs=
21.1806 + newlib_search_path=
21.1807 + need_relink=no # whether we're linking any uninstalled libtool libraries
21.1808 + notinst_deplibs= # not-installed libtool libraries
21.1809 + notinst_path= # paths that contain not-installed libtool libraries
21.1810 + case $linkmode in
21.1811 + lib)
21.1812 + passes="conv link"
21.1813 + for file in $dlfiles $dlprefiles; do
21.1814 + case $file in
21.1815 + *.la) ;;
21.1816 + *)
21.1817 + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
21.1818 + exit $EXIT_FAILURE
21.1819 + ;;
21.1820 + esac
21.1821 + done
21.1822 + ;;
21.1823 + prog)
21.1824 + compile_deplibs=
21.1825 + finalize_deplibs=
21.1826 + alldeplibs=no
21.1827 + newdlfiles=
21.1828 + newdlprefiles=
21.1829 + passes="conv scan dlopen dlpreopen link"
21.1830 + ;;
21.1831 + *) passes="conv"
21.1832 + ;;
21.1833 + esac
21.1834 + for pass in $passes; do
21.1835 + if test "$linkmode,$pass" = "lib,link" ||
21.1836 + test "$linkmode,$pass" = "prog,scan"; then
21.1837 + libs="$deplibs"
21.1838 + deplibs=
21.1839 + fi
21.1840 + if test "$linkmode" = prog; then
21.1841 + case $pass in
21.1842 + dlopen) libs="$dlfiles" ;;
21.1843 + dlpreopen) libs="$dlprefiles" ;;
21.1844 + link)
21.1845 + libs="$deplibs %DEPLIBS%"
21.1846 + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
21.1847 + ;;
21.1848 + esac
21.1849 + fi
21.1850 + if test "$pass" = dlopen; then
21.1851 + # Collect dlpreopened libraries
21.1852 + save_deplibs="$deplibs"
21.1853 + deplibs=
21.1854 + fi
21.1855 + for deplib in $libs; do
21.1856 + lib=
21.1857 + found=no
21.1858 + case $deplib in
21.1859 + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
21.1860 + if test "$linkmode,$pass" = "prog,link"; then
21.1861 + compile_deplibs="$deplib $compile_deplibs"
21.1862 + finalize_deplibs="$deplib $finalize_deplibs"
21.1863 + else
21.1864 + deplibs="$deplib $deplibs"
21.1865 + fi
21.1866 + continue
21.1867 + ;;
21.1868 + -l*)
21.1869 + if test "$linkmode" != lib && test "$linkmode" != prog; then
21.1870 + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
21.1871 + continue
21.1872 + fi
21.1873 + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
21.1874 + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
21.1875 + for search_ext in .la $std_shrext .so .a; do
21.1876 + # Search the libtool library
21.1877 + lib="$searchdir/lib${name}${search_ext}"
21.1878 + if test -f "$lib"; then
21.1879 + if test "$search_ext" = ".la"; then
21.1880 + found=yes
21.1881 + else
21.1882 + found=no
21.1883 + fi
21.1884 + break 2
21.1885 + fi
21.1886 + done
21.1887 + done
21.1888 + if test "$found" != yes; then
21.1889 + # deplib doesn't seem to be a libtool library
21.1890 + if test "$linkmode,$pass" = "prog,link"; then
21.1891 + compile_deplibs="$deplib $compile_deplibs"
21.1892 + finalize_deplibs="$deplib $finalize_deplibs"
21.1893 + else
21.1894 + deplibs="$deplib $deplibs"
21.1895 + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
21.1896 + fi
21.1897 + continue
21.1898 + else # deplib is a libtool library
21.1899 + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
21.1900 + # We need to do some special things here, and not later.
21.1901 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
21.1902 + case " $predeps $postdeps " in
21.1903 + *" $deplib "*)
21.1904 + if (${SED} -e '2q' $lib |
21.1905 + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
21.1906 + library_names=
21.1907 + old_library=
21.1908 + case $lib in
21.1909 + */* | *\\*) . $lib ;;
21.1910 + *) . ./$lib ;;
21.1911 + esac
21.1912 + for l in $old_library $library_names; do
21.1913 + ll="$l"
21.1914 + done
21.1915 + if test "X$ll" = "X$old_library" ; then # only static version available
21.1916 + found=no
21.1917 + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
21.1918 + test "X$ladir" = "X$lib" && ladir="."
21.1919 + lib=$ladir/$old_library
21.1920 + if test "$linkmode,$pass" = "prog,link"; then
21.1921 + compile_deplibs="$deplib $compile_deplibs"
21.1922 + finalize_deplibs="$deplib $finalize_deplibs"
21.1923 + else
21.1924 + deplibs="$deplib $deplibs"
21.1925 + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
21.1926 + fi
21.1927 + continue
21.1928 + fi
21.1929 + fi
21.1930 + ;;
21.1931 + *) ;;
21.1932 + esac
21.1933 + fi
21.1934 + fi
21.1935 + ;; # -l
21.1936 + -L*)
21.1937 + case $linkmode in
21.1938 + lib)
21.1939 + deplibs="$deplib $deplibs"
21.1940 + test "$pass" = conv && continue
21.1941 + newdependency_libs="$deplib $newdependency_libs"
21.1942 + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
21.1943 + ;;
21.1944 + prog)
21.1945 + if test "$pass" = conv; then
21.1946 + deplibs="$deplib $deplibs"
21.1947 + continue
21.1948 + fi
21.1949 + if test "$pass" = scan; then
21.1950 + deplibs="$deplib $deplibs"
21.1951 + else
21.1952 + compile_deplibs="$deplib $compile_deplibs"
21.1953 + finalize_deplibs="$deplib $finalize_deplibs"
21.1954 + fi
21.1955 + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
21.1956 + ;;
21.1957 + *)
21.1958 + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
21.1959 + ;;
21.1960 + esac # linkmode
21.1961 + continue
21.1962 + ;; # -L
21.1963 + -R*)
21.1964 + if test "$pass" = link; then
21.1965 + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
21.1966 + # Make sure the xrpath contains only unique directories.
21.1967 + case "$xrpath " in
21.1968 + *" $dir "*) ;;
21.1969 + *) xrpath="$xrpath $dir" ;;
21.1970 + esac
21.1971 + fi
21.1972 + deplibs="$deplib $deplibs"
21.1973 + continue
21.1974 + ;;
21.1975 + *.la) lib="$deplib" ;;
21.1976 + *.$libext)
21.1977 + if test "$pass" = conv; then
21.1978 + deplibs="$deplib $deplibs"
21.1979 + continue
21.1980 + fi
21.1981 + case $linkmode in
21.1982 + lib)
21.1983 + if test "$deplibs_check_method" != pass_all; then
21.1984 + $echo
21.1985 + $echo "*** Warning: Trying to link with static lib archive $deplib."
21.1986 + $echo "*** I have the capability to make that library automatically link in when"
21.1987 + $echo "*** you link to this library. But I can only do this if you have a"
21.1988 + $echo "*** shared version of the library, which you do not appear to have"
21.1989 + $echo "*** because the file extensions .$libext of this argument makes me believe"
21.1990 + $echo "*** that it is just a static archive that I should not used here."
21.1991 + else
21.1992 + $echo
21.1993 + $echo "*** Warning: Linking the shared library $output against the"
21.1994 + $echo "*** static library $deplib is not portable!"
21.1995 + deplibs="$deplib $deplibs"
21.1996 + fi
21.1997 + continue
21.1998 + ;;
21.1999 + prog)
21.2000 + if test "$pass" != link; then
21.2001 + deplibs="$deplib $deplibs"
21.2002 + else
21.2003 + compile_deplibs="$deplib $compile_deplibs"
21.2004 + finalize_deplibs="$deplib $finalize_deplibs"
21.2005 + fi
21.2006 + continue
21.2007 + ;;
21.2008 + esac # linkmode
21.2009 + ;; # *.$libext
21.2010 + *.lo | *.$objext)
21.2011 + if test "$pass" = conv; then
21.2012 + deplibs="$deplib $deplibs"
21.2013 + elif test "$linkmode" = prog; then
21.2014 + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
21.2015 + # If there is no dlopen support or we're linking statically,
21.2016 + # we need to preload.
21.2017 + newdlprefiles="$newdlprefiles $deplib"
21.2018 + compile_deplibs="$deplib $compile_deplibs"
21.2019 + finalize_deplibs="$deplib $finalize_deplibs"
21.2020 + else
21.2021 + newdlfiles="$newdlfiles $deplib"
21.2022 + fi
21.2023 + fi
21.2024 + continue
21.2025 + ;;
21.2026 + %DEPLIBS%)
21.2027 + alldeplibs=yes
21.2028 + continue
21.2029 + ;;
21.2030 + esac # case $deplib
21.2031 + if test "$found" = yes || test -f "$lib"; then :
21.2032 + else
21.2033 + $echo "$modename: cannot find the library \`$lib'" 1>&2
21.2034 + exit $EXIT_FAILURE
21.2035 + fi
21.2036 +
21.2037 + # Check to see that this really is a libtool archive.
21.2038 + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
21.2039 + else
21.2040 + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
21.2041 + exit $EXIT_FAILURE
21.2042 + fi
21.2043 +
21.2044 + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
21.2045 + test "X$ladir" = "X$lib" && ladir="."
21.2046 +
21.2047 + dlname=
21.2048 + dlopen=
21.2049 + dlpreopen=
21.2050 + libdir=
21.2051 + library_names=
21.2052 + old_library=
21.2053 + # If the library was installed with an old release of libtool,
21.2054 + # it will not redefine variables installed, or shouldnotlink
21.2055 + installed=yes
21.2056 + shouldnotlink=no
21.2057 +
21.2058 + # Read the .la file
21.2059 + case $lib in
21.2060 + */* | *\\*) . $lib ;;
21.2061 + *) . ./$lib ;;
21.2062 + esac
21.2063 +
21.2064 + if test "$linkmode,$pass" = "lib,link" ||
21.2065 + test "$linkmode,$pass" = "prog,scan" ||
21.2066 + { test "$linkmode" != prog && test "$linkmode" != lib; }; then
21.2067 + test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
21.2068 + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
21.2069 + fi
21.2070 +
21.2071 + if test "$pass" = conv; then
21.2072 + # Only check for convenience libraries
21.2073 + deplibs="$lib $deplibs"
21.2074 + if test -z "$libdir"; then
21.2075 + if test -z "$old_library"; then
21.2076 + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
21.2077 + exit $EXIT_FAILURE
21.2078 + fi
21.2079 + # It is a libtool convenience library, so add in its objects.
21.2080 + convenience="$convenience $ladir/$objdir/$old_library"
21.2081 + old_convenience="$old_convenience $ladir/$objdir/$old_library"
21.2082 + tmp_libs=
21.2083 + for deplib in $dependency_libs; do
21.2084 + deplibs="$deplib $deplibs"
21.2085 + if test "X$duplicate_deps" = "Xyes" ; then
21.2086 + case "$tmp_libs " in
21.2087 + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
21.2088 + esac
21.2089 + fi
21.2090 + tmp_libs="$tmp_libs $deplib"
21.2091 + done
21.2092 + elif test "$linkmode" != prog && test "$linkmode" != lib; then
21.2093 + $echo "$modename: \`$lib' is not a convenience library" 1>&2
21.2094 + exit $EXIT_FAILURE
21.2095 + fi
21.2096 + continue
21.2097 + fi # $pass = conv
21.2098 +
21.2099 +
21.2100 + # Get the name of the library we link against.
21.2101 + linklib=
21.2102 + for l in $old_library $library_names; do
21.2103 + linklib="$l"
21.2104 + done
21.2105 + if test -z "$linklib"; then
21.2106 + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
21.2107 + exit $EXIT_FAILURE
21.2108 + fi
21.2109 +
21.2110 + # This library was specified with -dlopen.
21.2111 + if test "$pass" = dlopen; then
21.2112 + if test -z "$libdir"; then
21.2113 + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
21.2114 + exit $EXIT_FAILURE
21.2115 + fi
21.2116 + if test -z "$dlname" ||
21.2117 + test "$dlopen_support" != yes ||
21.2118 + test "$build_libtool_libs" = no; then
21.2119 + # If there is no dlname, no dlopen support or we're linking
21.2120 + # statically, we need to preload. We also need to preload any
21.2121 + # dependent libraries so libltdl's deplib preloader doesn't
21.2122 + # bomb out in the load deplibs phase.
21.2123 + dlprefiles="$dlprefiles $lib $dependency_libs"
21.2124 + else
21.2125 + newdlfiles="$newdlfiles $lib"
21.2126 + fi
21.2127 + continue
21.2128 + fi # $pass = dlopen
21.2129 +
21.2130 + # We need an absolute path.
21.2131 + case $ladir in
21.2132 + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
21.2133 + *)
21.2134 + abs_ladir=`cd "$ladir" && pwd`
21.2135 + if test -z "$abs_ladir"; then
21.2136 + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
21.2137 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
21.2138 + abs_ladir="$ladir"
21.2139 + fi
21.2140 + ;;
21.2141 + esac
21.2142 + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
21.2143 +
21.2144 + # Find the relevant object directory and library name.
21.2145 + if test "X$installed" = Xyes; then
21.2146 + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
21.2147 + $echo "$modename: warning: library \`$lib' was moved." 1>&2
21.2148 + dir="$ladir"
21.2149 + absdir="$abs_ladir"
21.2150 + libdir="$abs_ladir"
21.2151 + else
21.2152 + dir="$libdir"
21.2153 + absdir="$libdir"
21.2154 + fi
21.2155 + else
21.2156 + dir="$ladir/$objdir"
21.2157 + absdir="$abs_ladir/$objdir"
21.2158 + # Remove this search path later
21.2159 + notinst_path="$notinst_path $abs_ladir"
21.2160 + fi # $installed = yes
21.2161 + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
21.2162 +
21.2163 + # This library was specified with -dlpreopen.
21.2164 + if test "$pass" = dlpreopen; then
21.2165 + if test -z "$libdir"; then
21.2166 + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
21.2167 + exit $EXIT_FAILURE
21.2168 + fi
21.2169 + # Prefer using a static library (so that no silly _DYNAMIC symbols
21.2170 + # are required to link).
21.2171 + if test -n "$old_library"; then
21.2172 + newdlprefiles="$newdlprefiles $dir/$old_library"
21.2173 + # Otherwise, use the dlname, so that lt_dlopen finds it.
21.2174 + elif test -n "$dlname"; then
21.2175 + newdlprefiles="$newdlprefiles $dir/$dlname"
21.2176 + else
21.2177 + newdlprefiles="$newdlprefiles $dir/$linklib"
21.2178 + fi
21.2179 + fi # $pass = dlpreopen
21.2180 +
21.2181 + if test -z "$libdir"; then
21.2182 + # Link the convenience library
21.2183 + if test "$linkmode" = lib; then
21.2184 + deplibs="$dir/$old_library $deplibs"
21.2185 + elif test "$linkmode,$pass" = "prog,link"; then
21.2186 + compile_deplibs="$dir/$old_library $compile_deplibs"
21.2187 + finalize_deplibs="$dir/$old_library $finalize_deplibs"
21.2188 + else
21.2189 + deplibs="$lib $deplibs" # used for prog,scan pass
21.2190 + fi
21.2191 + continue
21.2192 + fi
21.2193 +
21.2194 +
21.2195 + if test "$linkmode" = prog && test "$pass" != link; then
21.2196 + newlib_search_path="$newlib_search_path $ladir"
21.2197 + deplibs="$lib $deplibs"
21.2198 +
21.2199 + linkalldeplibs=no
21.2200 + if test "$link_all_deplibs" != no || test -z "$library_names" ||
21.2201 + test "$build_libtool_libs" = no; then
21.2202 + linkalldeplibs=yes
21.2203 + fi
21.2204 +
21.2205 + tmp_libs=
21.2206 + for deplib in $dependency_libs; do
21.2207 + case $deplib in
21.2208 + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
21.2209 + esac
21.2210 + # Need to link against all dependency_libs?
21.2211 + if test "$linkalldeplibs" = yes; then
21.2212 + deplibs="$deplib $deplibs"
21.2213 + else
21.2214 + # Need to hardcode shared library paths
21.2215 + # or/and link against static libraries
21.2216 + newdependency_libs="$deplib $newdependency_libs"
21.2217 + fi
21.2218 + if test "X$duplicate_deps" = "Xyes" ; then
21.2219 + case "$tmp_libs " in
21.2220 + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
21.2221 + esac
21.2222 + fi
21.2223 + tmp_libs="$tmp_libs $deplib"
21.2224 + done # for deplib
21.2225 + continue
21.2226 + fi # $linkmode = prog...
21.2227 +
21.2228 + if test "$linkmode,$pass" = "prog,link"; then
21.2229 + if test -n "$library_names" &&
21.2230 + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
21.2231 + # We need to hardcode the library path
21.2232 + if test -n "$shlibpath_var"; then
21.2233 + # Make sure the rpath contains only unique directories.
21.2234 + case "$temp_rpath " in
21.2235 + *" $dir "*) ;;
21.2236 + *" $absdir "*) ;;
21.2237 + *) temp_rpath="$temp_rpath $dir" ;;
21.2238 + esac
21.2239 + fi
21.2240 +
21.2241 + # Hardcode the library path.
21.2242 + # Skip directories that are in the system default run-time
21.2243 + # search path.
21.2244 + case " $sys_lib_dlsearch_path " in
21.2245 + *" $absdir "*) ;;
21.2246 + *)
21.2247 + case "$compile_rpath " in
21.2248 + *" $absdir "*) ;;
21.2249 + *) compile_rpath="$compile_rpath $absdir"
21.2250 + esac
21.2251 + ;;
21.2252 + esac
21.2253 + case " $sys_lib_dlsearch_path " in
21.2254 + *" $libdir "*) ;;
21.2255 + *)
21.2256 + case "$finalize_rpath " in
21.2257 + *" $libdir "*) ;;
21.2258 + *) finalize_rpath="$finalize_rpath $libdir"
21.2259 + esac
21.2260 + ;;
21.2261 + esac
21.2262 + fi # $linkmode,$pass = prog,link...
21.2263 +
21.2264 + if test "$alldeplibs" = yes &&
21.2265 + { test "$deplibs_check_method" = pass_all ||
21.2266 + { test "$build_libtool_libs" = yes &&
21.2267 + test -n "$library_names"; }; }; then
21.2268 + # We only need to search for static libraries
21.2269 + continue
21.2270 + fi
21.2271 + fi
21.2272 +
21.2273 + link_static=no # Whether the deplib will be linked statically
21.2274 + if test -n "$library_names" &&
21.2275 + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
21.2276 + if test "$installed" = no; then
21.2277 + notinst_deplibs="$notinst_deplibs $lib"
21.2278 + need_relink=yes
21.2279 + fi
21.2280 + # This is a shared library
21.2281 +
21.2282 + # Warn about portability, can't link against -module's on
21.2283 + # some systems (darwin)
21.2284 + if test "$shouldnotlink" = yes && test "$pass" = link ; then
21.2285 + $echo
21.2286 + if test "$linkmode" = prog; then
21.2287 + $echo "*** Warning: Linking the executable $output against the loadable module"
21.2288 + else
21.2289 + $echo "*** Warning: Linking the shared library $output against the loadable module"
21.2290 + fi
21.2291 + $echo "*** $linklib is not portable!"
21.2292 + fi
21.2293 + if test "$linkmode" = lib &&
21.2294 + test "$hardcode_into_libs" = yes; then
21.2295 + # Hardcode the library path.
21.2296 + # Skip directories that are in the system default run-time
21.2297 + # search path.
21.2298 + case " $sys_lib_dlsearch_path " in
21.2299 + *" $absdir "*) ;;
21.2300 + *)
21.2301 + case "$compile_rpath " in
21.2302 + *" $absdir "*) ;;
21.2303 + *) compile_rpath="$compile_rpath $absdir"
21.2304 + esac
21.2305 + ;;
21.2306 + esac
21.2307 + case " $sys_lib_dlsearch_path " in
21.2308 + *" $libdir "*) ;;
21.2309 + *)
21.2310 + case "$finalize_rpath " in
21.2311 + *" $libdir "*) ;;
21.2312 + *) finalize_rpath="$finalize_rpath $libdir"
21.2313 + esac
21.2314 + ;;
21.2315 + esac
21.2316 + fi
21.2317 +
21.2318 + if test -n "$old_archive_from_expsyms_cmds"; then
21.2319 + # figure out the soname
21.2320 + set dummy $library_names
21.2321 + realname="$2"
21.2322 + shift; shift
21.2323 + libname=`eval \\$echo \"$libname_spec\"`
21.2324 + # use dlname if we got it. it's perfectly good, no?
21.2325 + if test -n "$dlname"; then
21.2326 + soname="$dlname"
21.2327 + elif test -n "$soname_spec"; then
21.2328 + # bleh windows
21.2329 + case $host in
21.2330 + *cygwin* | mingw*)
21.2331 + major=`expr $current - $age`
21.2332 + versuffix="-$major"
21.2333 + ;;
21.2334 + esac
21.2335 + eval soname=\"$soname_spec\"
21.2336 + else
21.2337 + soname="$realname"
21.2338 + fi
21.2339 +
21.2340 + # Make a new name for the extract_expsyms_cmds to use
21.2341 + soroot="$soname"
21.2342 + soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
21.2343 + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
21.2344 +
21.2345 + # If the library has no export list, then create one now
21.2346 + if test -f "$output_objdir/$soname-def"; then :
21.2347 + else
21.2348 + $show "extracting exported symbol list from \`$soname'"
21.2349 + save_ifs="$IFS"; IFS='~'
21.2350 + cmds=$extract_expsyms_cmds
21.2351 + for cmd in $cmds; do
21.2352 + IFS="$save_ifs"
21.2353 + eval cmd=\"$cmd\"
21.2354 + $show "$cmd"
21.2355 + $run eval "$cmd" || exit $?
21.2356 + done
21.2357 + IFS="$save_ifs"
21.2358 + fi
21.2359 +
21.2360 + # Create $newlib
21.2361 + if test -f "$output_objdir/$newlib"; then :; else
21.2362 + $show "generating import library for \`$soname'"
21.2363 + save_ifs="$IFS"; IFS='~'
21.2364 + cmds=$old_archive_from_expsyms_cmds
21.2365 + for cmd in $cmds; do
21.2366 + IFS="$save_ifs"
21.2367 + eval cmd=\"$cmd\"
21.2368 + $show "$cmd"
21.2369 + $run eval "$cmd" || exit $?
21.2370 + done
21.2371 + IFS="$save_ifs"
21.2372 + fi
21.2373 + # make sure the library variables are pointing to the new library
21.2374 + dir=$output_objdir
21.2375 + linklib=$newlib
21.2376 + fi # test -n "$old_archive_from_expsyms_cmds"
21.2377 +
21.2378 + if test "$linkmode" = prog || test "$mode" != relink; then
21.2379 + add_shlibpath=
21.2380 + add_dir=
21.2381 + add=
21.2382 + lib_linked=yes
21.2383 + case $hardcode_action in
21.2384 + immediate | unsupported)
21.2385 + if test "$hardcode_direct" = no; then
21.2386 + add="$dir/$linklib"
21.2387 + case $host in
21.2388 + *-*-sco3.2v5* ) add_dir="-L$dir" ;;
21.2389 + *-*-darwin* )
21.2390 + # if the lib is a module then we can not link against
21.2391 + # it, someone is ignoring the new warnings I added
21.2392 + if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
21.2393 + $echo "** Warning, lib $linklib is a module, not a shared library"
21.2394 + if test -z "$old_library" ; then
21.2395 + $echo
21.2396 + $echo "** And there doesn't seem to be a static archive available"
21.2397 + $echo "** The link will probably fail, sorry"
21.2398 + else
21.2399 + add="$dir/$old_library"
21.2400 + fi
21.2401 + fi
21.2402 + esac
21.2403 + elif test "$hardcode_minus_L" = no; then
21.2404 + case $host in
21.2405 + *-*-sunos*) add_shlibpath="$dir" ;;
21.2406 + esac
21.2407 + add_dir="-L$dir"
21.2408 + add="-l$name"
21.2409 + elif test "$hardcode_shlibpath_var" = no; then
21.2410 + add_shlibpath="$dir"
21.2411 + add="-l$name"
21.2412 + else
21.2413 + lib_linked=no
21.2414 + fi
21.2415 + ;;
21.2416 + relink)
21.2417 + if test "$hardcode_direct" = yes; then
21.2418 + add="$dir/$linklib"
21.2419 + elif test "$hardcode_minus_L" = yes; then
21.2420 + add_dir="-L$dir"
21.2421 + # Try looking first in the location we're being installed to.
21.2422 + if test -n "$inst_prefix_dir"; then
21.2423 + case "$libdir" in
21.2424 + [\\/]*)
21.2425 + add_dir="$add_dir -L$inst_prefix_dir$libdir"
21.2426 + ;;
21.2427 + esac
21.2428 + fi
21.2429 + add="-l$name"
21.2430 + elif test "$hardcode_shlibpath_var" = yes; then
21.2431 + add_shlibpath="$dir"
21.2432 + add="-l$name"
21.2433 + else
21.2434 + lib_linked=no
21.2435 + fi
21.2436 + ;;
21.2437 + *) lib_linked=no ;;
21.2438 + esac
21.2439 +
21.2440 + if test "$lib_linked" != yes; then
21.2441 + $echo "$modename: configuration error: unsupported hardcode properties"
21.2442 + exit $EXIT_FAILURE
21.2443 + fi
21.2444 +
21.2445 + if test -n "$add_shlibpath"; then
21.2446 + case :$compile_shlibpath: in
21.2447 + *":$add_shlibpath:"*) ;;
21.2448 + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
21.2449 + esac
21.2450 + fi
21.2451 + if test "$linkmode" = prog; then
21.2452 + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
21.2453 + test -n "$add" && compile_deplibs="$add $compile_deplibs"
21.2454 + else
21.2455 + test -n "$add_dir" && deplibs="$add_dir $deplibs"
21.2456 + test -n "$add" && deplibs="$add $deplibs"
21.2457 + if test "$hardcode_direct" != yes && \
21.2458 + test "$hardcode_minus_L" != yes && \
21.2459 + test "$hardcode_shlibpath_var" = yes; then
21.2460 + case :$finalize_shlibpath: in
21.2461 + *":$libdir:"*) ;;
21.2462 + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
21.2463 + esac
21.2464 + fi
21.2465 + fi
21.2466 + fi
21.2467 +
21.2468 + if test "$linkmode" = prog || test "$mode" = relink; then
21.2469 + add_shlibpath=
21.2470 + add_dir=
21.2471 + add=
21.2472 + # Finalize command for both is simple: just hardcode it.
21.2473 + if test "$hardcode_direct" = yes; then
21.2474 + add="$libdir/$linklib"
21.2475 + elif test "$hardcode_minus_L" = yes; then
21.2476 + add_dir="-L$libdir"
21.2477 + add="-l$name"
21.2478 + elif test "$hardcode_shlibpath_var" = yes; then
21.2479 + case :$finalize_shlibpath: in
21.2480 + *":$libdir:"*) ;;
21.2481 + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
21.2482 + esac
21.2483 + add="-l$name"
21.2484 + elif test "$hardcode_automatic" = yes; then
21.2485 + if test -n "$inst_prefix_dir" &&
21.2486 + test -f "$inst_prefix_dir$libdir/$linklib" ; then
21.2487 + add="$inst_prefix_dir$libdir/$linklib"
21.2488 + else
21.2489 + add="$libdir/$linklib"
21.2490 + fi
21.2491 + else
21.2492 + # We cannot seem to hardcode it, guess we'll fake it.
21.2493 + add_dir="-L$libdir"
21.2494 + # Try looking first in the location we're being installed to.
21.2495 + if test -n "$inst_prefix_dir"; then
21.2496 + case "$libdir" in
21.2497 + [\\/]*)
21.2498 + add_dir="$add_dir -L$inst_prefix_dir$libdir"
21.2499 + ;;
21.2500 + esac
21.2501 + fi
21.2502 + add="-l$name"
21.2503 + fi
21.2504 +
21.2505 + if test "$linkmode" = prog; then
21.2506 + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
21.2507 + test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
21.2508 + else
21.2509 + test -n "$add_dir" && deplibs="$add_dir $deplibs"
21.2510 + test -n "$add" && deplibs="$add $deplibs"
21.2511 + fi
21.2512 + fi
21.2513 + elif test "$linkmode" = prog; then
21.2514 + # Here we assume that one of hardcode_direct or hardcode_minus_L
21.2515 + # is not unsupported. This is valid on all known static and
21.2516 + # shared platforms.
21.2517 + if test "$hardcode_direct" != unsupported; then
21.2518 + test -n "$old_library" && linklib="$old_library"
21.2519 + compile_deplibs="$dir/$linklib $compile_deplibs"
21.2520 + finalize_deplibs="$dir/$linklib $finalize_deplibs"
21.2521 + else
21.2522 + compile_deplibs="-l$name -L$dir $compile_deplibs"
21.2523 + finalize_deplibs="-l$name -L$dir $finalize_deplibs"
21.2524 + fi
21.2525 + elif test "$build_libtool_libs" = yes; then
21.2526 + # Not a shared library
21.2527 + if test "$deplibs_check_method" != pass_all; then
21.2528 + # We're trying link a shared library against a static one
21.2529 + # but the system doesn't support it.
21.2530 +
21.2531 + # Just print a warning and add the library to dependency_libs so
21.2532 + # that the program can be linked against the static library.
21.2533 + $echo
21.2534 + $echo "*** Warning: This system can not link to static lib archive $lib."
21.2535 + $echo "*** I have the capability to make that library automatically link in when"
21.2536 + $echo "*** you link to this library. But I can only do this if you have a"
21.2537 + $echo "*** shared version of the library, which you do not appear to have."
21.2538 + if test "$module" = yes; then
21.2539 + $echo "*** But as you try to build a module library, libtool will still create "
21.2540 + $echo "*** a static module, that should work as long as the dlopening application"
21.2541 + $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
21.2542 + if test -z "$global_symbol_pipe"; then
21.2543 + $echo
21.2544 + $echo "*** However, this would only work if libtool was able to extract symbol"
21.2545 + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
21.2546 + $echo "*** not find such a program. So, this module is probably useless."
21.2547 + $echo "*** \`nm' from GNU binutils and a full rebuild may help."
21.2548 + fi
21.2549 + if test "$build_old_libs" = no; then
21.2550 + build_libtool_libs=module
21.2551 + build_old_libs=yes
21.2552 + else
21.2553 + build_libtool_libs=no
21.2554 + fi
21.2555 + fi
21.2556 + else
21.2557 + convenience="$convenience $dir/$old_library"
21.2558 + old_convenience="$old_convenience $dir/$old_library"
21.2559 + deplibs="$dir/$old_library $deplibs"
21.2560 + link_static=yes
21.2561 + fi
21.2562 + fi # link shared/static library?
21.2563 +
21.2564 + if test "$linkmode" = lib; then
21.2565 + if test -n "$dependency_libs" &&
21.2566 + { test "$hardcode_into_libs" != yes ||
21.2567 + test "$build_old_libs" = yes ||
21.2568 + test "$link_static" = yes; }; then
21.2569 + # Extract -R from dependency_libs
21.2570 + temp_deplibs=
21.2571 + for libdir in $dependency_libs; do
21.2572 + case $libdir in
21.2573 + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
21.2574 + case " $xrpath " in
21.2575 + *" $temp_xrpath "*) ;;
21.2576 + *) xrpath="$xrpath $temp_xrpath";;
21.2577 + esac;;
21.2578 + *) temp_deplibs="$temp_deplibs $libdir";;
21.2579 + esac
21.2580 + done
21.2581 + dependency_libs="$temp_deplibs"
21.2582 + fi
21.2583 +
21.2584 + newlib_search_path="$newlib_search_path $absdir"
21.2585 + # Link against this library
21.2586 + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
21.2587 + # ... and its dependency_libs
21.2588 + tmp_libs=
21.2589 + for deplib in $dependency_libs; do
21.2590 + newdependency_libs="$deplib $newdependency_libs"
21.2591 + if test "X$duplicate_deps" = "Xyes" ; then
21.2592 + case "$tmp_libs " in
21.2593 + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
21.2594 + esac
21.2595 + fi
21.2596 + tmp_libs="$tmp_libs $deplib"
21.2597 + done
21.2598 +
21.2599 + if test "$link_all_deplibs" != no; then
21.2600 + # Add the search paths of all dependency libraries
21.2601 + for deplib in $dependency_libs; do
21.2602 + case $deplib in
21.2603 + -L*) path="$deplib" ;;
21.2604 + *.la)
21.2605 + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
21.2606 + test "X$dir" = "X$deplib" && dir="."
21.2607 + # We need an absolute path.
21.2608 + case $dir in
21.2609 + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
21.2610 + *)
21.2611 + absdir=`cd "$dir" && pwd`
21.2612 + if test -z "$absdir"; then
21.2613 + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
21.2614 + absdir="$dir"
21.2615 + fi
21.2616 + ;;
21.2617 + esac
21.2618 + if grep "^installed=no" $deplib > /dev/null; then
21.2619 + path="$absdir/$objdir"
21.2620 + else
21.2621 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
21.2622 + if test -z "$libdir"; then
21.2623 + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
21.2624 + exit $EXIT_FAILURE
21.2625 + fi
21.2626 + if test "$absdir" != "$libdir"; then
21.2627 + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
21.2628 + fi
21.2629 + path="$absdir"
21.2630 + fi
21.2631 + depdepl=
21.2632 + case $host in
21.2633 + *-*-darwin*)
21.2634 + # we do not want to link against static libs,
21.2635 + # but need to link against shared
21.2636 + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
21.2637 + if test -n "$deplibrary_names" ; then
21.2638 + for tmp in $deplibrary_names ; do
21.2639 + depdepl=$tmp
21.2640 + done
21.2641 + if test -f "$path/$depdepl" ; then
21.2642 + depdepl="$path/$depdepl"
21.2643 + fi
21.2644 + # do not add paths which are already there
21.2645 + case " $newlib_search_path " in
21.2646 + *" $path "*) ;;
21.2647 + *) newlib_search_path="$newlib_search_path $path";;
21.2648 + esac
21.2649 + fi
21.2650 + path=""
21.2651 + ;;
21.2652 + *)
21.2653 + path="-L$path"
21.2654 + ;;
21.2655 + esac
21.2656 + ;;
21.2657 + -l*)
21.2658 + case $host in
21.2659 + *-*-darwin*)
21.2660 + # Again, we only want to link against shared libraries
21.2661 + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
21.2662 + for tmp in $newlib_search_path ; do
21.2663 + if test -f "$tmp/lib$tmp_libs.dylib" ; then
21.2664 + eval depdepl="$tmp/lib$tmp_libs.dylib"
21.2665 + break
21.2666 + fi
21.2667 + done
21.2668 + path=""
21.2669 + ;;
21.2670 + *) continue ;;
21.2671 + esac
21.2672 + ;;
21.2673 + *) continue ;;
21.2674 + esac
21.2675 + case " $deplibs " in
21.2676 + *" $depdepl "*) ;;
21.2677 + *) deplibs="$depdepl $deplibs" ;;
21.2678 + esac
21.2679 + case " $deplibs " in
21.2680 + *" $path "*) ;;
21.2681 + *) deplibs="$deplibs $path" ;;
21.2682 + esac
21.2683 + done
21.2684 + fi # link_all_deplibs != no
21.2685 + fi # linkmode = lib
21.2686 + done # for deplib in $libs
21.2687 + dependency_libs="$newdependency_libs"
21.2688 + if test "$pass" = dlpreopen; then
21.2689 + # Link the dlpreopened libraries before other libraries
21.2690 + for deplib in $save_deplibs; do
21.2691 + deplibs="$deplib $deplibs"
21.2692 + done
21.2693 + fi
21.2694 + if test "$pass" != dlopen; then
21.2695 + if test "$pass" != conv; then
21.2696 + # Make sure lib_search_path contains only unique directories.
21.2697 + lib_search_path=
21.2698 + for dir in $newlib_search_path; do
21.2699 + case "$lib_search_path " in
21.2700 + *" $dir "*) ;;
21.2701 + *) lib_search_path="$lib_search_path $dir" ;;
21.2702 + esac
21.2703 + done
21.2704 + newlib_search_path=
21.2705 + fi
21.2706 +
21.2707 + if test "$linkmode,$pass" != "prog,link"; then
21.2708 + vars="deplibs"
21.2709 + else
21.2710 + vars="compile_deplibs finalize_deplibs"
21.2711 + fi
21.2712 + for var in $vars dependency_libs; do
21.2713 + # Add libraries to $var in reverse order
21.2714 + eval tmp_libs=\"\$$var\"
21.2715 + new_libs=
21.2716 + for deplib in $tmp_libs; do
21.2717 + # FIXME: Pedantically, this is the right thing to do, so
21.2718 + # that some nasty dependency loop isn't accidentally
21.2719 + # broken:
21.2720 + #new_libs="$deplib $new_libs"
21.2721 + # Pragmatically, this seems to cause very few problems in
21.2722 + # practice:
21.2723 + case $deplib in
21.2724 + -L*) new_libs="$deplib $new_libs" ;;
21.2725 + -R*) ;;
21.2726 + *)
21.2727 + # And here is the reason: when a library appears more
21.2728 + # than once as an explicit dependence of a library, or
21.2729 + # is implicitly linked in more than once by the
21.2730 + # compiler, it is considered special, and multiple
21.2731 + # occurrences thereof are not removed. Compare this
21.2732 + # with having the same library being listed as a
21.2733 + # dependency of multiple other libraries: in this case,
21.2734 + # we know (pedantically, we assume) the library does not
21.2735 + # need to be listed more than once, so we keep only the
21.2736 + # last copy. This is not always right, but it is rare
21.2737 + # enough that we require users that really mean to play
21.2738 + # such unportable linking tricks to link the library
21.2739 + # using -Wl,-lname, so that libtool does not consider it
21.2740 + # for duplicate removal.
21.2741 + case " $specialdeplibs " in
21.2742 + *" $deplib "*) new_libs="$deplib $new_libs" ;;
21.2743 + *)
21.2744 + case " $new_libs " in
21.2745 + *" $deplib "*) ;;
21.2746 + *) new_libs="$deplib $new_libs" ;;
21.2747 + esac
21.2748 + ;;
21.2749 + esac
21.2750 + ;;
21.2751 + esac
21.2752 + done
21.2753 + tmp_libs=
21.2754 + for deplib in $new_libs; do
21.2755 + case $deplib in
21.2756 + -L*)
21.2757 + case " $tmp_libs " in
21.2758 + *" $deplib "*) ;;
21.2759 + *) tmp_libs="$tmp_libs $deplib" ;;
21.2760 + esac
21.2761 + ;;
21.2762 + *) tmp_libs="$tmp_libs $deplib" ;;
21.2763 + esac
21.2764 + done
21.2765 + eval $var=\"$tmp_libs\"
21.2766 + done # for var
21.2767 + fi
21.2768 + # Last step: remove runtime libs from dependency_libs
21.2769 + # (they stay in deplibs)
21.2770 + tmp_libs=
21.2771 + for i in $dependency_libs ; do
21.2772 + case " $predeps $postdeps $compiler_lib_search_path " in
21.2773 + *" $i "*)
21.2774 + i=""
21.2775 + ;;
21.2776 + esac
21.2777 + if test -n "$i" ; then
21.2778 + tmp_libs="$tmp_libs $i"
21.2779 + fi
21.2780 + done
21.2781 + dependency_libs=$tmp_libs
21.2782 + done # for pass
21.2783 + if test "$linkmode" = prog; then
21.2784 + dlfiles="$newdlfiles"
21.2785 + dlprefiles="$newdlprefiles"
21.2786 + fi
21.2787 +
21.2788 + case $linkmode in
21.2789 + oldlib)
21.2790 + if test -n "$deplibs"; then
21.2791 + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
21.2792 + fi
21.2793 +
21.2794 + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
21.2795 + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
21.2796 + fi
21.2797 +
21.2798 + if test -n "$rpath"; then
21.2799 + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
21.2800 + fi
21.2801 +
21.2802 + if test -n "$xrpath"; then
21.2803 + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
21.2804 + fi
21.2805 +
21.2806 + if test -n "$vinfo"; then
21.2807 + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
21.2808 + fi
21.2809 +
21.2810 + if test -n "$release"; then
21.2811 + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
21.2812 + fi
21.2813 +
21.2814 + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
21.2815 + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
21.2816 + fi
21.2817 +
21.2818 + # Now set the variables for building old libraries.
21.2819 + build_libtool_libs=no
21.2820 + oldlibs="$output"
21.2821 + objs="$objs$old_deplibs"
21.2822 + ;;
21.2823 +
21.2824 + lib)
21.2825 + # Make sure we only generate libraries of the form `libNAME.la'.
21.2826 + case $outputname in
21.2827 + lib*)
21.2828 + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
21.2829 + eval shared_ext=\"$shrext_cmds\"
21.2830 + eval libname=\"$libname_spec\"
21.2831 + ;;
21.2832 + *)
21.2833 + if test "$module" = no; then
21.2834 + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
21.2835 + $echo "$help" 1>&2
21.2836 + exit $EXIT_FAILURE
21.2837 + fi
21.2838 + if test "$need_lib_prefix" != no; then
21.2839 + # Add the "lib" prefix for modules if required
21.2840 + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
21.2841 + eval shared_ext=\"$shrext_cmds\"
21.2842 + eval libname=\"$libname_spec\"
21.2843 + else
21.2844 + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
21.2845 + fi
21.2846 + ;;
21.2847 + esac
21.2848 +
21.2849 + if test -n "$objs"; then
21.2850 + if test "$deplibs_check_method" != pass_all; then
21.2851 + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
21.2852 + exit $EXIT_FAILURE
21.2853 + else
21.2854 + $echo
21.2855 + $echo "*** Warning: Linking the shared library $output against the non-libtool"
21.2856 + $echo "*** objects $objs is not portable!"
21.2857 + libobjs="$libobjs $objs"
21.2858 + fi
21.2859 + fi
21.2860 +
21.2861 + if test "$dlself" != no; then
21.2862 + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
21.2863 + fi
21.2864 +
21.2865 + set dummy $rpath
21.2866 + if test "$#" -gt 2; then
21.2867 + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
21.2868 + fi
21.2869 + install_libdir="$2"
21.2870 +
21.2871 + oldlibs=
21.2872 + if test -z "$rpath"; then
21.2873 + if test "$build_libtool_libs" = yes; then
21.2874 + # Building a libtool convenience library.
21.2875 + # Some compilers have problems with a `.al' extension so
21.2876 + # convenience libraries should have the same extension an
21.2877 + # archive normally would.
21.2878 + oldlibs="$output_objdir/$libname.$libext $oldlibs"
21.2879 + build_libtool_libs=convenience
21.2880 + build_old_libs=yes
21.2881 + fi
21.2882 +
21.2883 + if test -n "$vinfo"; then
21.2884 + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
21.2885 + fi
21.2886 +
21.2887 + if test -n "$release"; then
21.2888 + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
21.2889 + fi
21.2890 + else
21.2891 +
21.2892 + # Parse the version information argument.
21.2893 + save_ifs="$IFS"; IFS=':'
21.2894 + set dummy $vinfo 0 0 0
21.2895 + IFS="$save_ifs"
21.2896 +
21.2897 + if test -n "$8"; then
21.2898 + $echo "$modename: too many parameters to \`-version-info'" 1>&2
21.2899 + $echo "$help" 1>&2
21.2900 + exit $EXIT_FAILURE
21.2901 + fi
21.2902 +
21.2903 + # convert absolute version numbers to libtool ages
21.2904 + # this retains compatibility with .la files and attempts
21.2905 + # to make the code below a bit more comprehensible
21.2906 +
21.2907 + case $vinfo_number in
21.2908 + yes)
21.2909 + number_major="$2"
21.2910 + number_minor="$3"
21.2911 + number_revision="$4"
21.2912 + #
21.2913 + # There are really only two kinds -- those that
21.2914 + # use the current revision as the major version
21.2915 + # and those that subtract age and use age as
21.2916 + # a minor version. But, then there is irix
21.2917 + # which has an extra 1 added just for fun
21.2918 + #
21.2919 + case $version_type in
21.2920 + darwin|linux|osf|windows)
21.2921 + current=`expr $number_major + $number_minor`
21.2922 + age="$number_minor"
21.2923 + revision="$number_revision"
21.2924 + ;;
21.2925 + freebsd-aout|freebsd-elf|sunos)
21.2926 + current="$number_major"
21.2927 + revision="$number_minor"
21.2928 + age="0"
21.2929 + ;;
21.2930 + irix|nonstopux)
21.2931 + current=`expr $number_major + $number_minor - 1`
21.2932 + age="$number_minor"
21.2933 + revision="$number_minor"
21.2934 + ;;
21.2935 + *)
21.2936 + $echo "$modename: unknown library version type \`$version_type'" 1>&2
21.2937 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
21.2938 + exit $EXIT_FAILURE
21.2939 + ;;
21.2940 + esac
21.2941 + ;;
21.2942 + no)
21.2943 + current="$2"
21.2944 + revision="$3"
21.2945 + age="$4"
21.2946 + ;;
21.2947 + esac
21.2948 +
21.2949 + # Check that each of the things are valid numbers.
21.2950 + case $current in
21.2951 + 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]) ;;
21.2952 + *)
21.2953 + $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
21.2954 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2
21.2955 + exit $EXIT_FAILURE
21.2956 + ;;
21.2957 + esac
21.2958 +
21.2959 + case $revision in
21.2960 + 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]) ;;
21.2961 + *)
21.2962 + $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
21.2963 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2
21.2964 + exit $EXIT_FAILURE
21.2965 + ;;
21.2966 + esac
21.2967 +
21.2968 + case $age in
21.2969 + 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]) ;;
21.2970 + *)
21.2971 + $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
21.2972 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2
21.2973 + exit $EXIT_FAILURE
21.2974 + ;;
21.2975 + esac
21.2976 +
21.2977 + if test "$age" -gt "$current"; then
21.2978 + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
21.2979 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2
21.2980 + exit $EXIT_FAILURE
21.2981 + fi
21.2982 +
21.2983 + # Calculate the version variables.
21.2984 + major=
21.2985 + versuffix=
21.2986 + verstring=
21.2987 + case $version_type in
21.2988 + none) ;;
21.2989 +
21.2990 + darwin)
21.2991 + # Like Linux, but with the current version available in
21.2992 + # verstring for coding it into the library header
21.2993 + major=.`expr $current - $age`
21.2994 + versuffix="$major.$age.$revision"
21.2995 + # Darwin ld doesn't like 0 for these options...
21.2996 + minor_current=`expr $current + 1`
21.2997 + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
21.2998 + ;;
21.2999 +
21.3000 + freebsd-aout)
21.3001 + major=".$current"
21.3002 + versuffix=".$current.$revision";
21.3003 + ;;
21.3004 +
21.3005 + freebsd-elf)
21.3006 + major=".$current"
21.3007 + versuffix=".$current";
21.3008 + ;;
21.3009 +
21.3010 + irix | nonstopux)
21.3011 + major=`expr $current - $age + 1`
21.3012 +
21.3013 + case $version_type in
21.3014 + nonstopux) verstring_prefix=nonstopux ;;
21.3015 + *) verstring_prefix=sgi ;;
21.3016 + esac
21.3017 + verstring="$verstring_prefix$major.$revision"
21.3018 +
21.3019 + # Add in all the interfaces that we are compatible with.
21.3020 + loop=$revision
21.3021 + while test "$loop" -ne 0; do
21.3022 + iface=`expr $revision - $loop`
21.3023 + loop=`expr $loop - 1`
21.3024 + verstring="$verstring_prefix$major.$iface:$verstring"
21.3025 + done
21.3026 +
21.3027 + # Before this point, $major must not contain `.'.
21.3028 + major=.$major
21.3029 + versuffix="$major.$revision"
21.3030 + ;;
21.3031 +
21.3032 + linux)
21.3033 + major=.`expr $current - $age`
21.3034 + versuffix="$major.$age.$revision"
21.3035 + ;;
21.3036 +
21.3037 + osf)
21.3038 + major=.`expr $current - $age`
21.3039 + versuffix=".$current.$age.$revision"
21.3040 + verstring="$current.$age.$revision"
21.3041 +
21.3042 + # Add in all the interfaces that we are compatible with.
21.3043 + loop=$age
21.3044 + while test "$loop" -ne 0; do
21.3045 + iface=`expr $current - $loop`
21.3046 + loop=`expr $loop - 1`
21.3047 + verstring="$verstring:${iface}.0"
21.3048 + done
21.3049 +
21.3050 + # Make executables depend on our current version.
21.3051 + verstring="$verstring:${current}.0"
21.3052 + ;;
21.3053 +
21.3054 + sunos)
21.3055 + major=".$current"
21.3056 + versuffix=".$current.$revision"
21.3057 + ;;
21.3058 +
21.3059 + windows)
21.3060 + # Use '-' rather than '.', since we only want one
21.3061 + # extension on DOS 8.3 filesystems.
21.3062 + major=`expr $current - $age`
21.3063 + versuffix="-$major"
21.3064 + ;;
21.3065 +
21.3066 + *)
21.3067 + $echo "$modename: unknown library version type \`$version_type'" 1>&2
21.3068 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
21.3069 + exit $EXIT_FAILURE
21.3070 + ;;
21.3071 + esac
21.3072 +
21.3073 + # Clear the version info if we defaulted, and they specified a release.
21.3074 + if test -z "$vinfo" && test -n "$release"; then
21.3075 + major=
21.3076 + case $version_type in
21.3077 + darwin)
21.3078 + # we can't check for "0.0" in archive_cmds due to quoting
21.3079 + # problems, so we reset it completely
21.3080 + verstring=
21.3081 + ;;
21.3082 + *)
21.3083 + verstring="0.0"
21.3084 + ;;
21.3085 + esac
21.3086 + if test "$need_version" = no; then
21.3087 + versuffix=
21.3088 + else
21.3089 + versuffix=".0.0"
21.3090 + fi
21.3091 + fi
21.3092 +
21.3093 + # Remove version info from name if versioning should be avoided
21.3094 + if test "$avoid_version" = yes && test "$need_version" = no; then
21.3095 + major=
21.3096 + versuffix=
21.3097 + verstring=""
21.3098 + fi
21.3099 +
21.3100 + # Check to see if the archive will have undefined symbols.
21.3101 + if test "$allow_undefined" = yes; then
21.3102 + if test "$allow_undefined_flag" = unsupported; then
21.3103 + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
21.3104 + build_libtool_libs=no
21.3105 + build_old_libs=yes
21.3106 + fi
21.3107 + else
21.3108 + # Don't allow undefined symbols.
21.3109 + allow_undefined_flag="$no_undefined_flag"
21.3110 + fi
21.3111 + fi
21.3112 +
21.3113 + if test "$mode" != relink; then
21.3114 + # Remove our outputs, but don't remove object files since they
21.3115 + # may have been created when compiling PIC objects.
21.3116 + removelist=
21.3117 + tempremovelist=`$echo "$output_objdir/*"`
21.3118 + for p in $tempremovelist; do
21.3119 + case $p in
21.3120 + *.$objext)
21.3121 + ;;
21.3122 + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
21.3123 + if test "X$precious_files_regex" != "X"; then
21.3124 + if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
21.3125 + then
21.3126 + continue
21.3127 + fi
21.3128 + fi
21.3129 + removelist="$removelist $p"
21.3130 + ;;
21.3131 + *) ;;
21.3132 + esac
21.3133 + done
21.3134 + if test -n "$removelist"; then
21.3135 + $show "${rm}r $removelist"
21.3136 + $run ${rm}r $removelist
21.3137 + fi
21.3138 + fi
21.3139 +
21.3140 + # Now set the variables for building old libraries.
21.3141 + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
21.3142 + oldlibs="$oldlibs $output_objdir/$libname.$libext"
21.3143 +
21.3144 + # Transform .lo files to .o files.
21.3145 + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
21.3146 + fi
21.3147 +
21.3148 + # Eliminate all temporary directories.
21.3149 + for path in $notinst_path; do
21.3150 + lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
21.3151 + deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
21.3152 + dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
21.3153 + done
21.3154 +
21.3155 + if test -n "$xrpath"; then
21.3156 + # If the user specified any rpath flags, then add them.
21.3157 + temp_xrpath=
21.3158 + for libdir in $xrpath; do
21.3159 + temp_xrpath="$temp_xrpath -R$libdir"
21.3160 + case "$finalize_rpath " in
21.3161 + *" $libdir "*) ;;
21.3162 + *) finalize_rpath="$finalize_rpath $libdir" ;;
21.3163 + esac
21.3164 + done
21.3165 + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
21.3166 + dependency_libs="$temp_xrpath $dependency_libs"
21.3167 + fi
21.3168 + fi
21.3169 +
21.3170 + # Make sure dlfiles contains only unique files that won't be dlpreopened
21.3171 + old_dlfiles="$dlfiles"
21.3172 + dlfiles=
21.3173 + for lib in $old_dlfiles; do
21.3174 + case " $dlprefiles $dlfiles " in
21.3175 + *" $lib "*) ;;
21.3176 + *) dlfiles="$dlfiles $lib" ;;
21.3177 + esac
21.3178 + done
21.3179 +
21.3180 + # Make sure dlprefiles contains only unique files
21.3181 + old_dlprefiles="$dlprefiles"
21.3182 + dlprefiles=
21.3183 + for lib in $old_dlprefiles; do
21.3184 + case "$dlprefiles " in
21.3185 + *" $lib "*) ;;
21.3186 + *) dlprefiles="$dlprefiles $lib" ;;
21.3187 + esac
21.3188 + done
21.3189 +
21.3190 + if test "$build_libtool_libs" = yes; then
21.3191 + if test -n "$rpath"; then
21.3192 + case $host in
21.3193 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
21.3194 + # these systems don't actually have a c library (as such)!
21.3195 + ;;
21.3196 + *-*-rhapsody* | *-*-darwin1.[012])
21.3197 + # Rhapsody C library is in the System framework
21.3198 + deplibs="$deplibs -framework System"
21.3199 + ;;
21.3200 + *-*-netbsd*)
21.3201 + # Don't link with libc until the a.out ld.so is fixed.
21.3202 + ;;
21.3203 + *-*-openbsd* | *-*-freebsd*)
21.3204 + # Do not include libc due to us having libc/libc_r.
21.3205 + test "X$arg" = "X-lc" && continue
21.3206 + ;;
21.3207 + *)
21.3208 + # Add libc to deplibs on all other systems if necessary.
21.3209 + if test "$build_libtool_need_lc" = "yes"; then
21.3210 + deplibs="$deplibs -lc"
21.3211 + fi
21.3212 + ;;
21.3213 + esac
21.3214 + fi
21.3215 +
21.3216 + # Transform deplibs into only deplibs that can be linked in shared.
21.3217 + name_save=$name
21.3218 + libname_save=$libname
21.3219 + release_save=$release
21.3220 + versuffix_save=$versuffix
21.3221 + major_save=$major
21.3222 + # I'm not sure if I'm treating the release correctly. I think
21.3223 + # release should show up in the -l (ie -lgmp5) so we don't want to
21.3224 + # add it in twice. Is that correct?
21.3225 + release=""
21.3226 + versuffix=""
21.3227 + major=""
21.3228 + newdeplibs=
21.3229 + droppeddeps=no
21.3230 + case $deplibs_check_method in
21.3231 + pass_all)
21.3232 + # Don't check for shared/static. Everything works.
21.3233 + # This might be a little naive. We might want to check
21.3234 + # whether the library exists or not. But this is on
21.3235 + # osf3 & osf4 and I'm not really sure... Just
21.3236 + # implementing what was already the behavior.
21.3237 + newdeplibs=$deplibs
21.3238 + ;;
21.3239 + test_compile)
21.3240 + # This code stresses the "libraries are programs" paradigm to its
21.3241 + # limits. Maybe even breaks it. We compile a program, linking it
21.3242 + # against the deplibs as a proxy for the library. Then we can check
21.3243 + # whether they linked in statically or dynamically with ldd.
21.3244 + $rm conftest.c
21.3245 + cat > conftest.c <<EOF
21.3246 + int main() { return 0; }
21.3247 +EOF
21.3248 + $rm conftest
21.3249 + $LTCC -o conftest conftest.c $deplibs
21.3250 + if test "$?" -eq 0 ; then
21.3251 + ldd_output=`ldd conftest`
21.3252 + for i in $deplibs; do
21.3253 + name="`expr $i : '-l\(.*\)'`"
21.3254 + # If $name is empty we are operating on a -L argument.
21.3255 + if test "$name" != "" && test "$name" -ne "0"; then
21.3256 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
21.3257 + case " $predeps $postdeps " in
21.3258 + *" $i "*)
21.3259 + newdeplibs="$newdeplibs $i"
21.3260 + i=""
21.3261 + ;;
21.3262 + esac
21.3263 + fi
21.3264 + if test -n "$i" ; then
21.3265 + libname=`eval \\$echo \"$libname_spec\"`
21.3266 + deplib_matches=`eval \\$echo \"$library_names_spec\"`
21.3267 + set dummy $deplib_matches
21.3268 + deplib_match=$2
21.3269 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
21.3270 + newdeplibs="$newdeplibs $i"
21.3271 + else
21.3272 + droppeddeps=yes
21.3273 + $echo
21.3274 + $echo "*** Warning: dynamic linker does not accept needed library $i."
21.3275 + $echo "*** I have the capability to make that library automatically link in when"
21.3276 + $echo "*** you link to this library. But I can only do this if you have a"
21.3277 + $echo "*** shared version of the library, which I believe you do not have"
21.3278 + $echo "*** because a test_compile did reveal that the linker did not use it for"
21.3279 + $echo "*** its dynamic dependency list that programs get resolved with at runtime."
21.3280 + fi
21.3281 + fi
21.3282 + else
21.3283 + newdeplibs="$newdeplibs $i"
21.3284 + fi
21.3285 + done
21.3286 + else
21.3287 + # Error occurred in the first compile. Let's try to salvage
21.3288 + # the situation: Compile a separate program for each library.
21.3289 + for i in $deplibs; do
21.3290 + name="`expr $i : '-l\(.*\)'`"
21.3291 + # If $name is empty we are operating on a -L argument.
21.3292 + if test "$name" != "" && test "$name" != "0"; then
21.3293 + $rm conftest
21.3294 + $LTCC -o conftest conftest.c $i
21.3295 + # Did it work?
21.3296 + if test "$?" -eq 0 ; then
21.3297 + ldd_output=`ldd conftest`
21.3298 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
21.3299 + case " $predeps $postdeps " in
21.3300 + *" $i "*)
21.3301 + newdeplibs="$newdeplibs $i"
21.3302 + i=""
21.3303 + ;;
21.3304 + esac
21.3305 + fi
21.3306 + if test -n "$i" ; then
21.3307 + libname=`eval \\$echo \"$libname_spec\"`
21.3308 + deplib_matches=`eval \\$echo \"$library_names_spec\"`
21.3309 + set dummy $deplib_matches
21.3310 + deplib_match=$2
21.3311 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
21.3312 + newdeplibs="$newdeplibs $i"
21.3313 + else
21.3314 + droppeddeps=yes
21.3315 + $echo
21.3316 + $echo "*** Warning: dynamic linker does not accept needed library $i."
21.3317 + $echo "*** I have the capability to make that library automatically link in when"
21.3318 + $echo "*** you link to this library. But I can only do this if you have a"
21.3319 + $echo "*** shared version of the library, which you do not appear to have"
21.3320 + $echo "*** because a test_compile did reveal that the linker did not use this one"
21.3321 + $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
21.3322 + fi
21.3323 + fi
21.3324 + else
21.3325 + droppeddeps=yes
21.3326 + $echo
21.3327 + $echo "*** Warning! Library $i is needed by this library but I was not able to"
21.3328 + $echo "*** make it link in! You will probably need to install it or some"
21.3329 + $echo "*** library that it depends on before this library will be fully"
21.3330 + $echo "*** functional. Installing it before continuing would be even better."
21.3331 + fi
21.3332 + else
21.3333 + newdeplibs="$newdeplibs $i"
21.3334 + fi
21.3335 + done
21.3336 + fi
21.3337 + ;;
21.3338 + file_magic*)
21.3339 + set dummy $deplibs_check_method
21.3340 + file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
21.3341 + for a_deplib in $deplibs; do
21.3342 + name="`expr $a_deplib : '-l\(.*\)'`"
21.3343 + # If $name is empty we are operating on a -L argument.
21.3344 + if test "$name" != "" && test "$name" != "0"; then
21.3345 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
21.3346 + case " $predeps $postdeps " in
21.3347 + *" $a_deplib "*)
21.3348 + newdeplibs="$newdeplibs $a_deplib"
21.3349 + a_deplib=""
21.3350 + ;;
21.3351 + esac
21.3352 + fi
21.3353 + if test -n "$a_deplib" ; then
21.3354 + libname=`eval \\$echo \"$libname_spec\"`
21.3355 + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
21.3356 + potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
21.3357 + for potent_lib in $potential_libs; do
21.3358 + # Follow soft links.
21.3359 + if ls -lLd "$potent_lib" 2>/dev/null \
21.3360 + | grep " -> " >/dev/null; then
21.3361 + continue
21.3362 + fi
21.3363 + # The statement above tries to avoid entering an
21.3364 + # endless loop below, in case of cyclic links.
21.3365 + # We might still enter an endless loop, since a link
21.3366 + # loop can be closed while we follow links,
21.3367 + # but so what?
21.3368 + potlib="$potent_lib"
21.3369 + while test -h "$potlib" 2>/dev/null; do
21.3370 + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
21.3371 + case $potliblink in
21.3372 + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
21.3373 + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
21.3374 + esac
21.3375 + done
21.3376 + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
21.3377 + | ${SED} 10q \
21.3378 + | $EGREP "$file_magic_regex" > /dev/null; then
21.3379 + newdeplibs="$newdeplibs $a_deplib"
21.3380 + a_deplib=""
21.3381 + break 2
21.3382 + fi
21.3383 + done
21.3384 + done
21.3385 + fi
21.3386 + if test -n "$a_deplib" ; then
21.3387 + droppeddeps=yes
21.3388 + $echo
21.3389 + $echo "*** Warning: linker path does not have real file for library $a_deplib."
21.3390 + $echo "*** I have the capability to make that library automatically link in when"
21.3391 + $echo "*** you link to this library. But I can only do this if you have a"
21.3392 + $echo "*** shared version of the library, which you do not appear to have"
21.3393 + $echo "*** because I did check the linker path looking for a file starting"
21.3394 + if test -z "$potlib" ; then
21.3395 + $echo "*** with $libname but no candidates were found. (...for file magic test)"
21.3396 + else
21.3397 + $echo "*** with $libname and none of the candidates passed a file format test"
21.3398 + $echo "*** using a file magic. Last file checked: $potlib"
21.3399 + fi
21.3400 + fi
21.3401 + else
21.3402 + # Add a -L argument.
21.3403 + newdeplibs="$newdeplibs $a_deplib"
21.3404 + fi
21.3405 + done # Gone through all deplibs.
21.3406 + ;;
21.3407 + match_pattern*)
21.3408 + set dummy $deplibs_check_method
21.3409 + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
21.3410 + for a_deplib in $deplibs; do
21.3411 + name="`expr $a_deplib : '-l\(.*\)'`"
21.3412 + # If $name is empty we are operating on a -L argument.
21.3413 + if test -n "$name" && test "$name" != "0"; then
21.3414 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
21.3415 + case " $predeps $postdeps " in
21.3416 + *" $a_deplib "*)
21.3417 + newdeplibs="$newdeplibs $a_deplib"
21.3418 + a_deplib=""
21.3419 + ;;
21.3420 + esac
21.3421 + fi
21.3422 + if test -n "$a_deplib" ; then
21.3423 + libname=`eval \\$echo \"$libname_spec\"`
21.3424 + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
21.3425 + potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
21.3426 + for potent_lib in $potential_libs; do
21.3427 + potlib="$potent_lib" # see symlink-check above in file_magic test
21.3428 + if eval $echo \"$potent_lib\" 2>/dev/null \
21.3429 + | ${SED} 10q \
21.3430 + | $EGREP "$match_pattern_regex" > /dev/null; then
21.3431 + newdeplibs="$newdeplibs $a_deplib"
21.3432 + a_deplib=""
21.3433 + break 2
21.3434 + fi
21.3435 + done
21.3436 + done
21.3437 + fi
21.3438 + if test -n "$a_deplib" ; then
21.3439 + droppeddeps=yes
21.3440 + $echo
21.3441 + $echo "*** Warning: linker path does not have real file for library $a_deplib."
21.3442 + $echo "*** I have the capability to make that library automatically link in when"
21.3443 + $echo "*** you link to this library. But I can only do this if you have a"
21.3444 + $echo "*** shared version of the library, which you do not appear to have"
21.3445 + $echo "*** because I did check the linker path looking for a file starting"
21.3446 + if test -z "$potlib" ; then
21.3447 + $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
21.3448 + else
21.3449 + $echo "*** with $libname and none of the candidates passed a file format test"
21.3450 + $echo "*** using a regex pattern. Last file checked: $potlib"
21.3451 + fi
21.3452 + fi
21.3453 + else
21.3454 + # Add a -L argument.
21.3455 + newdeplibs="$newdeplibs $a_deplib"
21.3456 + fi
21.3457 + done # Gone through all deplibs.
21.3458 + ;;
21.3459 + none | unknown | *)
21.3460 + newdeplibs=""
21.3461 + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
21.3462 + -e 's/ -[LR][^ ]*//g'`
21.3463 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
21.3464 + for i in $predeps $postdeps ; do
21.3465 + # can't use Xsed below, because $i might contain '/'
21.3466 + tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
21.3467 + done
21.3468 + fi
21.3469 + if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
21.3470 + | grep . >/dev/null; then
21.3471 + $echo
21.3472 + if test "X$deplibs_check_method" = "Xnone"; then
21.3473 + $echo "*** Warning: inter-library dependencies are not supported in this platform."
21.3474 + else
21.3475 + $echo "*** Warning: inter-library dependencies are not known to be supported."
21.3476 + fi
21.3477 + $echo "*** All declared inter-library dependencies are being dropped."
21.3478 + droppeddeps=yes
21.3479 + fi
21.3480 + ;;
21.3481 + esac
21.3482 + versuffix=$versuffix_save
21.3483 + major=$major_save
21.3484 + release=$release_save
21.3485 + libname=$libname_save
21.3486 + name=$name_save
21.3487 +
21.3488 + case $host in
21.3489 + *-*-rhapsody* | *-*-darwin1.[012])
21.3490 + # On Rhapsody replace the C library is the System framework
21.3491 + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
21.3492 + ;;
21.3493 + esac
21.3494 +
21.3495 + if test "$droppeddeps" = yes; then
21.3496 + if test "$module" = yes; then
21.3497 + $echo
21.3498 + $echo "*** Warning: libtool could not satisfy all declared inter-library"
21.3499 + $echo "*** dependencies of module $libname. Therefore, libtool will create"
21.3500 + $echo "*** a static module, that should work as long as the dlopening"
21.3501 + $echo "*** application is linked with the -dlopen flag."
21.3502 + if test -z "$global_symbol_pipe"; then
21.3503 + $echo
21.3504 + $echo "*** However, this would only work if libtool was able to extract symbol"
21.3505 + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
21.3506 + $echo "*** not find such a program. So, this module is probably useless."
21.3507 + $echo "*** \`nm' from GNU binutils and a full rebuild may help."
21.3508 + fi
21.3509 + if test "$build_old_libs" = no; then
21.3510 + oldlibs="$output_objdir/$libname.$libext"
21.3511 + build_libtool_libs=module
21.3512 + build_old_libs=yes
21.3513 + else
21.3514 + build_libtool_libs=no
21.3515 + fi
21.3516 + else
21.3517 + $echo "*** The inter-library dependencies that have been dropped here will be"
21.3518 + $echo "*** automatically added whenever a program is linked with this library"
21.3519 + $echo "*** or is declared to -dlopen it."
21.3520 +
21.3521 + if test "$allow_undefined" = no; then
21.3522 + $echo
21.3523 + $echo "*** Since this library must not contain undefined symbols,"
21.3524 + $echo "*** because either the platform does not support them or"
21.3525 + $echo "*** it was explicitly requested with -no-undefined,"
21.3526 + $echo "*** libtool will only create a static version of it."
21.3527 + if test "$build_old_libs" = no; then
21.3528 + oldlibs="$output_objdir/$libname.$libext"
21.3529 + build_libtool_libs=module
21.3530 + build_old_libs=yes
21.3531 + else
21.3532 + build_libtool_libs=no
21.3533 + fi
21.3534 + fi
21.3535 + fi
21.3536 + fi
21.3537 + # Done checking deplibs!
21.3538 + deplibs=$newdeplibs
21.3539 + fi
21.3540 +
21.3541 + # All the library-specific variables (install_libdir is set above).
21.3542 + library_names=
21.3543 + old_library=
21.3544 + dlname=
21.3545 +
21.3546 + # Test again, we may have decided not to build it any more
21.3547 + if test "$build_libtool_libs" = yes; then
21.3548 + if test "$hardcode_into_libs" = yes; then
21.3549 + # Hardcode the library paths
21.3550 + hardcode_libdirs=
21.3551 + dep_rpath=
21.3552 + rpath="$finalize_rpath"
21.3553 + test "$mode" != relink && rpath="$compile_rpath$rpath"
21.3554 + for libdir in $rpath; do
21.3555 + if test -n "$hardcode_libdir_flag_spec"; then
21.3556 + if test -n "$hardcode_libdir_separator"; then
21.3557 + if test -z "$hardcode_libdirs"; then
21.3558 + hardcode_libdirs="$libdir"
21.3559 + else
21.3560 + # Just accumulate the unique libdirs.
21.3561 + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
21.3562 + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
21.3563 + ;;
21.3564 + *)
21.3565 + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
21.3566 + ;;
21.3567 + esac
21.3568 + fi
21.3569 + else
21.3570 + eval flag=\"$hardcode_libdir_flag_spec\"
21.3571 + dep_rpath="$dep_rpath $flag"
21.3572 + fi
21.3573 + elif test -n "$runpath_var"; then
21.3574 + case "$perm_rpath " in
21.3575 + *" $libdir "*) ;;
21.3576 + *) perm_rpath="$perm_rpath $libdir" ;;
21.3577 + esac
21.3578 + fi
21.3579 + done
21.3580 + # Substitute the hardcoded libdirs into the rpath.
21.3581 + if test -n "$hardcode_libdir_separator" &&
21.3582 + test -n "$hardcode_libdirs"; then
21.3583 + libdir="$hardcode_libdirs"
21.3584 + if test -n "$hardcode_libdir_flag_spec_ld"; then
21.3585 + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
21.3586 + else
21.3587 + eval dep_rpath=\"$hardcode_libdir_flag_spec\"
21.3588 + fi
21.3589 + fi
21.3590 + if test -n "$runpath_var" && test -n "$perm_rpath"; then
21.3591 + # We should set the runpath_var.
21.3592 + rpath=
21.3593 + for dir in $perm_rpath; do
21.3594 + rpath="$rpath$dir:"
21.3595 + done
21.3596 + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
21.3597 + fi
21.3598 + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
21.3599 + fi
21.3600 +
21.3601 + shlibpath="$finalize_shlibpath"
21.3602 + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
21.3603 + if test -n "$shlibpath"; then
21.3604 + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
21.3605 + fi
21.3606 +
21.3607 + # Get the real and link names of the library.
21.3608 + eval shared_ext=\"$shrext_cmds\"
21.3609 + eval library_names=\"$library_names_spec\"
21.3610 + set dummy $library_names
21.3611 + realname="$2"
21.3612 + shift; shift
21.3613 +
21.3614 + if test -n "$soname_spec"; then
21.3615 + eval soname=\"$soname_spec\"
21.3616 + else
21.3617 + soname="$realname"
21.3618 + fi
21.3619 + if test -z "$dlname"; then
21.3620 + dlname=$soname
21.3621 + fi
21.3622 +
21.3623 + lib="$output_objdir/$realname"
21.3624 + for link
21.3625 + do
21.3626 + linknames="$linknames $link"
21.3627 + done
21.3628 +
21.3629 + # Use standard objects if they are pic
21.3630 + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
21.3631 +
21.3632 + # Prepare the list of exported symbols
21.3633 + if test -z "$export_symbols"; then
21.3634 + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
21.3635 + $show "generating symbol list for \`$libname.la'"
21.3636 + export_symbols="$output_objdir/$libname.exp"
21.3637 + $run $rm $export_symbols
21.3638 + cmds=$export_symbols_cmds
21.3639 + save_ifs="$IFS"; IFS='~'
21.3640 + for cmd in $cmds; do
21.3641 + IFS="$save_ifs"
21.3642 + eval cmd=\"$cmd\"
21.3643 + if len=`expr "X$cmd" : ".*"` &&
21.3644 + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
21.3645 + $show "$cmd"
21.3646 + $run eval "$cmd" || exit $?
21.3647 + skipped_export=false
21.3648 + else
21.3649 + # The command line is too long to execute in one step.
21.3650 + $show "using reloadable object file for export list..."
21.3651 + skipped_export=:
21.3652 + fi
21.3653 + done
21.3654 + IFS="$save_ifs"
21.3655 + if test -n "$export_symbols_regex"; then
21.3656 + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
21.3657 + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
21.3658 + $show "$mv \"${export_symbols}T\" \"$export_symbols\""
21.3659 + $run eval '$mv "${export_symbols}T" "$export_symbols"'
21.3660 + fi
21.3661 + fi
21.3662 + fi
21.3663 +
21.3664 + if test -n "$export_symbols" && test -n "$include_expsyms"; then
21.3665 + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
21.3666 + fi
21.3667 +
21.3668 + tmp_deplibs=
21.3669 + for test_deplib in $deplibs; do
21.3670 + case " $convenience " in
21.3671 + *" $test_deplib "*) ;;
21.3672 + *)
21.3673 + tmp_deplibs="$tmp_deplibs $test_deplib"
21.3674 + ;;
21.3675 + esac
21.3676 + done
21.3677 + deplibs="$tmp_deplibs"
21.3678 +
21.3679 + if test -n "$convenience"; then
21.3680 + if test -n "$whole_archive_flag_spec"; then
21.3681 + save_libobjs=$libobjs
21.3682 + eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
21.3683 + else
21.3684 + gentop="$output_objdir/${outputname}x"
21.3685 + $show "${rm}r $gentop"
21.3686 + $run ${rm}r "$gentop"
21.3687 + $show "$mkdir $gentop"
21.3688 + $run $mkdir "$gentop"
21.3689 + status=$?
21.3690 + if test "$status" -ne 0 && test ! -d "$gentop"; then
21.3691 + exit $status
21.3692 + fi
21.3693 + generated="$generated $gentop"
21.3694 +
21.3695 + for xlib in $convenience; do
21.3696 + # Extract the objects.
21.3697 + case $xlib in
21.3698 + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
21.3699 + *) xabs=`pwd`"/$xlib" ;;
21.3700 + esac
21.3701 + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
21.3702 + xdir="$gentop/$xlib"
21.3703 +
21.3704 + $show "${rm}r $xdir"
21.3705 + $run ${rm}r "$xdir"
21.3706 + $show "$mkdir $xdir"
21.3707 + $run $mkdir "$xdir"
21.3708 + status=$?
21.3709 + if test "$status" -ne 0 && test ! -d "$xdir"; then
21.3710 + exit $status
21.3711 + fi
21.3712 + # We will extract separately just the conflicting names and we will no
21.3713 + # longer touch any unique names. It is faster to leave these extract
21.3714 + # automatically by $AR in one run.
21.3715 + $show "(cd $xdir && $AR x $xabs)"
21.3716 + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
21.3717 + if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
21.3718 + :
21.3719 + else
21.3720 + $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
21.3721 + $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
21.3722 + $AR t "$xabs" | sort | uniq -cd | while read -r count name
21.3723 + do
21.3724 + i=1
21.3725 + while test "$i" -le "$count"
21.3726 + do
21.3727 + # Put our $i before any first dot (extension)
21.3728 + # Never overwrite any file
21.3729 + name_to="$name"
21.3730 + while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
21.3731 + do
21.3732 + name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
21.3733 + done
21.3734 + $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
21.3735 + $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
21.3736 + i=`expr $i + 1`
21.3737 + done
21.3738 + done
21.3739 + fi
21.3740 +
21.3741 + libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
21.3742 + done
21.3743 + fi
21.3744 + fi
21.3745 +
21.3746 + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
21.3747 + eval flag=\"$thread_safe_flag_spec\"
21.3748 + linker_flags="$linker_flags $flag"
21.3749 + fi
21.3750 +
21.3751 + # Make a backup of the uninstalled library when relinking
21.3752 + if test "$mode" = relink; then
21.3753 + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
21.3754 + fi
21.3755 +
21.3756 + # Do each of the archive commands.
21.3757 + if test "$module" = yes && test -n "$module_cmds" ; then
21.3758 + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
21.3759 + eval test_cmds=\"$module_expsym_cmds\"
21.3760 + cmds=$module_expsym_cmds
21.3761 + else
21.3762 + eval test_cmds=\"$module_cmds\"
21.3763 + cmds=$module_cmds
21.3764 + fi
21.3765 + else
21.3766 + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
21.3767 + eval test_cmds=\"$archive_expsym_cmds\"
21.3768 + cmds=$archive_expsym_cmds
21.3769 + else
21.3770 + eval test_cmds=\"$archive_cmds\"
21.3771 + cmds=$archive_cmds
21.3772 + fi
21.3773 + fi
21.3774 +
21.3775 + if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
21.3776 + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
21.3777 + :
21.3778 + else
21.3779 + # The command line is too long to link in one step, link piecewise.
21.3780 + $echo "creating reloadable object files..."
21.3781 +
21.3782 + # Save the value of $output and $libobjs because we want to
21.3783 + # use them later. If we have whole_archive_flag_spec, we
21.3784 + # want to use save_libobjs as it was before
21.3785 + # whole_archive_flag_spec was expanded, because we can't
21.3786 + # assume the linker understands whole_archive_flag_spec.
21.3787 + # This may have to be revisited, in case too many
21.3788 + # convenience libraries get linked in and end up exceeding
21.3789 + # the spec.
21.3790 + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
21.3791 + save_libobjs=$libobjs
21.3792 + fi
21.3793 + save_output=$output
21.3794 +
21.3795 + # Clear the reloadable object creation command queue and
21.3796 + # initialize k to one.
21.3797 + test_cmds=
21.3798 + concat_cmds=
21.3799 + objlist=
21.3800 + delfiles=
21.3801 + last_robj=
21.3802 + k=1
21.3803 + output=$output_objdir/$save_output-${k}.$objext
21.3804 + # Loop over the list of objects to be linked.
21.3805 + for obj in $save_libobjs
21.3806 + do
21.3807 + eval test_cmds=\"$reload_cmds $objlist $last_robj\"
21.3808 + if test "X$objlist" = X ||
21.3809 + { len=`expr "X$test_cmds" : ".*"` &&
21.3810 + test "$len" -le "$max_cmd_len"; }; then
21.3811 + objlist="$objlist $obj"
21.3812 + else
21.3813 + # The command $test_cmds is almost too long, add a
21.3814 + # command to the queue.
21.3815 + if test "$k" -eq 1 ; then
21.3816 + # The first file doesn't have a previous command to add.
21.3817 + eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
21.3818 + else
21.3819 + # All subsequent reloadable object files will link in
21.3820 + # the last one created.
21.3821 + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
21.3822 + fi
21.3823 + last_robj=$output_objdir/$save_output-${k}.$objext
21.3824 + k=`expr $k + 1`
21.3825 + output=$output_objdir/$save_output-${k}.$objext
21.3826 + objlist=$obj
21.3827 + len=1
21.3828 + fi
21.3829 + done
21.3830 + # Handle the remaining objects by creating one last
21.3831 + # reloadable object file. All subsequent reloadable object
21.3832 + # files will link in the last one created.
21.3833 + test -z "$concat_cmds" || concat_cmds=$concat_cmds~
21.3834 + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
21.3835 +
21.3836 + if ${skipped_export-false}; then
21.3837 + $show "generating symbol list for \`$libname.la'"
21.3838 + export_symbols="$output_objdir/$libname.exp"
21.3839 + $run $rm $export_symbols
21.3840 + libobjs=$output
21.3841 + # Append the command to create the export file.
21.3842 + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
21.3843 + fi
21.3844 +
21.3845 + # Set up a command to remove the reloadale object files
21.3846 + # after they are used.
21.3847 + i=0
21.3848 + while test "$i" -lt "$k"
21.3849 + do
21.3850 + i=`expr $i + 1`
21.3851 + delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
21.3852 + done
21.3853 +
21.3854 + $echo "creating a temporary reloadable object file: $output"
21.3855 +
21.3856 + # Loop through the commands generated above and execute them.
21.3857 + save_ifs="$IFS"; IFS='~'
21.3858 + for cmd in $concat_cmds; do
21.3859 + IFS="$save_ifs"
21.3860 + $show "$cmd"
21.3861 + $run eval "$cmd" || exit $?
21.3862 + done
21.3863 + IFS="$save_ifs"
21.3864 +
21.3865 + libobjs=$output
21.3866 + # Restore the value of output.
21.3867 + output=$save_output
21.3868 +
21.3869 + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
21.3870 + eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
21.3871 + fi
21.3872 + # Expand the library linking commands again to reset the
21.3873 + # value of $libobjs for piecewise linking.
21.3874 +
21.3875 + # Do each of the archive commands.
21.3876 + if test "$module" = yes && test -n "$module_cmds" ; then
21.3877 + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
21.3878 + cmds=$module_expsym_cmds
21.3879 + else
21.3880 + cmds=$module_cmds
21.3881 + fi
21.3882 + else
21.3883 + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
21.3884 + cmds=$archive_expsym_cmds
21.3885 + else
21.3886 + cmds=$archive_cmds
21.3887 + fi
21.3888 + fi
21.3889 +
21.3890 + # Append the command to remove the reloadable object files
21.3891 + # to the just-reset $cmds.
21.3892 + eval cmds=\"\$cmds~\$rm $delfiles\"
21.3893 + fi
21.3894 + save_ifs="$IFS"; IFS='~'
21.3895 + for cmd in $cmds; do
21.3896 + IFS="$save_ifs"
21.3897 + eval cmd=\"$cmd\"
21.3898 + $show "$cmd"
21.3899 + $run eval "$cmd" || exit $?
21.3900 + done
21.3901 + IFS="$save_ifs"
21.3902 +
21.3903 + # Restore the uninstalled library and exit
21.3904 + if test "$mode" = relink; then
21.3905 + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
21.3906 + exit $EXIT_SUCCESS
21.3907 + fi
21.3908 +
21.3909 + # Create links to the real library.
21.3910 + for linkname in $linknames; do
21.3911 + if test "$realname" != "$linkname"; then
21.3912 + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
21.3913 + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
21.3914 + fi
21.3915 + done
21.3916 +
21.3917 + # If -module or -export-dynamic was specified, set the dlname.
21.3918 + if test "$module" = yes || test "$export_dynamic" = yes; then
21.3919 + # On all known operating systems, these are identical.
21.3920 + dlname="$soname"
21.3921 + fi
21.3922 + fi
21.3923 + ;;
21.3924 +
21.3925 + obj)
21.3926 + if test -n "$deplibs"; then
21.3927 + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
21.3928 + fi
21.3929 +
21.3930 + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
21.3931 + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
21.3932 + fi
21.3933 +
21.3934 + if test -n "$rpath"; then
21.3935 + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
21.3936 + fi
21.3937 +
21.3938 + if test -n "$xrpath"; then
21.3939 + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
21.3940 + fi
21.3941 +
21.3942 + if test -n "$vinfo"; then
21.3943 + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
21.3944 + fi
21.3945 +
21.3946 + if test -n "$release"; then
21.3947 + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
21.3948 + fi
21.3949 +
21.3950 + case $output in
21.3951 + *.lo)
21.3952 + if test -n "$objs$old_deplibs"; then
21.3953 + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
21.3954 + exit $EXIT_FAILURE
21.3955 + fi
21.3956 + libobj="$output"
21.3957 + obj=`$echo "X$output" | $Xsed -e "$lo2o"`
21.3958 + ;;
21.3959 + *)
21.3960 + libobj=
21.3961 + obj="$output"
21.3962 + ;;
21.3963 + esac
21.3964 +
21.3965 + # Delete the old objects.
21.3966 + $run $rm $obj $libobj
21.3967 +
21.3968 + # Objects from convenience libraries. This assumes
21.3969 + # single-version convenience libraries. Whenever we create
21.3970 + # different ones for PIC/non-PIC, this we'll have to duplicate
21.3971 + # the extraction.
21.3972 + reload_conv_objs=
21.3973 + gentop=
21.3974 + # reload_cmds runs $LD directly, so let us get rid of
21.3975 + # -Wl from whole_archive_flag_spec
21.3976 + wl=
21.3977 +
21.3978 + if test -n "$convenience"; then
21.3979 + if test -n "$whole_archive_flag_spec"; then
21.3980 + eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
21.3981 + else
21.3982 + gentop="$output_objdir/${obj}x"
21.3983 + $show "${rm}r $gentop"
21.3984 + $run ${rm}r "$gentop"
21.3985 + $show "$mkdir $gentop"
21.3986 + $run $mkdir "$gentop"
21.3987 + status=$?
21.3988 + if test "$status" -ne 0 && test ! -d "$gentop"; then
21.3989 + exit $status
21.3990 + fi
21.3991 + generated="$generated $gentop"
21.3992 +
21.3993 + for xlib in $convenience; do
21.3994 + # Extract the objects.
21.3995 + case $xlib in
21.3996 + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
21.3997 + *) xabs=`pwd`"/$xlib" ;;
21.3998 + esac
21.3999 + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
21.4000 + xdir="$gentop/$xlib"
21.4001 +
21.4002 + $show "${rm}r $xdir"
21.4003 + $run ${rm}r "$xdir"
21.4004 + $show "$mkdir $xdir"
21.4005 + $run $mkdir "$xdir"
21.4006 + status=$?
21.4007 + if test "$status" -ne 0 && test ! -d "$xdir"; then
21.4008 + exit $status
21.4009 + fi
21.4010 + # We will extract separately just the conflicting names and we will no
21.4011 + # longer touch any unique names. It is faster to leave these extract
21.4012 + # automatically by $AR in one run.
21.4013 + $show "(cd $xdir && $AR x $xabs)"
21.4014 + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
21.4015 + if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
21.4016 + :
21.4017 + else
21.4018 + $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
21.4019 + $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
21.4020 + $AR t "$xabs" | sort | uniq -cd | while read -r count name
21.4021 + do
21.4022 + i=1
21.4023 + while test "$i" -le "$count"
21.4024 + do
21.4025 + # Put our $i before any first dot (extension)
21.4026 + # Never overwrite any file
21.4027 + name_to="$name"
21.4028 + while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
21.4029 + do
21.4030 + name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
21.4031 + done
21.4032 + $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
21.4033 + $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
21.4034 + i=`expr $i + 1`
21.4035 + done
21.4036 + done
21.4037 + fi
21.4038 +
21.4039 + reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
21.4040 + done
21.4041 + fi
21.4042 + fi
21.4043 +
21.4044 + # Create the old-style object.
21.4045 + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
21.4046 +
21.4047 + output="$obj"
21.4048 + cmds=$reload_cmds
21.4049 + save_ifs="$IFS"; IFS='~'
21.4050 + for cmd in $cmds; do
21.4051 + IFS="$save_ifs"
21.4052 + eval cmd=\"$cmd\"
21.4053 + $show "$cmd"
21.4054 + $run eval "$cmd" || exit $?
21.4055 + done
21.4056 + IFS="$save_ifs"
21.4057 +
21.4058 + # Exit if we aren't doing a library object file.
21.4059 + if test -z "$libobj"; then
21.4060 + if test -n "$gentop"; then
21.4061 + $show "${rm}r $gentop"
21.4062 + $run ${rm}r $gentop
21.4063 + fi
21.4064 +
21.4065 + exit $EXIT_SUCCESS
21.4066 + fi
21.4067 +
21.4068 + if test "$build_libtool_libs" != yes; then
21.4069 + if test -n "$gentop"; then
21.4070 + $show "${rm}r $gentop"
21.4071 + $run ${rm}r $gentop
21.4072 + fi
21.4073 +
21.4074 + # Create an invalid libtool object if no PIC, so that we don't
21.4075 + # accidentally link it into a program.
21.4076 + # $show "echo timestamp > $libobj"
21.4077 + # $run eval "echo timestamp > $libobj" || exit $?
21.4078 + exit $EXIT_SUCCESS
21.4079 + fi
21.4080 +
21.4081 + if test -n "$pic_flag" || test "$pic_mode" != default; then
21.4082 + # Only do commands if we really have different PIC objects.
21.4083 + reload_objs="$libobjs $reload_conv_objs"
21.4084 + output="$libobj"
21.4085 + cmds=$reload_cmds
21.4086 + save_ifs="$IFS"; IFS='~'
21.4087 + for cmd in $cmds; do
21.4088 + IFS="$save_ifs"
21.4089 + eval cmd=\"$cmd\"
21.4090 + $show "$cmd"
21.4091 + $run eval "$cmd" || exit $?
21.4092 + done
21.4093 + IFS="$save_ifs"
21.4094 + fi
21.4095 +
21.4096 + if test -n "$gentop"; then
21.4097 + $show "${rm}r $gentop"
21.4098 + $run ${rm}r $gentop
21.4099 + fi
21.4100 +
21.4101 + exit $EXIT_SUCCESS
21.4102 + ;;
21.4103 +
21.4104 + prog)
21.4105 + case $host in
21.4106 + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
21.4107 + esac
21.4108 + if test -n "$vinfo"; then
21.4109 + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
21.4110 + fi
21.4111 +
21.4112 + if test -n "$release"; then
21.4113 + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
21.4114 + fi
21.4115 +
21.4116 + if test "$preload" = yes; then
21.4117 + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
21.4118 + test "$dlopen_self_static" = unknown; then
21.4119 + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
21.4120 + fi
21.4121 + fi
21.4122 +
21.4123 + case $host in
21.4124 + *-*-rhapsody* | *-*-darwin1.[012])
21.4125 + # On Rhapsody replace the C library is the System framework
21.4126 + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
21.4127 + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
21.4128 + ;;
21.4129 + esac
21.4130 +
21.4131 + case $host in
21.4132 + *darwin*)
21.4133 + # Don't allow lazy linking, it breaks C++ global constructors
21.4134 + if test "$tagname" = CXX ; then
21.4135 + compile_command="$compile_command ${wl}-bind_at_load"
21.4136 + finalize_command="$finalize_command ${wl}-bind_at_load"
21.4137 + fi
21.4138 + ;;
21.4139 + esac
21.4140 +
21.4141 + compile_command="$compile_command $compile_deplibs"
21.4142 + finalize_command="$finalize_command $finalize_deplibs"
21.4143 +
21.4144 + if test -n "$rpath$xrpath"; then
21.4145 + # If the user specified any rpath flags, then add them.
21.4146 + for libdir in $rpath $xrpath; do
21.4147 + # This is the magic to use -rpath.
21.4148 + case "$finalize_rpath " in
21.4149 + *" $libdir "*) ;;
21.4150 + *) finalize_rpath="$finalize_rpath $libdir" ;;
21.4151 + esac
21.4152 + done
21.4153 + fi
21.4154 +
21.4155 + # Now hardcode the library paths
21.4156 + rpath=
21.4157 + hardcode_libdirs=
21.4158 + for libdir in $compile_rpath $finalize_rpath; do
21.4159 + if test -n "$hardcode_libdir_flag_spec"; then
21.4160 + if test -n "$hardcode_libdir_separator"; then
21.4161 + if test -z "$hardcode_libdirs"; then
21.4162 + hardcode_libdirs="$libdir"
21.4163 + else
21.4164 + # Just accumulate the unique libdirs.
21.4165 + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
21.4166 + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
21.4167 + ;;
21.4168 + *)
21.4169 + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
21.4170 + ;;
21.4171 + esac
21.4172 + fi
21.4173 + else
21.4174 + eval flag=\"$hardcode_libdir_flag_spec\"
21.4175 + rpath="$rpath $flag"
21.4176 + fi
21.4177 + elif test -n "$runpath_var"; then
21.4178 + case "$perm_rpath " in
21.4179 + *" $libdir "*) ;;
21.4180 + *) perm_rpath="$perm_rpath $libdir" ;;
21.4181 + esac
21.4182 + fi
21.4183 + case $host in
21.4184 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
21.4185 + case :$dllsearchpath: in
21.4186 + *":$libdir:"*) ;;
21.4187 + *) dllsearchpath="$dllsearchpath:$libdir";;
21.4188 + esac
21.4189 + ;;
21.4190 + esac
21.4191 + done
21.4192 + # Substitute the hardcoded libdirs into the rpath.
21.4193 + if test -n "$hardcode_libdir_separator" &&
21.4194 + test -n "$hardcode_libdirs"; then
21.4195 + libdir="$hardcode_libdirs"
21.4196 + eval rpath=\" $hardcode_libdir_flag_spec\"
21.4197 + fi
21.4198 + compile_rpath="$rpath"
21.4199 +
21.4200 + rpath=
21.4201 + hardcode_libdirs=
21.4202 + for libdir in $finalize_rpath; do
21.4203 + if test -n "$hardcode_libdir_flag_spec"; then
21.4204 + if test -n "$hardcode_libdir_separator"; then
21.4205 + if test -z "$hardcode_libdirs"; then
21.4206 + hardcode_libdirs="$libdir"
21.4207 + else
21.4208 + # Just accumulate the unique libdirs.
21.4209 + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
21.4210 + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
21.4211 + ;;
21.4212 + *)
21.4213 + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
21.4214 + ;;
21.4215 + esac
21.4216 + fi
21.4217 + else
21.4218 + eval flag=\"$hardcode_libdir_flag_spec\"
21.4219 + rpath="$rpath $flag"
21.4220 + fi
21.4221 + elif test -n "$runpath_var"; then
21.4222 + case "$finalize_perm_rpath " in
21.4223 + *" $libdir "*) ;;
21.4224 + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
21.4225 + esac
21.4226 + fi
21.4227 + done
21.4228 + # Substitute the hardcoded libdirs into the rpath.
21.4229 + if test -n "$hardcode_libdir_separator" &&
21.4230 + test -n "$hardcode_libdirs"; then
21.4231 + libdir="$hardcode_libdirs"
21.4232 + eval rpath=\" $hardcode_libdir_flag_spec\"
21.4233 + fi
21.4234 + finalize_rpath="$rpath"
21.4235 +
21.4236 + if test -n "$libobjs" && test "$build_old_libs" = yes; then
21.4237 + # Transform all the library objects into standard objects.
21.4238 + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
21.4239 + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
21.4240 + fi
21.4241 +
21.4242 + dlsyms=
21.4243 + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
21.4244 + if test -n "$NM" && test -n "$global_symbol_pipe"; then
21.4245 + dlsyms="${outputname}S.c"
21.4246 + else
21.4247 + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
21.4248 + fi
21.4249 + fi
21.4250 +
21.4251 + if test -n "$dlsyms"; then
21.4252 + case $dlsyms in
21.4253 + "") ;;
21.4254 + *.c)
21.4255 + # Discover the nlist of each of the dlfiles.
21.4256 + nlist="$output_objdir/${outputname}.nm"
21.4257 +
21.4258 + $show "$rm $nlist ${nlist}S ${nlist}T"
21.4259 + $run $rm "$nlist" "${nlist}S" "${nlist}T"
21.4260 +
21.4261 + # Parse the name list into a source file.
21.4262 + $show "creating $output_objdir/$dlsyms"
21.4263 +
21.4264 + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
21.4265 +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
21.4266 +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
21.4267 +
21.4268 +#ifdef __cplusplus
21.4269 +extern \"C\" {
21.4270 +#endif
21.4271 +
21.4272 +/* Prevent the only kind of declaration conflicts we can make. */
21.4273 +#define lt_preloaded_symbols some_other_symbol
21.4274 +
21.4275 +/* External symbol declarations for the compiler. */\
21.4276 +"
21.4277 +
21.4278 + if test "$dlself" = yes; then
21.4279 + $show "generating symbol list for \`$output'"
21.4280 +
21.4281 + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
21.4282 +
21.4283 + # Add our own program objects to the symbol list.
21.4284 + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
21.4285 + for arg in $progfiles; do
21.4286 + $show "extracting global C symbols from \`$arg'"
21.4287 + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
21.4288 + done
21.4289 +
21.4290 + if test -n "$exclude_expsyms"; then
21.4291 + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
21.4292 + $run eval '$mv "$nlist"T "$nlist"'
21.4293 + fi
21.4294 +
21.4295 + if test -n "$export_symbols_regex"; then
21.4296 + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
21.4297 + $run eval '$mv "$nlist"T "$nlist"'
21.4298 + fi
21.4299 +
21.4300 + # Prepare the list of exported symbols
21.4301 + if test -z "$export_symbols"; then
21.4302 + export_symbols="$output_objdir/$output.exp"
21.4303 + $run $rm $export_symbols
21.4304 + $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
21.4305 + else
21.4306 + $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
21.4307 + $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
21.4308 + $run eval 'mv "$nlist"T "$nlist"'
21.4309 + fi
21.4310 + fi
21.4311 +
21.4312 + for arg in $dlprefiles; do
21.4313 + $show "extracting global C symbols from \`$arg'"
21.4314 + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
21.4315 + $run eval '$echo ": $name " >> "$nlist"'
21.4316 + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
21.4317 + done
21.4318 +
21.4319 + if test -z "$run"; then
21.4320 + # Make sure we have at least an empty file.
21.4321 + test -f "$nlist" || : > "$nlist"
21.4322 +
21.4323 + if test -n "$exclude_expsyms"; then
21.4324 + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
21.4325 + $mv "$nlist"T "$nlist"
21.4326 + fi
21.4327 +
21.4328 + # Try sorting and uniquifying the output.
21.4329 + if grep -v "^: " < "$nlist" |
21.4330 + if sort -k 3 </dev/null >/dev/null 2>&1; then
21.4331 + sort -k 3
21.4332 + else
21.4333 + sort +2
21.4334 + fi |
21.4335 + uniq > "$nlist"S; then
21.4336 + :
21.4337 + else
21.4338 + grep -v "^: " < "$nlist" > "$nlist"S
21.4339 + fi
21.4340 +
21.4341 + if test -f "$nlist"S; then
21.4342 + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
21.4343 + else
21.4344 + $echo '/* NONE */' >> "$output_objdir/$dlsyms"
21.4345 + fi
21.4346 +
21.4347 + $echo >> "$output_objdir/$dlsyms" "\
21.4348 +
21.4349 +#undef lt_preloaded_symbols
21.4350 +
21.4351 +#if defined (__STDC__) && __STDC__
21.4352 +# define lt_ptr void *
21.4353 +#else
21.4354 +# define lt_ptr char *
21.4355 +# define const
21.4356 +#endif
21.4357 +
21.4358 +/* The mapping between symbol names and symbols. */
21.4359 +const struct {
21.4360 + const char *name;
21.4361 + lt_ptr address;
21.4362 +}
21.4363 +lt_preloaded_symbols[] =
21.4364 +{\
21.4365 +"
21.4366 +
21.4367 + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
21.4368 +
21.4369 + $echo >> "$output_objdir/$dlsyms" "\
21.4370 + {0, (lt_ptr) 0}
21.4371 +};
21.4372 +
21.4373 +/* This works around a problem in FreeBSD linker */
21.4374 +#ifdef FREEBSD_WORKAROUND
21.4375 +static const void *lt_preloaded_setup() {
21.4376 + return lt_preloaded_symbols;
21.4377 +}
21.4378 +#endif
21.4379 +
21.4380 +#ifdef __cplusplus
21.4381 +}
21.4382 +#endif\
21.4383 +"
21.4384 + fi
21.4385 +
21.4386 + pic_flag_for_symtable=
21.4387 + case $host in
21.4388 + # compiling the symbol table file with pic_flag works around
21.4389 + # a FreeBSD bug that causes programs to crash when -lm is
21.4390 + # linked before any other PIC object. But we must not use
21.4391 + # pic_flag when linking with -static. The problem exists in
21.4392 + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
21.4393 + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
21.4394 + case "$compile_command " in
21.4395 + *" -static "*) ;;
21.4396 + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
21.4397 + esac;;
21.4398 + *-*-hpux*)
21.4399 + case "$compile_command " in
21.4400 + *" -static "*) ;;
21.4401 + *) pic_flag_for_symtable=" $pic_flag";;
21.4402 + esac
21.4403 + esac
21.4404 +
21.4405 + # Now compile the dynamic symbol file.
21.4406 + $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
21.4407 + $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
21.4408 +
21.4409 + # Clean up the generated files.
21.4410 + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
21.4411 + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
21.4412 +
21.4413 + # Transform the symbol file into the correct name.
21.4414 + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
21.4415 + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
21.4416 + ;;
21.4417 + *)
21.4418 + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
21.4419 + exit $EXIT_FAILURE
21.4420 + ;;
21.4421 + esac
21.4422 + else
21.4423 + # We keep going just in case the user didn't refer to
21.4424 + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
21.4425 + # really was required.
21.4426 +
21.4427 + # Nullify the symbol file.
21.4428 + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
21.4429 + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
21.4430 + fi
21.4431 +
21.4432 + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
21.4433 + # Replace the output file specification.
21.4434 + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
21.4435 + link_command="$compile_command$compile_rpath"
21.4436 +
21.4437 + # We have no uninstalled library dependencies, so finalize right now.
21.4438 + $show "$link_command"
21.4439 + $run eval "$link_command"
21.4440 + status=$?
21.4441 +
21.4442 + # Delete the generated files.
21.4443 + if test -n "$dlsyms"; then
21.4444 + $show "$rm $output_objdir/${outputname}S.${objext}"
21.4445 + $run $rm "$output_objdir/${outputname}S.${objext}"
21.4446 + fi
21.4447 +
21.4448 + exit $status
21.4449 + fi
21.4450 +
21.4451 + if test -n "$shlibpath_var"; then
21.4452 + # We should set the shlibpath_var
21.4453 + rpath=
21.4454 + for dir in $temp_rpath; do
21.4455 + case $dir in
21.4456 + [\\/]* | [A-Za-z]:[\\/]*)
21.4457 + # Absolute path.
21.4458 + rpath="$rpath$dir:"
21.4459 + ;;
21.4460 + *)
21.4461 + # Relative path: add a thisdir entry.
21.4462 + rpath="$rpath\$thisdir/$dir:"
21.4463 + ;;
21.4464 + esac
21.4465 + done
21.4466 + temp_rpath="$rpath"
21.4467 + fi
21.4468 +
21.4469 + if test -n "$compile_shlibpath$finalize_shlibpath"; then
21.4470 + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
21.4471 + fi
21.4472 + if test -n "$finalize_shlibpath"; then
21.4473 + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
21.4474 + fi
21.4475 +
21.4476 + compile_var=
21.4477 + finalize_var=
21.4478 + if test -n "$runpath_var"; then
21.4479 + if test -n "$perm_rpath"; then
21.4480 + # We should set the runpath_var.
21.4481 + rpath=
21.4482 + for dir in $perm_rpath; do
21.4483 + rpath="$rpath$dir:"
21.4484 + done
21.4485 + compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
21.4486 + fi
21.4487 + if test -n "$finalize_perm_rpath"; then
21.4488 + # We should set the runpath_var.
21.4489 + rpath=
21.4490 + for dir in $finalize_perm_rpath; do
21.4491 + rpath="$rpath$dir:"
21.4492 + done
21.4493 + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
21.4494 + fi
21.4495 + fi
21.4496 +
21.4497 + if test "$no_install" = yes; then
21.4498 + # We don't need to create a wrapper script.
21.4499 + link_command="$compile_var$compile_command$compile_rpath"
21.4500 + # Replace the output file specification.
21.4501 + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
21.4502 + # Delete the old output file.
21.4503 + $run $rm $output
21.4504 + # Link the executable and exit
21.4505 + $show "$link_command"
21.4506 + $run eval "$link_command" || exit $?
21.4507 + exit $EXIT_SUCCESS
21.4508 + fi
21.4509 +
21.4510 + if test "$hardcode_action" = relink; then
21.4511 + # Fast installation is not supported
21.4512 + link_command="$compile_var$compile_command$compile_rpath"
21.4513 + relink_command="$finalize_var$finalize_command$finalize_rpath"
21.4514 +
21.4515 + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
21.4516 + $echo "$modename: \`$output' will be relinked during installation" 1>&2
21.4517 + else
21.4518 + if test "$fast_install" != no; then
21.4519 + link_command="$finalize_var$compile_command$finalize_rpath"
21.4520 + if test "$fast_install" = yes; then
21.4521 + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
21.4522 + else
21.4523 + # fast_install is set to needless
21.4524 + relink_command=
21.4525 + fi
21.4526 + else
21.4527 + link_command="$compile_var$compile_command$compile_rpath"
21.4528 + relink_command="$finalize_var$finalize_command$finalize_rpath"
21.4529 + fi
21.4530 + fi
21.4531 +
21.4532 + # Replace the output file specification.
21.4533 + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
21.4534 +
21.4535 + # Delete the old output files.
21.4536 + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
21.4537 +
21.4538 + $show "$link_command"
21.4539 + $run eval "$link_command" || exit $?
21.4540 +
21.4541 + # Now create the wrapper script.
21.4542 + $show "creating $output"
21.4543 +
21.4544 + # Quote the relink command for shipping.
21.4545 + if test -n "$relink_command"; then
21.4546 + # Preserve any variables that may affect compiler behavior
21.4547 + for var in $variables_saved_for_relink; do
21.4548 + if eval test -z \"\${$var+set}\"; then
21.4549 + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
21.4550 + elif eval var_value=\$$var; test -z "$var_value"; then
21.4551 + relink_command="$var=; export $var; $relink_command"
21.4552 + else
21.4553 + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
21.4554 + relink_command="$var=\"$var_value\"; export $var; $relink_command"
21.4555 + fi
21.4556 + done
21.4557 + relink_command="(cd `pwd`; $relink_command)"
21.4558 + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
21.4559 + fi
21.4560 +
21.4561 + # Quote $echo for shipping.
21.4562 + if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
21.4563 + case $progpath in
21.4564 + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
21.4565 + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
21.4566 + esac
21.4567 + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
21.4568 + else
21.4569 + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
21.4570 + fi
21.4571 +
21.4572 + # Only actually do things if our run command is non-null.
21.4573 + if test -z "$run"; then
21.4574 + # win32 will think the script is a binary if it has
21.4575 + # a .exe suffix, so we strip it off here.
21.4576 + case $output in
21.4577 + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
21.4578 + esac
21.4579 + # test for cygwin because mv fails w/o .exe extensions
21.4580 + case $host in
21.4581 + *cygwin*)
21.4582 + exeext=.exe
21.4583 + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
21.4584 + *) exeext= ;;
21.4585 + esac
21.4586 + case $host in
21.4587 + *cygwin* | *mingw* )
21.4588 + cwrappersource=`$echo ${objdir}/lt-${output}.c`
21.4589 + cwrapper=`$echo ${output}.exe`
21.4590 + $rm $cwrappersource $cwrapper
21.4591 + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
21.4592 +
21.4593 + cat > $cwrappersource <<EOF
21.4594 +
21.4595 +/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
21.4596 + Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
21.4597 +
21.4598 + The $output program cannot be directly executed until all the libtool
21.4599 + libraries that it depends on are installed.
21.4600 +
21.4601 + This wrapper executable should never be moved out of the build directory.
21.4602 + If it is, it will not operate correctly.
21.4603 +
21.4604 + Currently, it simply execs the wrapper *script* "/bin/sh $output",
21.4605 + but could eventually absorb all of the scripts functionality and
21.4606 + exec $objdir/$outputname directly.
21.4607 +*/
21.4608 +EOF
21.4609 + cat >> $cwrappersource<<"EOF"
21.4610 +#include <stdio.h>
21.4611 +#include <stdlib.h>
21.4612 +#include <unistd.h>
21.4613 +#include <malloc.h>
21.4614 +#include <stdarg.h>
21.4615 +#include <assert.h>
21.4616 +
21.4617 +#if defined(PATH_MAX)
21.4618 +# define LT_PATHMAX PATH_MAX
21.4619 +#elif defined(MAXPATHLEN)
21.4620 +# define LT_PATHMAX MAXPATHLEN
21.4621 +#else
21.4622 +# define LT_PATHMAX 1024
21.4623 +#endif
21.4624 +
21.4625 +#ifndef DIR_SEPARATOR
21.4626 +#define DIR_SEPARATOR '/'
21.4627 +#endif
21.4628 +
21.4629 +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
21.4630 + defined (__OS2__)
21.4631 +#define HAVE_DOS_BASED_FILE_SYSTEM
21.4632 +#ifndef DIR_SEPARATOR_2
21.4633 +#define DIR_SEPARATOR_2 '\\'
21.4634 +#endif
21.4635 +#endif
21.4636 +
21.4637 +#ifndef DIR_SEPARATOR_2
21.4638 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
21.4639 +#else /* DIR_SEPARATOR_2 */
21.4640 +# define IS_DIR_SEPARATOR(ch) \
21.4641 + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
21.4642 +#endif /* DIR_SEPARATOR_2 */
21.4643 +
21.4644 +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
21.4645 +#define XFREE(stale) do { \
21.4646 + if (stale) { free ((void *) stale); stale = 0; } \
21.4647 +} while (0)
21.4648 +
21.4649 +const char *program_name = NULL;
21.4650 +
21.4651 +void * xmalloc (size_t num);
21.4652 +char * xstrdup (const char *string);
21.4653 +char * basename (const char *name);
21.4654 +char * fnqualify(const char *path);
21.4655 +char * strendzap(char *str, const char *pat);
21.4656 +void lt_fatal (const char *message, ...);
21.4657 +
21.4658 +int
21.4659 +main (int argc, char *argv[])
21.4660 +{
21.4661 + char **newargz;
21.4662 + int i;
21.4663 +
21.4664 + program_name = (char *) xstrdup ((char *) basename (argv[0]));
21.4665 + newargz = XMALLOC(char *, argc+2);
21.4666 +EOF
21.4667 +
21.4668 + cat >> $cwrappersource <<EOF
21.4669 + newargz[0] = "$SHELL";
21.4670 +EOF
21.4671 +
21.4672 + cat >> $cwrappersource <<"EOF"
21.4673 + newargz[1] = fnqualify(argv[0]);
21.4674 + /* we know the script has the same name, without the .exe */
21.4675 + /* so make sure newargz[1] doesn't end in .exe */
21.4676 + strendzap(newargz[1],".exe");
21.4677 + for (i = 1; i < argc; i++)
21.4678 + newargz[i+1] = xstrdup(argv[i]);
21.4679 + newargz[argc+1] = NULL;
21.4680 +EOF
21.4681 +
21.4682 + cat >> $cwrappersource <<EOF
21.4683 + execv("$SHELL",newargz);
21.4684 +EOF
21.4685 +
21.4686 + cat >> $cwrappersource <<"EOF"
21.4687 +}
21.4688 +
21.4689 +void *
21.4690 +xmalloc (size_t num)
21.4691 +{
21.4692 + void * p = (void *) malloc (num);
21.4693 + if (!p)
21.4694 + lt_fatal ("Memory exhausted");
21.4695 +
21.4696 + return p;
21.4697 +}
21.4698 +
21.4699 +char *
21.4700 +xstrdup (const char *string)
21.4701 +{
21.4702 + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
21.4703 +;
21.4704 +}
21.4705 +
21.4706 +char *
21.4707 +basename (const char *name)
21.4708 +{
21.4709 + const char *base;
21.4710 +
21.4711 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
21.4712 + /* Skip over the disk name in MSDOS pathnames. */
21.4713 + if (isalpha (name[0]) && name[1] == ':')
21.4714 + name += 2;
21.4715 +#endif
21.4716 +
21.4717 + for (base = name; *name; name++)
21.4718 + if (IS_DIR_SEPARATOR (*name))
21.4719 + base = name + 1;
21.4720 + return (char *) base;
21.4721 +}
21.4722 +
21.4723 +char *
21.4724 +fnqualify(const char *path)
21.4725 +{
21.4726 + size_t size;
21.4727 + char *p;
21.4728 + char tmp[LT_PATHMAX + 1];
21.4729 +
21.4730 + assert(path != NULL);
21.4731 +
21.4732 + /* Is it qualified already? */
21.4733 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
21.4734 + if (isalpha (path[0]) && path[1] == ':')
21.4735 + return xstrdup (path);
21.4736 +#endif
21.4737 + if (IS_DIR_SEPARATOR (path[0]))
21.4738 + return xstrdup (path);
21.4739 +
21.4740 + /* prepend the current directory */
21.4741 + /* doesn't handle '~' */
21.4742 + if (getcwd (tmp, LT_PATHMAX) == NULL)
21.4743 + lt_fatal ("getcwd failed");
21.4744 + size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
21.4745 + p = XMALLOC(char, size);
21.4746 + sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
21.4747 + return p;
21.4748 +}
21.4749 +
21.4750 +char *
21.4751 +strendzap(char *str, const char *pat)
21.4752 +{
21.4753 + size_t len, patlen;
21.4754 +
21.4755 + assert(str != NULL);
21.4756 + assert(pat != NULL);
21.4757 +
21.4758 + len = strlen(str);
21.4759 + patlen = strlen(pat);
21.4760 +
21.4761 + if (patlen <= len)
21.4762 + {
21.4763 + str += len - patlen;
21.4764 + if (strcmp(str, pat) == 0)
21.4765 + *str = '\0';
21.4766 + }
21.4767 + return str;
21.4768 +}
21.4769 +
21.4770 +static void
21.4771 +lt_error_core (int exit_status, const char * mode,
21.4772 + const char * message, va_list ap)
21.4773 +{
21.4774 + fprintf (stderr, "%s: %s: ", program_name, mode);
21.4775 + vfprintf (stderr, message, ap);
21.4776 + fprintf (stderr, ".\n");
21.4777 +
21.4778 + if (exit_status >= 0)
21.4779 + exit (exit_status);
21.4780 +}
21.4781 +
21.4782 +void
21.4783 +lt_fatal (const char *message, ...)
21.4784 +{
21.4785 + va_list ap;
21.4786 + va_start (ap, message);
21.4787 + lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
21.4788 + va_end (ap);
21.4789 +}
21.4790 +EOF
21.4791 + # we should really use a build-platform specific compiler
21.4792 + # here, but OTOH, the wrappers (shell script and this C one)
21.4793 + # are only useful if you want to execute the "real" binary.
21.4794 + # Since the "real" binary is built for $host, then this
21.4795 + # wrapper might as well be built for $host, too.
21.4796 + $run $LTCC -s -o $cwrapper $cwrappersource
21.4797 + ;;
21.4798 + esac
21.4799 + $rm $output
21.4800 + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
21.4801 +
21.4802 + $echo > $output "\
21.4803 +#! $SHELL
21.4804 +
21.4805 +# $output - temporary wrapper script for $objdir/$outputname
21.4806 +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
21.4807 +#
21.4808 +# The $output program cannot be directly executed until all the libtool
21.4809 +# libraries that it depends on are installed.
21.4810 +#
21.4811 +# This wrapper script should never be moved out of the build directory.
21.4812 +# If it is, it will not operate correctly.
21.4813 +
21.4814 +# Sed substitution that helps us do robust quoting. It backslashifies
21.4815 +# metacharacters that are still active within double-quoted strings.
21.4816 +Xsed='${SED} -e 1s/^X//'
21.4817 +sed_quote_subst='$sed_quote_subst'
21.4818 +
21.4819 +# The HP-UX ksh and POSIX shell print the target directory to stdout
21.4820 +# if CDPATH is set.
21.4821 +if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
21.4822 +
21.4823 +relink_command=\"$relink_command\"
21.4824 +
21.4825 +# This environment variable determines our operation mode.
21.4826 +if test \"\$libtool_install_magic\" = \"$magic\"; then
21.4827 + # install mode needs the following variable:
21.4828 + notinst_deplibs='$notinst_deplibs'
21.4829 +else
21.4830 + # When we are sourced in execute mode, \$file and \$echo are already set.
21.4831 + if test \"\$libtool_execute_magic\" != \"$magic\"; then
21.4832 + echo=\"$qecho\"
21.4833 + file=\"\$0\"
21.4834 + # Make sure echo works.
21.4835 + if test \"X\$1\" = X--no-reexec; then
21.4836 + # Discard the --no-reexec flag, and continue.
21.4837 + shift
21.4838 + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
21.4839 + # Yippee, \$echo works!
21.4840 + :
21.4841 + else
21.4842 + # Restart under the correct shell, and then maybe \$echo will work.
21.4843 + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
21.4844 + fi
21.4845 + fi\
21.4846 +"
21.4847 + $echo >> $output "\
21.4848 +
21.4849 + # Find the directory that this script lives in.
21.4850 + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
21.4851 + test \"x\$thisdir\" = \"x\$file\" && thisdir=.
21.4852 +
21.4853 + # Follow symbolic links until we get to the real thisdir.
21.4854 + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
21.4855 + while test -n \"\$file\"; do
21.4856 + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
21.4857 +
21.4858 + # If there was a directory component, then change thisdir.
21.4859 + if test \"x\$destdir\" != \"x\$file\"; then
21.4860 + case \"\$destdir\" in
21.4861 + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
21.4862 + *) thisdir=\"\$thisdir/\$destdir\" ;;
21.4863 + esac
21.4864 + fi
21.4865 +
21.4866 + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
21.4867 + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
21.4868 + done
21.4869 +
21.4870 + # Try to get the absolute directory name.
21.4871 + absdir=\`cd \"\$thisdir\" && pwd\`
21.4872 + test -n \"\$absdir\" && thisdir=\"\$absdir\"
21.4873 +"
21.4874 +
21.4875 + if test "$fast_install" = yes; then
21.4876 + $echo >> $output "\
21.4877 + program=lt-'$outputname'$exeext
21.4878 + progdir=\"\$thisdir/$objdir\"
21.4879 +
21.4880 + if test ! -f \"\$progdir/\$program\" || \\
21.4881 + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
21.4882 + test \"X\$file\" != \"X\$progdir/\$program\"; }; then
21.4883 +
21.4884 + file=\"\$\$-\$program\"
21.4885 +
21.4886 + if test ! -d \"\$progdir\"; then
21.4887 + $mkdir \"\$progdir\"
21.4888 + else
21.4889 + $rm \"\$progdir/\$file\"
21.4890 + fi"
21.4891 +
21.4892 + $echo >> $output "\
21.4893 +
21.4894 + # relink executable if necessary
21.4895 + if test -n \"\$relink_command\"; then
21.4896 + if relink_command_output=\`eval \$relink_command 2>&1\`; then :
21.4897 + else
21.4898 + $echo \"\$relink_command_output\" >&2
21.4899 + $rm \"\$progdir/\$file\"
21.4900 + exit $EXIT_FAILURE
21.4901 + fi
21.4902 + fi
21.4903 +
21.4904 + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
21.4905 + { $rm \"\$progdir/\$program\";
21.4906 + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
21.4907 + $rm \"\$progdir/\$file\"
21.4908 + fi"
21.4909 + else
21.4910 + $echo >> $output "\
21.4911 + program='$outputname'
21.4912 + progdir=\"\$thisdir/$objdir\"
21.4913 +"
21.4914 + fi
21.4915 +
21.4916 + $echo >> $output "\
21.4917 +
21.4918 + if test -f \"\$progdir/\$program\"; then"
21.4919 +
21.4920 + # Export our shlibpath_var if we have one.
21.4921 + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
21.4922 + $echo >> $output "\
21.4923 + # Add our own library path to $shlibpath_var
21.4924 + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
21.4925 +
21.4926 + # Some systems cannot cope with colon-terminated $shlibpath_var
21.4927 + # The second colon is a workaround for a bug in BeOS R4 sed
21.4928 + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
21.4929 +
21.4930 + export $shlibpath_var
21.4931 +"
21.4932 + fi
21.4933 +
21.4934 + # fixup the dll searchpath if we need to.
21.4935 + if test -n "$dllsearchpath"; then
21.4936 + $echo >> $output "\
21.4937 + # Add the dll search path components to the executable PATH
21.4938 + PATH=$dllsearchpath:\$PATH
21.4939 +"
21.4940 + fi
21.4941 +
21.4942 + $echo >> $output "\
21.4943 + if test \"\$libtool_execute_magic\" != \"$magic\"; then
21.4944 + # Run the actual program with our arguments.
21.4945 +"
21.4946 + case $host in
21.4947 + # Backslashes separate directories on plain windows
21.4948 + *-*-mingw | *-*-os2*)
21.4949 + $echo >> $output "\
21.4950 + exec \$progdir\\\\\$program \${1+\"\$@\"}
21.4951 +"
21.4952 + ;;
21.4953 +
21.4954 + *)
21.4955 + $echo >> $output "\
21.4956 + exec \$progdir/\$program \${1+\"\$@\"}
21.4957 +"
21.4958 + ;;
21.4959 + esac
21.4960 + $echo >> $output "\
21.4961 + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
21.4962 + exit $EXIT_FAILURE
21.4963 + fi
21.4964 + else
21.4965 + # The program doesn't exist.
21.4966 + \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
21.4967 + \$echo \"This script is just a wrapper for \$program.\" 1>&2
21.4968 + $echo \"See the $PACKAGE documentation for more information.\" 1>&2
21.4969 + exit $EXIT_FAILURE
21.4970 + fi
21.4971 +fi\
21.4972 +"
21.4973 + chmod +x $output
21.4974 + fi
21.4975 + exit $EXIT_SUCCESS
21.4976 + ;;
21.4977 + esac
21.4978 +
21.4979 + # See if we need to build an old-fashioned archive.
21.4980 + for oldlib in $oldlibs; do
21.4981 +
21.4982 + if test "$build_libtool_libs" = convenience; then
21.4983 + oldobjs="$libobjs_save"
21.4984 + addlibs="$convenience"
21.4985 + build_libtool_libs=no
21.4986 + else
21.4987 + if test "$build_libtool_libs" = module; then
21.4988 + oldobjs="$libobjs_save"
21.4989 + build_libtool_libs=no
21.4990 + else
21.4991 + oldobjs="$old_deplibs $non_pic_objects"
21.4992 + fi
21.4993 + addlibs="$old_convenience"
21.4994 + fi
21.4995 +
21.4996 + if test -n "$addlibs"; then
21.4997 + gentop="$output_objdir/${outputname}x"
21.4998 + $show "${rm}r $gentop"
21.4999 + $run ${rm}r "$gentop"
21.5000 + $show "$mkdir $gentop"
21.5001 + $run $mkdir "$gentop"
21.5002 + status=$?
21.5003 + if test "$status" -ne 0 && test ! -d "$gentop"; then
21.5004 + exit $status
21.5005 + fi
21.5006 + generated="$generated $gentop"
21.5007 +
21.5008 + # Add in members from convenience archives.
21.5009 + for xlib in $addlibs; do
21.5010 + # Extract the objects.
21.5011 + case $xlib in
21.5012 + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
21.5013 + *) xabs=`pwd`"/$xlib" ;;
21.5014 + esac
21.5015 + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
21.5016 + xdir="$gentop/$xlib"
21.5017 +
21.5018 + $show "${rm}r $xdir"
21.5019 + $run ${rm}r "$xdir"
21.5020 + $show "$mkdir $xdir"
21.5021 + $run $mkdir "$xdir"
21.5022 + status=$?
21.5023 + if test "$status" -ne 0 && test ! -d "$xdir"; then
21.5024 + exit $status
21.5025 + fi
21.5026 + # We will extract separately just the conflicting names and we will no
21.5027 + # longer touch any unique names. It is faster to leave these extract
21.5028 + # automatically by $AR in one run.
21.5029 + $show "(cd $xdir && $AR x $xabs)"
21.5030 + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
21.5031 + if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
21.5032 + :
21.5033 + else
21.5034 + $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
21.5035 + $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
21.5036 + $AR t "$xabs" | sort | uniq -cd | while read -r count name
21.5037 + do
21.5038 + i=1
21.5039 + while test "$i" -le "$count"
21.5040 + do
21.5041 + # Put our $i before any first dot (extension)
21.5042 + # Never overwrite any file
21.5043 + name_to="$name"
21.5044 + while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
21.5045 + do
21.5046 + name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
21.5047 + done
21.5048 + $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
21.5049 + $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
21.5050 + i=`expr $i + 1`
21.5051 + done
21.5052 + done
21.5053 + fi
21.5054 +
21.5055 + oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
21.5056 + done
21.5057 + fi
21.5058 +
21.5059 + # Do each command in the archive commands.
21.5060 + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
21.5061 + cmds=$old_archive_from_new_cmds
21.5062 + else
21.5063 + eval cmds=\"$old_archive_cmds\"
21.5064 +
21.5065 + if len=`expr "X$cmds" : ".*"` &&
21.5066 + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
21.5067 + cmds=$old_archive_cmds
21.5068 + else
21.5069 + # the command line is too long to link in one step, link in parts
21.5070 + $echo "using piecewise archive linking..."
21.5071 + save_RANLIB=$RANLIB
21.5072 + RANLIB=:
21.5073 + objlist=
21.5074 + concat_cmds=
21.5075 + save_oldobjs=$oldobjs
21.5076 + # GNU ar 2.10+ was changed to match POSIX; thus no paths are
21.5077 + # encoded into archives. This makes 'ar r' malfunction in
21.5078 + # this piecewise linking case whenever conflicting object
21.5079 + # names appear in distinct ar calls; check, warn and compensate.
21.5080 + if (for obj in $save_oldobjs
21.5081 + do
21.5082 + $echo "X$obj" | $Xsed -e 's%^.*/%%'
21.5083 + done | sort | sort -uc >/dev/null 2>&1); then
21.5084 + :
21.5085 + else
21.5086 + $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
21.5087 + $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
21.5088 + AR_FLAGS=cq
21.5089 + fi
21.5090 + # Is there a better way of finding the last object in the list?
21.5091 + for obj in $save_oldobjs
21.5092 + do
21.5093 + last_oldobj=$obj
21.5094 + done
21.5095 + for obj in $save_oldobjs
21.5096 + do
21.5097 + oldobjs="$objlist $obj"
21.5098 + objlist="$objlist $obj"
21.5099 + eval test_cmds=\"$old_archive_cmds\"
21.5100 + if len=`expr "X$test_cmds" : ".*"` &&
21.5101 + test "$len" -le "$max_cmd_len"; then
21.5102 + :
21.5103 + else
21.5104 + # the above command should be used before it gets too long
21.5105 + oldobjs=$objlist
21.5106 + if test "$obj" = "$last_oldobj" ; then
21.5107 + RANLIB=$save_RANLIB
21.5108 + fi
21.5109 + test -z "$concat_cmds" || concat_cmds=$concat_cmds~
21.5110 + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
21.5111 + objlist=
21.5112 + fi
21.5113 + done
21.5114 + RANLIB=$save_RANLIB
21.5115 + oldobjs=$objlist
21.5116 + if test "X$oldobjs" = "X" ; then
21.5117 + eval cmds=\"\$concat_cmds\"
21.5118 + else
21.5119 + eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
21.5120 + fi
21.5121 + fi
21.5122 + fi
21.5123 + save_ifs="$IFS"; IFS='~'
21.5124 + for cmd in $cmds; do
21.5125 + eval cmd=\"$cmd\"
21.5126 + IFS="$save_ifs"
21.5127 + $show "$cmd"
21.5128 + $run eval "$cmd" || exit $?
21.5129 + done
21.5130 + IFS="$save_ifs"
21.5131 + done
21.5132 +
21.5133 + if test -n "$generated"; then
21.5134 + $show "${rm}r$generated"
21.5135 + $run ${rm}r$generated
21.5136 + fi
21.5137 +
21.5138 + # Now create the libtool archive.
21.5139 + case $output in
21.5140 + *.la)
21.5141 + old_library=
21.5142 + test "$build_old_libs" = yes && old_library="$libname.$libext"
21.5143 + $show "creating $output"
21.5144 +
21.5145 + # Preserve any variables that may affect compiler behavior
21.5146 + for var in $variables_saved_for_relink; do
21.5147 + if eval test -z \"\${$var+set}\"; then
21.5148 + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
21.5149 + elif eval var_value=\$$var; test -z "$var_value"; then
21.5150 + relink_command="$var=; export $var; $relink_command"
21.5151 + else
21.5152 + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
21.5153 + relink_command="$var=\"$var_value\"; export $var; $relink_command"
21.5154 + fi
21.5155 + done
21.5156 + # Quote the link command for shipping.
21.5157 + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
21.5158 + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
21.5159 + if test "$hardcode_automatic" = yes ; then
21.5160 + relink_command=
21.5161 + fi
21.5162 +
21.5163 +
21.5164 + # Only create the output if not a dry run.
21.5165 + if test -z "$run"; then
21.5166 + for installed in no yes; do
21.5167 + if test "$installed" = yes; then
21.5168 + if test -z "$install_libdir"; then
21.5169 + break
21.5170 + fi
21.5171 + output="$output_objdir/$outputname"i
21.5172 + # Replace all uninstalled libtool libraries with the installed ones
21.5173 + newdependency_libs=
21.5174 + for deplib in $dependency_libs; do
21.5175 + case $deplib in
21.5176 + *.la)
21.5177 + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
21.5178 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
21.5179 + if test -z "$libdir"; then
21.5180 + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
21.5181 + exit $EXIT_FAILURE
21.5182 + fi
21.5183 + newdependency_libs="$newdependency_libs $libdir/$name"
21.5184 + ;;
21.5185 + *) newdependency_libs="$newdependency_libs $deplib" ;;
21.5186 + esac
21.5187 + done
21.5188 + dependency_libs="$newdependency_libs"
21.5189 + newdlfiles=
21.5190 + for lib in $dlfiles; do
21.5191 + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
21.5192 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
21.5193 + if test -z "$libdir"; then
21.5194 + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
21.5195 + exit $EXIT_FAILURE
21.5196 + fi
21.5197 + newdlfiles="$newdlfiles $libdir/$name"
21.5198 + done
21.5199 + dlfiles="$newdlfiles"
21.5200 + newdlprefiles=
21.5201 + for lib in $dlprefiles; do
21.5202 + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
21.5203 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
21.5204 + if test -z "$libdir"; then
21.5205 + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
21.5206 + exit $EXIT_FAILURE
21.5207 + fi
21.5208 + newdlprefiles="$newdlprefiles $libdir/$name"
21.5209 + done
21.5210 + dlprefiles="$newdlprefiles"
21.5211 + else
21.5212 + newdlfiles=
21.5213 + for lib in $dlfiles; do
21.5214 + case $lib in
21.5215 + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
21.5216 + *) abs=`pwd`"/$lib" ;;
21.5217 + esac
21.5218 + newdlfiles="$newdlfiles $abs"
21.5219 + done
21.5220 + dlfiles="$newdlfiles"
21.5221 + newdlprefiles=
21.5222 + for lib in $dlprefiles; do
21.5223 + case $lib in
21.5224 + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
21.5225 + *) abs=`pwd`"/$lib" ;;
21.5226 + esac
21.5227 + newdlprefiles="$newdlprefiles $abs"
21.5228 + done
21.5229 + dlprefiles="$newdlprefiles"
21.5230 + fi
21.5231 + $rm $output
21.5232 + # place dlname in correct position for cygwin
21.5233 + tdlname=$dlname
21.5234 + case $host,$output,$installed,$module,$dlname in
21.5235 + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
21.5236 + esac
21.5237 + $echo > $output "\
21.5238 +# $outputname - a libtool library file
21.5239 +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
21.5240 +#
21.5241 +# Please DO NOT delete this file!
21.5242 +# It is necessary for linking the library.
21.5243 +
21.5244 +# The name that we can dlopen(3).
21.5245 +dlname='$tdlname'
21.5246 +
21.5247 +# Names of this library.
21.5248 +library_names='$library_names'
21.5249 +
21.5250 +# The name of the static archive.
21.5251 +old_library='$old_library'
21.5252 +
21.5253 +# Libraries that this one depends upon.
21.5254 +dependency_libs='$dependency_libs'
21.5255 +
21.5256 +# Version information for $libname.
21.5257 +current=$current
21.5258 +age=$age
21.5259 +revision=$revision
21.5260 +
21.5261 +# Is this an already installed library?
21.5262 +installed=$installed
21.5263 +
21.5264 +# Should we warn about portability when linking against -modules?
21.5265 +shouldnotlink=$module
21.5266 +
21.5267 +# Files to dlopen/dlpreopen
21.5268 +dlopen='$dlfiles'
21.5269 +dlpreopen='$dlprefiles'
21.5270 +
21.5271 +# Directory that this library needs to be installed in:
21.5272 +libdir='$install_libdir'"
21.5273 + if test "$installed" = no && test "$need_relink" = yes; then
21.5274 + $echo >> $output "\
21.5275 +relink_command=\"$relink_command\""
21.5276 + fi
21.5277 + done
21.5278 + fi
21.5279 +
21.5280 + # Do a symbolic link so that the libtool archive can be found in
21.5281 + # LD_LIBRARY_PATH before the program is installed.
21.5282 + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
21.5283 + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
21.5284 + ;;
21.5285 + esac
21.5286 + exit $EXIT_SUCCESS
21.5287 + ;;
21.5288 +
21.5289 + # libtool install mode
21.5290 + install)
21.5291 + modename="$modename: install"
21.5292 +
21.5293 + # There may be an optional sh(1) argument at the beginning of
21.5294 + # install_prog (especially on Windows NT).
21.5295 + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
21.5296 + # Allow the use of GNU shtool's install command.
21.5297 + $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
21.5298 + # Aesthetically quote it.
21.5299 + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
21.5300 + case $arg in
21.5301 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
21.5302 + arg="\"$arg\""
21.5303 + ;;
21.5304 + esac
21.5305 + install_prog="$arg "
21.5306 + arg="$1"
21.5307 + shift
21.5308 + else
21.5309 + install_prog=
21.5310 + arg="$nonopt"
21.5311 + fi
21.5312 +
21.5313 + # The real first argument should be the name of the installation program.
21.5314 + # Aesthetically quote it.
21.5315 + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
21.5316 + case $arg in
21.5317 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
21.5318 + arg="\"$arg\""
21.5319 + ;;
21.5320 + esac
21.5321 + install_prog="$install_prog$arg"
21.5322 +
21.5323 + # We need to accept at least all the BSD install flags.
21.5324 + dest=
21.5325 + files=
21.5326 + opts=
21.5327 + prev=
21.5328 + install_type=
21.5329 + isdir=no
21.5330 + stripme=
21.5331 + for arg
21.5332 + do
21.5333 + if test -n "$dest"; then
21.5334 + files="$files $dest"
21.5335 + dest="$arg"
21.5336 + continue
21.5337 + fi
21.5338 +
21.5339 + case $arg in
21.5340 + -d) isdir=yes ;;
21.5341 + -f) prev="-f" ;;
21.5342 + -g) prev="-g" ;;
21.5343 + -m) prev="-m" ;;
21.5344 + -o) prev="-o" ;;
21.5345 + -s)
21.5346 + stripme=" -s"
21.5347 + continue
21.5348 + ;;
21.5349 + -*) ;;
21.5350 +
21.5351 + *)
21.5352 + # If the previous option needed an argument, then skip it.
21.5353 + if test -n "$prev"; then
21.5354 + prev=
21.5355 + else
21.5356 + dest="$arg"
21.5357 + continue
21.5358 + fi
21.5359 + ;;
21.5360 + esac
21.5361 +
21.5362 + # Aesthetically quote the argument.
21.5363 + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
21.5364 + case $arg in
21.5365 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
21.5366 + arg="\"$arg\""
21.5367 + ;;
21.5368 + esac
21.5369 + install_prog="$install_prog $arg"
21.5370 + done
21.5371 +
21.5372 + if test -z "$install_prog"; then
21.5373 + $echo "$modename: you must specify an install program" 1>&2
21.5374 + $echo "$help" 1>&2
21.5375 + exit $EXIT_FAILURE
21.5376 + fi
21.5377 +
21.5378 + if test -n "$prev"; then
21.5379 + $echo "$modename: the \`$prev' option requires an argument" 1>&2
21.5380 + $echo "$help" 1>&2
21.5381 + exit $EXIT_FAILURE
21.5382 + fi
21.5383 +
21.5384 + if test -z "$files"; then
21.5385 + if test -z "$dest"; then
21.5386 + $echo "$modename: no file or destination specified" 1>&2
21.5387 + else
21.5388 + $echo "$modename: you must specify a destination" 1>&2
21.5389 + fi
21.5390 + $echo "$help" 1>&2
21.5391 + exit $EXIT_FAILURE
21.5392 + fi
21.5393 +
21.5394 + # Strip any trailing slash from the destination.
21.5395 + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
21.5396 +
21.5397 + # Check to see that the destination is a directory.
21.5398 + test -d "$dest" && isdir=yes
21.5399 + if test "$isdir" = yes; then
21.5400 + destdir="$dest"
21.5401 + destname=
21.5402 + else
21.5403 + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
21.5404 + test "X$destdir" = "X$dest" && destdir=.
21.5405 + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
21.5406 +
21.5407 + # Not a directory, so check to see that there is only one file specified.
21.5408 + set dummy $files
21.5409 + if test "$#" -gt 2; then
21.5410 + $echo "$modename: \`$dest' is not a directory" 1>&2
21.5411 + $echo "$help" 1>&2
21.5412 + exit $EXIT_FAILURE
21.5413 + fi
21.5414 + fi
21.5415 + case $destdir in
21.5416 + [\\/]* | [A-Za-z]:[\\/]*) ;;
21.5417 + *)
21.5418 + for file in $files; do
21.5419 + case $file in
21.5420 + *.lo) ;;
21.5421 + *)
21.5422 + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
21.5423 + $echo "$help" 1>&2
21.5424 + exit $EXIT_FAILURE
21.5425 + ;;
21.5426 + esac
21.5427 + done
21.5428 + ;;
21.5429 + esac
21.5430 +
21.5431 + # This variable tells wrapper scripts just to set variables rather
21.5432 + # than running their programs.
21.5433 + libtool_install_magic="$magic"
21.5434 +
21.5435 + staticlibs=
21.5436 + future_libdirs=
21.5437 + current_libdirs=
21.5438 + for file in $files; do
21.5439 +
21.5440 + # Do each installation.
21.5441 + case $file in
21.5442 + *.$libext)
21.5443 + # Do the static libraries later.
21.5444 + staticlibs="$staticlibs $file"
21.5445 + ;;
21.5446 +
21.5447 + *.la)
21.5448 + # Check to see that this really is a libtool archive.
21.5449 + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
21.5450 + else
21.5451 + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
21.5452 + $echo "$help" 1>&2
21.5453 + exit $EXIT_FAILURE
21.5454 + fi
21.5455 +
21.5456 + library_names=
21.5457 + old_library=
21.5458 + relink_command=
21.5459 + # If there is no directory component, then add one.
21.5460 + case $file in
21.5461 + */* | *\\*) . $file ;;
21.5462 + *) . ./$file ;;
21.5463 + esac
21.5464 +
21.5465 + # Add the libdir to current_libdirs if it is the destination.
21.5466 + if test "X$destdir" = "X$libdir"; then
21.5467 + case "$current_libdirs " in
21.5468 + *" $libdir "*) ;;
21.5469 + *) current_libdirs="$current_libdirs $libdir" ;;
21.5470 + esac
21.5471 + else
21.5472 + # Note the libdir as a future libdir.
21.5473 + case "$future_libdirs " in
21.5474 + *" $libdir "*) ;;
21.5475 + *) future_libdirs="$future_libdirs $libdir" ;;
21.5476 + esac
21.5477 + fi
21.5478 +
21.5479 + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
21.5480 + test "X$dir" = "X$file/" && dir=
21.5481 + dir="$dir$objdir"
21.5482 +
21.5483 + if test -n "$relink_command"; then
21.5484 + # Determine the prefix the user has applied to our future dir.
21.5485 + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
21.5486 +
21.5487 + # Don't allow the user to place us outside of our expected
21.5488 + # location b/c this prevents finding dependent libraries that
21.5489 + # are installed to the same prefix.
21.5490 + # At present, this check doesn't affect windows .dll's that
21.5491 + # are installed into $libdir/../bin (currently, that works fine)
21.5492 + # but it's something to keep an eye on.
21.5493 + if test "$inst_prefix_dir" = "$destdir"; then
21.5494 + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
21.5495 + exit $EXIT_FAILURE
21.5496 + fi
21.5497 +
21.5498 + if test -n "$inst_prefix_dir"; then
21.5499 + # Stick the inst_prefix_dir data into the link command.
21.5500 + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
21.5501 + else
21.5502 + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
21.5503 + fi
21.5504 +
21.5505 + $echo "$modename: warning: relinking \`$file'" 1>&2
21.5506 + $show "$relink_command"
21.5507 + if $run eval "$relink_command"; then :
21.5508 + else
21.5509 + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
21.5510 + exit $EXIT_FAILURE
21.5511 + fi
21.5512 + fi
21.5513 +
21.5514 + # See the names of the shared library.
21.5515 + set dummy $library_names
21.5516 + if test -n "$2"; then
21.5517 + realname="$2"
21.5518 + shift
21.5519 + shift
21.5520 +
21.5521 + srcname="$realname"
21.5522 + test -n "$relink_command" && srcname="$realname"T
21.5523 +
21.5524 + # Install the shared library and build the symlinks.
21.5525 + $show "$install_prog $dir/$srcname $destdir/$realname"
21.5526 + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
21.5527 + if test -n "$stripme" && test -n "$striplib"; then
21.5528 + $show "$striplib $destdir/$realname"
21.5529 + $run eval "$striplib $destdir/$realname" || exit $?
21.5530 + fi
21.5531 +
21.5532 + if test "$#" -gt 0; then
21.5533 + # Delete the old symlinks, and create new ones.
21.5534 + for linkname
21.5535 + do
21.5536 + if test "$linkname" != "$realname"; then
21.5537 + $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
21.5538 + $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
21.5539 + fi
21.5540 + done
21.5541 + fi
21.5542 +
21.5543 + # Do each command in the postinstall commands.
21.5544 + lib="$destdir/$realname"
21.5545 + cmds=$postinstall_cmds
21.5546 + save_ifs="$IFS"; IFS='~'
21.5547 + for cmd in $cmds; do
21.5548 + IFS="$save_ifs"
21.5549 + eval cmd=\"$cmd\"
21.5550 + $show "$cmd"
21.5551 + $run eval "$cmd" || exit $?
21.5552 + done
21.5553 + IFS="$save_ifs"
21.5554 + fi
21.5555 +
21.5556 + # Install the pseudo-library for information purposes.
21.5557 + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
21.5558 + instname="$dir/$name"i
21.5559 + $show "$install_prog $instname $destdir/$name"
21.5560 + $run eval "$install_prog $instname $destdir/$name" || exit $?
21.5561 +
21.5562 + # Maybe install the static library, too.
21.5563 + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
21.5564 + ;;
21.5565 +
21.5566 + *.lo)
21.5567 + # Install (i.e. copy) a libtool object.
21.5568 +
21.5569 + # Figure out destination file name, if it wasn't already specified.
21.5570 + if test -n "$destname"; then
21.5571 + destfile="$destdir/$destname"
21.5572 + else
21.5573 + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
21.5574 + destfile="$destdir/$destfile"
21.5575 + fi
21.5576 +
21.5577 + # Deduce the name of the destination old-style object file.
21.5578 + case $destfile in
21.5579 + *.lo)
21.5580 + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
21.5581 + ;;
21.5582 + *.$objext)
21.5583 + staticdest="$destfile"
21.5584 + destfile=
21.5585 + ;;
21.5586 + *)
21.5587 + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
21.5588 + $echo "$help" 1>&2
21.5589 + exit $EXIT_FAILURE
21.5590 + ;;
21.5591 + esac
21.5592 +
21.5593 + # Install the libtool object if requested.
21.5594 + if test -n "$destfile"; then
21.5595 + $show "$install_prog $file $destfile"
21.5596 + $run eval "$install_prog $file $destfile" || exit $?
21.5597 + fi
21.5598 +
21.5599 + # Install the old object if enabled.
21.5600 + if test "$build_old_libs" = yes; then
21.5601 + # Deduce the name of the old-style object file.
21.5602 + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
21.5603 +
21.5604 + $show "$install_prog $staticobj $staticdest"
21.5605 + $run eval "$install_prog \$staticobj \$staticdest" || exit $?
21.5606 + fi
21.5607 + exit $EXIT_SUCCESS
21.5608 + ;;
21.5609 +
21.5610 + *)
21.5611 + # Figure out destination file name, if it wasn't already specified.
21.5612 + if test -n "$destname"; then
21.5613 + destfile="$destdir/$destname"
21.5614 + else
21.5615 + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
21.5616 + destfile="$destdir/$destfile"
21.5617 + fi
21.5618 +
21.5619 + # If the file is missing, and there is a .exe on the end, strip it
21.5620 + # because it is most likely a libtool script we actually want to
21.5621 + # install
21.5622 + stripped_ext=""
21.5623 + case $file in
21.5624 + *.exe)
21.5625 + if test ! -f "$file"; then
21.5626 + file=`$echo $file|${SED} 's,.exe$,,'`
21.5627 + stripped_ext=".exe"
21.5628 + fi
21.5629 + ;;
21.5630 + esac
21.5631 +
21.5632 + # Do a test to see if this is really a libtool program.
21.5633 + case $host in
21.5634 + *cygwin*|*mingw*)
21.5635 + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
21.5636 + ;;
21.5637 + *)
21.5638 + wrapper=$file
21.5639 + ;;
21.5640 + esac
21.5641 + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
21.5642 + notinst_deplibs=
21.5643 + relink_command=
21.5644 +
21.5645 + # To insure that "foo" is sourced, and not "foo.exe",
21.5646 + # finese the cygwin/MSYS system by explicitly sourcing "foo."
21.5647 + # which disallows the automatic-append-.exe behavior.
21.5648 + case $build in
21.5649 + *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
21.5650 + *) wrapperdot=${wrapper} ;;
21.5651 + esac
21.5652 + # If there is no directory component, then add one.
21.5653 + case $file in
21.5654 + */* | *\\*) . ${wrapperdot} ;;
21.5655 + *) . ./${wrapperdot} ;;
21.5656 + esac
21.5657 +
21.5658 + # Check the variables that should have been set.
21.5659 + if test -z "$notinst_deplibs"; then
21.5660 + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
21.5661 + exit $EXIT_FAILURE
21.5662 + fi
21.5663 +
21.5664 + finalize=yes
21.5665 + for lib in $notinst_deplibs; do
21.5666 + # Check to see that each library is installed.
21.5667 + libdir=
21.5668 + if test -f "$lib"; then
21.5669 + # If there is no directory component, then add one.
21.5670 + case $lib in
21.5671 + */* | *\\*) . $lib ;;
21.5672 + *) . ./$lib ;;
21.5673 + esac
21.5674 + fi
21.5675 + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
21.5676 + if test -n "$libdir" && test ! -f "$libfile"; then
21.5677 + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
21.5678 + finalize=no
21.5679 + fi
21.5680 + done
21.5681 +
21.5682 + relink_command=
21.5683 + # To insure that "foo" is sourced, and not "foo.exe",
21.5684 + # finese the cygwin/MSYS system by explicitly sourcing "foo."
21.5685 + # which disallows the automatic-append-.exe behavior.
21.5686 + case $build in
21.5687 + *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
21.5688 + *) wrapperdot=${wrapper} ;;
21.5689 + esac
21.5690 + # If there is no directory component, then add one.
21.5691 + case $file in
21.5692 + */* | *\\*) . ${wrapperdot} ;;
21.5693 + *) . ./${wrapperdot} ;;
21.5694 + esac
21.5695 +
21.5696 + outputname=
21.5697 + if test "$fast_install" = no && test -n "$relink_command"; then
21.5698 + if test "$finalize" = yes && test -z "$run"; then
21.5699 + tmpdir="/tmp"
21.5700 + test -n "$TMPDIR" && tmpdir="$TMPDIR"
21.5701 + tmpdir="$tmpdir/libtool-$$"
21.5702 + save_umask=`umask`
21.5703 + umask 0077
21.5704 + if $mkdir "$tmpdir"; then
21.5705 + umask $save_umask
21.5706 + else
21.5707 + umask $save_umask
21.5708 + $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
21.5709 + continue
21.5710 + fi
21.5711 + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
21.5712 + outputname="$tmpdir/$file"
21.5713 + # Replace the output file specification.
21.5714 + relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
21.5715 +
21.5716 + $show "$relink_command"
21.5717 + if $run eval "$relink_command"; then :
21.5718 + else
21.5719 + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
21.5720 + ${rm}r "$tmpdir"
21.5721 + continue
21.5722 + fi
21.5723 + file="$outputname"
21.5724 + else
21.5725 + $echo "$modename: warning: cannot relink \`$file'" 1>&2
21.5726 + fi
21.5727 + else
21.5728 + # Install the binary that we compiled earlier.
21.5729 + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
21.5730 + fi
21.5731 + fi
21.5732 +
21.5733 + # remove .exe since cygwin /usr/bin/install will append another
21.5734 + # one anyways
21.5735 + case $install_prog,$host in
21.5736 + */usr/bin/install*,*cygwin*)
21.5737 + case $file:$destfile in
21.5738 + *.exe:*.exe)
21.5739 + # this is ok
21.5740 + ;;
21.5741 + *.exe:*)
21.5742 + destfile=$destfile.exe
21.5743 + ;;
21.5744 + *:*.exe)
21.5745 + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
21.5746 + ;;
21.5747 + esac
21.5748 + ;;
21.5749 + esac
21.5750 + $show "$install_prog$stripme $file $destfile"
21.5751 + $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
21.5752 + test -n "$outputname" && ${rm}r "$tmpdir"
21.5753 + ;;
21.5754 + esac
21.5755 + done
21.5756 +
21.5757 + for file in $staticlibs; do
21.5758 + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
21.5759 +
21.5760 + # Set up the ranlib parameters.
21.5761 + oldlib="$destdir/$name"
21.5762 +
21.5763 + $show "$install_prog $file $oldlib"
21.5764 + $run eval "$install_prog \$file \$oldlib" || exit $?
21.5765 +
21.5766 + if test -n "$stripme" && test -n "$old_striplib"; then
21.5767 + $show "$old_striplib $oldlib"
21.5768 + $run eval "$old_striplib $oldlib" || exit $?
21.5769 + fi
21.5770 +
21.5771 + # Do each command in the postinstall commands.
21.5772 + cmds=$old_postinstall_cmds
21.5773 + save_ifs="$IFS"; IFS='~'
21.5774 + for cmd in $cmds; do
21.5775 + IFS="$save_ifs"
21.5776 + eval cmd=\"$cmd\"
21.5777 + $show "$cmd"
21.5778 + $run eval "$cmd" || exit $?
21.5779 + done
21.5780 + IFS="$save_ifs"
21.5781 + done
21.5782 +
21.5783 + if test -n "$future_libdirs"; then
21.5784 + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
21.5785 + fi
21.5786 +
21.5787 + if test -n "$current_libdirs"; then
21.5788 + # Maybe just do a dry run.
21.5789 + test -n "$run" && current_libdirs=" -n$current_libdirs"
21.5790 + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
21.5791 + else
21.5792 + exit $EXIT_SUCCESS
21.5793 + fi
21.5794 + ;;
21.5795 +
21.5796 + # libtool finish mode
21.5797 + finish)
21.5798 + modename="$modename: finish"
21.5799 + libdirs="$nonopt"
21.5800 + admincmds=
21.5801 +
21.5802 + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
21.5803 + for dir
21.5804 + do
21.5805 + libdirs="$libdirs $dir"
21.5806 + done
21.5807 +
21.5808 + for libdir in $libdirs; do
21.5809 + if test -n "$finish_cmds"; then
21.5810 + # Do each command in the finish commands.
21.5811 + cmds=$finish_cmds
21.5812 + save_ifs="$IFS"; IFS='~'
21.5813 + for cmd in $cmds; do
21.5814 + IFS="$save_ifs"
21.5815 + eval cmd=\"$cmd\"
21.5816 + $show "$cmd"
21.5817 + $run eval "$cmd" || admincmds="$admincmds
21.5818 + $cmd"
21.5819 + done
21.5820 + IFS="$save_ifs"
21.5821 + fi
21.5822 + if test -n "$finish_eval"; then
21.5823 + # Do the single finish_eval.
21.5824 + eval cmds=\"$finish_eval\"
21.5825 + $run eval "$cmds" || admincmds="$admincmds
21.5826 + $cmds"
21.5827 + fi
21.5828 + done
21.5829 + fi
21.5830 +
21.5831 + # Exit here if they wanted silent mode.
21.5832 + test "$show" = : && exit $EXIT_SUCCESS
21.5833 +
21.5834 + $echo "----------------------------------------------------------------------"
21.5835 + $echo "Libraries have been installed in:"
21.5836 + for libdir in $libdirs; do
21.5837 + $echo " $libdir"
21.5838 + done
21.5839 + $echo
21.5840 + $echo "If you ever happen to want to link against installed libraries"
21.5841 + $echo "in a given directory, LIBDIR, you must either use libtool, and"
21.5842 + $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
21.5843 + $echo "flag during linking and do at least one of the following:"
21.5844 + if test -n "$shlibpath_var"; then
21.5845 + $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
21.5846 + $echo " during execution"
21.5847 + fi
21.5848 + if test -n "$runpath_var"; then
21.5849 + $echo " - add LIBDIR to the \`$runpath_var' environment variable"
21.5850 + $echo " during linking"
21.5851 + fi
21.5852 + if test -n "$hardcode_libdir_flag_spec"; then
21.5853 + libdir=LIBDIR
21.5854 + eval flag=\"$hardcode_libdir_flag_spec\"
21.5855 +
21.5856 + $echo " - use the \`$flag' linker flag"
21.5857 + fi
21.5858 + if test -n "$admincmds"; then
21.5859 + $echo " - have your system administrator run these commands:$admincmds"
21.5860 + fi
21.5861 + if test -f /etc/ld.so.conf; then
21.5862 + $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
21.5863 + fi
21.5864 + $echo
21.5865 + $echo "See any operating system documentation about shared libraries for"
21.5866 + $echo "more information, such as the ld(1) and ld.so(8) manual pages."
21.5867 + $echo "----------------------------------------------------------------------"
21.5868 + exit $EXIT_SUCCESS
21.5869 + ;;
21.5870 +
21.5871 + # libtool execute mode
21.5872 + execute)
21.5873 + modename="$modename: execute"
21.5874 +
21.5875 + # The first argument is the command name.
21.5876 + cmd="$nonopt"
21.5877 + if test -z "$cmd"; then
21.5878 + $echo "$modename: you must specify a COMMAND" 1>&2
21.5879 + $echo "$help"
21.5880 + exit $EXIT_FAILURE
21.5881 + fi
21.5882 +
21.5883 + # Handle -dlopen flags immediately.
21.5884 + for file in $execute_dlfiles; do
21.5885 + if test ! -f "$file"; then
21.5886 + $echo "$modename: \`$file' is not a file" 1>&2
21.5887 + $echo "$help" 1>&2
21.5888 + exit $EXIT_FAILURE
21.5889 + fi
21.5890 +
21.5891 + dir=
21.5892 + case $file in
21.5893 + *.la)
21.5894 + # Check to see that this really is a libtool archive.
21.5895 + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
21.5896 + else
21.5897 + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
21.5898 + $echo "$help" 1>&2
21.5899 + exit $EXIT_FAILURE
21.5900 + fi
21.5901 +
21.5902 + # Read the libtool library.
21.5903 + dlname=
21.5904 + library_names=
21.5905 +
21.5906 + # If there is no directory component, then add one.
21.5907 + case $file in
21.5908 + */* | *\\*) . $file ;;
21.5909 + *) . ./$file ;;
21.5910 + esac
21.5911 +
21.5912 + # Skip this library if it cannot be dlopened.
21.5913 + if test -z "$dlname"; then
21.5914 + # Warn if it was a shared library.
21.5915 + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
21.5916 + continue
21.5917 + fi
21.5918 +
21.5919 + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
21.5920 + test "X$dir" = "X$file" && dir=.
21.5921 +
21.5922 + if test -f "$dir/$objdir/$dlname"; then
21.5923 + dir="$dir/$objdir"
21.5924 + else
21.5925 + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
21.5926 + exit $EXIT_FAILURE
21.5927 + fi
21.5928 + ;;
21.5929 +
21.5930 + *.lo)
21.5931 + # Just add the directory containing the .lo file.
21.5932 + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
21.5933 + test "X$dir" = "X$file" && dir=.
21.5934 + ;;
21.5935 +
21.5936 + *)
21.5937 + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
21.5938 + continue
21.5939 + ;;
21.5940 + esac
21.5941 +
21.5942 + # Get the absolute pathname.
21.5943 + absdir=`cd "$dir" && pwd`
21.5944 + test -n "$absdir" && dir="$absdir"
21.5945 +
21.5946 + # Now add the directory to shlibpath_var.
21.5947 + if eval "test -z \"\$$shlibpath_var\""; then
21.5948 + eval "$shlibpath_var=\"\$dir\""
21.5949 + else
21.5950 + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
21.5951 + fi
21.5952 + done
21.5953 +
21.5954 + # This variable tells wrapper scripts just to set shlibpath_var
21.5955 + # rather than running their programs.
21.5956 + libtool_execute_magic="$magic"
21.5957 +
21.5958 + # Check if any of the arguments is a wrapper script.
21.5959 + args=
21.5960 + for file
21.5961 + do
21.5962 + case $file in
21.5963 + -*) ;;
21.5964 + *)
21.5965 + # Do a test to see if this is really a libtool program.
21.5966 + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
21.5967 + # If there is no directory component, then add one.
21.5968 + case $file in
21.5969 + */* | *\\*) . $file ;;
21.5970 + *) . ./$file ;;
21.5971 + esac
21.5972 +
21.5973 + # Transform arg to wrapped name.
21.5974 + file="$progdir/$program"
21.5975 + fi
21.5976 + ;;
21.5977 + esac
21.5978 + # Quote arguments (to preserve shell metacharacters).
21.5979 + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
21.5980 + args="$args \"$file\""
21.5981 + done
21.5982 +
21.5983 + if test -z "$run"; then
21.5984 + if test -n "$shlibpath_var"; then
21.5985 + # Export the shlibpath_var.
21.5986 + eval "export $shlibpath_var"
21.5987 + fi
21.5988 +
21.5989 + # Restore saved environment variables
21.5990 + if test "${save_LC_ALL+set}" = set; then
21.5991 + LC_ALL="$save_LC_ALL"; export LC_ALL
21.5992 + fi
21.5993 + if test "${save_LANG+set}" = set; then
21.5994 + LANG="$save_LANG"; export LANG
21.5995 + fi
21.5996 +
21.5997 + # Now prepare to actually exec the command.
21.5998 + exec_cmd="\$cmd$args"
21.5999 + else
21.6000 + # Display what would be done.
21.6001 + if test -n "$shlibpath_var"; then
21.6002 + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
21.6003 + $echo "export $shlibpath_var"
21.6004 + fi
21.6005 + $echo "$cmd$args"
21.6006 + exit $EXIT_SUCCESS
21.6007 + fi
21.6008 + ;;
21.6009 +
21.6010 + # libtool clean and uninstall mode
21.6011 + clean | uninstall)
21.6012 + modename="$modename: $mode"
21.6013 + rm="$nonopt"
21.6014 + files=
21.6015 + rmforce=
21.6016 + exit_status=0
21.6017 +
21.6018 + # This variable tells wrapper scripts just to set variables rather
21.6019 + # than running their programs.
21.6020 + libtool_install_magic="$magic"
21.6021 +
21.6022 + for arg
21.6023 + do
21.6024 + case $arg in
21.6025 + -f) rm="$rm $arg"; rmforce=yes ;;
21.6026 + -*) rm="$rm $arg" ;;
21.6027 + *) files="$files $arg" ;;
21.6028 + esac
21.6029 + done
21.6030 +
21.6031 + if test -z "$rm"; then
21.6032 + $echo "$modename: you must specify an RM program" 1>&2
21.6033 + $echo "$help" 1>&2
21.6034 + exit $EXIT_FAILURE
21.6035 + fi
21.6036 +
21.6037 + rmdirs=
21.6038 +
21.6039 + origobjdir="$objdir"
21.6040 + for file in $files; do
21.6041 + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
21.6042 + if test "X$dir" = "X$file"; then
21.6043 + dir=.
21.6044 + objdir="$origobjdir"
21.6045 + else
21.6046 + objdir="$dir/$origobjdir"
21.6047 + fi
21.6048 + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
21.6049 + test "$mode" = uninstall && objdir="$dir"
21.6050 +
21.6051 + # Remember objdir for removal later, being careful to avoid duplicates
21.6052 + if test "$mode" = clean; then
21.6053 + case " $rmdirs " in
21.6054 + *" $objdir "*) ;;
21.6055 + *) rmdirs="$rmdirs $objdir" ;;
21.6056 + esac
21.6057 + fi
21.6058 +
21.6059 + # Don't error if the file doesn't exist and rm -f was used.
21.6060 + if (test -L "$file") >/dev/null 2>&1 \
21.6061 + || (test -h "$file") >/dev/null 2>&1 \
21.6062 + || test -f "$file"; then
21.6063 + :
21.6064 + elif test -d "$file"; then
21.6065 + exit_status=1
21.6066 + continue
21.6067 + elif test "$rmforce" = yes; then
21.6068 + continue
21.6069 + fi
21.6070 +
21.6071 + rmfiles="$file"
21.6072 +
21.6073 + case $name in
21.6074 + *.la)
21.6075 + # Possibly a libtool archive, so verify it.
21.6076 + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
21.6077 + . $dir/$name
21.6078 +
21.6079 + # Delete the libtool libraries and symlinks.
21.6080 + for n in $library_names; do
21.6081 + rmfiles="$rmfiles $objdir/$n"
21.6082 + done
21.6083 + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
21.6084 + test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
21.6085 +
21.6086 + if test "$mode" = uninstall; then
21.6087 + if test -n "$library_names"; then
21.6088 + # Do each command in the postuninstall commands.
21.6089 + cmds=$postuninstall_cmds
21.6090 + save_ifs="$IFS"; IFS='~'
21.6091 + for cmd in $cmds; do
21.6092 + IFS="$save_ifs"
21.6093 + eval cmd=\"$cmd\"
21.6094 + $show "$cmd"
21.6095 + $run eval "$cmd"
21.6096 + if test "$?" -ne 0 && test "$rmforce" != yes; then
21.6097 + exit_status=1
21.6098 + fi
21.6099 + done
21.6100 + IFS="$save_ifs"
21.6101 + fi
21.6102 +
21.6103 + if test -n "$old_library"; then
21.6104 + # Do each command in the old_postuninstall commands.
21.6105 + cmds=$old_postuninstall_cmds
21.6106 + save_ifs="$IFS"; IFS='~'
21.6107 + for cmd in $cmds; do
21.6108 + IFS="$save_ifs"
21.6109 + eval cmd=\"$cmd\"
21.6110 + $show "$cmd"
21.6111 + $run eval "$cmd"
21.6112 + if test "$?" -ne 0 && test "$rmforce" != yes; then
21.6113 + exit_status=1
21.6114 + fi
21.6115 + done
21.6116 + IFS="$save_ifs"
21.6117 + fi
21.6118 + # FIXME: should reinstall the best remaining shared library.
21.6119 + fi
21.6120 + fi
21.6121 + ;;
21.6122 +
21.6123 + *.lo)
21.6124 + # Possibly a libtool object, so verify it.
21.6125 + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
21.6126 +
21.6127 + # Read the .lo file
21.6128 + . $dir/$name
21.6129 +
21.6130 + # Add PIC object to the list of files to remove.
21.6131 + if test -n "$pic_object" \
21.6132 + && test "$pic_object" != none; then
21.6133 + rmfiles="$rmfiles $dir/$pic_object"
21.6134 + fi
21.6135 +
21.6136 + # Add non-PIC object to the list of files to remove.
21.6137 + if test -n "$non_pic_object" \
21.6138 + && test "$non_pic_object" != none; then
21.6139 + rmfiles="$rmfiles $dir/$non_pic_object"
21.6140 + fi
21.6141 + fi
21.6142 + ;;
21.6143 +
21.6144 + *)
21.6145 + if test "$mode" = clean ; then
21.6146 + noexename=$name
21.6147 + case $file in
21.6148 + *.exe)
21.6149 + file=`$echo $file|${SED} 's,.exe$,,'`
21.6150 + noexename=`$echo $name|${SED} 's,.exe$,,'`
21.6151 + # $file with .exe has already been added to rmfiles,
21.6152 + # add $file without .exe
21.6153 + rmfiles="$rmfiles $file"
21.6154 + ;;
21.6155 + esac
21.6156 + # Do a test to see if this is a libtool program.
21.6157 + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
21.6158 + relink_command=
21.6159 + . $dir/$noexename
21.6160 +
21.6161 + # note $name still contains .exe if it was in $file originally
21.6162 + # as does the version of $file that was added into $rmfiles
21.6163 + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
21.6164 + if test "$fast_install" = yes && test -n "$relink_command"; then
21.6165 + rmfiles="$rmfiles $objdir/lt-$name"
21.6166 + fi
21.6167 + if test "X$noexename" != "X$name" ; then
21.6168 + rmfiles="$rmfiles $objdir/lt-${noexename}.c"
21.6169 + fi
21.6170 + fi
21.6171 + fi
21.6172 + ;;
21.6173 + esac
21.6174 + $show "$rm $rmfiles"
21.6175 + $run $rm $rmfiles || exit_status=1
21.6176 + done
21.6177 + objdir="$origobjdir"
21.6178 +
21.6179 + # Try to remove the ${objdir}s in the directories where we deleted files
21.6180 + for dir in $rmdirs; do
21.6181 + if test -d "$dir"; then
21.6182 + $show "rmdir $dir"
21.6183 + $run rmdir $dir >/dev/null 2>&1
21.6184 + fi
21.6185 + done
21.6186 +
21.6187 + exit $exit_status
21.6188 + ;;
21.6189 +
21.6190 + "")
21.6191 + $echo "$modename: you must specify a MODE" 1>&2
21.6192 + $echo "$generic_help" 1>&2
21.6193 + exit $EXIT_FAILURE
21.6194 + ;;
21.6195 + esac
21.6196 +
21.6197 + if test -z "$exec_cmd"; then
21.6198 + $echo "$modename: invalid operation mode \`$mode'" 1>&2
21.6199 + $echo "$generic_help" 1>&2
21.6200 + exit $EXIT_FAILURE
21.6201 + fi
21.6202 +fi # test -z "$show_help"
21.6203 +
21.6204 +if test -n "$exec_cmd"; then
21.6205 + eval exec $exec_cmd
21.6206 + exit $EXIT_FAILURE
21.6207 +fi
21.6208 +
21.6209 +# We need to display help for each of the modes.
21.6210 +case $mode in
21.6211 +"") $echo \
21.6212 +"Usage: $modename [OPTION]... [MODE-ARG]...
21.6213 +
21.6214 +Provide generalized library-building support services.
21.6215 +
21.6216 + --config show all configuration variables
21.6217 + --debug enable verbose shell tracing
21.6218 +-n, --dry-run display commands without modifying any files
21.6219 + --features display basic configuration information and exit
21.6220 + --finish same as \`--mode=finish'
21.6221 + --help display this help message and exit
21.6222 + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
21.6223 + --quiet same as \`--silent'
21.6224 + --silent don't print informational messages
21.6225 + --tag=TAG use configuration variables from tag TAG
21.6226 + --version print version information
21.6227 +
21.6228 +MODE must be one of the following:
21.6229 +
21.6230 + clean remove files from the build directory
21.6231 + compile compile a source file into a libtool object
21.6232 + execute automatically set library path, then run a program
21.6233 + finish complete the installation of libtool libraries
21.6234 + install install libraries or executables
21.6235 + link create a library or an executable
21.6236 + uninstall remove libraries from an installed directory
21.6237 +
21.6238 +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
21.6239 +a more detailed description of MODE.
21.6240 +
21.6241 +Report bugs to <bug-libtool@gnu.org>."
21.6242 + exit $EXIT_SUCCESS
21.6243 + ;;
21.6244 +
21.6245 +clean)
21.6246 + $echo \
21.6247 +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
21.6248 +
21.6249 +Remove files from the build directory.
21.6250 +
21.6251 +RM is the name of the program to use to delete files associated with each FILE
21.6252 +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
21.6253 +to RM.
21.6254 +
21.6255 +If FILE is a libtool library, object or program, all the files associated
21.6256 +with it are deleted. Otherwise, only FILE itself is deleted using RM."
21.6257 + ;;
21.6258 +
21.6259 +compile)
21.6260 + $echo \
21.6261 +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
21.6262 +
21.6263 +Compile a source file into a libtool library object.
21.6264 +
21.6265 +This mode accepts the following additional options:
21.6266 +
21.6267 + -o OUTPUT-FILE set the output file name to OUTPUT-FILE
21.6268 + -prefer-pic try to building PIC objects only
21.6269 + -prefer-non-pic try to building non-PIC objects only
21.6270 + -static always build a \`.o' file suitable for static linking
21.6271 +
21.6272 +COMPILE-COMMAND is a command to be used in creating a \`standard' object file
21.6273 +from the given SOURCEFILE.
21.6274 +
21.6275 +The output file name is determined by removing the directory component from
21.6276 +SOURCEFILE, then substituting the C source code suffix \`.c' with the
21.6277 +library object suffix, \`.lo'."
21.6278 + ;;
21.6279 +
21.6280 +execute)
21.6281 + $echo \
21.6282 +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
21.6283 +
21.6284 +Automatically set library path, then run a program.
21.6285 +
21.6286 +This mode accepts the following additional options:
21.6287 +
21.6288 + -dlopen FILE add the directory containing FILE to the library path
21.6289 +
21.6290 +This mode sets the library path environment variable according to \`-dlopen'
21.6291 +flags.
21.6292 +
21.6293 +If any of the ARGS are libtool executable wrappers, then they are translated
21.6294 +into their corresponding uninstalled binary, and any of their required library
21.6295 +directories are added to the library path.
21.6296 +
21.6297 +Then, COMMAND is executed, with ARGS as arguments."
21.6298 + ;;
21.6299 +
21.6300 +finish)
21.6301 + $echo \
21.6302 +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
21.6303 +
21.6304 +Complete the installation of libtool libraries.
21.6305 +
21.6306 +Each LIBDIR is a directory that contains libtool libraries.
21.6307 +
21.6308 +The commands that this mode executes may require superuser privileges. Use
21.6309 +the \`--dry-run' option if you just want to see what would be executed."
21.6310 + ;;
21.6311 +
21.6312 +install)
21.6313 + $echo \
21.6314 +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
21.6315 +
21.6316 +Install executables or libraries.
21.6317 +
21.6318 +INSTALL-COMMAND is the installation command. The first component should be
21.6319 +either the \`install' or \`cp' program.
21.6320 +
21.6321 +The rest of the components are interpreted as arguments to that command (only
21.6322 +BSD-compatible install options are recognized)."
21.6323 + ;;
21.6324 +
21.6325 +link)
21.6326 + $echo \
21.6327 +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
21.6328 +
21.6329 +Link object files or libraries together to form another library, or to
21.6330 +create an executable program.
21.6331 +
21.6332 +LINK-COMMAND is a command using the C compiler that you would use to create
21.6333 +a program from several object files.
21.6334 +
21.6335 +The following components of LINK-COMMAND are treated specially:
21.6336 +
21.6337 + -all-static do not do any dynamic linking at all
21.6338 + -avoid-version do not add a version suffix if possible
21.6339 + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
21.6340 + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
21.6341 + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
21.6342 + -export-symbols SYMFILE
21.6343 + try to export only the symbols listed in SYMFILE
21.6344 + -export-symbols-regex REGEX
21.6345 + try to export only the symbols matching REGEX
21.6346 + -LLIBDIR search LIBDIR for required installed libraries
21.6347 + -lNAME OUTPUT-FILE requires the installed library libNAME
21.6348 + -module build a library that can dlopened
21.6349 + -no-fast-install disable the fast-install mode
21.6350 + -no-install link a not-installable executable
21.6351 + -no-undefined declare that a library does not refer to external symbols
21.6352 + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
21.6353 + -objectlist FILE Use a list of object files found in FILE to specify objects
21.6354 + -precious-files-regex REGEX
21.6355 + don't remove output files matching REGEX
21.6356 + -release RELEASE specify package release information
21.6357 + -rpath LIBDIR the created library will eventually be installed in LIBDIR
21.6358 + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
21.6359 + -static do not do any dynamic linking of libtool libraries
21.6360 + -version-info CURRENT[:REVISION[:AGE]]
21.6361 + specify library version info [each variable defaults to 0]
21.6362 +
21.6363 +All other options (arguments beginning with \`-') are ignored.
21.6364 +
21.6365 +Every other argument is treated as a filename. Files ending in \`.la' are
21.6366 +treated as uninstalled libtool libraries, other files are standard or library
21.6367 +object files.
21.6368 +
21.6369 +If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
21.6370 +only library objects (\`.lo' files) may be specified, and \`-rpath' is
21.6371 +required, except when creating a convenience library.
21.6372 +
21.6373 +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
21.6374 +using \`ar' and \`ranlib', or on Windows using \`lib'.
21.6375 +
21.6376 +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
21.6377 +is created, otherwise an executable program is created."
21.6378 + ;;
21.6379 +
21.6380 +uninstall)
21.6381 + $echo \
21.6382 +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
21.6383 +
21.6384 +Remove libraries from an installation directory.
21.6385 +
21.6386 +RM is the name of the program to use to delete files associated with each FILE
21.6387 +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
21.6388 +to RM.
21.6389 +
21.6390 +If FILE is a libtool library, all the files associated with it are deleted.
21.6391 +Otherwise, only FILE itself is deleted using RM."
21.6392 + ;;
21.6393 +
21.6394 +*)
21.6395 + $echo "$modename: invalid operation mode \`$mode'" 1>&2
21.6396 + $echo "$help" 1>&2
21.6397 + exit $EXIT_FAILURE
21.6398 + ;;
21.6399 +esac
21.6400 +
21.6401 +$echo
21.6402 +$echo "Try \`$modename --help' for more information about other modes."
21.6403 +
21.6404 +exit $EXIT_SUCCESS
21.6405 +
21.6406 +# The TAGs below are defined such that we never get into a situation
21.6407 +# in which we disable both kinds of libraries. Given conflicting
21.6408 +# choices, we go for a static library, that is the most portable,
21.6409 +# since we can't tell whether shared libraries were disabled because
21.6410 +# the user asked for that or because the platform doesn't support
21.6411 +# them. This is particularly important on AIX, because we don't
21.6412 +# support having both static and shared libraries enabled at the same
21.6413 +# time on that platform, so we default to a shared-only configuration.
21.6414 +# If a disable-shared tag is given, we'll fallback to a static-only
21.6415 +# configuration. But we'll never go from static-only to shared-only.
21.6416 +
21.6417 +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
21.6418 +build_libtool_libs=no
21.6419 +build_old_libs=yes
21.6420 +# ### END LIBTOOL TAG CONFIG: disable-shared
21.6421 +
21.6422 +# ### BEGIN LIBTOOL TAG CONFIG: disable-static
21.6423 +build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
21.6424 +# ### END LIBTOOL TAG CONFIG: disable-static
21.6425 +
21.6426 +# Local Variables:
21.6427 +# mode:shell-script
21.6428 +# sh-indentation:2
21.6429 +# End:
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
22.2 +++ b/mythtv_plugin/m4/Makefile.am Wed Sep 20 23:59:48 2006 +0100
22.3 @@ -0,0 +1,7 @@
22.4 +EXTRA_DIST = \
22.5 + ac_doxygen.m4 \
22.6 + as-compiler-flag.m4 \
22.7 + as-expand.m4 \
22.8 + as-version.m4 \
22.9 + as-gtk-doc.m4
22.10 +
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
23.2 +++ b/mythtv_plugin/m4/ac_doxygen.m4 Wed Sep 20 23:59:48 2006 +0100
23.3 @@ -0,0 +1,312 @@
23.4 +# This file is part of Autoconf. -*- Autoconf -*-
23.5 +
23.6 +# Copyright (C) 2004 Oren Ben-Kiki
23.7 +# This file is distributed under the same terms as the Autoconf macro files.
23.8 +
23.9 +# Generate automatic documentation using Doxygen. Works in concert with the
23.10 +# aminclude.m4 file and a compatible doxygen configuration file. Defines the
23.11 +# following public macros:
23.12 +#
23.13 +# DX_???_FEATURE(ON|OFF) - control the default setting fo a Doxygen feature.
23.14 +# Supported features are 'DOXYGEN' itself, 'DOT' for generating graphics,
23.15 +# 'HTML' for plain HTML, 'CHM' for compressed HTML help (for MS users), 'CHI'
23.16 +# for generating a seperate .chi file by the .chm file, and 'MAN', 'RTF',
23.17 +# 'XML', 'PDF' and 'PS' for the appropriate output formats. The environment
23.18 +# variable DOXYGEN_PAPER_SIZE may be specified to override the default 'a4wide'
23.19 +# paper size.
23.20 +#
23.21 +# By default, HTML, PDF and PS documentation is generated as this seems to be
23.22 +# the most popular and portable combination. MAN pages created by Doxygen are
23.23 +# usually problematic, though by picking an appropriate subset and doing some
23.24 +# massaging they might be better than nothing. CHM and RTF are specific for MS
23.25 +# (note that you can't generate both HTML and CHM at the same time). The XML is
23.26 +# rather useless unless you apply specialized post-processing to it.
23.27 +#
23.28 +# The macro mainly controls the default state of the feature. The use can
23.29 +# override the default by specifying --enable or --disable. The macros ensure
23.30 +# that contradictory flags are not given (e.g., --enable-doxygen-html and
23.31 +# --enable-doxygen-chm, --enable-doxygen-anything with --disable-doxygen, etc.)
23.32 +# Finally, each feature will be automatically disabled (with a warning) if the
23.33 +# required programs are missing.
23.34 +#
23.35 +# Once all the feature defaults have been specified, call DX_INIT_DOXYGEN with
23.36 +# the following parameters: a one-word name for the project for use as a
23.37 +# filename base etc., an optional configuration file name (the default is
23.38 +# 'Doxyfile', the same as Doxygen's default), and an optional output directory
23.39 +# name (the default is 'doxygen-doc').
23.40 +
23.41 +## ----------##
23.42 +## Defaults. ##
23.43 +## ----------##
23.44 +
23.45 +DX_ENV=""
23.46 +AC_DEFUN([DX_FEATURE_doc], ON)
23.47 +AC_DEFUN([DX_FEATURE_dot], ON)
23.48 +AC_DEFUN([DX_FEATURE_man], OFF)
23.49 +AC_DEFUN([DX_FEATURE_html], ON)
23.50 +AC_DEFUN([DX_FEATURE_chm], OFF)
23.51 +AC_DEFUN([DX_FEATURE_chi], OFF)
23.52 +AC_DEFUN([DX_FEATURE_rtf], OFF)
23.53 +AC_DEFUN([DX_FEATURE_xml], OFF)
23.54 +AC_DEFUN([DX_FEATURE_pdf], ON)
23.55 +AC_DEFUN([DX_FEATURE_ps], ON)
23.56 +
23.57 +## --------------- ##
23.58 +## Private macros. ##
23.59 +## --------------- ##
23.60 +
23.61 +# DX_ENV_APPEND(VARIABLE, VALUE)
23.62 +# ------------------------------
23.63 +# Append VARIABLE="VALUE" to DX_ENV for invoking doxygen.
23.64 +AC_DEFUN([DX_ENV_APPEND], [AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])])
23.65 +
23.66 +# DX_DIRNAME_EXPR
23.67 +# ---------------
23.68 +# Expand into a shell expression prints the directory part of a path.
23.69 +AC_DEFUN([DX_DIRNAME_EXPR],
23.70 + [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']])
23.71 +
23.72 +# DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF)
23.73 +# -------------------------------------
23.74 +# Expands according to the M4 (static) status of the feature.
23.75 +AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])])
23.76 +
23.77 +# DX_REQUIRE_PROG(VARIABLE, PROGRAM)
23.78 +# ----------------------------------
23.79 +# Require the specified program to be found for the DX_CURRENT_FEATURE to work.
23.80 +AC_DEFUN([DX_REQUIRE_PROG], [
23.81 +AC_PATH_TOOL([$1], [$2])
23.82 +if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then
23.83 + AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION])
23.84 + AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0)
23.85 +fi
23.86 +])
23.87 +
23.88 +# DX_TEST_FEATURE(FEATURE)
23.89 +# ------------------------
23.90 +# Expand to a shell expression testing whether the feature is active.
23.91 +AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1])
23.92 +
23.93 +# DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE)
23.94 +# -------------------------------------------------
23.95 +# Verify that a required features has the right state before trying to turn on
23.96 +# the DX_CURRENT_FEATURE.
23.97 +AC_DEFUN([DX_CHECK_DEPEND], [
23.98 +test "$DX_FLAG_$1" = "$2" \
23.99 +|| AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1,
23.100 + requires, contradicts) doxygen-DX_CURRENT_FEATURE])
23.101 +])
23.102 +
23.103 +# DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE)
23.104 +# ----------------------------------------------------------
23.105 +# Turn off the DX_CURRENT_FEATURE if the required feature is off.
23.106 +AC_DEFUN([DX_CLEAR_DEPEND], [
23.107 +test "$DX_FLAG_$1" = "$2" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0)
23.108 +])
23.109 +
23.110 +# DX_FEATURE_ARG(FEATURE, DESCRIPTION,
23.111 +# CHECK_DEPEND, CLEAR_DEPEND,
23.112 +# REQUIRE, DO-IF-ON, DO-IF-OFF)
23.113 +# --------------------------------------------
23.114 +# Parse the command-line option controlling a feature. CHECK_DEPEND is called
23.115 +# if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND),
23.116 +# otherwise CLEAR_DEPEND is called to turn off the default state if a required
23.117 +# feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional
23.118 +# requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and
23.119 +# DO-IF-ON or DO-IF-OFF are called according to the final state of the feature.
23.120 +AC_DEFUN([DX_ARG_ABLE], [
23.121 + AC_DEFUN([DX_CURRENT_FEATURE], [$1])
23.122 + AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2])
23.123 + AC_ARG_ENABLE(doxygen-$1,
23.124 + [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1],
23.125 + [--enable-doxygen-$1]),
23.126 + DX_IF_FEATURE([$1], [don't $2], [$2]))],
23.127 + [
23.128 +case "$enableval" in
23.129 +#(
23.130 +y|Y|yes|Yes|YES)
23.131 + AC_SUBST([DX_FLAG_$1], 1)
23.132 + $3
23.133 +;; #(
23.134 +n|N|no|No|NO)
23.135 + AC_SUBST([DX_FLAG_$1], 0)
23.136 +;; #(
23.137 +*)
23.138 + AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1])
23.139 +;;
23.140 +esac
23.141 +], [
23.142 +AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)])
23.143 +$4
23.144 +])
23.145 +if DX_TEST_FEATURE([$1]); then
23.146 + $5
23.147 + :
23.148 +fi
23.149 +if DX_TEST_FEATURE([$1]); then
23.150 + AM_CONDITIONAL(DX_COND_$1, :)
23.151 + $6
23.152 + :
23.153 +else
23.154 + AM_CONDITIONAL(DX_COND_$1, false)
23.155 + $7
23.156 + :
23.157 +fi
23.158 +])
23.159 +
23.160 +## -------------- ##
23.161 +## Public macros. ##
23.162 +## -------------- ##
23.163 +
23.164 +# DX_XXX_FEATURE(DEFAULT_STATE)
23.165 +# -----------------------------
23.166 +AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc], [$1])])
23.167 +AC_DEFUN([DX_MAN_FEATURE], [AC_DEFUN([DX_FEATURE_man], [$1])])
23.168 +AC_DEFUN([DX_HTML_FEATURE], [AC_DEFUN([DX_FEATURE_html], [$1])])
23.169 +AC_DEFUN([DX_CHM_FEATURE], [AC_DEFUN([DX_FEATURE_chm], [$1])])
23.170 +AC_DEFUN([DX_CHI_FEATURE], [AC_DEFUN([DX_FEATURE_chi], [$1])])
23.171 +AC_DEFUN([DX_RTF_FEATURE], [AC_DEFUN([DX_FEATURE_rtf], [$1])])
23.172 +AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])])
23.173 +AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])])
23.174 +AC_DEFUN([DX_PDF_FEATURE], [AC_DEFUN([DX_FEATURE_pdf], [$1])])
23.175 +AC_DEFUN([DX_PS_FEATURE], [AC_DEFUN([DX_FEATURE_ps], [$1])])
23.176 +
23.177 +# DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR])
23.178 +# ---------------------------------------------------------
23.179 +# PROJECT also serves as the base name for the documentation files.
23.180 +# The default CONFIG-FILE is "Doxyfile" and OUTPUT-DOC-DIR is "doxygen-doc".
23.181 +AC_DEFUN([DX_INIT_DOXYGEN], [
23.182 +
23.183 +# Files:
23.184 +AC_SUBST([DX_PROJECT], [$1])
23.185 +AC_SUBST([DX_CONFIG], [ifelse([$2], [], Doxyfile, [$2])])
23.186 +AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doxygen-doc, [$3])])
23.187 +
23.188 +# Environment variables used inside doxygen.cfg:
23.189 +DX_ENV_APPEND(SRCDIR, $srcdir)
23.190 +DX_ENV_APPEND(PROJECT, $DX_PROJECT)
23.191 +DX_ENV_APPEND(DOCDIR, $DX_DOCDIR)
23.192 +DX_ENV_APPEND(VERSION, $PACKAGE_VERSION)
23.193 +
23.194 +# Doxygen itself:
23.195 +DX_ARG_ABLE(doc, [generate any doxygen documentation],
23.196 + [],
23.197 + [],
23.198 + [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen)
23.199 + DX_REQUIRE_PROG([DX_PERL], perl)],
23.200 + [DX_ENV_APPEND(PERL_PATH, $DX_PERL)])
23.201 +
23.202 +# Dot for graphics:
23.203 +DX_ARG_ABLE(dot, [generate graphics for doxygen documentation],
23.204 + [DX_CHECK_DEPEND(doc, 1)],
23.205 + [DX_CLEAR_DEPEND(doc, 1)],
23.206 + [DX_REQUIRE_PROG([DX_DOT], dot)],
23.207 + [DX_ENV_APPEND(HAVE_DOT, YES)
23.208 + DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])],
23.209 + [DX_ENV_APPEND(HAVE_DOT, NO)])
23.210 +
23.211 +# Man pages generation:
23.212 +DX_ARG_ABLE(man, [generate doxygen manual pages],
23.213 + [DX_CHECK_DEPEND(doc, 1)],
23.214 + [DX_CLEAR_DEPEND(doc, 1)],
23.215 + [],
23.216 + [DX_ENV_APPEND(GENERATE_MAN, YES)],
23.217 + [DX_ENV_APPEND(GENERATE_MAN, NO)])
23.218 +
23.219 +# RTF file generation:
23.220 +DX_ARG_ABLE(rtf, [generate doxygen RTF documentation],
23.221 + [DX_CHECK_DEPEND(doc, 1)],
23.222 + [DX_CLEAR_DEPEND(doc, 1)],
23.223 + [],
23.224 + [DX_ENV_APPEND(GENERATE_RTF, YES)],
23.225 + [DX_ENV_APPEND(GENERATE_RTF, NO)])
23.226 +
23.227 +# XML file generation:
23.228 +DX_ARG_ABLE(xml, [generate doxygen XML documentation],
23.229 + [DX_CHECK_DEPEND(doc, 1)],
23.230 + [DX_CLEAR_DEPEND(doc, 1)],
23.231 + [],
23.232 + [DX_ENV_APPEND(GENERATE_XML, YES)],
23.233 + [DX_ENV_APPEND(GENERATE_XML, NO)])
23.234 +
23.235 +# (Compressed) HTML help generation:
23.236 +DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation],
23.237 + [DX_CHECK_DEPEND(doc, 1)],
23.238 + [DX_CLEAR_DEPEND(doc, 1)],
23.239 + [DX_REQUIRE_PROG([DX_HHC], hhc)],
23.240 + [DX_ENV_APPEND(HHC_PATH, $DX_HHC)
23.241 + DX_ENV_APPEND(GENERATE_HTML, YES)
23.242 + DX_ENV_APPEND(GENERATE_HTMLHELP, YES)],
23.243 + [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)])
23.244 +
23.245 +# Seperate CHI file generation.
23.246 +DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file],
23.247 + [DX_CHECK_DEPEND(chm, 1)],
23.248 + [DX_CLEAR_DEPEND(chm, 1)],
23.249 + [],
23.250 + [DX_ENV_APPEND(GENERATE_CHI, YES)],
23.251 + [DX_ENV_APPEND(GENERATE_CHI, NO)])
23.252 +
23.253 +# Plain HTML pages generation:
23.254 +DX_ARG_ABLE(html, [generate doxygen plain HTML documentation],
23.255 + [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)],
23.256 + [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)],
23.257 + [],
23.258 + [DX_ENV_APPEND(GENERATE_HTML, YES)],
23.259 + [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)])
23.260 +
23.261 +# PostScript file generation:
23.262 +DX_ARG_ABLE(ps, [generate doxygen PostScript documentation],
23.263 + [DX_CHECK_DEPEND(doc, 1)],
23.264 + [DX_CLEAR_DEPEND(doc, 1)],
23.265 + [DX_REQUIRE_PROG([DX_LATEX], latex)
23.266 + DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
23.267 + DX_REQUIRE_PROG([DX_DVIPS], dvips)
23.268 + DX_REQUIRE_PROG([DX_EGREP], egrep)])
23.269 +
23.270 +# PDF file generation:
23.271 +DX_ARG_ABLE(pdf, [generate doxygen PDF documentation],
23.272 + [DX_CHECK_DEPEND(doc, 1)],
23.273 + [DX_CLEAR_DEPEND(doc, 1)],
23.274 + [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex)
23.275 + DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
23.276 + DX_REQUIRE_PROG([DX_EGREP], egrep)])
23.277 +
23.278 +# LaTeX generation for PS and/or PDF:
23.279 +if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then
23.280 + AM_CONDITIONAL(DX_COND_latex, :)
23.281 + DX_ENV_APPEND(GENERATE_LATEX, YES)
23.282 +else
23.283 + AM_CONDITIONAL(DX_COND_latex, false)
23.284 + DX_ENV_APPEND(GENERATE_LATEX, NO)
23.285 +fi
23.286 +
23.287 +# Paper size for PS and/or PDF:
23.288 +AC_ARG_VAR(DOXYGEN_PAPER_SIZE,
23.289 + [a4wide (default), a4, letter, legal or executive])
23.290 +case "$DOXYGEN_PAPER_SIZE" in
23.291 +#(
23.292 +"")
23.293 + AC_SUBST(DOXYGEN_PAPER_SIZE, "")
23.294 +;; #(
23.295 +a4wide|a4|letter|legal|executive)
23.296 + DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE)
23.297 +;; #(
23.298 +*)
23.299 + AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'])
23.300 +;;
23.301 +esac
23.302 +
23.303 +#For debugging:
23.304 +#echo DX_FLAG_doc=$DX_FLAG_doc
23.305 +#echo DX_FLAG_dot=$DX_FLAG_dot
23.306 +#echo DX_FLAG_man=$DX_FLAG_man
23.307 +#echo DX_FLAG_html=$DX_FLAG_html
23.308 +#echo DX_FLAG_chm=$DX_FLAG_chm
23.309 +#echo DX_FLAG_chi=$DX_FLAG_chi
23.310 +#echo DX_FLAG_rtf=$DX_FLAG_rtf
23.311 +#echo DX_FLAG_xml=$DX_FLAG_xml
23.312 +#echo DX_FLAG_pdf=$DX_FLAG_pdf
23.313 +#echo DX_FLAG_ps=$DX_FLAG_ps
23.314 +#echo DX_ENV=$DX_ENV
23.315 +])
24.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
24.2 +++ b/mythtv_plugin/m4/as-compiler-flag.m4 Wed Sep 20 23:59:48 2006 +0100
24.3 @@ -0,0 +1,33 @@
24.4 +dnl as-compiler-flag.m4 0.1.0
24.5 +
24.6 +dnl autostars m4 macro for detection of compiler flags
24.7 +
24.8 +dnl David Schleef <ds@schleef.org>
24.9 +
24.10 +dnl $Id: as-compiler-flag.m4,v 1.1.1.1 2005/08/26 00:42:44 andrunko Exp $
24.11 +
24.12 +dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
24.13 +dnl Tries to compile with the given CFLAGS.
24.14 +dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
24.15 +dnl and ACTION-IF-NOT-ACCEPTED otherwise.
24.16 +
24.17 +AC_DEFUN([AS_COMPILER_FLAG],
24.18 +[
24.19 + AC_MSG_CHECKING([to see if compiler understands $1])
24.20 +
24.21 + save_CFLAGS="$CFLAGS"
24.22 + CFLAGS="$CFLAGS $1"
24.23 +
24.24 + AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
24.25 + CFLAGS="$save_CFLAGS"
24.26 +
24.27 + if test "X$flag_ok" = Xyes ; then
24.28 + $2
24.29 + true
24.30 + else
24.31 + $3
24.32 + true
24.33 + fi
24.34 + AC_MSG_RESULT([$flag_ok])
24.35 +])
24.36 +
25.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
25.2 +++ b/mythtv_plugin/m4/as-expand.m4 Wed Sep 20 23:59:48 2006 +0100
25.3 @@ -0,0 +1,40 @@
25.4 +dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
25.5 +dnl
25.6 +dnl example
25.7 +dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
25.8 +dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
25.9 +
25.10 +AC_DEFUN([AS_AC_EXPAND],
25.11 +[
25.12 + EXP_VAR=[$1]
25.13 + FROM_VAR=[$2]
25.14 +
25.15 + dnl first expand prefix and exec_prefix if necessary
25.16 + prefix_save=$prefix
25.17 + exec_prefix_save=$exec_prefix
25.18 +
25.19 + dnl if no prefix given, then use /usr/local, the default prefix
25.20 + if test "x$prefix" = "xNONE"; then
25.21 + prefix=$ac_default_prefix
25.22 + fi
25.23 + dnl if no exec_prefix given, then use prefix
25.24 + if test "x$exec_prefix" = "xNONE"; then
25.25 + exec_prefix=$prefix
25.26 + fi
25.27 +
25.28 + full_var="$FROM_VAR"
25.29 + dnl loop until it doesn't change anymore
25.30 + while true; do
25.31 + new_full_var="`eval echo $full_var`"
25.32 + if test "x$new_full_var"="x$full_var"; then break; fi
25.33 + full_var=$new_full_var
25.34 + done
25.35 +
25.36 + dnl clean up
25.37 + full_var=$new_full_var
25.38 + AC_SUBST([$1], "$full_var")
25.39 +
25.40 + dnl restore prefix and exec_prefix
25.41 + prefix=$prefix_save
25.42 + exec_prefix=$exec_prefix_save
25.43 +])
26.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
26.2 +++ b/mythtv_plugin/m4/as-version.m4 Wed Sep 20 23:59:48 2006 +0100
26.3 @@ -0,0 +1,59 @@
26.4 +dnl version.m4 0.0.5
26.5 +dnl autostars m4 macro for versioning
26.6 +dnl thomas@apestaart.org
26.7 +dnl
26.8 +dnl AS_VERSION(PACKAGE, PREFIX, MAJOR, MINOR, MICRO, NANO, ACTION_IF_NO_NANO, ACTION_IF_NANO)
26.9 +dnl example
26.10 +dnl AS_VERSION(gstreamer, GST_VERSION, 0, 3, 2,)
26.11 +dnl for a 0.3.2 release version
26.12 +dnl
26.13 +dnl this macro
26.14 +dnl - defines [$PREFIX]_MAJOR, MINOR and MICRO
26.15 +dnl - if NANO is empty, then we're in release mode, else in cvs/dev mode
26.16 +dnl - defines [$PREFIX], VERSION, and [$PREFIX]_RELEASE
26.17 +dnl - executes the relevant action
26.18 +dnl - AC_SUBST's PACKAGE, VERSION, [$PREFIX] and [$PREFIX]_RELEASE
26.19 +dnl as well as the little ones
26.20 +dnl - doesn't call AM_INIT_AUTOMAKE anymore because it prevents
26.21 +dnl maintainer mode from running ok
26.22 +dnl
26.23 +dnl don't forget to put #undef [$2] and [$2]_RELEASE in acconfig.h
26.24 +
26.25 +AC_DEFUN([AS_VERSION],
26.26 +[
26.27 + PACKAGE=[$1]
26.28 + [$2]_MAJOR_VERSION=[$3]
26.29 + [$2]_MINOR_VERSION=[$4]
26.30 + [$2]_MICRO_VERSION=[$5]
26.31 + NANO=[$6]
26.32 + [$2]_NANO_VERSION=$NANO
26.33 + if test "x$NANO" = "x" || test "x$NANO" = "x0";
26.34 + then
26.35 + AC_MSG_NOTICE(configuring [$1] for release)
26.36 + VERSION=[$3].[$4].[$5]
26.37 + [$2]_RELEASE=1
26.38 + dnl execute action
26.39 + ifelse([$7], , :, [$7])
26.40 + else
26.41 + AC_MSG_NOTICE(configuring [$1] for development with nano $NANO)
26.42 + VERSION=[$3].[$4].[$5].$NANO
26.43 + [$2]_RELEASE=`date +%Y%m%d_%H%M%S`
26.44 + dnl execute action
26.45 + ifelse([$8], , :, [$8])
26.46 + fi
26.47 +
26.48 + [$2]_VERSION=$VERSION
26.49 + AC_DEFINE_UNQUOTED([$2]_VERSION, "$[$2]_VERSION", [Define the version])
26.50 + AC_SUBST([$2]_VERSION)
26.51 +
26.52 + AC_SUBST([$2]_RELEASE)
26.53 +
26.54 + AC_SUBST([$2]_MAJOR_VERSION)
26.55 + AC_SUBST([$2]_MINOR_VERSION)
26.56 + AC_SUBST([$2]_MICRO_VERSION)
26.57 + AC_SUBST([$2]_NANO_VERSION)
26.58 + AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define the package name])
26.59 + AC_SUBST(PACKAGE)
26.60 + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Define the version])
26.61 + AC_SUBST(VERSION)
26.62 +])
27.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
27.2 +++ b/mythtv_plugin/missing Wed Sep 20 23:59:48 2006 +0100
27.3 @@ -0,0 +1,360 @@
27.4 +#! /bin/sh
27.5 +# Common stub for a few missing GNU programs while installing.
27.6 +
27.7 +scriptversion=2003-09-02.23
27.8 +
27.9 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
27.10 +# Free Software Foundation, Inc.
27.11 +# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
27.12 +
27.13 +# This program is free software; you can redistribute it and/or modify
27.14 +# it under the terms of the GNU General Public License as published by
27.15 +# the Free Software Foundation; either version 2, or (at your option)
27.16 +# any later version.
27.17 +
27.18 +# This program is distributed in the hope that it will be useful,
27.19 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
27.20 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27.21 +# GNU General Public License for more details.
27.22 +
27.23 +# You should have received a copy of the GNU General Public License
27.24 +# along with this program; if not, write to the Free Software
27.25 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27.26 +# 02111-1307, USA.
27.27 +
27.28 +# As a special exception to the GNU General Public License, if you
27.29 +# distribute this file as part of a program that contains a
27.30 +# configuration script generated by Autoconf, you may include it under
27.31 +# the same distribution terms that you use for the rest of that program.
27.32 +
27.33 +if test $# -eq 0; then
27.34 + echo 1>&2 "Try \`$0 --help' for more information"
27.35 + exit 1
27.36 +fi
27.37 +
27.38 +run=:
27.39 +
27.40 +# In the cases where this matters, `missing' is being run in the
27.41 +# srcdir already.
27.42 +if test -f configure.ac; then
27.43 + configure_ac=configure.ac
27.44 +else
27.45 + configure_ac=configure.in
27.46 +fi
27.47 +
27.48 +msg="missing on your system"
27.49 +
27.50 +case "$1" in
27.51 +--run)
27.52 + # Try to run requested program, and just exit if it succeeds.
27.53 + run=
27.54 + shift
27.55 + "$@" && exit 0
27.56 + # Exit code 63 means version mismatch. This often happens
27.57 + # when the user try to use an ancient version of a tool on
27.58 + # a file that requires a minimum version. In this case we
27.59 + # we should proceed has if the program had been absent, or
27.60 + # if --run hadn't been passed.
27.61 + if test $? = 63; then
27.62 + run=:
27.63 + msg="probably too old"
27.64 + fi
27.65 + ;;
27.66 +esac
27.67 +
27.68 +# If it does not exist, or fails to run (possibly an outdated version),
27.69 +# try to emulate it.
27.70 +case "$1" in
27.71 +
27.72 + -h|--h|--he|--hel|--help)
27.73 + echo "\
27.74 +$0 [OPTION]... PROGRAM [ARGUMENT]...
27.75 +
27.76 +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
27.77 +error status if there is no known handling for PROGRAM.
27.78 +
27.79 +Options:
27.80 + -h, --help display this help and exit
27.81 + -v, --version output version information and exit
27.82 + --run try to run the given command, and emulate it if it fails
27.83 +
27.84 +Supported PROGRAM values:
27.85 + aclocal touch file \`aclocal.m4'
27.86 + autoconf touch file \`configure'
27.87 + autoheader touch file \`config.h.in'
27.88 + automake touch all \`Makefile.in' files
27.89 + bison create \`y.tab.[ch]', if possible, from existing .[ch]
27.90 + flex create \`lex.yy.c', if possible, from existing .c
27.91 + help2man touch the output file
27.92 + lex create \`lex.yy.c', if possible, from existing .c
27.93 + makeinfo touch the output file
27.94 + tar try tar, gnutar, gtar, then tar without non-portable flags
27.95 + yacc create \`y.tab.[ch]', if possible, from existing .[ch]
27.96 +
27.97 +Send bug reports to <bug-automake@gnu.org>."
27.98 + ;;
27.99 +
27.100 + -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
27.101 + echo "missing $scriptversion (GNU Automake)"
27.102 + ;;
27.103 +
27.104 + -*)
27.105 + echo 1>&2 "$0: Unknown \`$1' option"
27.106 + echo 1>&2 "Try \`$0 --help' for more information"
27.107 + exit 1
27.108 + ;;
27.109 +
27.110 + aclocal*)
27.111 + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
27.112 + # We have it, but it failed.
27.113 + exit 1
27.114 + fi
27.115 +
27.116 + echo 1>&2 "\
27.117 +WARNING: \`$1' is $msg. You should only need it if
27.118 + you modified \`acinclude.m4' or \`${configure_ac}'. You might want
27.119 + to install the \`Automake' and \`Perl' packages. Grab them from
27.120 + any GNU archive site."
27.121 + touch aclocal.m4
27.122 + ;;
27.123 +
27.124 + autoconf)
27.125 + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
27.126 + # We have it, but it failed.
27.127 + exit 1
27.128 + fi
27.129 +
27.130 + echo 1>&2 "\
27.131 +WARNING: \`$1' is $msg. You should only need it if
27.132 + you modified \`${configure_ac}'. You might want to install the
27.133 + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
27.134 + archive site."
27.135 + touch configure
27.136 + ;;
27.137 +
27.138 + autoheader)
27.139 + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
27.140 + # We have it, but it failed.
27.141 + exit 1
27.142 + fi
27.143 +
27.144 + echo 1>&2 "\
27.145 +WARNING: \`$1' is $msg. You should only need it if
27.146 + you modified \`acconfig.h' or \`${configure_ac}'. You might want
27.147 + to install the \`Autoconf' and \`GNU m4' packages. Grab them
27.148 + from any GNU archive site."
27.149 + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
27.150 + test -z "$files" && files="config.h"
27.151 + touch_files=
27.152 + for f in $files; do
27.153 + case "$f" in
27.154 + *:*) touch_files="$touch_files "`echo "$f" |
27.155 + sed -e 's/^[^:]*://' -e 's/:.*//'`;;
27.156 + *) touch_files="$touch_files $f.in";;
27.157 + esac
27.158 + done
27.159 + touch $touch_files
27.160 + ;;
27.161 +
27.162 + automake*)
27.163 + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
27.164 + # We have it, but it failed.
27.165 + exit 1
27.166 + fi
27.167 +
27.168 + echo 1>&2 "\
27.169 +WARNING: \`$1' is $msg. You should only need it if
27.170 + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
27.171 + You might want to install the \`Automake' and \`Perl' packages.
27.172 + Grab them from any GNU archive site."
27.173 + find . -type f -name Makefile.am -print |
27.174 + sed 's/\.am$/.in/' |
27.175 + while read f; do touch "$f"; done
27.176 + ;;
27.177 +
27.178 + autom4te)
27.179 + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
27.180 + # We have it, but it failed.
27.181 + exit 1
27.182 + fi
27.183 +
27.184 + echo 1>&2 "\
27.185 +WARNING: \`$1' is needed, but is $msg.
27.186 + You might have modified some files without having the
27.187 + proper tools for further handling them.
27.188 + You can get \`$1' as part of \`Autoconf' from any GNU
27.189 + archive site."
27.190 +
27.191 + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
27.192 + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
27.193 + if test -f "$file"; then
27.194 + touch $file
27.195 + else
27.196 + test -z "$file" || exec >$file
27.197 + echo "#! /bin/sh"
27.198 + echo "# Created by GNU Automake missing as a replacement of"
27.199 + echo "# $ $@"
27.200 + echo "exit 0"
27.201 + chmod +x $file
27.202 + exit 1
27.203 + fi
27.204 + ;;
27.205 +
27.206 + bison|yacc)
27.207 + echo 1>&2 "\
27.208 +WARNING: \`$1' $msg. You should only need it if
27.209 + you modified a \`.y' file. You may need the \`Bison' package
27.210 + in order for those modifications to take effect. You can get
27.211 + \`Bison' from any GNU archive site."
27.212 + rm -f y.tab.c y.tab.h
27.213 + if [ $# -ne 1 ]; then
27.214 + eval LASTARG="\${$#}"
27.215 + case "$LASTARG" in
27.216 + *.y)
27.217 + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
27.218 + if [ -f "$SRCFILE" ]; then
27.219 + cp "$SRCFILE" y.tab.c
27.220 + fi
27.221 + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
27.222 + if [ -f "$SRCFILE" ]; then
27.223 + cp "$SRCFILE" y.tab.h
27.224 + fi
27.225 + ;;
27.226 + esac
27.227 + fi
27.228 + if [ ! -f y.tab.h ]; then
27.229 + echo >y.tab.h
27.230 + fi
27.231 + if [ ! -f y.tab.c ]; then
27.232 + echo 'main() { return 0; }' >y.tab.c
27.233 + fi
27.234 + ;;
27.235 +
27.236 + lex|flex)
27.237 + echo 1>&2 "\
27.238 +WARNING: \`$1' is $msg. You should only need it if
27.239 + you modified a \`.l' file. You may need the \`Flex' package
27.240 + in order for those modifications to take effect. You can get
27.241 + \`Flex' from any GNU archive site."
27.242 + rm -f lex.yy.c
27.243 + if [ $# -ne 1 ]; then
27.244 + eval LASTARG="\${$#}"
27.245 + case "$LASTARG" in
27.246 + *.l)
27.247 + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
27.248 + if [ -f "$SRCFILE" ]; then
27.249 + cp "$SRCFILE" lex.yy.c
27.250 + fi
27.251 + ;;
27.252 + esac
27.253 + fi
27.254 + if [ ! -f lex.yy.c ]; then
27.255 + echo 'main() { return 0; }' >lex.yy.c
27.256 + fi
27.257 + ;;
27.258 +
27.259 + help2man)
27.260 + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
27.261 + # We have it, but it failed.
27.262 + exit 1
27.263 + fi
27.264 +
27.265 + echo 1>&2 "\
27.266 +WARNING: \`$1' is $msg. You should only need it if
27.267 + you modified a dependency of a manual page. You may need the
27.268 + \`Help2man' package in order for those modifications to take
27.269 + effect. You can get \`Help2man' from any GNU archive site."
27.270 +
27.271 + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
27.272 + if test -z "$file"; then
27.273 + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
27.274 + fi
27.275 + if [ -f "$file" ]; then
27.276 + touch $file
27.277 + else
27.278 + test -z "$file" || exec >$file
27.279 + echo ".ab help2man is required to generate this page"
27.280 + exit 1
27.281 + fi
27.282 + ;;
27.283 +
27.284 + makeinfo)
27.285 + if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
27.286 + # We have makeinfo, but it failed.
27.287 + exit 1
27.288 + fi
27.289 +
27.290 + echo 1>&2 "\
27.291 +WARNING: \`$1' is $msg. You should only need it if
27.292 + you modified a \`.texi' or \`.texinfo' file, or any other file
27.293 + indirectly affecting the aspect of the manual. The spurious
27.294 + call might also be the consequence of using a buggy \`make' (AIX,
27.295 + DU, IRIX). You might want to install the \`Texinfo' package or
27.296 + the \`GNU make' package. Grab either from any GNU archive site."
27.297 + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
27.298 + if test -z "$file"; then
27.299 + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
27.300 + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
27.301 + fi
27.302 + touch $file
27.303 + ;;
27.304 +
27.305 + tar)
27.306 + shift
27.307 + if test -n "$run"; then
27.308 + echo 1>&2 "ERROR: \`tar' requires --run"
27.309 + exit 1
27.310 + fi
27.311 +
27.312 + # We have already tried tar in the generic part.
27.313 + # Look for gnutar/gtar before invocation to avoid ugly error
27.314 + # messages.
27.315 + if (gnutar --version > /dev/null 2>&1); then
27.316 + gnutar "$@" && exit 0
27.317 + fi
27.318 + if (gtar --version > /dev/null 2>&1); then
27.319 + gtar "$@" && exit 0
27.320 + fi
27.321 + firstarg="$1"
27.322 + if shift; then
27.323 + case "$firstarg" in
27.324 + *o*)
27.325 + firstarg=`echo "$firstarg" | sed s/o//`
27.326 + tar "$firstarg" "$@" && exit 0
27.327 + ;;
27.328 + esac
27.329 + case "$firstarg" in
27.330 + *h*)
27.331 + firstarg=`echo "$firstarg" | sed s/h//`
27.332 + tar "$firstarg" "$@" && exit 0
27.333 + ;;
27.334 + esac
27.335 + fi
27.336 +
27.337 + echo 1>&2 "\
27.338 +WARNING: I can't seem to be able to run \`tar' with the given arguments.
27.339 + You may want to install GNU tar or Free paxutils, or check the
27.340 + command line arguments."
27.341 + exit 1
27.342 + ;;
27.343 +
27.344 + *)
27.345 + echo 1>&2 "\
27.346 +WARNING: \`$1' is needed, and is $msg.
27.347 + You might have modified some files without having the
27.348 + proper tools for further handling them. Check the \`README' file,
27.349 + it often tells you about the needed prerequisites for installing
27.350 + this package. You may also peek at any GNU archive site, in case
27.351 + some other package would contain this missing \`$1' program."
27.352 + exit 1
27.353 + ;;
27.354 +esac
27.355 +
27.356 +exit 0
27.357 +
27.358 +# Local variables:
27.359 +# eval: (add-hook 'write-file-hooks 'time-stamp)
27.360 +# time-stamp-start: "scriptversion="
27.361 +# time-stamp-format: "%:y-%02m-%02d.%02H"
27.362 +# time-stamp-end: "$"
27.363 +# End:
28.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
28.2 +++ b/mythtv_plugin/myth_file_transfer.c Wed Sep 20 23:59:48 2006 +0100
28.3 @@ -0,0 +1,960 @@
28.4 +/* vim: set sw=2: -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2; c-indent-level: 2-*- */
28.5 +/**
28.6 + * GStreamer plug-in properties:
28.7 + * - location (backend server hostname/URL) [ex.: myth://192.168.1.73:28722/1000_1092091.nuv]
28.8 + * - path (qurl - remote file to be opened)
28.9 + * - port number
28.10 + * @author Rosfran Lins Borges <rosfran.borges@indt.org.br>
28.11 + */
28.12 +
28.13 +#include "myth_file_transfer.h"
28.14 +#include "myth_uri.h"
28.15 +#include "myth_livetv.h"
28.16 +#include <gmyth/gmyth_util.h>
28.17 +#include <gmyth/gmyth_socket.h>
28.18 +#include <gmyth/gmyth_stringlist.h>
28.19 +
28.20 +#include <unistd.h>
28.21 +#include <glib.h>
28.22 +
28.23 +#include <arpa/inet.h>
28.24 +#include <sys/types.h>
28.25 +#include <sys/socket.h>
28.26 +#include <netdb.h>
28.27 +#include <errno.h>
28.28 +#include <stdlib.h>
28.29 +
28.30 +#define MYTHTV_QUERY_HEADER "QUERY_FILETRANSFER"
28.31 +#define MYTHTV_RECORDER_HEADER "QUERY_RECORDER"
28.32 +
28.33 +/* default values to the file transfer parameters */
28.34 +#define MYTHTV_USER_READ_AHEAD FALSE
28.35 +#define MYTHTV_RETRIES 1
28.36 +#define MYTHTV_FILE_SIZE -1
28.37 +
28.38 +#define MYTHTV_BUFFER_SIZE 2048
28.39 +
28.40 +#define MYTHTV_VERSION 30
28.41 +
28.42 +#define MYTHTV_TRANSFER_MAX_WAITS 700
28.43 +
28.44 +#ifdef MYTHTV_ENABLE_DEBUG
28.45 +#define MYTHTV_ENABLE_DEBUG 1
28.46 +#else
28.47 +#undef MYTHTV_ENABLE_DEBUG
28.48 +#endif
28.49 +
28.50 +/* this NDEBUG is to maintain compatibility with GMyth library */
28.51 +#ifndef NDEBUG
28.52 +#define MYTHTV_ENABLE_DEBUG 1
28.53 +#endif
28.54 +
28.55 +static guint wait_to_transfer = 0;
28.56 +
28.57 +enum myth_sock_types {
28.58 + MYTH_PLAYBACK_TYPE = 0,
28.59 + MYTH_MONITOR_TYPE,
28.60 + MYTH_FILETRANSFER_TYPE,
28.61 + MYTH_RINGBUFFER_TYPE
28.62 +};
28.63 +
28.64 +static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
28.65 +
28.66 +static void myth_file_transfer_class_init (MythFileTransferClass *klass);
28.67 +static void myth_file_transfer_init (MythFileTransfer *object);
28.68 +
28.69 +static void myth_file_transfer_dispose (GObject *object);
28.70 +static void myth_file_transfer_finalize (GObject *object);
28.71 +
28.72 +static GMythSocket *myth_connect_to_transfer_backend( MythFileTransfer **transfer, guint sock_type );
28.73 +static void* myth_init_io_watchers( void *data );
28.74 +
28.75 +void myth_file_transfer_close( MythFileTransfer *transfer );
28.76 +
28.77 +G_DEFINE_TYPE(MythFileTransfer, myth_file_transfer, G_TYPE_OBJECT)
28.78 +
28.79 +static guint64
28.80 +mmyth_util_decode_long_long( GMythStringList *strlist, guint offset )
28.81 +{
28.82 +
28.83 + guint64 ret_value = 0LL;
28.84 +
28.85 + g_return_val_if_fail( strlist != NULL, ret_value );
28.86 +
28.87 + if ( offset < gmyth_string_list_length( strlist ))
28.88 + g_printerr( "[%s] Offset is lower than the GMythStringList (offset = %d)!\n", __FUNCTION__, offset );
28.89 + g_return_val_if_fail( offset < gmyth_string_list_length( strlist ), ret_value );
28.90 +
28.91 + gint l1 = gmyth_string_list_get_int( strlist, offset );
28.92 + gint l2 = gmyth_string_list_get_int( strlist, offset + 1 );
28.93 +
28.94 + ret_value = ((guint64)(l2) & 0xffffffffLL) | ((guint64)(l1) << 32);
28.95 +
28.96 + return ret_value;
28.97 +
28.98 +}
28.99 +
28.100 +static void
28.101 +myth_file_transfer_class_init (MythFileTransferClass *klass)
28.102 +{
28.103 + GObjectClass *gobject_class;
28.104 +
28.105 + gobject_class = (GObjectClass *) klass;
28.106 +
28.107 + gobject_class->dispose = myth_file_transfer_dispose;
28.108 + gobject_class->finalize = myth_file_transfer_finalize;
28.109 +}
28.110 +
28.111 + static void
28.112 +myth_file_transfer_init (MythFileTransfer *myth_file_transfer)
28.113 +{
28.114 + g_return_if_fail( myth_file_transfer != NULL );
28.115 + myth_file_transfer->mythtv_version = MYTHTV_VERSION;
28.116 +}
28.117 +
28.118 +static void
28.119 +myth_file_transfer_dispose (GObject *object)
28.120 +{
28.121 + MythFileTransfer *myth_file_transfer = MYTH_FILE_TRANSFER(object);
28.122 +
28.123 + myth_file_transfer_close( myth_file_transfer );
28.124 +
28.125 + G_OBJECT_CLASS (myth_file_transfer_parent_class)->dispose (object);
28.126 +}
28.127 +
28.128 + static void
28.129 +myth_file_transfer_finalize (GObject *object)
28.130 +{
28.131 + g_signal_handlers_destroy (object);
28.132 +
28.133 + G_OBJECT_CLASS (myth_file_transfer_parent_class)->finalize (object);
28.134 +}
28.135 +
28.136 + MythFileTransfer*
28.137 +myth_file_transfer_new (gint num, GString *uri_str, gshort port, gint mythtv_version)
28.138 +{
28.139 + MythFileTransfer *transfer = MYTH_FILE_TRANSFER ( g_object_new (
28.140 + MYTH_FILE_TRANSFER_TYPE, FALSE ));
28.141 +
28.142 + if ( mythtv_version > 0 )
28.143 + transfer->mythtv_version = mythtv_version;
28.144 +
28.145 + transfer->card_id = num;
28.146 +
28.147 + transfer->rec_id = -1;
28.148 +
28.149 + transfer->recordernum = 0;
28.150 + transfer->uri = myth_uri_new ( uri_str->str );
28.151 +
28.152 + transfer->hostname = g_string_new( myth_uri_gethost(transfer->uri) );
28.153 + g_print( "\t--> transfer->hostname = %s\n", transfer->hostname->str );
28.154 +
28.155 + if ( port >= 0 )
28.156 + transfer->port = port;
28.157 + else
28.158 + transfer->port = myth_uri_getport( transfer->uri );
28.159 +
28.160 + g_print( "\t--> transfer->port = %d\n", transfer->port );
28.161 +
28.162 + transfer->readposition = 0;
28.163 + transfer->filesize = MYTHTV_FILE_SIZE;
28.164 + transfer->timeoutisfast = FALSE;
28.165 +
28.166 + transfer->userreadahead = MYTHTV_USER_READ_AHEAD;
28.167 + transfer->retries = MYTHTV_RETRIES;
28.168 +
28.169 + transfer->live_tv = FALSE;
28.170 +
28.171 + transfer->query = g_string_new( MYTHTV_QUERY_HEADER );
28.172 + g_string_append_printf ( transfer->query, " %d", transfer->recordernum );
28.173 + g_print( "\t--> transfer->query = %s\n", transfer->query->str );
28.174 +
28.175 + transfer->control_sock = NULL;
28.176 + transfer->event_sock = NULL;
28.177 + transfer->sock = NULL;
28.178 +
28.179 + return transfer;
28.180 +}
28.181 +
28.182 +gboolean
28.183 +myth_file_transfer_livetv_setup( MythFileTransfer **transfer, GMythSocket *live_socket )
28.184 +{
28.185 + (*transfer)->sock = live_socket;
28.186 + g_object_ref( live_socket );
28.187 +
28.188 + return TRUE;
28.189 +}
28.190 +
28.191 +gboolean
28.192 +myth_file_transfer_playback_setup( MythFileTransfer **transfer, gboolean live_tv )
28.193 +{
28.194 +
28.195 + gboolean ret = TRUE;
28.196 +
28.197 + (*transfer)->live_tv = live_tv;
28.198 +
28.199 + printf("[%s] Running config to the %s...\n", __FUNCTION__, live_tv ? "LiveTV" : "FileTransfer" );
28.200 +
28.201 + /* configure the control socket */
28.202 + if ((*transfer)->control_sock == NULL) {
28.203 +
28.204 + if ( myth_connect_to_transfer_backend ( transfer, MYTH_PLAYBACK_TYPE ) == NULL ) {
28.205 + g_printerr( "Connection to backend failed (Control Socket).\n" );
28.206 + ret = FALSE;
28.207 + }
28.208 +
28.209 + } else {
28.210 + g_warning("Remote transfer control socket already created.\n");
28.211 + }
28.212 +
28.213 + return ret;
28.214 +
28.215 +}
28.216 +
28.217 +gboolean
28.218 +myth_file_transfer_setup( MythFileTransfer **transfer, gboolean live_tv )
28.219 +{
28.220 + GMythStringList *strlist = NULL;
28.221 +
28.222 + gboolean ret = TRUE;
28.223 +
28.224 + (*transfer)->live_tv = live_tv;
28.225 +
28.226 + printf("[%s] Running config to the %s...\n", __FUNCTION__, live_tv ? "LiveTV" : "FileTransfer" );
28.227 +
28.228 +#if 0
28.229 + /* configure the event socket */
28.230 + if ((*transfer)->event_sock == NULL) {
28.231 +
28.232 + if ( myth_connect_to_transfer_backend ( transfer, MYTH_MONITOR_TYPE ) == NULL ) {
28.233 + g_printerr( "Connection to backend failed (Event Socket).\n" );
28.234 + ret = FALSE;
28.235 + }
28.236 +
28.237 + } else {
28.238 + g_warning("Remote transfer control socket already created.\n");
28.239 + }
28.240 +#endif
28.241 +
28.242 + /* configure the socket */
28.243 + if ( (*transfer)->sock == NULL ) {
28.244 +
28.245 + //if ( live_tv == FALSE ) {
28.246 +
28.247 + if ( myth_connect_to_transfer_backend ( transfer, MYTH_FILETRANSFER_TYPE ) == NULL ) {
28.248 + g_printerr ("Connection to backend failed (Raw Transfer Socket).\n");
28.249 + ret = FALSE;
28.250 + }
28.251 +
28.252 + if ( !(*transfer)->live_tv && (*transfer)->control_sock != NULL) {
28.253 + strlist = gmyth_string_list_new();
28.254 + g_string_printf ( (*transfer)->query, "%s %d", MYTHTV_QUERY_HEADER, (*transfer)->recordernum );
28.255 +
28.256 + gmyth_string_list_append_string( strlist, (*transfer)->query );
28.257 + gmyth_string_list_append_char_array( strlist, "IS_OPEN" );
28.258 +
28.259 + gmyth_socket_write_stringlist( (*transfer)->control_sock, strlist );
28.260 + gmyth_socket_read_stringlist( (*transfer)->control_sock, strlist );
28.261 +
28.262 + if ( strlist!=NULL && gmyth_string_list_get_int( strlist, 0 ) == 1 ) {
28.263 + g_print( "[%s] Remote Myth FileTransfer socket is open!\n", __FUNCTION__ );
28.264 + } else {
28.265 + g_print( "[%s] Remote Myth FileTransfer socket is CLOSED! See the MythTV Server Backend for configuration details...\n", __FUNCTION__ );
28.266 + ret = FALSE;
28.267 + }
28.268 + }
28.269 +
28.270 + } else {
28.271 + g_warning("Remote transfer (raw) socket already created.\n");
28.272 + }
28.273 +
28.274 + return ret;
28.275 +}
28.276 +
28.277 +static GMythSocket *
28.278 +myth_connect_to_transfer_backend( MythFileTransfer **transfer, guint sock_type )
28.279 +{
28.280 + GMythSocket *sock = NULL;
28.281 +
28.282 + g_return_val_if_fail( transfer != NULL && *transfer != NULL, NULL );
28.283 + g_return_val_if_fail( (*transfer)->uri != NULL, NULL );
28.284 +
28.285 + g_static_mutex_lock (&mutex);
28.286 +
28.287 + gchar *path_dir = myth_uri_getpath( (*transfer)->uri );
28.288 + //g_print( "\t--> %s: path_dir = %s\n", __FUNCTION__, path_dir );
28.289 +
28.290 + gchar *stype = g_strdup( "" );
28.291 +
28.292 + // if ( (*transfer)->live_tv == FALSE ) {
28.293 +
28.294 + sock = gmyth_socket_new();
28.295 +
28.296 + gmyth_socket_connect( &sock, (*transfer)->hostname->str, (*transfer)->port );
28.297 +
28.298 + /*
28.299 + } else {
28.300 + sock = (*transfer)->sock;
28.301 + }
28.302 + */
28.303 +#ifdef MYTHTV_ENABLE_DEBUG
28.304 +
28.305 + g_print( "[%s] --> Creating socket... (%s, %d)\n", __FUNCTION__, (*transfer)->hostname->str, (*transfer)->port );
28.306 +#endif
28.307 +
28.308 + GMythStringList *strlist = NULL;
28.309 +
28.310 + GString *hostname = g_string_new( myth_uri_gethost( (*transfer)->uri ) );
28.311 + GString *base_str = g_string_new( "" );
28.312 +
28.313 + if ( gmyth_socket_check_protocol_version_number (sock, (*transfer)->mythtv_version) ) {
28.314 +
28.315 + if (sock == NULL) {
28.316 + stype = (sock_type==MYTH_PLAYBACK_TYPE) ? "control socket" : "file data socket";
28.317 + g_printerr( "FileTransfer, open_socket(%s): \n"
28.318 + "\t\t\tCould not connect to server \"%s\" @ port %d\n", stype,
28.319 + (*transfer)->hostname->str, (*transfer)->port );
28.320 + g_object_unref(sock);
28.321 + g_static_mutex_unlock (&mutex);
28.322 + return NULL;
28.323 + }
28.324 +
28.325 + hostname = gmyth_socket_get_local_hostname();
28.326 +
28.327 + g_print( "[%s] local hostname = %s\n", __FUNCTION__, hostname->str );
28.328 +
28.329 + if ( sock_type == MYTH_PLAYBACK_TYPE )
28.330 + {
28.331 + (*transfer)->control_sock = sock;
28.332 + g_string_printf( base_str, "ANN Playback %s %d", hostname->str, FALSE );
28.333 +
28.334 + gmyth_socket_send_command( (*transfer)->control_sock, base_str );
28.335 + GString *resp = gmyth_socket_receive_response( (*transfer)->control_sock );
28.336 + g_print( "[%s] Got Playback response from %s: %s\n", __FUNCTION__, base_str->str, resp->str );
28.337 + }
28.338 + else if ( sock_type == MYTH_MONITOR_TYPE )
28.339 + {
28.340 + (*transfer)->event_sock = sock;
28.341 + g_string_printf( base_str, "ANN Monitor %s %d", hostname->str, TRUE );
28.342 +
28.343 + gmyth_socket_send_command( (*transfer)->event_sock, base_str );
28.344 + GString *resp = gmyth_socket_receive_response( (*transfer)->event_sock );
28.345 + g_print( "[%s] Got Monitor response from %s: %s\n", __FUNCTION__, base_str->str, resp->str );
28.346 + g_thread_create( myth_init_io_watchers, (void*)(*transfer), FALSE, NULL );
28.347 +
28.348 + g_printerr( "[%s] Watch listener function to the IO control channel on thread %p.\n", __FUNCTION__, g_thread_self() );
28.349 +
28.350 + }
28.351 + else if ( sock_type == MYTH_FILETRANSFER_TYPE )
28.352 + {
28.353 + (*transfer)->sock = sock;
28.354 + strlist = gmyth_string_list_new();
28.355 + //g_string_printf( base_str, "ANN FileTransfer %s %d %d", hostname->str,
28.356 + // transfer->userreadahead, transfer->retries );
28.357 + g_string_printf( base_str, "ANN FileTransfer %s", hostname->str );
28.358 +
28.359 + gmyth_string_list_append_string( strlist, base_str );
28.360 + gmyth_string_list_append_char_array( strlist, path_dir );
28.361 +
28.362 + gmyth_socket_write_stringlist( (*transfer)->sock, strlist );
28.363 + gmyth_socket_read_stringlist( (*transfer)->sock, strlist );
28.364 +
28.365 + /* socket number, where all the stream data comes from - got from the MythTV remote backend */
28.366 + (*transfer)->recordernum = gmyth_string_list_get_int( strlist, 1 );
28.367 +
28.368 + /* Myth URI stream file size - decoded using two 8-bytes sequences (64 bits/long long types) */
28.369 + (*transfer)->filesize = mmyth_util_decode_long_long( strlist, 2 );
28.370 +
28.371 + printf( "[%s] ***** Received: recordernum = %d, filesize = %" G_GUINT64_FORMAT "\n", __FUNCTION__,
28.372 + (*transfer)->recordernum, (*transfer)->filesize );
28.373 +
28.374 + if ( (*transfer)->filesize <= 0 ) {
28.375 + g_print( "[%s] Got filesize equals to %llu is lesser than 0 [invalid stream file]\n", __FUNCTION__, (*transfer)->filesize );
28.376 + g_object_unref(sock);
28.377 + sock = NULL;
28.378 + }
28.379 + }
28.380 + else if ( sock_type == MYTH_RINGBUFFER_TYPE )
28.381 + {
28.382 + (*transfer)->sock = sock;
28.383 + //myth_file_transfer_spawntv( (*transfer), NULL );
28.384 +
28.385 + strlist = gmyth_string_list_new();
28.386 + g_string_printf( base_str, "ANN RingBuffer %s %d", hostname->str, (*transfer)->card_id );
28.387 +
28.388 + gmyth_socket_send_command( (*transfer)->sock, base_str );
28.389 + GString *resp = gmyth_socket_receive_response( (*transfer)->sock );
28.390 + g_print( "[%s] Got RingBuffer response from %s: %s\n", __FUNCTION__, base_str->str, resp->str );
28.391 +
28.392 + }
28.393 +
28.394 + }
28.395 +
28.396 + printf("[%s] ANN %s sent: %s\n", (sock_type==MYTH_PLAYBACK_TYPE) ? "Playback" : (sock_type==MYTH_FILETRANSFER_TYPE) ? "FileTransfer" : "Monitor", __FUNCTION__, base_str->str);
28.397 +
28.398 + if ( strlist != NULL )
28.399 + g_object_unref( strlist );
28.400 +
28.401 + g_static_mutex_unlock (&mutex);
28.402 +
28.403 + return sock;
28.404 +}
28.405 +
28.406 +void
28.407 +myth_file_transfer_spawntv ( MythFileTransfer *file_transfer,
28.408 + GString *tvchain_id )
28.409 +{
28.410 + GMythStringList *str_list;
28.411 +
28.412 + g_debug ("myth_file_transfer_spawntv.\n");
28.413 +
28.414 + str_list = gmyth_string_list_new ();
28.415 +
28.416 + g_string_printf( file_transfer->query, "%s %d", MYTHTV_RECORDER_HEADER,
28.417 + file_transfer->card_id );
28.418 + gmyth_string_list_append_string (str_list, file_transfer->query);
28.419 + gmyth_string_list_append_string (str_list, g_string_new ("SPAWN_LIVETV"));
28.420 + if (tvchain_id!=NULL) {
28.421 + gmyth_string_list_append_string (str_list, tvchain_id);
28.422 + gmyth_string_list_append_int (str_list, FALSE); // PIP = FALSE (0)
28.423 + }
28.424 +
28.425 + gmyth_socket_sendreceive_stringlist ( file_transfer->sock, str_list );
28.426 +
28.427 + //GString *str = NULL;
28.428 +
28.429 + //if (str_list!=NULL && (str = gmyth_string_list_get_string( str_list, 0 )) != NULL && strcasecmp( str->str, "ok" ) != 0 ) {
28.430 + // g_print( "[%s]\t\tSpawnLiveTV is OK!\n", __FUNCTION__ );
28.431 + //}
28.432 + if (str_list!=NULL)
28.433 + g_object_unref (str_list);
28.434 +
28.435 +}
28.436 +
28.437 +gboolean
28.438 +myth_file_transfer_is_recording ( MythFileTransfer *file_transfer )
28.439 +{
28.440 + gboolean ret = TRUE;
28.441 +
28.442 + GMythStringList *str_list = gmyth_string_list_new ();
28.443 +
28.444 + g_debug ( "[%s]\n", __FUNCTION__ );
28.445 + g_static_mutex_lock (&mutex);
28.446 +
28.447 + g_string_printf( file_transfer->query, "%s %d", MYTHTV_RECORDER_HEADER,
28.448 + file_transfer->rec_id >= 0 ? file_transfer->rec_id : file_transfer->card_id );
28.449 + gmyth_string_list_append_string (str_list, file_transfer->query);
28.450 + gmyth_string_list_append_string (str_list, g_string_new ("IS_RECORDING"));
28.451 +
28.452 + gmyth_socket_sendreceive_stringlist ( file_transfer->control_sock, str_list );
28.453 +
28.454 + if ( str_list != NULL && gmyth_string_list_length(str_list) > 0 )
28.455 + {
28.456 + GString *str = NULL;
28.457 + if ( ( str = gmyth_string_list_get_string( str_list, 0 ) ) != NULL && strcmp( str->str, "bad" )!= 0 ) {
28.458 + gint is_rec = gmyth_string_list_get_int( str_list, 0 );
28.459 + if ( is_rec != 0 )
28.460 + ret = TRUE;
28.461 + else
28.462 + ret = FALSE;
28.463 + }
28.464 + }
28.465 + g_print( "[%s] %s, stream is %s being recorded!\n", __FUNCTION__, ret ? "YES" : "NO", ret ? "" : "NOT" );
28.466 + g_static_mutex_unlock (&mutex);
28.467 +
28.468 + if ( str_list != NULL )
28.469 + g_object_unref (str_list);
28.470 +
28.471 + return ret;
28.472 +
28.473 +}
28.474 +
28.475 +guint64
28.476 +myth_file_transfer_get_file_position ( MythFileTransfer *file_transfer )
28.477 +{
28.478 + guint64 pos = 0;
28.479 +
28.480 + GMythStringList *str_list = gmyth_string_list_new ();
28.481 +
28.482 + g_debug ( "[%s]\n", __FUNCTION__ );
28.483 + g_static_mutex_lock (&mutex);
28.484 +
28.485 + g_string_printf( file_transfer->query, "%s %d", MYTHTV_RECORDER_HEADER,
28.486 + file_transfer->rec_id >= 0 ? file_transfer->rec_id : file_transfer->card_id );
28.487 +
28.488 + gmyth_string_list_append_string (str_list, file_transfer->query);
28.489 + gmyth_string_list_append_string (str_list, g_string_new ("GET_FILE_POSITION"));
28.490 +
28.491 + gmyth_socket_sendreceive_stringlist ( file_transfer->control_sock, str_list );
28.492 +
28.493 + if ( str_list != NULL && gmyth_string_list_length(str_list) > 0 )
28.494 + {
28.495 + GString *str = NULL;
28.496 + if ( ( str = gmyth_string_list_get_string( str_list, 0 ) ) != NULL && strcmp ( str->str, "bad" ) != 0 )
28.497 + pos = gmyth_util_decode_long_long( str_list, 0 );
28.498 + }
28.499 + g_static_mutex_unlock (&mutex);
28.500 +
28.501 +#ifndef MYTHTV_ENABLE_DEBUG
28.502 +
28.503 + g_print( "[%s] Got file position = %llu\n", __FUNCTION__, pos );
28.504 +#endif
28.505 + if (str_list!=NULL)
28.506 + g_object_unref (str_list);
28.507 +
28.508 + return pos;
28.509 +
28.510 +}
28.511 +
28.512 + glong
28.513 +myth_file_transfer_get_recordernum( MythFileTransfer *transfer )
28.514 +{
28.515 + return transfer->recordernum;
28.516 +}
28.517 +
28.518 + glong
28.519 +myth_file_transfer_get_filesize( MythFileTransfer *transfer )
28.520 +{
28.521 + return transfer->filesize;
28.522 +}
28.523 +
28.524 + gboolean
28.525 +myth_file_transfer_isopen( MythFileTransfer *transfer )
28.526 +{
28.527 + return (transfer->sock != NULL && transfer->control_sock != NULL);
28.528 +}
28.529 +
28.530 + void
28.531 +myth_file_transfer_close( MythFileTransfer *transfer )
28.532 +{
28.533 + GMythStringList *strlist;
28.534 +
28.535 + if (transfer->control_sock == NULL)
28.536 + return;
28.537 +
28.538 + strlist = gmyth_string_list_new( );
28.539 +
28.540 + g_string_printf( transfer->query, "%s %d", MYTHTV_QUERY_HEADER,
28.541 + transfer->recordernum );
28.542 + gmyth_string_list_append_string( strlist, transfer->query );
28.543 + gmyth_string_list_append_char_array( strlist, "DONE" );
28.544 +
28.545 +
28.546 + if ( gmyth_socket_sendreceive_stringlist(transfer->control_sock, strlist) <= 0 )
28.547 + {
28.548 + g_printerr( "Remote file timeout.\n" );
28.549 + }
28.550 +
28.551 + if (transfer->sock)
28.552 + {
28.553 + g_object_unref( transfer->sock );
28.554 + transfer->sock = NULL;
28.555 + }
28.556 +
28.557 + if (transfer->control_sock)
28.558 + {
28.559 + g_object_unref( transfer->control_sock );
28.560 + transfer->control_sock = NULL;
28.561 + }
28.562 +
28.563 +}
28.564 +
28.565 + void
28.566 +myth_file_transfer_reset_controlsock( MythFileTransfer *transfer )
28.567 +{
28.568 + if (transfer->control_sock == NULL)
28.569 + {
28.570 + g_printerr( "myth_file_transfer_reset_controlsock(): Called with no control socket" );
28.571 + return;
28.572 + }
28.573 +
28.574 + GString *str = gmyth_socket_receive_response( transfer->control_sock );
28.575 +
28.576 + g_string_free( str, TRUE );
28.577 +}
28.578 +
28.579 +void
28.580 +myth_file_transfer_reset_sock( MythFileTransfer *transfer )
28.581 +{
28.582 + if ( transfer->sock == NULL )
28.583 + {
28.584 + g_printerr( "myth_file_transfer_reset_sock(): Called with no raw socket" );
28.585 + return;
28.586 + }
28.587 +
28.588 + GString *str = gmyth_socket_receive_response( transfer->sock );
28.589 +
28.590 + g_string_free( str, TRUE );
28.591 +}
28.592 +
28.593 +void
28.594 +myth_file_transfer_reset( MythFileTransfer *transfer )
28.595 +{
28.596 + myth_file_transfer_reset_controlsock( transfer );
28.597 + myth_file_transfer_reset_sock( transfer );
28.598 +}
28.599 +
28.600 +guint64
28.601 +myth_file_transfer_seek(MythFileTransfer *transfer, guint64 pos, gint whence)
28.602 +{
28.603 + if (transfer->sock == NULL)
28.604 + {
28.605 + g_printerr( "[%s] myth_file_transfer_seek(): Called with no socket", __FUNCTION__ );
28.606 + return 0;
28.607 + }
28.608 +
28.609 + if (transfer->control_sock == NULL)
28.610 + return 0;
28.611 +
28.612 + // if (!controlSock->isOpen() || controlSock->error())
28.613 + // return 0;
28.614 +
28.615 + GMythStringList *strlist = gmyth_string_list_new();
28.616 + g_string_printf (transfer->query, "%s %d", MYTHTV_QUERY_HEADER, transfer->recordernum);
28.617 + gmyth_string_list_append_string( strlist, transfer->query );
28.618 + gmyth_string_list_append_char_array( strlist, "SEEK" );
28.619 + gmyth_string_list_append_uint64( strlist, pos );
28.620 + // gmyth_string_list_append_int( strlist, whence );
28.621 +
28.622 + if (pos > 0 )
28.623 + gmyth_string_list_append_uint64( strlist, pos );
28.624 + else
28.625 + gmyth_string_list_append_uint64( strlist, transfer->readposition );
28.626 +
28.627 + gmyth_socket_sendreceive_stringlist( transfer->control_sock, strlist );
28.628 +
28.629 + guint64 retval = gmyth_string_list_get_uint64(strlist, 0);
28.630 + transfer->readposition = retval;
28.631 + g_print( "[%s] got reading position pointer from the streaming = %llu\n",
28.632 + __FUNCTION__, retval );
28.633 +
28.634 + //myth_file_transfer_reset( transfer );
28.635 +
28.636 + return retval;
28.637 +}
28.638 +
28.639 +static gboolean
28.640 +myth_control_sock_listener( GIOChannel *source, GIOCondition condition, gpointer data )
28.641 +{
28.642 +
28.643 + GIOStatus ret;
28.644 + GError *err = NULL;
28.645 + gchar *msg = g_strdup("");
28.646 +
28.647 + gsize len;
28.648 + if (condition & G_IO_HUP)
28.649 + g_error ("Read end of pipe died!\n");
28.650 + ret = g_io_channel_read_line ( source, &msg, &len, NULL, &err);
28.651 + if ( ret == G_IO_STATUS_ERROR )
28.652 + g_error ("[%s] Error reading: %s\n", __FUNCTION__, err != NULL ? err->message : "" );
28.653 + g_print ("\n\n\n\n\n\n[%s]\t\tEVENT: Read %u bytes: %s\n\n\n\n\n", __FUNCTION__, len, msg != NULL ? msg : "" );
28.654 + if ( msg != NULL )
28.655 + g_free (msg);
28.656 +
28.657 + return TRUE;
28.658 +
28.659 +}
28.660 +
28.661 +static void*
28.662 +myth_init_io_watchers( void *data )
28.663 +{
28.664 + MythFileTransfer *transfer = (MythFileTransfer*)data;
28.665 + GMainContext *context = g_main_context_new();
28.666 + GMainLoop *loop = g_main_loop_new( NULL, FALSE );
28.667 +
28.668 + GSource *source = NULL;
28.669 +
28.670 + if ( transfer->event_sock->sd_io_ch != NULL )
28.671 + source = g_io_create_watch( transfer->event_sock->sd_io_ch, G_IO_IN | G_IO_HUP );
28.672 +
28.673 + g_source_set_callback ( source, (GSourceFunc)myth_control_sock_listener, NULL, NULL );
28.674 +
28.675 + g_source_attach( source, context );
28.676 +
28.677 + if (source==NULL)
28.678 + g_printerr( "[%s] Error adding watch listener function to the IO control channel!\n", __FUNCTION__ );
28.679 +
28.680 + g_main_loop_run( loop );
28.681 +
28.682 + g_source_unref( source );
28.683 +
28.684 + g_main_loop_unref( loop );
28.685 +
28.686 + g_main_context_unref( context );
28.687 +
28.688 + return NULL;
28.689 +}
28.690 +
28.691 + gint
28.692 +myth_file_transfer_read(MythFileTransfer *transfer, void *data, gint size, gboolean read_unlimited)
28.693 +{
28.694 + gint recv = 0;
28.695 + gsize bytes_read = 0;
28.696 +
28.697 + gint sent = 0;
28.698 + //guint zerocnt = 0;
28.699 + gboolean response = FALSE;
28.700 +
28.701 + GIOChannel *io_channel;
28.702 + GIOChannel *io_channel_control;
28.703 +
28.704 + GIOCondition io_cond;
28.705 + GIOCondition io_cond_control;
28.706 + GIOStatus io_status = G_IO_STATUS_NORMAL, io_status_control = G_IO_STATUS_NORMAL;
28.707 +
28.708 + gint buf_len = MYTHTV_BUFFER_SIZE;
28.709 +
28.710 + GMythStringList *strlist = NULL;
28.711 + GError *error = NULL;
28.712 +
28.713 + gchar *trash = g_strdup("");
28.714 +
28.715 + g_return_val_if_fail ( data != NULL, -2 );
28.716 +
28.717 + /* gets the size of the entire file, if the size requested is lesser than 0 */
28.718 + if ( size <= 0 )
28.719 + size = transfer->filesize;
28.720 +
28.721 + io_channel = transfer->sock->sd_io_ch;
28.722 + io_channel_control = transfer->control_sock->sd_io_ch;
28.723 +
28.724 + //g_io_channel_set_flags( io_channel, G_IO_FLAG_APPEND |
28.725 + // G_IO_STATUS_AGAIN | G_IO_FLAG_IS_READABLE | G_IO_FLAG_IS_WRITEABLE |
28.726 + // G_IO_FLAG_IS_SEEKABLE, NULL );
28.727 +
28.728 + io_status = g_io_channel_set_encoding( io_channel, NULL, &error );
28.729 + if ( io_status == G_IO_STATUS_NORMAL )
28.730 + g_print( "[%s] Setting encoding to binary data socket).\n", __FUNCTION__ );
28.731 +
28.732 + io_cond = g_io_channel_get_buffer_condition( io_channel );
28.733 +
28.734 + io_cond_control = g_io_channel_get_buffer_condition( io_channel );
28.735 +
28.736 + if ( transfer->sock == NULL || ( io_status == G_IO_STATUS_ERROR ) )
28.737 + {
28.738 + g_printerr( "myth_file_transfer_read(): Called with no raw socket.\n" );
28.739 + recv = -1;
28.740 + goto cleanup;
28.741 + }
28.742 +
28.743 + if ( transfer->control_sock == NULL || ( io_status_control == G_IO_STATUS_ERROR ) )
28.744 + {
28.745 + g_printerr( "myth_file_transfer_read(): Called with no control socket.\n" );
28.746 + recv = -1;
28.747 + goto cleanup;
28.748 + }
28.749 +
28.750 + /*
28.751 + if (!controlSock->isOpen() || controlSock->error())
28.752 + return -1;
28.753 + */
28.754 +
28.755 + if ( ( io_cond & G_IO_IN ) != 0 ) {
28.756 + do
28.757 + {
28.758 +
28.759 + io_status = g_io_channel_read_line( io_channel, &trash, &bytes_read, NULL, &error);
28.760 +
28.761 + g_print( "[%s] cleaning buffer on IO binary channel... (%s)\n", __FUNCTION__, trash );
28.762 + io_cond = g_io_channel_get_buffer_condition( io_channel );
28.763 +
28.764 + } while ( ( io_cond & G_IO_IN ) != 0 && ( io_status != G_IO_STATUS_ERROR ) );
28.765 +
28.766 + if ( trash!= NULL )
28.767 + g_free( trash );
28.768 + }
28.769 +
28.770 + if ( ( io_cond_control & G_IO_IN ) != 0 ) {
28.771 + GMythStringList *strlist_tmp = gmyth_string_list_new();
28.772 + gmyth_socket_read_stringlist( transfer->control_sock, strlist_tmp );
28.773 + g_object_unref( strlist_tmp );
28.774 + }
28.775 +
28.776 + wait_to_transfer = 0;
28.777 +
28.778 + while ( transfer->live_tv && ( myth_file_transfer_get_file_position( transfer ) < 4096 ) &&
28.779 + wait_to_transfer++ < MYTHTV_TRANSFER_MAX_WAITS )
28.780 + g_usleep( 1000*50 ); /* waits just for 2/10 second */
28.781 +
28.782 + //g_thread_create( myth_init_io_watchers, (void*)transfer, FALSE, NULL );
28.783 + //g_printerr( "[%s] Watch listener function to the IO control channel on thread %p.\n", __FUNCTION__, g_thread_self() );
28.784 +
28.785 + g_static_mutex_lock (&mutex);
28.786 + strlist = gmyth_string_list_new();
28.787 +
28.788 + g_string_printf ( transfer->query, "%s %d", /*transfer->live_tv ? MYTHTV_RECORDER_HEADER :*/ MYTHTV_QUERY_HEADER,
28.789 + /* transfer->live_tv ? transfer->card_id :*/ transfer->recordernum ); // transfer->recordernum
28.790 + g_print( "\t[%s] Transfer_query = %s\n", __FUNCTION__, transfer->query->str );
28.791 + strlist = gmyth_string_list_new();
28.792 +
28.793 + gmyth_string_list_append_string( strlist, transfer->query );
28.794 + gmyth_string_list_append_char_array( strlist, /*transfer->live_tv ? "REQUEST_BLOCK_RINGBUF" :*/ "REQUEST_BLOCK" );
28.795 + gmyth_string_list_append_int( strlist, size );
28.796 +
28.797 + gmyth_socket_write_stringlist( transfer->control_sock, strlist );
28.798 + sent = size;
28.799 +
28.800 + //data = (void*)g_new0( gchar, size );
28.801 +
28.802 + g_io_channel_flush( io_channel_control, NULL );
28.803 +// g_io_channel_flush( io_channel, NULL );
28.804 +
28.805 + io_cond = g_io_channel_get_buffer_condition( io_channel );
28.806 +
28.807 + while ( ( recv < sent ) )//&& ( io_cond & G_IO_IN ) != 0 )
28.808 + {
28.809 + do
28.810 + {
28.811 + //while ( ( io_cond & G_IO_IN ) == 0 ) {
28.812 + //usleep(200);
28.813 + //
28.814 + //io_cond = g_io_channel_get_buffer_condition( io_channel );
28.815 + //
28.816 +
28.817 + buf_len = ( sent - recv ) > MYTHTV_BUFFER_SIZE ? MYTHTV_BUFFER_SIZE : ( sent - recv );
28.818 +
28.819 + io_status = g_io_channel_read_chars( io_channel, data + recv,
28.820 + buf_len, &bytes_read, &error );
28.821 + /*
28.822 + GString *sss = g_string_new("");
28.823 + sss = g_string_append_len( sss, (gchar*)data+recv, bytes_read );
28.824 +
28.825 + g_print( "[%s] Reading buffer (length = %d)\n", __FUNCTION__, bytes_read);
28.826 + */
28.827 + if ( bytes_read > 0 )
28.828 + {
28.829 + if ( bytes_read <= buf_len )
28.830 + recv += bytes_read;
28.831 + }
28.832 +
28.833 + if ( io_status == G_IO_STATUS_EOF ) {
28.834 + g_printerr( "[%s] got EOS!", __FUNCTION__ );
28.835 + break;
28.836 + } else if ( io_status == G_IO_STATUS_ERROR ) {
28.837 + g_printerr( "[%s] myth_file_transfer_read(): socket error.\n", __FUNCTION__ );
28.838 + break;
28.839 + }
28.840 +
28.841 + /* increase buffer size, to allow get more data (do not obey to the buffer size) */
28.842 + if ( read_unlimited == TRUE ) {
28.843 + //if ( recv > buf_len )
28.844 + // sent += (bytes_read - buf_len) + 1;
28.845 + }
28.846 + if ( bytes_read == buf_len )
28.847 + break;
28.848 +
28.849 + /* verify if the input (read) buffer is ready to receive data */
28.850 + io_cond = g_io_channel_get_buffer_condition( io_channel );
28.851 +
28.852 + g_print( "[%s]\t io_cond %s prepared for reading! (G_IO_IN) !!!\n\n", __FUNCTION__,
28.853 + ( ( io_cond & G_IO_IN ) != 0 ) ? "IS" : "IS NOT" );
28.854 +
28.855 + } while ( recv < sent && ( ( io_cond & G_IO_IN ) != 0 ) && ( io_status == G_IO_STATUS_NORMAL ) );
28.856 +
28.857 + io_cond_control = g_io_channel_get_buffer_condition( io_channel_control );
28.858 + if ( ( io_status == G_IO_STATUS_EOF ) || ( ( io_cond_control & G_IO_IN ) != 0 ) )
28.859 + {
28.860 + gmyth_socket_read_stringlist( transfer->control_sock, strlist );
28.861 + sent = gmyth_string_list_get_int( strlist, 0 ); // -1 on backend error
28.862 + g_print( "[%s]\t sent = %d, io_cond %s prepared for reading! (G_IO_IN) !!!\n\n", __FUNCTION__,
28.863 + sent, ( ( io_cond & G_IO_IN ) != 0 ) ? "IS" : "IS NOT" );
28.864 + response = TRUE;
28.865 + }
28.866 + }
28.867 +
28.868 + if ( ( ( error == NULL ) && ( response == FALSE ) ) ||
28.869 + ( io_status == G_IO_STATUS_EOF ) || ( ( io_cond & G_IO_IN ) == 0 ) )
28.870 + {
28.871 + if ( gmyth_socket_read_stringlist( transfer->control_sock, strlist ) > 0 )
28.872 + {
28.873 + if ( strlist != NULL && gmyth_string_list_length(strlist) > 0 ) {
28.874 + sent = gmyth_string_list_get_int( strlist, 0 ); // -1 on backend error
28.875 + g_print( "[%s]\t sent = %d, io_cond %s prepared for reading! (G_IO_IN) !!!\n\n", __FUNCTION__,
28.876 + sent, ( ( io_cond & G_IO_IN ) != 0 ) ? "IS" : "IS NOT" );
28.877 + }
28.878 + }
28.879 + else
28.880 + {
28.881 + g_printerr ( "myth_file_transfer_read(): No response from control socket.");
28.882 + sent = -1;
28.883 + }
28.884 +
28.885 + if ( error!=NULL ) {
28.886 + g_printerr( "[%s] Error occurred: (%d, %s)\n", __FUNCTION__, error->code, error->message );
28.887 + g_error_free( error );
28.888 + }
28.889 + }
28.890 +
28.891 +cleanup:
28.892 +
28.893 + if ( trash != NULL )
28.894 + g_free( trash );
28.895 +
28.896 + if ( strlist != NULL )
28.897 + g_object_unref( strlist );
28.898 +
28.899 + g_static_mutex_unlock (&mutex);
28.900 + g_print( "myth_file_transfer_read(): reqd=%d, rcvd=%d, rept=%d, "\
28.901 + "(rcvd and rept MUST be the same!)\n", size,
28.902 + recv, sent );
28.903 +
28.904 + //if ( sent != recv ) {
28.905 + // recv = -1;
28.906 + //}
28.907 +
28.908 + if ( error != NULL )
28.909 + g_printerr( "ERROR: %s [msg = %s, code = %d]\n", __FUNCTION__, error->message,
28.910 + error->code );
28.911 +
28.912 + return recv;
28.913 +}
28.914 +
28.915 + void
28.916 +myth_file_transfer_settimeout( MythFileTransfer *transfer, gboolean fast )
28.917 +{
28.918 +
28.919 + GMythStringList *strlist = NULL;
28.920 +
28.921 + if ( transfer->timeoutisfast == fast )
28.922 + return;
28.923 +
28.924 + if ( transfer->sock == NULL )
28.925 + {
28.926 + g_printerr( "myth_file_transfer_settimeout(): Called with no socket" );
28.927 + return;
28.928 + }
28.929 +
28.930 + if ( transfer->control_sock == NULL )
28.931 + return;
28.932 +
28.933 + strlist = gmyth_string_list_new();
28.934 + gmyth_string_list_append_string( strlist, transfer->query );
28.935 + gmyth_string_list_append_char_array( strlist, "SET_TIMEOUT" );
28.936 + gmyth_string_list_append_int( strlist, fast );
28.937 +
28.938 + gmyth_socket_write_stringlist( transfer->control_sock, strlist );
28.939 + gmyth_socket_read_stringlist( transfer->control_sock, strlist );
28.940 +
28.941 + transfer->timeoutisfast = fast;
28.942 +
28.943 +}
28.944 +
28.945 +#ifdef DO_TESTING
28.946 +
28.947 + int
28.948 +main( int argc, char *argv[] )
28.949 +{
28.950 + g_type_init();
28.951 +
28.952 + MythFileTransfer *file_transfer = myth_file_transfer_new( 1,
28.953 + g_string_new("myth://192.168.1.109:6543/jshks.nuv"), -1, MYTHTV_VERSION );
28.954 + myth_file_transfer_setup( &file_transfer );
28.955 + gchar *data = g_strdup("");
28.956 +
28.957 + gint num = myth_file_transfer_read( file_transfer, data, -1 );
28.958 +
28.959 + return 0;
28.960 +
28.961 +}
28.962 +
28.963 +#endif
29.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
29.2 +++ b/mythtv_plugin/myth_file_transfer.h Wed Sep 20 23:59:48 2006 +0100
29.3 @@ -0,0 +1,93 @@
29.4 +/* vim: set sw=2: -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2; c-indent-level: 2-*- */
29.5 +
29.6 +#ifndef __MYTH_FILE_TRANSFER_H__
29.7 +#define __MYTH_FILE_TRANSFER_H__
29.8 +
29.9 +#include <glib-object.h>
29.10 +
29.11 +#include <gmyth/gmyth_socket.h>
29.12 +#include "myth_uri.h"
29.13 +#include "myth_livetv.h"
29.14 +
29.15 +#include <stdio.h>
29.16 +#include <stdlib.h>
29.17 +#include <string.h>
29.18 +#include <netdb.h>
29.19 +#include <sys/socket.h>
29.20 +#include <unistd.h>
29.21 +
29.22 +#define G_BEGIN_DECLS
29.23 +
29.24 +#define MYTH_FILE_TRANSFER_TYPE (myth_file_transfer_get_type ())
29.25 +#define MYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MYTH_FILE_TRANSFER_TYPE, MythFileTransfer))
29.26 +#define MYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MYTH_FILE_TRANSFER_TYPE, MythFileTransferClass))
29.27 +#define IS_MYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MYTH_FILE_TRANSFER_TYPE))
29.28 +#define IS_MYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MYTH_FILE_TRANSFER_TYPE))
29.29 +#define MYTH_FILE_TRANSFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MYTH_FILE_TRANSFER_TYPE, MythFileTransferClass))
29.30 +
29.31 +
29.32 +typedef struct _MythFileTransfer MythFileTransfer;
29.33 +typedef struct _MythFileTransferClass MythFileTransferClass;
29.34 +
29.35 +struct _MythFileTransferClass
29.36 +{
29.37 + GObjectClass parent_class;
29.38 +
29.39 + /* callbacks */
29.40 + /* no one for now */
29.41 +};
29.42 +
29.43 +struct _MythFileTransfer
29.44 +{
29.45 + GObject parent;
29.46 +
29.47 + /* Myth URI structure */
29.48 + const MythURI *uri;
29.49 +
29.50 + /* MythTV version number */
29.51 + gint mythtv_version;
29.52 +
29.53 + /* socket descriptors */
29.54 + GMythSocket *control_sock;
29.55 + GMythSocket *event_sock;
29.56 + GMythSocket *sock;
29.57 +
29.58 + guint64 readposition;
29.59 + guint64 filesize;
29.60 + gboolean timeoutisfast;
29.61 + gboolean userreadahead;
29.62 + gboolean live_tv;
29.63 + gint retries;
29.64 +
29.65 + GString *query;
29.66 +
29.67 + gint rec_id;
29.68 + gint recordernum;
29.69 + gint card_id;
29.70 + GString *hostname;
29.71 + gint port;
29.72 +};
29.73 +
29.74 +GType myth_file_transfer_get_type (void);
29.75 +
29.76 +MythFileTransfer* myth_file_transfer_new (gint num, GString *hostname, gshort port, gint mythtv_version );
29.77 +
29.78 +gint myth_file_transfer_read(MythFileTransfer *transfer, void *data, gint size, gboolean read_unlimited);
29.79 +
29.80 +guint64 myth_file_transfer_seek(MythFileTransfer *transfer, guint64 pos, gint whence);
29.81 +
29.82 +gboolean myth_file_transfer_playback_setup( MythFileTransfer **transfer, gboolean live_tv );
29.83 +
29.84 +gboolean myth_file_transfer_setup( MythFileTransfer **transfer, gboolean live_tv );
29.85 +
29.86 +gboolean myth_file_transfer_livetv_setup( MythFileTransfer **transfer, GMythSocket *live_sock );
29.87 +
29.88 +void myth_file_transfer_spawntv ( MythFileTransfer *file_transfer, GString *tvchain_id );
29.89 +
29.90 +gboolean myth_file_transfer_is_recording( MythFileTransfer *file_transfer );
29.91 +
29.92 +guint64 myth_file_transfer_get_file_position( MythFileTransfer *file_transfer );
29.93 +
29.94 +#define G_END_DECLS
29.95 +
29.96 +#endif /* __MYTH_FILE_TRANSFER_H__ */
30.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
30.2 +++ b/mythtv_plugin/myth_livetv.c Wed Sep 20 23:59:48 2006 +0100
30.3 @@ -0,0 +1,220 @@
30.4 +
30.5 +#include <gmyth/gmyth_context.h>
30.6 +#include <gmyth/gmyth_remote_util.h>
30.7 +#include <gmyth/gmyth_tvchain.h>
30.8 +
30.9 +#include "myth_livetv.h"
30.10 +#include "myth_file_transfer.h"
30.11 +
30.12 +static void myth_livetv_class_init (MythLiveTVClass *klass);
30.13 +static void myth_livetv_init (MythLiveTV *object);
30.14 +
30.15 +static void myth_livetv_dispose (GObject *object);
30.16 +static void myth_livetv_finalize (GObject *object);
30.17 +
30.18 +G_DEFINE_TYPE(MythLiveTV, myth_livetv, G_TYPE_OBJECT)
30.19 +
30.20 +static void
30.21 +myth_livetv_class_init (MythLiveTVClass *klass)
30.22 +{
30.23 + GObjectClass *gobject_class;
30.24 +
30.25 + gobject_class = (GObjectClass *) klass;
30.26 +
30.27 + gobject_class->dispose = myth_livetv_dispose;
30.28 + gobject_class->finalize = myth_livetv_finalize;
30.29 +}
30.30 +
30.31 +static void
30.32 +myth_livetv_init (MythLiveTV *livetv)
30.33 +{
30.34 + livetv->backend_hostname = NULL;
30.35 + livetv->backend_port = 0;
30.36 + livetv->local_hostname = NULL;
30.37 +
30.38 + livetv->remote_encoder = NULL;
30.39 + livetv->tvchain = NULL;
30.40 + livetv->proginfo = NULL;
30.41 +}
30.42 +
30.43 +static void
30.44 +myth_livetv_dispose (GObject *object)
30.45 +{
30.46 +
30.47 + G_OBJECT_CLASS (myth_livetv_parent_class)->dispose (object);
30.48 +}
30.49 +
30.50 +static void
30.51 +myth_livetv_finalize (GObject *object)
30.52 +{
30.53 + g_signal_handlers_destroy (object);
30.54 +
30.55 + MythLiveTV *livetv = MYTH_LIVETV (object);
30.56 +
30.57 + g_debug ("[%s] Finalizing livetv", __FUNCTION__);
30.58 +
30.59 + if ( livetv->remote_encoder != NULL ) {
30.60 + g_object_unref (livetv->remote_encoder);
30.61 + livetv->remote_encoder = NULL;
30.62 + }
30.63 +
30.64 + if ( livetv->tvchain != NULL ) {
30.65 + g_object_unref (livetv->tvchain);
30.66 + livetv->tvchain = NULL;
30.67 + }
30.68 +
30.69 + if ( livetv->proginfo != NULL ) {
30.70 + g_object_unref (livetv->proginfo);
30.71 + livetv->proginfo = NULL;
30.72 + }
30.73 +
30.74 + G_OBJECT_CLASS ( myth_livetv_parent_class )->finalize ( object );
30.75 +}
30.76 +
30.77 +MythLiveTV*
30.78 +myth_livetv_new ()
30.79 +{
30.80 + MythLiveTV *livetv = MYTH_LIVETV ( g_object_new( MYTH_LIVETV_TYPE, NULL ) );
30.81 +
30.82 + return livetv;
30.83 +}
30.84 +
30.85 +gboolean
30.86 +myth_livetv_setup ( MythLiveTV *livetv )
30.87 +{
30.88 +
30.89 + // FIXME: Get from the settings
30.90 + GMythSettings *msettings = gmyth_context_get_settings ();
30.91 + gboolean res = TRUE;
30.92 +
30.93 + livetv->is_livetv = TRUE;
30.94 +
30.95 + res = gmyth_context_check_connection();
30.96 + if (!res) {
30.97 + g_warning ("[%s] LiveTV can not connect to backend", __FUNCTION__);
30.98 + res = FALSE;
30.99 + goto error;
30.100 + }
30.101 +
30.102 + livetv->backend_hostname = gmyth_settings_get_backend_hostname(msettings);
30.103 + livetv->backend_port = gmyth_settings_get_backend_port (msettings);
30.104 +
30.105 + livetv->local_hostname = g_string_new("");
30.106 + gmyth_context_get_local_hostname (livetv->local_hostname);
30.107 +
30.108 + if ( livetv->local_hostname == NULL ) {
30.109 + res = FALSE;
30.110 + goto error;
30.111 + }
30.112 +
30.113 + // Gets the remote encoder num
30.114 + livetv->remote_encoder = remote_request_next_free_recorder (-1);
30.115 +
30.116 + if ( livetv->remote_encoder == NULL ) {
30.117 + g_warning ("[%s] None remote encoder available", __FUNCTION__);
30.118 + res = FALSE;
30.119 + goto error;
30.120 + }
30.121 +
30.122 + // Creates livetv chain handler
30.123 + livetv->tvchain = GMYTH_TVCHAIN ( g_object_new(GMYTH_TVCHAIN_TYPE, NULL) );
30.124 + gmyth_tvchain_initialize ( livetv->tvchain, livetv->local_hostname );
30.125 +
30.126 + if ( livetv->tvchain == NULL || livetv->tvchain->tvchain_id == NULL ) {
30.127 + res = FALSE;
30.128 + goto error;
30.129 + }
30.130 +
30.131 + // Init remote encoder. Opens its control socket.
30.132 + res = gmyth_remote_encoder_setup(livetv->remote_encoder);
30.133 + if ( !res ) {
30.134 + g_warning ("[%s] Fail while setting remote encoder\n", __FUNCTION__);
30.135 + res = FALSE;
30.136 + goto error;
30.137 + }
30.138 + // Spawn live tv. Uses the socket to send mythprotocol data to start livetv in the backend (remotelly)
30.139 + res = gmyth_remote_encoder_spawntv ( livetv->remote_encoder,
30.140 + gmyth_tvchain_get_id(livetv->tvchain) );
30.141 + if (!res) {
30.142 + g_warning ("[%s] Fail while spawn tv\n", __FUNCTION__);
30.143 + res = FALSE;
30.144 + goto error;
30.145 + }
30.146 +
30.147 + // Reload all TV chain from Mysql database.
30.148 + gmyth_tvchain_reload_all (livetv->tvchain);
30.149 +
30.150 + if ( livetv->tvchain == NULL ) {
30.151 + res = FALSE;
30.152 + goto error;
30.153 + }
30.154 +
30.155 + // Get program info from database using chanid and starttime
30.156 + livetv->proginfo = gmyth_tvchain_get_program_at (livetv->tvchain, -1);
30.157 + if ( livetv->proginfo == NULL ) {
30.158 + g_warning ("[%s] LiveTV not successfully started.\n", __FUNCTION__ );
30.159 + res = FALSE;
30.160 + goto error;
30.161 + } else {
30.162 + g_debug ("[%s] MythLiveTV: All requests to backend to start TV were OK.\n", __FUNCTION__ );
30.163 + }
30.164 +
30.165 + return res;
30.166 +
30.167 +error:
30.168 + if ( livetv->backend_hostname != NULL ) {
30.169 + g_string_free( livetv->backend_hostname, TRUE );
30.170 + res = FALSE;
30.171 + }
30.172 +
30.173 + if ( livetv->local_hostname != NULL ) {
30.174 + g_string_free( livetv->local_hostname, TRUE );
30.175 + res = FALSE;
30.176 + }
30.177 +
30.178 + if ( livetv->remote_encoder != NULL ) {
30.179 + g_object_unref (livetv->remote_encoder);
30.180 + livetv->remote_encoder = NULL;
30.181 + }
30.182 +
30.183 + if ( livetv->tvchain != NULL ) {
30.184 + g_object_unref (livetv->tvchain);
30.185 + livetv->tvchain = NULL;
30.186 + }
30.187 +
30.188 + if ( livetv->proginfo != NULL ) {
30.189 + g_object_unref (livetv->proginfo);
30.190 + livetv->proginfo = NULL;
30.191 + }
30.192 +
30.193 + return res;
30.194 +
30.195 +}
30.196 +
30.197 +// FIXME: How to proceed differently between livetv and recorded content
30.198 +void
30.199 +myth_livetv_stop_playing (MythLiveTV *livetv)
30.200 +{
30.201 + g_debug ("[%s] Stopping the LiveTV...\n", __FUNCTION__);
30.202 +
30.203 + if (livetv->is_livetv) {
30.204 + if (!gmyth_remote_encoder_stop_livetv (livetv->remote_encoder)) {
30.205 + g_warning ("[%s] Error while stoping remote encoder", __FUNCTION__);
30.206 + }
30.207 + }
30.208 +}
30.209 +
30.210 +gboolean
30.211 +myth_livetv_is_playing (MythLiveTV *livetv)
30.212 +{
30.213 + return TRUE;
30.214 +}
30.215 +
30.216 +void
30.217 +myth_livetv_start_playing (MythLiveTV *livetv)
30.218 +{
30.219 +
30.220 + // TODO
30.221 +
30.222 +}
30.223 +
31.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
31.2 +++ b/mythtv_plugin/myth_livetv.h Wed Sep 20 23:59:48 2006 +0100
31.3 @@ -0,0 +1,59 @@
31.4 +#ifndef MYTH_LIVETV_H_
31.5 +#define MYTH_LIVETV_H_
31.6 +
31.7 +#include <glib-object.h>
31.8 +
31.9 +#include <gmyth/gmyth_remote_encoder.h>
31.10 +#include <gmyth/gmyth_tvchain.h>
31.11 +#include <gmyth/gmyth_common.h>
31.12 +
31.13 +#include "myth_file_transfer.h"
31.14 +
31.15 +#define G_BEGIN_DECLS
31.16 +
31.17 +#define MYTH_LIVETV_TYPE (myth_livetv_get_type ())
31.18 +#define MYTH_LIVETV(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MYTH_LIVETV_TYPE, MythLiveTV))
31.19 +#define MYTH_LIVETV_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MYTH_LIVETV_TYPE, MythLiveTVClass))
31.20 +#define IS_MYTH_LIVETV(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MYTH_LIVETV_TYPE))
31.21 +#define IS_MYTH_LIVETV_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MYTH_LIVETV_TYPE))
31.22 +#define MYTH_LIVETV_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MYTH_LIVETV_TYPE, MythLiveTVClass))
31.23 +
31.24 +typedef struct _MythLiveTV MythLiveTV;
31.25 +typedef struct _MythLiveTVClass MythLiveTVClass;
31.26 +
31.27 +struct _MythLiveTVClass
31.28 +{
31.29 + GObjectClass parent_class;
31.30 +
31.31 + /* callbacks */
31.32 +};
31.33 +
31.34 +struct _MythLiveTV
31.35 +{
31.36 + GObject parent;
31.37 +
31.38 + // Backend connection related variables
31.39 + GString *backend_hostname;
31.40 + gint backend_port;
31.41 + GString *local_hostname;
31.42 +
31.43 + GMythRemoteEncoder *remote_encoder;
31.44 + GMythTVChain *tvchain;
31.45 + GMythProgramInfo *proginfo;
31.46 +
31.47 + gboolean is_livetv;
31.48 +
31.49 +};
31.50 +
31.51 +GType myth_livetv_get_type (void);
31.52 +
31.53 +MythLiveTV* myth_livetv_new ();
31.54 +
31.55 +void myth_livetv_start_playing (MythLiveTV *livetv);
31.56 +void myth_livetv_stop_playing (MythLiveTV *livetv);
31.57 +
31.58 +gboolean myth_livetv_setup (MythLiveTV *livetv);
31.59 +
31.60 +#define G_END_DECLS
31.61 +
31.62 +#endif /*MYTH_LIVETV_H_*/
32.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
32.2 +++ b/mythtv_plugin/myth_uri.c Wed Sep 20 23:59:48 2006 +0100
32.3 @@ -0,0 +1,208 @@
32.4 +/**
32.5 + *
32.6 + * MythURI utils
32.7 + * - Extracts and parses a URI char string, in according with the RFC 2396
32.8 + * [http://www.ietf.org/rfc/rfc2396.txt]
32.9 + *
32.10 + * @author Rosfran Borges (rosfran.borges@indt.org.br)
32.11 + *
32.12 + */
32.13 +
32.14 +#include "myth_uri.h"
32.15 +#include <glib.h>
32.16 +#include <string.h>
32.17 +#include <stdlib.h>
32.18 +
32.19 +static gint
32.20 +myth_strstr( const gchar *haystack, const gchar *needle )
32.21 +{
32.22 +
32.23 + gchar *strPos;
32.24 +
32.25 + if (haystack == NULL || needle == NULL)
32.26 + return -1;
32.27 + strPos = strstr(haystack, needle);
32.28 + if (strPos == NULL)
32.29 + return -1;
32.30 +
32.31 + return (strPos - haystack);
32.32 +
32.33 +}
32.34 +
32.35 +static gboolean
32.36 +myth_uri_isabsolute( const MythURI *uri )
32.37 +{
32.38 + gboolean ret = FALSE;
32.39 +
32.40 + g_return_val_if_fail( uri != NULL && uri->uri != NULL && uri->protocol != NULL, FALSE );
32.41 +
32.42 + if ( myth_strstr( uri->uri->str, MYTH_URI_PROTOCOL_DELIM ) == 0 || strlen(uri->protocol->str) > 0 )
32.43 + ret = TRUE;
32.44 +
32.45 + return ret;
32.46 +}
32.47 +
32.48 +static gint
32.49 +myth_strrchr( const gchar *str, const gchar *chars, const gint nchars )
32.50 +{
32.51 +
32.52 + gint strLen;
32.53 + gint i, j;
32.54 +
32.55 + if ( str == NULL || chars == NULL )
32.56 + return -1;
32.57 +
32.58 + strLen = strlen( str );
32.59 + for ( i= (strLen-1); 0 <= i; i-- ) {
32.60 + for ( j=0; j<nchars; j++ ) {
32.61 + if ( str[i] == chars[j] )
32.62 + return i;
32.63 + }
32.64 + }
32.65 +
32.66 + return -1;
32.67 +
32.68 +}
32.69 +
32.70 +static MythURI *
32.71 +myth_uri_init( )
32.72 +{
32.73 + MythURI *uri = g_new0( MythURI, 1 );
32.74 + uri->host = g_string_new("");
32.75 + uri->fragment = g_string_new("");
32.76 + uri->password = g_string_new("");
32.77 + uri->path = g_string_new("");
32.78 + uri->protocol = g_string_new("");
32.79 + uri->query = g_string_new("");
32.80 + uri->uri = g_string_new("");
32.81 + uri->user = g_string_new("");
32.82 + return uri;
32.83 +}
32.84 +
32.85 +const MythURI *
32.86 +myth_uri_new( gchar *value )
32.87 +{
32.88 +
32.89 + MythURI *uri = myth_uri_init();
32.90 +
32.91 + gchar *protocol;
32.92 + gint uriLen;
32.93 + gint currIdx;
32.94 + gint protoIdx;
32.95 + gint atIdx;
32.96 + gint colonIdx;
32.97 + gint shashIdx;
32.98 + gchar *host;
32.99 + gint eblacketIdx;
32.100 + GString *hostStr;
32.101 + GString *portStr;
32.102 + gint hostLen;
32.103 + gint sharpIdx;
32.104 + gint questionIdx;
32.105 + gint queryLen;
32.106 +
32.107 + uriLen = strlen(value);
32.108 + uri->uri = g_string_new( value );
32.109 +
32.110 + currIdx = 0;
32.111 +
32.112 + /*** Protocol ****/
32.113 + protoIdx = myth_strstr( value, MYTH_URI_PROTOCOL_DELIM );
32.114 + if (0 < protoIdx) {
32.115 + uri->protocol = g_string_append_len( uri->protocol, value, protoIdx );
32.116 + currIdx += protoIdx + strlen( MYTH_URI_PROTOCOL_DELIM );
32.117 + }
32.118 +
32.119 + /*** User (Password) ****/
32.120 + atIdx = myth_strstr( value+currIdx, MYTH_URI_USER_DELIM );
32.121 + if ( 0 < atIdx ) {
32.122 + colonIdx = myth_strstr( value+currIdx, MYTH_URI_COLON_DELIM );
32.123 +
32.124 + if (0 < colonIdx && colonIdx < atIdx) {
32.125 + uri->user = g_string_append_len( uri->user, value+currIdx, colonIdx );
32.126 + uri->password = g_string_append_len( uri->password, value+currIdx+colonIdx+1, atIdx-(colonIdx+1) );
32.127 + }
32.128 + else
32.129 + uri->user = g_string_append_len( uri->user, value+currIdx, atIdx - currIdx );
32.130 + currIdx += atIdx + 1;
32.131 + }
32.132 +
32.133 + /*** Host (Port) ****/
32.134 + shashIdx = myth_strstr( value+currIdx, MYTH_URI_SLASH_DELIM );
32.135 + if ( 0 < shashIdx )
32.136 + uri->host = g_string_append_len( uri->host, value+currIdx, shashIdx );
32.137 + else if ( myth_uri_isabsolute(uri) == TRUE )
32.138 + uri->host = g_string_append_len( uri->host, value+currIdx, strlen(value) - currIdx );
32.139 + host = g_strdup( myth_uri_gethost(uri) );
32.140 + colonIdx = myth_strrchr( host, MYTH_URI_COLON_DELIM, 1 );
32.141 + eblacketIdx = myth_strrchr( host, MYTH_URI_EBLACET_DELIM, 1 );
32.142 + if ( ( 0 < colonIdx ) && ( eblacketIdx < colonIdx ) ) {
32.143 + hostStr = g_string_new( host );
32.144 +
32.145 + hostLen = hostStr->len;
32.146 + /**** host ****/
32.147 + uri->host = g_string_erase( uri->host, 0, hostLen );
32.148 + uri->host = g_string_insert_len( uri->host, 0, hostStr->str, colonIdx );
32.149 + //host = myth_uri_gethost( uri );
32.150 + if (0 < hostLen) {
32.151 + if (host[0] == '[' && host[hostLen-1] == ']')
32.152 + uri->host = g_string_append_len( uri->host, hostStr->str+1, colonIdx-2 );
32.153 + }
32.154 + /**** port ****/
32.155 + portStr = g_string_new("");
32.156 + portStr = g_string_append_len( portStr, hostStr->str+colonIdx+1, hostLen-colonIdx-1 );
32.157 + uri->port = atoi( portStr->str );
32.158 + g_string_free( portStr, TRUE );
32.159 + g_string_free( hostStr, FALSE );
32.160 + }
32.161 + else {
32.162 + uri->port = MYTH_URI_KNKOWN_PORT;
32.163 + protocol = myth_uri_getprotocol(uri);
32.164 + if ( strcmp(protocol, MYTH_URI_PROTOCOL_HTTP) == 0 )
32.165 + uri->port = MYTH_URI_DEFAULT_HTTP_PORT;
32.166 + if ( strcmp(protocol, MYTH_URI_PROTOCOL_FTP) == 0 )
32.167 + uri->port = MYTH_URI_DEFAULT_FTP_PORT;
32.168 + }
32.169 +
32.170 + if (shashIdx > 0) currIdx += shashIdx;
32.171 +
32.172 + /*
32.173 + Handle relative URL
32.174 + */
32.175 + if (myth_uri_isabsolute(uri) == FALSE)
32.176 + {
32.177 +
32.178 + if (shashIdx != 0)
32.179 + {
32.180 + /* Add slash delimiter at the beginning of the URL,
32.181 + if it doesn't exist
32.182 + */
32.183 + uri->path = g_string_new( MYTH_URI_SLASH_DELIM );
32.184 + }
32.185 + uri->path = g_string_append( uri->path, value );
32.186 +
32.187 + } else {
32.188 + /* First set path simply to the rest of URI */
32.189 + g_string_append_len( uri->path, value+currIdx, uriLen-currIdx );
32.190 + }
32.191 +
32.192 + /**** Path (Query/Fragment) ****/
32.193 + sharpIdx = myth_strstr(value+currIdx, MYTH_URI_SHARP_DELIM);
32.194 + if (0 < sharpIdx) {
32.195 + uri->path = g_string_append_len( uri->path, value+currIdx, sharpIdx);
32.196 + uri->fragment = g_string_append_len( uri->fragment,
32.197 + value+currIdx+sharpIdx+1, uriLen-(currIdx+sharpIdx+1));
32.198 + }
32.199 +
32.200 + questionIdx = myth_strstr( value+currIdx, MYTH_URI_QUESTION_DELIM );
32.201 + if ( 0 < questionIdx ) {
32.202 + uri->path = g_string_append_len( uri->path, value+currIdx, questionIdx );
32.203 + queryLen = uriLen-(currIdx+questionIdx+1);
32.204 + if ( 0 < sharpIdx )
32.205 + queryLen -= uriLen - (currIdx+sharpIdx+1);
32.206 + uri->query = g_string_append_len( uri->query, value+currIdx+questionIdx+1, queryLen );
32.207 + }
32.208 +
32.209 + return uri;
32.210 +
32.211 +}
33.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
33.2 +++ b/mythtv_plugin/myth_uri.h Wed Sep 20 23:59:48 2006 +0100
33.3 @@ -0,0 +1,63 @@
33.4 +/**
33.5 + *
33.6 + * MythURI utils
33.7 + * - Extracts and parses a URI char string, in according with the RFC 2396
33.8 + * [http://www.ietf.org/rfc/rfc2396.txt]
33.9 + *
33.10 + * @author Rosfran Borges (rosfran.borges@indt.org.br)
33.11 + *
33.12 + */
33.13 +
33.14 +#ifndef _MYTH_URI_H_
33.15 +#define _MYTH_URI_H_
33.16 +
33.17 +#include <glib.h>
33.18 +
33.19 +/****************************************
33.20 +* Define
33.21 +****************************************/
33.22 +
33.23 +#define MYTH_URI_KNKOWN_PORT (-1)
33.24 +#define MYTH_URI_DEFAULT_HTTP_PORT 80
33.25 +#define MYTH_URI_DEFAULT_FTP_PORT 21
33.26 +#define MYTH_URI_DEFAULT_PATH "/"
33.27 +#define MYTH_URI_MAXLEN 256
33.28 +
33.29 +#define MYTH_URI_PROTOCOL_DELIM "://"
33.30 +#define MYTH_URI_USER_DELIM "@"
33.31 +#define MYTH_URI_COLON_DELIM ":"
33.32 +#define MYTH_URI_SLASH_DELIM "/"
33.33 +#define MYTH_URI_SBLACET_DELIM "["
33.34 +#define MYTH_URI_EBLACET_DELIM "]"
33.35 +#define MYTH_URI_SHARP_DELIM "#"
33.36 +#define MYTH_URI_QUESTION_DELIM "?"
33.37 +#define MYTH_URI_ESCAPING_CHAR "%"
33.38 +
33.39 +#define MYTH_URI_PROTOCOL_MYTH "myth"
33.40 +#define MYTH_URI_PROTOCOL_HTTP "http"
33.41 +#define MYTH_URI_PROTOCOL_FTP "ftp"
33.42 +
33.43 +/****************************************
33.44 +* Data Type
33.45 +****************************************/
33.46 +
33.47 +typedef struct _MythURI {
33.48 + GString *uri;
33.49 + GString *host;
33.50 + gint port;
33.51 + GString *protocol;
33.52 + GString *path;
33.53 + GString *fragment;
33.54 + GString *user;
33.55 + GString *password;
33.56 + GString *query;
33.57 +} MythURI;
33.58 +
33.59 +const MythURI *myth_uri_new( gchar *value );
33.60 +
33.61 +#define myth_uri_gethost(urip) (urip->host->str)
33.62 +#define myth_uri_getport(urip) (urip->port)
33.63 +#define myth_uri_getprotocol(urip) (urip->protocol->str)
33.64 +#define myth_uri_getpath(urip) (urip->path->str)
33.65 +
33.66 +#endif
34.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
34.2 +++ b/mythtv_plugin/mythtvsrc-test.c Wed Sep 20 23:59:48 2006 +0100
34.3 @@ -0,0 +1,85 @@
34.4 +#include <gst/gst.h>
34.5 +
34.6 +static gboolean
34.7 +bus_call (GstBus *bus,
34.8 + GstMessage *msg,
34.9 + gpointer data)
34.10 +{
34.11 + GMainLoop *loop = data;
34.12 +
34.13 + switch (GST_MESSAGE_TYPE (msg)) {
34.14 + case GST_MESSAGE_EOS:
34.15 + g_print ("End-of-stream\n");
34.16 + g_main_loop_quit (loop);
34.17 + break;
34.18 + case GST_MESSAGE_ERROR: {
34.19 + gchar *debug;
34.20 + GError *err;
34.21 +
34.22 + gst_message_parse_error (msg, &err, &debug);
34.23 + g_free (debug);
34.24 +
34.25 + g_print ("Error: %s\n", err->message);
34.26 + g_error_free (err);
34.27 +
34.28 + g_main_loop_quit (loop);
34.29 + break;
34.30 + }
34.31 + default:
34.32 + break;
34.33 + }
34.34 +
34.35 + return TRUE;
34.36 +}
34.37 +
34.38 +gint
34.39 +main (gint argc,
34.40 + gchar *argv[])
34.41 +{
34.42 + GstElement *pipeline, *filesrc, *decoder, *filter, *sink;
34.43 + GMainLoop *loop;
34.44 +
34.45 + /* initialization */
34.46 + gst_init (&argc, &argv);
34.47 + loop = g_main_loop_new (NULL, FALSE);
34.48 + if (argc != 2) {
34.49 + g_print ("Usage: %s <myth uri>\n", argv[0]);
34.50 + return 01;
34.51 + }
34.52 +
34.53 + /* create elements */
34.54 + pipeline = gst_pipeline_new ("mythtvsrc_pipeline");
34.55 + gst_bus_add_watch (gst_pipeline_get_bus (GST_PIPELINE (pipeline)),
34.56 + bus_call, loop);
34.57 +
34.58 + filesrc = gst_element_factory_make ("mythtvsrc", "mythtvsrc");
34.59 + decoder = gst_element_factory_make ("mad", "my_decoder");
34.60 + filter = gst_element_factory_make ("my_filter", "my_filter");
34.61 + sink = gst_element_factory_make ("osssink", "audiosink");
34.62 + if (!sink || !decoder) {
34.63 + g_print ("Decoder or output could not be found - check your install\n");
34.64 + return -1;
34.65 + } else if (!filter) {
34.66 + g_print ("Your self-written filter could not be found. Make sure it "
34.67 + "is installed correctly in $(libdir)/gstreamer-0.9/ and that "
34.68 + "you've ran gst-register-0.9 to register it. Check availability "
34.69 + "of the plugin afterwards using \"gst-inspect-0.9 my_filter\"");
34.70 + return -1;
34.71 + }
34.72 +
34.73 + g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
34.74 +
34.75 + /* link everything together */
34.76 + gst_element_link_many (filesrc, decoder, filter, sink, NULL);
34.77 + gst_bin_add_many (GST_BIN (pipeline), filesrc, decoder, filter, sink, NULL);
34.78 +
34.79 + /* run */
34.80 + gst_element_set_state (pipeline, GST_STATE_PLAYING);
34.81 + g_main_loop_run (loop);
34.82 +
34.83 + /* clean up */
34.84 + gst_element_set_state (pipeline, GST_STATE_NULL);
34.85 + gst_object_unref (GST_OBJECT (pipeline));
34.86 +
34.87 + return 0;
34.88 +}
35.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
35.2 +++ b/mythtv_plugin/test-nuv-2.sh Wed Sep 20 23:59:48 2006 +0100
35.3 @@ -0,0 +1,3 @@
35.4 +#! /bin/sh
35.5 +echo on
35.6 +gst-launch-0.10 mythtvsrc location=sample1_divx.nuv
36.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
36.2 +++ b/mythtv_plugin/test-nuv.sh Wed Sep 20 23:59:48 2006 +0100
36.3 @@ -0,0 +1,3 @@
36.4 +#! /bin/sh
36.5 +echo on
36.6 +gst-launch-0.10 filesrc location=sample1_divx.nuv ! ffdemux_nuv name=nuvdemux nuvdemux.video_00 ! queue ! ffdec_mpeg4 ! xvimagesink sync=false nuvdemux.audio_00 ! queue ! ffdec_mp3 ! audioconvert ! alsasink sync=false 2>&1