Codebase list ssh-contact / upstream/0.1
Imported Upstream version 0.1 Laurent Bigonville 13 years ago
24 changed file(s) with 40138 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 Xavier Claessens <xclaesse@gmail.com>
1
0 GNU GENERAL PUBLIC LICENSE
1 Version 3, 29 June 2007
2
3 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
4 Everyone is permitted to copy and distribute verbatim copies
5 of this license document, but changing it is not allowed.
6
7 Preamble
8
9 The GNU General Public License is a free, copyleft license for
10 software and other kinds of works.
11
12 The licenses for most software and other practical works are designed
13 to take away your freedom to share and change the works. By contrast,
14 the GNU General Public License is intended to guarantee your freedom to
15 share and change all versions of a program--to make sure it remains free
16 software for all its users. We, the Free Software Foundation, use the
17 GNU General Public License for most of our software; it applies also to
18 any other work released this way by its authors. You can apply it to
19 your programs, too.
20
21 When we speak of free software, we are referring to freedom, not
22 price. Our General Public Licenses are designed to make sure that you
23 have the freedom to distribute copies of free software (and charge for
24 them if you wish), that you receive source code or can get it if you
25 want it, that you can change the software or use pieces of it in new
26 free programs, and that you know you can do these things.
27
28 To protect your rights, we need to prevent others from denying you
29 these rights or asking you to surrender the rights. Therefore, you have
30 certain responsibilities if you distribute copies of the software, or if
31 you modify it: responsibilities to respect the freedom of others.
32
33 For example, if you distribute copies of such a program, whether
34 gratis or for a fee, you must pass on to the recipients the same
35 freedoms that you received. You must make sure that they, too, receive
36 or can get the source code. And you must show them these terms so they
37 know their rights.
38
39 Developers that use the GNU GPL protect your rights with two steps:
40 (1) assert copyright on the software, and (2) offer you this License
41 giving you legal permission to copy, distribute and/or modify it.
42
43 For the developers' and authors' protection, the GPL clearly explains
44 that there is no warranty for this free software. For both users' and
45 authors' sake, the GPL requires that modified versions be marked as
46 changed, so that their problems will not be attributed erroneously to
47 authors of previous versions.
48
49 Some devices are designed to deny users access to install or run
50 modified versions of the software inside them, although the manufacturer
51 can do so. This is fundamentally incompatible with the aim of
52 protecting users' freedom to change the software. The systematic
53 pattern of such abuse occurs in the area of products for individuals to
54 use, which is precisely where it is most unacceptable. Therefore, we
55 have designed this version of the GPL to prohibit the practice for those
56 products. If such problems arise substantially in other domains, we
57 stand ready to extend this provision to those domains in future versions
58 of the GPL, as needed to protect the freedom of users.
59
60 Finally, every program is threatened constantly by software patents.
61 States should not allow patents to restrict development and use of
62 software on general-purpose computers, but in those that do, we wish to
63 avoid the special danger that patents applied to a free program could
64 make it effectively proprietary. To prevent this, the GPL assures that
65 patents cannot be used to render the program non-free.
66
67 The precise terms and conditions for copying, distribution and
68 modification follow.
69
70 TERMS AND CONDITIONS
71
72 0. Definitions.
73
74 "This License" refers to version 3 of the GNU General Public License.
75
76 "Copyright" also means copyright-like laws that apply to other kinds of
77 works, such as semiconductor masks.
78
79 "The Program" refers to any copyrightable work licensed under this
80 License. Each licensee is addressed as "you". "Licensees" and
81 "recipients" may be individuals or organizations.
82
83 To "modify" a work means to copy from or adapt all or part of the work
84 in a fashion requiring copyright permission, other than the making of an
85 exact copy. The resulting work is called a "modified version" of the
86 earlier work or a work "based on" the earlier work.
87
88 A "covered work" means either the unmodified Program or a work based
89 on the Program.
90
91 To "propagate" a work means to do anything with it that, without
92 permission, would make you directly or secondarily liable for
93 infringement under applicable copyright law, except executing it on a
94 computer or modifying a private copy. Propagation includes copying,
95 distribution (with or without modification), making available to the
96 public, and in some countries other activities as well.
97
98 To "convey" a work means any kind of propagation that enables other
99 parties to make or receive copies. Mere interaction with a user through
100 a computer network, with no transfer of a copy, is not conveying.
101
102 An interactive user interface displays "Appropriate Legal Notices"
103 to the extent that it includes a convenient and prominently visible
104 feature that (1) displays an appropriate copyright notice, and (2)
105 tells the user that there is no warranty for the work (except to the
106 extent that warranties are provided), that licensees may convey the
107 work under this License, and how to view a copy of this License. If
108 the interface presents a list of user commands or options, such as a
109 menu, a prominent item in the list meets this criterion.
110
111 1. Source Code.
112
113 The "source code" for a work means the preferred form of the work
114 for making modifications to it. "Object code" means any non-source
115 form of a work.
116
117 A "Standard Interface" means an interface that either is an official
118 standard defined by a recognized standards body, or, in the case of
119 interfaces specified for a particular programming language, one that
120 is widely used among developers working in that language.
121
122 The "System Libraries" of an executable work include anything, other
123 than the work as a whole, that (a) is included in the normal form of
124 packaging a Major Component, but which is not part of that Major
125 Component, and (b) serves only to enable use of the work with that
126 Major Component, or to implement a Standard Interface for which an
127 implementation is available to the public in source code form. A
128 "Major Component", in this context, means a major essential component
129 (kernel, window system, and so on) of the specific operating system
130 (if any) on which the executable work runs, or a compiler used to
131 produce the work, or an object code interpreter used to run it.
132
133 The "Corresponding Source" for a work in object code form means all
134 the source code needed to generate, install, and (for an executable
135 work) run the object code and to modify the work, including scripts to
136 control those activities. However, it does not include the work's
137 System Libraries, or general-purpose tools or generally available free
138 programs which are used unmodified in performing those activities but
139 which are not part of the work. For example, Corresponding Source
140 includes interface definition files associated with source files for
141 the work, and the source code for shared libraries and dynamically
142 linked subprograms that the work is specifically designed to require,
143 such as by intimate data communication or control flow between those
144 subprograms and other parts of the work.
145
146 The Corresponding Source need not include anything that users
147 can regenerate automatically from other parts of the Corresponding
148 Source.
149
150 The Corresponding Source for a work in source code form is that
151 same work.
152
153 2. Basic Permissions.
154
155 All rights granted under this License are granted for the term of
156 copyright on the Program, and are irrevocable provided the stated
157 conditions are met. This License explicitly affirms your unlimited
158 permission to run the unmodified Program. The output from running a
159 covered work is covered by this License only if the output, given its
160 content, constitutes a covered work. This License acknowledges your
161 rights of fair use or other equivalent, as provided by copyright law.
162
163 You may make, run and propagate covered works that you do not
164 convey, without conditions so long as your license otherwise remains
165 in force. You may convey covered works to others for the sole purpose
166 of having them make modifications exclusively for you, or provide you
167 with facilities for running those works, provided that you comply with
168 the terms of this License in conveying all material for which you do
169 not control copyright. Those thus making or running the covered works
170 for you must do so exclusively on your behalf, under your direction
171 and control, on terms that prohibit them from making any copies of
172 your copyrighted material outside their relationship with you.
173
174 Conveying under any other circumstances is permitted solely under
175 the conditions stated below. Sublicensing is not allowed; section 10
176 makes it unnecessary.
177
178 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
179
180 No covered work shall be deemed part of an effective technological
181 measure under any applicable law fulfilling obligations under article
182 11 of the WIPO copyright treaty adopted on 20 December 1996, or
183 similar laws prohibiting or restricting circumvention of such
184 measures.
185
186 When you convey a covered work, you waive any legal power to forbid
187 circumvention of technological measures to the extent such circumvention
188 is effected by exercising rights under this License with respect to
189 the covered work, and you disclaim any intention to limit operation or
190 modification of the work as a means of enforcing, against the work's
191 users, your or third parties' legal rights to forbid circumvention of
192 technological measures.
193
194 4. Conveying Verbatim Copies.
195
196 You may convey verbatim copies of the Program's source code as you
197 receive it, in any medium, provided that you conspicuously and
198 appropriately publish on each copy an appropriate copyright notice;
199 keep intact all notices stating that this License and any
200 non-permissive terms added in accord with section 7 apply to the code;
201 keep intact all notices of the absence of any warranty; and give all
202 recipients a copy of this License along with the Program.
203
204 You may charge any price or no price for each copy that you convey,
205 and you may offer support or warranty protection for a fee.
206
207 5. Conveying Modified Source Versions.
208
209 You may convey a work based on the Program, or the modifications to
210 produce it from the Program, in the form of source code under the
211 terms of section 4, provided that you also meet all of these conditions:
212
213 a) The work must carry prominent notices stating that you modified
214 it, and giving a relevant date.
215
216 b) The work must carry prominent notices stating that it is
217 released under this License and any conditions added under section
218 7. This requirement modifies the requirement in section 4 to
219 "keep intact all notices".
220
221 c) You must license the entire work, as a whole, under this
222 License to anyone who comes into possession of a copy. This
223 License will therefore apply, along with any applicable section 7
224 additional terms, to the whole of the work, and all its parts,
225 regardless of how they are packaged. This License gives no
226 permission to license the work in any other way, but it does not
227 invalidate such permission if you have separately received it.
228
229 d) If the work has interactive user interfaces, each must display
230 Appropriate Legal Notices; however, if the Program has interactive
231 interfaces that do not display Appropriate Legal Notices, your
232 work need not make them do so.
233
234 A compilation of a covered work with other separate and independent
235 works, which are not by their nature extensions of the covered work,
236 and which are not combined with it such as to form a larger program,
237 in or on a volume of a storage or distribution medium, is called an
238 "aggregate" if the compilation and its resulting copyright are not
239 used to limit the access or legal rights of the compilation's users
240 beyond what the individual works permit. Inclusion of a covered work
241 in an aggregate does not cause this License to apply to the other
242 parts of the aggregate.
243
244 6. Conveying Non-Source Forms.
245
246 You may convey a covered work in object code form under the terms
247 of sections 4 and 5, provided that you also convey the
248 machine-readable Corresponding Source under the terms of this License,
249 in one of these ways:
250
251 a) Convey the object code in, or embodied in, a physical product
252 (including a physical distribution medium), accompanied by the
253 Corresponding Source fixed on a durable physical medium
254 customarily used for software interchange.
255
256 b) Convey the object code in, or embodied in, a physical product
257 (including a physical distribution medium), accompanied by a
258 written offer, valid for at least three years and valid for as
259 long as you offer spare parts or customer support for that product
260 model, to give anyone who possesses the object code either (1) a
261 copy of the Corresponding Source for all the software in the
262 product that is covered by this License, on a durable physical
263 medium customarily used for software interchange, for a price no
264 more than your reasonable cost of physically performing this
265 conveying of source, or (2) access to copy the
266 Corresponding Source from a network server at no charge.
267
268 c) Convey individual copies of the object code with a copy of the
269 written offer to provide the Corresponding Source. This
270 alternative is allowed only occasionally and noncommercially, and
271 only if you received the object code with such an offer, in accord
272 with subsection 6b.
273
274 d) Convey the object code by offering access from a designated
275 place (gratis or for a charge), and offer equivalent access to the
276 Corresponding Source in the same way through the same place at no
277 further charge. You need not require recipients to copy the
278 Corresponding Source along with the object code. If the place to
279 copy the object code is a network server, the Corresponding Source
280 may be on a different server (operated by you or a third party)
281 that supports equivalent copying facilities, provided you maintain
282 clear directions next to the object code saying where to find the
283 Corresponding Source. Regardless of what server hosts the
284 Corresponding Source, you remain obligated to ensure that it is
285 available for as long as needed to satisfy these requirements.
286
287 e) Convey the object code using peer-to-peer transmission, provided
288 you inform other peers where the object code and Corresponding
289 Source of the work are being offered to the general public at no
290 charge under subsection 6d.
291
292 A separable portion of the object code, whose source code is excluded
293 from the Corresponding Source as a System Library, need not be
294 included in conveying the object code work.
295
296 A "User Product" is either (1) a "consumer product", which means any
297 tangible personal property which is normally used for personal, family,
298 or household purposes, or (2) anything designed or sold for incorporation
299 into a dwelling. In determining whether a product is a consumer product,
300 doubtful cases shall be resolved in favor of coverage. For a particular
301 product received by a particular user, "normally used" refers to a
302 typical or common use of that class of product, regardless of the status
303 of the particular user or of the way in which the particular user
304 actually uses, or expects or is expected to use, the product. A product
305 is a consumer product regardless of whether the product has substantial
306 commercial, industrial or non-consumer uses, unless such uses represent
307 the only significant mode of use of the product.
308
309 "Installation Information" for a User Product means any methods,
310 procedures, authorization keys, or other information required to install
311 and execute modified versions of a covered work in that User Product from
312 a modified version of its Corresponding Source. The information must
313 suffice to ensure that the continued functioning of the modified object
314 code is in no case prevented or interfered with solely because
315 modification has been made.
316
317 If you convey an object code work under this section in, or with, or
318 specifically for use in, a User Product, and the conveying occurs as
319 part of a transaction in which the right of possession and use of the
320 User Product is transferred to the recipient in perpetuity or for a
321 fixed term (regardless of how the transaction is characterized), the
322 Corresponding Source conveyed under this section must be accompanied
323 by the Installation Information. But this requirement does not apply
324 if neither you nor any third party retains the ability to install
325 modified object code on the User Product (for example, the work has
326 been installed in ROM).
327
328 The requirement to provide Installation Information does not include a
329 requirement to continue to provide support service, warranty, or updates
330 for a work that has been modified or installed by the recipient, or for
331 the User Product in which it has been modified or installed. Access to a
332 network may be denied when the modification itself materially and
333 adversely affects the operation of the network or violates the rules and
334 protocols for communication across the network.
335
336 Corresponding Source conveyed, and Installation Information provided,
337 in accord with this section must be in a format that is publicly
338 documented (and with an implementation available to the public in
339 source code form), and must require no special password or key for
340 unpacking, reading or copying.
341
342 7. Additional Terms.
343
344 "Additional permissions" are terms that supplement the terms of this
345 License by making exceptions from one or more of its conditions.
346 Additional permissions that are applicable to the entire Program shall
347 be treated as though they were included in this License, to the extent
348 that they are valid under applicable law. If additional permissions
349 apply only to part of the Program, that part may be used separately
350 under those permissions, but the entire Program remains governed by
351 this License without regard to the additional permissions.
352
353 When you convey a copy of a covered work, you may at your option
354 remove any additional permissions from that copy, or from any part of
355 it. (Additional permissions may be written to require their own
356 removal in certain cases when you modify the work.) You may place
357 additional permissions on material, added by you to a covered work,
358 for which you have or can give appropriate copyright permission.
359
360 Notwithstanding any other provision of this License, for material you
361 add to a covered work, you may (if authorized by the copyright holders of
362 that material) supplement the terms of this License with terms:
363
364 a) Disclaiming warranty or limiting liability differently from the
365 terms of sections 15 and 16 of this License; or
366
367 b) Requiring preservation of specified reasonable legal notices or
368 author attributions in that material or in the Appropriate Legal
369 Notices displayed by works containing it; or
370
371 c) Prohibiting misrepresentation of the origin of that material, or
372 requiring that modified versions of such material be marked in
373 reasonable ways as different from the original version; or
374
375 d) Limiting the use for publicity purposes of names of licensors or
376 authors of the material; or
377
378 e) Declining to grant rights under trademark law for use of some
379 trade names, trademarks, or service marks; or
380
381 f) Requiring indemnification of licensors and authors of that
382 material by anyone who conveys the material (or modified versions of
383 it) with contractual assumptions of liability to the recipient, for
384 any liability that these contractual assumptions directly impose on
385 those licensors and authors.
386
387 All other non-permissive additional terms are considered "further
388 restrictions" within the meaning of section 10. If the Program as you
389 received it, or any part of it, contains a notice stating that it is
390 governed by this License along with a term that is a further
391 restriction, you may remove that term. If a license document contains
392 a further restriction but permits relicensing or conveying under this
393 License, you may add to a covered work material governed by the terms
394 of that license document, provided that the further restriction does
395 not survive such relicensing or conveying.
396
397 If you add terms to a covered work in accord with this section, you
398 must place, in the relevant source files, a statement of the
399 additional terms that apply to those files, or a notice indicating
400 where to find the applicable terms.
401
402 Additional terms, permissive or non-permissive, may be stated in the
403 form of a separately written license, or stated as exceptions;
404 the above requirements apply either way.
405
406 8. Termination.
407
408 You may not propagate or modify a covered work except as expressly
409 provided under this License. Any attempt otherwise to propagate or
410 modify it is void, and will automatically terminate your rights under
411 this License (including any patent licenses granted under the third
412 paragraph of section 11).
413
414 However, if you cease all violation of this License, then your
415 license from a particular copyright holder is reinstated (a)
416 provisionally, unless and until the copyright holder explicitly and
417 finally terminates your license, and (b) permanently, if the copyright
418 holder fails to notify you of the violation by some reasonable means
419 prior to 60 days after the cessation.
420
421 Moreover, your license from a particular copyright holder is
422 reinstated permanently if the copyright holder notifies you of the
423 violation by some reasonable means, this is the first time you have
424 received notice of violation of this License (for any work) from that
425 copyright holder, and you cure the violation prior to 30 days after
426 your receipt of the notice.
427
428 Termination of your rights under this section does not terminate the
429 licenses of parties who have received copies or rights from you under
430 this License. If your rights have been terminated and not permanently
431 reinstated, you do not qualify to receive new licenses for the same
432 material under section 10.
433
434 9. Acceptance Not Required for Having Copies.
435
436 You are not required to accept this License in order to receive or
437 run a copy of the Program. Ancillary propagation of a covered work
438 occurring solely as a consequence of using peer-to-peer transmission
439 to receive a copy likewise does not require acceptance. However,
440 nothing other than this License grants you permission to propagate or
441 modify any covered work. These actions infringe copyright if you do
442 not accept this License. Therefore, by modifying or propagating a
443 covered work, you indicate your acceptance of this License to do so.
444
445 10. Automatic Licensing of Downstream Recipients.
446
447 Each time you convey a covered work, the recipient automatically
448 receives a license from the original licensors, to run, modify and
449 propagate that work, subject to this License. You are not responsible
450 for enforcing compliance by third parties with this License.
451
452 An "entity transaction" is a transaction transferring control of an
453 organization, or substantially all assets of one, or subdividing an
454 organization, or merging organizations. If propagation of a covered
455 work results from an entity transaction, each party to that
456 transaction who receives a copy of the work also receives whatever
457 licenses to the work the party's predecessor in interest had or could
458 give under the previous paragraph, plus a right to possession of the
459 Corresponding Source of the work from the predecessor in interest, if
460 the predecessor has it or can get it with reasonable efforts.
461
462 You may not impose any further restrictions on the exercise of the
463 rights granted or affirmed under this License. For example, you may
464 not impose a license fee, royalty, or other charge for exercise of
465 rights granted under this License, and you may not initiate litigation
466 (including a cross-claim or counterclaim in a lawsuit) alleging that
467 any patent claim is infringed by making, using, selling, offering for
468 sale, or importing the Program or any portion of it.
469
470 11. Patents.
471
472 A "contributor" is a copyright holder who authorizes use under this
473 License of the Program or a work on which the Program is based. The
474 work thus licensed is called the contributor's "contributor version".
475
476 A contributor's "essential patent claims" are all patent claims
477 owned or controlled by the contributor, whether already acquired or
478 hereafter acquired, that would be infringed by some manner, permitted
479 by this License, of making, using, or selling its contributor version,
480 but do not include claims that would be infringed only as a
481 consequence of further modification of the contributor version. For
482 purposes of this definition, "control" includes the right to grant
483 patent sublicenses in a manner consistent with the requirements of
484 this License.
485
486 Each contributor grants you a non-exclusive, worldwide, royalty-free
487 patent license under the contributor's essential patent claims, to
488 make, use, sell, offer for sale, import and otherwise run, modify and
489 propagate the contents of its contributor version.
490
491 In the following three paragraphs, a "patent license" is any express
492 agreement or commitment, however denominated, not to enforce a patent
493 (such as an express permission to practice a patent or covenant not to
494 sue for patent infringement). To "grant" such a patent license to a
495 party means to make such an agreement or commitment not to enforce a
496 patent against the party.
497
498 If you convey a covered work, knowingly relying on a patent license,
499 and the Corresponding Source of the work is not available for anyone
500 to copy, free of charge and under the terms of this License, through a
501 publicly available network server or other readily accessible means,
502 then you must either (1) cause the Corresponding Source to be so
503 available, or (2) arrange to deprive yourself of the benefit of the
504 patent license for this particular work, or (3) arrange, in a manner
505 consistent with the requirements of this License, to extend the patent
506 license to downstream recipients. "Knowingly relying" means you have
507 actual knowledge that, but for the patent license, your conveying the
508 covered work in a country, or your recipient's use of the covered work
509 in a country, would infringe one or more identifiable patents in that
510 country that you have reason to believe are valid.
511
512 If, pursuant to or in connection with a single transaction or
513 arrangement, you convey, or propagate by procuring conveyance of, a
514 covered work, and grant a patent license to some of the parties
515 receiving the covered work authorizing them to use, propagate, modify
516 or convey a specific copy of the covered work, then the patent license
517 you grant is automatically extended to all recipients of the covered
518 work and works based on it.
519
520 A patent license is "discriminatory" if it does not include within
521 the scope of its coverage, prohibits the exercise of, or is
522 conditioned on the non-exercise of one or more of the rights that are
523 specifically granted under this License. You may not convey a covered
524 work if you are a party to an arrangement with a third party that is
525 in the business of distributing software, under which you make payment
526 to the third party based on the extent of your activity of conveying
527 the work, and under which the third party grants, to any of the
528 parties who would receive the covered work from you, a discriminatory
529 patent license (a) in connection with copies of the covered work
530 conveyed by you (or copies made from those copies), or (b) primarily
531 for and in connection with specific products or compilations that
532 contain the covered work, unless you entered into that arrangement,
533 or that patent license was granted, prior to 28 March 2007.
534
535 Nothing in this License shall be construed as excluding or limiting
536 any implied license or other defenses to infringement that may
537 otherwise be available to you under applicable patent law.
538
539 12. No Surrender of Others' Freedom.
540
541 If conditions are imposed on you (whether by court order, agreement or
542 otherwise) that contradict the conditions of this License, they do not
543 excuse you from the conditions of this License. If you cannot convey a
544 covered work so as to satisfy simultaneously your obligations under this
545 License and any other pertinent obligations, then as a consequence you may
546 not convey it at all. For example, if you agree to terms that obligate you
547 to collect a royalty for further conveying from those to whom you convey
548 the Program, the only way you could satisfy both those terms and this
549 License would be to refrain entirely from conveying the Program.
550
551 13. Use with the GNU Affero General Public License.
552
553 Notwithstanding any other provision of this License, you have
554 permission to link or combine any covered work with a work licensed
555 under version 3 of the GNU Affero General Public License into a single
556 combined work, and to convey the resulting work. The terms of this
557 License will continue to apply to the part which is the covered work,
558 but the special requirements of the GNU Affero General Public License,
559 section 13, concerning interaction through a network will apply to the
560 combination as such.
561
562 14. Revised Versions of this License.
563
564 The Free Software Foundation may publish revised and/or new versions of
565 the GNU General Public License from time to time. Such new versions will
566 be similar in spirit to the present version, but may differ in detail to
567 address new problems or concerns.
568
569 Each version is given a distinguishing version number. If the
570 Program specifies that a certain numbered version of the GNU General
571 Public License "or any later version" applies to it, you have the
572 option of following the terms and conditions either of that numbered
573 version or of any later version published by the Free Software
574 Foundation. If the Program does not specify a version number of the
575 GNU General Public License, you may choose any version ever published
576 by the Free Software Foundation.
577
578 If the Program specifies that a proxy can decide which future
579 versions of the GNU General Public License can be used, that proxy's
580 public statement of acceptance of a version permanently authorizes you
581 to choose that version for the Program.
582
583 Later license versions may give you additional or different
584 permissions. However, no additional obligations are imposed on any
585 author or copyright holder as a result of your choosing to follow a
586 later version.
587
588 15. Disclaimer of Warranty.
589
590 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
591 APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
592 HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
593 OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
594 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
595 PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
596 IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
597 ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
598
599 16. Limitation of Liability.
600
601 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
602 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
603 THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
604 GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
605 USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
606 DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
607 PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
608 EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
609 SUCH DAMAGES.
610
611 17. Interpretation of Sections 15 and 16.
612
613 If the disclaimer of warranty and limitation of liability provided
614 above cannot be given local legal effect according to their terms,
615 reviewing courts shall apply local law that most closely approximates
616 an absolute waiver of all civil liability in connection with the
617 Program, unless a warranty or assumption of liability accompanies a
618 copy of the Program in return for a fee.
619
620 END OF TERMS AND CONDITIONS
621
622 How to Apply These Terms to Your New Programs
623
624 If you develop a new program, and you want it to be of the greatest
625 possible use to the public, the best way to achieve this is to make it
626 free software which everyone can redistribute and change under these terms.
627
628 To do so, attach the following notices to the program. It is safest
629 to attach them to the start of each source file to most effectively
630 state the exclusion of warranty; and each file should have at least
631 the "copyright" line and a pointer to where the full notice is found.
632
633 <one line to give the program's name and a brief idea of what it does.>
634 Copyright (C) <year> <name of author>
635
636 This program is free software: you can redistribute it and/or modify
637 it under the terms of the GNU General Public License as published by
638 the Free Software Foundation, either version 3 of the License, or
639 (at your option) any later version.
640
641 This program is distributed in the hope that it will be useful,
642 but WITHOUT ANY WARRANTY; without even the implied warranty of
643 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
644 GNU General Public License for more details.
645
646 You should have received a copy of the GNU General Public License
647 along with this program. If not, see <http://www.gnu.org/licenses/>.
648
649 Also add information on how to contact you by electronic and paper mail.
650
651 If the program does terminal interaction, make it output a short
652 notice like this when it starts in an interactive mode:
653
654 <program> Copyright (C) <year> <name of author>
655 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
656 This is free software, and you are welcome to redistribute it
657 under certain conditions; type `show c' for details.
658
659 The hypothetical commands `show w' and `show c' should show the appropriate
660 parts of the General Public License. Of course, your program's commands
661 might be different; for a GUI interface, you would use an "about box".
662
663 You should also get your employer (if you work as a programmer) or school,
664 if any, to sign a "copyright disclaimer" for the program, if necessary.
665 For more information on this, and how to apply and follow the GNU GPL, see
666 <http://www.gnu.org/licenses/>.
667
668 The GNU General Public License does not permit incorporating your program
669 into proprietary programs. If your program is a subroutine library, you
670 may consider it more useful to permit linking proprietary applications with
671 the library. If this is what you want to do, use the GNU Lesser General
672 Public License instead of this License. But first, please read
673 <http://www.gnu.org/philosophy/why-not-lgpl.html>.
674
0 SUBDIRS = src
1
0 # Makefile.in generated by automake 1.11.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16 VPATH = @srcdir@
17 pkgdatadir = $(datadir)/@PACKAGE@
18 pkgincludedir = $(includedir)/@PACKAGE@
19 pkglibdir = $(libdir)/@PACKAGE@
20 pkglibexecdir = $(libexecdir)/@PACKAGE@
21 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
22 install_sh_DATA = $(install_sh) -c -m 644
23 install_sh_PROGRAM = $(install_sh) -c
24 install_sh_SCRIPT = $(install_sh) -c
25 INSTALL_HEADER = $(INSTALL_DATA)
26 transform = $(program_transform_name)
27 NORMAL_INSTALL = :
28 PRE_INSTALL = :
29 POST_INSTALL = :
30 NORMAL_UNINSTALL = :
31 PRE_UNINSTALL = :
32 POST_UNINSTALL = :
33 build_triplet = @build@
34 host_triplet = @host@
35 subdir = .
36 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
37 $(srcdir)/Makefile.in $(srcdir)/config.h.in \
38 $(top_srcdir)/configure AUTHORS COPYING NEWS config.guess \
39 config.sub depcomp install-sh ltmain.sh missing
40 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
42 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
43 $(ACLOCAL_M4)
44 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
45 configure.lineno config.status.lineno
46 mkinstalldirs = $(install_sh) -d
47 CONFIG_HEADER = config.h
48 CONFIG_CLEAN_FILES =
49 CONFIG_CLEAN_VPATH_FILES =
50 AM_V_GEN = $(am__v_GEN_$(V))
51 am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
52 am__v_GEN_0 = @echo " GEN " $@;
53 AM_V_at = $(am__v_at_$(V))
54 am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
55 am__v_at_0 = @
56 SOURCES =
57 DIST_SOURCES =
58 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
59 html-recursive info-recursive install-data-recursive \
60 install-dvi-recursive install-exec-recursive \
61 install-html-recursive install-info-recursive \
62 install-pdf-recursive install-ps-recursive install-recursive \
63 installcheck-recursive installdirs-recursive pdf-recursive \
64 ps-recursive uninstall-recursive
65 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
66 distclean-recursive maintainer-clean-recursive
67 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
68 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
69 distdir dist dist-all distcheck
70 ETAGS = etags
71 CTAGS = ctags
72 DIST_SUBDIRS = $(SUBDIRS)
73 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
74 distdir = $(PACKAGE)-$(VERSION)
75 top_distdir = $(distdir)
76 am__remove_distdir = \
77 { test ! -d "$(distdir)" \
78 || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
79 && rm -fr "$(distdir)"; }; }
80 am__relativize = \
81 dir0=`pwd`; \
82 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
83 sed_rest='s,^[^/]*/*,,'; \
84 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
85 sed_butlast='s,/*[^/]*$$,,'; \
86 while test -n "$$dir1"; do \
87 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
88 if test "$$first" != "."; then \
89 if test "$$first" = ".."; then \
90 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
91 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
92 else \
93 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
94 if test "$$first2" = "$$first"; then \
95 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
96 else \
97 dir2="../$$dir2"; \
98 fi; \
99 dir0="$$dir0"/"$$first"; \
100 fi; \
101 fi; \
102 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
103 done; \
104 reldir="$$dir2"
105 DIST_ARCHIVES = $(distdir).tar.gz
106 GZIP_ENV = --best
107 distuninstallcheck_listfiles = find . -type f -print
108 distcleancheck_listfiles = find . -type f -print
109 ACLOCAL = @ACLOCAL@
110 AMTAR = @AMTAR@
111 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
112 AR = @AR@
113 AUTOCONF = @AUTOCONF@
114 AUTOHEADER = @AUTOHEADER@
115 AUTOMAKE = @AUTOMAKE@
116 AWK = @AWK@
117 CC = @CC@
118 CCDEPMODE = @CCDEPMODE@
119 CFLAGS = @CFLAGS@
120 CPP = @CPP@
121 CPPFLAGS = @CPPFLAGS@
122 CYGPATH_W = @CYGPATH_W@
123 DEFS = @DEFS@
124 DEPDIR = @DEPDIR@
125 DSYMUTIL = @DSYMUTIL@
126 DUMPBIN = @DUMPBIN@
127 ECHO_C = @ECHO_C@
128 ECHO_N = @ECHO_N@
129 ECHO_T = @ECHO_T@
130 EGREP = @EGREP@
131 EXEEXT = @EXEEXT@
132 FGREP = @FGREP@
133 GREP = @GREP@
134 INSTALL = @INSTALL@
135 INSTALL_DATA = @INSTALL_DATA@
136 INSTALL_PROGRAM = @INSTALL_PROGRAM@
137 INSTALL_SCRIPT = @INSTALL_SCRIPT@
138 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
139 LD = @LD@
140 LDFLAGS = @LDFLAGS@
141 LIBOBJS = @LIBOBJS@
142 LIBS = @LIBS@
143 LIBTOOL = @LIBTOOL@
144 LIPO = @LIPO@
145 LN_S = @LN_S@
146 LTLIBOBJS = @LTLIBOBJS@
147 MAINT = @MAINT@
148 MAKEINFO = @MAKEINFO@
149 MKDIR_P = @MKDIR_P@
150 NM = @NM@
151 NMEDIT = @NMEDIT@
152 OBJDUMP = @OBJDUMP@
153 OBJEXT = @OBJEXT@
154 OTOOL = @OTOOL@
155 OTOOL64 = @OTOOL64@
156 PACKAGE = @PACKAGE@
157 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
158 PACKAGE_NAME = @PACKAGE_NAME@
159 PACKAGE_STRING = @PACKAGE_STRING@
160 PACKAGE_TARNAME = @PACKAGE_TARNAME@
161 PACKAGE_URL = @PACKAGE_URL@
162 PACKAGE_VERSION = @PACKAGE_VERSION@
163 PATH_SEPARATOR = @PATH_SEPARATOR@
164 PKG_CONFIG = @PKG_CONFIG@
165 RANLIB = @RANLIB@
166 SED = @SED@
167 SET_MAKE = @SET_MAKE@
168 SHELL = @SHELL@
169 SSH_CONTACT_CFLAGS = @SSH_CONTACT_CFLAGS@
170 SSH_CONTACT_LIBS = @SSH_CONTACT_LIBS@
171 STRIP = @STRIP@
172 VERSION = @VERSION@
173 abs_builddir = @abs_builddir@
174 abs_srcdir = @abs_srcdir@
175 abs_top_builddir = @abs_top_builddir@
176 abs_top_srcdir = @abs_top_srcdir@
177 ac_ct_CC = @ac_ct_CC@
178 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
179 am__include = @am__include@
180 am__leading_dot = @am__leading_dot@
181 am__quote = @am__quote@
182 am__tar = @am__tar@
183 am__untar = @am__untar@
184 bindir = @bindir@
185 build = @build@
186 build_alias = @build_alias@
187 build_cpu = @build_cpu@
188 build_os = @build_os@
189 build_vendor = @build_vendor@
190 builddir = @builddir@
191 datadir = @datadir@
192 datarootdir = @datarootdir@
193 docdir = @docdir@
194 dvidir = @dvidir@
195 exec_prefix = @exec_prefix@
196 host = @host@
197 host_alias = @host_alias@
198 host_cpu = @host_cpu@
199 host_os = @host_os@
200 host_vendor = @host_vendor@
201 htmldir = @htmldir@
202 includedir = @includedir@
203 infodir = @infodir@
204 install_sh = @install_sh@
205 libdir = @libdir@
206 libexecdir = @libexecdir@
207 localedir = @localedir@
208 localstatedir = @localstatedir@
209 lt_ECHO = @lt_ECHO@
210 mandir = @mandir@
211 mkdir_p = @mkdir_p@
212 oldincludedir = @oldincludedir@
213 pdfdir = @pdfdir@
214 prefix = @prefix@
215 program_transform_name = @program_transform_name@
216 psdir = @psdir@
217 sbindir = @sbindir@
218 sharedstatedir = @sharedstatedir@
219 srcdir = @srcdir@
220 sysconfdir = @sysconfdir@
221 target_alias = @target_alias@
222 top_build_prefix = @top_build_prefix@
223 top_builddir = @top_builddir@
224 top_srcdir = @top_srcdir@
225 SUBDIRS = src
226 all: config.h
227 $(MAKE) $(AM_MAKEFLAGS) all-recursive
228
229 .SUFFIXES:
230 am--refresh:
231 @:
232 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
233 @for dep in $?; do \
234 case '$(am__configure_deps)' in \
235 *$$dep*) \
236 echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
237 $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
238 && exit 0; \
239 exit 1;; \
240 esac; \
241 done; \
242 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
243 $(am__cd) $(top_srcdir) && \
244 $(AUTOMAKE) --foreign Makefile
245 .PRECIOUS: Makefile
246 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
247 @case '$?' in \
248 *config.status*) \
249 echo ' $(SHELL) ./config.status'; \
250 $(SHELL) ./config.status;; \
251 *) \
252 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
253 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
254 esac;
255
256 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
257 $(SHELL) ./config.status --recheck
258
259 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
260 $(am__cd) $(srcdir) && $(AUTOCONF)
261 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
262 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
263 $(am__aclocal_m4_deps):
264
265 config.h: stamp-h1
266 @if test ! -f $@; then \
267 rm -f stamp-h1; \
268 $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
269 else :; fi
270
271 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
272 @rm -f stamp-h1
273 cd $(top_builddir) && $(SHELL) ./config.status config.h
274 $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
275 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
276 rm -f stamp-h1
277 touch $@
278
279 distclean-hdr:
280 -rm -f config.h stamp-h1
281
282 mostlyclean-libtool:
283 -rm -f *.lo
284
285 clean-libtool:
286 -rm -rf .libs _libs
287
288 distclean-libtool:
289 -rm -f libtool config.lt
290
291 # This directory's subdirectories are mostly independent; you can cd
292 # into them and run `make' without going through this Makefile.
293 # To change the values of `make' variables: instead of editing Makefiles,
294 # (1) if the variable is set in `config.status', edit `config.status'
295 # (which will cause the Makefiles to be regenerated when you run `make');
296 # (2) otherwise, pass the desired values on the `make' command line.
297 $(RECURSIVE_TARGETS):
298 @fail= failcom='exit 1'; \
299 for f in x $$MAKEFLAGS; do \
300 case $$f in \
301 *=* | --[!k]*);; \
302 *k*) failcom='fail=yes';; \
303 esac; \
304 done; \
305 dot_seen=no; \
306 target=`echo $@ | sed s/-recursive//`; \
307 list='$(SUBDIRS)'; for subdir in $$list; do \
308 echo "Making $$target in $$subdir"; \
309 if test "$$subdir" = "."; then \
310 dot_seen=yes; \
311 local_target="$$target-am"; \
312 else \
313 local_target="$$target"; \
314 fi; \
315 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
316 || eval $$failcom; \
317 done; \
318 if test "$$dot_seen" = "no"; then \
319 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
320 fi; test -z "$$fail"
321
322 $(RECURSIVE_CLEAN_TARGETS):
323 @fail= failcom='exit 1'; \
324 for f in x $$MAKEFLAGS; do \
325 case $$f in \
326 *=* | --[!k]*);; \
327 *k*) failcom='fail=yes';; \
328 esac; \
329 done; \
330 dot_seen=no; \
331 case "$@" in \
332 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
333 *) list='$(SUBDIRS)' ;; \
334 esac; \
335 rev=''; for subdir in $$list; do \
336 if test "$$subdir" = "."; then :; else \
337 rev="$$subdir $$rev"; \
338 fi; \
339 done; \
340 rev="$$rev ."; \
341 target=`echo $@ | sed s/-recursive//`; \
342 for subdir in $$rev; do \
343 echo "Making $$target in $$subdir"; \
344 if test "$$subdir" = "."; then \
345 local_target="$$target-am"; \
346 else \
347 local_target="$$target"; \
348 fi; \
349 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
350 || eval $$failcom; \
351 done && test -z "$$fail"
352 tags-recursive:
353 list='$(SUBDIRS)'; for subdir in $$list; do \
354 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
355 done
356 ctags-recursive:
357 list='$(SUBDIRS)'; for subdir in $$list; do \
358 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
359 done
360
361 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
362 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
363 unique=`for i in $$list; do \
364 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
365 done | \
366 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
367 END { if (nonempty) { for (i in files) print i; }; }'`; \
368 mkid -fID $$unique
369 tags: TAGS
370
371 TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
372 $(TAGS_FILES) $(LISP)
373 set x; \
374 here=`pwd`; \
375 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
376 include_option=--etags-include; \
377 empty_fix=.; \
378 else \
379 include_option=--include; \
380 empty_fix=; \
381 fi; \
382 list='$(SUBDIRS)'; for subdir in $$list; do \
383 if test "$$subdir" = .; then :; else \
384 test ! -f $$subdir/TAGS || \
385 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
386 fi; \
387 done; \
388 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
389 unique=`for i in $$list; do \
390 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
391 done | \
392 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
393 END { if (nonempty) { for (i in files) print i; }; }'`; \
394 shift; \
395 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
396 test -n "$$unique" || unique=$$empty_fix; \
397 if test $$# -gt 0; then \
398 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
399 "$$@" $$unique; \
400 else \
401 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
402 $$unique; \
403 fi; \
404 fi
405 ctags: CTAGS
406 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
407 $(TAGS_FILES) $(LISP)
408 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
409 unique=`for i in $$list; do \
410 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
411 done | \
412 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
413 END { if (nonempty) { for (i in files) print i; }; }'`; \
414 test -z "$(CTAGS_ARGS)$$unique" \
415 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
416 $$unique
417
418 GTAGS:
419 here=`$(am__cd) $(top_builddir) && pwd` \
420 && $(am__cd) $(top_srcdir) \
421 && gtags -i $(GTAGS_ARGS) "$$here"
422
423 distclean-tags:
424 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
425
426 distdir: $(DISTFILES)
427 $(am__remove_distdir)
428 test -d "$(distdir)" || mkdir "$(distdir)"
429 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
430 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
431 list='$(DISTFILES)'; \
432 dist_files=`for file in $$list; do echo $$file; done | \
433 sed -e "s|^$$srcdirstrip/||;t" \
434 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
435 case $$dist_files in \
436 */*) $(MKDIR_P) `echo "$$dist_files" | \
437 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
438 sort -u` ;; \
439 esac; \
440 for file in $$dist_files; do \
441 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
442 if test -d $$d/$$file; then \
443 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
444 if test -d "$(distdir)/$$file"; then \
445 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
446 fi; \
447 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
448 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
449 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
450 fi; \
451 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
452 else \
453 test -f "$(distdir)/$$file" \
454 || cp -p $$d/$$file "$(distdir)/$$file" \
455 || exit 1; \
456 fi; \
457 done
458 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
459 if test "$$subdir" = .; then :; else \
460 test -d "$(distdir)/$$subdir" \
461 || $(MKDIR_P) "$(distdir)/$$subdir" \
462 || exit 1; \
463 fi; \
464 done
465 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
466 if test "$$subdir" = .; then :; else \
467 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
468 $(am__relativize); \
469 new_distdir=$$reldir; \
470 dir1=$$subdir; dir2="$(top_distdir)"; \
471 $(am__relativize); \
472 new_top_distdir=$$reldir; \
473 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
474 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
475 ($(am__cd) $$subdir && \
476 $(MAKE) $(AM_MAKEFLAGS) \
477 top_distdir="$$new_top_distdir" \
478 distdir="$$new_distdir" \
479 am__remove_distdir=: \
480 am__skip_length_check=: \
481 am__skip_mode_fix=: \
482 distdir) \
483 || exit 1; \
484 fi; \
485 done
486 -test -n "$(am__skip_mode_fix)" \
487 || find "$(distdir)" -type d ! -perm -755 \
488 -exec chmod u+rwx,go+rx {} \; -o \
489 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
490 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
491 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
492 || chmod -R a+r "$(distdir)"
493 dist-gzip: distdir
494 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
495 $(am__remove_distdir)
496
497 dist-bzip2: distdir
498 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
499 $(am__remove_distdir)
500
501 dist-lzma: distdir
502 tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
503 $(am__remove_distdir)
504
505 dist-xz: distdir
506 tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
507 $(am__remove_distdir)
508
509 dist-tarZ: distdir
510 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
511 $(am__remove_distdir)
512
513 dist-shar: distdir
514 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
515 $(am__remove_distdir)
516
517 dist-zip: distdir
518 -rm -f $(distdir).zip
519 zip -rq $(distdir).zip $(distdir)
520 $(am__remove_distdir)
521
522 dist dist-all: distdir
523 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
524 $(am__remove_distdir)
525
526 # This target untars the dist file and tries a VPATH configuration. Then
527 # it guarantees that the distribution is self-contained by making another
528 # tarfile.
529 distcheck: dist
530 case '$(DIST_ARCHIVES)' in \
531 *.tar.gz*) \
532 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
533 *.tar.bz2*) \
534 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
535 *.tar.lzma*) \
536 lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
537 *.tar.xz*) \
538 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
539 *.tar.Z*) \
540 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
541 *.shar.gz*) \
542 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
543 *.zip*) \
544 unzip $(distdir).zip ;;\
545 esac
546 chmod -R a-w $(distdir); chmod a+w $(distdir)
547 mkdir $(distdir)/_build
548 mkdir $(distdir)/_inst
549 chmod a-w $(distdir)
550 test -d $(distdir)/_build || exit 0; \
551 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
552 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
553 && am__cwd=`pwd` \
554 && $(am__cd) $(distdir)/_build \
555 && ../configure --srcdir=.. --prefix="$$dc_install_base" \
556 $(DISTCHECK_CONFIGURE_FLAGS) \
557 && $(MAKE) $(AM_MAKEFLAGS) \
558 && $(MAKE) $(AM_MAKEFLAGS) dvi \
559 && $(MAKE) $(AM_MAKEFLAGS) check \
560 && $(MAKE) $(AM_MAKEFLAGS) install \
561 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
562 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
563 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
564 distuninstallcheck \
565 && chmod -R a-w "$$dc_install_base" \
566 && ({ \
567 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
568 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
569 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
570 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
571 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
572 } || { rm -rf "$$dc_destdir"; exit 1; }) \
573 && rm -rf "$$dc_destdir" \
574 && $(MAKE) $(AM_MAKEFLAGS) dist \
575 && rm -rf $(DIST_ARCHIVES) \
576 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
577 && cd "$$am__cwd" \
578 || exit 1
579 $(am__remove_distdir)
580 @(echo "$(distdir) archives ready for distribution: "; \
581 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
582 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
583 distuninstallcheck:
584 @$(am__cd) '$(distuninstallcheck_dir)' \
585 && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
586 || { echo "ERROR: files left after uninstall:" ; \
587 if test -n "$(DESTDIR)"; then \
588 echo " (check DESTDIR support)"; \
589 fi ; \
590 $(distuninstallcheck_listfiles) ; \
591 exit 1; } >&2
592 distcleancheck: distclean
593 @if test '$(srcdir)' = . ; then \
594 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
595 exit 1 ; \
596 fi
597 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
598 || { echo "ERROR: files left in build directory after distclean:" ; \
599 $(distcleancheck_listfiles) ; \
600 exit 1; } >&2
601 check-am: all-am
602 check: check-recursive
603 all-am: Makefile config.h
604 installdirs: installdirs-recursive
605 installdirs-am:
606 install: install-recursive
607 install-exec: install-exec-recursive
608 install-data: install-data-recursive
609 uninstall: uninstall-recursive
610
611 install-am: all-am
612 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
613
614 installcheck: installcheck-recursive
615 install-strip:
616 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
617 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
618 `test -z '$(STRIP)' || \
619 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
620 mostlyclean-generic:
621
622 clean-generic:
623
624 distclean-generic:
625 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
626 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
627
628 maintainer-clean-generic:
629 @echo "This command is intended for maintainers to use"
630 @echo "it deletes files that may require special tools to rebuild."
631 clean: clean-recursive
632
633 clean-am: clean-generic clean-libtool mostlyclean-am
634
635 distclean: distclean-recursive
636 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
637 -rm -f Makefile
638 distclean-am: clean-am distclean-generic distclean-hdr \
639 distclean-libtool distclean-tags
640
641 dvi: dvi-recursive
642
643 dvi-am:
644
645 html: html-recursive
646
647 html-am:
648
649 info: info-recursive
650
651 info-am:
652
653 install-data-am:
654
655 install-dvi: install-dvi-recursive
656
657 install-dvi-am:
658
659 install-exec-am:
660
661 install-html: install-html-recursive
662
663 install-html-am:
664
665 install-info: install-info-recursive
666
667 install-info-am:
668
669 install-man:
670
671 install-pdf: install-pdf-recursive
672
673 install-pdf-am:
674
675 install-ps: install-ps-recursive
676
677 install-ps-am:
678
679 installcheck-am:
680
681 maintainer-clean: maintainer-clean-recursive
682 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
683 -rm -rf $(top_srcdir)/autom4te.cache
684 -rm -f Makefile
685 maintainer-clean-am: distclean-am maintainer-clean-generic
686
687 mostlyclean: mostlyclean-recursive
688
689 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
690
691 pdf: pdf-recursive
692
693 pdf-am:
694
695 ps: ps-recursive
696
697 ps-am:
698
699 uninstall-am:
700
701 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
702 ctags-recursive install-am install-strip tags-recursive
703
704 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
705 all all-am am--refresh check check-am clean clean-generic \
706 clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
707 dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
708 distcheck distclean distclean-generic distclean-hdr \
709 distclean-libtool distclean-tags distcleancheck distdir \
710 distuninstallcheck dvi dvi-am html html-am info info-am \
711 install install-am install-data install-data-am install-dvi \
712 install-dvi-am install-exec install-exec-am install-html \
713 install-html-am install-info install-info-am install-man \
714 install-pdf install-pdf-am install-ps install-ps-am \
715 install-strip installcheck installcheck-am installdirs \
716 installdirs-am maintainer-clean maintainer-clean-generic \
717 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
718 ps ps-am tags tags-recursive uninstall uninstall-am
719
720
721 # Tell versions [3.59,3.63) of GNU make to not export all variables.
722 # Otherwise a system limit (for SysV at least) may be exceeded.
723 .NOEXPORT:
0 NEW in 0.1
1 ==========
2
3 - Initial version.
(New empty file)
0 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
1
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 # PARTICULAR PURPOSE.
12
13 m4_ifndef([AC_AUTOCONF_VERSION],
14 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
15 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
16 [m4_warning([this file was generated for autoconf 2.65.
17 You have another version of autoconf. It may work, but is not guaranteed to.
18 If you have problems, you may need to regenerate the build system entirely.
19 To do so, use the procedure documented by the package, typically `autoreconf'.])])
20
21 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
22 #
23 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
24 # 2006, 2007, 2008 Free Software Foundation, Inc.
25 # Written by Gordon Matzigkeit, 1996
26 #
27 # This file is free software; the Free Software Foundation gives
28 # unlimited permission to copy and/or distribute it, with or without
29 # modifications, as long as this notice is preserved.
30
31 m4_define([_LT_COPYING], [dnl
32 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
33 # 2006, 2007, 2008 Free Software Foundation, Inc.
34 # Written by Gordon Matzigkeit, 1996
35 #
36 # This file is part of GNU Libtool.
37 #
38 # GNU Libtool is free software; you can redistribute it and/or
39 # modify it under the terms of the GNU General Public License as
40 # published by the Free Software Foundation; either version 2 of
41 # the License, or (at your option) any later version.
42 #
43 # As a special exception to the GNU General Public License,
44 # if you distribute this file as part of a program or library that
45 # is built using GNU Libtool, you may include this file under the
46 # same distribution terms that you use for the rest of that program.
47 #
48 # GNU Libtool is distributed in the hope that it will be useful,
49 # but WITHOUT ANY WARRANTY; without even the implied warranty of
50 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51 # GNU General Public License for more details.
52 #
53 # You should have received a copy of the GNU General Public License
54 # along with GNU Libtool; see the file COPYING. If not, a copy
55 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
56 # obtained by writing to the Free Software Foundation, Inc.,
57 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
58 ])
59
60 # serial 56 LT_INIT
61
62
63 # LT_PREREQ(VERSION)
64 # ------------------
65 # Complain and exit if this libtool version is less that VERSION.
66 m4_defun([LT_PREREQ],
67 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
68 [m4_default([$3],
69 [m4_fatal([Libtool version $1 or higher is required],
70 63)])],
71 [$2])])
72
73
74 # _LT_CHECK_BUILDDIR
75 # ------------------
76 # Complain if the absolute build directory name contains unusual characters
77 m4_defun([_LT_CHECK_BUILDDIR],
78 [case `pwd` in
79 *\ * | *\ *)
80 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
81 esac
82 ])
83
84
85 # LT_INIT([OPTIONS])
86 # ------------------
87 AC_DEFUN([LT_INIT],
88 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
89 AC_BEFORE([$0], [LT_LANG])dnl
90 AC_BEFORE([$0], [LT_OUTPUT])dnl
91 AC_BEFORE([$0], [LTDL_INIT])dnl
92 m4_require([_LT_CHECK_BUILDDIR])dnl
93
94 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
95 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
96 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
97 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
98 dnl unless we require an AC_DEFUNed macro:
99 AC_REQUIRE([LTOPTIONS_VERSION])dnl
100 AC_REQUIRE([LTSUGAR_VERSION])dnl
101 AC_REQUIRE([LTVERSION_VERSION])dnl
102 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
103 m4_require([_LT_PROG_LTMAIN])dnl
104
105 dnl Parse OPTIONS
106 _LT_SET_OPTIONS([$0], [$1])
107
108 # This can be used to rebuild libtool when needed
109 LIBTOOL_DEPS="$ltmain"
110
111 # Always use our own libtool.
112 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
113 AC_SUBST(LIBTOOL)dnl
114
115 _LT_SETUP
116
117 # Only expand once:
118 m4_define([LT_INIT])
119 ])# LT_INIT
120
121 # Old names:
122 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
123 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
124 dnl aclocal-1.4 backwards compatibility:
125 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
126 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
127
128
129 # _LT_CC_BASENAME(CC)
130 # -------------------
131 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
132 m4_defun([_LT_CC_BASENAME],
133 [for cc_temp in $1""; do
134 case $cc_temp in
135 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
136 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
137 \-*) ;;
138 *) break;;
139 esac
140 done
141 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
142 ])
143
144
145 # _LT_FILEUTILS_DEFAULTS
146 # ----------------------
147 # It is okay to use these file commands and assume they have been set
148 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
149 m4_defun([_LT_FILEUTILS_DEFAULTS],
150 [: ${CP="cp -f"}
151 : ${MV="mv -f"}
152 : ${RM="rm -f"}
153 ])# _LT_FILEUTILS_DEFAULTS
154
155
156 # _LT_SETUP
157 # ---------
158 m4_defun([_LT_SETUP],
159 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
160 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
161 _LT_DECL([], [host_alias], [0], [The host system])dnl
162 _LT_DECL([], [host], [0])dnl
163 _LT_DECL([], [host_os], [0])dnl
164 dnl
165 _LT_DECL([], [build_alias], [0], [The build system])dnl
166 _LT_DECL([], [build], [0])dnl
167 _LT_DECL([], [build_os], [0])dnl
168 dnl
169 AC_REQUIRE([AC_PROG_CC])dnl
170 AC_REQUIRE([LT_PATH_LD])dnl
171 AC_REQUIRE([LT_PATH_NM])dnl
172 dnl
173 AC_REQUIRE([AC_PROG_LN_S])dnl
174 test -z "$LN_S" && LN_S="ln -s"
175 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
176 dnl
177 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
178 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
179 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
180 dnl
181 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
182 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
183 m4_require([_LT_CMD_RELOAD])dnl
184 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
185 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
186 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
187
188 _LT_CONFIG_LIBTOOL_INIT([
189 # See if we are running on zsh, and set the options which allow our
190 # commands through without removal of \ escapes INIT.
191 if test -n "\${ZSH_VERSION+set}" ; then
192 setopt NO_GLOB_SUBST
193 fi
194 ])
195 if test -n "${ZSH_VERSION+set}" ; then
196 setopt NO_GLOB_SUBST
197 fi
198
199 _LT_CHECK_OBJDIR
200
201 m4_require([_LT_TAG_COMPILER])dnl
202 _LT_PROG_ECHO_BACKSLASH
203
204 case $host_os in
205 aix3*)
206 # AIX sometimes has problems with the GCC collect2 program. For some
207 # reason, if we set the COLLECT_NAMES environment variable, the problems
208 # vanish in a puff of smoke.
209 if test "X${COLLECT_NAMES+set}" != Xset; then
210 COLLECT_NAMES=
211 export COLLECT_NAMES
212 fi
213 ;;
214 esac
215
216 # Sed substitution that helps us do robust quoting. It backslashifies
217 # metacharacters that are still active within double-quoted strings.
218 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
219
220 # Same as above, but do not quote variable references.
221 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
222
223 # Sed substitution to delay expansion of an escaped shell variable in a
224 # double_quote_subst'ed string.
225 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
226
227 # Sed substitution to delay expansion of an escaped single quote.
228 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
229
230 # Sed substitution to avoid accidental globbing in evaled expressions
231 no_glob_subst='s/\*/\\\*/g'
232
233 # Global variables:
234 ofile=libtool
235 can_build_shared=yes
236
237 # All known linkers require a `.a' archive for static linking (except MSVC,
238 # which needs '.lib').
239 libext=a
240
241 with_gnu_ld="$lt_cv_prog_gnu_ld"
242
243 old_CC="$CC"
244 old_CFLAGS="$CFLAGS"
245
246 # Set sane defaults for various variables
247 test -z "$CC" && CC=cc
248 test -z "$LTCC" && LTCC=$CC
249 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
250 test -z "$LD" && LD=ld
251 test -z "$ac_objext" && ac_objext=o
252
253 _LT_CC_BASENAME([$compiler])
254
255 # Only perform the check for file, if the check method requires it
256 test -z "$MAGIC_CMD" && MAGIC_CMD=file
257 case $deplibs_check_method in
258 file_magic*)
259 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
260 _LT_PATH_MAGIC
261 fi
262 ;;
263 esac
264
265 # Use C for the default configuration in the libtool script
266 LT_SUPPORTED_TAG([CC])
267 _LT_LANG_C_CONFIG
268 _LT_LANG_DEFAULT_CONFIG
269 _LT_CONFIG_COMMANDS
270 ])# _LT_SETUP
271
272
273 # _LT_PROG_LTMAIN
274 # ---------------
275 # Note that this code is called both from `configure', and `config.status'
276 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
277 # `config.status' has no value for ac_aux_dir unless we are using Automake,
278 # so we pass a copy along to make sure it has a sensible value anyway.
279 m4_defun([_LT_PROG_LTMAIN],
280 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
281 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
282 ltmain="$ac_aux_dir/ltmain.sh"
283 ])# _LT_PROG_LTMAIN
284
285
286
287 # So that we can recreate a full libtool script including additional
288 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
289 # in macros and then make a single call at the end using the `libtool'
290 # label.
291
292
293 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
294 # ----------------------------------------
295 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
296 m4_define([_LT_CONFIG_LIBTOOL_INIT],
297 [m4_ifval([$1],
298 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
299 [$1
300 ])])])
301
302 # Initialize.
303 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
304
305
306 # _LT_CONFIG_LIBTOOL([COMMANDS])
307 # ------------------------------
308 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
309 m4_define([_LT_CONFIG_LIBTOOL],
310 [m4_ifval([$1],
311 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
312 [$1
313 ])])])
314
315 # Initialize.
316 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
317
318
319 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
320 # -----------------------------------------------------
321 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
322 [_LT_CONFIG_LIBTOOL([$1])
323 _LT_CONFIG_LIBTOOL_INIT([$2])
324 ])
325
326
327 # _LT_FORMAT_COMMENT([COMMENT])
328 # -----------------------------
329 # Add leading comment marks to the start of each line, and a trailing
330 # full-stop to the whole comment if one is not present already.
331 m4_define([_LT_FORMAT_COMMENT],
332 [m4_ifval([$1], [
333 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
334 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
335 )])
336
337
338
339
340
341 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
342 # -------------------------------------------------------------------
343 # CONFIGNAME is the name given to the value in the libtool script.
344 # VARNAME is the (base) name used in the configure script.
345 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
346 # VARNAME. Any other value will be used directly.
347 m4_define([_LT_DECL],
348 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
349 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
350 [m4_ifval([$1], [$1], [$2])])
351 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
352 m4_ifval([$4],
353 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
354 lt_dict_add_subkey([lt_decl_dict], [$2],
355 [tagged?], [m4_ifval([$5], [yes], [no])])])
356 ])
357
358
359 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
360 # --------------------------------------------------------
361 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
362
363
364 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
365 # ------------------------------------------------
366 m4_define([lt_decl_tag_varnames],
367 [_lt_decl_filter([tagged?], [yes], $@)])
368
369
370 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
371 # ---------------------------------------------------------
372 m4_define([_lt_decl_filter],
373 [m4_case([$#],
374 [0], [m4_fatal([$0: too few arguments: $#])],
375 [1], [m4_fatal([$0: too few arguments: $#: $1])],
376 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
377 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
378 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
379 ])
380
381
382 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
383 # --------------------------------------------------
384 m4_define([lt_decl_quote_varnames],
385 [_lt_decl_filter([value], [1], $@)])
386
387
388 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
389 # ---------------------------------------------------
390 m4_define([lt_decl_dquote_varnames],
391 [_lt_decl_filter([value], [2], $@)])
392
393
394 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
395 # ---------------------------------------------------
396 m4_define([lt_decl_varnames_tagged],
397 [m4_assert([$# <= 2])dnl
398 _$0(m4_quote(m4_default([$1], [[, ]])),
399 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
400 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
401 m4_define([_lt_decl_varnames_tagged],
402 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
403
404
405 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
406 # ------------------------------------------------
407 m4_define([lt_decl_all_varnames],
408 [_$0(m4_quote(m4_default([$1], [[, ]])),
409 m4_if([$2], [],
410 m4_quote(lt_decl_varnames),
411 m4_quote(m4_shift($@))))[]dnl
412 ])
413 m4_define([_lt_decl_all_varnames],
414 [lt_join($@, lt_decl_varnames_tagged([$1],
415 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
416 ])
417
418
419 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
420 # ------------------------------------
421 # Quote a variable value, and forward it to `config.status' so that its
422 # declaration there will have the same value as in `configure'. VARNAME
423 # must have a single quote delimited value for this to work.
424 m4_define([_LT_CONFIG_STATUS_DECLARE],
425 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
426
427
428 # _LT_CONFIG_STATUS_DECLARATIONS
429 # ------------------------------
430 # We delimit libtool config variables with single quotes, so when
431 # we write them to config.status, we have to be sure to quote all
432 # embedded single quotes properly. In configure, this macro expands
433 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
434 #
435 # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
436 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
437 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
438 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
439
440
441 # _LT_LIBTOOL_TAGS
442 # ----------------
443 # Output comment and list of tags supported by the script
444 m4_defun([_LT_LIBTOOL_TAGS],
445 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
446 available_tags="_LT_TAGS"dnl
447 ])
448
449
450 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
451 # -----------------------------------
452 # Extract the dictionary values for VARNAME (optionally with TAG) and
453 # expand to a commented shell variable setting:
454 #
455 # # Some comment about what VAR is for.
456 # visible_name=$lt_internal_name
457 m4_define([_LT_LIBTOOL_DECLARE],
458 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
459 [description])))[]dnl
460 m4_pushdef([_libtool_name],
461 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
462 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
463 [0], [_libtool_name=[$]$1],
464 [1], [_libtool_name=$lt_[]$1],
465 [2], [_libtool_name=$lt_[]$1],
466 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
467 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
468 ])
469
470
471 # _LT_LIBTOOL_CONFIG_VARS
472 # -----------------------
473 # Produce commented declarations of non-tagged libtool config variables
474 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
475 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
476 # section) are produced by _LT_LIBTOOL_TAG_VARS.
477 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
478 [m4_foreach([_lt_var],
479 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
480 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
481
482
483 # _LT_LIBTOOL_TAG_VARS(TAG)
484 # -------------------------
485 m4_define([_LT_LIBTOOL_TAG_VARS],
486 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
487 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
488
489
490 # _LT_TAGVAR(VARNAME, [TAGNAME])
491 # ------------------------------
492 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
493
494
495 # _LT_CONFIG_COMMANDS
496 # -------------------
497 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
498 # variables for single and double quote escaping we saved from calls
499 # to _LT_DECL, we can put quote escaped variables declarations
500 # into `config.status', and then the shell code to quote escape them in
501 # for loops in `config.status'. Finally, any additional code accumulated
502 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
503 m4_defun([_LT_CONFIG_COMMANDS],
504 [AC_PROVIDE_IFELSE([LT_OUTPUT],
505 dnl If the libtool generation code has been placed in $CONFIG_LT,
506 dnl instead of duplicating it all over again into config.status,
507 dnl then we will have config.status run $CONFIG_LT later, so it
508 dnl needs to know what name is stored there:
509 [AC_CONFIG_COMMANDS([libtool],
510 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
511 dnl If the libtool generation code is destined for config.status,
512 dnl expand the accumulated commands and init code now:
513 [AC_CONFIG_COMMANDS([libtool],
514 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
515 ])#_LT_CONFIG_COMMANDS
516
517
518 # Initialize.
519 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
520 [
521
522 # The HP-UX ksh and POSIX shell print the target directory to stdout
523 # if CDPATH is set.
524 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
525
526 sed_quote_subst='$sed_quote_subst'
527 double_quote_subst='$double_quote_subst'
528 delay_variable_subst='$delay_variable_subst'
529 _LT_CONFIG_STATUS_DECLARATIONS
530 LTCC='$LTCC'
531 LTCFLAGS='$LTCFLAGS'
532 compiler='$compiler_DEFAULT'
533
534 # Quote evaled strings.
535 for var in lt_decl_all_varnames([[ \
536 ]], lt_decl_quote_varnames); do
537 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
538 *[[\\\\\\\`\\"\\\$]]*)
539 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
540 ;;
541 *)
542 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
543 ;;
544 esac
545 done
546
547 # Double-quote double-evaled strings.
548 for var in lt_decl_all_varnames([[ \
549 ]], lt_decl_dquote_varnames); do
550 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
551 *[[\\\\\\\`\\"\\\$]]*)
552 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
553 ;;
554 *)
555 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
556 ;;
557 esac
558 done
559
560 # Fix-up fallback echo if it was mangled by the above quoting rules.
561 case \$lt_ECHO in
562 *'\\\[$]0 --fallback-echo"')dnl "
563 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
564 ;;
565 esac
566
567 _LT_OUTPUT_LIBTOOL_INIT
568 ])
569
570
571 # LT_OUTPUT
572 # ---------
573 # This macro allows early generation of the libtool script (before
574 # AC_OUTPUT is called), incase it is used in configure for compilation
575 # tests.
576 AC_DEFUN([LT_OUTPUT],
577 [: ${CONFIG_LT=./config.lt}
578 AC_MSG_NOTICE([creating $CONFIG_LT])
579 cat >"$CONFIG_LT" <<_LTEOF
580 #! $SHELL
581 # Generated by $as_me.
582 # Run this file to recreate a libtool stub with the current configuration.
583
584 lt_cl_silent=false
585 SHELL=\${CONFIG_SHELL-$SHELL}
586 _LTEOF
587
588 cat >>"$CONFIG_LT" <<\_LTEOF
589 AS_SHELL_SANITIZE
590 _AS_PREPARE
591
592 exec AS_MESSAGE_FD>&1
593 exec AS_MESSAGE_LOG_FD>>config.log
594 {
595 echo
596 AS_BOX([Running $as_me.])
597 } >&AS_MESSAGE_LOG_FD
598
599 lt_cl_help="\
600 \`$as_me' creates a local libtool stub from the current configuration,
601 for use in further configure time tests before the real libtool is
602 generated.
603
604 Usage: $[0] [[OPTIONS]]
605
606 -h, --help print this help, then exit
607 -V, --version print version number, then exit
608 -q, --quiet do not print progress messages
609 -d, --debug don't remove temporary files
610
611 Report bugs to <bug-libtool@gnu.org>."
612
613 lt_cl_version="\
614 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
615 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
616 configured by $[0], generated by m4_PACKAGE_STRING.
617
618 Copyright (C) 2008 Free Software Foundation, Inc.
619 This config.lt script is free software; the Free Software Foundation
620 gives unlimited permision to copy, distribute and modify it."
621
622 while test $[#] != 0
623 do
624 case $[1] in
625 --version | --v* | -V )
626 echo "$lt_cl_version"; exit 0 ;;
627 --help | --h* | -h )
628 echo "$lt_cl_help"; exit 0 ;;
629 --debug | --d* | -d )
630 debug=: ;;
631 --quiet | --q* | --silent | --s* | -q )
632 lt_cl_silent=: ;;
633
634 -*) AC_MSG_ERROR([unrecognized option: $[1]
635 Try \`$[0] --help' for more information.]) ;;
636
637 *) AC_MSG_ERROR([unrecognized argument: $[1]
638 Try \`$[0] --help' for more information.]) ;;
639 esac
640 shift
641 done
642
643 if $lt_cl_silent; then
644 exec AS_MESSAGE_FD>/dev/null
645 fi
646 _LTEOF
647
648 cat >>"$CONFIG_LT" <<_LTEOF
649 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
650 _LTEOF
651
652 cat >>"$CONFIG_LT" <<\_LTEOF
653 AC_MSG_NOTICE([creating $ofile])
654 _LT_OUTPUT_LIBTOOL_COMMANDS
655 AS_EXIT(0)
656 _LTEOF
657 chmod +x "$CONFIG_LT"
658
659 # configure is writing to config.log, but config.lt does its own redirection,
660 # appending to config.log, which fails on DOS, as config.log is still kept
661 # open by configure. Here we exec the FD to /dev/null, effectively closing
662 # config.log, so it can be properly (re)opened and appended to by config.lt.
663 if test "$no_create" != yes; then
664 lt_cl_success=:
665 test "$silent" = yes &&
666 lt_config_lt_args="$lt_config_lt_args --quiet"
667 exec AS_MESSAGE_LOG_FD>/dev/null
668 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
669 exec AS_MESSAGE_LOG_FD>>config.log
670 $lt_cl_success || AS_EXIT(1)
671 fi
672 ])# LT_OUTPUT
673
674
675 # _LT_CONFIG(TAG)
676 # ---------------
677 # If TAG is the built-in tag, create an initial libtool script with a
678 # default configuration from the untagged config vars. Otherwise add code
679 # to config.status for appending the configuration named by TAG from the
680 # matching tagged config vars.
681 m4_defun([_LT_CONFIG],
682 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
683 _LT_CONFIG_SAVE_COMMANDS([
684 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
685 m4_if(_LT_TAG, [C], [
686 # See if we are running on zsh, and set the options which allow our
687 # commands through without removal of \ escapes.
688 if test -n "${ZSH_VERSION+set}" ; then
689 setopt NO_GLOB_SUBST
690 fi
691
692 cfgfile="${ofile}T"
693 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
694 $RM "$cfgfile"
695
696 cat <<_LT_EOF >> "$cfgfile"
697 #! $SHELL
698
699 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
700 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
701 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
702 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
703 #
704 _LT_COPYING
705 _LT_LIBTOOL_TAGS
706
707 # ### BEGIN LIBTOOL CONFIG
708 _LT_LIBTOOL_CONFIG_VARS
709 _LT_LIBTOOL_TAG_VARS
710 # ### END LIBTOOL CONFIG
711
712 _LT_EOF
713
714 case $host_os in
715 aix3*)
716 cat <<\_LT_EOF >> "$cfgfile"
717 # AIX sometimes has problems with the GCC collect2 program. For some
718 # reason, if we set the COLLECT_NAMES environment variable, the problems
719 # vanish in a puff of smoke.
720 if test "X${COLLECT_NAMES+set}" != Xset; then
721 COLLECT_NAMES=
722 export COLLECT_NAMES
723 fi
724 _LT_EOF
725 ;;
726 esac
727
728 _LT_PROG_LTMAIN
729
730 # We use sed instead of cat because bash on DJGPP gets confused if
731 # if finds mixed CR/LF and LF-only lines. Since sed operates in
732 # text mode, it properly converts lines to CR/LF. This bash problem
733 # is reportedly fixed, but why not run on old versions too?
734 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
735 || (rm -f "$cfgfile"; exit 1)
736
737 _LT_PROG_XSI_SHELLFNS
738
739 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
740 || (rm -f "$cfgfile"; exit 1)
741
742 mv -f "$cfgfile" "$ofile" ||
743 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
744 chmod +x "$ofile"
745 ],
746 [cat <<_LT_EOF >> "$ofile"
747
748 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
749 dnl in a comment (ie after a #).
750 # ### BEGIN LIBTOOL TAG CONFIG: $1
751 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
752 # ### END LIBTOOL TAG CONFIG: $1
753 _LT_EOF
754 ])dnl /m4_if
755 ],
756 [m4_if([$1], [], [
757 PACKAGE='$PACKAGE'
758 VERSION='$VERSION'
759 TIMESTAMP='$TIMESTAMP'
760 RM='$RM'
761 ofile='$ofile'], [])
762 ])dnl /_LT_CONFIG_SAVE_COMMANDS
763 ])# _LT_CONFIG
764
765
766 # LT_SUPPORTED_TAG(TAG)
767 # ---------------------
768 # Trace this macro to discover what tags are supported by the libtool
769 # --tag option, using:
770 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
771 AC_DEFUN([LT_SUPPORTED_TAG], [])
772
773
774 # C support is built-in for now
775 m4_define([_LT_LANG_C_enabled], [])
776 m4_define([_LT_TAGS], [])
777
778
779 # LT_LANG(LANG)
780 # -------------
781 # Enable libtool support for the given language if not already enabled.
782 AC_DEFUN([LT_LANG],
783 [AC_BEFORE([$0], [LT_OUTPUT])dnl
784 m4_case([$1],
785 [C], [_LT_LANG(C)],
786 [C++], [_LT_LANG(CXX)],
787 [Java], [_LT_LANG(GCJ)],
788 [Fortran 77], [_LT_LANG(F77)],
789 [Fortran], [_LT_LANG(FC)],
790 [Windows Resource], [_LT_LANG(RC)],
791 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
792 [_LT_LANG($1)],
793 [m4_fatal([$0: unsupported language: "$1"])])])dnl
794 ])# LT_LANG
795
796
797 # _LT_LANG(LANGNAME)
798 # ------------------
799 m4_defun([_LT_LANG],
800 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
801 [LT_SUPPORTED_TAG([$1])dnl
802 m4_append([_LT_TAGS], [$1 ])dnl
803 m4_define([_LT_LANG_]$1[_enabled], [])dnl
804 _LT_LANG_$1_CONFIG($1)])dnl
805 ])# _LT_LANG
806
807
808 # _LT_LANG_DEFAULT_CONFIG
809 # -----------------------
810 m4_defun([_LT_LANG_DEFAULT_CONFIG],
811 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
812 [LT_LANG(CXX)],
813 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
814
815 AC_PROVIDE_IFELSE([AC_PROG_F77],
816 [LT_LANG(F77)],
817 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
818
819 AC_PROVIDE_IFELSE([AC_PROG_FC],
820 [LT_LANG(FC)],
821 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
822
823 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
824 dnl pulling things in needlessly.
825 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
826 [LT_LANG(GCJ)],
827 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
828 [LT_LANG(GCJ)],
829 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
830 [LT_LANG(GCJ)],
831 [m4_ifdef([AC_PROG_GCJ],
832 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
833 m4_ifdef([A][M_PROG_GCJ],
834 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
835 m4_ifdef([LT_PROG_GCJ],
836 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
837
838 AC_PROVIDE_IFELSE([LT_PROG_RC],
839 [LT_LANG(RC)],
840 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
841 ])# _LT_LANG_DEFAULT_CONFIG
842
843 # Obsolete macros:
844 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
845 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
846 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
847 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
848 dnl aclocal-1.4 backwards compatibility:
849 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
850 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
851 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
852 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
853
854
855 # _LT_TAG_COMPILER
856 # ----------------
857 m4_defun([_LT_TAG_COMPILER],
858 [AC_REQUIRE([AC_PROG_CC])dnl
859
860 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
861 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
862 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
863 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
864
865 # If no C compiler was specified, use CC.
866 LTCC=${LTCC-"$CC"}
867
868 # If no C compiler flags were specified, use CFLAGS.
869 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
870
871 # Allow CC to be a program name with arguments.
872 compiler=$CC
873 ])# _LT_TAG_COMPILER
874
875
876 # _LT_COMPILER_BOILERPLATE
877 # ------------------------
878 # Check for compiler boilerplate output or warnings with
879 # the simple compiler test code.
880 m4_defun([_LT_COMPILER_BOILERPLATE],
881 [m4_require([_LT_DECL_SED])dnl
882 ac_outfile=conftest.$ac_objext
883 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
884 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
885 _lt_compiler_boilerplate=`cat conftest.err`
886 $RM conftest*
887 ])# _LT_COMPILER_BOILERPLATE
888
889
890 # _LT_LINKER_BOILERPLATE
891 # ----------------------
892 # Check for linker boilerplate output or warnings with
893 # the simple link test code.
894 m4_defun([_LT_LINKER_BOILERPLATE],
895 [m4_require([_LT_DECL_SED])dnl
896 ac_outfile=conftest.$ac_objext
897 echo "$lt_simple_link_test_code" >conftest.$ac_ext
898 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
899 _lt_linker_boilerplate=`cat conftest.err`
900 $RM -r conftest*
901 ])# _LT_LINKER_BOILERPLATE
902
903 # _LT_REQUIRED_DARWIN_CHECKS
904 # -------------------------
905 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
906 case $host_os in
907 rhapsody* | darwin*)
908 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
909 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
910 AC_CHECK_TOOL([LIPO], [lipo], [:])
911 AC_CHECK_TOOL([OTOOL], [otool], [:])
912 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
913 _LT_DECL([], [DSYMUTIL], [1],
914 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
915 _LT_DECL([], [NMEDIT], [1],
916 [Tool to change global to local symbols on Mac OS X])
917 _LT_DECL([], [LIPO], [1],
918 [Tool to manipulate fat objects and archives on Mac OS X])
919 _LT_DECL([], [OTOOL], [1],
920 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
921 _LT_DECL([], [OTOOL64], [1],
922 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
923
924 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
925 [lt_cv_apple_cc_single_mod=no
926 if test -z "${LT_MULTI_MODULE}"; then
927 # By default we will add the -single_module flag. You can override
928 # by either setting the environment variable LT_MULTI_MODULE
929 # non-empty at configure time, or by adding -multi_module to the
930 # link flags.
931 rm -rf libconftest.dylib*
932 echo "int foo(void){return 1;}" > conftest.c
933 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
934 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
935 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
936 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
937 _lt_result=$?
938 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
939 lt_cv_apple_cc_single_mod=yes
940 else
941 cat conftest.err >&AS_MESSAGE_LOG_FD
942 fi
943 rm -rf libconftest.dylib*
944 rm -f conftest.*
945 fi])
946 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
947 [lt_cv_ld_exported_symbols_list],
948 [lt_cv_ld_exported_symbols_list=no
949 save_LDFLAGS=$LDFLAGS
950 echo "_main" > conftest.sym
951 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
952 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
953 [lt_cv_ld_exported_symbols_list=yes],
954 [lt_cv_ld_exported_symbols_list=no])
955 LDFLAGS="$save_LDFLAGS"
956 ])
957 case $host_os in
958 rhapsody* | darwin1.[[012]])
959 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
960 darwin1.*)
961 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
962 darwin*) # darwin 5.x on
963 # if running on 10.5 or later, the deployment target defaults
964 # to the OS version, if on x86, and 10.4, the deployment
965 # target defaults to 10.4. Don't you love it?
966 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
967 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
968 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
969 10.[[012]]*)
970 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
971 10.*)
972 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
973 esac
974 ;;
975 esac
976 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
977 _lt_dar_single_mod='$single_module'
978 fi
979 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
980 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
981 else
982 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
983 fi
984 if test "$DSYMUTIL" != ":"; then
985 _lt_dsymutil='~$DSYMUTIL $lib || :'
986 else
987 _lt_dsymutil=
988 fi
989 ;;
990 esac
991 ])
992
993
994 # _LT_DARWIN_LINKER_FEATURES
995 # --------------------------
996 # Checks for linker and compiler features on darwin
997 m4_defun([_LT_DARWIN_LINKER_FEATURES],
998 [
999 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1000 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1001 _LT_TAGVAR(hardcode_direct, $1)=no
1002 _LT_TAGVAR(hardcode_automatic, $1)=yes
1003 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1004 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1005 _LT_TAGVAR(link_all_deplibs, $1)=yes
1006 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1007 case $cc_basename in
1008 ifort*) _lt_dar_can_shared=yes ;;
1009 *) _lt_dar_can_shared=$GCC ;;
1010 esac
1011 if test "$_lt_dar_can_shared" = "yes"; then
1012 output_verbose_link_cmd=echo
1013 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1014 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1015 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1016 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1017 m4_if([$1], [CXX],
1018 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1019 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1020 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1021 fi
1022 ],[])
1023 else
1024 _LT_TAGVAR(ld_shlibs, $1)=no
1025 fi
1026 ])
1027
1028 # _LT_SYS_MODULE_PATH_AIX
1029 # -----------------------
1030 # Links a minimal program and checks the executable
1031 # for the system default hardcoded library path. In most cases,
1032 # this is /usr/lib:/lib, but when the MPI compilers are used
1033 # the location of the communication and MPI libs are included too.
1034 # If we don't find anything, use the default library path according
1035 # to the aix ld manual.
1036 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1037 [m4_require([_LT_DECL_SED])dnl
1038 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1039 lt_aix_libpath_sed='
1040 /Import File Strings/,/^$/ {
1041 /^0/ {
1042 s/^0 *\(.*\)$/\1/
1043 p
1044 }
1045 }'
1046 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1047 # Check for a 64-bit object if we didn't find anything.
1048 if test -z "$aix_libpath"; then
1049 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1050 fi],[])
1051 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1052 ])# _LT_SYS_MODULE_PATH_AIX
1053
1054
1055 # _LT_SHELL_INIT(ARG)
1056 # -------------------
1057 m4_define([_LT_SHELL_INIT],
1058 [ifdef([AC_DIVERSION_NOTICE],
1059 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1060 [AC_DIVERT_PUSH(NOTICE)])
1061 $1
1062 AC_DIVERT_POP
1063 ])# _LT_SHELL_INIT
1064
1065
1066 # _LT_PROG_ECHO_BACKSLASH
1067 # -----------------------
1068 # Add some code to the start of the generated configure script which
1069 # will find an echo command which doesn't interpret backslashes.
1070 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1071 [_LT_SHELL_INIT([
1072 # Check that we are running under the correct shell.
1073 SHELL=${CONFIG_SHELL-/bin/sh}
1074
1075 case X$lt_ECHO in
1076 X*--fallback-echo)
1077 # Remove one level of quotation (which was required for Make).
1078 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1079 ;;
1080 esac
1081
1082 ECHO=${lt_ECHO-echo}
1083 if test "X[$]1" = X--no-reexec; then
1084 # Discard the --no-reexec flag, and continue.
1085 shift
1086 elif test "X[$]1" = X--fallback-echo; then
1087 # Avoid inline document here, it may be left over
1088 :
1089 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1090 # Yippee, $ECHO works!
1091 :
1092 else
1093 # Restart under the correct shell.
1094 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1095 fi
1096
1097 if test "X[$]1" = X--fallback-echo; then
1098 # used as fallback echo
1099 shift
1100 cat <<_LT_EOF
1101 [$]*
1102 _LT_EOF
1103 exit 0
1104 fi
1105
1106 # The HP-UX ksh and POSIX shell print the target directory to stdout
1107 # if CDPATH is set.
1108 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1109
1110 if test -z "$lt_ECHO"; then
1111 if test "X${echo_test_string+set}" != Xset; then
1112 # find a string as large as possible, as long as the shell can cope with it
1113 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1114 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1115 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1116 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1117 then
1118 break
1119 fi
1120 done
1121 fi
1122
1123 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1124 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1125 test "X$echo_testing_string" = "X$echo_test_string"; then
1126 :
1127 else
1128 # The Solaris, AIX, and Digital Unix default echo programs unquote
1129 # backslashes. This makes it impossible to quote backslashes using
1130 # echo "$something" | sed 's/\\/\\\\/g'
1131 #
1132 # So, first we look for a working echo in the user's PATH.
1133
1134 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1135 for dir in $PATH /usr/ucb; do
1136 IFS="$lt_save_ifs"
1137 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1138 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1139 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1140 test "X$echo_testing_string" = "X$echo_test_string"; then
1141 ECHO="$dir/echo"
1142 break
1143 fi
1144 done
1145 IFS="$lt_save_ifs"
1146
1147 if test "X$ECHO" = Xecho; then
1148 # We didn't find a better echo, so look for alternatives.
1149 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1150 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1151 test "X$echo_testing_string" = "X$echo_test_string"; then
1152 # This shell has a builtin print -r that does the trick.
1153 ECHO='print -r'
1154 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1155 test "X$CONFIG_SHELL" != X/bin/ksh; then
1156 # If we have ksh, try running configure again with it.
1157 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1158 export ORIGINAL_CONFIG_SHELL
1159 CONFIG_SHELL=/bin/ksh
1160 export CONFIG_SHELL
1161 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1162 else
1163 # Try using printf.
1164 ECHO='printf %s\n'
1165 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1166 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1167 test "X$echo_testing_string" = "X$echo_test_string"; then
1168 # Cool, printf works
1169 :
1170 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1171 test "X$echo_testing_string" = 'X\t' &&
1172 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1173 test "X$echo_testing_string" = "X$echo_test_string"; then
1174 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1175 export CONFIG_SHELL
1176 SHELL="$CONFIG_SHELL"
1177 export SHELL
1178 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1179 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1180 test "X$echo_testing_string" = 'X\t' &&
1181 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1182 test "X$echo_testing_string" = "X$echo_test_string"; then
1183 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1184 else
1185 # maybe with a smaller string...
1186 prev=:
1187
1188 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1189 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1190 then
1191 break
1192 fi
1193 prev="$cmd"
1194 done
1195
1196 if test "$prev" != 'sed 50q "[$]0"'; then
1197 echo_test_string=`eval $prev`
1198 export echo_test_string
1199 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1200 else
1201 # Oops. We lost completely, so just stick with echo.
1202 ECHO=echo
1203 fi
1204 fi
1205 fi
1206 fi
1207 fi
1208 fi
1209
1210 # Copy echo and quote the copy suitably for passing to libtool from
1211 # the Makefile, instead of quoting the original, which is used later.
1212 lt_ECHO=$ECHO
1213 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1214 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1215 fi
1216
1217 AC_SUBST(lt_ECHO)
1218 ])
1219 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1220 _LT_DECL([], [ECHO], [1],
1221 [An echo program that does not interpret backslashes])
1222 ])# _LT_PROG_ECHO_BACKSLASH
1223
1224
1225 # _LT_ENABLE_LOCK
1226 # ---------------
1227 m4_defun([_LT_ENABLE_LOCK],
1228 [AC_ARG_ENABLE([libtool-lock],
1229 [AS_HELP_STRING([--disable-libtool-lock],
1230 [avoid locking (might break parallel builds)])])
1231 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1232
1233 # Some flags need to be propagated to the compiler or linker for good
1234 # libtool support.
1235 case $host in
1236 ia64-*-hpux*)
1237 # Find out which ABI we are using.
1238 echo 'int i;' > conftest.$ac_ext
1239 if AC_TRY_EVAL(ac_compile); then
1240 case `/usr/bin/file conftest.$ac_objext` in
1241 *ELF-32*)
1242 HPUX_IA64_MODE="32"
1243 ;;
1244 *ELF-64*)
1245 HPUX_IA64_MODE="64"
1246 ;;
1247 esac
1248 fi
1249 rm -rf conftest*
1250 ;;
1251 *-*-irix6*)
1252 # Find out which ABI we are using.
1253 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1254 if AC_TRY_EVAL(ac_compile); then
1255 if test "$lt_cv_prog_gnu_ld" = yes; then
1256 case `/usr/bin/file conftest.$ac_objext` in
1257 *32-bit*)
1258 LD="${LD-ld} -melf32bsmip"
1259 ;;
1260 *N32*)
1261 LD="${LD-ld} -melf32bmipn32"
1262 ;;
1263 *64-bit*)
1264 LD="${LD-ld} -melf64bmip"
1265 ;;
1266 esac
1267 else
1268 case `/usr/bin/file conftest.$ac_objext` in
1269 *32-bit*)
1270 LD="${LD-ld} -32"
1271 ;;
1272 *N32*)
1273 LD="${LD-ld} -n32"
1274 ;;
1275 *64-bit*)
1276 LD="${LD-ld} -64"
1277 ;;
1278 esac
1279 fi
1280 fi
1281 rm -rf conftest*
1282 ;;
1283
1284 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1285 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1286 # Find out which ABI we are using.
1287 echo 'int i;' > conftest.$ac_ext
1288 if AC_TRY_EVAL(ac_compile); then
1289 case `/usr/bin/file conftest.o` in
1290 *32-bit*)
1291 case $host in
1292 x86_64-*kfreebsd*-gnu)
1293 LD="${LD-ld} -m elf_i386_fbsd"
1294 ;;
1295 x86_64-*linux*)
1296 LD="${LD-ld} -m elf_i386"
1297 ;;
1298 ppc64-*linux*|powerpc64-*linux*)
1299 LD="${LD-ld} -m elf32ppclinux"
1300 ;;
1301 s390x-*linux*)
1302 LD="${LD-ld} -m elf_s390"
1303 ;;
1304 sparc64-*linux*)
1305 LD="${LD-ld} -m elf32_sparc"
1306 ;;
1307 esac
1308 ;;
1309 *64-bit*)
1310 case $host in
1311 x86_64-*kfreebsd*-gnu)
1312 LD="${LD-ld} -m elf_x86_64_fbsd"
1313 ;;
1314 x86_64-*linux*)
1315 LD="${LD-ld} -m elf_x86_64"
1316 ;;
1317 ppc*-*linux*|powerpc*-*linux*)
1318 LD="${LD-ld} -m elf64ppc"
1319 ;;
1320 s390*-*linux*|s390*-*tpf*)
1321 LD="${LD-ld} -m elf64_s390"
1322 ;;
1323 sparc*-*linux*)
1324 LD="${LD-ld} -m elf64_sparc"
1325 ;;
1326 esac
1327 ;;
1328 esac
1329 fi
1330 rm -rf conftest*
1331 ;;
1332
1333 *-*-sco3.2v5*)
1334 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1335 SAVE_CFLAGS="$CFLAGS"
1336 CFLAGS="$CFLAGS -belf"
1337 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1338 [AC_LANG_PUSH(C)
1339 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1340 AC_LANG_POP])
1341 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1342 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1343 CFLAGS="$SAVE_CFLAGS"
1344 fi
1345 ;;
1346 sparc*-*solaris*)
1347 # Find out which ABI we are using.
1348 echo 'int i;' > conftest.$ac_ext
1349 if AC_TRY_EVAL(ac_compile); then
1350 case `/usr/bin/file conftest.o` in
1351 *64-bit*)
1352 case $lt_cv_prog_gnu_ld in
1353 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1354 *)
1355 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1356 LD="${LD-ld} -64"
1357 fi
1358 ;;
1359 esac
1360 ;;
1361 esac
1362 fi
1363 rm -rf conftest*
1364 ;;
1365 esac
1366
1367 need_locks="$enable_libtool_lock"
1368 ])# _LT_ENABLE_LOCK
1369
1370
1371 # _LT_CMD_OLD_ARCHIVE
1372 # -------------------
1373 m4_defun([_LT_CMD_OLD_ARCHIVE],
1374 [AC_CHECK_TOOL(AR, ar, false)
1375 test -z "$AR" && AR=ar
1376 test -z "$AR_FLAGS" && AR_FLAGS=cru
1377 _LT_DECL([], [AR], [1], [The archiver])
1378 _LT_DECL([], [AR_FLAGS], [1])
1379
1380 AC_CHECK_TOOL(STRIP, strip, :)
1381 test -z "$STRIP" && STRIP=:
1382 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1383
1384 AC_CHECK_TOOL(RANLIB, ranlib, :)
1385 test -z "$RANLIB" && RANLIB=:
1386 _LT_DECL([], [RANLIB], [1],
1387 [Commands used to install an old-style archive])
1388
1389 # Determine commands to create old-style static archives.
1390 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1391 old_postinstall_cmds='chmod 644 $oldlib'
1392 old_postuninstall_cmds=
1393
1394 if test -n "$RANLIB"; then
1395 case $host_os in
1396 openbsd*)
1397 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1398 ;;
1399 *)
1400 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1401 ;;
1402 esac
1403 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1404 fi
1405 _LT_DECL([], [old_postinstall_cmds], [2])
1406 _LT_DECL([], [old_postuninstall_cmds], [2])
1407 _LT_TAGDECL([], [old_archive_cmds], [2],
1408 [Commands used to build an old-style archive])
1409 ])# _LT_CMD_OLD_ARCHIVE
1410
1411
1412 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1413 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1414 # ----------------------------------------------------------------
1415 # Check whether the given compiler option works
1416 AC_DEFUN([_LT_COMPILER_OPTION],
1417 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1418 m4_require([_LT_DECL_SED])dnl
1419 AC_CACHE_CHECK([$1], [$2],
1420 [$2=no
1421 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1422 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1423 lt_compiler_flag="$3"
1424 # Insert the option either (1) after the last *FLAGS variable, or
1425 # (2) before a word containing "conftest.", or (3) at the end.
1426 # Note that $ac_compile itself does not contain backslashes and begins
1427 # with a dollar sign (not a hyphen), so the echo should work correctly.
1428 # The option is referenced via a variable to avoid confusing sed.
1429 lt_compile=`echo "$ac_compile" | $SED \
1430 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1431 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1432 -e 's:$: $lt_compiler_flag:'`
1433 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1434 (eval "$lt_compile" 2>conftest.err)
1435 ac_status=$?
1436 cat conftest.err >&AS_MESSAGE_LOG_FD
1437 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1438 if (exit $ac_status) && test -s "$ac_outfile"; then
1439 # The compiler can only warn and ignore the option if not recognized
1440 # So say no if there are warnings other than the usual output.
1441 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1442 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1443 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1444 $2=yes
1445 fi
1446 fi
1447 $RM conftest*
1448 ])
1449
1450 if test x"[$]$2" = xyes; then
1451 m4_if([$5], , :, [$5])
1452 else
1453 m4_if([$6], , :, [$6])
1454 fi
1455 ])# _LT_COMPILER_OPTION
1456
1457 # Old name:
1458 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1459 dnl aclocal-1.4 backwards compatibility:
1460 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1461
1462
1463 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1464 # [ACTION-SUCCESS], [ACTION-FAILURE])
1465 # ----------------------------------------------------
1466 # Check whether the given linker option works
1467 AC_DEFUN([_LT_LINKER_OPTION],
1468 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1469 m4_require([_LT_DECL_SED])dnl
1470 AC_CACHE_CHECK([$1], [$2],
1471 [$2=no
1472 save_LDFLAGS="$LDFLAGS"
1473 LDFLAGS="$LDFLAGS $3"
1474 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1475 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1476 # The linker can only warn and ignore the option if not recognized
1477 # So say no if there are warnings
1478 if test -s conftest.err; then
1479 # Append any errors to the config.log.
1480 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1481 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1482 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1483 if diff conftest.exp conftest.er2 >/dev/null; then
1484 $2=yes
1485 fi
1486 else
1487 $2=yes
1488 fi
1489 fi
1490 $RM -r conftest*
1491 LDFLAGS="$save_LDFLAGS"
1492 ])
1493
1494 if test x"[$]$2" = xyes; then
1495 m4_if([$4], , :, [$4])
1496 else
1497 m4_if([$5], , :, [$5])
1498 fi
1499 ])# _LT_LINKER_OPTION
1500
1501 # Old name:
1502 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1503 dnl aclocal-1.4 backwards compatibility:
1504 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1505
1506
1507 # LT_CMD_MAX_LEN
1508 #---------------
1509 AC_DEFUN([LT_CMD_MAX_LEN],
1510 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1511 # find the maximum length of command line arguments
1512 AC_MSG_CHECKING([the maximum length of command line arguments])
1513 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1514 i=0
1515 teststring="ABCD"
1516
1517 case $build_os in
1518 msdosdjgpp*)
1519 # On DJGPP, this test can blow up pretty badly due to problems in libc
1520 # (any single argument exceeding 2000 bytes causes a buffer overrun
1521 # during glob expansion). Even if it were fixed, the result of this
1522 # check would be larger than it should be.
1523 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1524 ;;
1525
1526 gnu*)
1527 # Under GNU Hurd, this test is not required because there is
1528 # no limit to the length of command line arguments.
1529 # Libtool will interpret -1 as no limit whatsoever
1530 lt_cv_sys_max_cmd_len=-1;
1531 ;;
1532
1533 cygwin* | mingw* | cegcc*)
1534 # On Win9x/ME, this test blows up -- it succeeds, but takes
1535 # about 5 minutes as the teststring grows exponentially.
1536 # Worse, since 9x/ME are not pre-emptively multitasking,
1537 # you end up with a "frozen" computer, even though with patience
1538 # the test eventually succeeds (with a max line length of 256k).
1539 # Instead, let's just punt: use the minimum linelength reported by
1540 # all of the supported platforms: 8192 (on NT/2K/XP).
1541 lt_cv_sys_max_cmd_len=8192;
1542 ;;
1543
1544 amigaos*)
1545 # On AmigaOS with pdksh, this test takes hours, literally.
1546 # So we just punt and use a minimum line length of 8192.
1547 lt_cv_sys_max_cmd_len=8192;
1548 ;;
1549
1550 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1551 # This has been around since 386BSD, at least. Likely further.
1552 if test -x /sbin/sysctl; then
1553 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1554 elif test -x /usr/sbin/sysctl; then
1555 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1556 else
1557 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1558 fi
1559 # And add a safety zone
1560 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1561 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1562 ;;
1563
1564 interix*)
1565 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1566 lt_cv_sys_max_cmd_len=196608
1567 ;;
1568
1569 osf*)
1570 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1571 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1572 # nice to cause kernel panics so lets avoid the loop below.
1573 # First set a reasonable default.
1574 lt_cv_sys_max_cmd_len=16384
1575 #
1576 if test -x /sbin/sysconfig; then
1577 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1578 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1579 esac
1580 fi
1581 ;;
1582 sco3.2v5*)
1583 lt_cv_sys_max_cmd_len=102400
1584 ;;
1585 sysv5* | sco5v6* | sysv4.2uw2*)
1586 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1587 if test -n "$kargmax"; then
1588 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1589 else
1590 lt_cv_sys_max_cmd_len=32768
1591 fi
1592 ;;
1593 *)
1594 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1595 if test -n "$lt_cv_sys_max_cmd_len"; then
1596 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1597 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1598 else
1599 # Make teststring a little bigger before we do anything with it.
1600 # a 1K string should be a reasonable start.
1601 for i in 1 2 3 4 5 6 7 8 ; do
1602 teststring=$teststring$teststring
1603 done
1604 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1605 # If test is not a shell built-in, we'll probably end up computing a
1606 # maximum length that is only half of the actual maximum length, but
1607 # we can't tell.
1608 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1609 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1610 test $i != 17 # 1/2 MB should be enough
1611 do
1612 i=`expr $i + 1`
1613 teststring=$teststring$teststring
1614 done
1615 # Only check the string length outside the loop.
1616 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1617 teststring=
1618 # Add a significant safety factor because C++ compilers can tack on
1619 # massive amounts of additional arguments before passing them to the
1620 # linker. It appears as though 1/2 is a usable value.
1621 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1622 fi
1623 ;;
1624 esac
1625 ])
1626 if test -n $lt_cv_sys_max_cmd_len ; then
1627 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1628 else
1629 AC_MSG_RESULT(none)
1630 fi
1631 max_cmd_len=$lt_cv_sys_max_cmd_len
1632 _LT_DECL([], [max_cmd_len], [0],
1633 [What is the maximum length of a command?])
1634 ])# LT_CMD_MAX_LEN
1635
1636 # Old name:
1637 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1638 dnl aclocal-1.4 backwards compatibility:
1639 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1640
1641
1642 # _LT_HEADER_DLFCN
1643 # ----------------
1644 m4_defun([_LT_HEADER_DLFCN],
1645 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1646 ])# _LT_HEADER_DLFCN
1647
1648
1649 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1650 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1651 # ----------------------------------------------------------------
1652 m4_defun([_LT_TRY_DLOPEN_SELF],
1653 [m4_require([_LT_HEADER_DLFCN])dnl
1654 if test "$cross_compiling" = yes; then :
1655 [$4]
1656 else
1657 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1658 lt_status=$lt_dlunknown
1659 cat > conftest.$ac_ext <<_LT_EOF
1660 [#line __oline__ "configure"
1661 #include "confdefs.h"
1662
1663 #if HAVE_DLFCN_H
1664 #include <dlfcn.h>
1665 #endif
1666
1667 #include <stdio.h>
1668
1669 #ifdef RTLD_GLOBAL
1670 # define LT_DLGLOBAL RTLD_GLOBAL
1671 #else
1672 # ifdef DL_GLOBAL
1673 # define LT_DLGLOBAL DL_GLOBAL
1674 # else
1675 # define LT_DLGLOBAL 0
1676 # endif
1677 #endif
1678
1679 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1680 find out it does not work in some platform. */
1681 #ifndef LT_DLLAZY_OR_NOW
1682 # ifdef RTLD_LAZY
1683 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1684 # else
1685 # ifdef DL_LAZY
1686 # define LT_DLLAZY_OR_NOW DL_LAZY
1687 # else
1688 # ifdef RTLD_NOW
1689 # define LT_DLLAZY_OR_NOW RTLD_NOW
1690 # else
1691 # ifdef DL_NOW
1692 # define LT_DLLAZY_OR_NOW DL_NOW
1693 # else
1694 # define LT_DLLAZY_OR_NOW 0
1695 # endif
1696 # endif
1697 # endif
1698 # endif
1699 #endif
1700
1701 void fnord() { int i=42;}
1702 int main ()
1703 {
1704 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1705 int status = $lt_dlunknown;
1706
1707 if (self)
1708 {
1709 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1710 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1711 /* dlclose (self); */
1712 }
1713 else
1714 puts (dlerror ());
1715
1716 return status;
1717 }]
1718 _LT_EOF
1719 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1720 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1721 lt_status=$?
1722 case x$lt_status in
1723 x$lt_dlno_uscore) $1 ;;
1724 x$lt_dlneed_uscore) $2 ;;
1725 x$lt_dlunknown|x*) $3 ;;
1726 esac
1727 else :
1728 # compilation failed
1729 $3
1730 fi
1731 fi
1732 rm -fr conftest*
1733 ])# _LT_TRY_DLOPEN_SELF
1734
1735
1736 # LT_SYS_DLOPEN_SELF
1737 # ------------------
1738 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1739 [m4_require([_LT_HEADER_DLFCN])dnl
1740 if test "x$enable_dlopen" != xyes; then
1741 enable_dlopen=unknown
1742 enable_dlopen_self=unknown
1743 enable_dlopen_self_static=unknown
1744 else
1745 lt_cv_dlopen=no
1746 lt_cv_dlopen_libs=
1747
1748 case $host_os in
1749 beos*)
1750 lt_cv_dlopen="load_add_on"
1751 lt_cv_dlopen_libs=
1752 lt_cv_dlopen_self=yes
1753 ;;
1754
1755 mingw* | pw32* | cegcc*)
1756 lt_cv_dlopen="LoadLibrary"
1757 lt_cv_dlopen_libs=
1758 ;;
1759
1760 cygwin*)
1761 lt_cv_dlopen="dlopen"
1762 lt_cv_dlopen_libs=
1763 ;;
1764
1765 darwin*)
1766 # if libdl is installed we need to link against it
1767 AC_CHECK_LIB([dl], [dlopen],
1768 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1769 lt_cv_dlopen="dyld"
1770 lt_cv_dlopen_libs=
1771 lt_cv_dlopen_self=yes
1772 ])
1773 ;;
1774
1775 *)
1776 AC_CHECK_FUNC([shl_load],
1777 [lt_cv_dlopen="shl_load"],
1778 [AC_CHECK_LIB([dld], [shl_load],
1779 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1780 [AC_CHECK_FUNC([dlopen],
1781 [lt_cv_dlopen="dlopen"],
1782 [AC_CHECK_LIB([dl], [dlopen],
1783 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1784 [AC_CHECK_LIB([svld], [dlopen],
1785 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1786 [AC_CHECK_LIB([dld], [dld_link],
1787 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1788 ])
1789 ])
1790 ])
1791 ])
1792 ])
1793 ;;
1794 esac
1795
1796 if test "x$lt_cv_dlopen" != xno; then
1797 enable_dlopen=yes
1798 else
1799 enable_dlopen=no
1800 fi
1801
1802 case $lt_cv_dlopen in
1803 dlopen)
1804 save_CPPFLAGS="$CPPFLAGS"
1805 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1806
1807 save_LDFLAGS="$LDFLAGS"
1808 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1809
1810 save_LIBS="$LIBS"
1811 LIBS="$lt_cv_dlopen_libs $LIBS"
1812
1813 AC_CACHE_CHECK([whether a program can dlopen itself],
1814 lt_cv_dlopen_self, [dnl
1815 _LT_TRY_DLOPEN_SELF(
1816 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1817 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1818 ])
1819
1820 if test "x$lt_cv_dlopen_self" = xyes; then
1821 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1822 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1823 lt_cv_dlopen_self_static, [dnl
1824 _LT_TRY_DLOPEN_SELF(
1825 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1826 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1827 ])
1828 fi
1829
1830 CPPFLAGS="$save_CPPFLAGS"
1831 LDFLAGS="$save_LDFLAGS"
1832 LIBS="$save_LIBS"
1833 ;;
1834 esac
1835
1836 case $lt_cv_dlopen_self in
1837 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1838 *) enable_dlopen_self=unknown ;;
1839 esac
1840
1841 case $lt_cv_dlopen_self_static in
1842 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1843 *) enable_dlopen_self_static=unknown ;;
1844 esac
1845 fi
1846 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1847 [Whether dlopen is supported])
1848 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1849 [Whether dlopen of programs is supported])
1850 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1851 [Whether dlopen of statically linked programs is supported])
1852 ])# LT_SYS_DLOPEN_SELF
1853
1854 # Old name:
1855 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1856 dnl aclocal-1.4 backwards compatibility:
1857 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1858
1859
1860 # _LT_COMPILER_C_O([TAGNAME])
1861 # ---------------------------
1862 # Check to see if options -c and -o are simultaneously supported by compiler.
1863 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1864 m4_defun([_LT_COMPILER_C_O],
1865 [m4_require([_LT_DECL_SED])dnl
1866 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1867 m4_require([_LT_TAG_COMPILER])dnl
1868 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1869 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1870 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1871 $RM -r conftest 2>/dev/null
1872 mkdir conftest
1873 cd conftest
1874 mkdir out
1875 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1876
1877 lt_compiler_flag="-o out/conftest2.$ac_objext"
1878 # Insert the option either (1) after the last *FLAGS variable, or
1879 # (2) before a word containing "conftest.", or (3) at the end.
1880 # Note that $ac_compile itself does not contain backslashes and begins
1881 # with a dollar sign (not a hyphen), so the echo should work correctly.
1882 lt_compile=`echo "$ac_compile" | $SED \
1883 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1884 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1885 -e 's:$: $lt_compiler_flag:'`
1886 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1887 (eval "$lt_compile" 2>out/conftest.err)
1888 ac_status=$?
1889 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1890 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1891 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1892 then
1893 # The compiler can only warn and ignore the option if not recognized
1894 # So say no if there are warnings
1895 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1896 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1897 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1898 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1899 fi
1900 fi
1901 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1902 $RM conftest*
1903 # SGI C++ compiler will create directory out/ii_files/ for
1904 # template instantiation
1905 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1906 $RM out/* && rmdir out
1907 cd ..
1908 $RM -r conftest
1909 $RM conftest*
1910 ])
1911 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1912 [Does compiler simultaneously support -c and -o options?])
1913 ])# _LT_COMPILER_C_O
1914
1915
1916 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
1917 # ----------------------------------
1918 # Check to see if we can do hard links to lock some files if needed
1919 m4_defun([_LT_COMPILER_FILE_LOCKS],
1920 [m4_require([_LT_ENABLE_LOCK])dnl
1921 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1922 _LT_COMPILER_C_O([$1])
1923
1924 hard_links="nottested"
1925 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1926 # do not overwrite the value of need_locks provided by the user
1927 AC_MSG_CHECKING([if we can lock with hard links])
1928 hard_links=yes
1929 $RM conftest*
1930 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1931 touch conftest.a
1932 ln conftest.a conftest.b 2>&5 || hard_links=no
1933 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1934 AC_MSG_RESULT([$hard_links])
1935 if test "$hard_links" = no; then
1936 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1937 need_locks=warn
1938 fi
1939 else
1940 need_locks=no
1941 fi
1942 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1943 ])# _LT_COMPILER_FILE_LOCKS
1944
1945
1946 # _LT_CHECK_OBJDIR
1947 # ----------------
1948 m4_defun([_LT_CHECK_OBJDIR],
1949 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1950 [rm -f .libs 2>/dev/null
1951 mkdir .libs 2>/dev/null
1952 if test -d .libs; then
1953 lt_cv_objdir=.libs
1954 else
1955 # MS-DOS does not allow filenames that begin with a dot.
1956 lt_cv_objdir=_libs
1957 fi
1958 rmdir .libs 2>/dev/null])
1959 objdir=$lt_cv_objdir
1960 _LT_DECL([], [objdir], [0],
1961 [The name of the directory that contains temporary libtool files])dnl
1962 m4_pattern_allow([LT_OBJDIR])dnl
1963 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1964 [Define to the sub-directory in which libtool stores uninstalled libraries.])
1965 ])# _LT_CHECK_OBJDIR
1966
1967
1968 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1969 # --------------------------------------
1970 # Check hardcoding attributes.
1971 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1972 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1973 _LT_TAGVAR(hardcode_action, $1)=
1974 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1975 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1976 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1977
1978 # We can hardcode non-existent directories.
1979 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1980 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1981 # have to relink, otherwise we might link with an installed library
1982 # when we should be linking with a yet-to-be-installed one
1983 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1984 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1985 # Linking always hardcodes the temporary library directory.
1986 _LT_TAGVAR(hardcode_action, $1)=relink
1987 else
1988 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1989 _LT_TAGVAR(hardcode_action, $1)=immediate
1990 fi
1991 else
1992 # We cannot hardcode anything, or else we can only hardcode existing
1993 # directories.
1994 _LT_TAGVAR(hardcode_action, $1)=unsupported
1995 fi
1996 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1997
1998 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
1999 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2000 # Fast installation is not supported
2001 enable_fast_install=no
2002 elif test "$shlibpath_overrides_runpath" = yes ||
2003 test "$enable_shared" = no; then
2004 # Fast installation is not necessary
2005 enable_fast_install=needless
2006 fi
2007 _LT_TAGDECL([], [hardcode_action], [0],
2008 [How to hardcode a shared library path into an executable])
2009 ])# _LT_LINKER_HARDCODE_LIBPATH
2010
2011
2012 # _LT_CMD_STRIPLIB
2013 # ----------------
2014 m4_defun([_LT_CMD_STRIPLIB],
2015 [m4_require([_LT_DECL_EGREP])
2016 striplib=
2017 old_striplib=
2018 AC_MSG_CHECKING([whether stripping libraries is possible])
2019 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2020 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2021 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2022 AC_MSG_RESULT([yes])
2023 else
2024 # FIXME - insert some real tests, host_os isn't really good enough
2025 case $host_os in
2026 darwin*)
2027 if test -n "$STRIP" ; then
2028 striplib="$STRIP -x"
2029 old_striplib="$STRIP -S"
2030 AC_MSG_RESULT([yes])
2031 else
2032 AC_MSG_RESULT([no])
2033 fi
2034 ;;
2035 *)
2036 AC_MSG_RESULT([no])
2037 ;;
2038 esac
2039 fi
2040 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2041 _LT_DECL([], [striplib], [1])
2042 ])# _LT_CMD_STRIPLIB
2043
2044
2045 # _LT_SYS_DYNAMIC_LINKER([TAG])
2046 # -----------------------------
2047 # PORTME Fill in your ld.so characteristics
2048 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2049 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2050 m4_require([_LT_DECL_EGREP])dnl
2051 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2052 m4_require([_LT_DECL_OBJDUMP])dnl
2053 m4_require([_LT_DECL_SED])dnl
2054 AC_MSG_CHECKING([dynamic linker characteristics])
2055 m4_if([$1],
2056 [], [
2057 if test "$GCC" = yes; then
2058 case $host_os in
2059 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2060 *) lt_awk_arg="/^libraries:/" ;;
2061 esac
2062 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2063 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2064 # if the path contains ";" then we assume it to be the separator
2065 # otherwise default to the standard path separator (i.e. ":") - it is
2066 # assumed that no part of a normal pathname contains ";" but that should
2067 # okay in the real world where ";" in dirpaths is itself problematic.
2068 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2069 else
2070 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2071 fi
2072 # Ok, now we have the path, separated by spaces, we can step through it
2073 # and add multilib dir if necessary.
2074 lt_tmp_lt_search_path_spec=
2075 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2076 for lt_sys_path in $lt_search_path_spec; do
2077 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2078 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2079 else
2080 test -d "$lt_sys_path" && \
2081 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2082 fi
2083 done
2084 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2085 BEGIN {RS=" "; FS="/|\n";} {
2086 lt_foo="";
2087 lt_count=0;
2088 for (lt_i = NF; lt_i > 0; lt_i--) {
2089 if ($lt_i != "" && $lt_i != ".") {
2090 if ($lt_i == "..") {
2091 lt_count++;
2092 } else {
2093 if (lt_count == 0) {
2094 lt_foo="/" $lt_i lt_foo;
2095 } else {
2096 lt_count--;
2097 }
2098 }
2099 }
2100 }
2101 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2102 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2103 }'`
2104 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2105 else
2106 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2107 fi])
2108 library_names_spec=
2109 libname_spec='lib$name'
2110 soname_spec=
2111 shrext_cmds=".so"
2112 postinstall_cmds=
2113 postuninstall_cmds=
2114 finish_cmds=
2115 finish_eval=
2116 shlibpath_var=
2117 shlibpath_overrides_runpath=unknown
2118 version_type=none
2119 dynamic_linker="$host_os ld.so"
2120 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2121 need_lib_prefix=unknown
2122 hardcode_into_libs=no
2123
2124 # when you set need_version to no, make sure it does not cause -set_version
2125 # flags to be left without arguments
2126 need_version=unknown
2127
2128 case $host_os in
2129 aix3*)
2130 version_type=linux
2131 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2132 shlibpath_var=LIBPATH
2133
2134 # AIX 3 has no versioning support, so we append a major version to the name.
2135 soname_spec='${libname}${release}${shared_ext}$major'
2136 ;;
2137
2138 aix[[4-9]]*)
2139 version_type=linux
2140 need_lib_prefix=no
2141 need_version=no
2142 hardcode_into_libs=yes
2143 if test "$host_cpu" = ia64; then
2144 # AIX 5 supports IA64
2145 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2146 shlibpath_var=LD_LIBRARY_PATH
2147 else
2148 # With GCC up to 2.95.x, collect2 would create an import file
2149 # for dependence libraries. The import file would start with
2150 # the line `#! .'. This would cause the generated library to
2151 # depend on `.', always an invalid library. This was fixed in
2152 # development snapshots of GCC prior to 3.0.
2153 case $host_os in
2154 aix4 | aix4.[[01]] | aix4.[[01]].*)
2155 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2156 echo ' yes '
2157 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2158 :
2159 else
2160 can_build_shared=no
2161 fi
2162 ;;
2163 esac
2164 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2165 # soname into executable. Probably we can add versioning support to
2166 # collect2, so additional links can be useful in future.
2167 if test "$aix_use_runtimelinking" = yes; then
2168 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2169 # instead of lib<name>.a to let people know that these are not
2170 # typical AIX shared libraries.
2171 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2172 else
2173 # We preserve .a as extension for shared libraries through AIX4.2
2174 # and later when we are not doing run time linking.
2175 library_names_spec='${libname}${release}.a $libname.a'
2176 soname_spec='${libname}${release}${shared_ext}$major'
2177 fi
2178 shlibpath_var=LIBPATH
2179 fi
2180 ;;
2181
2182 amigaos*)
2183 case $host_cpu in
2184 powerpc)
2185 # Since July 2007 AmigaOS4 officially supports .so libraries.
2186 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2187 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2188 ;;
2189 m68k)
2190 library_names_spec='$libname.ixlibrary $libname.a'
2191 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2192 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'
2193 ;;
2194 esac
2195 ;;
2196
2197 beos*)
2198 library_names_spec='${libname}${shared_ext}'
2199 dynamic_linker="$host_os ld.so"
2200 shlibpath_var=LIBRARY_PATH
2201 ;;
2202
2203 bsdi[[45]]*)
2204 version_type=linux
2205 need_version=no
2206 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2207 soname_spec='${libname}${release}${shared_ext}$major'
2208 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2209 shlibpath_var=LD_LIBRARY_PATH
2210 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2211 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2212 # the default ld.so.conf also contains /usr/contrib/lib and
2213 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2214 # libtool to hard-code these into programs
2215 ;;
2216
2217 cygwin* | mingw* | pw32* | cegcc*)
2218 version_type=windows
2219 shrext_cmds=".dll"
2220 need_version=no
2221 need_lib_prefix=no
2222
2223 case $GCC,$host_os in
2224 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2225 library_names_spec='$libname.dll.a'
2226 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2227 postinstall_cmds='base_file=`basename \${file}`~
2228 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2229 dldir=$destdir/`dirname \$dlpath`~
2230 test -d \$dldir || mkdir -p \$dldir~
2231 $install_prog $dir/$dlname \$dldir/$dlname~
2232 chmod a+x \$dldir/$dlname~
2233 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2234 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2235 fi'
2236 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2237 dlpath=$dir/\$dldll~
2238 $RM \$dlpath'
2239 shlibpath_overrides_runpath=yes
2240
2241 case $host_os in
2242 cygwin*)
2243 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2244 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2245 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2246 ;;
2247 mingw* | cegcc*)
2248 # MinGW DLLs use traditional 'lib' prefix
2249 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2250 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2251 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2252 # It is most probably a Windows format PATH printed by
2253 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2254 # path with ; separators, and with drive letters. We can handle the
2255 # drive letters (cygwin fileutils understands them), so leave them,
2256 # especially as we might pass files found there to a mingw objdump,
2257 # which wouldn't understand a cygwinified path. Ahh.
2258 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2259 else
2260 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2261 fi
2262 ;;
2263 pw32*)
2264 # pw32 DLLs use 'pw' prefix rather than 'lib'
2265 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2266 ;;
2267 esac
2268 ;;
2269
2270 *)
2271 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2272 ;;
2273 esac
2274 dynamic_linker='Win32 ld.exe'
2275 # FIXME: first we should search . and the directory the executable is in
2276 shlibpath_var=PATH
2277 ;;
2278
2279 darwin* | rhapsody*)
2280 dynamic_linker="$host_os dyld"
2281 version_type=darwin
2282 need_lib_prefix=no
2283 need_version=no
2284 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2285 soname_spec='${libname}${release}${major}$shared_ext'
2286 shlibpath_overrides_runpath=yes
2287 shlibpath_var=DYLD_LIBRARY_PATH
2288 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2289 m4_if([$1], [],[
2290 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2291 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2292 ;;
2293
2294 dgux*)
2295 version_type=linux
2296 need_lib_prefix=no
2297 need_version=no
2298 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2299 soname_spec='${libname}${release}${shared_ext}$major'
2300 shlibpath_var=LD_LIBRARY_PATH
2301 ;;
2302
2303 freebsd1*)
2304 dynamic_linker=no
2305 ;;
2306
2307 freebsd* | dragonfly*)
2308 # DragonFly does not have aout. When/if they implement a new
2309 # versioning mechanism, adjust this.
2310 if test -x /usr/bin/objformat; then
2311 objformat=`/usr/bin/objformat`
2312 else
2313 case $host_os in
2314 freebsd[[123]]*) objformat=aout ;;
2315 *) objformat=elf ;;
2316 esac
2317 fi
2318 version_type=freebsd-$objformat
2319 case $version_type in
2320 freebsd-elf*)
2321 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2322 need_version=no
2323 need_lib_prefix=no
2324 ;;
2325 freebsd-*)
2326 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2327 need_version=yes
2328 ;;
2329 esac
2330 shlibpath_var=LD_LIBRARY_PATH
2331 case $host_os in
2332 freebsd2*)
2333 shlibpath_overrides_runpath=yes
2334 ;;
2335 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2336 shlibpath_overrides_runpath=yes
2337 hardcode_into_libs=yes
2338 ;;
2339 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2340 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2341 shlibpath_overrides_runpath=no
2342 hardcode_into_libs=yes
2343 ;;
2344 *) # from 4.6 on, and DragonFly
2345 shlibpath_overrides_runpath=yes
2346 hardcode_into_libs=yes
2347 ;;
2348 esac
2349 ;;
2350
2351 gnu*)
2352 version_type=linux
2353 need_lib_prefix=no
2354 need_version=no
2355 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2356 soname_spec='${libname}${release}${shared_ext}$major'
2357 shlibpath_var=LD_LIBRARY_PATH
2358 hardcode_into_libs=yes
2359 ;;
2360
2361 hpux9* | hpux10* | hpux11*)
2362 # Give a soname corresponding to the major version so that dld.sl refuses to
2363 # link against other versions.
2364 version_type=sunos
2365 need_lib_prefix=no
2366 need_version=no
2367 case $host_cpu in
2368 ia64*)
2369 shrext_cmds='.so'
2370 hardcode_into_libs=yes
2371 dynamic_linker="$host_os dld.so"
2372 shlibpath_var=LD_LIBRARY_PATH
2373 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2374 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2375 soname_spec='${libname}${release}${shared_ext}$major'
2376 if test "X$HPUX_IA64_MODE" = X32; then
2377 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2378 else
2379 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2380 fi
2381 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2382 ;;
2383 hppa*64*)
2384 shrext_cmds='.sl'
2385 hardcode_into_libs=yes
2386 dynamic_linker="$host_os dld.sl"
2387 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2388 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2389 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2390 soname_spec='${libname}${release}${shared_ext}$major'
2391 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2392 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2393 ;;
2394 *)
2395 shrext_cmds='.sl'
2396 dynamic_linker="$host_os dld.sl"
2397 shlibpath_var=SHLIB_PATH
2398 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2399 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2400 soname_spec='${libname}${release}${shared_ext}$major'
2401 ;;
2402 esac
2403 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2404 postinstall_cmds='chmod 555 $lib'
2405 ;;
2406
2407 interix[[3-9]]*)
2408 version_type=linux
2409 need_lib_prefix=no
2410 need_version=no
2411 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2412 soname_spec='${libname}${release}${shared_ext}$major'
2413 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2414 shlibpath_var=LD_LIBRARY_PATH
2415 shlibpath_overrides_runpath=no
2416 hardcode_into_libs=yes
2417 ;;
2418
2419 irix5* | irix6* | nonstopux*)
2420 case $host_os in
2421 nonstopux*) version_type=nonstopux ;;
2422 *)
2423 if test "$lt_cv_prog_gnu_ld" = yes; then
2424 version_type=linux
2425 else
2426 version_type=irix
2427 fi ;;
2428 esac
2429 need_lib_prefix=no
2430 need_version=no
2431 soname_spec='${libname}${release}${shared_ext}$major'
2432 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2433 case $host_os in
2434 irix5* | nonstopux*)
2435 libsuff= shlibsuff=
2436 ;;
2437 *)
2438 case $LD in # libtool.m4 will add one of these switches to LD
2439 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2440 libsuff= shlibsuff= libmagic=32-bit;;
2441 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2442 libsuff=32 shlibsuff=N32 libmagic=N32;;
2443 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2444 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2445 *) libsuff= shlibsuff= libmagic=never-match;;
2446 esac
2447 ;;
2448 esac
2449 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2450 shlibpath_overrides_runpath=no
2451 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2452 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2453 hardcode_into_libs=yes
2454 ;;
2455
2456 # No shared lib support for Linux oldld, aout, or coff.
2457 linux*oldld* | linux*aout* | linux*coff*)
2458 dynamic_linker=no
2459 ;;
2460
2461 # This must be Linux ELF.
2462 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2463 version_type=linux
2464 need_lib_prefix=no
2465 need_version=no
2466 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2467 soname_spec='${libname}${release}${shared_ext}$major'
2468 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2469 shlibpath_var=LD_LIBRARY_PATH
2470 shlibpath_overrides_runpath=no
2471 # Some binutils ld are patched to set DT_RUNPATH
2472 save_LDFLAGS=$LDFLAGS
2473 save_libdir=$libdir
2474 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2475 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2476 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2477 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2478 [shlibpath_overrides_runpath=yes])])
2479 LDFLAGS=$save_LDFLAGS
2480 libdir=$save_libdir
2481
2482 # This implies no fast_install, which is unacceptable.
2483 # Some rework will be needed to allow for fast_install
2484 # before this can be enabled.
2485 hardcode_into_libs=yes
2486
2487 # Append ld.so.conf contents to the search path
2488 if test -f /etc/ld.so.conf; then
2489 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2490 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2491 fi
2492
2493 # We used to test for /lib/ld.so.1 and disable shared libraries on
2494 # powerpc, because MkLinux only supported shared libraries with the
2495 # GNU dynamic linker. Since this was broken with cross compilers,
2496 # most powerpc-linux boxes support dynamic linking these days and
2497 # people can always --disable-shared, the test was removed, and we
2498 # assume the GNU/Linux dynamic linker is in use.
2499 dynamic_linker='GNU/Linux ld.so'
2500 ;;
2501
2502 netbsdelf*-gnu)
2503 version_type=linux
2504 need_lib_prefix=no
2505 need_version=no
2506 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2507 soname_spec='${libname}${release}${shared_ext}$major'
2508 shlibpath_var=LD_LIBRARY_PATH
2509 shlibpath_overrides_runpath=no
2510 hardcode_into_libs=yes
2511 dynamic_linker='NetBSD ld.elf_so'
2512 ;;
2513
2514 netbsd*)
2515 version_type=sunos
2516 need_lib_prefix=no
2517 need_version=no
2518 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2519 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2520 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2521 dynamic_linker='NetBSD (a.out) ld.so'
2522 else
2523 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2524 soname_spec='${libname}${release}${shared_ext}$major'
2525 dynamic_linker='NetBSD ld.elf_so'
2526 fi
2527 shlibpath_var=LD_LIBRARY_PATH
2528 shlibpath_overrides_runpath=yes
2529 hardcode_into_libs=yes
2530 ;;
2531
2532 newsos6)
2533 version_type=linux
2534 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2535 shlibpath_var=LD_LIBRARY_PATH
2536 shlibpath_overrides_runpath=yes
2537 ;;
2538
2539 *nto* | *qnx*)
2540 version_type=qnx
2541 need_lib_prefix=no
2542 need_version=no
2543 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2544 soname_spec='${libname}${release}${shared_ext}$major'
2545 shlibpath_var=LD_LIBRARY_PATH
2546 shlibpath_overrides_runpath=no
2547 hardcode_into_libs=yes
2548 dynamic_linker='ldqnx.so'
2549 ;;
2550
2551 openbsd*)
2552 version_type=sunos
2553 sys_lib_dlsearch_path_spec="/usr/lib"
2554 need_lib_prefix=no
2555 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2556 case $host_os in
2557 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2558 *) need_version=no ;;
2559 esac
2560 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2561 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2562 shlibpath_var=LD_LIBRARY_PATH
2563 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2564 case $host_os in
2565 openbsd2.[[89]] | openbsd2.[[89]].*)
2566 shlibpath_overrides_runpath=no
2567 ;;
2568 *)
2569 shlibpath_overrides_runpath=yes
2570 ;;
2571 esac
2572 else
2573 shlibpath_overrides_runpath=yes
2574 fi
2575 ;;
2576
2577 os2*)
2578 libname_spec='$name'
2579 shrext_cmds=".dll"
2580 need_lib_prefix=no
2581 library_names_spec='$libname${shared_ext} $libname.a'
2582 dynamic_linker='OS/2 ld.exe'
2583 shlibpath_var=LIBPATH
2584 ;;
2585
2586 osf3* | osf4* | osf5*)
2587 version_type=osf
2588 need_lib_prefix=no
2589 need_version=no
2590 soname_spec='${libname}${release}${shared_ext}$major'
2591 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2592 shlibpath_var=LD_LIBRARY_PATH
2593 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2594 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2595 ;;
2596
2597 rdos*)
2598 dynamic_linker=no
2599 ;;
2600
2601 solaris*)
2602 version_type=linux
2603 need_lib_prefix=no
2604 need_version=no
2605 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2606 soname_spec='${libname}${release}${shared_ext}$major'
2607 shlibpath_var=LD_LIBRARY_PATH
2608 shlibpath_overrides_runpath=yes
2609 hardcode_into_libs=yes
2610 # ldd complains unless libraries are executable
2611 postinstall_cmds='chmod +x $lib'
2612 ;;
2613
2614 sunos4*)
2615 version_type=sunos
2616 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2617 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2618 shlibpath_var=LD_LIBRARY_PATH
2619 shlibpath_overrides_runpath=yes
2620 if test "$with_gnu_ld" = yes; then
2621 need_lib_prefix=no
2622 fi
2623 need_version=yes
2624 ;;
2625
2626 sysv4 | sysv4.3*)
2627 version_type=linux
2628 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2629 soname_spec='${libname}${release}${shared_ext}$major'
2630 shlibpath_var=LD_LIBRARY_PATH
2631 case $host_vendor in
2632 sni)
2633 shlibpath_overrides_runpath=no
2634 need_lib_prefix=no
2635 runpath_var=LD_RUN_PATH
2636 ;;
2637 siemens)
2638 need_lib_prefix=no
2639 ;;
2640 motorola)
2641 need_lib_prefix=no
2642 need_version=no
2643 shlibpath_overrides_runpath=no
2644 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2645 ;;
2646 esac
2647 ;;
2648
2649 sysv4*MP*)
2650 if test -d /usr/nec ;then
2651 version_type=linux
2652 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2653 soname_spec='$libname${shared_ext}.$major'
2654 shlibpath_var=LD_LIBRARY_PATH
2655 fi
2656 ;;
2657
2658 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2659 version_type=freebsd-elf
2660 need_lib_prefix=no
2661 need_version=no
2662 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2663 soname_spec='${libname}${release}${shared_ext}$major'
2664 shlibpath_var=LD_LIBRARY_PATH
2665 shlibpath_overrides_runpath=yes
2666 hardcode_into_libs=yes
2667 if test "$with_gnu_ld" = yes; then
2668 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2669 else
2670 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2671 case $host_os in
2672 sco3.2v5*)
2673 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2674 ;;
2675 esac
2676 fi
2677 sys_lib_dlsearch_path_spec='/usr/lib'
2678 ;;
2679
2680 tpf*)
2681 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2682 version_type=linux
2683 need_lib_prefix=no
2684 need_version=no
2685 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2686 shlibpath_var=LD_LIBRARY_PATH
2687 shlibpath_overrides_runpath=no
2688 hardcode_into_libs=yes
2689 ;;
2690
2691 uts4*)
2692 version_type=linux
2693 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2694 soname_spec='${libname}${release}${shared_ext}$major'
2695 shlibpath_var=LD_LIBRARY_PATH
2696 ;;
2697
2698 *)
2699 dynamic_linker=no
2700 ;;
2701 esac
2702 AC_MSG_RESULT([$dynamic_linker])
2703 test "$dynamic_linker" = no && can_build_shared=no
2704
2705 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2706 if test "$GCC" = yes; then
2707 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2708 fi
2709
2710 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2711 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2712 fi
2713 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2714 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2715 fi
2716
2717 _LT_DECL([], [variables_saved_for_relink], [1],
2718 [Variables whose values should be saved in libtool wrapper scripts and
2719 restored at link time])
2720 _LT_DECL([], [need_lib_prefix], [0],
2721 [Do we need the "lib" prefix for modules?])
2722 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2723 _LT_DECL([], [version_type], [0], [Library versioning type])
2724 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2725 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2726 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2727 [Is shlibpath searched before the hard-coded library search path?])
2728 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2729 _LT_DECL([], [library_names_spec], [1],
2730 [[List of archive names. First name is the real one, the rest are links.
2731 The last name is the one that the linker finds with -lNAME]])
2732 _LT_DECL([], [soname_spec], [1],
2733 [[The coded name of the library, if different from the real name]])
2734 _LT_DECL([], [postinstall_cmds], [2],
2735 [Command to use after installation of a shared archive])
2736 _LT_DECL([], [postuninstall_cmds], [2],
2737 [Command to use after uninstallation of a shared archive])
2738 _LT_DECL([], [finish_cmds], [2],
2739 [Commands used to finish a libtool library installation in a directory])
2740 _LT_DECL([], [finish_eval], [1],
2741 [[As "finish_cmds", except a single script fragment to be evaled but
2742 not shown]])
2743 _LT_DECL([], [hardcode_into_libs], [0],
2744 [Whether we should hardcode library paths into libraries])
2745 _LT_DECL([], [sys_lib_search_path_spec], [2],
2746 [Compile-time system search path for libraries])
2747 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2748 [Run-time system search path for libraries])
2749 ])# _LT_SYS_DYNAMIC_LINKER
2750
2751
2752 # _LT_PATH_TOOL_PREFIX(TOOL)
2753 # --------------------------
2754 # find a file program which can recognize shared library
2755 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2756 [m4_require([_LT_DECL_EGREP])dnl
2757 AC_MSG_CHECKING([for $1])
2758 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2759 [case $MAGIC_CMD in
2760 [[\\/*] | ?:[\\/]*])
2761 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2762 ;;
2763 *)
2764 lt_save_MAGIC_CMD="$MAGIC_CMD"
2765 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2766 dnl $ac_dummy forces splitting on constant user-supplied paths.
2767 dnl POSIX.2 word splitting is done only on the output of word expansions,
2768 dnl not every word. This closes a longstanding sh security hole.
2769 ac_dummy="m4_if([$2], , $PATH, [$2])"
2770 for ac_dir in $ac_dummy; do
2771 IFS="$lt_save_ifs"
2772 test -z "$ac_dir" && ac_dir=.
2773 if test -f $ac_dir/$1; then
2774 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2775 if test -n "$file_magic_test_file"; then
2776 case $deplibs_check_method in
2777 "file_magic "*)
2778 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2779 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2780 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2781 $EGREP "$file_magic_regex" > /dev/null; then
2782 :
2783 else
2784 cat <<_LT_EOF 1>&2
2785
2786 *** Warning: the command libtool uses to detect shared libraries,
2787 *** $file_magic_cmd, produces output that libtool cannot recognize.
2788 *** The result is that libtool may fail to recognize shared libraries
2789 *** as such. This will affect the creation of libtool libraries that
2790 *** depend on shared libraries, but programs linked with such libtool
2791 *** libraries will work regardless of this problem. Nevertheless, you
2792 *** may want to report the problem to your system manager and/or to
2793 *** bug-libtool@gnu.org
2794
2795 _LT_EOF
2796 fi ;;
2797 esac
2798 fi
2799 break
2800 fi
2801 done
2802 IFS="$lt_save_ifs"
2803 MAGIC_CMD="$lt_save_MAGIC_CMD"
2804 ;;
2805 esac])
2806 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2807 if test -n "$MAGIC_CMD"; then
2808 AC_MSG_RESULT($MAGIC_CMD)
2809 else
2810 AC_MSG_RESULT(no)
2811 fi
2812 _LT_DECL([], [MAGIC_CMD], [0],
2813 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2814 ])# _LT_PATH_TOOL_PREFIX
2815
2816 # Old name:
2817 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2818 dnl aclocal-1.4 backwards compatibility:
2819 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2820
2821
2822 # _LT_PATH_MAGIC
2823 # --------------
2824 # find a file program which can recognize a shared library
2825 m4_defun([_LT_PATH_MAGIC],
2826 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2827 if test -z "$lt_cv_path_MAGIC_CMD"; then
2828 if test -n "$ac_tool_prefix"; then
2829 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2830 else
2831 MAGIC_CMD=:
2832 fi
2833 fi
2834 ])# _LT_PATH_MAGIC
2835
2836
2837 # LT_PATH_LD
2838 # ----------
2839 # find the pathname to the GNU or non-GNU linker
2840 AC_DEFUN([LT_PATH_LD],
2841 [AC_REQUIRE([AC_PROG_CC])dnl
2842 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2843 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2844 m4_require([_LT_DECL_SED])dnl
2845 m4_require([_LT_DECL_EGREP])dnl
2846
2847 AC_ARG_WITH([gnu-ld],
2848 [AS_HELP_STRING([--with-gnu-ld],
2849 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2850 [test "$withval" = no || with_gnu_ld=yes],
2851 [with_gnu_ld=no])dnl
2852
2853 ac_prog=ld
2854 if test "$GCC" = yes; then
2855 # Check if gcc -print-prog-name=ld gives a path.
2856 AC_MSG_CHECKING([for ld used by $CC])
2857 case $host in
2858 *-*-mingw*)
2859 # gcc leaves a trailing carriage return which upsets mingw
2860 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2861 *)
2862 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2863 esac
2864 case $ac_prog in
2865 # Accept absolute paths.
2866 [[\\/]]* | ?:[[\\/]]*)
2867 re_direlt='/[[^/]][[^/]]*/\.\./'
2868 # Canonicalize the pathname of ld
2869 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2870 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2871 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2872 done
2873 test -z "$LD" && LD="$ac_prog"
2874 ;;
2875 "")
2876 # If it fails, then pretend we aren't using GCC.
2877 ac_prog=ld
2878 ;;
2879 *)
2880 # If it is relative, then search for the first ld in PATH.
2881 with_gnu_ld=unknown
2882 ;;
2883 esac
2884 elif test "$with_gnu_ld" = yes; then
2885 AC_MSG_CHECKING([for GNU ld])
2886 else
2887 AC_MSG_CHECKING([for non-GNU ld])
2888 fi
2889 AC_CACHE_VAL(lt_cv_path_LD,
2890 [if test -z "$LD"; then
2891 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2892 for ac_dir in $PATH; do
2893 IFS="$lt_save_ifs"
2894 test -z "$ac_dir" && ac_dir=.
2895 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2896 lt_cv_path_LD="$ac_dir/$ac_prog"
2897 # Check to see if the program is GNU ld. I'd rather use --version,
2898 # but apparently some variants of GNU ld only accept -v.
2899 # Break only if it was the GNU/non-GNU ld that we prefer.
2900 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2901 *GNU* | *'with BFD'*)
2902 test "$with_gnu_ld" != no && break
2903 ;;
2904 *)
2905 test "$with_gnu_ld" != yes && break
2906 ;;
2907 esac
2908 fi
2909 done
2910 IFS="$lt_save_ifs"
2911 else
2912 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2913 fi])
2914 LD="$lt_cv_path_LD"
2915 if test -n "$LD"; then
2916 AC_MSG_RESULT($LD)
2917 else
2918 AC_MSG_RESULT(no)
2919 fi
2920 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2921 _LT_PATH_LD_GNU
2922 AC_SUBST([LD])
2923
2924 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2925 ])# LT_PATH_LD
2926
2927 # Old names:
2928 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2929 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2930 dnl aclocal-1.4 backwards compatibility:
2931 dnl AC_DEFUN([AM_PROG_LD], [])
2932 dnl AC_DEFUN([AC_PROG_LD], [])
2933
2934
2935 # _LT_PATH_LD_GNU
2936 #- --------------
2937 m4_defun([_LT_PATH_LD_GNU],
2938 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2939 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2940 case `$LD -v 2>&1 </dev/null` in
2941 *GNU* | *'with BFD'*)
2942 lt_cv_prog_gnu_ld=yes
2943 ;;
2944 *)
2945 lt_cv_prog_gnu_ld=no
2946 ;;
2947 esac])
2948 with_gnu_ld=$lt_cv_prog_gnu_ld
2949 ])# _LT_PATH_LD_GNU
2950
2951
2952 # _LT_CMD_RELOAD
2953 # --------------
2954 # find reload flag for linker
2955 # -- PORTME Some linkers may need a different reload flag.
2956 m4_defun([_LT_CMD_RELOAD],
2957 [AC_CACHE_CHECK([for $LD option to reload object files],
2958 lt_cv_ld_reload_flag,
2959 [lt_cv_ld_reload_flag='-r'])
2960 reload_flag=$lt_cv_ld_reload_flag
2961 case $reload_flag in
2962 "" | " "*) ;;
2963 *) reload_flag=" $reload_flag" ;;
2964 esac
2965 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2966 case $host_os in
2967 darwin*)
2968 if test "$GCC" = yes; then
2969 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2970 else
2971 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2972 fi
2973 ;;
2974 esac
2975 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2976 _LT_DECL([], [reload_cmds], [2])dnl
2977 ])# _LT_CMD_RELOAD
2978
2979
2980 # _LT_CHECK_MAGIC_METHOD
2981 # ----------------------
2982 # how to check for library dependencies
2983 # -- PORTME fill in with the dynamic library characteristics
2984 m4_defun([_LT_CHECK_MAGIC_METHOD],
2985 [m4_require([_LT_DECL_EGREP])
2986 m4_require([_LT_DECL_OBJDUMP])
2987 AC_CACHE_CHECK([how to recognize dependent libraries],
2988 lt_cv_deplibs_check_method,
2989 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2990 lt_cv_file_magic_test_file=
2991 lt_cv_deplibs_check_method='unknown'
2992 # Need to set the preceding variable on all platforms that support
2993 # interlibrary dependencies.
2994 # 'none' -- dependencies not supported.
2995 # `unknown' -- same as none, but documents that we really don't know.
2996 # 'pass_all' -- all dependencies passed with no checks.
2997 # 'test_compile' -- check by making test program.
2998 # 'file_magic [[regex]]' -- check by looking for files in library path
2999 # which responds to the $file_magic_cmd with a given extended regex.
3000 # If you have `file' or equivalent on your system and you're not sure
3001 # whether `pass_all' will *always* work, you probably want this one.
3002
3003 case $host_os in
3004 aix[[4-9]]*)
3005 lt_cv_deplibs_check_method=pass_all
3006 ;;
3007
3008 beos*)
3009 lt_cv_deplibs_check_method=pass_all
3010 ;;
3011
3012 bsdi[[45]]*)
3013 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3014 lt_cv_file_magic_cmd='/usr/bin/file -L'
3015 lt_cv_file_magic_test_file=/shlib/libc.so
3016 ;;
3017
3018 cygwin*)
3019 # func_win32_libid is a shell function defined in ltmain.sh
3020 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3021 lt_cv_file_magic_cmd='func_win32_libid'
3022 ;;
3023
3024 mingw* | pw32*)
3025 # Base MSYS/MinGW do not provide the 'file' command needed by
3026 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3027 # unless we find 'file', for example because we are cross-compiling.
3028 if ( file / ) >/dev/null 2>&1; then
3029 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3030 lt_cv_file_magic_cmd='func_win32_libid'
3031 else
3032 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3033 lt_cv_file_magic_cmd='$OBJDUMP -f'
3034 fi
3035 ;;
3036
3037 cegcc)
3038 # use the weaker test based on 'objdump'. See mingw*.
3039 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3040 lt_cv_file_magic_cmd='$OBJDUMP -f'
3041 ;;
3042
3043 darwin* | rhapsody*)
3044 lt_cv_deplibs_check_method=pass_all
3045 ;;
3046
3047 freebsd* | dragonfly*)
3048 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3049 case $host_cpu in
3050 i*86 )
3051 # Not sure whether the presence of OpenBSD here was a mistake.
3052 # Let's accept both of them until this is cleared up.
3053 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3054 lt_cv_file_magic_cmd=/usr/bin/file
3055 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3056 ;;
3057 esac
3058 else
3059 lt_cv_deplibs_check_method=pass_all
3060 fi
3061 ;;
3062
3063 gnu*)
3064 lt_cv_deplibs_check_method=pass_all
3065 ;;
3066
3067 hpux10.20* | hpux11*)
3068 lt_cv_file_magic_cmd=/usr/bin/file
3069 case $host_cpu in
3070 ia64*)
3071 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3072 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3073 ;;
3074 hppa*64*)
3075 [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]']
3076 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3077 ;;
3078 *)
3079 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3080 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3081 ;;
3082 esac
3083 ;;
3084
3085 interix[[3-9]]*)
3086 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3087 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3088 ;;
3089
3090 irix5* | irix6* | nonstopux*)
3091 case $LD in
3092 *-32|*"-32 ") libmagic=32-bit;;
3093 *-n32|*"-n32 ") libmagic=N32;;
3094 *-64|*"-64 ") libmagic=64-bit;;
3095 *) libmagic=never-match;;
3096 esac
3097 lt_cv_deplibs_check_method=pass_all
3098 ;;
3099
3100 # This must be Linux ELF.
3101 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3102 lt_cv_deplibs_check_method=pass_all
3103 ;;
3104
3105 netbsd* | netbsdelf*-gnu)
3106 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3107 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3108 else
3109 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3110 fi
3111 ;;
3112
3113 newos6*)
3114 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3115 lt_cv_file_magic_cmd=/usr/bin/file
3116 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3117 ;;
3118
3119 *nto* | *qnx*)
3120 lt_cv_deplibs_check_method=pass_all
3121 ;;
3122
3123 openbsd*)
3124 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3125 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3126 else
3127 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3128 fi
3129 ;;
3130
3131 osf3* | osf4* | osf5*)
3132 lt_cv_deplibs_check_method=pass_all
3133 ;;
3134
3135 rdos*)
3136 lt_cv_deplibs_check_method=pass_all
3137 ;;
3138
3139 solaris*)
3140 lt_cv_deplibs_check_method=pass_all
3141 ;;
3142
3143 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3144 lt_cv_deplibs_check_method=pass_all
3145 ;;
3146
3147 sysv4 | sysv4.3*)
3148 case $host_vendor in
3149 motorola)
3150 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]]'
3151 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3152 ;;
3153 ncr)
3154 lt_cv_deplibs_check_method=pass_all
3155 ;;
3156 sequent)
3157 lt_cv_file_magic_cmd='/bin/file'
3158 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3159 ;;
3160 sni)
3161 lt_cv_file_magic_cmd='/bin/file'
3162 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3163 lt_cv_file_magic_test_file=/lib/libc.so
3164 ;;
3165 siemens)
3166 lt_cv_deplibs_check_method=pass_all
3167 ;;
3168 pc)
3169 lt_cv_deplibs_check_method=pass_all
3170 ;;
3171 esac
3172 ;;
3173
3174 tpf*)
3175 lt_cv_deplibs_check_method=pass_all
3176 ;;
3177 esac
3178 ])
3179 file_magic_cmd=$lt_cv_file_magic_cmd
3180 deplibs_check_method=$lt_cv_deplibs_check_method
3181 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3182
3183 _LT_DECL([], [deplibs_check_method], [1],
3184 [Method to check whether dependent libraries are shared objects])
3185 _LT_DECL([], [file_magic_cmd], [1],
3186 [Command to use when deplibs_check_method == "file_magic"])
3187 ])# _LT_CHECK_MAGIC_METHOD
3188
3189
3190 # LT_PATH_NM
3191 # ----------
3192 # find the pathname to a BSD- or MS-compatible name lister
3193 AC_DEFUN([LT_PATH_NM],
3194 [AC_REQUIRE([AC_PROG_CC])dnl
3195 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3196 [if test -n "$NM"; then
3197 # Let the user override the test.
3198 lt_cv_path_NM="$NM"
3199 else
3200 lt_nm_to_check="${ac_tool_prefix}nm"
3201 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3202 lt_nm_to_check="$lt_nm_to_check nm"
3203 fi
3204 for lt_tmp_nm in $lt_nm_to_check; do
3205 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3206 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3207 IFS="$lt_save_ifs"
3208 test -z "$ac_dir" && ac_dir=.
3209 tmp_nm="$ac_dir/$lt_tmp_nm"
3210 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3211 # Check to see if the nm accepts a BSD-compat flag.
3212 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3213 # nm: unknown option "B" ignored
3214 # Tru64's nm complains that /dev/null is an invalid object file
3215 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3216 */dev/null* | *'Invalid file or object type'*)
3217 lt_cv_path_NM="$tmp_nm -B"
3218 break
3219 ;;
3220 *)
3221 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3222 */dev/null*)
3223 lt_cv_path_NM="$tmp_nm -p"
3224 break
3225 ;;
3226 *)
3227 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3228 continue # so that we can try to find one that supports BSD flags
3229 ;;
3230 esac
3231 ;;
3232 esac
3233 fi
3234 done
3235 IFS="$lt_save_ifs"
3236 done
3237 : ${lt_cv_path_NM=no}
3238 fi])
3239 if test "$lt_cv_path_NM" != "no"; then
3240 NM="$lt_cv_path_NM"
3241 else
3242 # Didn't find any BSD compatible name lister, look for dumpbin.
3243 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3244 AC_SUBST([DUMPBIN])
3245 if test "$DUMPBIN" != ":"; then
3246 NM="$DUMPBIN"
3247 fi
3248 fi
3249 test -z "$NM" && NM=nm
3250 AC_SUBST([NM])
3251 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3252
3253 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3254 [lt_cv_nm_interface="BSD nm"
3255 echo "int some_variable = 0;" > conftest.$ac_ext
3256 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3257 (eval "$ac_compile" 2>conftest.err)
3258 cat conftest.err >&AS_MESSAGE_LOG_FD
3259 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3260 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3261 cat conftest.err >&AS_MESSAGE_LOG_FD
3262 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3263 cat conftest.out >&AS_MESSAGE_LOG_FD
3264 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3265 lt_cv_nm_interface="MS dumpbin"
3266 fi
3267 rm -f conftest*])
3268 ])# LT_PATH_NM
3269
3270 # Old names:
3271 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3272 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3273 dnl aclocal-1.4 backwards compatibility:
3274 dnl AC_DEFUN([AM_PROG_NM], [])
3275 dnl AC_DEFUN([AC_PROG_NM], [])
3276
3277
3278 # LT_LIB_M
3279 # --------
3280 # check for math library
3281 AC_DEFUN([LT_LIB_M],
3282 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3283 LIBM=
3284 case $host in
3285 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3286 # These system don't have libm, or don't need it
3287 ;;
3288 *-ncr-sysv4.3*)
3289 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3290 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3291 ;;
3292 *)
3293 AC_CHECK_LIB(m, cos, LIBM="-lm")
3294 ;;
3295 esac
3296 AC_SUBST([LIBM])
3297 ])# LT_LIB_M
3298
3299 # Old name:
3300 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3301 dnl aclocal-1.4 backwards compatibility:
3302 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3303
3304
3305 # _LT_COMPILER_NO_RTTI([TAGNAME])
3306 # -------------------------------
3307 m4_defun([_LT_COMPILER_NO_RTTI],
3308 [m4_require([_LT_TAG_COMPILER])dnl
3309
3310 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3311
3312 if test "$GCC" = yes; then
3313 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3314
3315 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3316 lt_cv_prog_compiler_rtti_exceptions,
3317 [-fno-rtti -fno-exceptions], [],
3318 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3319 fi
3320 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3321 [Compiler flag to turn off builtin functions])
3322 ])# _LT_COMPILER_NO_RTTI
3323
3324
3325 # _LT_CMD_GLOBAL_SYMBOLS
3326 # ----------------------
3327 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3328 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3329 AC_REQUIRE([AC_PROG_CC])dnl
3330 AC_REQUIRE([LT_PATH_NM])dnl
3331 AC_REQUIRE([LT_PATH_LD])dnl
3332 m4_require([_LT_DECL_SED])dnl
3333 m4_require([_LT_DECL_EGREP])dnl
3334 m4_require([_LT_TAG_COMPILER])dnl
3335
3336 # Check for command to grab the raw symbol name followed by C symbol from nm.
3337 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3338 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3339 [
3340 # These are sane defaults that work on at least a few old systems.
3341 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3342
3343 # Character class describing NM global symbol codes.
3344 symcode='[[BCDEGRST]]'
3345
3346 # Regexp to match symbols that can be accessed directly from C.
3347 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3348
3349 # Define system-specific variables.
3350 case $host_os in
3351 aix*)
3352 symcode='[[BCDT]]'
3353 ;;
3354 cygwin* | mingw* | pw32* | cegcc*)
3355 symcode='[[ABCDGISTW]]'
3356 ;;
3357 hpux*)
3358 if test "$host_cpu" = ia64; then
3359 symcode='[[ABCDEGRST]]'
3360 fi
3361 ;;
3362 irix* | nonstopux*)
3363 symcode='[[BCDEGRST]]'
3364 ;;
3365 osf*)
3366 symcode='[[BCDEGQRST]]'
3367 ;;
3368 solaris*)
3369 symcode='[[BDRT]]'
3370 ;;
3371 sco3.2v5*)
3372 symcode='[[DT]]'
3373 ;;
3374 sysv4.2uw2*)
3375 symcode='[[DT]]'
3376 ;;
3377 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3378 symcode='[[ABDT]]'
3379 ;;
3380 sysv4)
3381 symcode='[[DFNSTU]]'
3382 ;;
3383 esac
3384
3385 # If we're using GNU nm, then use its standard symbol codes.
3386 case `$NM -V 2>&1` in
3387 *GNU* | *'with BFD'*)
3388 symcode='[[ABCDGIRSTW]]' ;;
3389 esac
3390
3391 # Transform an extracted symbol line into a proper C declaration.
3392 # Some systems (esp. on ia64) link data and code symbols differently,
3393 # so use this general approach.
3394 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3395
3396 # Transform an extracted symbol line into symbol name and symbol address
3397 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3398 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3399
3400 # Handle CRLF in mingw tool chain
3401 opt_cr=
3402 case $build_os in
3403 mingw*)
3404 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3405 ;;
3406 esac
3407
3408 # Try without a prefix underscore, then with it.
3409 for ac_symprfx in "" "_"; do
3410
3411 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3412 symxfrm="\\1 $ac_symprfx\\2 \\2"
3413
3414 # Write the raw and C identifiers.
3415 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3416 # Fake it for dumpbin and say T for any non-static function
3417 # and D for any global variable.
3418 # Also find C++ and __fastcall symbols from MSVC++,
3419 # which start with @ or ?.
3420 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3421 " {last_section=section; section=\$ 3};"\
3422 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3423 " \$ 0!~/External *\|/{next};"\
3424 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3425 " {if(hide[section]) next};"\
3426 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3427 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3428 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3429 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3430 " ' prfx=^$ac_symprfx]"
3431 else
3432 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3433 fi
3434
3435 # Check to see that the pipe works correctly.
3436 pipe_works=no
3437
3438 rm -f conftest*
3439 cat > conftest.$ac_ext <<_LT_EOF
3440 #ifdef __cplusplus
3441 extern "C" {
3442 #endif
3443 char nm_test_var;
3444 void nm_test_func(void);
3445 void nm_test_func(void){}
3446 #ifdef __cplusplus
3447 }
3448 #endif
3449 int main(){nm_test_var='a';nm_test_func();return(0);}
3450 _LT_EOF
3451
3452 if AC_TRY_EVAL(ac_compile); then
3453 # Now try to grab the symbols.
3454 nlist=conftest.nm
3455 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3456 # Try sorting and uniquifying the output.
3457 if sort "$nlist" | uniq > "$nlist"T; then
3458 mv -f "$nlist"T "$nlist"
3459 else
3460 rm -f "$nlist"T
3461 fi
3462
3463 # Make sure that we snagged all the symbols we need.
3464 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3465 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3466 cat <<_LT_EOF > conftest.$ac_ext
3467 #ifdef __cplusplus
3468 extern "C" {
3469 #endif
3470
3471 _LT_EOF
3472 # Now generate the symbol file.
3473 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3474
3475 cat <<_LT_EOF >> conftest.$ac_ext
3476
3477 /* The mapping between symbol names and symbols. */
3478 const struct {
3479 const char *name;
3480 void *address;
3481 }
3482 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3483 {
3484 { "@PROGRAM@", (void *) 0 },
3485 _LT_EOF
3486 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3487 cat <<\_LT_EOF >> conftest.$ac_ext
3488 {0, (void *) 0}
3489 };
3490
3491 /* This works around a problem in FreeBSD linker */
3492 #ifdef FREEBSD_WORKAROUND
3493 static const void *lt_preloaded_setup() {
3494 return lt__PROGRAM__LTX_preloaded_symbols;
3495 }
3496 #endif
3497
3498 #ifdef __cplusplus
3499 }
3500 #endif
3501 _LT_EOF
3502 # Now try linking the two files.
3503 mv conftest.$ac_objext conftstm.$ac_objext
3504 lt_save_LIBS="$LIBS"
3505 lt_save_CFLAGS="$CFLAGS"
3506 LIBS="conftstm.$ac_objext"
3507 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3508 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3509 pipe_works=yes
3510 fi
3511 LIBS="$lt_save_LIBS"
3512 CFLAGS="$lt_save_CFLAGS"
3513 else
3514 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3515 fi
3516 else
3517 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3518 fi
3519 else
3520 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3521 fi
3522 else
3523 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3524 cat conftest.$ac_ext >&5
3525 fi
3526 rm -rf conftest* conftst*
3527
3528 # Do not use the global_symbol_pipe unless it works.
3529 if test "$pipe_works" = yes; then
3530 break
3531 else
3532 lt_cv_sys_global_symbol_pipe=
3533 fi
3534 done
3535 ])
3536 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3537 lt_cv_sys_global_symbol_to_cdecl=
3538 fi
3539 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3540 AC_MSG_RESULT(failed)
3541 else
3542 AC_MSG_RESULT(ok)
3543 fi
3544
3545 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3546 [Take the output of nm and produce a listing of raw symbols and C names])
3547 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3548 [Transform the output of nm in a proper C declaration])
3549 _LT_DECL([global_symbol_to_c_name_address],
3550 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3551 [Transform the output of nm in a C name address pair])
3552 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3553 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3554 [Transform the output of nm in a C name address pair when lib prefix is needed])
3555 ]) # _LT_CMD_GLOBAL_SYMBOLS
3556
3557
3558 # _LT_COMPILER_PIC([TAGNAME])
3559 # ---------------------------
3560 m4_defun([_LT_COMPILER_PIC],
3561 [m4_require([_LT_TAG_COMPILER])dnl
3562 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3563 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3564 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3565
3566 AC_MSG_CHECKING([for $compiler option to produce PIC])
3567 m4_if([$1], [CXX], [
3568 # C++ specific cases for pic, static, wl, etc.
3569 if test "$GXX" = yes; then
3570 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3571 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3572
3573 case $host_os in
3574 aix*)
3575 # All AIX code is PIC.
3576 if test "$host_cpu" = ia64; then
3577 # AIX 5 now supports IA64 processor
3578 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3579 fi
3580 ;;
3581
3582 amigaos*)
3583 case $host_cpu in
3584 powerpc)
3585 # see comment about AmigaOS4 .so support
3586 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3587 ;;
3588 m68k)
3589 # FIXME: we need at least 68020 code to build shared libraries, but
3590 # adding the `-m68020' flag to GCC prevents building anything better,
3591 # like `-m68040'.
3592 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3593 ;;
3594 esac
3595 ;;
3596
3597 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3598 # PIC is the default for these OSes.
3599 ;;
3600 mingw* | cygwin* | os2* | pw32* | cegcc*)
3601 # This hack is so that the source file can tell whether it is being
3602 # built for inclusion in a dll (and should export symbols for example).
3603 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3604 # (--disable-auto-import) libraries
3605 m4_if([$1], [GCJ], [],
3606 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3607 ;;
3608 darwin* | rhapsody*)
3609 # PIC is the default on this platform
3610 # Common symbols not allowed in MH_DYLIB files
3611 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3612 ;;
3613 *djgpp*)
3614 # DJGPP does not support shared libraries at all
3615 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3616 ;;
3617 interix[[3-9]]*)
3618 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3619 # Instead, we relocate shared libraries at runtime.
3620 ;;
3621 sysv4*MP*)
3622 if test -d /usr/nec; then
3623 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3624 fi
3625 ;;
3626 hpux*)
3627 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3628 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3629 # sets the default TLS model and affects inlining.
3630 case $host_cpu in
3631 hppa*64*)
3632 ;;
3633 *)
3634 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3635 ;;
3636 esac
3637 ;;
3638 *qnx* | *nto*)
3639 # QNX uses GNU C++, but need to define -shared option too, otherwise
3640 # it will coredump.
3641 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3642 ;;
3643 *)
3644 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3645 ;;
3646 esac
3647 else
3648 case $host_os in
3649 aix[[4-9]]*)
3650 # All AIX code is PIC.
3651 if test "$host_cpu" = ia64; then
3652 # AIX 5 now supports IA64 processor
3653 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3654 else
3655 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3656 fi
3657 ;;
3658 chorus*)
3659 case $cc_basename in
3660 cxch68*)
3661 # Green Hills C++ Compiler
3662 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
3663 ;;
3664 esac
3665 ;;
3666 dgux*)
3667 case $cc_basename in
3668 ec++*)
3669 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3670 ;;
3671 ghcx*)
3672 # Green Hills C++ Compiler
3673 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3674 ;;
3675 *)
3676 ;;
3677 esac
3678 ;;
3679 freebsd* | dragonfly*)
3680 # FreeBSD uses GNU C++
3681 ;;
3682 hpux9* | hpux10* | hpux11*)
3683 case $cc_basename in
3684 CC*)
3685 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3686 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3687 if test "$host_cpu" != ia64; then
3688 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3689 fi
3690 ;;
3691 aCC*)
3692 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3693 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3694 case $host_cpu in
3695 hppa*64*|ia64*)
3696 # +Z the default
3697 ;;
3698 *)
3699 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3700 ;;
3701 esac
3702 ;;
3703 *)
3704 ;;
3705 esac
3706 ;;
3707 interix*)
3708 # This is c89, which is MS Visual C++ (no shared libs)
3709 # Anyone wants to do a port?
3710 ;;
3711 irix5* | irix6* | nonstopux*)
3712 case $cc_basename in
3713 CC*)
3714 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3715 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3716 # CC pic flag -KPIC is the default.
3717 ;;
3718 *)
3719 ;;
3720 esac
3721 ;;
3722 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3723 case $cc_basename in
3724 KCC*)
3725 # KAI C++ Compiler
3726 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3727 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3728 ;;
3729 ecpc* )
3730 # old Intel C++ for x86_64 which still supported -KPIC.
3731 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3732 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3733 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3734 ;;
3735 icpc* )
3736 # Intel C++, used to be incompatible with GCC.
3737 # ICC 10 doesn't accept -KPIC any more.
3738 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3739 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3740 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3741 ;;
3742 pgCC* | pgcpp*)
3743 # Portland Group C++ compiler
3744 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3745 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3746 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3747 ;;
3748 cxx*)
3749 # Compaq C++
3750 # Make sure the PIC flag is empty. It appears that all Alpha
3751 # Linux and Compaq Tru64 Unix objects are PIC.
3752 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3753 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3754 ;;
3755 xlc* | xlC*)
3756 # IBM XL 8.0 on PPC
3757 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3758 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3759 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3760 ;;
3761 *)
3762 case `$CC -V 2>&1 | sed 5q` in
3763 *Sun\ C*)
3764 # Sun C++ 5.9
3765 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3766 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3767 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3768 ;;
3769 esac
3770 ;;
3771 esac
3772 ;;
3773 lynxos*)
3774 ;;
3775 m88k*)
3776 ;;
3777 mvs*)
3778 case $cc_basename in
3779 cxx*)
3780 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3781 ;;
3782 *)
3783 ;;
3784 esac
3785 ;;
3786 netbsd* | netbsdelf*-gnu)
3787 ;;
3788 *qnx* | *nto*)
3789 # QNX uses GNU C++, but need to define -shared option too, otherwise
3790 # it will coredump.
3791 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3792 ;;
3793 osf3* | osf4* | osf5*)
3794 case $cc_basename in
3795 KCC*)
3796 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3797 ;;
3798 RCC*)
3799 # Rational C++ 2.4.1
3800 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3801 ;;
3802 cxx*)
3803 # Digital/Compaq C++
3804 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3805 # Make sure the PIC flag is empty. It appears that all Alpha
3806 # Linux and Compaq Tru64 Unix objects are PIC.
3807 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3808 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3809 ;;
3810 *)
3811 ;;
3812 esac
3813 ;;
3814 psos*)
3815 ;;
3816 solaris*)
3817 case $cc_basename in
3818 CC*)
3819 # Sun C++ 4.2, 5.x and Centerline C++
3820 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3821 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3822 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3823 ;;
3824 gcx*)
3825 # Green Hills C++ Compiler
3826 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3827 ;;
3828 *)
3829 ;;
3830 esac
3831 ;;
3832 sunos4*)
3833 case $cc_basename in
3834 CC*)
3835 # Sun C++ 4.x
3836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3838 ;;
3839 lcc*)
3840 # Lucid
3841 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3842 ;;
3843 *)
3844 ;;
3845 esac
3846 ;;
3847 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3848 case $cc_basename in
3849 CC*)
3850 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3851 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3852 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3853 ;;
3854 esac
3855 ;;
3856 tandem*)
3857 case $cc_basename in
3858 NCC*)
3859 # NonStop-UX NCC 3.20
3860 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3861 ;;
3862 *)
3863 ;;
3864 esac
3865 ;;
3866 vxworks*)
3867 ;;
3868 *)
3869 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3870 ;;
3871 esac
3872 fi
3873 ],
3874 [
3875 if test "$GCC" = yes; then
3876 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3877 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3878
3879 case $host_os in
3880 aix*)
3881 # All AIX code is PIC.
3882 if test "$host_cpu" = ia64; then
3883 # AIX 5 now supports IA64 processor
3884 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3885 fi
3886 ;;
3887
3888 amigaos*)
3889 case $host_cpu in
3890 powerpc)
3891 # see comment about AmigaOS4 .so support
3892 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3893 ;;
3894 m68k)
3895 # FIXME: we need at least 68020 code to build shared libraries, but
3896 # adding the `-m68020' flag to GCC prevents building anything better,
3897 # like `-m68040'.
3898 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3899 ;;
3900 esac
3901 ;;
3902
3903 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3904 # PIC is the default for these OSes.
3905 ;;
3906
3907 mingw* | cygwin* | pw32* | os2* | cegcc*)
3908 # This hack is so that the source file can tell whether it is being
3909 # built for inclusion in a dll (and should export symbols for example).
3910 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3911 # (--disable-auto-import) libraries
3912 m4_if([$1], [GCJ], [],
3913 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3914 ;;
3915
3916 darwin* | rhapsody*)
3917 # PIC is the default on this platform
3918 # Common symbols not allowed in MH_DYLIB files
3919 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3920 ;;
3921
3922 hpux*)
3923 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3924 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3925 # sets the default TLS model and affects inlining.
3926 case $host_cpu in
3927 hppa*64*)
3928 # +Z the default
3929 ;;
3930 *)
3931 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3932 ;;
3933 esac
3934 ;;
3935
3936 interix[[3-9]]*)
3937 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3938 # Instead, we relocate shared libraries at runtime.
3939 ;;
3940
3941 msdosdjgpp*)
3942 # Just because we use GCC doesn't mean we suddenly get shared libraries
3943 # on systems that don't support them.
3944 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3945 enable_shared=no
3946 ;;
3947
3948 *nto* | *qnx*)
3949 # QNX uses GNU C++, but need to define -shared option too, otherwise
3950 # it will coredump.
3951 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3952 ;;
3953
3954 sysv4*MP*)
3955 if test -d /usr/nec; then
3956 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3957 fi
3958 ;;
3959
3960 *)
3961 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3962 ;;
3963 esac
3964 else
3965 # PORTME Check for flag to pass linker flags through the system compiler.
3966 case $host_os in
3967 aix*)
3968 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3969 if test "$host_cpu" = ia64; then
3970 # AIX 5 now supports IA64 processor
3971 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3972 else
3973 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3974 fi
3975 ;;
3976
3977 mingw* | cygwin* | pw32* | os2* | cegcc*)
3978 # This hack is so that the source file can tell whether it is being
3979 # built for inclusion in a dll (and should export symbols for example).
3980 m4_if([$1], [GCJ], [],
3981 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3982 ;;
3983
3984 hpux9* | hpux10* | hpux11*)
3985 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3986 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3987 # not for PA HP-UX.
3988 case $host_cpu in
3989 hppa*64*|ia64*)
3990 # +Z the default
3991 ;;
3992 *)
3993 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3994 ;;
3995 esac
3996 # Is there a better lt_prog_compiler_static that works with the bundled CC?
3997 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3998 ;;
3999
4000 irix5* | irix6* | nonstopux*)
4001 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4002 # PIC (with -KPIC) is the default.
4003 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4004 ;;
4005
4006 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4007 case $cc_basename in
4008 # old Intel for x86_64 which still supported -KPIC.
4009 ecc*)
4010 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4011 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4012 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4013 ;;
4014 # icc used to be incompatible with GCC.
4015 # ICC 10 doesn't accept -KPIC any more.
4016 icc* | ifort*)
4017 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4018 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4019 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4020 ;;
4021 # Lahey Fortran 8.1.
4022 lf95*)
4023 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4024 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4025 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4026 ;;
4027 pgcc* | pgf77* | pgf90* | pgf95*)
4028 # Portland Group compilers (*not* the Pentium gcc compiler,
4029 # which looks to be a dead project)
4030 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4031 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4032 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4033 ;;
4034 ccc*)
4035 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4036 # All Alpha code is PIC.
4037 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4038 ;;
4039 xl*)
4040 # IBM XL C 8.0/Fortran 10.1 on PPC
4041 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4042 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4043 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4044 ;;
4045 *)
4046 case `$CC -V 2>&1 | sed 5q` in
4047 *Sun\ C*)
4048 # Sun C 5.9
4049 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4050 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4051 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4052 ;;
4053 *Sun\ F*)
4054 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4055 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4056 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4057 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4058 ;;
4059 esac
4060 ;;
4061 esac
4062 ;;
4063
4064 newsos6)
4065 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4066 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4067 ;;
4068
4069 *nto* | *qnx*)
4070 # QNX uses GNU C++, but need to define -shared option too, otherwise
4071 # it will coredump.
4072 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4073 ;;
4074
4075 osf3* | osf4* | osf5*)
4076 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4077 # All OSF/1 code is PIC.
4078 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4079 ;;
4080
4081 rdos*)
4082 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4083 ;;
4084
4085 solaris*)
4086 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4087 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4088 case $cc_basename in
4089 f77* | f90* | f95*)
4090 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4091 *)
4092 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4093 esac
4094 ;;
4095
4096 sunos4*)
4097 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4098 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4099 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4100 ;;
4101
4102 sysv4 | sysv4.2uw2* | sysv4.3*)
4103 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4104 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4105 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4106 ;;
4107
4108 sysv4*MP*)
4109 if test -d /usr/nec ;then
4110 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4111 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4112 fi
4113 ;;
4114
4115 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4116 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4117 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4118 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4119 ;;
4120
4121 unicos*)
4122 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4123 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4124 ;;
4125
4126 uts4*)
4127 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4128 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4129 ;;
4130
4131 *)
4132 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4133 ;;
4134 esac
4135 fi
4136 ])
4137 case $host_os in
4138 # For platforms which do not support PIC, -DPIC is meaningless:
4139 *djgpp*)
4140 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4141 ;;
4142 *)
4143 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4144 ;;
4145 esac
4146 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4147 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4148 [How to pass a linker flag through the compiler])
4149
4150 #
4151 # Check to make sure the PIC flag actually works.
4152 #
4153 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4154 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4155 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4156 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4157 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4158 "" | " "*) ;;
4159 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4160 esac],
4161 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4162 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4163 fi
4164 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4165 [Additional compiler flags for building library objects])
4166
4167 #
4168 # Check to make sure the static flag actually works.
4169 #
4170 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4171 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4172 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4173 $lt_tmp_static_flag,
4174 [],
4175 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4176 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4177 [Compiler flag to prevent dynamic linking])
4178 ])# _LT_COMPILER_PIC
4179
4180
4181 # _LT_LINKER_SHLIBS([TAGNAME])
4182 # ----------------------------
4183 # See if the linker supports building shared libraries.
4184 m4_defun([_LT_LINKER_SHLIBS],
4185 [AC_REQUIRE([LT_PATH_LD])dnl
4186 AC_REQUIRE([LT_PATH_NM])dnl
4187 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4188 m4_require([_LT_DECL_EGREP])dnl
4189 m4_require([_LT_DECL_SED])dnl
4190 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4191 m4_require([_LT_TAG_COMPILER])dnl
4192 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4193 m4_if([$1], [CXX], [
4194 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4195 case $host_os in
4196 aix[[4-9]]*)
4197 # If we're using GNU nm, then we don't want the "-C" option.
4198 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4199 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4200 _LT_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'
4201 else
4202 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4203 fi
4204 ;;
4205 pw32*)
4206 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4207 ;;
4208 cygwin* | mingw* | cegcc*)
4209 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4210 ;;
4211 linux* | k*bsd*-gnu)
4212 _LT_TAGVAR(link_all_deplibs, $1)=no
4213 ;;
4214 *)
4215 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4216 ;;
4217 esac
4218 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4219 ], [
4220 runpath_var=
4221 _LT_TAGVAR(allow_undefined_flag, $1)=
4222 _LT_TAGVAR(always_export_symbols, $1)=no
4223 _LT_TAGVAR(archive_cmds, $1)=
4224 _LT_TAGVAR(archive_expsym_cmds, $1)=
4225 _LT_TAGVAR(compiler_needs_object, $1)=no
4226 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4227 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4228 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4229 _LT_TAGVAR(hardcode_automatic, $1)=no
4230 _LT_TAGVAR(hardcode_direct, $1)=no
4231 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4232 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4233 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4234 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4235 _LT_TAGVAR(hardcode_minus_L, $1)=no
4236 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4237 _LT_TAGVAR(inherit_rpath, $1)=no
4238 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4239 _LT_TAGVAR(module_cmds, $1)=
4240 _LT_TAGVAR(module_expsym_cmds, $1)=
4241 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4242 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4243 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4244 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4245 # include_expsyms should be a list of space-separated symbols to be *always*
4246 # included in the symbol list
4247 _LT_TAGVAR(include_expsyms, $1)=
4248 # exclude_expsyms can be an extended regexp of symbols to exclude
4249 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4250 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4251 # as well as any symbol that contains `d'.
4252 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4253 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4254 # platforms (ab)use it in PIC code, but their linkers get confused if
4255 # the symbol is explicitly referenced. Since portable code cannot
4256 # rely on this symbol name, it's probably fine to never include it in
4257 # preloaded symbol tables.
4258 # Exclude shared library initialization/finalization symbols.
4259 dnl Note also adjust exclude_expsyms for C++ above.
4260 extract_expsyms_cmds=
4261
4262 case $host_os in
4263 cygwin* | mingw* | pw32* | cegcc*)
4264 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4265 # When not using gcc, we currently assume that we are using
4266 # Microsoft Visual C++.
4267 if test "$GCC" != yes; then
4268 with_gnu_ld=no
4269 fi
4270 ;;
4271 interix*)
4272 # we just hope/assume this is gcc and not c89 (= MSVC++)
4273 with_gnu_ld=yes
4274 ;;
4275 openbsd*)
4276 with_gnu_ld=no
4277 ;;
4278 linux* | k*bsd*-gnu)
4279 _LT_TAGVAR(link_all_deplibs, $1)=no
4280 ;;
4281 esac
4282
4283 _LT_TAGVAR(ld_shlibs, $1)=yes
4284 if test "$with_gnu_ld" = yes; then
4285 # If archive_cmds runs LD, not CC, wlarc should be empty
4286 wlarc='${wl}'
4287
4288 # Set some defaults for GNU ld with shared library support. These
4289 # are reset later if shared libraries are not supported. Putting them
4290 # here allows them to be overridden if necessary.
4291 runpath_var=LD_RUN_PATH
4292 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4293 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4294 # ancient GNU ld didn't support --whole-archive et. al.
4295 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4296 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4297 else
4298 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4299 fi
4300 supports_anon_versioning=no
4301 case `$LD -v 2>&1` in
4302 *GNU\ gold*) supports_anon_versioning=yes ;;
4303 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4304 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4305 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4306 *\ 2.11.*) ;; # other 2.11 versions
4307 *) supports_anon_versioning=yes ;;
4308 esac
4309
4310 # See if GNU ld supports shared libraries.
4311 case $host_os in
4312 aix[[3-9]]*)
4313 # On AIX/PPC, the GNU linker is very broken
4314 if test "$host_cpu" != ia64; then
4315 _LT_TAGVAR(ld_shlibs, $1)=no
4316 cat <<_LT_EOF 1>&2
4317
4318 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4319 *** to be unable to reliably create shared libraries on AIX.
4320 *** Therefore, libtool is disabling shared libraries support. If you
4321 *** really care for shared libraries, you may want to modify your PATH
4322 *** so that a non-GNU linker is found, and then restart.
4323
4324 _LT_EOF
4325 fi
4326 ;;
4327
4328 amigaos*)
4329 case $host_cpu in
4330 powerpc)
4331 # see comment about AmigaOS4 .so support
4332 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4333 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4334 ;;
4335 m68k)
4336 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4337 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4338 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4339 ;;
4340 esac
4341 ;;
4342
4343 beos*)
4344 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4345 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4346 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4347 # support --undefined. This deserves some investigation. FIXME
4348 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4349 else
4350 _LT_TAGVAR(ld_shlibs, $1)=no
4351 fi
4352 ;;
4353
4354 cygwin* | mingw* | pw32* | cegcc*)
4355 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4356 # as there is no search path for DLLs.
4357 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4358 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4359 _LT_TAGVAR(always_export_symbols, $1)=no
4360 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4361 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
4362
4363 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4364 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4365 # If the export-symbols file already is a .def file (1st line
4366 # is EXPORTS), use it as is; otherwise, prepend...
4367 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4368 cp $export_symbols $output_objdir/$soname.def;
4369 else
4370 echo EXPORTS > $output_objdir/$soname.def;
4371 cat $export_symbols >> $output_objdir/$soname.def;
4372 fi~
4373 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4374 else
4375 _LT_TAGVAR(ld_shlibs, $1)=no
4376 fi
4377 ;;
4378
4379 interix[[3-9]]*)
4380 _LT_TAGVAR(hardcode_direct, $1)=no
4381 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4382 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4383 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4384 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4385 # Instead, shared libraries are loaded at an image base (0x10000000 by
4386 # default) and relocated if they conflict, which is a slow very memory
4387 # consuming and fragmenting process. To avoid this, we pick a random,
4388 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4389 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4390 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4391 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4392 ;;
4393
4394 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4395 tmp_diet=no
4396 if test "$host_os" = linux-dietlibc; then
4397 case $cc_basename in
4398 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4399 esac
4400 fi
4401 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4402 && test "$tmp_diet" = no
4403 then
4404 tmp_addflag=
4405 tmp_sharedflag='-shared'
4406 case $cc_basename,$host_cpu in
4407 pgcc*) # Portland Group C compiler
4408 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4409 tmp_addflag=' $pic_flag'
4410 ;;
4411 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
4412 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4413 tmp_addflag=' $pic_flag -Mnomain' ;;
4414 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4415 tmp_addflag=' -i_dynamic' ;;
4416 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4417 tmp_addflag=' -i_dynamic -nofor_main' ;;
4418 ifc* | ifort*) # Intel Fortran compiler
4419 tmp_addflag=' -nofor_main' ;;
4420 lf95*) # Lahey Fortran 8.1
4421 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4422 tmp_sharedflag='--shared' ;;
4423 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4424 tmp_sharedflag='-qmkshrobj'
4425 tmp_addflag= ;;
4426 esac
4427 case `$CC -V 2>&1 | sed 5q` in
4428 *Sun\ C*) # Sun C 5.9
4429 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4430 _LT_TAGVAR(compiler_needs_object, $1)=yes
4431 tmp_sharedflag='-G' ;;
4432 *Sun\ F*) # Sun Fortran 8.3
4433 tmp_sharedflag='-G' ;;
4434 esac
4435 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4436
4437 if test "x$supports_anon_versioning" = xyes; then
4438 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4439 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4440 echo "local: *; };" >> $output_objdir/$libname.ver~
4441 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4442 fi
4443
4444 case $cc_basename in
4445 xlf*)
4446 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4447 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4448 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4449 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4450 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4451 if test "x$supports_anon_versioning" = xyes; then
4452 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4453 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4454 echo "local: *; };" >> $output_objdir/$libname.ver~
4455 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4456 fi
4457 ;;
4458 esac
4459 else
4460 _LT_TAGVAR(ld_shlibs, $1)=no
4461 fi
4462 ;;
4463
4464 netbsd* | netbsdelf*-gnu)
4465 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4466 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4467 wlarc=
4468 else
4469 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4470 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4471 fi
4472 ;;
4473
4474 solaris*)
4475 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4476 _LT_TAGVAR(ld_shlibs, $1)=no
4477 cat <<_LT_EOF 1>&2
4478
4479 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4480 *** create shared libraries on Solaris systems. Therefore, libtool
4481 *** is disabling shared libraries support. We urge you to upgrade GNU
4482 *** binutils to release 2.9.1 or newer. Another option is to modify
4483 *** your PATH or compiler configuration so that the native linker is
4484 *** used, and then restart.
4485
4486 _LT_EOF
4487 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4488 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4489 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4490 else
4491 _LT_TAGVAR(ld_shlibs, $1)=no
4492 fi
4493 ;;
4494
4495 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4496 case `$LD -v 2>&1` in
4497 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4498 _LT_TAGVAR(ld_shlibs, $1)=no
4499 cat <<_LT_EOF 1>&2
4500
4501 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4502 *** reliably create shared libraries on SCO systems. Therefore, libtool
4503 *** is disabling shared libraries support. We urge you to upgrade GNU
4504 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4505 *** your PATH or compiler configuration so that the native linker is
4506 *** used, and then restart.
4507
4508 _LT_EOF
4509 ;;
4510 *)
4511 # For security reasons, it is highly recommended that you always
4512 # use absolute paths for naming shared libraries, and exclude the
4513 # DT_RUNPATH tag from executables and libraries. But doing so
4514 # requires that you compile everything twice, which is a pain.
4515 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4516 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4517 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4518 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4519 else
4520 _LT_TAGVAR(ld_shlibs, $1)=no
4521 fi
4522 ;;
4523 esac
4524 ;;
4525
4526 sunos4*)
4527 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4528 wlarc=
4529 _LT_TAGVAR(hardcode_direct, $1)=yes
4530 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4531 ;;
4532
4533 *)
4534 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4535 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4536 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4537 else
4538 _LT_TAGVAR(ld_shlibs, $1)=no
4539 fi
4540 ;;
4541 esac
4542
4543 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4544 runpath_var=
4545 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4546 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4547 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4548 fi
4549 else
4550 # PORTME fill in a description of your system's linker (not GNU ld)
4551 case $host_os in
4552 aix3*)
4553 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4554 _LT_TAGVAR(always_export_symbols, $1)=yes
4555 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
4556 # Note: this linker hardcodes the directories in LIBPATH if there
4557 # are no directories specified by -L.
4558 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4559 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4560 # Neither direct hardcoding nor static linking is supported with a
4561 # broken collect2.
4562 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4563 fi
4564 ;;
4565
4566 aix[[4-9]]*)
4567 if test "$host_cpu" = ia64; then
4568 # On IA64, the linker does run time linking by default, so we don't
4569 # have to do anything special.
4570 aix_use_runtimelinking=no
4571 exp_sym_flag='-Bexport'
4572 no_entry_flag=""
4573 else
4574 # If we're using GNU nm, then we don't want the "-C" option.
4575 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4576 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4577 _LT_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'
4578 else
4579 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4580 fi
4581 aix_use_runtimelinking=no
4582
4583 # Test if we are trying to use run time linking or normal
4584 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4585 # need to do runtime linking.
4586 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4587 for ld_flag in $LDFLAGS; do
4588 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4589 aix_use_runtimelinking=yes
4590 break
4591 fi
4592 done
4593 ;;
4594 esac
4595
4596 exp_sym_flag='-bexport'
4597 no_entry_flag='-bnoentry'
4598 fi
4599
4600 # When large executables or shared objects are built, AIX ld can
4601 # have problems creating the table of contents. If linking a library
4602 # or program results in "error TOC overflow" add -mminimal-toc to
4603 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4604 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4605
4606 _LT_TAGVAR(archive_cmds, $1)=''
4607 _LT_TAGVAR(hardcode_direct, $1)=yes
4608 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4609 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4610 _LT_TAGVAR(link_all_deplibs, $1)=yes
4611 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4612
4613 if test "$GCC" = yes; then
4614 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4615 # We only want to do this on AIX 4.2 and lower, the check
4616 # below for broken collect2 doesn't work under 4.3+
4617 collect2name=`${CC} -print-prog-name=collect2`
4618 if test -f "$collect2name" &&
4619 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4620 then
4621 # We have reworked collect2
4622 :
4623 else
4624 # We have old collect2
4625 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4626 # It fails to find uninstalled libraries when the uninstalled
4627 # path is not listed in the libpath. Setting hardcode_minus_L
4628 # to unsupported forces relinking
4629 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4630 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4631 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4632 fi
4633 ;;
4634 esac
4635 shared_flag='-shared'
4636 if test "$aix_use_runtimelinking" = yes; then
4637 shared_flag="$shared_flag "'${wl}-G'
4638 fi
4639 _LT_TAGVAR(link_all_deplibs, $1)=no
4640 else
4641 # not using gcc
4642 if test "$host_cpu" = ia64; then
4643 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4644 # chokes on -Wl,-G. The following line is correct:
4645 shared_flag='-G'
4646 else
4647 if test "$aix_use_runtimelinking" = yes; then
4648 shared_flag='${wl}-G'
4649 else
4650 shared_flag='${wl}-bM:SRE'
4651 fi
4652 fi
4653 fi
4654
4655 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4656 # It seems that -bexpall does not export symbols beginning with
4657 # underscore (_), so it is better to generate a list of symbols to export.
4658 _LT_TAGVAR(always_export_symbols, $1)=yes
4659 if test "$aix_use_runtimelinking" = yes; then
4660 # Warning - without using the other runtime loading flags (-brtl),
4661 # -berok will link without error, but may produce a broken library.
4662 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4663 # Determine the default libpath from the value encoded in an
4664 # empty executable.
4665 _LT_SYS_MODULE_PATH_AIX
4666 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4667 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4668 else
4669 if test "$host_cpu" = ia64; then
4670 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4671 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4672 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
4673 else
4674 # Determine the default libpath from the value encoded in an
4675 # empty executable.
4676 _LT_SYS_MODULE_PATH_AIX
4677 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4678 # Warning - without using the other run time loading flags,
4679 # -berok will link without error, but may produce a broken library.
4680 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4681 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4682 # Exported symbols can be pulled into shared objects from archives
4683 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4684 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4685 # This is similar to how AIX traditionally builds its shared libraries.
4686 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4687 fi
4688 fi
4689 ;;
4690
4691 amigaos*)
4692 case $host_cpu in
4693 powerpc)
4694 # see comment about AmigaOS4 .so support
4695 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4696 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4697 ;;
4698 m68k)
4699 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4701 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4702 ;;
4703 esac
4704 ;;
4705
4706 bsdi[[45]]*)
4707 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4708 ;;
4709
4710 cygwin* | mingw* | pw32* | cegcc*)
4711 # When not using gcc, we currently assume that we are using
4712 # Microsoft Visual C++.
4713 # hardcode_libdir_flag_spec is actually meaningless, as there is
4714 # no search path for DLLs.
4715 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4716 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4717 # Tell ltmain to make .lib files, not .a files.
4718 libext=lib
4719 # Tell ltmain to make .dll files, not .so files.
4720 shrext_cmds=".dll"
4721 # FIXME: Setting linknames here is a bad hack.
4722 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4723 # The linker will automatically build a .lib file if we build a DLL.
4724 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4725 # FIXME: Should let the user specify the lib program.
4726 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4727 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4728 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4729 ;;
4730
4731 darwin* | rhapsody*)
4732 _LT_DARWIN_LINKER_FEATURES($1)
4733 ;;
4734
4735 dgux*)
4736 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4737 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4738 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4739 ;;
4740
4741 freebsd1*)
4742 _LT_TAGVAR(ld_shlibs, $1)=no
4743 ;;
4744
4745 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4746 # support. Future versions do this automatically, but an explicit c++rt0.o
4747 # does not break anything, and helps significantly (at the cost of a little
4748 # extra space).
4749 freebsd2.2*)
4750 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4751 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4752 _LT_TAGVAR(hardcode_direct, $1)=yes
4753 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4754 ;;
4755
4756 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4757 freebsd2*)
4758 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4759 _LT_TAGVAR(hardcode_direct, $1)=yes
4760 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4761 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4762 ;;
4763
4764 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4765 freebsd* | dragonfly*)
4766 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4767 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4768 _LT_TAGVAR(hardcode_direct, $1)=yes
4769 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4770 ;;
4771
4772 hpux9*)
4773 if test "$GCC" = yes; then
4774 _LT_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'
4775 else
4776 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4777 fi
4778 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4779 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4780 _LT_TAGVAR(hardcode_direct, $1)=yes
4781
4782 # hardcode_minus_L: Not really in the search PATH,
4783 # but as the default location of the library.
4784 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4785 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4786 ;;
4787
4788 hpux10*)
4789 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4790 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4791 else
4792 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4793 fi
4794 if test "$with_gnu_ld" = no; then
4795 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4796 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4797 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4798 _LT_TAGVAR(hardcode_direct, $1)=yes
4799 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4800 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4801 # hardcode_minus_L: Not really in the search PATH,
4802 # but as the default location of the library.
4803 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4804 fi
4805 ;;
4806
4807 hpux11*)
4808 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4809 case $host_cpu in
4810 hppa*64*)
4811 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4812 ;;
4813 ia64*)
4814 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4815 ;;
4816 *)
4817 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4818 ;;
4819 esac
4820 else
4821 case $host_cpu in
4822 hppa*64*)
4823 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4824 ;;
4825 ia64*)
4826 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4827 ;;
4828 *)
4829 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4830 ;;
4831 esac
4832 fi
4833 if test "$with_gnu_ld" = no; then
4834 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4835 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4836
4837 case $host_cpu in
4838 hppa*64*|ia64*)
4839 _LT_TAGVAR(hardcode_direct, $1)=no
4840 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4841 ;;
4842 *)
4843 _LT_TAGVAR(hardcode_direct, $1)=yes
4844 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4845 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4846
4847 # hardcode_minus_L: Not really in the search PATH,
4848 # but as the default location of the library.
4849 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4850 ;;
4851 esac
4852 fi
4853 ;;
4854
4855 irix5* | irix6* | nonstopux*)
4856 if test "$GCC" = yes; then
4857 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4858 # Try to use the -exported_symbol ld option, if it does not
4859 # work, assume that -exports_file does not work either and
4860 # implicitly export all symbols.
4861 save_LDFLAGS="$LDFLAGS"
4862 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4863 AC_LINK_IFELSE(int foo(void) {},
4864 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
4865 )
4866 LDFLAGS="$save_LDFLAGS"
4867 else
4868 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4869 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
4870 fi
4871 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4872 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4873 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4874 _LT_TAGVAR(inherit_rpath, $1)=yes
4875 _LT_TAGVAR(link_all_deplibs, $1)=yes
4876 ;;
4877
4878 netbsd* | netbsdelf*-gnu)
4879 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4880 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4881 else
4882 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4883 fi
4884 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4885 _LT_TAGVAR(hardcode_direct, $1)=yes
4886 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4887 ;;
4888
4889 newsos6)
4890 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4891 _LT_TAGVAR(hardcode_direct, $1)=yes
4892 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4893 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4894 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4895 ;;
4896
4897 *nto* | *qnx*)
4898 ;;
4899
4900 openbsd*)
4901 if test -f /usr/libexec/ld.so; then
4902 _LT_TAGVAR(hardcode_direct, $1)=yes
4903 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4904 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4905 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4906 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4907 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4908 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4909 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4910 else
4911 case $host_os in
4912 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4913 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4914 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4915 ;;
4916 *)
4917 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4918 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4919 ;;
4920 esac
4921 fi
4922 else
4923 _LT_TAGVAR(ld_shlibs, $1)=no
4924 fi
4925 ;;
4926
4927 os2*)
4928 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4929 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4930 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4931 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
4932 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4933 ;;
4934
4935 osf3*)
4936 if test "$GCC" = yes; then
4937 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4938 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4939 else
4940 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4941 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4942 fi
4943 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4944 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4945 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4946 ;;
4947
4948 osf4* | osf5*) # as osf3* with the addition of -msym flag
4949 if test "$GCC" = yes; then
4950 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4951 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4952 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4953 else
4954 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4955 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4956 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
4957 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
4958
4959 # Both c and cxx compiler support -rpath directly
4960 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4961 fi
4962 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4963 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4964 ;;
4965
4966 solaris*)
4967 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4968 if test "$GCC" = yes; then
4969 wlarc='${wl}'
4970 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4971 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4972 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4973 else
4974 case `$CC -V 2>&1` in
4975 *"Compilers 5.0"*)
4976 wlarc=''
4977 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4978 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4979 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4980 ;;
4981 *)
4982 wlarc='${wl}'
4983 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4984 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4985 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4986 ;;
4987 esac
4988 fi
4989 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4990 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4991 case $host_os in
4992 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4993 *)
4994 # The compiler driver will combine and reorder linker options,
4995 # but understands `-z linker_flag'. GCC discards it without `$wl',
4996 # but is careful enough not to reorder.
4997 # Supported since Solaris 2.6 (maybe 2.5.1?)
4998 if test "$GCC" = yes; then
4999 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5000 else
5001 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5002 fi
5003 ;;
5004 esac
5005 _LT_TAGVAR(link_all_deplibs, $1)=yes
5006 ;;
5007
5008 sunos4*)
5009 if test "x$host_vendor" = xsequent; then
5010 # Use $CC to link under sequent, because it throws in some extra .o
5011 # files that make .init and .fini sections work.
5012 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5013 else
5014 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5015 fi
5016 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5017 _LT_TAGVAR(hardcode_direct, $1)=yes
5018 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5019 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5020 ;;
5021
5022 sysv4)
5023 case $host_vendor in
5024 sni)
5025 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5026 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5027 ;;
5028 siemens)
5029 ## LD is ld it makes a PLAMLIB
5030 ## CC just makes a GrossModule.
5031 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5032 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5033 _LT_TAGVAR(hardcode_direct, $1)=no
5034 ;;
5035 motorola)
5036 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5037 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5038 ;;
5039 esac
5040 runpath_var='LD_RUN_PATH'
5041 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5042 ;;
5043
5044 sysv4.3*)
5045 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5046 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5047 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5048 ;;
5049
5050 sysv4*MP*)
5051 if test -d /usr/nec; then
5052 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5053 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5054 runpath_var=LD_RUN_PATH
5055 hardcode_runpath_var=yes
5056 _LT_TAGVAR(ld_shlibs, $1)=yes
5057 fi
5058 ;;
5059
5060 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5061 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5062 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5063 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5064 runpath_var='LD_RUN_PATH'
5065
5066 if test "$GCC" = yes; then
5067 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5068 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5069 else
5070 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5071 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5072 fi
5073 ;;
5074
5075 sysv5* | sco3.2v5* | sco5v6*)
5076 # Note: We can NOT use -z defs as we might desire, because we do not
5077 # link with -lc, and that would cause any symbols used from libc to
5078 # always be unresolved, which means just about no library would
5079 # ever link correctly. If we're not using GNU ld we use -z text
5080 # though, which does catch some bad symbols but isn't as heavy-handed
5081 # as -z defs.
5082 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5083 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5084 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5085 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5086 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5087 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5088 _LT_TAGVAR(link_all_deplibs, $1)=yes
5089 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5090 runpath_var='LD_RUN_PATH'
5091
5092 if test "$GCC" = yes; then
5093 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5094 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5095 else
5096 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5097 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5098 fi
5099 ;;
5100
5101 uts4*)
5102 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5103 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5104 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5105 ;;
5106
5107 *)
5108 _LT_TAGVAR(ld_shlibs, $1)=no
5109 ;;
5110 esac
5111
5112 if test x$host_vendor = xsni; then
5113 case $host in
5114 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5115 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5116 ;;
5117 esac
5118 fi
5119 fi
5120 ])
5121 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5122 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5123
5124 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5125
5126 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5127 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5128 _LT_DECL([], [extract_expsyms_cmds], [2],
5129 [The commands to extract the exported symbol list from a shared archive])
5130
5131 #
5132 # Do we need to explicitly link libc?
5133 #
5134 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5135 x|xyes)
5136 # Assume -lc should be added
5137 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5138
5139 if test "$enable_shared" = yes && test "$GCC" = yes; then
5140 case $_LT_TAGVAR(archive_cmds, $1) in
5141 *'~'*)
5142 # FIXME: we may have to deal with multi-command sequences.
5143 ;;
5144 '$CC '*)
5145 # Test whether the compiler implicitly links with -lc since on some
5146 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5147 # to ld, don't add -lc before -lgcc.
5148 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5149 $RM conftest*
5150 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5151
5152 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5153 soname=conftest
5154 lib=conftest
5155 libobjs=conftest.$ac_objext
5156 deplibs=
5157 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5158 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5159 compiler_flags=-v
5160 linker_flags=-v
5161 verstring=
5162 output_objdir=.
5163 libname=conftest
5164 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5165 _LT_TAGVAR(allow_undefined_flag, $1)=
5166 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5167 then
5168 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5169 else
5170 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5171 fi
5172 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5173 else
5174 cat conftest.err 1>&5
5175 fi
5176 $RM conftest*
5177 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5178 ;;
5179 esac
5180 fi
5181 ;;
5182 esac
5183
5184 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5185 [Whether or not to add -lc for building shared libraries])
5186 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5187 [enable_shared_with_static_runtimes], [0],
5188 [Whether or not to disallow shared libs when runtime libs are static])
5189 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5190 [Compiler flag to allow reflexive dlopens])
5191 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5192 [Compiler flag to generate shared objects directly from archives])
5193 _LT_TAGDECL([], [compiler_needs_object], [1],
5194 [Whether the compiler copes with passing no objects directly])
5195 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5196 [Create an old-style archive from a shared archive])
5197 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5198 [Create a temporary old-style archive to link instead of a shared archive])
5199 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5200 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5201 _LT_TAGDECL([], [module_cmds], [2],
5202 [Commands used to build a loadable module if different from building
5203 a shared archive.])
5204 _LT_TAGDECL([], [module_expsym_cmds], [2])
5205 _LT_TAGDECL([], [with_gnu_ld], [1],
5206 [Whether we are building with GNU ld or not])
5207 _LT_TAGDECL([], [allow_undefined_flag], [1],
5208 [Flag that allows shared libraries with undefined symbols to be built])
5209 _LT_TAGDECL([], [no_undefined_flag], [1],
5210 [Flag that enforces no undefined symbols])
5211 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5212 [Flag to hardcode $libdir into a binary during linking.
5213 This must work even if $libdir does not exist])
5214 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5215 [[If ld is used when linking, flag to hardcode $libdir into a binary
5216 during linking. This must work even if $libdir does not exist]])
5217 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5218 [Whether we need a single "-rpath" flag with a separated argument])
5219 _LT_TAGDECL([], [hardcode_direct], [0],
5220 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5221 DIR into the resulting binary])
5222 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5223 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5224 DIR into the resulting binary and the resulting library dependency is
5225 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5226 library is relocated])
5227 _LT_TAGDECL([], [hardcode_minus_L], [0],
5228 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5229 into the resulting binary])
5230 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5231 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5232 into the resulting binary])
5233 _LT_TAGDECL([], [hardcode_automatic], [0],
5234 [Set to "yes" if building a shared library automatically hardcodes DIR
5235 into the library and all subsequent libraries and executables linked
5236 against it])
5237 _LT_TAGDECL([], [inherit_rpath], [0],
5238 [Set to yes if linker adds runtime paths of dependent libraries
5239 to runtime path list])
5240 _LT_TAGDECL([], [link_all_deplibs], [0],
5241 [Whether libtool must link a program against all its dependency libraries])
5242 _LT_TAGDECL([], [fix_srcfile_path], [1],
5243 [Fix the shell variable $srcfile for the compiler])
5244 _LT_TAGDECL([], [always_export_symbols], [0],
5245 [Set to "yes" if exported symbols are required])
5246 _LT_TAGDECL([], [export_symbols_cmds], [2],
5247 [The commands to list exported symbols])
5248 _LT_TAGDECL([], [exclude_expsyms], [1],
5249 [Symbols that should not be listed in the preloaded symbols])
5250 _LT_TAGDECL([], [include_expsyms], [1],
5251 [Symbols that must always be exported])
5252 _LT_TAGDECL([], [prelink_cmds], [2],
5253 [Commands necessary for linking programs (against libraries) with templates])
5254 _LT_TAGDECL([], [file_list_spec], [1],
5255 [Specify filename containing input files])
5256 dnl FIXME: Not yet implemented
5257 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5258 dnl [Compiler flag to generate thread safe objects])
5259 ])# _LT_LINKER_SHLIBS
5260
5261
5262 # _LT_LANG_C_CONFIG([TAG])
5263 # ------------------------
5264 # Ensure that the configuration variables for a C compiler are suitably
5265 # defined. These variables are subsequently used by _LT_CONFIG to write
5266 # the compiler configuration to `libtool'.
5267 m4_defun([_LT_LANG_C_CONFIG],
5268 [m4_require([_LT_DECL_EGREP])dnl
5269 lt_save_CC="$CC"
5270 AC_LANG_PUSH(C)
5271
5272 # Source file extension for C test sources.
5273 ac_ext=c
5274
5275 # Object file extension for compiled C test sources.
5276 objext=o
5277 _LT_TAGVAR(objext, $1)=$objext
5278
5279 # Code to be used in simple compile tests
5280 lt_simple_compile_test_code="int some_variable = 0;"
5281
5282 # Code to be used in simple link tests
5283 lt_simple_link_test_code='int main(){return(0);}'
5284
5285 _LT_TAG_COMPILER
5286 # Save the default compiler, since it gets overwritten when the other
5287 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5288 compiler_DEFAULT=$CC
5289
5290 # save warnings/boilerplate of simple test code
5291 _LT_COMPILER_BOILERPLATE
5292 _LT_LINKER_BOILERPLATE
5293
5294 if test -n "$compiler"; then
5295 _LT_COMPILER_NO_RTTI($1)
5296 _LT_COMPILER_PIC($1)
5297 _LT_COMPILER_C_O($1)
5298 _LT_COMPILER_FILE_LOCKS($1)
5299 _LT_LINKER_SHLIBS($1)
5300 _LT_SYS_DYNAMIC_LINKER($1)
5301 _LT_LINKER_HARDCODE_LIBPATH($1)
5302 LT_SYS_DLOPEN_SELF
5303 _LT_CMD_STRIPLIB
5304
5305 # Report which library types will actually be built
5306 AC_MSG_CHECKING([if libtool supports shared libraries])
5307 AC_MSG_RESULT([$can_build_shared])
5308
5309 AC_MSG_CHECKING([whether to build shared libraries])
5310 test "$can_build_shared" = "no" && enable_shared=no
5311
5312 # On AIX, shared libraries and static libraries use the same namespace, and
5313 # are all built from PIC.
5314 case $host_os in
5315 aix3*)
5316 test "$enable_shared" = yes && enable_static=no
5317 if test -n "$RANLIB"; then
5318 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5319 postinstall_cmds='$RANLIB $lib'
5320 fi
5321 ;;
5322
5323 aix[[4-9]]*)
5324 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5325 test "$enable_shared" = yes && enable_static=no
5326 fi
5327 ;;
5328 esac
5329 AC_MSG_RESULT([$enable_shared])
5330
5331 AC_MSG_CHECKING([whether to build static libraries])
5332 # Make sure either enable_shared or enable_static is yes.
5333 test "$enable_shared" = yes || enable_static=yes
5334 AC_MSG_RESULT([$enable_static])
5335
5336 _LT_CONFIG($1)
5337 fi
5338 AC_LANG_POP
5339 CC="$lt_save_CC"
5340 ])# _LT_LANG_C_CONFIG
5341
5342
5343 # _LT_PROG_CXX
5344 # ------------
5345 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5346 # compiler, we have our own version here.
5347 m4_defun([_LT_PROG_CXX],
5348 [
5349 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5350 AC_PROG_CXX
5351 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5352 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5353 (test "X$CXX" != "Xg++"))) ; then
5354 AC_PROG_CXXCPP
5355 else
5356 _lt_caught_CXX_error=yes
5357 fi
5358 popdef([AC_MSG_ERROR])
5359 ])# _LT_PROG_CXX
5360
5361 dnl aclocal-1.4 backwards compatibility:
5362 dnl AC_DEFUN([_LT_PROG_CXX], [])
5363
5364
5365 # _LT_LANG_CXX_CONFIG([TAG])
5366 # --------------------------
5367 # Ensure that the configuration variables for a C++ compiler are suitably
5368 # defined. These variables are subsequently used by _LT_CONFIG to write
5369 # the compiler configuration to `libtool'.
5370 m4_defun([_LT_LANG_CXX_CONFIG],
5371 [AC_REQUIRE([_LT_PROG_CXX])dnl
5372 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5373 m4_require([_LT_DECL_EGREP])dnl
5374
5375 AC_LANG_PUSH(C++)
5376 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5377 _LT_TAGVAR(allow_undefined_flag, $1)=
5378 _LT_TAGVAR(always_export_symbols, $1)=no
5379 _LT_TAGVAR(archive_expsym_cmds, $1)=
5380 _LT_TAGVAR(compiler_needs_object, $1)=no
5381 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5382 _LT_TAGVAR(hardcode_direct, $1)=no
5383 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5384 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5385 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5386 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5387 _LT_TAGVAR(hardcode_minus_L, $1)=no
5388 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5389 _LT_TAGVAR(hardcode_automatic, $1)=no
5390 _LT_TAGVAR(inherit_rpath, $1)=no
5391 _LT_TAGVAR(module_cmds, $1)=
5392 _LT_TAGVAR(module_expsym_cmds, $1)=
5393 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5394 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5395 _LT_TAGVAR(no_undefined_flag, $1)=
5396 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5397 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5398
5399 # Source file extension for C++ test sources.
5400 ac_ext=cpp
5401
5402 # Object file extension for compiled C++ test sources.
5403 objext=o
5404 _LT_TAGVAR(objext, $1)=$objext
5405
5406 # No sense in running all these tests if we already determined that
5407 # the CXX compiler isn't working. Some variables (like enable_shared)
5408 # are currently assumed to apply to all compilers on this platform,
5409 # and will be corrupted by setting them based on a non-working compiler.
5410 if test "$_lt_caught_CXX_error" != yes; then
5411 # Code to be used in simple compile tests
5412 lt_simple_compile_test_code="int some_variable = 0;"
5413
5414 # Code to be used in simple link tests
5415 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5416
5417 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5418 _LT_TAG_COMPILER
5419
5420 # save warnings/boilerplate of simple test code
5421 _LT_COMPILER_BOILERPLATE
5422 _LT_LINKER_BOILERPLATE
5423
5424 # Allow CC to be a program name with arguments.
5425 lt_save_CC=$CC
5426 lt_save_LD=$LD
5427 lt_save_GCC=$GCC
5428 GCC=$GXX
5429 lt_save_with_gnu_ld=$with_gnu_ld
5430 lt_save_path_LD=$lt_cv_path_LD
5431 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5432 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5433 else
5434 $as_unset lt_cv_prog_gnu_ld
5435 fi
5436 if test -n "${lt_cv_path_LDCXX+set}"; then
5437 lt_cv_path_LD=$lt_cv_path_LDCXX
5438 else
5439 $as_unset lt_cv_path_LD
5440 fi
5441 test -z "${LDCXX+set}" || LD=$LDCXX
5442 CC=${CXX-"c++"}
5443 compiler=$CC
5444 _LT_TAGVAR(compiler, $1)=$CC
5445 _LT_CC_BASENAME([$compiler])
5446
5447 if test -n "$compiler"; then
5448 # We don't want -fno-exception when compiling C++ code, so set the
5449 # no_builtin_flag separately
5450 if test "$GXX" = yes; then
5451 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5452 else
5453 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5454 fi
5455
5456 if test "$GXX" = yes; then
5457 # Set up default GNU C++ configuration
5458
5459 LT_PATH_LD
5460
5461 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5462 # archiving commands below assume that GNU ld is being used.
5463 if test "$with_gnu_ld" = yes; then
5464 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5465 _LT_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'
5466
5467 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5468 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5469
5470 # If archive_cmds runs LD, not CC, wlarc should be empty
5471 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5472 # investigate it a little bit more. (MM)
5473 wlarc='${wl}'
5474
5475 # ancient GNU ld didn't support --whole-archive et. al.
5476 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5477 $GREP 'no-whole-archive' > /dev/null; then
5478 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5479 else
5480 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5481 fi
5482 else
5483 with_gnu_ld=no
5484 wlarc=
5485
5486 # A generic and very simple default shared library creation
5487 # command for GNU C++ for the case where it uses the native
5488 # linker, instead of GNU ld. If possible, this setting should
5489 # overridden to take advantage of the native linker features on
5490 # the platform it is being used on.
5491 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5492 fi
5493
5494 # Commands to make compiler produce verbose output that lists
5495 # what "hidden" libraries, object files and flags are used when
5496 # linking a shared library.
5497 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5498
5499 else
5500 GXX=no
5501 with_gnu_ld=no
5502 wlarc=
5503 fi
5504
5505 # PORTME: fill in a description of your system's C++ link characteristics
5506 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5507 _LT_TAGVAR(ld_shlibs, $1)=yes
5508 case $host_os in
5509 aix3*)
5510 # FIXME: insert proper C++ library support
5511 _LT_TAGVAR(ld_shlibs, $1)=no
5512 ;;
5513 aix[[4-9]]*)
5514 if test "$host_cpu" = ia64; then
5515 # On IA64, the linker does run time linking by default, so we don't
5516 # have to do anything special.
5517 aix_use_runtimelinking=no
5518 exp_sym_flag='-Bexport'
5519 no_entry_flag=""
5520 else
5521 aix_use_runtimelinking=no
5522
5523 # Test if we are trying to use run time linking or normal
5524 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5525 # need to do runtime linking.
5526 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5527 for ld_flag in $LDFLAGS; do
5528 case $ld_flag in
5529 *-brtl*)
5530 aix_use_runtimelinking=yes
5531 break
5532 ;;
5533 esac
5534 done
5535 ;;
5536 esac
5537
5538 exp_sym_flag='-bexport'
5539 no_entry_flag='-bnoentry'
5540 fi
5541
5542 # When large executables or shared objects are built, AIX ld can
5543 # have problems creating the table of contents. If linking a library
5544 # or program results in "error TOC overflow" add -mminimal-toc to
5545 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5546 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5547
5548 _LT_TAGVAR(archive_cmds, $1)=''
5549 _LT_TAGVAR(hardcode_direct, $1)=yes
5550 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5551 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5552 _LT_TAGVAR(link_all_deplibs, $1)=yes
5553 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5554
5555 if test "$GXX" = yes; then
5556 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5557 # We only want to do this on AIX 4.2 and lower, the check
5558 # below for broken collect2 doesn't work under 4.3+
5559 collect2name=`${CC} -print-prog-name=collect2`
5560 if test -f "$collect2name" &&
5561 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5562 then
5563 # We have reworked collect2
5564 :
5565 else
5566 # We have old collect2
5567 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5568 # It fails to find uninstalled libraries when the uninstalled
5569 # path is not listed in the libpath. Setting hardcode_minus_L
5570 # to unsupported forces relinking
5571 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5572 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5573 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5574 fi
5575 esac
5576 shared_flag='-shared'
5577 if test "$aix_use_runtimelinking" = yes; then
5578 shared_flag="$shared_flag "'${wl}-G'
5579 fi
5580 else
5581 # not using gcc
5582 if test "$host_cpu" = ia64; then
5583 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5584 # chokes on -Wl,-G. The following line is correct:
5585 shared_flag='-G'
5586 else
5587 if test "$aix_use_runtimelinking" = yes; then
5588 shared_flag='${wl}-G'
5589 else
5590 shared_flag='${wl}-bM:SRE'
5591 fi
5592 fi
5593 fi
5594
5595 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5596 # It seems that -bexpall does not export symbols beginning with
5597 # underscore (_), so it is better to generate a list of symbols to
5598 # export.
5599 _LT_TAGVAR(always_export_symbols, $1)=yes
5600 if test "$aix_use_runtimelinking" = yes; then
5601 # Warning - without using the other runtime loading flags (-brtl),
5602 # -berok will link without error, but may produce a broken library.
5603 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5604 # Determine the default libpath from the value encoded in an empty
5605 # executable.
5606 _LT_SYS_MODULE_PATH_AIX
5607 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5608
5609 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5610 else
5611 if test "$host_cpu" = ia64; then
5612 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5613 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5614 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5615 else
5616 # Determine the default libpath from the value encoded in an
5617 # empty executable.
5618 _LT_SYS_MODULE_PATH_AIX
5619 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5620 # Warning - without using the other run time loading flags,
5621 # -berok will link without error, but may produce a broken library.
5622 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5623 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5624 # Exported symbols can be pulled into shared objects from archives
5625 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5626 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5627 # This is similar to how AIX traditionally builds its shared
5628 # libraries.
5629 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5630 fi
5631 fi
5632 ;;
5633
5634 beos*)
5635 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5636 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5637 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5638 # support --undefined. This deserves some investigation. FIXME
5639 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5640 else
5641 _LT_TAGVAR(ld_shlibs, $1)=no
5642 fi
5643 ;;
5644
5645 chorus*)
5646 case $cc_basename in
5647 *)
5648 # FIXME: insert proper C++ library support
5649 _LT_TAGVAR(ld_shlibs, $1)=no
5650 ;;
5651 esac
5652 ;;
5653
5654 cygwin* | mingw* | pw32* | cegcc*)
5655 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5656 # as there is no search path for DLLs.
5657 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5658 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5659 _LT_TAGVAR(always_export_symbols, $1)=no
5660 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5661
5662 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5663 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5664 # If the export-symbols file already is a .def file (1st line
5665 # is EXPORTS), use it as is; otherwise, prepend...
5666 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5667 cp $export_symbols $output_objdir/$soname.def;
5668 else
5669 echo EXPORTS > $output_objdir/$soname.def;
5670 cat $export_symbols >> $output_objdir/$soname.def;
5671 fi~
5672 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5673 else
5674 _LT_TAGVAR(ld_shlibs, $1)=no
5675 fi
5676 ;;
5677 darwin* | rhapsody*)
5678 _LT_DARWIN_LINKER_FEATURES($1)
5679 ;;
5680
5681 dgux*)
5682 case $cc_basename in
5683 ec++*)
5684 # FIXME: insert proper C++ library support
5685 _LT_TAGVAR(ld_shlibs, $1)=no
5686 ;;
5687 ghcx*)
5688 # Green Hills C++ Compiler
5689 # FIXME: insert proper C++ library support
5690 _LT_TAGVAR(ld_shlibs, $1)=no
5691 ;;
5692 *)
5693 # FIXME: insert proper C++ library support
5694 _LT_TAGVAR(ld_shlibs, $1)=no
5695 ;;
5696 esac
5697 ;;
5698
5699 freebsd[[12]]*)
5700 # C++ shared libraries reported to be fairly broken before
5701 # switch to ELF
5702 _LT_TAGVAR(ld_shlibs, $1)=no
5703 ;;
5704
5705 freebsd-elf*)
5706 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5707 ;;
5708
5709 freebsd* | dragonfly*)
5710 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5711 # conventions
5712 _LT_TAGVAR(ld_shlibs, $1)=yes
5713 ;;
5714
5715 gnu*)
5716 ;;
5717
5718 hpux9*)
5719 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5720 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5721 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5722 _LT_TAGVAR(hardcode_direct, $1)=yes
5723 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5724 # but as the default
5725 # location of the library.
5726
5727 case $cc_basename in
5728 CC*)
5729 # FIXME: insert proper C++ library support
5730 _LT_TAGVAR(ld_shlibs, $1)=no
5731 ;;
5732 aCC*)
5733 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5734 # Commands to make compiler produce verbose output that lists
5735 # what "hidden" libraries, object files and flags are used when
5736 # linking a shared library.
5737 #
5738 # There doesn't appear to be a way to prevent this compiler from
5739 # explicitly linking system object files so we need to strip them
5740 # from the output so that they don't get included in the library
5741 # dependencies.
5742 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5743 ;;
5744 *)
5745 if test "$GXX" = yes; then
5746 _LT_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'
5747 else
5748 # FIXME: insert proper C++ library support
5749 _LT_TAGVAR(ld_shlibs, $1)=no
5750 fi
5751 ;;
5752 esac
5753 ;;
5754
5755 hpux10*|hpux11*)
5756 if test $with_gnu_ld = no; then
5757 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5758 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5759
5760 case $host_cpu in
5761 hppa*64*|ia64*)
5762 ;;
5763 *)
5764 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5765 ;;
5766 esac
5767 fi
5768 case $host_cpu in
5769 hppa*64*|ia64*)
5770 _LT_TAGVAR(hardcode_direct, $1)=no
5771 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5772 ;;
5773 *)
5774 _LT_TAGVAR(hardcode_direct, $1)=yes
5775 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5776 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5777 # but as the default
5778 # location of the library.
5779 ;;
5780 esac
5781
5782 case $cc_basename in
5783 CC*)
5784 # FIXME: insert proper C++ library support
5785 _LT_TAGVAR(ld_shlibs, $1)=no
5786 ;;
5787 aCC*)
5788 case $host_cpu in
5789 hppa*64*)
5790 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5791 ;;
5792 ia64*)
5793 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5794 ;;
5795 *)
5796 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5797 ;;
5798 esac
5799 # Commands to make compiler produce verbose output that lists
5800 # what "hidden" libraries, object files and flags are used when
5801 # linking a shared library.
5802 #
5803 # There doesn't appear to be a way to prevent this compiler from
5804 # explicitly linking system object files so we need to strip them
5805 # from the output so that they don't get included in the library
5806 # dependencies.
5807 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 "X$list" | $Xsed'
5808 ;;
5809 *)
5810 if test "$GXX" = yes; then
5811 if test $with_gnu_ld = no; then
5812 case $host_cpu in
5813 hppa*64*)
5814 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5815 ;;
5816 ia64*)
5817 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5818 ;;
5819 *)
5820 _LT_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'
5821 ;;
5822 esac
5823 fi
5824 else
5825 # FIXME: insert proper C++ library support
5826 _LT_TAGVAR(ld_shlibs, $1)=no
5827 fi
5828 ;;
5829 esac
5830 ;;
5831
5832 interix[[3-9]]*)
5833 _LT_TAGVAR(hardcode_direct, $1)=no
5834 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5836 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5837 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5838 # Instead, shared libraries are loaded at an image base (0x10000000 by
5839 # default) and relocated if they conflict, which is a slow very memory
5840 # consuming and fragmenting process. To avoid this, we pick a random,
5841 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5842 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5844 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5845 ;;
5846 irix5* | irix6*)
5847 case $cc_basename in
5848 CC*)
5849 # SGI C++
5850 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5851
5852 # Archives containing C++ object files must be created using
5853 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
5854 # necessary to make sure instantiated templates are included
5855 # in the archive.
5856 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5857 ;;
5858 *)
5859 if test "$GXX" = yes; then
5860 if test "$with_gnu_ld" = no; then
5861 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5862 else
5863 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
5864 fi
5865 fi
5866 _LT_TAGVAR(link_all_deplibs, $1)=yes
5867 ;;
5868 esac
5869 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5870 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5871 _LT_TAGVAR(inherit_rpath, $1)=yes
5872 ;;
5873
5874 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5875 case $cc_basename in
5876 KCC*)
5877 # Kuck and Associates, Inc. (KAI) C++ Compiler
5878
5879 # KCC will only create a shared library if the output file
5880 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5881 # to its proper name (with version) after linking.
5882 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
5883 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
5884 # Commands to make compiler produce verbose output that lists
5885 # what "hidden" libraries, object files and flags are used when
5886 # linking a shared library.
5887 #
5888 # There doesn't appear to be a way to prevent this compiler from
5889 # explicitly linking system object files so we need to strip them
5890 # from the output so that they don't get included in the library
5891 # dependencies.
5892 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 "X$list" | $Xsed'
5893
5894 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5895 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5896
5897 # Archives containing C++ object files must be created using
5898 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5899 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5900 ;;
5901 icpc* | ecpc* )
5902 # Intel C++
5903 with_gnu_ld=yes
5904 # version 8.0 and above of icpc choke on multiply defined symbols
5905 # if we add $predep_objects and $postdep_objects, however 7.1 and
5906 # earlier do not add the objects themselves.
5907 case `$CC -V 2>&1` in
5908 *"Version 7."*)
5909 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5910 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5911 ;;
5912 *) # Version 8.0 or newer
5913 tmp_idyn=
5914 case $host_cpu in
5915 ia64*) tmp_idyn=' -i_dynamic';;
5916 esac
5917 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5918 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5919 ;;
5920 esac
5921 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5922 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5923 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5924 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5925 ;;
5926 pgCC* | pgcpp*)
5927 # Portland Group C++ compiler
5928 case `$CC -V` in
5929 *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
5930 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5931 rm -rf $tpldir~
5932 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5933 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5934 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5935 rm -rf $tpldir~
5936 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5937 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5938 $RANLIB $oldlib'
5939 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5940 rm -rf $tpldir~
5941 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5942 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5943 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5944 rm -rf $tpldir~
5945 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5946 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5947 ;;
5948 *) # Version 6 will use weak symbols
5949 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5950 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5951 ;;
5952 esac
5953
5954 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5955 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5956 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5957 ;;
5958 cxx*)
5959 # Compaq C++
5960 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5961 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
5962
5963 runpath_var=LD_RUN_PATH
5964 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5965 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5966
5967 # Commands to make compiler produce verbose output that lists
5968 # what "hidden" libraries, object files and flags are used when
5969 # linking a shared library.
5970 #
5971 # There doesn't appear to be a way to prevent this compiler from
5972 # explicitly linking system object files so we need to strip them
5973 # from the output so that they don't get included in the library
5974 # dependencies.
5975 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
5976 ;;
5977 xl*)
5978 # IBM XL 8.0 on PPC, with GNU ld
5979 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5980 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5981 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5982 if test "x$supports_anon_versioning" = xyes; then
5983 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5984 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5985 echo "local: *; };" >> $output_objdir/$libname.ver~
5986 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5987 fi
5988 ;;
5989 *)
5990 case `$CC -V 2>&1 | sed 5q` in
5991 *Sun\ C*)
5992 # Sun C++ 5.9
5993 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5994 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5995 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
5996 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5997 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5998 _LT_TAGVAR(compiler_needs_object, $1)=yes
5999
6000 # Not sure whether something based on
6001 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6002 # would be better.
6003 output_verbose_link_cmd='echo'
6004
6005 # Archives containing C++ object files must be created using
6006 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6007 # necessary to make sure instantiated templates are included
6008 # in the archive.
6009 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6010 ;;
6011 esac
6012 ;;
6013 esac
6014 ;;
6015
6016 lynxos*)
6017 # FIXME: insert proper C++ library support
6018 _LT_TAGVAR(ld_shlibs, $1)=no
6019 ;;
6020
6021 m88k*)
6022 # FIXME: insert proper C++ library support
6023 _LT_TAGVAR(ld_shlibs, $1)=no
6024 ;;
6025
6026 mvs*)
6027 case $cc_basename in
6028 cxx*)
6029 # FIXME: insert proper C++ library support
6030 _LT_TAGVAR(ld_shlibs, $1)=no
6031 ;;
6032 *)
6033 # FIXME: insert proper C++ library support
6034 _LT_TAGVAR(ld_shlibs, $1)=no
6035 ;;
6036 esac
6037 ;;
6038
6039 netbsd*)
6040 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6041 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6042 wlarc=
6043 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6044 _LT_TAGVAR(hardcode_direct, $1)=yes
6045 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6046 fi
6047 # Workaround some broken pre-1.5 toolchains
6048 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6049 ;;
6050
6051 *nto* | *qnx*)
6052 _LT_TAGVAR(ld_shlibs, $1)=yes
6053 ;;
6054
6055 openbsd2*)
6056 # C++ shared libraries are fairly broken
6057 _LT_TAGVAR(ld_shlibs, $1)=no
6058 ;;
6059
6060 openbsd*)
6061 if test -f /usr/libexec/ld.so; then
6062 _LT_TAGVAR(hardcode_direct, $1)=yes
6063 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6064 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6065 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6066 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6067 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6068 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6069 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6070 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6071 fi
6072 output_verbose_link_cmd=echo
6073 else
6074 _LT_TAGVAR(ld_shlibs, $1)=no
6075 fi
6076 ;;
6077
6078 osf3* | osf4* | osf5*)
6079 case $cc_basename in
6080 KCC*)
6081 # Kuck and Associates, Inc. (KAI) C++ Compiler
6082
6083 # KCC will only create a shared library if the output file
6084 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6085 # to its proper name (with version) after linking.
6086 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6087
6088 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6089 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6090
6091 # Archives containing C++ object files must be created using
6092 # the KAI C++ compiler.
6093 case $host in
6094 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6095 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6096 esac
6097 ;;
6098 RCC*)
6099 # Rational C++ 2.4.1
6100 # FIXME: insert proper C++ library support
6101 _LT_TAGVAR(ld_shlibs, $1)=no
6102 ;;
6103 cxx*)
6104 case $host in
6105 osf3*)
6106 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6107 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6108 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6109 ;;
6110 *)
6111 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6112 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6113 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6114 echo "-hidden">> $lib.exp~
6115 $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6116 $RM $lib.exp'
6117 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6118 ;;
6119 esac
6120
6121 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6122
6123 # Commands to make compiler produce verbose output that lists
6124 # what "hidden" libraries, object files and flags are used when
6125 # linking a shared library.
6126 #
6127 # There doesn't appear to be a way to prevent this compiler from
6128 # explicitly linking system object files so we need to strip them
6129 # from the output so that they don't get included in the library
6130 # dependencies.
6131 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
6132 ;;
6133 *)
6134 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6135 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6136 case $host in
6137 osf3*)
6138 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6139 ;;
6140 *)
6141 _LT_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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6142 ;;
6143 esac
6144
6145 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6146 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6147
6148 # Commands to make compiler produce verbose output that lists
6149 # what "hidden" libraries, object files and flags are used when
6150 # linking a shared library.
6151 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6152
6153 else
6154 # FIXME: insert proper C++ library support
6155 _LT_TAGVAR(ld_shlibs, $1)=no
6156 fi
6157 ;;
6158 esac
6159 ;;
6160
6161 psos*)
6162 # FIXME: insert proper C++ library support
6163 _LT_TAGVAR(ld_shlibs, $1)=no
6164 ;;
6165
6166 sunos4*)
6167 case $cc_basename in
6168 CC*)
6169 # Sun C++ 4.x
6170 # FIXME: insert proper C++ library support
6171 _LT_TAGVAR(ld_shlibs, $1)=no
6172 ;;
6173 lcc*)
6174 # Lucid
6175 # FIXME: insert proper C++ library support
6176 _LT_TAGVAR(ld_shlibs, $1)=no
6177 ;;
6178 *)
6179 # FIXME: insert proper C++ library support
6180 _LT_TAGVAR(ld_shlibs, $1)=no
6181 ;;
6182 esac
6183 ;;
6184
6185 solaris*)
6186 case $cc_basename in
6187 CC*)
6188 # Sun C++ 4.2, 5.x and Centerline C++
6189 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6190 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6191 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6192 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6193 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6194
6195 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6196 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6197 case $host_os in
6198 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6199 *)
6200 # The compiler driver will combine and reorder linker options,
6201 # but understands `-z linker_flag'.
6202 # Supported since Solaris 2.6 (maybe 2.5.1?)
6203 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6204 ;;
6205 esac
6206 _LT_TAGVAR(link_all_deplibs, $1)=yes
6207
6208 output_verbose_link_cmd='echo'
6209
6210 # Archives containing C++ object files must be created using
6211 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6212 # necessary to make sure instantiated templates are included
6213 # in the archive.
6214 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6215 ;;
6216 gcx*)
6217 # Green Hills C++ Compiler
6218 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6219
6220 # The C++ compiler must be used to create the archive.
6221 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6222 ;;
6223 *)
6224 # GNU C++ compiler with Solaris linker
6225 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6226 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6227 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6228 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6229 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6230 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6231
6232 # Commands to make compiler produce verbose output that lists
6233 # what "hidden" libraries, object files and flags are used when
6234 # linking a shared library.
6235 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6236 else
6237 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6238 # platform.
6239 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6240 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6241 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6242
6243 # Commands to make compiler produce verbose output that lists
6244 # what "hidden" libraries, object files and flags are used when
6245 # linking a shared library.
6246 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6247 fi
6248
6249 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6250 case $host_os in
6251 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6252 *)
6253 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6254 ;;
6255 esac
6256 fi
6257 ;;
6258 esac
6259 ;;
6260
6261 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6262 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6263 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6264 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6265 runpath_var='LD_RUN_PATH'
6266
6267 case $cc_basename in
6268 CC*)
6269 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6270 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6271 ;;
6272 *)
6273 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6274 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6275 ;;
6276 esac
6277 ;;
6278
6279 sysv5* | sco3.2v5* | sco5v6*)
6280 # Note: We can NOT use -z defs as we might desire, because we do not
6281 # link with -lc, and that would cause any symbols used from libc to
6282 # always be unresolved, which means just about no library would
6283 # ever link correctly. If we're not using GNU ld we use -z text
6284 # though, which does catch some bad symbols but isn't as heavy-handed
6285 # as -z defs.
6286 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6287 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6288 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6289 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6290 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6291 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6292 _LT_TAGVAR(link_all_deplibs, $1)=yes
6293 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6294 runpath_var='LD_RUN_PATH'
6295
6296 case $cc_basename in
6297 CC*)
6298 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6299 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6300 ;;
6301 *)
6302 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6303 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6304 ;;
6305 esac
6306 ;;
6307
6308 tandem*)
6309 case $cc_basename in
6310 NCC*)
6311 # NonStop-UX NCC 3.20
6312 # FIXME: insert proper C++ library support
6313 _LT_TAGVAR(ld_shlibs, $1)=no
6314 ;;
6315 *)
6316 # FIXME: insert proper C++ library support
6317 _LT_TAGVAR(ld_shlibs, $1)=no
6318 ;;
6319 esac
6320 ;;
6321
6322 vxworks*)
6323 # FIXME: insert proper C++ library support
6324 _LT_TAGVAR(ld_shlibs, $1)=no
6325 ;;
6326
6327 *)
6328 # FIXME: insert proper C++ library support
6329 _LT_TAGVAR(ld_shlibs, $1)=no
6330 ;;
6331 esac
6332
6333 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6334 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6335
6336 _LT_TAGVAR(GCC, $1)="$GXX"
6337 _LT_TAGVAR(LD, $1)="$LD"
6338
6339 ## CAVEAT EMPTOR:
6340 ## There is no encapsulation within the following macros, do not change
6341 ## the running order or otherwise move them around unless you know exactly
6342 ## what you are doing...
6343 _LT_SYS_HIDDEN_LIBDEPS($1)
6344 _LT_COMPILER_PIC($1)
6345 _LT_COMPILER_C_O($1)
6346 _LT_COMPILER_FILE_LOCKS($1)
6347 _LT_LINKER_SHLIBS($1)
6348 _LT_SYS_DYNAMIC_LINKER($1)
6349 _LT_LINKER_HARDCODE_LIBPATH($1)
6350
6351 _LT_CONFIG($1)
6352 fi # test -n "$compiler"
6353
6354 CC=$lt_save_CC
6355 LDCXX=$LD
6356 LD=$lt_save_LD
6357 GCC=$lt_save_GCC
6358 with_gnu_ld=$lt_save_with_gnu_ld
6359 lt_cv_path_LDCXX=$lt_cv_path_LD
6360 lt_cv_path_LD=$lt_save_path_LD
6361 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6362 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6363 fi # test "$_lt_caught_CXX_error" != yes
6364
6365 AC_LANG_POP
6366 ])# _LT_LANG_CXX_CONFIG
6367
6368
6369 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6370 # ---------------------------------
6371 # Figure out "hidden" library dependencies from verbose
6372 # compiler output when linking a shared library.
6373 # Parse the compiler output and extract the necessary
6374 # objects, libraries and library flags.
6375 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6376 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6377 # Dependencies to place before and after the object being linked:
6378 _LT_TAGVAR(predep_objects, $1)=
6379 _LT_TAGVAR(postdep_objects, $1)=
6380 _LT_TAGVAR(predeps, $1)=
6381 _LT_TAGVAR(postdeps, $1)=
6382 _LT_TAGVAR(compiler_lib_search_path, $1)=
6383
6384 dnl we can't use the lt_simple_compile_test_code here,
6385 dnl because it contains code intended for an executable,
6386 dnl not a library. It's possible we should let each
6387 dnl tag define a new lt_????_link_test_code variable,
6388 dnl but it's only used here...
6389 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6390 int a;
6391 void foo (void) { a = 0; }
6392 _LT_EOF
6393 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6394 class Foo
6395 {
6396 public:
6397 Foo (void) { a = 0; }
6398 private:
6399 int a;
6400 };
6401 _LT_EOF
6402 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6403 subroutine foo
6404 implicit none
6405 integer*4 a
6406 a=0
6407 return
6408 end
6409 _LT_EOF
6410 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6411 subroutine foo
6412 implicit none
6413 integer a
6414 a=0
6415 return
6416 end
6417 _LT_EOF
6418 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6419 public class foo {
6420 private int a;
6421 public void bar (void) {
6422 a = 0;
6423 }
6424 };
6425 _LT_EOF
6426 ])
6427 dnl Parse the compiler output and extract the necessary
6428 dnl objects, libraries and library flags.
6429 if AC_TRY_EVAL(ac_compile); then
6430 # Parse the compiler output and extract the necessary
6431 # objects, libraries and library flags.
6432
6433 # Sentinel used to keep track of whether or not we are before
6434 # the conftest object file.
6435 pre_test_object_deps_done=no
6436
6437 for p in `eval "$output_verbose_link_cmd"`; do
6438 case $p in
6439
6440 -L* | -R* | -l*)
6441 # Some compilers place space between "-{L,R}" and the path.
6442 # Remove the space.
6443 if test $p = "-L" ||
6444 test $p = "-R"; then
6445 prev=$p
6446 continue
6447 else
6448 prev=
6449 fi
6450
6451 if test "$pre_test_object_deps_done" = no; then
6452 case $p in
6453 -L* | -R*)
6454 # Internal compiler library paths should come after those
6455 # provided the user. The postdeps already come after the
6456 # user supplied libs so there is no need to process them.
6457 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6458 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6459 else
6460 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6461 fi
6462 ;;
6463 # The "-l" case would never come before the object being
6464 # linked, so don't bother handling this case.
6465 esac
6466 else
6467 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6468 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6469 else
6470 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6471 fi
6472 fi
6473 ;;
6474
6475 *.$objext)
6476 # This assumes that the test object file only shows up
6477 # once in the compiler output.
6478 if test "$p" = "conftest.$objext"; then
6479 pre_test_object_deps_done=yes
6480 continue
6481 fi
6482
6483 if test "$pre_test_object_deps_done" = no; then
6484 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6485 _LT_TAGVAR(predep_objects, $1)="$p"
6486 else
6487 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6488 fi
6489 else
6490 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6491 _LT_TAGVAR(postdep_objects, $1)="$p"
6492 else
6493 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6494 fi
6495 fi
6496 ;;
6497
6498 *) ;; # Ignore the rest.
6499
6500 esac
6501 done
6502
6503 # Clean up.
6504 rm -f a.out a.exe
6505 else
6506 echo "libtool.m4: error: problem compiling $1 test program"
6507 fi
6508
6509 $RM -f confest.$objext
6510
6511 # PORTME: override above test on systems where it is broken
6512 m4_if([$1], [CXX],
6513 [case $host_os in
6514 interix[[3-9]]*)
6515 # Interix 3.5 installs completely hosed .la files for C++, so rather than
6516 # hack all around it, let's just trust "g++" to DTRT.
6517 _LT_TAGVAR(predep_objects,$1)=
6518 _LT_TAGVAR(postdep_objects,$1)=
6519 _LT_TAGVAR(postdeps,$1)=
6520 ;;
6521
6522 linux*)
6523 case `$CC -V 2>&1 | sed 5q` in
6524 *Sun\ C*)
6525 # Sun C++ 5.9
6526
6527 # The more standards-conforming stlport4 library is
6528 # incompatible with the Cstd library. Avoid specifying
6529 # it if it's in CXXFLAGS. Ignore libCrun as
6530 # -library=stlport4 depends on it.
6531 case " $CXX $CXXFLAGS " in
6532 *" -library=stlport4 "*)
6533 solaris_use_stlport4=yes
6534 ;;
6535 esac
6536
6537 if test "$solaris_use_stlport4" != yes; then
6538 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6539 fi
6540 ;;
6541 esac
6542 ;;
6543
6544 solaris*)
6545 case $cc_basename in
6546 CC*)
6547 # The more standards-conforming stlport4 library is
6548 # incompatible with the Cstd library. Avoid specifying
6549 # it if it's in CXXFLAGS. Ignore libCrun as
6550 # -library=stlport4 depends on it.
6551 case " $CXX $CXXFLAGS " in
6552 *" -library=stlport4 "*)
6553 solaris_use_stlport4=yes
6554 ;;
6555 esac
6556
6557 # Adding this requires a known-good setup of shared libraries for
6558 # Sun compiler versions before 5.6, else PIC objects from an old
6559 # archive will be linked into the output, leading to subtle bugs.
6560 if test "$solaris_use_stlport4" != yes; then
6561 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6562 fi
6563 ;;
6564 esac
6565 ;;
6566 esac
6567 ])
6568
6569 case " $_LT_TAGVAR(postdeps, $1) " in
6570 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6571 esac
6572 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6573 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6574 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6575 fi
6576 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6577 [The directories searched by this compiler when creating a shared library])
6578 _LT_TAGDECL([], [predep_objects], [1],
6579 [Dependencies to place before and after the objects being linked to
6580 create a shared library])
6581 _LT_TAGDECL([], [postdep_objects], [1])
6582 _LT_TAGDECL([], [predeps], [1])
6583 _LT_TAGDECL([], [postdeps], [1])
6584 _LT_TAGDECL([], [compiler_lib_search_path], [1],
6585 [The library search path used internally by the compiler when linking
6586 a shared library])
6587 ])# _LT_SYS_HIDDEN_LIBDEPS
6588
6589
6590 # _LT_PROG_F77
6591 # ------------
6592 # Since AC_PROG_F77 is broken, in that it returns the empty string
6593 # if there is no fortran compiler, we have our own version here.
6594 m4_defun([_LT_PROG_F77],
6595 [
6596 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6597 AC_PROG_F77
6598 if test -z "$F77" || test "X$F77" = "Xno"; then
6599 _lt_disable_F77=yes
6600 fi
6601 popdef([AC_MSG_ERROR])
6602 ])# _LT_PROG_F77
6603
6604 dnl aclocal-1.4 backwards compatibility:
6605 dnl AC_DEFUN([_LT_PROG_F77], [])
6606
6607
6608 # _LT_LANG_F77_CONFIG([TAG])
6609 # --------------------------
6610 # Ensure that the configuration variables for a Fortran 77 compiler are
6611 # suitably defined. These variables are subsequently used by _LT_CONFIG
6612 # to write the compiler configuration to `libtool'.
6613 m4_defun([_LT_LANG_F77_CONFIG],
6614 [AC_REQUIRE([_LT_PROG_F77])dnl
6615 AC_LANG_PUSH(Fortran 77)
6616
6617 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6618 _LT_TAGVAR(allow_undefined_flag, $1)=
6619 _LT_TAGVAR(always_export_symbols, $1)=no
6620 _LT_TAGVAR(archive_expsym_cmds, $1)=
6621 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6622 _LT_TAGVAR(hardcode_direct, $1)=no
6623 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6624 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6625 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6626 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6627 _LT_TAGVAR(hardcode_minus_L, $1)=no
6628 _LT_TAGVAR(hardcode_automatic, $1)=no
6629 _LT_TAGVAR(inherit_rpath, $1)=no
6630 _LT_TAGVAR(module_cmds, $1)=
6631 _LT_TAGVAR(module_expsym_cmds, $1)=
6632 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6633 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6634 _LT_TAGVAR(no_undefined_flag, $1)=
6635 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6636 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6637
6638 # Source file extension for f77 test sources.
6639 ac_ext=f
6640
6641 # Object file extension for compiled f77 test sources.
6642 objext=o
6643 _LT_TAGVAR(objext, $1)=$objext
6644
6645 # No sense in running all these tests if we already determined that
6646 # the F77 compiler isn't working. Some variables (like enable_shared)
6647 # are currently assumed to apply to all compilers on this platform,
6648 # and will be corrupted by setting them based on a non-working compiler.
6649 if test "$_lt_disable_F77" != yes; then
6650 # Code to be used in simple compile tests
6651 lt_simple_compile_test_code="\
6652 subroutine t
6653 return
6654 end
6655 "
6656
6657 # Code to be used in simple link tests
6658 lt_simple_link_test_code="\
6659 program t
6660 end
6661 "
6662
6663 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6664 _LT_TAG_COMPILER
6665
6666 # save warnings/boilerplate of simple test code
6667 _LT_COMPILER_BOILERPLATE
6668 _LT_LINKER_BOILERPLATE
6669
6670 # Allow CC to be a program name with arguments.
6671 lt_save_CC="$CC"
6672 lt_save_GCC=$GCC
6673 CC=${F77-"f77"}
6674 compiler=$CC
6675 _LT_TAGVAR(compiler, $1)=$CC
6676 _LT_CC_BASENAME([$compiler])
6677 GCC=$G77
6678 if test -n "$compiler"; then
6679 AC_MSG_CHECKING([if libtool supports shared libraries])
6680 AC_MSG_RESULT([$can_build_shared])
6681
6682 AC_MSG_CHECKING([whether to build shared libraries])
6683 test "$can_build_shared" = "no" && enable_shared=no
6684
6685 # On AIX, shared libraries and static libraries use the same namespace, and
6686 # are all built from PIC.
6687 case $host_os in
6688 aix3*)
6689 test "$enable_shared" = yes && enable_static=no
6690 if test -n "$RANLIB"; then
6691 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6692 postinstall_cmds='$RANLIB $lib'
6693 fi
6694 ;;
6695 aix[[4-9]]*)
6696 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6697 test "$enable_shared" = yes && enable_static=no
6698 fi
6699 ;;
6700 esac
6701 AC_MSG_RESULT([$enable_shared])
6702
6703 AC_MSG_CHECKING([whether to build static libraries])
6704 # Make sure either enable_shared or enable_static is yes.
6705 test "$enable_shared" = yes || enable_static=yes
6706 AC_MSG_RESULT([$enable_static])
6707
6708 _LT_TAGVAR(GCC, $1)="$G77"
6709 _LT_TAGVAR(LD, $1)="$LD"
6710
6711 ## CAVEAT EMPTOR:
6712 ## There is no encapsulation within the following macros, do not change
6713 ## the running order or otherwise move them around unless you know exactly
6714 ## what you are doing...
6715 _LT_COMPILER_PIC($1)
6716 _LT_COMPILER_C_O($1)
6717 _LT_COMPILER_FILE_LOCKS($1)
6718 _LT_LINKER_SHLIBS($1)
6719 _LT_SYS_DYNAMIC_LINKER($1)
6720 _LT_LINKER_HARDCODE_LIBPATH($1)
6721
6722 _LT_CONFIG($1)
6723 fi # test -n "$compiler"
6724
6725 GCC=$lt_save_GCC
6726 CC="$lt_save_CC"
6727 fi # test "$_lt_disable_F77" != yes
6728
6729 AC_LANG_POP
6730 ])# _LT_LANG_F77_CONFIG
6731
6732
6733 # _LT_PROG_FC
6734 # -----------
6735 # Since AC_PROG_FC is broken, in that it returns the empty string
6736 # if there is no fortran compiler, we have our own version here.
6737 m4_defun([_LT_PROG_FC],
6738 [
6739 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6740 AC_PROG_FC
6741 if test -z "$FC" || test "X$FC" = "Xno"; then
6742 _lt_disable_FC=yes
6743 fi
6744 popdef([AC_MSG_ERROR])
6745 ])# _LT_PROG_FC
6746
6747 dnl aclocal-1.4 backwards compatibility:
6748 dnl AC_DEFUN([_LT_PROG_FC], [])
6749
6750
6751 # _LT_LANG_FC_CONFIG([TAG])
6752 # -------------------------
6753 # Ensure that the configuration variables for a Fortran compiler are
6754 # suitably defined. These variables are subsequently used by _LT_CONFIG
6755 # to write the compiler configuration to `libtool'.
6756 m4_defun([_LT_LANG_FC_CONFIG],
6757 [AC_REQUIRE([_LT_PROG_FC])dnl
6758 AC_LANG_PUSH(Fortran)
6759
6760 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6761 _LT_TAGVAR(allow_undefined_flag, $1)=
6762 _LT_TAGVAR(always_export_symbols, $1)=no
6763 _LT_TAGVAR(archive_expsym_cmds, $1)=
6764 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6765 _LT_TAGVAR(hardcode_direct, $1)=no
6766 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6767 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6768 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6769 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6770 _LT_TAGVAR(hardcode_minus_L, $1)=no
6771 _LT_TAGVAR(hardcode_automatic, $1)=no
6772 _LT_TAGVAR(inherit_rpath, $1)=no
6773 _LT_TAGVAR(module_cmds, $1)=
6774 _LT_TAGVAR(module_expsym_cmds, $1)=
6775 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6776 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6777 _LT_TAGVAR(no_undefined_flag, $1)=
6778 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6779 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6780
6781 # Source file extension for fc test sources.
6782 ac_ext=${ac_fc_srcext-f}
6783
6784 # Object file extension for compiled fc test sources.
6785 objext=o
6786 _LT_TAGVAR(objext, $1)=$objext
6787
6788 # No sense in running all these tests if we already determined that
6789 # the FC compiler isn't working. Some variables (like enable_shared)
6790 # are currently assumed to apply to all compilers on this platform,
6791 # and will be corrupted by setting them based on a non-working compiler.
6792 if test "$_lt_disable_FC" != yes; then
6793 # Code to be used in simple compile tests
6794 lt_simple_compile_test_code="\
6795 subroutine t
6796 return
6797 end
6798 "
6799
6800 # Code to be used in simple link tests
6801 lt_simple_link_test_code="\
6802 program t
6803 end
6804 "
6805
6806 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6807 _LT_TAG_COMPILER
6808
6809 # save warnings/boilerplate of simple test code
6810 _LT_COMPILER_BOILERPLATE
6811 _LT_LINKER_BOILERPLATE
6812
6813 # Allow CC to be a program name with arguments.
6814 lt_save_CC="$CC"
6815 lt_save_GCC=$GCC
6816 CC=${FC-"f95"}
6817 compiler=$CC
6818 GCC=$ac_cv_fc_compiler_gnu
6819
6820 _LT_TAGVAR(compiler, $1)=$CC
6821 _LT_CC_BASENAME([$compiler])
6822
6823 if test -n "$compiler"; then
6824 AC_MSG_CHECKING([if libtool supports shared libraries])
6825 AC_MSG_RESULT([$can_build_shared])
6826
6827 AC_MSG_CHECKING([whether to build shared libraries])
6828 test "$can_build_shared" = "no" && enable_shared=no
6829
6830 # On AIX, shared libraries and static libraries use the same namespace, and
6831 # are all built from PIC.
6832 case $host_os in
6833 aix3*)
6834 test "$enable_shared" = yes && enable_static=no
6835 if test -n "$RANLIB"; then
6836 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6837 postinstall_cmds='$RANLIB $lib'
6838 fi
6839 ;;
6840 aix[[4-9]]*)
6841 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6842 test "$enable_shared" = yes && enable_static=no
6843 fi
6844 ;;
6845 esac
6846 AC_MSG_RESULT([$enable_shared])
6847
6848 AC_MSG_CHECKING([whether to build static libraries])
6849 # Make sure either enable_shared or enable_static is yes.
6850 test "$enable_shared" = yes || enable_static=yes
6851 AC_MSG_RESULT([$enable_static])
6852
6853 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6854 _LT_TAGVAR(LD, $1)="$LD"
6855
6856 ## CAVEAT EMPTOR:
6857 ## There is no encapsulation within the following macros, do not change
6858 ## the running order or otherwise move them around unless you know exactly
6859 ## what you are doing...
6860 _LT_SYS_HIDDEN_LIBDEPS($1)
6861 _LT_COMPILER_PIC($1)
6862 _LT_COMPILER_C_O($1)
6863 _LT_COMPILER_FILE_LOCKS($1)
6864 _LT_LINKER_SHLIBS($1)
6865 _LT_SYS_DYNAMIC_LINKER($1)
6866 _LT_LINKER_HARDCODE_LIBPATH($1)
6867
6868 _LT_CONFIG($1)
6869 fi # test -n "$compiler"
6870
6871 GCC=$lt_save_GCC
6872 CC="$lt_save_CC"
6873 fi # test "$_lt_disable_FC" != yes
6874
6875 AC_LANG_POP
6876 ])# _LT_LANG_FC_CONFIG
6877
6878
6879 # _LT_LANG_GCJ_CONFIG([TAG])
6880 # --------------------------
6881 # Ensure that the configuration variables for the GNU Java Compiler compiler
6882 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6883 # to write the compiler configuration to `libtool'.
6884 m4_defun([_LT_LANG_GCJ_CONFIG],
6885 [AC_REQUIRE([LT_PROG_GCJ])dnl
6886 AC_LANG_SAVE
6887
6888 # Source file extension for Java test sources.
6889 ac_ext=java
6890
6891 # Object file extension for compiled Java test sources.
6892 objext=o
6893 _LT_TAGVAR(objext, $1)=$objext
6894
6895 # Code to be used in simple compile tests
6896 lt_simple_compile_test_code="class foo {}"
6897
6898 # Code to be used in simple link tests
6899 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6900
6901 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6902 _LT_TAG_COMPILER
6903
6904 # save warnings/boilerplate of simple test code
6905 _LT_COMPILER_BOILERPLATE
6906 _LT_LINKER_BOILERPLATE
6907
6908 # Allow CC to be a program name with arguments.
6909 lt_save_CC="$CC"
6910 lt_save_GCC=$GCC
6911 GCC=yes
6912 CC=${GCJ-"gcj"}
6913 compiler=$CC
6914 _LT_TAGVAR(compiler, $1)=$CC
6915 _LT_TAGVAR(LD, $1)="$LD"
6916 _LT_CC_BASENAME([$compiler])
6917
6918 # GCJ did not exist at the time GCC didn't implicitly link libc in.
6919 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6920
6921 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6922
6923 if test -n "$compiler"; then
6924 _LT_COMPILER_NO_RTTI($1)
6925 _LT_COMPILER_PIC($1)
6926 _LT_COMPILER_C_O($1)
6927 _LT_COMPILER_FILE_LOCKS($1)
6928 _LT_LINKER_SHLIBS($1)
6929 _LT_LINKER_HARDCODE_LIBPATH($1)
6930
6931 _LT_CONFIG($1)
6932 fi
6933
6934 AC_LANG_RESTORE
6935
6936 GCC=$lt_save_GCC
6937 CC="$lt_save_CC"
6938 ])# _LT_LANG_GCJ_CONFIG
6939
6940
6941 # _LT_LANG_RC_CONFIG([TAG])
6942 # -------------------------
6943 # Ensure that the configuration variables for the Windows resource compiler
6944 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6945 # to write the compiler configuration to `libtool'.
6946 m4_defun([_LT_LANG_RC_CONFIG],
6947 [AC_REQUIRE([LT_PROG_RC])dnl
6948 AC_LANG_SAVE
6949
6950 # Source file extension for RC test sources.
6951 ac_ext=rc
6952
6953 # Object file extension for compiled RC test sources.
6954 objext=o
6955 _LT_TAGVAR(objext, $1)=$objext
6956
6957 # Code to be used in simple compile tests
6958 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6959
6960 # Code to be used in simple link tests
6961 lt_simple_link_test_code="$lt_simple_compile_test_code"
6962
6963 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6964 _LT_TAG_COMPILER
6965
6966 # save warnings/boilerplate of simple test code
6967 _LT_COMPILER_BOILERPLATE
6968 _LT_LINKER_BOILERPLATE
6969
6970 # Allow CC to be a program name with arguments.
6971 lt_save_CC="$CC"
6972 lt_save_GCC=$GCC
6973 GCC=
6974 CC=${RC-"windres"}
6975 compiler=$CC
6976 _LT_TAGVAR(compiler, $1)=$CC
6977 _LT_CC_BASENAME([$compiler])
6978 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6979
6980 if test -n "$compiler"; then
6981 :
6982 _LT_CONFIG($1)
6983 fi
6984
6985 GCC=$lt_save_GCC
6986 AC_LANG_RESTORE
6987 CC="$lt_save_CC"
6988 ])# _LT_LANG_RC_CONFIG
6989
6990
6991 # LT_PROG_GCJ
6992 # -----------
6993 AC_DEFUN([LT_PROG_GCJ],
6994 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6995 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6996 [AC_CHECK_TOOL(GCJ, gcj,)
6997 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6998 AC_SUBST(GCJFLAGS)])])[]dnl
6999 ])
7000
7001 # Old name:
7002 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7003 dnl aclocal-1.4 backwards compatibility:
7004 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7005
7006
7007 # LT_PROG_RC
7008 # ----------
7009 AC_DEFUN([LT_PROG_RC],
7010 [AC_CHECK_TOOL(RC, windres,)
7011 ])
7012
7013 # Old name:
7014 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7015 dnl aclocal-1.4 backwards compatibility:
7016 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7017
7018
7019 # _LT_DECL_EGREP
7020 # --------------
7021 # If we don't have a new enough Autoconf to choose the best grep
7022 # available, choose the one first in the user's PATH.
7023 m4_defun([_LT_DECL_EGREP],
7024 [AC_REQUIRE([AC_PROG_EGREP])dnl
7025 AC_REQUIRE([AC_PROG_FGREP])dnl
7026 test -z "$GREP" && GREP=grep
7027 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7028 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7029 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7030 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7031 AC_SUBST([GREP])
7032 ])
7033
7034
7035 # _LT_DECL_OBJDUMP
7036 # --------------
7037 # If we don't have a new enough Autoconf to choose the best objdump
7038 # available, choose the one first in the user's PATH.
7039 m4_defun([_LT_DECL_OBJDUMP],
7040 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7041 test -z "$OBJDUMP" && OBJDUMP=objdump
7042 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7043 AC_SUBST([OBJDUMP])
7044 ])
7045
7046
7047 # _LT_DECL_SED
7048 # ------------
7049 # Check for a fully-functional sed program, that truncates
7050 # as few characters as possible. Prefer GNU sed if found.
7051 m4_defun([_LT_DECL_SED],
7052 [AC_PROG_SED
7053 test -z "$SED" && SED=sed
7054 Xsed="$SED -e 1s/^X//"
7055 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7056 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7057 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7058 ])# _LT_DECL_SED
7059
7060 m4_ifndef([AC_PROG_SED], [
7061 # NOTE: This macro has been submitted for inclusion into #
7062 # GNU Autoconf as AC_PROG_SED. When it is available in #
7063 # a released version of Autoconf we should remove this #
7064 # macro and use it instead. #
7065
7066 m4_defun([AC_PROG_SED],
7067 [AC_MSG_CHECKING([for a sed that does not truncate output])
7068 AC_CACHE_VAL(lt_cv_path_SED,
7069 [# Loop through the user's path and test for sed and gsed.
7070 # Then use that list of sed's as ones to test for truncation.
7071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7072 for as_dir in $PATH
7073 do
7074 IFS=$as_save_IFS
7075 test -z "$as_dir" && as_dir=.
7076 for lt_ac_prog in sed gsed; do
7077 for ac_exec_ext in '' $ac_executable_extensions; do
7078 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7079 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7080 fi
7081 done
7082 done
7083 done
7084 IFS=$as_save_IFS
7085 lt_ac_max=0
7086 lt_ac_count=0
7087 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7088 # along with /bin/sed that truncates output.
7089 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7090 test ! -f $lt_ac_sed && continue
7091 cat /dev/null > conftest.in
7092 lt_ac_count=0
7093 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7094 # Check for GNU sed and select it if it is found.
7095 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7096 lt_cv_path_SED=$lt_ac_sed
7097 break
7098 fi
7099 while true; do
7100 cat conftest.in conftest.in >conftest.tmp
7101 mv conftest.tmp conftest.in
7102 cp conftest.in conftest.nl
7103 echo >>conftest.nl
7104 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7105 cmp -s conftest.out conftest.nl || break
7106 # 10000 chars as input seems more than enough
7107 test $lt_ac_count -gt 10 && break
7108 lt_ac_count=`expr $lt_ac_count + 1`
7109 if test $lt_ac_count -gt $lt_ac_max; then
7110 lt_ac_max=$lt_ac_count
7111 lt_cv_path_SED=$lt_ac_sed
7112 fi
7113 done
7114 done
7115 ])
7116 SED=$lt_cv_path_SED
7117 AC_SUBST([SED])
7118 AC_MSG_RESULT([$SED])
7119 ])#AC_PROG_SED
7120 ])#m4_ifndef
7121
7122 # Old name:
7123 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7124 dnl aclocal-1.4 backwards compatibility:
7125 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7126
7127
7128 # _LT_CHECK_SHELL_FEATURES
7129 # ------------------------
7130 # Find out whether the shell is Bourne or XSI compatible,
7131 # or has some other useful features.
7132 m4_defun([_LT_CHECK_SHELL_FEATURES],
7133 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7134 # Try some XSI features
7135 xsi_shell=no
7136 ( _lt_dummy="a/b/c"
7137 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7138 = c,a/b,, \
7139 && eval 'test $(( 1 + 1 )) -eq 2 \
7140 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7141 && xsi_shell=yes
7142 AC_MSG_RESULT([$xsi_shell])
7143 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7144
7145 AC_MSG_CHECKING([whether the shell understands "+="])
7146 lt_shell_append=no
7147 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7148 >/dev/null 2>&1 \
7149 && lt_shell_append=yes
7150 AC_MSG_RESULT([$lt_shell_append])
7151 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7152
7153 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7154 lt_unset=unset
7155 else
7156 lt_unset=false
7157 fi
7158 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7159
7160 # test EBCDIC or ASCII
7161 case `echo X|tr X '\101'` in
7162 A) # ASCII based system
7163 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7164 lt_SP2NL='tr \040 \012'
7165 lt_NL2SP='tr \015\012 \040\040'
7166 ;;
7167 *) # EBCDIC based system
7168 lt_SP2NL='tr \100 \n'
7169 lt_NL2SP='tr \r\n \100\100'
7170 ;;
7171 esac
7172 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7173 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7174 ])# _LT_CHECK_SHELL_FEATURES
7175
7176
7177 # _LT_PROG_XSI_SHELLFNS
7178 # ---------------------
7179 # Bourne and XSI compatible variants of some useful shell functions.
7180 m4_defun([_LT_PROG_XSI_SHELLFNS],
7181 [case $xsi_shell in
7182 yes)
7183 cat << \_LT_EOF >> "$cfgfile"
7184
7185 # func_dirname file append nondir_replacement
7186 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7187 # otherwise set result to NONDIR_REPLACEMENT.
7188 func_dirname ()
7189 {
7190 case ${1} in
7191 */*) func_dirname_result="${1%/*}${2}" ;;
7192 * ) func_dirname_result="${3}" ;;
7193 esac
7194 }
7195
7196 # func_basename file
7197 func_basename ()
7198 {
7199 func_basename_result="${1##*/}"
7200 }
7201
7202 # func_dirname_and_basename file append nondir_replacement
7203 # perform func_basename and func_dirname in a single function
7204 # call:
7205 # dirname: Compute the dirname of FILE. If nonempty,
7206 # add APPEND to the result, otherwise set result
7207 # to NONDIR_REPLACEMENT.
7208 # value returned in "$func_dirname_result"
7209 # basename: Compute filename of FILE.
7210 # value retuned in "$func_basename_result"
7211 # Implementation must be kept synchronized with func_dirname
7212 # and func_basename. For efficiency, we do not delegate to
7213 # those functions but instead duplicate the functionality here.
7214 func_dirname_and_basename ()
7215 {
7216 case ${1} in
7217 */*) func_dirname_result="${1%/*}${2}" ;;
7218 * ) func_dirname_result="${3}" ;;
7219 esac
7220 func_basename_result="${1##*/}"
7221 }
7222
7223 # func_stripname prefix suffix name
7224 # strip PREFIX and SUFFIX off of NAME.
7225 # PREFIX and SUFFIX must not contain globbing or regex special
7226 # characters, hashes, percent signs, but SUFFIX may contain a leading
7227 # dot (in which case that matches only a dot).
7228 func_stripname ()
7229 {
7230 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7231 # positional parameters, so assign one to ordinary parameter first.
7232 func_stripname_result=${3}
7233 func_stripname_result=${func_stripname_result#"${1}"}
7234 func_stripname_result=${func_stripname_result%"${2}"}
7235 }
7236
7237 # func_opt_split
7238 func_opt_split ()
7239 {
7240 func_opt_split_opt=${1%%=*}
7241 func_opt_split_arg=${1#*=}
7242 }
7243
7244 # func_lo2o object
7245 func_lo2o ()
7246 {
7247 case ${1} in
7248 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7249 *) func_lo2o_result=${1} ;;
7250 esac
7251 }
7252
7253 # func_xform libobj-or-source
7254 func_xform ()
7255 {
7256 func_xform_result=${1%.*}.lo
7257 }
7258
7259 # func_arith arithmetic-term...
7260 func_arith ()
7261 {
7262 func_arith_result=$(( $[*] ))
7263 }
7264
7265 # func_len string
7266 # STRING may not start with a hyphen.
7267 func_len ()
7268 {
7269 func_len_result=${#1}
7270 }
7271
7272 _LT_EOF
7273 ;;
7274 *) # Bourne compatible functions.
7275 cat << \_LT_EOF >> "$cfgfile"
7276
7277 # func_dirname file append nondir_replacement
7278 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7279 # otherwise set result to NONDIR_REPLACEMENT.
7280 func_dirname ()
7281 {
7282 # Extract subdirectory from the argument.
7283 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7284 if test "X$func_dirname_result" = "X${1}"; then
7285 func_dirname_result="${3}"
7286 else
7287 func_dirname_result="$func_dirname_result${2}"
7288 fi
7289 }
7290
7291 # func_basename file
7292 func_basename ()
7293 {
7294 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7295 }
7296
7297 dnl func_dirname_and_basename
7298 dnl A portable version of this function is already defined in general.m4sh
7299 dnl so there is no need for it here.
7300
7301 # func_stripname prefix suffix name
7302 # strip PREFIX and SUFFIX off of NAME.
7303 # PREFIX and SUFFIX must not contain globbing or regex special
7304 # characters, hashes, percent signs, but SUFFIX may contain a leading
7305 # dot (in which case that matches only a dot).
7306 # func_strip_suffix prefix name
7307 func_stripname ()
7308 {
7309 case ${2} in
7310 .*) func_stripname_result=`$ECHO "X${3}" \
7311 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7312 *) func_stripname_result=`$ECHO "X${3}" \
7313 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7314 esac
7315 }
7316
7317 # sed scripts:
7318 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7319 my_sed_long_arg='1s/^-[[^=]]*=//'
7320
7321 # func_opt_split
7322 func_opt_split ()
7323 {
7324 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7325 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7326 }
7327
7328 # func_lo2o object
7329 func_lo2o ()
7330 {
7331 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7332 }
7333
7334 # func_xform libobj-or-source
7335 func_xform ()
7336 {
7337 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7338 }
7339
7340 # func_arith arithmetic-term...
7341 func_arith ()
7342 {
7343 func_arith_result=`expr "$[@]"`
7344 }
7345
7346 # func_len string
7347 # STRING may not start with a hyphen.
7348 func_len ()
7349 {
7350 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7351 }
7352
7353 _LT_EOF
7354 esac
7355
7356 case $lt_shell_append in
7357 yes)
7358 cat << \_LT_EOF >> "$cfgfile"
7359
7360 # func_append var value
7361 # Append VALUE to the end of shell variable VAR.
7362 func_append ()
7363 {
7364 eval "$[1]+=\$[2]"
7365 }
7366 _LT_EOF
7367 ;;
7368 *)
7369 cat << \_LT_EOF >> "$cfgfile"
7370
7371 # func_append var value
7372 # Append VALUE to the end of shell variable VAR.
7373 func_append ()
7374 {
7375 eval "$[1]=\$$[1]\$[2]"
7376 }
7377
7378 _LT_EOF
7379 ;;
7380 esac
7381 ])
7382
7383 # Helper functions for option handling. -*- Autoconf -*-
7384 #
7385 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7386 # Written by Gary V. Vaughan, 2004
7387 #
7388 # This file is free software; the Free Software Foundation gives
7389 # unlimited permission to copy and/or distribute it, with or without
7390 # modifications, as long as this notice is preserved.
7391
7392 # serial 6 ltoptions.m4
7393
7394 # This is to help aclocal find these macros, as it can't see m4_define.
7395 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7396
7397
7398 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7399 # ------------------------------------------
7400 m4_define([_LT_MANGLE_OPTION],
7401 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
7402
7403
7404 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7405 # ---------------------------------------
7406 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7407 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
7408 # saved as a flag.
7409 m4_define([_LT_SET_OPTION],
7410 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
7411 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
7412 _LT_MANGLE_DEFUN([$1], [$2]),
7413 [m4_warning([Unknown $1 option `$2'])])[]dnl
7414 ])
7415
7416
7417 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
7418 # ------------------------------------------------------------
7419 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7420 m4_define([_LT_IF_OPTION],
7421 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
7422
7423
7424 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
7425 # -------------------------------------------------------
7426 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
7427 # are set.
7428 m4_define([_LT_UNLESS_OPTIONS],
7429 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7430 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
7431 [m4_define([$0_found])])])[]dnl
7432 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
7433 ])[]dnl
7434 ])
7435
7436
7437 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
7438 # ----------------------------------------
7439 # OPTION-LIST is a space-separated list of Libtool options associated
7440 # with MACRO-NAME. If any OPTION has a matching handler declared with
7441 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
7442 # the unknown option and exit.
7443 m4_defun([_LT_SET_OPTIONS],
7444 [# Set options
7445 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7446 [_LT_SET_OPTION([$1], _LT_Option)])
7447
7448 m4_if([$1],[LT_INIT],[
7449 dnl
7450 dnl Simply set some default values (i.e off) if boolean options were not
7451 dnl specified:
7452 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
7453 ])
7454 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
7455 ])
7456 dnl
7457 dnl If no reference was made to various pairs of opposing options, then
7458 dnl we run the default mode handler for the pair. For example, if neither
7459 dnl `shared' nor `disable-shared' was passed, we enable building of shared
7460 dnl archives by default:
7461 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
7462 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
7463 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
7464 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
7465 [_LT_ENABLE_FAST_INSTALL])
7466 ])
7467 ])# _LT_SET_OPTIONS
7468
7469
7470
7471 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
7472 # -----------------------------------------
7473 m4_define([_LT_MANGLE_DEFUN],
7474 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
7475
7476
7477 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
7478 # -----------------------------------------------
7479 m4_define([LT_OPTION_DEFINE],
7480 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
7481 ])# LT_OPTION_DEFINE
7482
7483
7484 # dlopen
7485 # ------
7486 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
7487 ])
7488
7489 AU_DEFUN([AC_LIBTOOL_DLOPEN],
7490 [_LT_SET_OPTION([LT_INIT], [dlopen])
7491 AC_DIAGNOSE([obsolete],
7492 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7493 put the `dlopen' option into LT_INIT's first parameter.])
7494 ])
7495
7496 dnl aclocal-1.4 backwards compatibility:
7497 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
7498
7499
7500 # win32-dll
7501 # ---------
7502 # Declare package support for building win32 dll's.
7503 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
7504 [enable_win32_dll=yes
7505
7506 case $host in
7507 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
7508 AC_CHECK_TOOL(AS, as, false)
7509 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7510 AC_CHECK_TOOL(OBJDUMP, objdump, false)
7511 ;;
7512 esac
7513
7514 test -z "$AS" && AS=as
7515 _LT_DECL([], [AS], [0], [Assembler program])dnl
7516
7517 test -z "$DLLTOOL" && DLLTOOL=dlltool
7518 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
7519
7520 test -z "$OBJDUMP" && OBJDUMP=objdump
7521 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
7522 ])# win32-dll
7523
7524 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
7525 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7526 _LT_SET_OPTION([LT_INIT], [win32-dll])
7527 AC_DIAGNOSE([obsolete],
7528 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7529 put the `win32-dll' option into LT_INIT's first parameter.])
7530 ])
7531
7532 dnl aclocal-1.4 backwards compatibility:
7533 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
7534
7535
7536 # _LT_ENABLE_SHARED([DEFAULT])
7537 # ----------------------------
7538 # implement the --enable-shared flag, and supports the `shared' and
7539 # `disable-shared' LT_INIT options.
7540 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7541 m4_define([_LT_ENABLE_SHARED],
7542 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
7543 AC_ARG_ENABLE([shared],
7544 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7545 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
7546 [p=${PACKAGE-default}
7547 case $enableval in
7548 yes) enable_shared=yes ;;
7549 no) enable_shared=no ;;
7550 *)
7551 enable_shared=no
7552 # Look at the argument we got. We use all the common list separators.
7553 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7554 for pkg in $enableval; do
7555 IFS="$lt_save_ifs"
7556 if test "X$pkg" = "X$p"; then
7557 enable_shared=yes
7558 fi
7559 done
7560 IFS="$lt_save_ifs"
7561 ;;
7562 esac],
7563 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
7564
7565 _LT_DECL([build_libtool_libs], [enable_shared], [0],
7566 [Whether or not to build shared libraries])
7567 ])# _LT_ENABLE_SHARED
7568
7569 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
7570 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
7571
7572 # Old names:
7573 AC_DEFUN([AC_ENABLE_SHARED],
7574 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
7575 ])
7576
7577 AC_DEFUN([AC_DISABLE_SHARED],
7578 [_LT_SET_OPTION([LT_INIT], [disable-shared])
7579 ])
7580
7581 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7582 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7583
7584 dnl aclocal-1.4 backwards compatibility:
7585 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
7586 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
7587
7588
7589
7590 # _LT_ENABLE_STATIC([DEFAULT])
7591 # ----------------------------
7592 # implement the --enable-static flag, and support the `static' and
7593 # `disable-static' LT_INIT options.
7594 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7595 m4_define([_LT_ENABLE_STATIC],
7596 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
7597 AC_ARG_ENABLE([static],
7598 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7599 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
7600 [p=${PACKAGE-default}
7601 case $enableval in
7602 yes) enable_static=yes ;;
7603 no) enable_static=no ;;
7604 *)
7605 enable_static=no
7606 # Look at the argument we got. We use all the common list separators.
7607 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7608 for pkg in $enableval; do
7609 IFS="$lt_save_ifs"
7610 if test "X$pkg" = "X$p"; then
7611 enable_static=yes
7612 fi
7613 done
7614 IFS="$lt_save_ifs"
7615 ;;
7616 esac],
7617 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
7618
7619 _LT_DECL([build_old_libs], [enable_static], [0],
7620 [Whether or not to build static libraries])
7621 ])# _LT_ENABLE_STATIC
7622
7623 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
7624 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
7625
7626 # Old names:
7627 AC_DEFUN([AC_ENABLE_STATIC],
7628 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
7629 ])
7630
7631 AC_DEFUN([AC_DISABLE_STATIC],
7632 [_LT_SET_OPTION([LT_INIT], [disable-static])
7633 ])
7634
7635 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7636 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7637
7638 dnl aclocal-1.4 backwards compatibility:
7639 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
7640 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
7641
7642
7643
7644 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
7645 # ----------------------------------
7646 # implement the --enable-fast-install flag, and support the `fast-install'
7647 # and `disable-fast-install' LT_INIT options.
7648 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7649 m4_define([_LT_ENABLE_FAST_INSTALL],
7650 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
7651 AC_ARG_ENABLE([fast-install],
7652 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7653 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7654 [p=${PACKAGE-default}
7655 case $enableval in
7656 yes) enable_fast_install=yes ;;
7657 no) enable_fast_install=no ;;
7658 *)
7659 enable_fast_install=no
7660 # Look at the argument we got. We use all the common list separators.
7661 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7662 for pkg in $enableval; do
7663 IFS="$lt_save_ifs"
7664 if test "X$pkg" = "X$p"; then
7665 enable_fast_install=yes
7666 fi
7667 done
7668 IFS="$lt_save_ifs"
7669 ;;
7670 esac],
7671 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
7672
7673 _LT_DECL([fast_install], [enable_fast_install], [0],
7674 [Whether or not to optimize for fast installation])dnl
7675 ])# _LT_ENABLE_FAST_INSTALL
7676
7677 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
7678 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
7679
7680 # Old names:
7681 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
7682 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
7683 AC_DIAGNOSE([obsolete],
7684 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
7685 the `fast-install' option into LT_INIT's first parameter.])
7686 ])
7687
7688 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
7689 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
7690 AC_DIAGNOSE([obsolete],
7691 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
7692 the `disable-fast-install' option into LT_INIT's first parameter.])
7693 ])
7694
7695 dnl aclocal-1.4 backwards compatibility:
7696 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
7697 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
7698
7699
7700 # _LT_WITH_PIC([MODE])
7701 # --------------------
7702 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
7703 # LT_INIT options.
7704 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7705 m4_define([_LT_WITH_PIC],
7706 [AC_ARG_WITH([pic],
7707 [AS_HELP_STRING([--with-pic],
7708 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
7709 [pic_mode="$withval"],
7710 [pic_mode=default])
7711
7712 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
7713
7714 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
7715 ])# _LT_WITH_PIC
7716
7717 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
7718 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
7719
7720 # Old name:
7721 AU_DEFUN([AC_LIBTOOL_PICMODE],
7722 [_LT_SET_OPTION([LT_INIT], [pic-only])
7723 AC_DIAGNOSE([obsolete],
7724 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7725 put the `pic-only' option into LT_INIT's first parameter.])
7726 ])
7727
7728 dnl aclocal-1.4 backwards compatibility:
7729 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
7730
7731
7732 m4_define([_LTDL_MODE], [])
7733 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
7734 [m4_define([_LTDL_MODE], [nonrecursive])])
7735 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
7736 [m4_define([_LTDL_MODE], [recursive])])
7737 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
7738 [m4_define([_LTDL_MODE], [subproject])])
7739
7740 m4_define([_LTDL_TYPE], [])
7741 LT_OPTION_DEFINE([LTDL_INIT], [installable],
7742 [m4_define([_LTDL_TYPE], [installable])])
7743 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
7744 [m4_define([_LTDL_TYPE], [convenience])])
7745
7746 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
7747 #
7748 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7749 # Written by Gary V. Vaughan, 2004
7750 #
7751 # This file is free software; the Free Software Foundation gives
7752 # unlimited permission to copy and/or distribute it, with or without
7753 # modifications, as long as this notice is preserved.
7754
7755 # serial 6 ltsugar.m4
7756
7757 # This is to help aclocal find these macros, as it can't see m4_define.
7758 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
7759
7760
7761 # lt_join(SEP, ARG1, [ARG2...])
7762 # -----------------------------
7763 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
7764 # associated separator.
7765 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
7766 # versions in m4sugar had bugs.
7767 m4_define([lt_join],
7768 [m4_if([$#], [1], [],
7769 [$#], [2], [[$2]],
7770 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
7771 m4_define([_lt_join],
7772 [m4_if([$#$2], [2], [],
7773 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
7774
7775
7776 # lt_car(LIST)
7777 # lt_cdr(LIST)
7778 # ------------
7779 # Manipulate m4 lists.
7780 # These macros are necessary as long as will still need to support
7781 # Autoconf-2.59 which quotes differently.
7782 m4_define([lt_car], [[$1]])
7783 m4_define([lt_cdr],
7784 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
7785 [$#], 1, [],
7786 [m4_dquote(m4_shift($@))])])
7787 m4_define([lt_unquote], $1)
7788
7789
7790 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
7791 # ------------------------------------------
7792 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
7793 # Note that neither SEPARATOR nor STRING are expanded; they are appended
7794 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
7795 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
7796 # than defined and empty).
7797 #
7798 # This macro is needed until we can rely on Autoconf 2.62, since earlier
7799 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
7800 m4_define([lt_append],
7801 [m4_define([$1],
7802 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
7803
7804
7805
7806 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
7807 # ----------------------------------------------------------
7808 # Produce a SEP delimited list of all paired combinations of elements of
7809 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
7810 # has the form PREFIXmINFIXSUFFIXn.
7811 # Needed until we can rely on m4_combine added in Autoconf 2.62.
7812 m4_define([lt_combine],
7813 [m4_if(m4_eval([$# > 3]), [1],
7814 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
7815 [[m4_foreach([_Lt_prefix], [$2],
7816 [m4_foreach([_Lt_suffix],
7817 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
7818 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
7819
7820
7821 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
7822 # -----------------------------------------------------------------------
7823 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
7824 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
7825 m4_define([lt_if_append_uniq],
7826 [m4_ifdef([$1],
7827 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
7828 [lt_append([$1], [$2], [$3])$4],
7829 [$5])],
7830 [lt_append([$1], [$2], [$3])$4])])
7831
7832
7833 # lt_dict_add(DICT, KEY, VALUE)
7834 # -----------------------------
7835 m4_define([lt_dict_add],
7836 [m4_define([$1($2)], [$3])])
7837
7838
7839 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
7840 # --------------------------------------------
7841 m4_define([lt_dict_add_subkey],
7842 [m4_define([$1($2:$3)], [$4])])
7843
7844
7845 # lt_dict_fetch(DICT, KEY, [SUBKEY])
7846 # ----------------------------------
7847 m4_define([lt_dict_fetch],
7848 [m4_ifval([$3],
7849 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
7850 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
7851
7852
7853 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
7854 # -----------------------------------------------------------------
7855 m4_define([lt_if_dict_fetch],
7856 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
7857 [$5],
7858 [$6])])
7859
7860
7861 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
7862 # --------------------------------------------------------------
7863 m4_define([lt_dict_filter],
7864 [m4_if([$5], [], [],
7865 [lt_join(m4_quote(m4_default([$4], [[, ]])),
7866 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
7867 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
7868 ])
7869
7870 # ltversion.m4 -- version numbers -*- Autoconf -*-
7871 #
7872 # Copyright (C) 2004 Free Software Foundation, Inc.
7873 # Written by Scott James Remnant, 2004
7874 #
7875 # This file is free software; the Free Software Foundation gives
7876 # unlimited permission to copy and/or distribute it, with or without
7877 # modifications, as long as this notice is preserved.
7878
7879 # Generated from ltversion.in.
7880
7881 # serial 3017 ltversion.m4
7882 # This file is part of GNU Libtool
7883
7884 m4_define([LT_PACKAGE_VERSION], [2.2.6b])
7885 m4_define([LT_PACKAGE_REVISION], [1.3017])
7886
7887 AC_DEFUN([LTVERSION_VERSION],
7888 [macro_version='2.2.6b'
7889 macro_revision='1.3017'
7890 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
7891 _LT_DECL(, macro_revision, 0)
7892 ])
7893
7894 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
7895 #
7896 # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
7897 # Written by Scott James Remnant, 2004.
7898 #
7899 # This file is free software; the Free Software Foundation gives
7900 # unlimited permission to copy and/or distribute it, with or without
7901 # modifications, as long as this notice is preserved.
7902
7903 # serial 4 lt~obsolete.m4
7904
7905 # These exist entirely to fool aclocal when bootstrapping libtool.
7906 #
7907 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
7908 # which have later been changed to m4_define as they aren't part of the
7909 # exported API, or moved to Autoconf or Automake where they belong.
7910 #
7911 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
7912 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
7913 # using a macro with the same name in our local m4/libtool.m4 it'll
7914 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
7915 # and doesn't know about Autoconf macros at all.)
7916 #
7917 # So we provide this file, which has a silly filename so it's always
7918 # included after everything else. This provides aclocal with the
7919 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
7920 # because those macros already exist, or will be overwritten later.
7921 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
7922 #
7923 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
7924 # Yes, that means every name once taken will need to remain here until
7925 # we give up compatibility with versions before 1.7, at which point
7926 # we need to keep only those names which we still refer to.
7927
7928 # This is to help aclocal find these macros, as it can't see m4_define.
7929 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
7930
7931 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
7932 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
7933 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
7934 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
7935 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
7936 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
7937 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
7938 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
7939 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
7940 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
7941 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
7942 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
7943 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
7944 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
7945 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
7946 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
7947 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
7948 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
7949 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
7950 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
7951 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
7952 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
7953 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
7954 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
7955 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
7956 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
7957 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
7958 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
7959 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
7960 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
7961 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
7962 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
7963 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
7964 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
7965 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
7966 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
7967 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
7968 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
7969 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
7970 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
7971 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
7972 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
7973 m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
7974 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
7975 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
7976 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
7977 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
7978 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
7979 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
7980 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
7981 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
7982 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
7983 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
7984 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
7985 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
7986
7987 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
7988 #
7989 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7990 #
7991 # This program is free software; you can redistribute it and/or modify
7992 # it under the terms of the GNU General Public License as published by
7993 # the Free Software Foundation; either version 2 of the License, or
7994 # (at your option) any later version.
7995 #
7996 # This program is distributed in the hope that it will be useful, but
7997 # WITHOUT ANY WARRANTY; without even the implied warranty of
7998 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7999 # General Public License for more details.
8000 #
8001 # You should have received a copy of the GNU General Public License
8002 # along with this program; if not, write to the Free Software
8003 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8004 #
8005 # As a special exception to the GNU General Public License, if you
8006 # distribute this file as part of a program that contains a
8007 # configuration script generated by Autoconf, you may include it under
8008 # the same distribution terms that you use for the rest of that program.
8009
8010 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
8011 # ----------------------------------
8012 AC_DEFUN([PKG_PROG_PKG_CONFIG],
8013 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8014 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8015 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8016 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8017 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8018 fi
8019 if test -n "$PKG_CONFIG"; then
8020 _pkg_min_version=m4_default([$1], [0.9.0])
8021 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8022 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8023 AC_MSG_RESULT([yes])
8024 else
8025 AC_MSG_RESULT([no])
8026 PKG_CONFIG=""
8027 fi
8028
8029 fi[]dnl
8030 ])# PKG_PROG_PKG_CONFIG
8031
8032 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8033 #
8034 # Check to see whether a particular set of modules exists. Similar
8035 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
8036 #
8037 #
8038 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
8039 # this or PKG_CHECK_MODULES is called, or make sure to call
8040 # PKG_CHECK_EXISTS manually
8041 # --------------------------------------------------------------
8042 AC_DEFUN([PKG_CHECK_EXISTS],
8043 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8044 if test -n "$PKG_CONFIG" && \
8045 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8046 m4_ifval([$2], [$2], [:])
8047 m4_ifvaln([$3], [else
8048 $3])dnl
8049 fi])
8050
8051
8052 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8053 # ---------------------------------------------
8054 m4_define([_PKG_CONFIG],
8055 [if test -n "$PKG_CONFIG"; then
8056 if test -n "$$1"; then
8057 pkg_cv_[]$1="$$1"
8058 else
8059 PKG_CHECK_EXISTS([$3],
8060 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8061 [pkg_failed=yes])
8062 fi
8063 else
8064 pkg_failed=untried
8065 fi[]dnl
8066 ])# _PKG_CONFIG
8067
8068 # _PKG_SHORT_ERRORS_SUPPORTED
8069 # -----------------------------
8070 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8071 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8072 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8073 _pkg_short_errors_supported=yes
8074 else
8075 _pkg_short_errors_supported=no
8076 fi[]dnl
8077 ])# _PKG_SHORT_ERRORS_SUPPORTED
8078
8079
8080 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8081 # [ACTION-IF-NOT-FOUND])
8082 #
8083 #
8084 # Note that if there is a possibility the first call to
8085 # PKG_CHECK_MODULES might not happen, you should be sure to include an
8086 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8087 #
8088 #
8089 # --------------------------------------------------------------
8090 AC_DEFUN([PKG_CHECK_MODULES],
8091 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8092 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8093 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8094
8095 pkg_failed=no
8096 AC_MSG_CHECKING([for $1])
8097
8098 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8099 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
8100
8101 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8102 and $1[]_LIBS to avoid the need to call pkg-config.
8103 See the pkg-config man page for more details.])
8104
8105 if test $pkg_failed = yes; then
8106 _PKG_SHORT_ERRORS_SUPPORTED
8107 if test $_pkg_short_errors_supported = yes; then
8108 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
8109 else
8110 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
8111 fi
8112 # Put the nasty error message in config.log where it belongs
8113 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8114
8115 ifelse([$4], , [AC_MSG_ERROR(dnl
8116 [Package requirements ($2) were not met:
8117
8118 $$1_PKG_ERRORS
8119
8120 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8121 installed software in a non-standard prefix.
8122
8123 _PKG_TEXT
8124 ])],
8125 [AC_MSG_RESULT([no])
8126 $4])
8127 elif test $pkg_failed = untried; then
8128 ifelse([$4], , [AC_MSG_FAILURE(dnl
8129 [The pkg-config script could not be found or is too old. Make sure it
8130 is in your PATH or set the PKG_CONFIG environment variable to the full
8131 path to pkg-config.
8132
8133 _PKG_TEXT
8134
8135 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8136 [$4])
8137 else
8138 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8139 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8140 AC_MSG_RESULT([yes])
8141 ifelse([$3], , :, [$3])
8142 fi[]dnl
8143 ])# PKG_CHECK_MODULES
8144
8145 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
8146 #
8147 # This file is free software; the Free Software Foundation
8148 # gives unlimited permission to copy and/or distribute it,
8149 # with or without modifications, as long as this notice is preserved.
8150
8151 # AM_AUTOMAKE_VERSION(VERSION)
8152 # ----------------------------
8153 # Automake X.Y traces this macro to ensure aclocal.m4 has been
8154 # generated from the m4 files accompanying Automake X.Y.
8155 # (This private macro should not be called outside this file.)
8156 AC_DEFUN([AM_AUTOMAKE_VERSION],
8157 [am__api_version='1.11'
8158 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8159 dnl require some minimum version. Point them to the right macro.
8160 m4_if([$1], [1.11.1], [],
8161 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8162 ])
8163
8164 # _AM_AUTOCONF_VERSION(VERSION)
8165 # -----------------------------
8166 # aclocal traces this macro to find the Autoconf version.
8167 # This is a private macro too. Using m4_define simplifies
8168 # the logic in aclocal, which can simply ignore this definition.
8169 m4_define([_AM_AUTOCONF_VERSION], [])
8170
8171 # AM_SET_CURRENT_AUTOMAKE_VERSION
8172 # -------------------------------
8173 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8174 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8175 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8176 [AM_AUTOMAKE_VERSION([1.11.1])dnl
8177 m4_ifndef([AC_AUTOCONF_VERSION],
8178 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8179 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8180
8181 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
8182
8183 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8184 #
8185 # This file is free software; the Free Software Foundation
8186 # gives unlimited permission to copy and/or distribute it,
8187 # with or without modifications, as long as this notice is preserved.
8188
8189 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8190 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
8191 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8192 #
8193 # Of course, Automake must honor this variable whenever it calls a
8194 # tool from the auxiliary directory. The problem is that $srcdir (and
8195 # therefore $ac_aux_dir as well) can be either absolute or relative,
8196 # depending on how configure is run. This is pretty annoying, since
8197 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
8198 # source directory, any form will work fine, but in subdirectories a
8199 # relative path needs to be adjusted first.
8200 #
8201 # $ac_aux_dir/missing
8202 # fails when called from a subdirectory if $ac_aux_dir is relative
8203 # $top_srcdir/$ac_aux_dir/missing
8204 # fails if $ac_aux_dir is absolute,
8205 # fails when called from a subdirectory in a VPATH build with
8206 # a relative $ac_aux_dir
8207 #
8208 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8209 # are both prefixed by $srcdir. In an in-source build this is usually
8210 # harmless because $srcdir is `.', but things will broke when you
8211 # start a VPATH build or use an absolute $srcdir.
8212 #
8213 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8214 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
8215 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8216 # and then we would define $MISSING as
8217 # MISSING="\${SHELL} $am_aux_dir/missing"
8218 # This will work as long as MISSING is not called from configure, because
8219 # unfortunately $(top_srcdir) has no meaning in configure.
8220 # However there are other variables, like CC, which are often used in
8221 # configure, and could therefore not use this "fixed" $ac_aux_dir.
8222 #
8223 # Another solution, used here, is to always expand $ac_aux_dir to an
8224 # absolute PATH. The drawback is that using absolute paths prevent a
8225 # configured tree to be moved without reconfiguration.
8226
8227 AC_DEFUN([AM_AUX_DIR_EXPAND],
8228 [dnl Rely on autoconf to set up CDPATH properly.
8229 AC_PREREQ([2.50])dnl
8230 # expand $ac_aux_dir to an absolute path
8231 am_aux_dir=`cd $ac_aux_dir && pwd`
8232 ])
8233
8234
8235 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
8236 # Free Software Foundation, Inc.
8237 #
8238 # This file is free software; the Free Software Foundation
8239 # gives unlimited permission to copy and/or distribute it,
8240 # with or without modifications, as long as this notice is preserved.
8241
8242 # serial 4
8243
8244 # This was merged into AC_PROG_CC in Autoconf.
8245
8246 AU_DEFUN([AM_PROG_CC_STDC],
8247 [AC_PROG_CC
8248 AC_DIAGNOSE([obsolete], [$0:
8249 your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
8250 `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when
8251 you adjust the code. You can also remove the above call to
8252 AC_PROG_CC if you already called it elsewhere.])
8253 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
8254 ])
8255 AU_DEFUN([fp_PROG_CC_STDC])
8256
8257 # AM_CONDITIONAL -*- Autoconf -*-
8258
8259 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
8260 # Free Software Foundation, Inc.
8261 #
8262 # This file is free software; the Free Software Foundation
8263 # gives unlimited permission to copy and/or distribute it,
8264 # with or without modifications, as long as this notice is preserved.
8265
8266 # serial 9
8267
8268 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
8269 # -------------------------------------
8270 # Define a conditional.
8271 AC_DEFUN([AM_CONDITIONAL],
8272 [AC_PREREQ(2.52)dnl
8273 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
8274 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8275 AC_SUBST([$1_TRUE])dnl
8276 AC_SUBST([$1_FALSE])dnl
8277 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
8278 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
8279 m4_define([_AM_COND_VALUE_$1], [$2])dnl
8280 if $2; then
8281 $1_TRUE=
8282 $1_FALSE='#'
8283 else
8284 $1_TRUE='#'
8285 $1_FALSE=
8286 fi
8287 AC_CONFIG_COMMANDS_PRE(
8288 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8289 AC_MSG_ERROR([[conditional "$1" was never defined.
8290 Usually this means the macro was only invoked conditionally.]])
8291 fi])])
8292
8293 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
8294 # Free Software Foundation, Inc.
8295 #
8296 # This file is free software; the Free Software Foundation
8297 # gives unlimited permission to copy and/or distribute it,
8298 # with or without modifications, as long as this notice is preserved.
8299
8300 # serial 10
8301
8302 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8303 # written in clear, in which case automake, when reading aclocal.m4,
8304 # will think it sees a *use*, and therefore will trigger all it's
8305 # C support machinery. Also note that it means that autoscan, seeing
8306 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8307
8308
8309 # _AM_DEPENDENCIES(NAME)
8310 # ----------------------
8311 # See how the compiler implements dependency checking.
8312 # NAME is "CC", "CXX", "GCJ", or "OBJC".
8313 # We try a few techniques and use that to set a single cache variable.
8314 #
8315 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8316 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8317 # dependency, and given that the user is not expected to run this macro,
8318 # just rely on AC_PROG_CC.
8319 AC_DEFUN([_AM_DEPENDENCIES],
8320 [AC_REQUIRE([AM_SET_DEPDIR])dnl
8321 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8322 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
8323 AC_REQUIRE([AM_DEP_TRACK])dnl
8324
8325 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
8326 [$1], CXX, [depcc="$CXX" am_compiler_list=],
8327 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8328 [$1], UPC, [depcc="$UPC" am_compiler_list=],
8329 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
8330 [depcc="$$1" am_compiler_list=])
8331
8332 AC_CACHE_CHECK([dependency style of $depcc],
8333 [am_cv_$1_dependencies_compiler_type],
8334 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8335 # We make a subdir and do the tests there. Otherwise we can end up
8336 # making bogus files that we don't know about and never remove. For
8337 # instance it was reported that on HP-UX the gcc test will end up
8338 # making a dummy file named `D' -- because `-MD' means `put the output
8339 # in D'.
8340 mkdir conftest.dir
8341 # Copy depcomp to subdir because otherwise we won't find it if we're
8342 # using a relative directory.
8343 cp "$am_depcomp" conftest.dir
8344 cd conftest.dir
8345 # We will build objects and dependencies in a subdirectory because
8346 # it helps to detect inapplicable dependency modes. For instance
8347 # both Tru64's cc and ICC support -MD to output dependencies as a
8348 # side effect of compilation, but ICC will put the dependencies in
8349 # the current directory while Tru64 will put them in the object
8350 # directory.
8351 mkdir sub
8352
8353 am_cv_$1_dependencies_compiler_type=none
8354 if test "$am_compiler_list" = ""; then
8355 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
8356 fi
8357 am__universal=false
8358 m4_case([$1], [CC],
8359 [case " $depcc " in #(
8360 *\ -arch\ *\ -arch\ *) am__universal=true ;;
8361 esac],
8362 [CXX],
8363 [case " $depcc " in #(
8364 *\ -arch\ *\ -arch\ *) am__universal=true ;;
8365 esac])
8366
8367 for depmode in $am_compiler_list; do
8368 # Setup a source with many dependencies, because some compilers
8369 # like to wrap large dependency lists on column 80 (with \), and
8370 # we should not choose a depcomp mode which is confused by this.
8371 #
8372 # We need to recreate these files for each test, as the compiler may
8373 # overwrite some of them when testing with obscure command lines.
8374 # This happens at least with the AIX C compiler.
8375 : > sub/conftest.c
8376 for i in 1 2 3 4 5 6; do
8377 echo '#include "conftst'$i'.h"' >> sub/conftest.c
8378 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
8379 # Solaris 8's {/usr,}/bin/sh.
8380 touch sub/conftst$i.h
8381 done
8382 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8383
8384 # We check with `-c' and `-o' for the sake of the "dashmstdout"
8385 # mode. It turns out that the SunPro C++ compiler does not properly
8386 # handle `-M -o', and we need to detect this. Also, some Intel
8387 # versions had trouble with output in subdirs
8388 am__obj=sub/conftest.${OBJEXT-o}
8389 am__minus_obj="-o $am__obj"
8390 case $depmode in
8391 gcc)
8392 # This depmode causes a compiler race in universal mode.
8393 test "$am__universal" = false || continue
8394 ;;
8395 nosideeffect)
8396 # after this tag, mechanisms are not by side-effect, so they'll
8397 # only be used when explicitly requested
8398 if test "x$enable_dependency_tracking" = xyes; then
8399 continue
8400 else
8401 break
8402 fi
8403 ;;
8404 msvisualcpp | msvcmsys)
8405 # This compiler won't grok `-c -o', but also, the minuso test has
8406 # not run yet. These depmodes are late enough in the game, and
8407 # so weak that their functioning should not be impacted.
8408 am__obj=conftest.${OBJEXT-o}
8409 am__minus_obj=
8410 ;;
8411 none) break ;;
8412 esac
8413 if depmode=$depmode \
8414 source=sub/conftest.c object=$am__obj \
8415 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8416 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
8417 >/dev/null 2>conftest.err &&
8418 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
8419 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8420 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
8421 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
8422 # icc doesn't choke on unknown options, it will just issue warnings
8423 # or remarks (even with -Werror). So we grep stderr for any message
8424 # that says an option was ignored or not supported.
8425 # When given -MP, icc 7.0 and 7.1 complain thusly:
8426 # icc: Command line warning: ignoring option '-M'; no argument required
8427 # The diagnosis changed in icc 8.0:
8428 # icc: Command line remark: option '-MP' not supported
8429 if (grep 'ignoring option' conftest.err ||
8430 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
8431 am_cv_$1_dependencies_compiler_type=$depmode
8432 break
8433 fi
8434 fi
8435 done
8436
8437 cd ..
8438 rm -rf conftest.dir
8439 else
8440 am_cv_$1_dependencies_compiler_type=none
8441 fi
8442 ])
8443 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
8444 AM_CONDITIONAL([am__fastdep$1], [
8445 test "x$enable_dependency_tracking" != xno \
8446 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
8447 ])
8448
8449
8450 # AM_SET_DEPDIR
8451 # -------------
8452 # Choose a directory name for dependency files.
8453 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
8454 AC_DEFUN([AM_SET_DEPDIR],
8455 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
8456 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
8457 ])
8458
8459
8460 # AM_DEP_TRACK
8461 # ------------
8462 AC_DEFUN([AM_DEP_TRACK],
8463 [AC_ARG_ENABLE(dependency-tracking,
8464 [ --disable-dependency-tracking speeds up one-time build
8465 --enable-dependency-tracking do not reject slow dependency extractors])
8466 if test "x$enable_dependency_tracking" != xno; then
8467 am_depcomp="$ac_aux_dir/depcomp"
8468 AMDEPBACKSLASH='\'
8469 fi
8470 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
8471 AC_SUBST([AMDEPBACKSLASH])dnl
8472 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
8473 ])
8474
8475 # Generate code to set up dependency tracking. -*- Autoconf -*-
8476
8477 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
8478 # Free Software Foundation, Inc.
8479 #
8480 # This file is free software; the Free Software Foundation
8481 # gives unlimited permission to copy and/or distribute it,
8482 # with or without modifications, as long as this notice is preserved.
8483
8484 #serial 5
8485
8486 # _AM_OUTPUT_DEPENDENCY_COMMANDS
8487 # ------------------------------
8488 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
8489 [{
8490 # Autoconf 2.62 quotes --file arguments for eval, but not when files
8491 # are listed without --file. Let's play safe and only enable the eval
8492 # if we detect the quoting.
8493 case $CONFIG_FILES in
8494 *\'*) eval set x "$CONFIG_FILES" ;;
8495 *) set x $CONFIG_FILES ;;
8496 esac
8497 shift
8498 for mf
8499 do
8500 # Strip MF so we end up with the name of the file.
8501 mf=`echo "$mf" | sed -e 's/:.*$//'`
8502 # Check whether this is an Automake generated Makefile or not.
8503 # We used to match only the files named `Makefile.in', but
8504 # some people rename them; so instead we look at the file content.
8505 # Grep'ing the first line is not enough: some people post-process
8506 # each Makefile.in and add a new line on top of each file to say so.
8507 # Grep'ing the whole file is not good either: AIX grep has a line
8508 # limit of 2048, but all sed's we know have understand at least 4000.
8509 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
8510 dirpart=`AS_DIRNAME("$mf")`
8511 else
8512 continue
8513 fi
8514 # Extract the definition of DEPDIR, am__include, and am__quote
8515 # from the Makefile without running `make'.
8516 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
8517 test -z "$DEPDIR" && continue
8518 am__include=`sed -n 's/^am__include = //p' < "$mf"`
8519 test -z "am__include" && continue
8520 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
8521 # When using ansi2knr, U may be empty or an underscore; expand it
8522 U=`sed -n 's/^U = //p' < "$mf"`
8523 # Find all dependency output files, they are included files with
8524 # $(DEPDIR) in their names. We invoke sed twice because it is the
8525 # simplest approach to changing $(DEPDIR) to its actual value in the
8526 # expansion.
8527 for file in `sed -n "
8528 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
8529 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
8530 # Make sure the directory exists.
8531 test -f "$dirpart/$file" && continue
8532 fdir=`AS_DIRNAME(["$file"])`
8533 AS_MKDIR_P([$dirpart/$fdir])
8534 # echo "creating $dirpart/$file"
8535 echo '# dummy' > "$dirpart/$file"
8536 done
8537 done
8538 }
8539 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
8540
8541
8542 # AM_OUTPUT_DEPENDENCY_COMMANDS
8543 # -----------------------------
8544 # This macro should only be invoked once -- use via AC_REQUIRE.
8545 #
8546 # This code is only required when automatic dependency tracking
8547 # is enabled. FIXME. This creates each `.P' file that we will
8548 # need in order to bootstrap the dependency handling code.
8549 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
8550 [AC_CONFIG_COMMANDS([depfiles],
8551 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
8552 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
8553 ])
8554
8555 # Do all the work for Automake. -*- Autoconf -*-
8556
8557 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
8558 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
8559 #
8560 # This file is free software; the Free Software Foundation
8561 # gives unlimited permission to copy and/or distribute it,
8562 # with or without modifications, as long as this notice is preserved.
8563
8564 # serial 16
8565
8566 # This macro actually does too much. Some checks are only needed if
8567 # your package does certain things. But this isn't really a big deal.
8568
8569 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
8570 # AM_INIT_AUTOMAKE([OPTIONS])
8571 # -----------------------------------------------
8572 # The call with PACKAGE and VERSION arguments is the old style
8573 # call (pre autoconf-2.50), which is being phased out. PACKAGE
8574 # and VERSION should now be passed to AC_INIT and removed from
8575 # the call to AM_INIT_AUTOMAKE.
8576 # We support both call styles for the transition. After
8577 # the next Automake release, Autoconf can make the AC_INIT
8578 # arguments mandatory, and then we can depend on a new Autoconf
8579 # release and drop the old call support.
8580 AC_DEFUN([AM_INIT_AUTOMAKE],
8581 [AC_PREREQ([2.62])dnl
8582 dnl Autoconf wants to disallow AM_ names. We explicitly allow
8583 dnl the ones we care about.
8584 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
8585 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
8586 AC_REQUIRE([AC_PROG_INSTALL])dnl
8587 if test "`cd $srcdir && pwd`" != "`pwd`"; then
8588 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
8589 # is not polluted with repeated "-I."
8590 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
8591 # test to see if srcdir already configured
8592 if test -f $srcdir/config.status; then
8593 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
8594 fi
8595 fi
8596
8597 # test whether we have cygpath
8598 if test -z "$CYGPATH_W"; then
8599 if (cygpath --version) >/dev/null 2>/dev/null; then
8600 CYGPATH_W='cygpath -w'
8601 else
8602 CYGPATH_W=echo
8603 fi
8604 fi
8605 AC_SUBST([CYGPATH_W])
8606
8607 # Define the identity of the package.
8608 dnl Distinguish between old-style and new-style calls.
8609 m4_ifval([$2],
8610 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
8611 AC_SUBST([PACKAGE], [$1])dnl
8612 AC_SUBST([VERSION], [$2])],
8613 [_AM_SET_OPTIONS([$1])dnl
8614 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
8615 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
8616 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
8617 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
8618 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
8619
8620 _AM_IF_OPTION([no-define],,
8621 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
8622 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
8623
8624 # Some tools Automake needs.
8625 AC_REQUIRE([AM_SANITY_CHECK])dnl
8626 AC_REQUIRE([AC_ARG_PROGRAM])dnl
8627 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
8628 AM_MISSING_PROG(AUTOCONF, autoconf)
8629 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
8630 AM_MISSING_PROG(AUTOHEADER, autoheader)
8631 AM_MISSING_PROG(MAKEINFO, makeinfo)
8632 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8633 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
8634 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
8635 # We need awk for the "check" target. The system "awk" is bad on
8636 # some platforms.
8637 AC_REQUIRE([AC_PROG_AWK])dnl
8638 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
8639 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
8640 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
8641 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
8642 [_AM_PROG_TAR([v7])])])
8643 _AM_IF_OPTION([no-dependencies],,
8644 [AC_PROVIDE_IFELSE([AC_PROG_CC],
8645 [_AM_DEPENDENCIES(CC)],
8646 [define([AC_PROG_CC],
8647 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
8648 AC_PROVIDE_IFELSE([AC_PROG_CXX],
8649 [_AM_DEPENDENCIES(CXX)],
8650 [define([AC_PROG_CXX],
8651 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
8652 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
8653 [_AM_DEPENDENCIES(OBJC)],
8654 [define([AC_PROG_OBJC],
8655 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
8656 ])
8657 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
8658 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
8659 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
8660 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
8661 AC_CONFIG_COMMANDS_PRE(dnl
8662 [m4_provide_if([_AM_COMPILER_EXEEXT],
8663 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
8664 ])
8665
8666 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
8667 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
8668 dnl mangled by Autoconf and run in a shell conditional statement.
8669 m4_define([_AC_COMPILER_EXEEXT],
8670 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
8671
8672
8673 # When config.status generates a header, we must update the stamp-h file.
8674 # This file resides in the same directory as the config header
8675 # that is generated. The stamp files are numbered to have different names.
8676
8677 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
8678 # loop where config.status creates the headers, so we can generate
8679 # our stamp files there.
8680 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
8681 [# Compute $1's index in $config_headers.
8682 _am_arg=$1
8683 _am_stamp_count=1
8684 for _am_header in $config_headers :; do
8685 case $_am_header in
8686 $_am_arg | $_am_arg:* )
8687 break ;;
8688 * )
8689 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
8690 esac
8691 done
8692 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
8693
8694 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
8695 #
8696 # This file is free software; the Free Software Foundation
8697 # gives unlimited permission to copy and/or distribute it,
8698 # with or without modifications, as long as this notice is preserved.
8699
8700 # AM_PROG_INSTALL_SH
8701 # ------------------
8702 # Define $install_sh.
8703 AC_DEFUN([AM_PROG_INSTALL_SH],
8704 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8705 if test x"${install_sh}" != xset; then
8706 case $am_aux_dir in
8707 *\ * | *\ *)
8708 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
8709 *)
8710 install_sh="\${SHELL} $am_aux_dir/install-sh"
8711 esac
8712 fi
8713 AC_SUBST(install_sh)])
8714
8715 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
8716 #
8717 # This file is free software; the Free Software Foundation
8718 # gives unlimited permission to copy and/or distribute it,
8719 # with or without modifications, as long as this notice is preserved.
8720
8721 # serial 2
8722
8723 # Check whether the underlying file-system supports filenames
8724 # with a leading dot. For instance MS-DOS doesn't.
8725 AC_DEFUN([AM_SET_LEADING_DOT],
8726 [rm -rf .tst 2>/dev/null
8727 mkdir .tst 2>/dev/null
8728 if test -d .tst; then
8729 am__leading_dot=.
8730 else
8731 am__leading_dot=_
8732 fi
8733 rmdir .tst 2>/dev/null
8734 AC_SUBST([am__leading_dot])])
8735
8736 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
8737 # From Jim Meyering
8738
8739 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
8740 # Free Software Foundation, Inc.
8741 #
8742 # This file is free software; the Free Software Foundation
8743 # gives unlimited permission to copy and/or distribute it,
8744 # with or without modifications, as long as this notice is preserved.
8745
8746 # serial 5
8747
8748 # AM_MAINTAINER_MODE([DEFAULT-MODE])
8749 # ----------------------------------
8750 # Control maintainer-specific portions of Makefiles.
8751 # Default is to disable them, unless `enable' is passed literally.
8752 # For symmetry, `disable' may be passed as well. Anyway, the user
8753 # can override the default with the --enable/--disable switch.
8754 AC_DEFUN([AM_MAINTAINER_MODE],
8755 [m4_case(m4_default([$1], [disable]),
8756 [enable], [m4_define([am_maintainer_other], [disable])],
8757 [disable], [m4_define([am_maintainer_other], [enable])],
8758 [m4_define([am_maintainer_other], [enable])
8759 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
8760 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
8761 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
8762 AC_ARG_ENABLE([maintainer-mode],
8763 [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
8764 (and sometimes confusing) to the casual installer],
8765 [USE_MAINTAINER_MODE=$enableval],
8766 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
8767 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
8768 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
8769 MAINT=$MAINTAINER_MODE_TRUE
8770 AC_SUBST([MAINT])dnl
8771 ]
8772 )
8773
8774 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
8775
8776 # Check to see how 'make' treats includes. -*- Autoconf -*-
8777
8778 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
8779 #
8780 # This file is free software; the Free Software Foundation
8781 # gives unlimited permission to copy and/or distribute it,
8782 # with or without modifications, as long as this notice is preserved.
8783
8784 # serial 4
8785
8786 # AM_MAKE_INCLUDE()
8787 # -----------------
8788 # Check to see how make treats includes.
8789 AC_DEFUN([AM_MAKE_INCLUDE],
8790 [am_make=${MAKE-make}
8791 cat > confinc << 'END'
8792 am__doit:
8793 @echo this is the am__doit target
8794 .PHONY: am__doit
8795 END
8796 # If we don't find an include directive, just comment out the code.
8797 AC_MSG_CHECKING([for style of include used by $am_make])
8798 am__include="#"
8799 am__quote=
8800 _am_result=none
8801 # First try GNU make style include.
8802 echo "include confinc" > confmf
8803 # Ignore all kinds of additional output from `make'.
8804 case `$am_make -s -f confmf 2> /dev/null` in #(
8805 *the\ am__doit\ target*)
8806 am__include=include
8807 am__quote=
8808 _am_result=GNU
8809 ;;
8810 esac
8811 # Now try BSD make style include.
8812 if test "$am__include" = "#"; then
8813 echo '.include "confinc"' > confmf
8814 case `$am_make -s -f confmf 2> /dev/null` in #(
8815 *the\ am__doit\ target*)
8816 am__include=.include
8817 am__quote="\""
8818 _am_result=BSD
8819 ;;
8820 esac
8821 fi
8822 AC_SUBST([am__include])
8823 AC_SUBST([am__quote])
8824 AC_MSG_RESULT([$_am_result])
8825 rm -f confinc confmf
8826 ])
8827
8828 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
8829
8830 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
8831 # Free Software Foundation, Inc.
8832 #
8833 # This file is free software; the Free Software Foundation
8834 # gives unlimited permission to copy and/or distribute it,
8835 # with or without modifications, as long as this notice is preserved.
8836
8837 # serial 6
8838
8839 # AM_MISSING_PROG(NAME, PROGRAM)
8840 # ------------------------------
8841 AC_DEFUN([AM_MISSING_PROG],
8842 [AC_REQUIRE([AM_MISSING_HAS_RUN])
8843 $1=${$1-"${am_missing_run}$2"}
8844 AC_SUBST($1)])
8845
8846
8847 # AM_MISSING_HAS_RUN
8848 # ------------------
8849 # Define MISSING if not defined so far and test if it supports --run.
8850 # If it does, set am_missing_run to use it, otherwise, to nothing.
8851 AC_DEFUN([AM_MISSING_HAS_RUN],
8852 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8853 AC_REQUIRE_AUX_FILE([missing])dnl
8854 if test x"${MISSING+set}" != xset; then
8855 case $am_aux_dir in
8856 *\ * | *\ *)
8857 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
8858 *)
8859 MISSING="\${SHELL} $am_aux_dir/missing" ;;
8860 esac
8861 fi
8862 # Use eval to expand $SHELL
8863 if eval "$MISSING --run true"; then
8864 am_missing_run="$MISSING --run "
8865 else
8866 am_missing_run=
8867 AC_MSG_WARN([`missing' script is too old or missing])
8868 fi
8869 ])
8870
8871 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
8872 #
8873 # This file is free software; the Free Software Foundation
8874 # gives unlimited permission to copy and/or distribute it,
8875 # with or without modifications, as long as this notice is preserved.
8876
8877 # AM_PROG_MKDIR_P
8878 # ---------------
8879 # Check for `mkdir -p'.
8880 AC_DEFUN([AM_PROG_MKDIR_P],
8881 [AC_PREREQ([2.60])dnl
8882 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
8883 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
8884 dnl while keeping a definition of mkdir_p for backward compatibility.
8885 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
8886 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
8887 dnl Makefile.ins that do not define MKDIR_P, so we do our own
8888 dnl adjustment using top_builddir (which is defined more often than
8889 dnl MKDIR_P).
8890 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
8891 case $mkdir_p in
8892 [[\\/$]]* | ?:[[\\/]]*) ;;
8893 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
8894 esac
8895 ])
8896
8897 # Helper functions for option handling. -*- Autoconf -*-
8898
8899 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
8900 #
8901 # This file is free software; the Free Software Foundation
8902 # gives unlimited permission to copy and/or distribute it,
8903 # with or without modifications, as long as this notice is preserved.
8904
8905 # serial 4
8906
8907 # _AM_MANGLE_OPTION(NAME)
8908 # -----------------------
8909 AC_DEFUN([_AM_MANGLE_OPTION],
8910 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
8911
8912 # _AM_SET_OPTION(NAME)
8913 # ------------------------------
8914 # Set option NAME. Presently that only means defining a flag for this option.
8915 AC_DEFUN([_AM_SET_OPTION],
8916 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
8917
8918 # _AM_SET_OPTIONS(OPTIONS)
8919 # ----------------------------------
8920 # OPTIONS is a space-separated list of Automake options.
8921 AC_DEFUN([_AM_SET_OPTIONS],
8922 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
8923
8924 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
8925 # -------------------------------------------
8926 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8927 AC_DEFUN([_AM_IF_OPTION],
8928 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8929
8930 # Check to make sure that the build environment is sane. -*- Autoconf -*-
8931
8932 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
8933 # Free Software Foundation, Inc.
8934 #
8935 # This file is free software; the Free Software Foundation
8936 # gives unlimited permission to copy and/or distribute it,
8937 # with or without modifications, as long as this notice is preserved.
8938
8939 # serial 5
8940
8941 # AM_SANITY_CHECK
8942 # ---------------
8943 AC_DEFUN([AM_SANITY_CHECK],
8944 [AC_MSG_CHECKING([whether build environment is sane])
8945 # Just in case
8946 sleep 1
8947 echo timestamp > conftest.file
8948 # Reject unsafe characters in $srcdir or the absolute working directory
8949 # name. Accept space and tab only in the latter.
8950 am_lf='
8951 '
8952 case `pwd` in
8953 *[[\\\"\#\$\&\'\`$am_lf]]*)
8954 AC_MSG_ERROR([unsafe absolute working directory name]);;
8955 esac
8956 case $srcdir in
8957 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
8958 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
8959 esac
8960
8961 # Do `set' in a subshell so we don't clobber the current shell's
8962 # arguments. Must try -L first in case configure is actually a
8963 # symlink; some systems play weird games with the mod time of symlinks
8964 # (eg FreeBSD returns the mod time of the symlink's containing
8965 # directory).
8966 if (
8967 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
8968 if test "$[*]" = "X"; then
8969 # -L didn't work.
8970 set X `ls -t "$srcdir/configure" conftest.file`
8971 fi
8972 rm -f conftest.file
8973 if test "$[*]" != "X $srcdir/configure conftest.file" \
8974 && test "$[*]" != "X conftest.file $srcdir/configure"; then
8975
8976 # If neither matched, then we have a broken ls. This can happen
8977 # if, for instance, CONFIG_SHELL is bash and it inherits a
8978 # broken ls alias from the environment. This has actually
8979 # happened. Such a system could not be considered "sane".
8980 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
8981 alias in your environment])
8982 fi
8983
8984 test "$[2]" = conftest.file
8985 )
8986 then
8987 # Ok.
8988 :
8989 else
8990 AC_MSG_ERROR([newly created file is older than distributed files!
8991 Check your system clock])
8992 fi
8993 AC_MSG_RESULT(yes)])
8994
8995 # Copyright (C) 2009 Free Software Foundation, Inc.
8996 #
8997 # This file is free software; the Free Software Foundation
8998 # gives unlimited permission to copy and/or distribute it,
8999 # with or without modifications, as long as this notice is preserved.
9000
9001 # serial 1
9002
9003 # AM_SILENT_RULES([DEFAULT])
9004 # --------------------------
9005 # Enable less verbose build rules; with the default set to DEFAULT
9006 # (`yes' being less verbose, `no' or empty being verbose).
9007 AC_DEFUN([AM_SILENT_RULES],
9008 [AC_ARG_ENABLE([silent-rules],
9009 [ --enable-silent-rules less verbose build output (undo: `make V=1')
9010 --disable-silent-rules verbose build output (undo: `make V=0')])
9011 case $enable_silent_rules in
9012 yes) AM_DEFAULT_VERBOSITY=0;;
9013 no) AM_DEFAULT_VERBOSITY=1;;
9014 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
9015 esac
9016 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
9017 AM_BACKSLASH='\'
9018 AC_SUBST([AM_BACKSLASH])dnl
9019 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
9020 ])
9021
9022 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9023 #
9024 # This file is free software; the Free Software Foundation
9025 # gives unlimited permission to copy and/or distribute it,
9026 # with or without modifications, as long as this notice is preserved.
9027
9028 # AM_PROG_INSTALL_STRIP
9029 # ---------------------
9030 # One issue with vendor `install' (even GNU) is that you can't
9031 # specify the program used to strip binaries. This is especially
9032 # annoying in cross-compiling environments, where the build's strip
9033 # is unlikely to handle the host's binaries.
9034 # Fortunately install-sh will honor a STRIPPROG variable, so we
9035 # always use install-sh in `make install-strip', and initialize
9036 # STRIPPROG with the value of the STRIP variable (set by the user).
9037 AC_DEFUN([AM_PROG_INSTALL_STRIP],
9038 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9039 # Installed binaries are usually stripped using `strip' when the user
9040 # run `make install-strip'. However `strip' might not be the right
9041 # tool to use in cross-compilation environments, therefore Automake
9042 # will honor the `STRIP' environment variable to overrule this program.
9043 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9044 if test "$cross_compiling" != no; then
9045 AC_CHECK_TOOL([STRIP], [strip], :)
9046 fi
9047 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9048 AC_SUBST([INSTALL_STRIP_PROGRAM])])
9049
9050 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
9051 #
9052 # This file is free software; the Free Software Foundation
9053 # gives unlimited permission to copy and/or distribute it,
9054 # with or without modifications, as long as this notice is preserved.
9055
9056 # serial 2
9057
9058 # _AM_SUBST_NOTMAKE(VARIABLE)
9059 # ---------------------------
9060 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9061 # This macro is traced by Automake.
9062 AC_DEFUN([_AM_SUBST_NOTMAKE])
9063
9064 # AM_SUBST_NOTMAKE(VARIABLE)
9065 # ---------------------------
9066 # Public sister of _AM_SUBST_NOTMAKE.
9067 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9068
9069 # Check how to create a tarball. -*- Autoconf -*-
9070
9071 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
9072 #
9073 # This file is free software; the Free Software Foundation
9074 # gives unlimited permission to copy and/or distribute it,
9075 # with or without modifications, as long as this notice is preserved.
9076
9077 # serial 2
9078
9079 # _AM_PROG_TAR(FORMAT)
9080 # --------------------
9081 # Check how to create a tarball in format FORMAT.
9082 # FORMAT should be one of `v7', `ustar', or `pax'.
9083 #
9084 # Substitute a variable $(am__tar) that is a command
9085 # writing to stdout a FORMAT-tarball containing the directory
9086 # $tardir.
9087 # tardir=directory && $(am__tar) > result.tar
9088 #
9089 # Substitute a variable $(am__untar) that extract such
9090 # a tarball read from stdin.
9091 # $(am__untar) < result.tar
9092 AC_DEFUN([_AM_PROG_TAR],
9093 [# Always define AMTAR for backward compatibility.
9094 AM_MISSING_PROG([AMTAR], [tar])
9095 m4_if([$1], [v7],
9096 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9097 [m4_case([$1], [ustar],, [pax],,
9098 [m4_fatal([Unknown tar format])])
9099 AC_MSG_CHECKING([how to create a $1 tar archive])
9100 # Loop over all known methods to create a tar archive until one works.
9101 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9102 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
9103 # Do not fold the above two line into one, because Tru64 sh and
9104 # Solaris sh will not grok spaces in the rhs of `-'.
9105 for _am_tool in $_am_tools
9106 do
9107 case $_am_tool in
9108 gnutar)
9109 for _am_tar in tar gnutar gtar;
9110 do
9111 AM_RUN_LOG([$_am_tar --version]) && break
9112 done
9113 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9114 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9115 am__untar="$_am_tar -xf -"
9116 ;;
9117 plaintar)
9118 # Must skip GNU tar: if it does not support --format= it doesn't create
9119 # ustar tarball either.
9120 (tar --version) >/dev/null 2>&1 && continue
9121 am__tar='tar chf - "$$tardir"'
9122 am__tar_='tar chf - "$tardir"'
9123 am__untar='tar xf -'
9124 ;;
9125 pax)
9126 am__tar='pax -L -x $1 -w "$$tardir"'
9127 am__tar_='pax -L -x $1 -w "$tardir"'
9128 am__untar='pax -r'
9129 ;;
9130 cpio)
9131 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9132 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9133 am__untar='cpio -i -H $1 -d'
9134 ;;
9135 none)
9136 am__tar=false
9137 am__tar_=false
9138 am__untar=false
9139 ;;
9140 esac
9141
9142 # If the value was cached, stop now. We just wanted to have am__tar
9143 # and am__untar set.
9144 test -n "${am_cv_prog_tar_$1}" && break
9145
9146 # tar/untar a dummy directory, and stop if the command works
9147 rm -rf conftest.dir
9148 mkdir conftest.dir
9149 echo GrepMe > conftest.dir/file
9150 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9151 rm -rf conftest.dir
9152 if test -s conftest.tar; then
9153 AM_RUN_LOG([$am__untar <conftest.tar])
9154 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9155 fi
9156 done
9157 rm -rf conftest.dir
9158
9159 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9160 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9161 AC_SUBST([am__tar])
9162 AC_SUBST([am__untar])
9163 ]) # _AM_PROG_TAR
9164
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
4 # Free Software Foundation, Inc.
5
6 timestamp='2009-06-10'
7
8 # This file is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
21 # 02110-1301, USA.
22 #
23 # As a special exception to the GNU General Public License, if you
24 # distribute this file as part of a program that contains a
25 # configuration script generated by Autoconf, you may include it under
26 # the same distribution terms that you use for the rest of that program.
27
28
29 # Originally written by Per Bothner <per@bothner.com>.
30 # Please send patches to <config-patches@gnu.org>. Submit a context
31 # diff and a properly formatted ChangeLog entry.
32 #
33 # This script attempts to guess a canonical system name similar to
34 # config.sub. If it succeeds, it prints the system name on stdout, and
35 # exits with 0. Otherwise, it exits with 1.
36 #
37 # The plan is that this can be called by configure scripts if you
38 # don't specify an explicit build system type.
39
40 me=`echo "$0" | sed -e 's,.*/,,'`
41
42 usage="\
43 Usage: $0 [OPTION]
44
45 Output the configuration name of the system \`$me' is run on.
46
47 Operation modes:
48 -h, --help print this help, then exit
49 -t, --time-stamp print date of last modification, then exit
50 -v, --version print version number, then exit
51
52 Report bugs and patches to <config-patches@gnu.org>."
53
54 version="\
55 GNU config.guess ($timestamp)
56
57 Originally written by Per Bothner.
58 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
59 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
60
61 This is free software; see the source for copying conditions. There is NO
62 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
63
64 help="
65 Try \`$me --help' for more information."
66
67 # Parse command line
68 while test $# -gt 0 ; do
69 case $1 in
70 --time-stamp | --time* | -t )
71 echo "$timestamp" ; exit ;;
72 --version | -v )
73 echo "$version" ; exit ;;
74 --help | --h* | -h )
75 echo "$usage"; exit ;;
76 -- ) # Stop option processing
77 shift; break ;;
78 - ) # Use stdin as input.
79 break ;;
80 -* )
81 echo "$me: invalid option $1$help" >&2
82 exit 1 ;;
83 * )
84 break ;;
85 esac
86 done
87
88 if test $# != 0; then
89 echo "$me: too many arguments$help" >&2
90 exit 1
91 fi
92
93 trap 'exit 1' 1 2 15
94
95 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
96 # compiler to aid in system detection is discouraged as it requires
97 # temporary files to be created and, as you can see below, it is a
98 # headache to deal with in a portable fashion.
99
100 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
101 # use `HOST_CC' if defined, but it is deprecated.
102
103 # Portable tmp directory creation inspired by the Autoconf team.
104
105 set_cc_for_build='
106 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
107 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
108 : ${TMPDIR=/tmp} ;
109 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
110 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
111 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
112 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
113 dummy=$tmp/dummy ;
114 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
115 case $CC_FOR_BUILD,$HOST_CC,$CC in
116 ,,) echo "int x;" > $dummy.c ;
117 for c in cc gcc c89 c99 ; do
118 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
119 CC_FOR_BUILD="$c"; break ;
120 fi ;
121 done ;
122 if test x"$CC_FOR_BUILD" = x ; then
123 CC_FOR_BUILD=no_compiler_found ;
124 fi
125 ;;
126 ,,*) CC_FOR_BUILD=$CC ;;
127 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
128 esac ; set_cc_for_build= ;'
129
130 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
131 # (ghazi@noc.rutgers.edu 1994-08-24)
132 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
133 PATH=$PATH:/.attbin ; export PATH
134 fi
135
136 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
137 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
138 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
139 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
140
141 # Note: order is significant - the case branches are not exclusive.
142
143 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
144 *:NetBSD:*:*)
145 # NetBSD (nbsd) targets should (where applicable) match one or
146 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
147 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
148 # switched to ELF, *-*-netbsd* would select the old
149 # object file format. This provides both forward
150 # compatibility and a consistent mechanism for selecting the
151 # object file format.
152 #
153 # Note: NetBSD doesn't particularly care about the vendor
154 # portion of the name. We always set it to "unknown".
155 sysctl="sysctl -n hw.machine_arch"
156 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
157 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
158 case "${UNAME_MACHINE_ARCH}" in
159 armeb) machine=armeb-unknown ;;
160 arm*) machine=arm-unknown ;;
161 sh3el) machine=shl-unknown ;;
162 sh3eb) machine=sh-unknown ;;
163 sh5el) machine=sh5le-unknown ;;
164 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
165 esac
166 # The Operating System including object format, if it has switched
167 # to ELF recently, or will in the future.
168 case "${UNAME_MACHINE_ARCH}" in
169 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
170 eval $set_cc_for_build
171 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
172 | grep -q __ELF__
173 then
174 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
175 # Return netbsd for either. FIX?
176 os=netbsd
177 else
178 os=netbsdelf
179 fi
180 ;;
181 *)
182 os=netbsd
183 ;;
184 esac
185 # The OS release
186 # Debian GNU/NetBSD machines have a different userland, and
187 # thus, need a distinct triplet. However, they do not need
188 # kernel version information, so it can be replaced with a
189 # suitable tag, in the style of linux-gnu.
190 case "${UNAME_VERSION}" in
191 Debian*)
192 release='-gnu'
193 ;;
194 *)
195 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
196 ;;
197 esac
198 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
199 # contains redundant information, the shorter form:
200 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
201 echo "${machine}-${os}${release}"
202 exit ;;
203 *:OpenBSD:*:*)
204 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
205 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
206 exit ;;
207 *:ekkoBSD:*:*)
208 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
209 exit ;;
210 *:SolidBSD:*:*)
211 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
212 exit ;;
213 macppc:MirBSD:*:*)
214 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
215 exit ;;
216 *:MirBSD:*:*)
217 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
218 exit ;;
219 alpha:OSF1:*:*)
220 case $UNAME_RELEASE in
221 *4.0)
222 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
223 ;;
224 *5.*)
225 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
226 ;;
227 esac
228 # According to Compaq, /usr/sbin/psrinfo has been available on
229 # OSF/1 and Tru64 systems produced since 1995. I hope that
230 # covers most systems running today. This code pipes the CPU
231 # types through head -n 1, so we only detect the type of CPU 0.
232 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
233 case "$ALPHA_CPU_TYPE" in
234 "EV4 (21064)")
235 UNAME_MACHINE="alpha" ;;
236 "EV4.5 (21064)")
237 UNAME_MACHINE="alpha" ;;
238 "LCA4 (21066/21068)")
239 UNAME_MACHINE="alpha" ;;
240 "EV5 (21164)")
241 UNAME_MACHINE="alphaev5" ;;
242 "EV5.6 (21164A)")
243 UNAME_MACHINE="alphaev56" ;;
244 "EV5.6 (21164PC)")
245 UNAME_MACHINE="alphapca56" ;;
246 "EV5.7 (21164PC)")
247 UNAME_MACHINE="alphapca57" ;;
248 "EV6 (21264)")
249 UNAME_MACHINE="alphaev6" ;;
250 "EV6.7 (21264A)")
251 UNAME_MACHINE="alphaev67" ;;
252 "EV6.8CB (21264C)")
253 UNAME_MACHINE="alphaev68" ;;
254 "EV6.8AL (21264B)")
255 UNAME_MACHINE="alphaev68" ;;
256 "EV6.8CX (21264D)")
257 UNAME_MACHINE="alphaev68" ;;
258 "EV6.9A (21264/EV69A)")
259 UNAME_MACHINE="alphaev69" ;;
260 "EV7 (21364)")
261 UNAME_MACHINE="alphaev7" ;;
262 "EV7.9 (21364A)")
263 UNAME_MACHINE="alphaev79" ;;
264 esac
265 # A Pn.n version is a patched version.
266 # A Vn.n version is a released version.
267 # A Tn.n version is a released field test version.
268 # A Xn.n version is an unreleased experimental baselevel.
269 # 1.2 uses "1.2" for uname -r.
270 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
271 exit ;;
272 Alpha\ *:Windows_NT*:*)
273 # How do we know it's Interix rather than the generic POSIX subsystem?
274 # Should we change UNAME_MACHINE based on the output of uname instead
275 # of the specific Alpha model?
276 echo alpha-pc-interix
277 exit ;;
278 21064:Windows_NT:50:3)
279 echo alpha-dec-winnt3.5
280 exit ;;
281 Amiga*:UNIX_System_V:4.0:*)
282 echo m68k-unknown-sysv4
283 exit ;;
284 *:[Aa]miga[Oo][Ss]:*:*)
285 echo ${UNAME_MACHINE}-unknown-amigaos
286 exit ;;
287 *:[Mm]orph[Oo][Ss]:*:*)
288 echo ${UNAME_MACHINE}-unknown-morphos
289 exit ;;
290 *:OS/390:*:*)
291 echo i370-ibm-openedition
292 exit ;;
293 *:z/VM:*:*)
294 echo s390-ibm-zvmoe
295 exit ;;
296 *:OS400:*:*)
297 echo powerpc-ibm-os400
298 exit ;;
299 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
300 echo arm-acorn-riscix${UNAME_RELEASE}
301 exit ;;
302 arm:riscos:*:*|arm:RISCOS:*:*)
303 echo arm-unknown-riscos
304 exit ;;
305 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
306 echo hppa1.1-hitachi-hiuxmpp
307 exit ;;
308 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
309 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
310 if test "`(/bin/universe) 2>/dev/null`" = att ; then
311 echo pyramid-pyramid-sysv3
312 else
313 echo pyramid-pyramid-bsd
314 fi
315 exit ;;
316 NILE*:*:*:dcosx)
317 echo pyramid-pyramid-svr4
318 exit ;;
319 DRS?6000:unix:4.0:6*)
320 echo sparc-icl-nx6
321 exit ;;
322 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
323 case `/usr/bin/uname -p` in
324 sparc) echo sparc-icl-nx7; exit ;;
325 esac ;;
326 s390x:SunOS:*:*)
327 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
328 exit ;;
329 sun4H:SunOS:5.*:*)
330 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
331 exit ;;
332 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
333 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
334 exit ;;
335 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
336 eval $set_cc_for_build
337 SUN_ARCH="i386"
338 # If there is a compiler, see if it is configured for 64-bit objects.
339 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
340 # This test works for both compilers.
341 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
342 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
343 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
344 grep IS_64BIT_ARCH >/dev/null
345 then
346 SUN_ARCH="x86_64"
347 fi
348 fi
349 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
350 exit ;;
351 sun4*:SunOS:6*:*)
352 # According to config.sub, this is the proper way to canonicalize
353 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
354 # it's likely to be more like Solaris than SunOS4.
355 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
356 exit ;;
357 sun4*:SunOS:*:*)
358 case "`/usr/bin/arch -k`" in
359 Series*|S4*)
360 UNAME_RELEASE=`uname -v`
361 ;;
362 esac
363 # Japanese Language versions have a version number like `4.1.3-JL'.
364 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
365 exit ;;
366 sun3*:SunOS:*:*)
367 echo m68k-sun-sunos${UNAME_RELEASE}
368 exit ;;
369 sun*:*:4.2BSD:*)
370 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
371 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
372 case "`/bin/arch`" in
373 sun3)
374 echo m68k-sun-sunos${UNAME_RELEASE}
375 ;;
376 sun4)
377 echo sparc-sun-sunos${UNAME_RELEASE}
378 ;;
379 esac
380 exit ;;
381 aushp:SunOS:*:*)
382 echo sparc-auspex-sunos${UNAME_RELEASE}
383 exit ;;
384 # The situation for MiNT is a little confusing. The machine name
385 # can be virtually everything (everything which is not
386 # "atarist" or "atariste" at least should have a processor
387 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
388 # to the lowercase version "mint" (or "freemint"). Finally
389 # the system name "TOS" denotes a system which is actually not
390 # MiNT. But MiNT is downward compatible to TOS, so this should
391 # be no problem.
392 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
393 echo m68k-atari-mint${UNAME_RELEASE}
394 exit ;;
395 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
396 echo m68k-atari-mint${UNAME_RELEASE}
397 exit ;;
398 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
399 echo m68k-atari-mint${UNAME_RELEASE}
400 exit ;;
401 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
402 echo m68k-milan-mint${UNAME_RELEASE}
403 exit ;;
404 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
405 echo m68k-hades-mint${UNAME_RELEASE}
406 exit ;;
407 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
408 echo m68k-unknown-mint${UNAME_RELEASE}
409 exit ;;
410 m68k:machten:*:*)
411 echo m68k-apple-machten${UNAME_RELEASE}
412 exit ;;
413 powerpc:machten:*:*)
414 echo powerpc-apple-machten${UNAME_RELEASE}
415 exit ;;
416 RISC*:Mach:*:*)
417 echo mips-dec-mach_bsd4.3
418 exit ;;
419 RISC*:ULTRIX:*:*)
420 echo mips-dec-ultrix${UNAME_RELEASE}
421 exit ;;
422 VAX*:ULTRIX*:*:*)
423 echo vax-dec-ultrix${UNAME_RELEASE}
424 exit ;;
425 2020:CLIX:*:* | 2430:CLIX:*:*)
426 echo clipper-intergraph-clix${UNAME_RELEASE}
427 exit ;;
428 mips:*:*:UMIPS | mips:*:*:RISCos)
429 eval $set_cc_for_build
430 sed 's/^ //' << EOF >$dummy.c
431 #ifdef __cplusplus
432 #include <stdio.h> /* for printf() prototype */
433 int main (int argc, char *argv[]) {
434 #else
435 int main (argc, argv) int argc; char *argv[]; {
436 #endif
437 #if defined (host_mips) && defined (MIPSEB)
438 #if defined (SYSTYPE_SYSV)
439 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
440 #endif
441 #if defined (SYSTYPE_SVR4)
442 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
443 #endif
444 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
445 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
446 #endif
447 #endif
448 exit (-1);
449 }
450 EOF
451 $CC_FOR_BUILD -o $dummy $dummy.c &&
452 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
453 SYSTEM_NAME=`$dummy $dummyarg` &&
454 { echo "$SYSTEM_NAME"; exit; }
455 echo mips-mips-riscos${UNAME_RELEASE}
456 exit ;;
457 Motorola:PowerMAX_OS:*:*)
458 echo powerpc-motorola-powermax
459 exit ;;
460 Motorola:*:4.3:PL8-*)
461 echo powerpc-harris-powermax
462 exit ;;
463 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
464 echo powerpc-harris-powermax
465 exit ;;
466 Night_Hawk:Power_UNIX:*:*)
467 echo powerpc-harris-powerunix
468 exit ;;
469 m88k:CX/UX:7*:*)
470 echo m88k-harris-cxux7
471 exit ;;
472 m88k:*:4*:R4*)
473 echo m88k-motorola-sysv4
474 exit ;;
475 m88k:*:3*:R3*)
476 echo m88k-motorola-sysv3
477 exit ;;
478 AViiON:dgux:*:*)
479 # DG/UX returns AViiON for all architectures
480 UNAME_PROCESSOR=`/usr/bin/uname -p`
481 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
482 then
483 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
484 [ ${TARGET_BINARY_INTERFACE}x = x ]
485 then
486 echo m88k-dg-dgux${UNAME_RELEASE}
487 else
488 echo m88k-dg-dguxbcs${UNAME_RELEASE}
489 fi
490 else
491 echo i586-dg-dgux${UNAME_RELEASE}
492 fi
493 exit ;;
494 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
495 echo m88k-dolphin-sysv3
496 exit ;;
497 M88*:*:R3*:*)
498 # Delta 88k system running SVR3
499 echo m88k-motorola-sysv3
500 exit ;;
501 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
502 echo m88k-tektronix-sysv3
503 exit ;;
504 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
505 echo m68k-tektronix-bsd
506 exit ;;
507 *:IRIX*:*:*)
508 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
509 exit ;;
510 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
511 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
512 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
513 i*86:AIX:*:*)
514 echo i386-ibm-aix
515 exit ;;
516 ia64:AIX:*:*)
517 if [ -x /usr/bin/oslevel ] ; then
518 IBM_REV=`/usr/bin/oslevel`
519 else
520 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
521 fi
522 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
523 exit ;;
524 *:AIX:2:3)
525 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
526 eval $set_cc_for_build
527 sed 's/^ //' << EOF >$dummy.c
528 #include <sys/systemcfg.h>
529
530 main()
531 {
532 if (!__power_pc())
533 exit(1);
534 puts("powerpc-ibm-aix3.2.5");
535 exit(0);
536 }
537 EOF
538 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
539 then
540 echo "$SYSTEM_NAME"
541 else
542 echo rs6000-ibm-aix3.2.5
543 fi
544 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
545 echo rs6000-ibm-aix3.2.4
546 else
547 echo rs6000-ibm-aix3.2
548 fi
549 exit ;;
550 *:AIX:*:[456])
551 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
552 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
553 IBM_ARCH=rs6000
554 else
555 IBM_ARCH=powerpc
556 fi
557 if [ -x /usr/bin/oslevel ] ; then
558 IBM_REV=`/usr/bin/oslevel`
559 else
560 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
561 fi
562 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
563 exit ;;
564 *:AIX:*:*)
565 echo rs6000-ibm-aix
566 exit ;;
567 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
568 echo romp-ibm-bsd4.4
569 exit ;;
570 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
571 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
572 exit ;; # report: romp-ibm BSD 4.3
573 *:BOSX:*:*)
574 echo rs6000-bull-bosx
575 exit ;;
576 DPX/2?00:B.O.S.:*:*)
577 echo m68k-bull-sysv3
578 exit ;;
579 9000/[34]??:4.3bsd:1.*:*)
580 echo m68k-hp-bsd
581 exit ;;
582 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
583 echo m68k-hp-bsd4.4
584 exit ;;
585 9000/[34678]??:HP-UX:*:*)
586 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
587 case "${UNAME_MACHINE}" in
588 9000/31? ) HP_ARCH=m68000 ;;
589 9000/[34]?? ) HP_ARCH=m68k ;;
590 9000/[678][0-9][0-9])
591 if [ -x /usr/bin/getconf ]; then
592 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
593 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
594 case "${sc_cpu_version}" in
595 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
596 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
597 532) # CPU_PA_RISC2_0
598 case "${sc_kernel_bits}" in
599 32) HP_ARCH="hppa2.0n" ;;
600 64) HP_ARCH="hppa2.0w" ;;
601 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
602 esac ;;
603 esac
604 fi
605 if [ "${HP_ARCH}" = "" ]; then
606 eval $set_cc_for_build
607 sed 's/^ //' << EOF >$dummy.c
608
609 #define _HPUX_SOURCE
610 #include <stdlib.h>
611 #include <unistd.h>
612
613 int main ()
614 {
615 #if defined(_SC_KERNEL_BITS)
616 long bits = sysconf(_SC_KERNEL_BITS);
617 #endif
618 long cpu = sysconf (_SC_CPU_VERSION);
619
620 switch (cpu)
621 {
622 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
623 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
624 case CPU_PA_RISC2_0:
625 #if defined(_SC_KERNEL_BITS)
626 switch (bits)
627 {
628 case 64: puts ("hppa2.0w"); break;
629 case 32: puts ("hppa2.0n"); break;
630 default: puts ("hppa2.0"); break;
631 } break;
632 #else /* !defined(_SC_KERNEL_BITS) */
633 puts ("hppa2.0"); break;
634 #endif
635 default: puts ("hppa1.0"); break;
636 }
637 exit (0);
638 }
639 EOF
640 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
641 test -z "$HP_ARCH" && HP_ARCH=hppa
642 fi ;;
643 esac
644 if [ ${HP_ARCH} = "hppa2.0w" ]
645 then
646 eval $set_cc_for_build
647
648 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
649 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
650 # generating 64-bit code. GNU and HP use different nomenclature:
651 #
652 # $ CC_FOR_BUILD=cc ./config.guess
653 # => hppa2.0w-hp-hpux11.23
654 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
655 # => hppa64-hp-hpux11.23
656
657 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
658 grep -q __LP64__
659 then
660 HP_ARCH="hppa2.0w"
661 else
662 HP_ARCH="hppa64"
663 fi
664 fi
665 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
666 exit ;;
667 ia64:HP-UX:*:*)
668 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
669 echo ia64-hp-hpux${HPUX_REV}
670 exit ;;
671 3050*:HI-UX:*:*)
672 eval $set_cc_for_build
673 sed 's/^ //' << EOF >$dummy.c
674 #include <unistd.h>
675 int
676 main ()
677 {
678 long cpu = sysconf (_SC_CPU_VERSION);
679 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
680 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
681 results, however. */
682 if (CPU_IS_PA_RISC (cpu))
683 {
684 switch (cpu)
685 {
686 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
687 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
688 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
689 default: puts ("hppa-hitachi-hiuxwe2"); break;
690 }
691 }
692 else if (CPU_IS_HP_MC68K (cpu))
693 puts ("m68k-hitachi-hiuxwe2");
694 else puts ("unknown-hitachi-hiuxwe2");
695 exit (0);
696 }
697 EOF
698 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
699 { echo "$SYSTEM_NAME"; exit; }
700 echo unknown-hitachi-hiuxwe2
701 exit ;;
702 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
703 echo hppa1.1-hp-bsd
704 exit ;;
705 9000/8??:4.3bsd:*:*)
706 echo hppa1.0-hp-bsd
707 exit ;;
708 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
709 echo hppa1.0-hp-mpeix
710 exit ;;
711 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
712 echo hppa1.1-hp-osf
713 exit ;;
714 hp8??:OSF1:*:*)
715 echo hppa1.0-hp-osf
716 exit ;;
717 i*86:OSF1:*:*)
718 if [ -x /usr/sbin/sysversion ] ; then
719 echo ${UNAME_MACHINE}-unknown-osf1mk
720 else
721 echo ${UNAME_MACHINE}-unknown-osf1
722 fi
723 exit ;;
724 parisc*:Lites*:*:*)
725 echo hppa1.1-hp-lites
726 exit ;;
727 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
728 echo c1-convex-bsd
729 exit ;;
730 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
731 if getsysinfo -f scalar_acc
732 then echo c32-convex-bsd
733 else echo c2-convex-bsd
734 fi
735 exit ;;
736 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
737 echo c34-convex-bsd
738 exit ;;
739 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
740 echo c38-convex-bsd
741 exit ;;
742 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
743 echo c4-convex-bsd
744 exit ;;
745 CRAY*Y-MP:*:*:*)
746 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
747 exit ;;
748 CRAY*[A-Z]90:*:*:*)
749 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
750 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
751 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
752 -e 's/\.[^.]*$/.X/'
753 exit ;;
754 CRAY*TS:*:*:*)
755 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
756 exit ;;
757 CRAY*T3E:*:*:*)
758 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
759 exit ;;
760 CRAY*SV1:*:*:*)
761 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
762 exit ;;
763 *:UNICOS/mp:*:*)
764 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
765 exit ;;
766 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
767 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
768 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
769 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
770 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
771 exit ;;
772 5000:UNIX_System_V:4.*:*)
773 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
774 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
775 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
776 exit ;;
777 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
778 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
779 exit ;;
780 sparc*:BSD/OS:*:*)
781 echo sparc-unknown-bsdi${UNAME_RELEASE}
782 exit ;;
783 *:BSD/OS:*:*)
784 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
785 exit ;;
786 *:FreeBSD:*:*)
787 case ${UNAME_MACHINE} in
788 pc98)
789 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
790 amd64)
791 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
792 *)
793 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
794 esac
795 exit ;;
796 i*:CYGWIN*:*)
797 echo ${UNAME_MACHINE}-pc-cygwin
798 exit ;;
799 *:MINGW*:*)
800 echo ${UNAME_MACHINE}-pc-mingw32
801 exit ;;
802 i*:windows32*:*)
803 # uname -m includes "-pc" on this system.
804 echo ${UNAME_MACHINE}-mingw32
805 exit ;;
806 i*:PW*:*)
807 echo ${UNAME_MACHINE}-pc-pw32
808 exit ;;
809 *:Interix*:[3456]*)
810 case ${UNAME_MACHINE} in
811 x86)
812 echo i586-pc-interix${UNAME_RELEASE}
813 exit ;;
814 EM64T | authenticamd | genuineintel)
815 echo x86_64-unknown-interix${UNAME_RELEASE}
816 exit ;;
817 IA64)
818 echo ia64-unknown-interix${UNAME_RELEASE}
819 exit ;;
820 esac ;;
821 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
822 echo i${UNAME_MACHINE}-pc-mks
823 exit ;;
824 8664:Windows_NT:*)
825 echo x86_64-pc-mks
826 exit ;;
827 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
828 # How do we know it's Interix rather than the generic POSIX subsystem?
829 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
830 # UNAME_MACHINE based on the output of uname instead of i386?
831 echo i586-pc-interix
832 exit ;;
833 i*:UWIN*:*)
834 echo ${UNAME_MACHINE}-pc-uwin
835 exit ;;
836 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
837 echo x86_64-unknown-cygwin
838 exit ;;
839 p*:CYGWIN*:*)
840 echo powerpcle-unknown-cygwin
841 exit ;;
842 prep*:SunOS:5.*:*)
843 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
844 exit ;;
845 *:GNU:*:*)
846 # the GNU system
847 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
848 exit ;;
849 *:GNU/*:*:*)
850 # other systems with GNU libc and userland
851 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
852 exit ;;
853 i*86:Minix:*:*)
854 echo ${UNAME_MACHINE}-pc-minix
855 exit ;;
856 arm*:Linux:*:*)
857 eval $set_cc_for_build
858 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
859 | grep -q __ARM_EABI__
860 then
861 echo ${UNAME_MACHINE}-unknown-linux-gnu
862 else
863 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
864 fi
865 exit ;;
866 avr32*:Linux:*:*)
867 echo ${UNAME_MACHINE}-unknown-linux-gnu
868 exit ;;
869 cris:Linux:*:*)
870 echo cris-axis-linux-gnu
871 exit ;;
872 crisv32:Linux:*:*)
873 echo crisv32-axis-linux-gnu
874 exit ;;
875 frv:Linux:*:*)
876 echo frv-unknown-linux-gnu
877 exit ;;
878 ia64:Linux:*:*)
879 echo ${UNAME_MACHINE}-unknown-linux-gnu
880 exit ;;
881 m32r*:Linux:*:*)
882 echo ${UNAME_MACHINE}-unknown-linux-gnu
883 exit ;;
884 m68*:Linux:*:*)
885 echo ${UNAME_MACHINE}-unknown-linux-gnu
886 exit ;;
887 mips:Linux:*:* | mips64:Linux:*:*)
888 eval $set_cc_for_build
889 sed 's/^ //' << EOF >$dummy.c
890 #undef CPU
891 #undef ${UNAME_MACHINE}
892 #undef ${UNAME_MACHINE}el
893 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
894 CPU=${UNAME_MACHINE}el
895 #else
896 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
897 CPU=${UNAME_MACHINE}
898 #else
899 CPU=
900 #endif
901 #endif
902 EOF
903 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
904 /^CPU/{
905 s: ::g
906 p
907 }'`"
908 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
909 ;;
910 or32:Linux:*:*)
911 echo or32-unknown-linux-gnu
912 exit ;;
913 ppc:Linux:*:*)
914 echo powerpc-unknown-linux-gnu
915 exit ;;
916 ppc64:Linux:*:*)
917 echo powerpc64-unknown-linux-gnu
918 exit ;;
919 alpha:Linux:*:*)
920 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
921 EV5) UNAME_MACHINE=alphaev5 ;;
922 EV56) UNAME_MACHINE=alphaev56 ;;
923 PCA56) UNAME_MACHINE=alphapca56 ;;
924 PCA57) UNAME_MACHINE=alphapca56 ;;
925 EV6) UNAME_MACHINE=alphaev6 ;;
926 EV67) UNAME_MACHINE=alphaev67 ;;
927 EV68*) UNAME_MACHINE=alphaev68 ;;
928 esac
929 objdump --private-headers /bin/sh | grep -q ld.so.1
930 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
931 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
932 exit ;;
933 padre:Linux:*:*)
934 echo sparc-unknown-linux-gnu
935 exit ;;
936 parisc:Linux:*:* | hppa:Linux:*:*)
937 # Look for CPU level
938 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
939 PA7*) echo hppa1.1-unknown-linux-gnu ;;
940 PA8*) echo hppa2.0-unknown-linux-gnu ;;
941 *) echo hppa-unknown-linux-gnu ;;
942 esac
943 exit ;;
944 parisc64:Linux:*:* | hppa64:Linux:*:*)
945 echo hppa64-unknown-linux-gnu
946 exit ;;
947 s390:Linux:*:* | s390x:Linux:*:*)
948 echo ${UNAME_MACHINE}-ibm-linux
949 exit ;;
950 sh64*:Linux:*:*)
951 echo ${UNAME_MACHINE}-unknown-linux-gnu
952 exit ;;
953 sh*:Linux:*:*)
954 echo ${UNAME_MACHINE}-unknown-linux-gnu
955 exit ;;
956 sparc:Linux:*:* | sparc64:Linux:*:*)
957 echo ${UNAME_MACHINE}-unknown-linux-gnu
958 exit ;;
959 vax:Linux:*:*)
960 echo ${UNAME_MACHINE}-dec-linux-gnu
961 exit ;;
962 x86_64:Linux:*:*)
963 echo x86_64-unknown-linux-gnu
964 exit ;;
965 xtensa*:Linux:*:*)
966 echo ${UNAME_MACHINE}-unknown-linux-gnu
967 exit ;;
968 i*86:Linux:*:*)
969 # The BFD linker knows what the default object file format is, so
970 # first see if it will tell us. cd to the root directory to prevent
971 # problems with other programs or directories called `ld' in the path.
972 # Set LC_ALL=C to ensure ld outputs messages in English.
973 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
974 | sed -ne '/supported targets:/!d
975 s/[ ][ ]*/ /g
976 s/.*supported targets: *//
977 s/ .*//
978 p'`
979 case "$ld_supported_targets" in
980 elf32-i386)
981 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
982 ;;
983 esac
984 # Determine whether the default compiler is a.out or elf
985 eval $set_cc_for_build
986 sed 's/^ //' << EOF >$dummy.c
987 #include <features.h>
988 #ifdef __ELF__
989 # ifdef __GLIBC__
990 # if __GLIBC__ >= 2
991 LIBC=gnu
992 # else
993 LIBC=gnulibc1
994 # endif
995 # else
996 LIBC=gnulibc1
997 # endif
998 #else
999 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1000 LIBC=gnu
1001 #else
1002 LIBC=gnuaout
1003 #endif
1004 #endif
1005 #ifdef __dietlibc__
1006 LIBC=dietlibc
1007 #endif
1008 EOF
1009 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1010 /^LIBC/{
1011 s: ::g
1012 p
1013 }'`"
1014 test x"${LIBC}" != x && {
1015 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1016 exit
1017 }
1018 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1019 ;;
1020 i*86:DYNIX/ptx:4*:*)
1021 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1022 # earlier versions are messed up and put the nodename in both
1023 # sysname and nodename.
1024 echo i386-sequent-sysv4
1025 exit ;;
1026 i*86:UNIX_SV:4.2MP:2.*)
1027 # Unixware is an offshoot of SVR4, but it has its own version
1028 # number series starting with 2...
1029 # I am not positive that other SVR4 systems won't match this,
1030 # I just have to hope. -- rms.
1031 # Use sysv4.2uw... so that sysv4* matches it.
1032 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1033 exit ;;
1034 i*86:OS/2:*:*)
1035 # If we were able to find `uname', then EMX Unix compatibility
1036 # is probably installed.
1037 echo ${UNAME_MACHINE}-pc-os2-emx
1038 exit ;;
1039 i*86:XTS-300:*:STOP)
1040 echo ${UNAME_MACHINE}-unknown-stop
1041 exit ;;
1042 i*86:atheos:*:*)
1043 echo ${UNAME_MACHINE}-unknown-atheos
1044 exit ;;
1045 i*86:syllable:*:*)
1046 echo ${UNAME_MACHINE}-pc-syllable
1047 exit ;;
1048 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1049 echo i386-unknown-lynxos${UNAME_RELEASE}
1050 exit ;;
1051 i*86:*DOS:*:*)
1052 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1053 exit ;;
1054 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1055 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1056 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1057 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1058 else
1059 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1060 fi
1061 exit ;;
1062 i*86:*:5:[678]*)
1063 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1064 case `/bin/uname -X | grep "^Machine"` in
1065 *486*) UNAME_MACHINE=i486 ;;
1066 *Pentium) UNAME_MACHINE=i586 ;;
1067 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1068 esac
1069 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1070 exit ;;
1071 i*86:*:3.2:*)
1072 if test -f /usr/options/cb.name; then
1073 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1074 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1075 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1076 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1077 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1078 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1079 && UNAME_MACHINE=i586
1080 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1081 && UNAME_MACHINE=i686
1082 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1083 && UNAME_MACHINE=i686
1084 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1085 else
1086 echo ${UNAME_MACHINE}-pc-sysv32
1087 fi
1088 exit ;;
1089 pc:*:*:*)
1090 # Left here for compatibility:
1091 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1092 # the processor, so we play safe by assuming i586.
1093 # Note: whatever this is, it MUST be the same as what config.sub
1094 # prints for the "djgpp" host, or else GDB configury will decide that
1095 # this is a cross-build.
1096 echo i586-pc-msdosdjgpp
1097 exit ;;
1098 Intel:Mach:3*:*)
1099 echo i386-pc-mach3
1100 exit ;;
1101 paragon:*:*:*)
1102 echo i860-intel-osf1
1103 exit ;;
1104 i860:*:4.*:*) # i860-SVR4
1105 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1106 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1107 else # Add other i860-SVR4 vendors below as they are discovered.
1108 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1109 fi
1110 exit ;;
1111 mini*:CTIX:SYS*5:*)
1112 # "miniframe"
1113 echo m68010-convergent-sysv
1114 exit ;;
1115 mc68k:UNIX:SYSTEM5:3.51m)
1116 echo m68k-convergent-sysv
1117 exit ;;
1118 M680?0:D-NIX:5.3:*)
1119 echo m68k-diab-dnix
1120 exit ;;
1121 M68*:*:R3V[5678]*:*)
1122 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1123 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)
1124 OS_REL=''
1125 test -r /etc/.relid \
1126 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1127 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1128 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1129 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1130 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1131 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1132 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1133 && { echo i486-ncr-sysv4; exit; } ;;
1134 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1135 OS_REL='.3'
1136 test -r /etc/.relid \
1137 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1138 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1139 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1140 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1141 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1142 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1143 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1144 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1145 echo m68k-unknown-lynxos${UNAME_RELEASE}
1146 exit ;;
1147 mc68030:UNIX_System_V:4.*:*)
1148 echo m68k-atari-sysv4
1149 exit ;;
1150 TSUNAMI:LynxOS:2.*:*)
1151 echo sparc-unknown-lynxos${UNAME_RELEASE}
1152 exit ;;
1153 rs6000:LynxOS:2.*:*)
1154 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1155 exit ;;
1156 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1157 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1158 exit ;;
1159 SM[BE]S:UNIX_SV:*:*)
1160 echo mips-dde-sysv${UNAME_RELEASE}
1161 exit ;;
1162 RM*:ReliantUNIX-*:*:*)
1163 echo mips-sni-sysv4
1164 exit ;;
1165 RM*:SINIX-*:*:*)
1166 echo mips-sni-sysv4
1167 exit ;;
1168 *:SINIX-*:*:*)
1169 if uname -p 2>/dev/null >/dev/null ; then
1170 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1171 echo ${UNAME_MACHINE}-sni-sysv4
1172 else
1173 echo ns32k-sni-sysv
1174 fi
1175 exit ;;
1176 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1177 # says <Richard.M.Bartel@ccMail.Census.GOV>
1178 echo i586-unisys-sysv4
1179 exit ;;
1180 *:UNIX_System_V:4*:FTX*)
1181 # From Gerald Hewes <hewes@openmarket.com>.
1182 # How about differentiating between stratus architectures? -djm
1183 echo hppa1.1-stratus-sysv4
1184 exit ;;
1185 *:*:*:FTX*)
1186 # From seanf@swdc.stratus.com.
1187 echo i860-stratus-sysv4
1188 exit ;;
1189 i*86:VOS:*:*)
1190 # From Paul.Green@stratus.com.
1191 echo ${UNAME_MACHINE}-stratus-vos
1192 exit ;;
1193 *:VOS:*:*)
1194 # From Paul.Green@stratus.com.
1195 echo hppa1.1-stratus-vos
1196 exit ;;
1197 mc68*:A/UX:*:*)
1198 echo m68k-apple-aux${UNAME_RELEASE}
1199 exit ;;
1200 news*:NEWS-OS:6*:*)
1201 echo mips-sony-newsos6
1202 exit ;;
1203 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1204 if [ -d /usr/nec ]; then
1205 echo mips-nec-sysv${UNAME_RELEASE}
1206 else
1207 echo mips-unknown-sysv${UNAME_RELEASE}
1208 fi
1209 exit ;;
1210 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1211 echo powerpc-be-beos
1212 exit ;;
1213 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1214 echo powerpc-apple-beos
1215 exit ;;
1216 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1217 echo i586-pc-beos
1218 exit ;;
1219 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1220 echo i586-pc-haiku
1221 exit ;;
1222 SX-4:SUPER-UX:*:*)
1223 echo sx4-nec-superux${UNAME_RELEASE}
1224 exit ;;
1225 SX-5:SUPER-UX:*:*)
1226 echo sx5-nec-superux${UNAME_RELEASE}
1227 exit ;;
1228 SX-6:SUPER-UX:*:*)
1229 echo sx6-nec-superux${UNAME_RELEASE}
1230 exit ;;
1231 SX-7:SUPER-UX:*:*)
1232 echo sx7-nec-superux${UNAME_RELEASE}
1233 exit ;;
1234 SX-8:SUPER-UX:*:*)
1235 echo sx8-nec-superux${UNAME_RELEASE}
1236 exit ;;
1237 SX-8R:SUPER-UX:*:*)
1238 echo sx8r-nec-superux${UNAME_RELEASE}
1239 exit ;;
1240 Power*:Rhapsody:*:*)
1241 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1242 exit ;;
1243 *:Rhapsody:*:*)
1244 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1245 exit ;;
1246 *:Darwin:*:*)
1247 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1248 case $UNAME_PROCESSOR in
1249 unknown) UNAME_PROCESSOR=powerpc ;;
1250 esac
1251 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1252 exit ;;
1253 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1254 UNAME_PROCESSOR=`uname -p`
1255 if test "$UNAME_PROCESSOR" = "x86"; then
1256 UNAME_PROCESSOR=i386
1257 UNAME_MACHINE=pc
1258 fi
1259 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1260 exit ;;
1261 *:QNX:*:4*)
1262 echo i386-pc-qnx
1263 exit ;;
1264 NSE-?:NONSTOP_KERNEL:*:*)
1265 echo nse-tandem-nsk${UNAME_RELEASE}
1266 exit ;;
1267 NSR-?:NONSTOP_KERNEL:*:*)
1268 echo nsr-tandem-nsk${UNAME_RELEASE}
1269 exit ;;
1270 *:NonStop-UX:*:*)
1271 echo mips-compaq-nonstopux
1272 exit ;;
1273 BS2000:POSIX*:*:*)
1274 echo bs2000-siemens-sysv
1275 exit ;;
1276 DS/*:UNIX_System_V:*:*)
1277 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1278 exit ;;
1279 *:Plan9:*:*)
1280 # "uname -m" is not consistent, so use $cputype instead. 386
1281 # is converted to i386 for consistency with other x86
1282 # operating systems.
1283 if test "$cputype" = "386"; then
1284 UNAME_MACHINE=i386
1285 else
1286 UNAME_MACHINE="$cputype"
1287 fi
1288 echo ${UNAME_MACHINE}-unknown-plan9
1289 exit ;;
1290 *:TOPS-10:*:*)
1291 echo pdp10-unknown-tops10
1292 exit ;;
1293 *:TENEX:*:*)
1294 echo pdp10-unknown-tenex
1295 exit ;;
1296 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1297 echo pdp10-dec-tops20
1298 exit ;;
1299 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1300 echo pdp10-xkl-tops20
1301 exit ;;
1302 *:TOPS-20:*:*)
1303 echo pdp10-unknown-tops20
1304 exit ;;
1305 *:ITS:*:*)
1306 echo pdp10-unknown-its
1307 exit ;;
1308 SEI:*:*:SEIUX)
1309 echo mips-sei-seiux${UNAME_RELEASE}
1310 exit ;;
1311 *:DragonFly:*:*)
1312 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1313 exit ;;
1314 *:*VMS:*:*)
1315 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1316 case "${UNAME_MACHINE}" in
1317 A*) echo alpha-dec-vms ; exit ;;
1318 I*) echo ia64-dec-vms ; exit ;;
1319 V*) echo vax-dec-vms ; exit ;;
1320 esac ;;
1321 *:XENIX:*:SysV)
1322 echo i386-pc-xenix
1323 exit ;;
1324 i*86:skyos:*:*)
1325 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1326 exit ;;
1327 i*86:rdos:*:*)
1328 echo ${UNAME_MACHINE}-pc-rdos
1329 exit ;;
1330 i*86:AROS:*:*)
1331 echo ${UNAME_MACHINE}-pc-aros
1332 exit ;;
1333 esac
1334
1335 #echo '(No uname command or uname output not recognized.)' 1>&2
1336 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1337
1338 eval $set_cc_for_build
1339 cat >$dummy.c <<EOF
1340 #ifdef _SEQUENT_
1341 # include <sys/types.h>
1342 # include <sys/utsname.h>
1343 #endif
1344 main ()
1345 {
1346 #if defined (sony)
1347 #if defined (MIPSEB)
1348 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1349 I don't know.... */
1350 printf ("mips-sony-bsd\n"); exit (0);
1351 #else
1352 #include <sys/param.h>
1353 printf ("m68k-sony-newsos%s\n",
1354 #ifdef NEWSOS4
1355 "4"
1356 #else
1357 ""
1358 #endif
1359 ); exit (0);
1360 #endif
1361 #endif
1362
1363 #if defined (__arm) && defined (__acorn) && defined (__unix)
1364 printf ("arm-acorn-riscix\n"); exit (0);
1365 #endif
1366
1367 #if defined (hp300) && !defined (hpux)
1368 printf ("m68k-hp-bsd\n"); exit (0);
1369 #endif
1370
1371 #if defined (NeXT)
1372 #if !defined (__ARCHITECTURE__)
1373 #define __ARCHITECTURE__ "m68k"
1374 #endif
1375 int version;
1376 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1377 if (version < 4)
1378 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1379 else
1380 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1381 exit (0);
1382 #endif
1383
1384 #if defined (MULTIMAX) || defined (n16)
1385 #if defined (UMAXV)
1386 printf ("ns32k-encore-sysv\n"); exit (0);
1387 #else
1388 #if defined (CMU)
1389 printf ("ns32k-encore-mach\n"); exit (0);
1390 #else
1391 printf ("ns32k-encore-bsd\n"); exit (0);
1392 #endif
1393 #endif
1394 #endif
1395
1396 #if defined (__386BSD__)
1397 printf ("i386-pc-bsd\n"); exit (0);
1398 #endif
1399
1400 #if defined (sequent)
1401 #if defined (i386)
1402 printf ("i386-sequent-dynix\n"); exit (0);
1403 #endif
1404 #if defined (ns32000)
1405 printf ("ns32k-sequent-dynix\n"); exit (0);
1406 #endif
1407 #endif
1408
1409 #if defined (_SEQUENT_)
1410 struct utsname un;
1411
1412 uname(&un);
1413
1414 if (strncmp(un.version, "V2", 2) == 0) {
1415 printf ("i386-sequent-ptx2\n"); exit (0);
1416 }
1417 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1418 printf ("i386-sequent-ptx1\n"); exit (0);
1419 }
1420 printf ("i386-sequent-ptx\n"); exit (0);
1421
1422 #endif
1423
1424 #if defined (vax)
1425 # if !defined (ultrix)
1426 # include <sys/param.h>
1427 # if defined (BSD)
1428 # if BSD == 43
1429 printf ("vax-dec-bsd4.3\n"); exit (0);
1430 # else
1431 # if BSD == 199006
1432 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1433 # else
1434 printf ("vax-dec-bsd\n"); exit (0);
1435 # endif
1436 # endif
1437 # else
1438 printf ("vax-dec-bsd\n"); exit (0);
1439 # endif
1440 # else
1441 printf ("vax-dec-ultrix\n"); exit (0);
1442 # endif
1443 #endif
1444
1445 #if defined (alliant) && defined (i860)
1446 printf ("i860-alliant-bsd\n"); exit (0);
1447 #endif
1448
1449 exit (1);
1450 }
1451 EOF
1452
1453 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1454 { echo "$SYSTEM_NAME"; exit; }
1455
1456 # Apollos put the system type in the environment.
1457
1458 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1459
1460 # Convex versions that predate uname can use getsysinfo(1)
1461
1462 if [ -x /usr/convex/getsysinfo ]
1463 then
1464 case `getsysinfo -f cpu_type` in
1465 c1*)
1466 echo c1-convex-bsd
1467 exit ;;
1468 c2*)
1469 if getsysinfo -f scalar_acc
1470 then echo c32-convex-bsd
1471 else echo c2-convex-bsd
1472 fi
1473 exit ;;
1474 c34*)
1475 echo c34-convex-bsd
1476 exit ;;
1477 c38*)
1478 echo c38-convex-bsd
1479 exit ;;
1480 c4*)
1481 echo c4-convex-bsd
1482 exit ;;
1483 esac
1484 fi
1485
1486 cat >&2 <<EOF
1487 $0: unable to guess system type
1488
1489 This script, last modified $timestamp, has failed to recognize
1490 the operating system you are using. It is advised that you
1491 download the most up to date version of the config scripts from
1492
1493 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1494 and
1495 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1496
1497 If the version you run ($0) is already up to date, please
1498 send the following data and any information you think might be
1499 pertinent to <config-patches@gnu.org> in order to provide the needed
1500 information to handle your system.
1501
1502 config.guess timestamp = $timestamp
1503
1504 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1505 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1506 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1507 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1508
1509 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1510 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1511
1512 hostinfo = `(hostinfo) 2>/dev/null`
1513 /bin/universe = `(/bin/universe) 2>/dev/null`
1514 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1515 /bin/arch = `(/bin/arch) 2>/dev/null`
1516 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1517 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1518
1519 UNAME_MACHINE = ${UNAME_MACHINE}
1520 UNAME_RELEASE = ${UNAME_RELEASE}
1521 UNAME_SYSTEM = ${UNAME_SYSTEM}
1522 UNAME_VERSION = ${UNAME_VERSION}
1523 EOF
1524
1525 exit 1
1526
1527 # Local variables:
1528 # eval: (add-hook 'write-file-hooks 'time-stamp)
1529 # time-stamp-start: "timestamp='"
1530 # time-stamp-format: "%:y-%02m-%02d"
1531 # time-stamp-end: "'"
1532 # End:
0 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* Define to 1 if you have the <dlfcn.h> header file. */
3 #undef HAVE_DLFCN_H
4
5 /* Define to 1 if you have the <inttypes.h> header file. */
6 #undef HAVE_INTTYPES_H
7
8 /* Define to 1 if you have the <memory.h> header file. */
9 #undef HAVE_MEMORY_H
10
11 /* Define to 1 if you have the <stdint.h> header file. */
12 #undef HAVE_STDINT_H
13
14 /* Define to 1 if you have the <stdlib.h> header file. */
15 #undef HAVE_STDLIB_H
16
17 /* Define to 1 if you have the <strings.h> header file. */
18 #undef HAVE_STRINGS_H
19
20 /* Define to 1 if you have the <string.h> header file. */
21 #undef HAVE_STRING_H
22
23 /* Define to 1 if you have the <sys/stat.h> header file. */
24 #undef HAVE_SYS_STAT_H
25
26 /* Define to 1 if you have the <sys/types.h> header file. */
27 #undef HAVE_SYS_TYPES_H
28
29 /* Define to 1 if you have the <unistd.h> header file. */
30 #undef HAVE_UNISTD_H
31
32 /* Define to the sub-directory in which libtool stores uninstalled libraries.
33 */
34 #undef LT_OBJDIR
35
36 /* Name of package */
37 #undef PACKAGE
38
39 /* Define to the address where bug reports for this package should be sent. */
40 #undef PACKAGE_BUGREPORT
41
42 /* Define to the full name of this package. */
43 #undef PACKAGE_NAME
44
45 /* Define to the full name and version of this package. */
46 #undef PACKAGE_STRING
47
48 /* Define to the one symbol short name of this package. */
49 #undef PACKAGE_TARNAME
50
51 /* Define to the home page for this package. */
52 #undef PACKAGE_URL
53
54 /* Define to the version of this package. */
55 #undef PACKAGE_VERSION
56
57 /* Define to 1 if you have the ANSI C header files. */
58 #undef STDC_HEADERS
59
60 /* Version number of package */
61 #undef VERSION
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
4 # Free Software Foundation, Inc.
5
6 timestamp='2009-06-11'
7
8 # This file is (in principle) common to ALL GNU software.
9 # The presence of a machine in this file suggests that SOME GNU software
10 # can handle that machine. It does not imply ALL GNU software can.
11 #
12 # This file is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
16 #
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
25 # 02110-1301, USA.
26 #
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
31
32
33 # Please send patches to <config-patches@gnu.org>. Submit a context
34 # diff and a properly formatted ChangeLog entry.
35 #
36 # Configuration subroutine to validate and canonicalize a configuration type.
37 # Supply the specified configuration type as an argument.
38 # If it is invalid, we print an error message on stderr and exit with code 1.
39 # Otherwise, we print the canonical config type on stdout and succeed.
40
41 # This file is supposed to be the same for all GNU packages
42 # and recognize all the CPU types, system types and aliases
43 # that are meaningful with *any* GNU software.
44 # Each package is responsible for reporting which valid configurations
45 # it does not support. The user should be able to distinguish
46 # a failure to support a valid configuration from a meaningless
47 # configuration.
48
49 # The goal of this file is to map all the various variations of a given
50 # machine specification into a single specification in the form:
51 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
52 # or in some cases, the newer four-part form:
53 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
54 # It is wrong to echo any other type of specification.
55
56 me=`echo "$0" | sed -e 's,.*/,,'`
57
58 usage="\
59 Usage: $0 [OPTION] CPU-MFR-OPSYS
60 $0 [OPTION] ALIAS
61
62 Canonicalize a configuration name.
63
64 Operation modes:
65 -h, --help print this help, then exit
66 -t, --time-stamp print date of last modification, then exit
67 -v, --version print version number, then exit
68
69 Report bugs and patches to <config-patches@gnu.org>."
70
71 version="\
72 GNU config.sub ($timestamp)
73
74 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
75 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
76
77 This is free software; see the source for copying conditions. There is NO
78 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
79
80 help="
81 Try \`$me --help' for more information."
82
83 # Parse command line
84 while test $# -gt 0 ; do
85 case $1 in
86 --time-stamp | --time* | -t )
87 echo "$timestamp" ; exit ;;
88 --version | -v )
89 echo "$version" ; exit ;;
90 --help | --h* | -h )
91 echo "$usage"; exit ;;
92 -- ) # Stop option processing
93 shift; break ;;
94 - ) # Use stdin as input.
95 break ;;
96 -* )
97 echo "$me: invalid option $1$help"
98 exit 1 ;;
99
100 *local*)
101 # First pass through any local machine types.
102 echo $1
103 exit ;;
104
105 * )
106 break ;;
107 esac
108 done
109
110 case $# in
111 0) echo "$me: missing argument$help" >&2
112 exit 1;;
113 1) ;;
114 *) echo "$me: too many arguments$help" >&2
115 exit 1;;
116 esac
117
118 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
119 # Here we must recognize all the valid KERNEL-OS combinations.
120 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
121 case $maybe_os in
122 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
123 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
124 kopensolaris*-gnu* | \
125 storm-chaos* | os2-emx* | rtmk-nova*)
126 os=-$maybe_os
127 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
128 ;;
129 *)
130 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
131 if [ $basic_machine != $1 ]
132 then os=`echo $1 | sed 's/.*-/-/'`
133 else os=; fi
134 ;;
135 esac
136
137 ### Let's recognize common machines as not being operating systems so
138 ### that things like config.sub decstation-3100 work. We also
139 ### recognize some manufacturers as not being operating systems, so we
140 ### can provide default operating systems below.
141 case $os in
142 -sun*os*)
143 # Prevent following clause from handling this invalid input.
144 ;;
145 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
146 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
147 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
148 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151 -apple | -axis | -knuth | -cray)
152 os=
153 basic_machine=$1
154 ;;
155 -bluegene*)
156 os=-cnk
157 ;;
158 -sim | -cisco | -oki | -wec | -winbond)
159 os=
160 basic_machine=$1
161 ;;
162 -scout)
163 ;;
164 -wrs)
165 os=-vxworks
166 basic_machine=$1
167 ;;
168 -chorusos*)
169 os=-chorusos
170 basic_machine=$1
171 ;;
172 -chorusrdb)
173 os=-chorusrdb
174 basic_machine=$1
175 ;;
176 -hiux*)
177 os=-hiuxwe2
178 ;;
179 -sco6)
180 os=-sco5v6
181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
182 ;;
183 -sco5)
184 os=-sco3.2v5
185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
186 ;;
187 -sco4)
188 os=-sco3.2v4
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
190 ;;
191 -sco3.2.[4-9]*)
192 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
193 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
194 ;;
195 -sco3.2v[4-9]*)
196 # Don't forget version if it is 3.2v4 or newer.
197 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
198 ;;
199 -sco5v6*)
200 # Don't forget version if it is 3.2v4 or newer.
201 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
202 ;;
203 -sco*)
204 os=-sco3.2v2
205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206 ;;
207 -udk*)
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
209 ;;
210 -isc)
211 os=-isc2.2
212 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
213 ;;
214 -clix*)
215 basic_machine=clipper-intergraph
216 ;;
217 -isc*)
218 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
219 ;;
220 -lynx*)
221 os=-lynxos
222 ;;
223 -ptx*)
224 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
225 ;;
226 -windowsnt*)
227 os=`echo $os | sed -e 's/windowsnt/winnt/'`
228 ;;
229 -psos*)
230 os=-psos
231 ;;
232 -mint | -mint[0-9]*)
233 basic_machine=m68k-atari
234 os=-mint
235 ;;
236 esac
237
238 # Decode aliases for certain CPU-COMPANY combinations.
239 case $basic_machine in
240 # Recognize the basic CPU types without company name.
241 # Some are omitted here because they have special meanings below.
242 1750a | 580 \
243 | a29k \
244 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
245 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
246 | am33_2.0 \
247 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
248 | bfin \
249 | c4x | clipper \
250 | d10v | d30v | dlx | dsp16xx \
251 | fido | fr30 | frv \
252 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
253 | i370 | i860 | i960 | ia64 \
254 | ip2k | iq2000 \
255 | lm32 \
256 | m32c | m32r | m32rle | m68000 | m68k | m88k \
257 | maxq | mb | microblaze | mcore | mep | metag \
258 | mips | mipsbe | mipseb | mipsel | mipsle \
259 | mips16 \
260 | mips64 | mips64el \
261 | mips64octeon | mips64octeonel \
262 | mips64orion | mips64orionel \
263 | mips64r5900 | mips64r5900el \
264 | mips64vr | mips64vrel \
265 | mips64vr4100 | mips64vr4100el \
266 | mips64vr4300 | mips64vr4300el \
267 | mips64vr5000 | mips64vr5000el \
268 | mips64vr5900 | mips64vr5900el \
269 | mipsisa32 | mipsisa32el \
270 | mipsisa32r2 | mipsisa32r2el \
271 | mipsisa64 | mipsisa64el \
272 | mipsisa64r2 | mipsisa64r2el \
273 | mipsisa64sb1 | mipsisa64sb1el \
274 | mipsisa64sr71k | mipsisa64sr71kel \
275 | mipstx39 | mipstx39el \
276 | mn10200 | mn10300 \
277 | moxie \
278 | mt \
279 | msp430 \
280 | nios | nios2 \
281 | ns16k | ns32k \
282 | or32 \
283 | pdp10 | pdp11 | pj | pjl \
284 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
285 | pyramid \
286 | score \
287 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
288 | sh64 | sh64le \
289 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
290 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
291 | spu | strongarm \
292 | tahoe | thumb | tic4x | tic80 | tron \
293 | v850 | v850e \
294 | we32k \
295 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
296 | z8k | z80)
297 basic_machine=$basic_machine-unknown
298 ;;
299 m6811 | m68hc11 | m6812 | m68hc12)
300 # Motorola 68HC11/12.
301 basic_machine=$basic_machine-unknown
302 os=-none
303 ;;
304 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
305 ;;
306 ms1)
307 basic_machine=mt-unknown
308 ;;
309
310 # We use `pc' rather than `unknown'
311 # because (1) that's what they normally are, and
312 # (2) the word "unknown" tends to confuse beginning users.
313 i*86 | x86_64)
314 basic_machine=$basic_machine-pc
315 ;;
316 # Object if more than one company name word.
317 *-*-*)
318 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
319 exit 1
320 ;;
321 # Recognize the basic CPU types with company name.
322 580-* \
323 | a29k-* \
324 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
325 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
326 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
327 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
328 | avr-* | avr32-* \
329 | bfin-* | bs2000-* \
330 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
331 | clipper-* | craynv-* | cydra-* \
332 | d10v-* | d30v-* | dlx-* \
333 | elxsi-* \
334 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
335 | h8300-* | h8500-* \
336 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
337 | i*86-* | i860-* | i960-* | ia64-* \
338 | ip2k-* | iq2000-* \
339 | lm32-* \
340 | m32c-* | m32r-* | m32rle-* \
341 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
342 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
343 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
344 | mips16-* \
345 | mips64-* | mips64el-* \
346 | mips64octeon-* | mips64octeonel-* \
347 | mips64orion-* | mips64orionel-* \
348 | mips64r5900-* | mips64r5900el-* \
349 | mips64vr-* | mips64vrel-* \
350 | mips64vr4100-* | mips64vr4100el-* \
351 | mips64vr4300-* | mips64vr4300el-* \
352 | mips64vr5000-* | mips64vr5000el-* \
353 | mips64vr5900-* | mips64vr5900el-* \
354 | mipsisa32-* | mipsisa32el-* \
355 | mipsisa32r2-* | mipsisa32r2el-* \
356 | mipsisa64-* | mipsisa64el-* \
357 | mipsisa64r2-* | mipsisa64r2el-* \
358 | mipsisa64sb1-* | mipsisa64sb1el-* \
359 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
360 | mipstx39-* | mipstx39el-* \
361 | mmix-* \
362 | mt-* \
363 | msp430-* \
364 | nios-* | nios2-* \
365 | none-* | np1-* | ns16k-* | ns32k-* \
366 | orion-* \
367 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
368 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
369 | pyramid-* \
370 | romp-* | rs6000-* \
371 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
372 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
373 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
374 | sparclite-* \
375 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
376 | tahoe-* | thumb-* \
377 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
378 | tron-* \
379 | v850-* | v850e-* | vax-* \
380 | we32k-* \
381 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
382 | xstormy16-* | xtensa*-* \
383 | ymp-* \
384 | z8k-* | z80-*)
385 ;;
386 # Recognize the basic CPU types without company name, with glob match.
387 xtensa*)
388 basic_machine=$basic_machine-unknown
389 ;;
390 # Recognize the various machine names and aliases which stand
391 # for a CPU type and a company and sometimes even an OS.
392 386bsd)
393 basic_machine=i386-unknown
394 os=-bsd
395 ;;
396 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
397 basic_machine=m68000-att
398 ;;
399 3b*)
400 basic_machine=we32k-att
401 ;;
402 a29khif)
403 basic_machine=a29k-amd
404 os=-udi
405 ;;
406 abacus)
407 basic_machine=abacus-unknown
408 ;;
409 adobe68k)
410 basic_machine=m68010-adobe
411 os=-scout
412 ;;
413 alliant | fx80)
414 basic_machine=fx80-alliant
415 ;;
416 altos | altos3068)
417 basic_machine=m68k-altos
418 ;;
419 am29k)
420 basic_machine=a29k-none
421 os=-bsd
422 ;;
423 amd64)
424 basic_machine=x86_64-pc
425 ;;
426 amd64-*)
427 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
428 ;;
429 amdahl)
430 basic_machine=580-amdahl
431 os=-sysv
432 ;;
433 amiga | amiga-*)
434 basic_machine=m68k-unknown
435 ;;
436 amigaos | amigados)
437 basic_machine=m68k-unknown
438 os=-amigaos
439 ;;
440 amigaunix | amix)
441 basic_machine=m68k-unknown
442 os=-sysv4
443 ;;
444 apollo68)
445 basic_machine=m68k-apollo
446 os=-sysv
447 ;;
448 apollo68bsd)
449 basic_machine=m68k-apollo
450 os=-bsd
451 ;;
452 aros)
453 basic_machine=i386-pc
454 os=-aros
455 ;;
456 aux)
457 basic_machine=m68k-apple
458 os=-aux
459 ;;
460 balance)
461 basic_machine=ns32k-sequent
462 os=-dynix
463 ;;
464 blackfin)
465 basic_machine=bfin-unknown
466 os=-linux
467 ;;
468 blackfin-*)
469 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
470 os=-linux
471 ;;
472 bluegene*)
473 basic_machine=powerpc-ibm
474 os=-cnk
475 ;;
476 c90)
477 basic_machine=c90-cray
478 os=-unicos
479 ;;
480 cegcc)
481 basic_machine=arm-unknown
482 os=-cegcc
483 ;;
484 convex-c1)
485 basic_machine=c1-convex
486 os=-bsd
487 ;;
488 convex-c2)
489 basic_machine=c2-convex
490 os=-bsd
491 ;;
492 convex-c32)
493 basic_machine=c32-convex
494 os=-bsd
495 ;;
496 convex-c34)
497 basic_machine=c34-convex
498 os=-bsd
499 ;;
500 convex-c38)
501 basic_machine=c38-convex
502 os=-bsd
503 ;;
504 cray | j90)
505 basic_machine=j90-cray
506 os=-unicos
507 ;;
508 craynv)
509 basic_machine=craynv-cray
510 os=-unicosmp
511 ;;
512 cr16)
513 basic_machine=cr16-unknown
514 os=-elf
515 ;;
516 crds | unos)
517 basic_machine=m68k-crds
518 ;;
519 crisv32 | crisv32-* | etraxfs*)
520 basic_machine=crisv32-axis
521 ;;
522 cris | cris-* | etrax*)
523 basic_machine=cris-axis
524 ;;
525 crx)
526 basic_machine=crx-unknown
527 os=-elf
528 ;;
529 da30 | da30-*)
530 basic_machine=m68k-da30
531 ;;
532 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
533 basic_machine=mips-dec
534 ;;
535 decsystem10* | dec10*)
536 basic_machine=pdp10-dec
537 os=-tops10
538 ;;
539 decsystem20* | dec20*)
540 basic_machine=pdp10-dec
541 os=-tops20
542 ;;
543 delta | 3300 | motorola-3300 | motorola-delta \
544 | 3300-motorola | delta-motorola)
545 basic_machine=m68k-motorola
546 ;;
547 delta88)
548 basic_machine=m88k-motorola
549 os=-sysv3
550 ;;
551 dicos)
552 basic_machine=i686-pc
553 os=-dicos
554 ;;
555 djgpp)
556 basic_machine=i586-pc
557 os=-msdosdjgpp
558 ;;
559 dpx20 | dpx20-*)
560 basic_machine=rs6000-bull
561 os=-bosx
562 ;;
563 dpx2* | dpx2*-bull)
564 basic_machine=m68k-bull
565 os=-sysv3
566 ;;
567 ebmon29k)
568 basic_machine=a29k-amd
569 os=-ebmon
570 ;;
571 elxsi)
572 basic_machine=elxsi-elxsi
573 os=-bsd
574 ;;
575 encore | umax | mmax)
576 basic_machine=ns32k-encore
577 ;;
578 es1800 | OSE68k | ose68k | ose | OSE)
579 basic_machine=m68k-ericsson
580 os=-ose
581 ;;
582 fx2800)
583 basic_machine=i860-alliant
584 ;;
585 genix)
586 basic_machine=ns32k-ns
587 ;;
588 gmicro)
589 basic_machine=tron-gmicro
590 os=-sysv
591 ;;
592 go32)
593 basic_machine=i386-pc
594 os=-go32
595 ;;
596 h3050r* | hiux*)
597 basic_machine=hppa1.1-hitachi
598 os=-hiuxwe2
599 ;;
600 h8300hms)
601 basic_machine=h8300-hitachi
602 os=-hms
603 ;;
604 h8300xray)
605 basic_machine=h8300-hitachi
606 os=-xray
607 ;;
608 h8500hms)
609 basic_machine=h8500-hitachi
610 os=-hms
611 ;;
612 harris)
613 basic_machine=m88k-harris
614 os=-sysv3
615 ;;
616 hp300-*)
617 basic_machine=m68k-hp
618 ;;
619 hp300bsd)
620 basic_machine=m68k-hp
621 os=-bsd
622 ;;
623 hp300hpux)
624 basic_machine=m68k-hp
625 os=-hpux
626 ;;
627 hp3k9[0-9][0-9] | hp9[0-9][0-9])
628 basic_machine=hppa1.0-hp
629 ;;
630 hp9k2[0-9][0-9] | hp9k31[0-9])
631 basic_machine=m68000-hp
632 ;;
633 hp9k3[2-9][0-9])
634 basic_machine=m68k-hp
635 ;;
636 hp9k6[0-9][0-9] | hp6[0-9][0-9])
637 basic_machine=hppa1.0-hp
638 ;;
639 hp9k7[0-79][0-9] | hp7[0-79][0-9])
640 basic_machine=hppa1.1-hp
641 ;;
642 hp9k78[0-9] | hp78[0-9])
643 # FIXME: really hppa2.0-hp
644 basic_machine=hppa1.1-hp
645 ;;
646 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
647 # FIXME: really hppa2.0-hp
648 basic_machine=hppa1.1-hp
649 ;;
650 hp9k8[0-9][13679] | hp8[0-9][13679])
651 basic_machine=hppa1.1-hp
652 ;;
653 hp9k8[0-9][0-9] | hp8[0-9][0-9])
654 basic_machine=hppa1.0-hp
655 ;;
656 hppa-next)
657 os=-nextstep3
658 ;;
659 hppaosf)
660 basic_machine=hppa1.1-hp
661 os=-osf
662 ;;
663 hppro)
664 basic_machine=hppa1.1-hp
665 os=-proelf
666 ;;
667 i370-ibm* | ibm*)
668 basic_machine=i370-ibm
669 ;;
670 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
671 i*86v32)
672 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
673 os=-sysv32
674 ;;
675 i*86v4*)
676 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
677 os=-sysv4
678 ;;
679 i*86v)
680 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
681 os=-sysv
682 ;;
683 i*86sol2)
684 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
685 os=-solaris2
686 ;;
687 i386mach)
688 basic_machine=i386-mach
689 os=-mach
690 ;;
691 i386-vsta | vsta)
692 basic_machine=i386-unknown
693 os=-vsta
694 ;;
695 iris | iris4d)
696 basic_machine=mips-sgi
697 case $os in
698 -irix*)
699 ;;
700 *)
701 os=-irix4
702 ;;
703 esac
704 ;;
705 isi68 | isi)
706 basic_machine=m68k-isi
707 os=-sysv
708 ;;
709 m68knommu)
710 basic_machine=m68k-unknown
711 os=-linux
712 ;;
713 m68knommu-*)
714 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
715 os=-linux
716 ;;
717 m88k-omron*)
718 basic_machine=m88k-omron
719 ;;
720 magnum | m3230)
721 basic_machine=mips-mips
722 os=-sysv
723 ;;
724 merlin)
725 basic_machine=ns32k-utek
726 os=-sysv
727 ;;
728 mingw32)
729 basic_machine=i386-pc
730 os=-mingw32
731 ;;
732 mingw32ce)
733 basic_machine=arm-unknown
734 os=-mingw32ce
735 ;;
736 miniframe)
737 basic_machine=m68000-convergent
738 ;;
739 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
740 basic_machine=m68k-atari
741 os=-mint
742 ;;
743 mips3*-*)
744 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
745 ;;
746 mips3*)
747 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
748 ;;
749 monitor)
750 basic_machine=m68k-rom68k
751 os=-coff
752 ;;
753 morphos)
754 basic_machine=powerpc-unknown
755 os=-morphos
756 ;;
757 msdos)
758 basic_machine=i386-pc
759 os=-msdos
760 ;;
761 ms1-*)
762 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
763 ;;
764 mvs)
765 basic_machine=i370-ibm
766 os=-mvs
767 ;;
768 ncr3000)
769 basic_machine=i486-ncr
770 os=-sysv4
771 ;;
772 netbsd386)
773 basic_machine=i386-unknown
774 os=-netbsd
775 ;;
776 netwinder)
777 basic_machine=armv4l-rebel
778 os=-linux
779 ;;
780 news | news700 | news800 | news900)
781 basic_machine=m68k-sony
782 os=-newsos
783 ;;
784 news1000)
785 basic_machine=m68030-sony
786 os=-newsos
787 ;;
788 news-3600 | risc-news)
789 basic_machine=mips-sony
790 os=-newsos
791 ;;
792 necv70)
793 basic_machine=v70-nec
794 os=-sysv
795 ;;
796 next | m*-next )
797 basic_machine=m68k-next
798 case $os in
799 -nextstep* )
800 ;;
801 -ns2*)
802 os=-nextstep2
803 ;;
804 *)
805 os=-nextstep3
806 ;;
807 esac
808 ;;
809 nh3000)
810 basic_machine=m68k-harris
811 os=-cxux
812 ;;
813 nh[45]000)
814 basic_machine=m88k-harris
815 os=-cxux
816 ;;
817 nindy960)
818 basic_machine=i960-intel
819 os=-nindy
820 ;;
821 mon960)
822 basic_machine=i960-intel
823 os=-mon960
824 ;;
825 nonstopux)
826 basic_machine=mips-compaq
827 os=-nonstopux
828 ;;
829 np1)
830 basic_machine=np1-gould
831 ;;
832 nsr-tandem)
833 basic_machine=nsr-tandem
834 ;;
835 op50n-* | op60c-*)
836 basic_machine=hppa1.1-oki
837 os=-proelf
838 ;;
839 openrisc | openrisc-*)
840 basic_machine=or32-unknown
841 ;;
842 os400)
843 basic_machine=powerpc-ibm
844 os=-os400
845 ;;
846 OSE68000 | ose68000)
847 basic_machine=m68000-ericsson
848 os=-ose
849 ;;
850 os68k)
851 basic_machine=m68k-none
852 os=-os68k
853 ;;
854 pa-hitachi)
855 basic_machine=hppa1.1-hitachi
856 os=-hiuxwe2
857 ;;
858 paragon)
859 basic_machine=i860-intel
860 os=-osf
861 ;;
862 parisc)
863 basic_machine=hppa-unknown
864 os=-linux
865 ;;
866 parisc-*)
867 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
868 os=-linux
869 ;;
870 pbd)
871 basic_machine=sparc-tti
872 ;;
873 pbb)
874 basic_machine=m68k-tti
875 ;;
876 pc532 | pc532-*)
877 basic_machine=ns32k-pc532
878 ;;
879 pc98)
880 basic_machine=i386-pc
881 ;;
882 pc98-*)
883 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
884 ;;
885 pentium | p5 | k5 | k6 | nexgen | viac3)
886 basic_machine=i586-pc
887 ;;
888 pentiumpro | p6 | 6x86 | athlon | athlon_*)
889 basic_machine=i686-pc
890 ;;
891 pentiumii | pentium2 | pentiumiii | pentium3)
892 basic_machine=i686-pc
893 ;;
894 pentium4)
895 basic_machine=i786-pc
896 ;;
897 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
898 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
899 ;;
900 pentiumpro-* | p6-* | 6x86-* | athlon-*)
901 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
902 ;;
903 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
904 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
905 ;;
906 pentium4-*)
907 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
908 ;;
909 pn)
910 basic_machine=pn-gould
911 ;;
912 power) basic_machine=power-ibm
913 ;;
914 ppc) basic_machine=powerpc-unknown
915 ;;
916 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
917 ;;
918 ppcle | powerpclittle | ppc-le | powerpc-little)
919 basic_machine=powerpcle-unknown
920 ;;
921 ppcle-* | powerpclittle-*)
922 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
923 ;;
924 ppc64) basic_machine=powerpc64-unknown
925 ;;
926 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
927 ;;
928 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
929 basic_machine=powerpc64le-unknown
930 ;;
931 ppc64le-* | powerpc64little-*)
932 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
933 ;;
934 ps2)
935 basic_machine=i386-ibm
936 ;;
937 pw32)
938 basic_machine=i586-unknown
939 os=-pw32
940 ;;
941 rdos)
942 basic_machine=i386-pc
943 os=-rdos
944 ;;
945 rom68k)
946 basic_machine=m68k-rom68k
947 os=-coff
948 ;;
949 rm[46]00)
950 basic_machine=mips-siemens
951 ;;
952 rtpc | rtpc-*)
953 basic_machine=romp-ibm
954 ;;
955 s390 | s390-*)
956 basic_machine=s390-ibm
957 ;;
958 s390x | s390x-*)
959 basic_machine=s390x-ibm
960 ;;
961 sa29200)
962 basic_machine=a29k-amd
963 os=-udi
964 ;;
965 sb1)
966 basic_machine=mipsisa64sb1-unknown
967 ;;
968 sb1el)
969 basic_machine=mipsisa64sb1el-unknown
970 ;;
971 sde)
972 basic_machine=mipsisa32-sde
973 os=-elf
974 ;;
975 sei)
976 basic_machine=mips-sei
977 os=-seiux
978 ;;
979 sequent)
980 basic_machine=i386-sequent
981 ;;
982 sh)
983 basic_machine=sh-hitachi
984 os=-hms
985 ;;
986 sh5el)
987 basic_machine=sh5le-unknown
988 ;;
989 sh64)
990 basic_machine=sh64-unknown
991 ;;
992 sparclite-wrs | simso-wrs)
993 basic_machine=sparclite-wrs
994 os=-vxworks
995 ;;
996 sps7)
997 basic_machine=m68k-bull
998 os=-sysv2
999 ;;
1000 spur)
1001 basic_machine=spur-unknown
1002 ;;
1003 st2000)
1004 basic_machine=m68k-tandem
1005 ;;
1006 stratus)
1007 basic_machine=i860-stratus
1008 os=-sysv4
1009 ;;
1010 sun2)
1011 basic_machine=m68000-sun
1012 ;;
1013 sun2os3)
1014 basic_machine=m68000-sun
1015 os=-sunos3
1016 ;;
1017 sun2os4)
1018 basic_machine=m68000-sun
1019 os=-sunos4
1020 ;;
1021 sun3os3)
1022 basic_machine=m68k-sun
1023 os=-sunos3
1024 ;;
1025 sun3os4)
1026 basic_machine=m68k-sun
1027 os=-sunos4
1028 ;;
1029 sun4os3)
1030 basic_machine=sparc-sun
1031 os=-sunos3
1032 ;;
1033 sun4os4)
1034 basic_machine=sparc-sun
1035 os=-sunos4
1036 ;;
1037 sun4sol2)
1038 basic_machine=sparc-sun
1039 os=-solaris2
1040 ;;
1041 sun3 | sun3-*)
1042 basic_machine=m68k-sun
1043 ;;
1044 sun4)
1045 basic_machine=sparc-sun
1046 ;;
1047 sun386 | sun386i | roadrunner)
1048 basic_machine=i386-sun
1049 ;;
1050 sv1)
1051 basic_machine=sv1-cray
1052 os=-unicos
1053 ;;
1054 symmetry)
1055 basic_machine=i386-sequent
1056 os=-dynix
1057 ;;
1058 t3e)
1059 basic_machine=alphaev5-cray
1060 os=-unicos
1061 ;;
1062 t90)
1063 basic_machine=t90-cray
1064 os=-unicos
1065 ;;
1066 tic54x | c54x*)
1067 basic_machine=tic54x-unknown
1068 os=-coff
1069 ;;
1070 tic55x | c55x*)
1071 basic_machine=tic55x-unknown
1072 os=-coff
1073 ;;
1074 tic6x | c6x*)
1075 basic_machine=tic6x-unknown
1076 os=-coff
1077 ;;
1078 tile*)
1079 basic_machine=tile-unknown
1080 os=-linux-gnu
1081 ;;
1082 tx39)
1083 basic_machine=mipstx39-unknown
1084 ;;
1085 tx39el)
1086 basic_machine=mipstx39el-unknown
1087 ;;
1088 toad1)
1089 basic_machine=pdp10-xkl
1090 os=-tops20
1091 ;;
1092 tower | tower-32)
1093 basic_machine=m68k-ncr
1094 ;;
1095 tpf)
1096 basic_machine=s390x-ibm
1097 os=-tpf
1098 ;;
1099 udi29k)
1100 basic_machine=a29k-amd
1101 os=-udi
1102 ;;
1103 ultra3)
1104 basic_machine=a29k-nyu
1105 os=-sym1
1106 ;;
1107 v810 | necv810)
1108 basic_machine=v810-nec
1109 os=-none
1110 ;;
1111 vaxv)
1112 basic_machine=vax-dec
1113 os=-sysv
1114 ;;
1115 vms)
1116 basic_machine=vax-dec
1117 os=-vms
1118 ;;
1119 vpp*|vx|vx-*)
1120 basic_machine=f301-fujitsu
1121 ;;
1122 vxworks960)
1123 basic_machine=i960-wrs
1124 os=-vxworks
1125 ;;
1126 vxworks68)
1127 basic_machine=m68k-wrs
1128 os=-vxworks
1129 ;;
1130 vxworks29k)
1131 basic_machine=a29k-wrs
1132 os=-vxworks
1133 ;;
1134 w65*)
1135 basic_machine=w65-wdc
1136 os=-none
1137 ;;
1138 w89k-*)
1139 basic_machine=hppa1.1-winbond
1140 os=-proelf
1141 ;;
1142 xbox)
1143 basic_machine=i686-pc
1144 os=-mingw32
1145 ;;
1146 xps | xps100)
1147 basic_machine=xps100-honeywell
1148 ;;
1149 ymp)
1150 basic_machine=ymp-cray
1151 os=-unicos
1152 ;;
1153 z8k-*-coff)
1154 basic_machine=z8k-unknown
1155 os=-sim
1156 ;;
1157 z80-*-coff)
1158 basic_machine=z80-unknown
1159 os=-sim
1160 ;;
1161 none)
1162 basic_machine=none-none
1163 os=-none
1164 ;;
1165
1166 # Here we handle the default manufacturer of certain CPU types. It is in
1167 # some cases the only manufacturer, in others, it is the most popular.
1168 w89k)
1169 basic_machine=hppa1.1-winbond
1170 ;;
1171 op50n)
1172 basic_machine=hppa1.1-oki
1173 ;;
1174 op60c)
1175 basic_machine=hppa1.1-oki
1176 ;;
1177 romp)
1178 basic_machine=romp-ibm
1179 ;;
1180 mmix)
1181 basic_machine=mmix-knuth
1182 ;;
1183 rs6000)
1184 basic_machine=rs6000-ibm
1185 ;;
1186 vax)
1187 basic_machine=vax-dec
1188 ;;
1189 pdp10)
1190 # there are many clones, so DEC is not a safe bet
1191 basic_machine=pdp10-unknown
1192 ;;
1193 pdp11)
1194 basic_machine=pdp11-dec
1195 ;;
1196 we32k)
1197 basic_machine=we32k-att
1198 ;;
1199 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1200 basic_machine=sh-unknown
1201 ;;
1202 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1203 basic_machine=sparc-sun
1204 ;;
1205 cydra)
1206 basic_machine=cydra-cydrome
1207 ;;
1208 orion)
1209 basic_machine=orion-highlevel
1210 ;;
1211 orion105)
1212 basic_machine=clipper-highlevel
1213 ;;
1214 mac | mpw | mac-mpw)
1215 basic_machine=m68k-apple
1216 ;;
1217 pmac | pmac-mpw)
1218 basic_machine=powerpc-apple
1219 ;;
1220 *-unknown)
1221 # Make sure to match an already-canonicalized machine name.
1222 ;;
1223 *)
1224 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1225 exit 1
1226 ;;
1227 esac
1228
1229 # Here we canonicalize certain aliases for manufacturers.
1230 case $basic_machine in
1231 *-digital*)
1232 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1233 ;;
1234 *-commodore*)
1235 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1236 ;;
1237 *)
1238 ;;
1239 esac
1240
1241 # Decode manufacturer-specific aliases for certain operating systems.
1242
1243 if [ x"$os" != x"" ]
1244 then
1245 case $os in
1246 # First match some system type aliases
1247 # that might get confused with valid system types.
1248 # -solaris* is a basic system type, with this one exception.
1249 -solaris1 | -solaris1.*)
1250 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1251 ;;
1252 -solaris)
1253 os=-solaris2
1254 ;;
1255 -svr4*)
1256 os=-sysv4
1257 ;;
1258 -unixware*)
1259 os=-sysv4.2uw
1260 ;;
1261 -gnu/linux*)
1262 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1263 ;;
1264 # First accept the basic system types.
1265 # The portable systems comes first.
1266 # Each alternative MUST END IN A *, to match a version number.
1267 # -sysv* is not here because it comes later, after sysvr4.
1268 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1269 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1270 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1271 | -kopensolaris* \
1272 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1273 | -aos* | -aros* \
1274 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1275 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1276 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1277 | -openbsd* | -solidbsd* \
1278 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1279 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1280 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1281 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1282 | -chorusos* | -chorusrdb* | -cegcc* \
1283 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1284 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1285 | -uxpv* | -beos* | -mpeix* | -udk* \
1286 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1287 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1288 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1289 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1290 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1291 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1292 | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1293 # Remember, each alternative MUST END IN *, to match a version number.
1294 ;;
1295 -qnx*)
1296 case $basic_machine in
1297 x86-* | i*86-*)
1298 ;;
1299 *)
1300 os=-nto$os
1301 ;;
1302 esac
1303 ;;
1304 -nto-qnx*)
1305 ;;
1306 -nto*)
1307 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1308 ;;
1309 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1310 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1311 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1312 ;;
1313 -mac*)
1314 os=`echo $os | sed -e 's|mac|macos|'`
1315 ;;
1316 -linux-dietlibc)
1317 os=-linux-dietlibc
1318 ;;
1319 -linux*)
1320 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1321 ;;
1322 -sunos5*)
1323 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1324 ;;
1325 -sunos6*)
1326 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1327 ;;
1328 -opened*)
1329 os=-openedition
1330 ;;
1331 -os400*)
1332 os=-os400
1333 ;;
1334 -wince*)
1335 os=-wince
1336 ;;
1337 -osfrose*)
1338 os=-osfrose
1339 ;;
1340 -osf*)
1341 os=-osf
1342 ;;
1343 -utek*)
1344 os=-bsd
1345 ;;
1346 -dynix*)
1347 os=-bsd
1348 ;;
1349 -acis*)
1350 os=-aos
1351 ;;
1352 -atheos*)
1353 os=-atheos
1354 ;;
1355 -syllable*)
1356 os=-syllable
1357 ;;
1358 -386bsd)
1359 os=-bsd
1360 ;;
1361 -ctix* | -uts*)
1362 os=-sysv
1363 ;;
1364 -nova*)
1365 os=-rtmk-nova
1366 ;;
1367 -ns2 )
1368 os=-nextstep2
1369 ;;
1370 -nsk*)
1371 os=-nsk
1372 ;;
1373 # Preserve the version number of sinix5.
1374 -sinix5.*)
1375 os=`echo $os | sed -e 's|sinix|sysv|'`
1376 ;;
1377 -sinix*)
1378 os=-sysv4
1379 ;;
1380 -tpf*)
1381 os=-tpf
1382 ;;
1383 -triton*)
1384 os=-sysv3
1385 ;;
1386 -oss*)
1387 os=-sysv3
1388 ;;
1389 -svr4)
1390 os=-sysv4
1391 ;;
1392 -svr3)
1393 os=-sysv3
1394 ;;
1395 -sysvr4)
1396 os=-sysv4
1397 ;;
1398 # This must come after -sysvr4.
1399 -sysv*)
1400 ;;
1401 -ose*)
1402 os=-ose
1403 ;;
1404 -es1800*)
1405 os=-ose
1406 ;;
1407 -xenix)
1408 os=-xenix
1409 ;;
1410 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1411 os=-mint
1412 ;;
1413 -aros*)
1414 os=-aros
1415 ;;
1416 -kaos*)
1417 os=-kaos
1418 ;;
1419 -zvmoe)
1420 os=-zvmoe
1421 ;;
1422 -dicos*)
1423 os=-dicos
1424 ;;
1425 -none)
1426 ;;
1427 *)
1428 # Get rid of the `-' at the beginning of $os.
1429 os=`echo $os | sed 's/[^-]*-//'`
1430 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1431 exit 1
1432 ;;
1433 esac
1434 else
1435
1436 # Here we handle the default operating systems that come with various machines.
1437 # The value should be what the vendor currently ships out the door with their
1438 # machine or put another way, the most popular os provided with the machine.
1439
1440 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1441 # "-sun"), then you have to tell the case statement up towards the top
1442 # that MANUFACTURER isn't an operating system. Otherwise, code above
1443 # will signal an error saying that MANUFACTURER isn't an operating
1444 # system, and we'll never get to this point.
1445
1446 case $basic_machine in
1447 score-*)
1448 os=-elf
1449 ;;
1450 spu-*)
1451 os=-elf
1452 ;;
1453 *-acorn)
1454 os=-riscix1.2
1455 ;;
1456 arm*-rebel)
1457 os=-linux
1458 ;;
1459 arm*-semi)
1460 os=-aout
1461 ;;
1462 c4x-* | tic4x-*)
1463 os=-coff
1464 ;;
1465 # This must come before the *-dec entry.
1466 pdp10-*)
1467 os=-tops20
1468 ;;
1469 pdp11-*)
1470 os=-none
1471 ;;
1472 *-dec | vax-*)
1473 os=-ultrix4.2
1474 ;;
1475 m68*-apollo)
1476 os=-domain
1477 ;;
1478 i386-sun)
1479 os=-sunos4.0.2
1480 ;;
1481 m68000-sun)
1482 os=-sunos3
1483 # This also exists in the configure program, but was not the
1484 # default.
1485 # os=-sunos4
1486 ;;
1487 m68*-cisco)
1488 os=-aout
1489 ;;
1490 mep-*)
1491 os=-elf
1492 ;;
1493 mips*-cisco)
1494 os=-elf
1495 ;;
1496 mips*-*)
1497 os=-elf
1498 ;;
1499 or32-*)
1500 os=-coff
1501 ;;
1502 *-tti) # must be before sparc entry or we get the wrong os.
1503 os=-sysv3
1504 ;;
1505 sparc-* | *-sun)
1506 os=-sunos4.1.1
1507 ;;
1508 *-be)
1509 os=-beos
1510 ;;
1511 *-haiku)
1512 os=-haiku
1513 ;;
1514 *-ibm)
1515 os=-aix
1516 ;;
1517 *-knuth)
1518 os=-mmixware
1519 ;;
1520 *-wec)
1521 os=-proelf
1522 ;;
1523 *-winbond)
1524 os=-proelf
1525 ;;
1526 *-oki)
1527 os=-proelf
1528 ;;
1529 *-hp)
1530 os=-hpux
1531 ;;
1532 *-hitachi)
1533 os=-hiux
1534 ;;
1535 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1536 os=-sysv
1537 ;;
1538 *-cbm)
1539 os=-amigaos
1540 ;;
1541 *-dg)
1542 os=-dgux
1543 ;;
1544 *-dolphin)
1545 os=-sysv3
1546 ;;
1547 m68k-ccur)
1548 os=-rtu
1549 ;;
1550 m88k-omron*)
1551 os=-luna
1552 ;;
1553 *-next )
1554 os=-nextstep
1555 ;;
1556 *-sequent)
1557 os=-ptx
1558 ;;
1559 *-crds)
1560 os=-unos
1561 ;;
1562 *-ns)
1563 os=-genix
1564 ;;
1565 i370-*)
1566 os=-mvs
1567 ;;
1568 *-next)
1569 os=-nextstep3
1570 ;;
1571 *-gould)
1572 os=-sysv
1573 ;;
1574 *-highlevel)
1575 os=-bsd
1576 ;;
1577 *-encore)
1578 os=-bsd
1579 ;;
1580 *-sgi)
1581 os=-irix
1582 ;;
1583 *-siemens)
1584 os=-sysv4
1585 ;;
1586 *-masscomp)
1587 os=-rtu
1588 ;;
1589 f30[01]-fujitsu | f700-fujitsu)
1590 os=-uxpv
1591 ;;
1592 *-rom68k)
1593 os=-coff
1594 ;;
1595 *-*bug)
1596 os=-coff
1597 ;;
1598 *-apple)
1599 os=-macos
1600 ;;
1601 *-atari*)
1602 os=-mint
1603 ;;
1604 *)
1605 os=-none
1606 ;;
1607 esac
1608 fi
1609
1610 # Here we handle the case where we know the os, and the CPU type, but not the
1611 # manufacturer. We pick the logical manufacturer.
1612 vendor=unknown
1613 case $basic_machine in
1614 *-unknown)
1615 case $os in
1616 -riscix*)
1617 vendor=acorn
1618 ;;
1619 -sunos*)
1620 vendor=sun
1621 ;;
1622 -cnk*|-aix*)
1623 vendor=ibm
1624 ;;
1625 -beos*)
1626 vendor=be
1627 ;;
1628 -hpux*)
1629 vendor=hp
1630 ;;
1631 -mpeix*)
1632 vendor=hp
1633 ;;
1634 -hiux*)
1635 vendor=hitachi
1636 ;;
1637 -unos*)
1638 vendor=crds
1639 ;;
1640 -dgux*)
1641 vendor=dg
1642 ;;
1643 -luna*)
1644 vendor=omron
1645 ;;
1646 -genix*)
1647 vendor=ns
1648 ;;
1649 -mvs* | -opened*)
1650 vendor=ibm
1651 ;;
1652 -os400*)
1653 vendor=ibm
1654 ;;
1655 -ptx*)
1656 vendor=sequent
1657 ;;
1658 -tpf*)
1659 vendor=ibm
1660 ;;
1661 -vxsim* | -vxworks* | -windiss*)
1662 vendor=wrs
1663 ;;
1664 -aux*)
1665 vendor=apple
1666 ;;
1667 -hms*)
1668 vendor=hitachi
1669 ;;
1670 -mpw* | -macos*)
1671 vendor=apple
1672 ;;
1673 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1674 vendor=atari
1675 ;;
1676 -vos*)
1677 vendor=stratus
1678 ;;
1679 esac
1680 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1681 ;;
1682 esac
1683
1684 echo $basic_machine$os
1685 exit
1686
1687 # Local variables:
1688 # eval: (add-hook 'write-file-hooks 'time-stamp)
1689 # time-stamp-start: "timestamp='"
1690 # time-stamp-format: "%:y-%02m-%02d"
1691 # time-stamp-end: "'"
1692 # End:
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.65 for ssh-contact 0.1.
3 #
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
7 # Inc.
8 #
9 #
10 # This configure script is free software; the Free Software Foundation
11 # gives unlimited permission to copy, distribute and modify it.
12 ## -------------------- ##
13 ## M4sh Initialization. ##
14 ## -------------------- ##
15
16 # Be more Bourne compatible
17 DUALCASE=1; export DUALCASE # for MKS sh
18 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19 emulate sh
20 NULLCMD=:
21 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
24 setopt NO_GLOB_SUBST
25 else
26 case `(set -o) 2>/dev/null` in #(
27 *posix*) :
28 set -o posix ;; #(
29 *) :
30 ;;
31 esac
32 fi
33
34
35 as_nl='
36 '
37 export as_nl
38 # Printing a long string crashes Solaris 7 /usr/bin/printf.
39 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
42 # Prefer a ksh shell builtin over an external printf program on Solaris,
43 # but without wasting forks for bash or zsh.
44 if test -z "$BASH_VERSION$ZSH_VERSION" \
45 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
46 as_echo='print -r --'
47 as_echo_n='print -rn --'
48 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='printf %s\n'
50 as_echo_n='printf %s'
51 else
52 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
54 as_echo_n='/usr/ucb/echo -n'
55 else
56 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
57 as_echo_n_body='eval
58 arg=$1;
59 case $arg in #(
60 *"$as_nl"*)
61 expr "X$arg" : "X\\(.*\\)$as_nl";
62 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
63 esac;
64 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65 '
66 export as_echo_n_body
67 as_echo_n='sh -c $as_echo_n_body as_echo'
68 fi
69 export as_echo_body
70 as_echo='sh -c $as_echo_body as_echo'
71 fi
72
73 # The user is always right.
74 if test "${PATH_SEPARATOR+set}" != set; then
75 PATH_SEPARATOR=:
76 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
77 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
78 PATH_SEPARATOR=';'
79 }
80 fi
81
82
83 # IFS
84 # We need space, tab and new line, in precisely that order. Quoting is
85 # there to prevent editors from complaining about space-tab.
86 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
87 # splitting by setting IFS to empty value.)
88 IFS=" "" $as_nl"
89
90 # Find who we are. Look in the path if we contain no directory separator.
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 if test "x$CONFIG_SHELL" = x; then
136 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
137 emulate sh
138 NULLCMD=:
139 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
140 # is contrary to our usage. Disable this feature.
141 alias -g '\${1+\"\$@\"}'='\"\$@\"'
142 setopt NO_GLOB_SUBST
143 else
144 case \`(set -o) 2>/dev/null\` in #(
145 *posix*) :
146 set -o posix ;; #(
147 *) :
148 ;;
149 esac
150 fi
151 "
152 as_required="as_fn_return () { (exit \$1); }
153 as_fn_success () { as_fn_return 0; }
154 as_fn_failure () { as_fn_return 1; }
155 as_fn_ret_success () { return 0; }
156 as_fn_ret_failure () { return 1; }
157
158 exitcode=0
159 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
160 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
161 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
162 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
163 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
164
165 else
166 exitcode=1; echo positional parameters were not saved.
167 fi
168 test x\$exitcode = x0 || exit 1"
169 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
170 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
171 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
172 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
173 test \$(( 1 + 1 )) = 2 || exit 1"
174 if (eval "$as_required") 2>/dev/null; then :
175 as_have_required=yes
176 else
177 as_have_required=no
178 fi
179 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
180
181 else
182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
183 as_found=false
184 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
185 do
186 IFS=$as_save_IFS
187 test -z "$as_dir" && as_dir=.
188 as_found=:
189 case $as_dir in #(
190 /*)
191 for as_base in sh bash ksh sh5; do
192 # Try only shells that exist, to save several forks.
193 as_shell=$as_dir/$as_base
194 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
195 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
196 CONFIG_SHELL=$as_shell as_have_required=yes
197 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
198 break 2
199 fi
200 fi
201 done;;
202 esac
203 as_found=false
204 done
205 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
206 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
207 CONFIG_SHELL=$SHELL as_have_required=yes
208 fi; }
209 IFS=$as_save_IFS
210
211
212 if test "x$CONFIG_SHELL" != x; then :
213 # We cannot yet assume a decent shell, so we have to provide a
214 # neutralization value for shells without unset; and this also
215 # works around shells that cannot unset nonexistent variables.
216 BASH_ENV=/dev/null
217 ENV=/dev/null
218 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
219 export CONFIG_SHELL
220 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
221 fi
222
223 if test x$as_have_required = xno; then :
224 $as_echo "$0: This script requires a shell more modern than all"
225 $as_echo "$0: the shells that I found on your system."
226 if test x${ZSH_VERSION+set} = xset ; then
227 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
228 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
229 else
230 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
231 $0: including any error possibly output before this
232 $0: message. Then install a modern shell, or manually run
233 $0: the script under such a shell if you do have one."
234 fi
235 exit 1
236 fi
237 fi
238 fi
239 SHELL=${CONFIG_SHELL-/bin/sh}
240 export SHELL
241 # Unset more variables known to interfere with behavior of common tools.
242 CLICOLOR_FORCE= GREP_OPTIONS=
243 unset CLICOLOR_FORCE GREP_OPTIONS
244
245 ## --------------------- ##
246 ## M4sh Shell Functions. ##
247 ## --------------------- ##
248 # as_fn_unset VAR
249 # ---------------
250 # Portably unset VAR.
251 as_fn_unset ()
252 {
253 { eval $1=; unset $1;}
254 }
255 as_unset=as_fn_unset
256
257 # as_fn_set_status STATUS
258 # -----------------------
259 # Set $? to STATUS, without forking.
260 as_fn_set_status ()
261 {
262 return $1
263 } # as_fn_set_status
264
265 # as_fn_exit STATUS
266 # -----------------
267 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
268 as_fn_exit ()
269 {
270 set +e
271 as_fn_set_status $1
272 exit $1
273 } # as_fn_exit
274
275 # as_fn_mkdir_p
276 # -------------
277 # Create "$as_dir" as a directory, including parents if necessary.
278 as_fn_mkdir_p ()
279 {
280
281 case $as_dir in #(
282 -*) as_dir=./$as_dir;;
283 esac
284 test -d "$as_dir" || eval $as_mkdir_p || {
285 as_dirs=
286 while :; do
287 case $as_dir in #(
288 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
289 *) as_qdir=$as_dir;;
290 esac
291 as_dirs="'$as_qdir' $as_dirs"
292 as_dir=`$as_dirname -- "$as_dir" ||
293 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
294 X"$as_dir" : 'X\(//\)[^/]' \| \
295 X"$as_dir" : 'X\(//\)$' \| \
296 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
297 $as_echo X"$as_dir" |
298 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
299 s//\1/
300 q
301 }
302 /^X\(\/\/\)[^/].*/{
303 s//\1/
304 q
305 }
306 /^X\(\/\/\)$/{
307 s//\1/
308 q
309 }
310 /^X\(\/\).*/{
311 s//\1/
312 q
313 }
314 s/.*/./; q'`
315 test -d "$as_dir" && break
316 done
317 test -z "$as_dirs" || eval "mkdir $as_dirs"
318 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
319
320
321 } # as_fn_mkdir_p
322 # as_fn_append VAR VALUE
323 # ----------------------
324 # Append the text in VALUE to the end of the definition contained in VAR. Take
325 # advantage of any shell optimizations that allow amortized linear growth over
326 # repeated appends, instead of the typical quadratic growth present in naive
327 # implementations.
328 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
329 eval 'as_fn_append ()
330 {
331 eval $1+=\$2
332 }'
333 else
334 as_fn_append ()
335 {
336 eval $1=\$$1\$2
337 }
338 fi # as_fn_append
339
340 # as_fn_arith ARG...
341 # ------------------
342 # Perform arithmetic evaluation on the ARGs, and store the result in the
343 # global $as_val. Take advantage of shells that can avoid forks. The arguments
344 # must be portable across $(()) and expr.
345 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
346 eval 'as_fn_arith ()
347 {
348 as_val=$(( $* ))
349 }'
350 else
351 as_fn_arith ()
352 {
353 as_val=`expr "$@" || test $? -eq 1`
354 }
355 fi # as_fn_arith
356
357
358 # as_fn_error ERROR [LINENO LOG_FD]
359 # ---------------------------------
360 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
361 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
362 # script with status $?, using 1 if that was 0.
363 as_fn_error ()
364 {
365 as_status=$?; test $as_status -eq 0 && as_status=1
366 if test "$3"; then
367 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
368 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
369 fi
370 $as_echo "$as_me: error: $1" >&2
371 as_fn_exit $as_status
372 } # as_fn_error
373
374 if expr a : '\(a\)' >/dev/null 2>&1 &&
375 test "X`expr 00001 : '.*\(...\)'`" = X001; then
376 as_expr=expr
377 else
378 as_expr=false
379 fi
380
381 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
382 as_basename=basename
383 else
384 as_basename=false
385 fi
386
387 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
388 as_dirname=dirname
389 else
390 as_dirname=false
391 fi
392
393 as_me=`$as_basename -- "$0" ||
394 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
395 X"$0" : 'X\(//\)$' \| \
396 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
397 $as_echo X/"$0" |
398 sed '/^.*\/\([^/][^/]*\)\/*$/{
399 s//\1/
400 q
401 }
402 /^X\/\(\/\/\)$/{
403 s//\1/
404 q
405 }
406 /^X\/\(\/\).*/{
407 s//\1/
408 q
409 }
410 s/.*/./; q'`
411
412 # Avoid depending upon Character Ranges.
413 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
414 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
415 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
416 as_cr_digits='0123456789'
417 as_cr_alnum=$as_cr_Letters$as_cr_digits
418
419
420 as_lineno_1=$LINENO as_lineno_1a=$LINENO
421 as_lineno_2=$LINENO as_lineno_2a=$LINENO
422 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
423 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
424 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
425 sed -n '
426 p
427 /[$]LINENO/=
428 ' <$as_myself |
429 sed '
430 s/[$]LINENO.*/&-/
431 t lineno
432 b
433 :lineno
434 N
435 :loop
436 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
437 t loop
438 s/-\n.*//
439 ' >$as_me.lineno &&
440 chmod +x "$as_me.lineno" ||
441 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
442
443 # Don't try to exec as it changes $[0], causing all sort of problems
444 # (the dirname of $[0] is not the place where we might find the
445 # original and so on. Autoconf is especially sensitive to this).
446 . "./$as_me.lineno"
447 # Exit status is that of the last command.
448 exit
449 }
450
451 ECHO_C= ECHO_N= ECHO_T=
452 case `echo -n x` in #(((((
453 -n*)
454 case `echo 'xy\c'` in
455 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
456 xy) ECHO_C='\c';;
457 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
458 ECHO_T=' ';;
459 esac;;
460 *)
461 ECHO_N='-n';;
462 esac
463
464 rm -f conf$$ conf$$.exe conf$$.file
465 if test -d conf$$.dir; then
466 rm -f conf$$.dir/conf$$.file
467 else
468 rm -f conf$$.dir
469 mkdir conf$$.dir 2>/dev/null
470 fi
471 if (echo >conf$$.file) 2>/dev/null; then
472 if ln -s conf$$.file conf$$ 2>/dev/null; then
473 as_ln_s='ln -s'
474 # ... but there are two gotchas:
475 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
476 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
477 # In both cases, we have to default to `cp -p'.
478 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
479 as_ln_s='cp -p'
480 elif ln conf$$.file conf$$ 2>/dev/null; then
481 as_ln_s=ln
482 else
483 as_ln_s='cp -p'
484 fi
485 else
486 as_ln_s='cp -p'
487 fi
488 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
489 rmdir conf$$.dir 2>/dev/null
490
491 if mkdir -p . 2>/dev/null; then
492 as_mkdir_p='mkdir -p "$as_dir"'
493 else
494 test -d ./-p && rmdir ./-p
495 as_mkdir_p=false
496 fi
497
498 if test -x / >/dev/null 2>&1; then
499 as_test_x='test -x'
500 else
501 if ls -dL / >/dev/null 2>&1; then
502 as_ls_L_option=L
503 else
504 as_ls_L_option=
505 fi
506 as_test_x='
507 eval sh -c '\''
508 if test -d "$1"; then
509 test -d "$1/.";
510 else
511 case $1 in #(
512 -*)set "./$1";;
513 esac;
514 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
515 ???[sx]*):;;*)false;;esac;fi
516 '\'' sh
517 '
518 fi
519 as_executable_p=$as_test_x
520
521 # Sed expression to map a string onto a valid CPP name.
522 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
523
524 # Sed expression to map a string onto a valid variable name.
525 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
526
527
528
529 # Check that we are running under the correct shell.
530 SHELL=${CONFIG_SHELL-/bin/sh}
531
532 case X$lt_ECHO in
533 X*--fallback-echo)
534 # Remove one level of quotation (which was required for Make).
535 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
536 ;;
537 esac
538
539 ECHO=${lt_ECHO-echo}
540 if test "X$1" = X--no-reexec; then
541 # Discard the --no-reexec flag, and continue.
542 shift
543 elif test "X$1" = X--fallback-echo; then
544 # Avoid inline document here, it may be left over
545 :
546 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
547 # Yippee, $ECHO works!
548 :
549 else
550 # Restart under the correct shell.
551 exec $SHELL "$0" --no-reexec ${1+"$@"}
552 fi
553
554 if test "X$1" = X--fallback-echo; then
555 # used as fallback echo
556 shift
557 cat <<_LT_EOF
558 $*
559 _LT_EOF
560 exit 0
561 fi
562
563 # The HP-UX ksh and POSIX shell print the target directory to stdout
564 # if CDPATH is set.
565 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
566
567 if test -z "$lt_ECHO"; then
568 if test "X${echo_test_string+set}" != Xset; then
569 # find a string as large as possible, as long as the shell can cope with it
570 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
571 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
572 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
573 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
574 then
575 break
576 fi
577 done
578 fi
579
580 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
581 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
582 test "X$echo_testing_string" = "X$echo_test_string"; then
583 :
584 else
585 # The Solaris, AIX, and Digital Unix default echo programs unquote
586 # backslashes. This makes it impossible to quote backslashes using
587 # echo "$something" | sed 's/\\/\\\\/g'
588 #
589 # So, first we look for a working echo in the user's PATH.
590
591 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
592 for dir in $PATH /usr/ucb; do
593 IFS="$lt_save_ifs"
594 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
595 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
596 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
597 test "X$echo_testing_string" = "X$echo_test_string"; then
598 ECHO="$dir/echo"
599 break
600 fi
601 done
602 IFS="$lt_save_ifs"
603
604 if test "X$ECHO" = Xecho; then
605 # We didn't find a better echo, so look for alternatives.
606 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
607 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
608 test "X$echo_testing_string" = "X$echo_test_string"; then
609 # This shell has a builtin print -r that does the trick.
610 ECHO='print -r'
611 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
612 test "X$CONFIG_SHELL" != X/bin/ksh; then
613 # If we have ksh, try running configure again with it.
614 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
615 export ORIGINAL_CONFIG_SHELL
616 CONFIG_SHELL=/bin/ksh
617 export CONFIG_SHELL
618 exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
619 else
620 # Try using printf.
621 ECHO='printf %s\n'
622 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
623 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
624 test "X$echo_testing_string" = "X$echo_test_string"; then
625 # Cool, printf works
626 :
627 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
628 test "X$echo_testing_string" = 'X\t' &&
629 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
630 test "X$echo_testing_string" = "X$echo_test_string"; then
631 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
632 export CONFIG_SHELL
633 SHELL="$CONFIG_SHELL"
634 export SHELL
635 ECHO="$CONFIG_SHELL $0 --fallback-echo"
636 elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
637 test "X$echo_testing_string" = 'X\t' &&
638 echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
639 test "X$echo_testing_string" = "X$echo_test_string"; then
640 ECHO="$CONFIG_SHELL $0 --fallback-echo"
641 else
642 # maybe with a smaller string...
643 prev=:
644
645 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
646 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
647 then
648 break
649 fi
650 prev="$cmd"
651 done
652
653 if test "$prev" != 'sed 50q "$0"'; then
654 echo_test_string=`eval $prev`
655 export echo_test_string
656 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
657 else
658 # Oops. We lost completely, so just stick with echo.
659 ECHO=echo
660 fi
661 fi
662 fi
663 fi
664 fi
665 fi
666
667 # Copy echo and quote the copy suitably for passing to libtool from
668 # the Makefile, instead of quoting the original, which is used later.
669 lt_ECHO=$ECHO
670 if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
671 lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
672 fi
673
674
675
676
677 test -n "$DJDIR" || exec 7<&0 </dev/null
678 exec 6>&1
679
680 # Name of the host.
681 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
682 # so uname gets run too.
683 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
684
685 #
686 # Initializations.
687 #
688 ac_default_prefix=/usr/local
689 ac_clean_files=
690 ac_config_libobj_dir=.
691 LIBOBJS=
692 cross_compiling=no
693 subdirs=
694 MFLAGS=
695 MAKEFLAGS=
696
697 # Identity of this package.
698 PACKAGE_NAME='ssh-contact'
699 PACKAGE_TARNAME='ssh-contact'
700 PACKAGE_VERSION='0.1'
701 PACKAGE_STRING='ssh-contact 0.1'
702 PACKAGE_BUGREPORT=''
703 PACKAGE_URL=''
704
705 # Factoring default headers for most tests.
706 ac_includes_default="\
707 #include <stdio.h>
708 #ifdef HAVE_SYS_TYPES_H
709 # include <sys/types.h>
710 #endif
711 #ifdef HAVE_SYS_STAT_H
712 # include <sys/stat.h>
713 #endif
714 #ifdef STDC_HEADERS
715 # include <stdlib.h>
716 # include <stddef.h>
717 #else
718 # ifdef HAVE_STDLIB_H
719 # include <stdlib.h>
720 # endif
721 #endif
722 #ifdef HAVE_STRING_H
723 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
724 # include <memory.h>
725 # endif
726 # include <string.h>
727 #endif
728 #ifdef HAVE_STRINGS_H
729 # include <strings.h>
730 #endif
731 #ifdef HAVE_INTTYPES_H
732 # include <inttypes.h>
733 #endif
734 #ifdef HAVE_STDINT_H
735 # include <stdint.h>
736 #endif
737 #ifdef HAVE_UNISTD_H
738 # include <unistd.h>
739 #endif"
740
741 ac_subst_vars='am__EXEEXT_FALSE
742 am__EXEEXT_TRUE
743 LTLIBOBJS
744 LIBOBJS
745 SSH_CONTACT_LIBS
746 SSH_CONTACT_CFLAGS
747 PKG_CONFIG
748 OTOOL64
749 OTOOL
750 LIPO
751 NMEDIT
752 DSYMUTIL
753 lt_ECHO
754 RANLIB
755 AR
756 OBJDUMP
757 LN_S
758 NM
759 ac_ct_DUMPBIN
760 DUMPBIN
761 LD
762 FGREP
763 SED
764 host_os
765 host_vendor
766 host_cpu
767 host
768 build_os
769 build_vendor
770 build_cpu
771 build
772 LIBTOOL
773 EGREP
774 GREP
775 CPP
776 am__fastdepCC_FALSE
777 am__fastdepCC_TRUE
778 CCDEPMODE
779 AMDEPBACKSLASH
780 AMDEP_FALSE
781 AMDEP_TRUE
782 am__quote
783 am__include
784 DEPDIR
785 OBJEXT
786 EXEEXT
787 ac_ct_CC
788 CPPFLAGS
789 LDFLAGS
790 CFLAGS
791 CC
792 MAINT
793 MAINTAINER_MODE_FALSE
794 MAINTAINER_MODE_TRUE
795 am__untar
796 am__tar
797 AMTAR
798 am__leading_dot
799 SET_MAKE
800 AWK
801 mkdir_p
802 MKDIR_P
803 INSTALL_STRIP_PROGRAM
804 STRIP
805 install_sh
806 MAKEINFO
807 AUTOHEADER
808 AUTOMAKE
809 AUTOCONF
810 ACLOCAL
811 VERSION
812 PACKAGE
813 CYGPATH_W
814 am__isrc
815 INSTALL_DATA
816 INSTALL_SCRIPT
817 INSTALL_PROGRAM
818 AM_BACKSLASH
819 AM_DEFAULT_VERBOSITY
820 target_alias
821 host_alias
822 build_alias
823 LIBS
824 ECHO_T
825 ECHO_N
826 ECHO_C
827 DEFS
828 mandir
829 localedir
830 libdir
831 psdir
832 pdfdir
833 dvidir
834 htmldir
835 infodir
836 docdir
837 oldincludedir
838 includedir
839 localstatedir
840 sharedstatedir
841 sysconfdir
842 datadir
843 datarootdir
844 libexecdir
845 sbindir
846 bindir
847 program_transform_name
848 prefix
849 exec_prefix
850 PACKAGE_URL
851 PACKAGE_BUGREPORT
852 PACKAGE_STRING
853 PACKAGE_VERSION
854 PACKAGE_TARNAME
855 PACKAGE_NAME
856 PATH_SEPARATOR
857 SHELL'
858 ac_subst_files=''
859 ac_user_opts='
860 enable_option_checking
861 enable_silent_rules
862 enable_maintainer_mode
863 enable_dependency_tracking
864 enable_shared
865 enable_static
866 with_pic
867 enable_fast_install
868 with_gnu_ld
869 enable_libtool_lock
870 '
871 ac_precious_vars='build_alias
872 host_alias
873 target_alias
874 CC
875 CFLAGS
876 LDFLAGS
877 LIBS
878 CPPFLAGS
879 CPP
880 PKG_CONFIG
881 SSH_CONTACT_CFLAGS
882 SSH_CONTACT_LIBS'
883
884
885 # Initialize some variables set by options.
886 ac_init_help=
887 ac_init_version=false
888 ac_unrecognized_opts=
889 ac_unrecognized_sep=
890 # The variables have the same names as the options, with
891 # dashes changed to underlines.
892 cache_file=/dev/null
893 exec_prefix=NONE
894 no_create=
895 no_recursion=
896 prefix=NONE
897 program_prefix=NONE
898 program_suffix=NONE
899 program_transform_name=s,x,x,
900 silent=
901 site=
902 srcdir=
903 verbose=
904 x_includes=NONE
905 x_libraries=NONE
906
907 # Installation directory options.
908 # These are left unexpanded so users can "make install exec_prefix=/foo"
909 # and all the variables that are supposed to be based on exec_prefix
910 # by default will actually change.
911 # Use braces instead of parens because sh, perl, etc. also accept them.
912 # (The list follows the same order as the GNU Coding Standards.)
913 bindir='${exec_prefix}/bin'
914 sbindir='${exec_prefix}/sbin'
915 libexecdir='${exec_prefix}/libexec'
916 datarootdir='${prefix}/share'
917 datadir='${datarootdir}'
918 sysconfdir='${prefix}/etc'
919 sharedstatedir='${prefix}/com'
920 localstatedir='${prefix}/var'
921 includedir='${prefix}/include'
922 oldincludedir='/usr/include'
923 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
924 infodir='${datarootdir}/info'
925 htmldir='${docdir}'
926 dvidir='${docdir}'
927 pdfdir='${docdir}'
928 psdir='${docdir}'
929 libdir='${exec_prefix}/lib'
930 localedir='${datarootdir}/locale'
931 mandir='${datarootdir}/man'
932
933 ac_prev=
934 ac_dashdash=
935 for ac_option
936 do
937 # If the previous option needs an argument, assign it.
938 if test -n "$ac_prev"; then
939 eval $ac_prev=\$ac_option
940 ac_prev=
941 continue
942 fi
943
944 case $ac_option in
945 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
946 *) ac_optarg=yes ;;
947 esac
948
949 # Accept the important Cygnus configure options, so we can diagnose typos.
950
951 case $ac_dashdash$ac_option in
952 --)
953 ac_dashdash=yes ;;
954
955 -bindir | --bindir | --bindi | --bind | --bin | --bi)
956 ac_prev=bindir ;;
957 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
958 bindir=$ac_optarg ;;
959
960 -build | --build | --buil | --bui | --bu)
961 ac_prev=build_alias ;;
962 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
963 build_alias=$ac_optarg ;;
964
965 -cache-file | --cache-file | --cache-fil | --cache-fi \
966 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
967 ac_prev=cache_file ;;
968 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
969 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
970 cache_file=$ac_optarg ;;
971
972 --config-cache | -C)
973 cache_file=config.cache ;;
974
975 -datadir | --datadir | --datadi | --datad)
976 ac_prev=datadir ;;
977 -datadir=* | --datadir=* | --datadi=* | --datad=*)
978 datadir=$ac_optarg ;;
979
980 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
981 | --dataroo | --dataro | --datar)
982 ac_prev=datarootdir ;;
983 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
984 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
985 datarootdir=$ac_optarg ;;
986
987 -disable-* | --disable-*)
988 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
989 # Reject names that are not valid shell variable names.
990 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
991 as_fn_error "invalid feature name: $ac_useropt"
992 ac_useropt_orig=$ac_useropt
993 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
994 case $ac_user_opts in
995 *"
996 "enable_$ac_useropt"
997 "*) ;;
998 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
999 ac_unrecognized_sep=', ';;
1000 esac
1001 eval enable_$ac_useropt=no ;;
1002
1003 -docdir | --docdir | --docdi | --doc | --do)
1004 ac_prev=docdir ;;
1005 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1006 docdir=$ac_optarg ;;
1007
1008 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1009 ac_prev=dvidir ;;
1010 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1011 dvidir=$ac_optarg ;;
1012
1013 -enable-* | --enable-*)
1014 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1015 # Reject names that are not valid shell variable names.
1016 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1017 as_fn_error "invalid feature name: $ac_useropt"
1018 ac_useropt_orig=$ac_useropt
1019 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1020 case $ac_user_opts in
1021 *"
1022 "enable_$ac_useropt"
1023 "*) ;;
1024 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1025 ac_unrecognized_sep=', ';;
1026 esac
1027 eval enable_$ac_useropt=\$ac_optarg ;;
1028
1029 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1030 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1031 | --exec | --exe | --ex)
1032 ac_prev=exec_prefix ;;
1033 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1034 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1035 | --exec=* | --exe=* | --ex=*)
1036 exec_prefix=$ac_optarg ;;
1037
1038 -gas | --gas | --ga | --g)
1039 # Obsolete; use --with-gas.
1040 with_gas=yes ;;
1041
1042 -help | --help | --hel | --he | -h)
1043 ac_init_help=long ;;
1044 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1045 ac_init_help=recursive ;;
1046 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1047 ac_init_help=short ;;
1048
1049 -host | --host | --hos | --ho)
1050 ac_prev=host_alias ;;
1051 -host=* | --host=* | --hos=* | --ho=*)
1052 host_alias=$ac_optarg ;;
1053
1054 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1055 ac_prev=htmldir ;;
1056 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1057 | --ht=*)
1058 htmldir=$ac_optarg ;;
1059
1060 -includedir | --includedir | --includedi | --included | --include \
1061 | --includ | --inclu | --incl | --inc)
1062 ac_prev=includedir ;;
1063 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1064 | --includ=* | --inclu=* | --incl=* | --inc=*)
1065 includedir=$ac_optarg ;;
1066
1067 -infodir | --infodir | --infodi | --infod | --info | --inf)
1068 ac_prev=infodir ;;
1069 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1070 infodir=$ac_optarg ;;
1071
1072 -libdir | --libdir | --libdi | --libd)
1073 ac_prev=libdir ;;
1074 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1075 libdir=$ac_optarg ;;
1076
1077 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1078 | --libexe | --libex | --libe)
1079 ac_prev=libexecdir ;;
1080 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1081 | --libexe=* | --libex=* | --libe=*)
1082 libexecdir=$ac_optarg ;;
1083
1084 -localedir | --localedir | --localedi | --localed | --locale)
1085 ac_prev=localedir ;;
1086 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1087 localedir=$ac_optarg ;;
1088
1089 -localstatedir | --localstatedir | --localstatedi | --localstated \
1090 | --localstate | --localstat | --localsta | --localst | --locals)
1091 ac_prev=localstatedir ;;
1092 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1093 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1094 localstatedir=$ac_optarg ;;
1095
1096 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1097 ac_prev=mandir ;;
1098 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1099 mandir=$ac_optarg ;;
1100
1101 -nfp | --nfp | --nf)
1102 # Obsolete; use --without-fp.
1103 with_fp=no ;;
1104
1105 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1106 | --no-cr | --no-c | -n)
1107 no_create=yes ;;
1108
1109 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1110 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1111 no_recursion=yes ;;
1112
1113 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1114 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1115 | --oldin | --oldi | --old | --ol | --o)
1116 ac_prev=oldincludedir ;;
1117 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1118 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1119 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1120 oldincludedir=$ac_optarg ;;
1121
1122 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1123 ac_prev=prefix ;;
1124 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1125 prefix=$ac_optarg ;;
1126
1127 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1128 | --program-pre | --program-pr | --program-p)
1129 ac_prev=program_prefix ;;
1130 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1131 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1132 program_prefix=$ac_optarg ;;
1133
1134 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1135 | --program-suf | --program-su | --program-s)
1136 ac_prev=program_suffix ;;
1137 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1138 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1139 program_suffix=$ac_optarg ;;
1140
1141 -program-transform-name | --program-transform-name \
1142 | --program-transform-nam | --program-transform-na \
1143 | --program-transform-n | --program-transform- \
1144 | --program-transform | --program-transfor \
1145 | --program-transfo | --program-transf \
1146 | --program-trans | --program-tran \
1147 | --progr-tra | --program-tr | --program-t)
1148 ac_prev=program_transform_name ;;
1149 -program-transform-name=* | --program-transform-name=* \
1150 | --program-transform-nam=* | --program-transform-na=* \
1151 | --program-transform-n=* | --program-transform-=* \
1152 | --program-transform=* | --program-transfor=* \
1153 | --program-transfo=* | --program-transf=* \
1154 | --program-trans=* | --program-tran=* \
1155 | --progr-tra=* | --program-tr=* | --program-t=*)
1156 program_transform_name=$ac_optarg ;;
1157
1158 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1159 ac_prev=pdfdir ;;
1160 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1161 pdfdir=$ac_optarg ;;
1162
1163 -psdir | --psdir | --psdi | --psd | --ps)
1164 ac_prev=psdir ;;
1165 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1166 psdir=$ac_optarg ;;
1167
1168 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1169 | -silent | --silent | --silen | --sile | --sil)
1170 silent=yes ;;
1171
1172 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1173 ac_prev=sbindir ;;
1174 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1175 | --sbi=* | --sb=*)
1176 sbindir=$ac_optarg ;;
1177
1178 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1179 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1180 | --sharedst | --shareds | --shared | --share | --shar \
1181 | --sha | --sh)
1182 ac_prev=sharedstatedir ;;
1183 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1184 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1185 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1186 | --sha=* | --sh=*)
1187 sharedstatedir=$ac_optarg ;;
1188
1189 -site | --site | --sit)
1190 ac_prev=site ;;
1191 -site=* | --site=* | --sit=*)
1192 site=$ac_optarg ;;
1193
1194 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1195 ac_prev=srcdir ;;
1196 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1197 srcdir=$ac_optarg ;;
1198
1199 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1200 | --syscon | --sysco | --sysc | --sys | --sy)
1201 ac_prev=sysconfdir ;;
1202 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1203 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1204 sysconfdir=$ac_optarg ;;
1205
1206 -target | --target | --targe | --targ | --tar | --ta | --t)
1207 ac_prev=target_alias ;;
1208 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1209 target_alias=$ac_optarg ;;
1210
1211 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1212 verbose=yes ;;
1213
1214 -version | --version | --versio | --versi | --vers | -V)
1215 ac_init_version=: ;;
1216
1217 -with-* | --with-*)
1218 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1219 # Reject names that are not valid shell variable names.
1220 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1221 as_fn_error "invalid package name: $ac_useropt"
1222 ac_useropt_orig=$ac_useropt
1223 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1224 case $ac_user_opts in
1225 *"
1226 "with_$ac_useropt"
1227 "*) ;;
1228 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1229 ac_unrecognized_sep=', ';;
1230 esac
1231 eval with_$ac_useropt=\$ac_optarg ;;
1232
1233 -without-* | --without-*)
1234 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1235 # Reject names that are not valid shell variable names.
1236 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1237 as_fn_error "invalid package name: $ac_useropt"
1238 ac_useropt_orig=$ac_useropt
1239 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1240 case $ac_user_opts in
1241 *"
1242 "with_$ac_useropt"
1243 "*) ;;
1244 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1245 ac_unrecognized_sep=', ';;
1246 esac
1247 eval with_$ac_useropt=no ;;
1248
1249 --x)
1250 # Obsolete; use --with-x.
1251 with_x=yes ;;
1252
1253 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1254 | --x-incl | --x-inc | --x-in | --x-i)
1255 ac_prev=x_includes ;;
1256 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1257 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1258 x_includes=$ac_optarg ;;
1259
1260 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1261 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1262 ac_prev=x_libraries ;;
1263 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1264 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1265 x_libraries=$ac_optarg ;;
1266
1267 -*) as_fn_error "unrecognized option: \`$ac_option'
1268 Try \`$0 --help' for more information."
1269 ;;
1270
1271 *=*)
1272 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1273 # Reject names that are not valid shell variable names.
1274 case $ac_envvar in #(
1275 '' | [0-9]* | *[!_$as_cr_alnum]* )
1276 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1277 esac
1278 eval $ac_envvar=\$ac_optarg
1279 export $ac_envvar ;;
1280
1281 *)
1282 # FIXME: should be removed in autoconf 3.0.
1283 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1284 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1285 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1286 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1287 ;;
1288
1289 esac
1290 done
1291
1292 if test -n "$ac_prev"; then
1293 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1294 as_fn_error "missing argument to $ac_option"
1295 fi
1296
1297 if test -n "$ac_unrecognized_opts"; then
1298 case $enable_option_checking in
1299 no) ;;
1300 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1301 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1302 esac
1303 fi
1304
1305 # Check all directory arguments for consistency.
1306 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1307 datadir sysconfdir sharedstatedir localstatedir includedir \
1308 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1309 libdir localedir mandir
1310 do
1311 eval ac_val=\$$ac_var
1312 # Remove trailing slashes.
1313 case $ac_val in
1314 */ )
1315 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1316 eval $ac_var=\$ac_val;;
1317 esac
1318 # Be sure to have absolute directory names.
1319 case $ac_val in
1320 [\\/$]* | ?:[\\/]* ) continue;;
1321 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1322 esac
1323 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1324 done
1325
1326 # There might be people who depend on the old broken behavior: `$host'
1327 # used to hold the argument of --host etc.
1328 # FIXME: To remove some day.
1329 build=$build_alias
1330 host=$host_alias
1331 target=$target_alias
1332
1333 # FIXME: To remove some day.
1334 if test "x$host_alias" != x; then
1335 if test "x$build_alias" = x; then
1336 cross_compiling=maybe
1337 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1338 If a cross compiler is detected then cross compile mode will be used." >&2
1339 elif test "x$build_alias" != "x$host_alias"; then
1340 cross_compiling=yes
1341 fi
1342 fi
1343
1344 ac_tool_prefix=
1345 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1346
1347 test "$silent" = yes && exec 6>/dev/null
1348
1349
1350 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1351 ac_ls_di=`ls -di .` &&
1352 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1353 as_fn_error "working directory cannot be determined"
1354 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1355 as_fn_error "pwd does not report name of working directory"
1356
1357
1358 # Find the source files, if location was not specified.
1359 if test -z "$srcdir"; then
1360 ac_srcdir_defaulted=yes
1361 # Try the directory containing this script, then the parent directory.
1362 ac_confdir=`$as_dirname -- "$as_myself" ||
1363 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1364 X"$as_myself" : 'X\(//\)[^/]' \| \
1365 X"$as_myself" : 'X\(//\)$' \| \
1366 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1367 $as_echo X"$as_myself" |
1368 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1369 s//\1/
1370 q
1371 }
1372 /^X\(\/\/\)[^/].*/{
1373 s//\1/
1374 q
1375 }
1376 /^X\(\/\/\)$/{
1377 s//\1/
1378 q
1379 }
1380 /^X\(\/\).*/{
1381 s//\1/
1382 q
1383 }
1384 s/.*/./; q'`
1385 srcdir=$ac_confdir
1386 if test ! -r "$srcdir/$ac_unique_file"; then
1387 srcdir=..
1388 fi
1389 else
1390 ac_srcdir_defaulted=no
1391 fi
1392 if test ! -r "$srcdir/$ac_unique_file"; then
1393 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1394 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1395 fi
1396 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1397 ac_abs_confdir=`(
1398 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1399 pwd)`
1400 # When building in place, set srcdir=.
1401 if test "$ac_abs_confdir" = "$ac_pwd"; then
1402 srcdir=.
1403 fi
1404 # Remove unnecessary trailing slashes from srcdir.
1405 # Double slashes in file names in object file debugging info
1406 # mess up M-x gdb in Emacs.
1407 case $srcdir in
1408 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1409 esac
1410 for ac_var in $ac_precious_vars; do
1411 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1412 eval ac_env_${ac_var}_value=\$${ac_var}
1413 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1414 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1415 done
1416
1417 #
1418 # Report the --help message.
1419 #
1420 if test "$ac_init_help" = "long"; then
1421 # Omit some internal or obsolete options to make the list less imposing.
1422 # This message is too long to be a string in the A/UX 3.1 sh.
1423 cat <<_ACEOF
1424 \`configure' configures ssh-contact 0.1 to adapt to many kinds of systems.
1425
1426 Usage: $0 [OPTION]... [VAR=VALUE]...
1427
1428 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1429 VAR=VALUE. See below for descriptions of some of the useful variables.
1430
1431 Defaults for the options are specified in brackets.
1432
1433 Configuration:
1434 -h, --help display this help and exit
1435 --help=short display options specific to this package
1436 --help=recursive display the short help of all the included packages
1437 -V, --version display version information and exit
1438 -q, --quiet, --silent do not print \`checking...' messages
1439 --cache-file=FILE cache test results in FILE [disabled]
1440 -C, --config-cache alias for \`--cache-file=config.cache'
1441 -n, --no-create do not create output files
1442 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1443
1444 Installation directories:
1445 --prefix=PREFIX install architecture-independent files in PREFIX
1446 [$ac_default_prefix]
1447 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1448 [PREFIX]
1449
1450 By default, \`make install' will install all the files in
1451 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1452 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1453 for instance \`--prefix=\$HOME'.
1454
1455 For better control, use the options below.
1456
1457 Fine tuning of the installation directories:
1458 --bindir=DIR user executables [EPREFIX/bin]
1459 --sbindir=DIR system admin executables [EPREFIX/sbin]
1460 --libexecdir=DIR program executables [EPREFIX/libexec]
1461 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1462 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1463 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1464 --libdir=DIR object code libraries [EPREFIX/lib]
1465 --includedir=DIR C header files [PREFIX/include]
1466 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1467 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1468 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1469 --infodir=DIR info documentation [DATAROOTDIR/info]
1470 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1471 --mandir=DIR man documentation [DATAROOTDIR/man]
1472 --docdir=DIR documentation root [DATAROOTDIR/doc/ssh-contact]
1473 --htmldir=DIR html documentation [DOCDIR]
1474 --dvidir=DIR dvi documentation [DOCDIR]
1475 --pdfdir=DIR pdf documentation [DOCDIR]
1476 --psdir=DIR ps documentation [DOCDIR]
1477 _ACEOF
1478
1479 cat <<\_ACEOF
1480
1481 Program names:
1482 --program-prefix=PREFIX prepend PREFIX to installed program names
1483 --program-suffix=SUFFIX append SUFFIX to installed program names
1484 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1485
1486 System types:
1487 --build=BUILD configure for building on BUILD [guessed]
1488 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1489 _ACEOF
1490 fi
1491
1492 if test -n "$ac_init_help"; then
1493 case $ac_init_help in
1494 short | recursive ) echo "Configuration of ssh-contact 0.1:";;
1495 esac
1496 cat <<\_ACEOF
1497
1498 Optional Features:
1499 --disable-option-checking ignore unrecognized --enable/--with options
1500 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1501 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1502 --enable-silent-rules less verbose build output (undo: `make V=1')
1503 --disable-silent-rules verbose build output (undo: `make V=0')
1504 --enable-maintainer-mode enable make rules and dependencies not useful
1505 (and sometimes confusing) to the casual installer
1506 --disable-dependency-tracking speeds up one-time build
1507 --enable-dependency-tracking do not reject slow dependency extractors
1508 --enable-shared[=PKGS] build shared libraries [default=yes]
1509 --enable-static[=PKGS] build static libraries [default=yes]
1510 --enable-fast-install[=PKGS]
1511 optimize for fast installation [default=yes]
1512 --disable-libtool-lock avoid locking (might break parallel builds)
1513
1514 Optional Packages:
1515 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1516 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1517 --with-pic try to use only PIC/non-PIC objects [default=use
1518 both]
1519 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1520
1521 Some influential environment variables:
1522 CC C compiler command
1523 CFLAGS C compiler flags
1524 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1525 nonstandard directory <lib dir>
1526 LIBS libraries to pass to the linker, e.g. -l<library>
1527 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1528 you have headers in a nonstandard directory <include dir>
1529 CPP C preprocessor
1530 PKG_CONFIG path to pkg-config utility
1531 SSH_CONTACT_CFLAGS
1532 C compiler flags for SSH_CONTACT, overriding pkg-config
1533 SSH_CONTACT_LIBS
1534 linker flags for SSH_CONTACT, overriding pkg-config
1535
1536 Use these variables to override the choices made by `configure' or to help
1537 it to find libraries and programs with nonstandard names/locations.
1538
1539 Report bugs to the package provider.
1540 _ACEOF
1541 ac_status=$?
1542 fi
1543
1544 if test "$ac_init_help" = "recursive"; then
1545 # If there are subdirs, report their specific --help.
1546 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1547 test -d "$ac_dir" ||
1548 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1549 continue
1550 ac_builddir=.
1551
1552 case "$ac_dir" in
1553 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1554 *)
1555 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1556 # A ".." for each directory in $ac_dir_suffix.
1557 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1558 case $ac_top_builddir_sub in
1559 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1560 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1561 esac ;;
1562 esac
1563 ac_abs_top_builddir=$ac_pwd
1564 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1565 # for backward compatibility:
1566 ac_top_builddir=$ac_top_build_prefix
1567
1568 case $srcdir in
1569 .) # We are building in place.
1570 ac_srcdir=.
1571 ac_top_srcdir=$ac_top_builddir_sub
1572 ac_abs_top_srcdir=$ac_pwd ;;
1573 [\\/]* | ?:[\\/]* ) # Absolute name.
1574 ac_srcdir=$srcdir$ac_dir_suffix;
1575 ac_top_srcdir=$srcdir
1576 ac_abs_top_srcdir=$srcdir ;;
1577 *) # Relative name.
1578 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1579 ac_top_srcdir=$ac_top_build_prefix$srcdir
1580 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1581 esac
1582 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1583
1584 cd "$ac_dir" || { ac_status=$?; continue; }
1585 # Check for guested configure.
1586 if test -f "$ac_srcdir/configure.gnu"; then
1587 echo &&
1588 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1589 elif test -f "$ac_srcdir/configure"; then
1590 echo &&
1591 $SHELL "$ac_srcdir/configure" --help=recursive
1592 else
1593 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1594 fi || ac_status=$?
1595 cd "$ac_pwd" || { ac_status=$?; break; }
1596 done
1597 fi
1598
1599 test -n "$ac_init_help" && exit $ac_status
1600 if $ac_init_version; then
1601 cat <<\_ACEOF
1602 ssh-contact configure 0.1
1603 generated by GNU Autoconf 2.65
1604
1605 Copyright (C) 2009 Free Software Foundation, Inc.
1606 This configure script is free software; the Free Software Foundation
1607 gives unlimited permission to copy, distribute and modify it.
1608 _ACEOF
1609 exit
1610 fi
1611
1612 ## ------------------------ ##
1613 ## Autoconf initialization. ##
1614 ## ------------------------ ##
1615
1616 # ac_fn_c_try_compile LINENO
1617 # --------------------------
1618 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1619 ac_fn_c_try_compile ()
1620 {
1621 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1622 rm -f conftest.$ac_objext
1623 if { { ac_try="$ac_compile"
1624 case "(($ac_try" in
1625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1626 *) ac_try_echo=$ac_try;;
1627 esac
1628 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1629 $as_echo "$ac_try_echo"; } >&5
1630 (eval "$ac_compile") 2>conftest.err
1631 ac_status=$?
1632 if test -s conftest.err; then
1633 grep -v '^ *+' conftest.err >conftest.er1
1634 cat conftest.er1 >&5
1635 mv -f conftest.er1 conftest.err
1636 fi
1637 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1638 test $ac_status = 0; } && {
1639 test -z "$ac_c_werror_flag" ||
1640 test ! -s conftest.err
1641 } && test -s conftest.$ac_objext; then :
1642 ac_retval=0
1643 else
1644 $as_echo "$as_me: failed program was:" >&5
1645 sed 's/^/| /' conftest.$ac_ext >&5
1646
1647 ac_retval=1
1648 fi
1649 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1650 as_fn_set_status $ac_retval
1651
1652 } # ac_fn_c_try_compile
1653
1654 # ac_fn_c_try_link LINENO
1655 # -----------------------
1656 # Try to link conftest.$ac_ext, and return whether this succeeded.
1657 ac_fn_c_try_link ()
1658 {
1659 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1660 rm -f conftest.$ac_objext conftest$ac_exeext
1661 if { { ac_try="$ac_link"
1662 case "(($ac_try" in
1663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1664 *) ac_try_echo=$ac_try;;
1665 esac
1666 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1667 $as_echo "$ac_try_echo"; } >&5
1668 (eval "$ac_link") 2>conftest.err
1669 ac_status=$?
1670 if test -s conftest.err; then
1671 grep -v '^ *+' conftest.err >conftest.er1
1672 cat conftest.er1 >&5
1673 mv -f conftest.er1 conftest.err
1674 fi
1675 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1676 test $ac_status = 0; } && {
1677 test -z "$ac_c_werror_flag" ||
1678 test ! -s conftest.err
1679 } && test -s conftest$ac_exeext && {
1680 test "$cross_compiling" = yes ||
1681 $as_test_x conftest$ac_exeext
1682 }; then :
1683 ac_retval=0
1684 else
1685 $as_echo "$as_me: failed program was:" >&5
1686 sed 's/^/| /' conftest.$ac_ext >&5
1687
1688 ac_retval=1
1689 fi
1690 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1691 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1692 # interfere with the next link command; also delete a directory that is
1693 # left behind by Apple's compiler. We do this before executing the actions.
1694 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1695 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1696 as_fn_set_status $ac_retval
1697
1698 } # ac_fn_c_try_link
1699
1700 # ac_fn_c_try_cpp LINENO
1701 # ----------------------
1702 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1703 ac_fn_c_try_cpp ()
1704 {
1705 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1706 if { { ac_try="$ac_cpp conftest.$ac_ext"
1707 case "(($ac_try" in
1708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1709 *) ac_try_echo=$ac_try;;
1710 esac
1711 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1712 $as_echo "$ac_try_echo"; } >&5
1713 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1714 ac_status=$?
1715 if test -s conftest.err; then
1716 grep -v '^ *+' conftest.err >conftest.er1
1717 cat conftest.er1 >&5
1718 mv -f conftest.er1 conftest.err
1719 fi
1720 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1721 test $ac_status = 0; } >/dev/null && {
1722 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1723 test ! -s conftest.err
1724 }; then :
1725 ac_retval=0
1726 else
1727 $as_echo "$as_me: failed program was:" >&5
1728 sed 's/^/| /' conftest.$ac_ext >&5
1729
1730 ac_retval=1
1731 fi
1732 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1733 as_fn_set_status $ac_retval
1734
1735 } # ac_fn_c_try_cpp
1736
1737 # ac_fn_c_try_run LINENO
1738 # ----------------------
1739 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1740 # that executables *can* be run.
1741 ac_fn_c_try_run ()
1742 {
1743 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1744 if { { ac_try="$ac_link"
1745 case "(($ac_try" in
1746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1747 *) ac_try_echo=$ac_try;;
1748 esac
1749 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1750 $as_echo "$ac_try_echo"; } >&5
1751 (eval "$ac_link") 2>&5
1752 ac_status=$?
1753 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1754 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1755 { { case "(($ac_try" in
1756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1757 *) ac_try_echo=$ac_try;;
1758 esac
1759 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1760 $as_echo "$ac_try_echo"; } >&5
1761 (eval "$ac_try") 2>&5
1762 ac_status=$?
1763 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1764 test $ac_status = 0; }; }; then :
1765 ac_retval=0
1766 else
1767 $as_echo "$as_me: program exited with status $ac_status" >&5
1768 $as_echo "$as_me: failed program was:" >&5
1769 sed 's/^/| /' conftest.$ac_ext >&5
1770
1771 ac_retval=$ac_status
1772 fi
1773 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1774 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1775 as_fn_set_status $ac_retval
1776
1777 } # ac_fn_c_try_run
1778
1779 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1780 # -------------------------------------------------------
1781 # Tests whether HEADER exists and can be compiled using the include files in
1782 # INCLUDES, setting the cache variable VAR accordingly.
1783 ac_fn_c_check_header_compile ()
1784 {
1785 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1787 $as_echo_n "checking for $2... " >&6; }
1788 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1789 $as_echo_n "(cached) " >&6
1790 else
1791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1792 /* end confdefs.h. */
1793 $4
1794 #include <$2>
1795 _ACEOF
1796 if ac_fn_c_try_compile "$LINENO"; then :
1797 eval "$3=yes"
1798 else
1799 eval "$3=no"
1800 fi
1801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1802 fi
1803 eval ac_res=\$$3
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1805 $as_echo "$ac_res" >&6; }
1806 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1807
1808 } # ac_fn_c_check_header_compile
1809
1810 # ac_fn_c_check_func LINENO FUNC VAR
1811 # ----------------------------------
1812 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1813 ac_fn_c_check_func ()
1814 {
1815 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1817 $as_echo_n "checking for $2... " >&6; }
1818 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1819 $as_echo_n "(cached) " >&6
1820 else
1821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1822 /* end confdefs.h. */
1823 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1824 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1825 #define $2 innocuous_$2
1826
1827 /* System header to define __stub macros and hopefully few prototypes,
1828 which can conflict with char $2 (); below.
1829 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1830 <limits.h> exists even on freestanding compilers. */
1831
1832 #ifdef __STDC__
1833 # include <limits.h>
1834 #else
1835 # include <assert.h>
1836 #endif
1837
1838 #undef $2
1839
1840 /* Override any GCC internal prototype to avoid an error.
1841 Use char because int might match the return type of a GCC
1842 builtin and then its argument prototype would still apply. */
1843 #ifdef __cplusplus
1844 extern "C"
1845 #endif
1846 char $2 ();
1847 /* The GNU C library defines this for functions which it implements
1848 to always fail with ENOSYS. Some functions are actually named
1849 something starting with __ and the normal name is an alias. */
1850 #if defined __stub_$2 || defined __stub___$2
1851 choke me
1852 #endif
1853
1854 int
1855 main ()
1856 {
1857 return $2 ();
1858 ;
1859 return 0;
1860 }
1861 _ACEOF
1862 if ac_fn_c_try_link "$LINENO"; then :
1863 eval "$3=yes"
1864 else
1865 eval "$3=no"
1866 fi
1867 rm -f core conftest.err conftest.$ac_objext \
1868 conftest$ac_exeext conftest.$ac_ext
1869 fi
1870 eval ac_res=\$$3
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1872 $as_echo "$ac_res" >&6; }
1873 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1874
1875 } # ac_fn_c_check_func
1876 cat >config.log <<_ACEOF
1877 This file contains any messages produced by compilers while
1878 running configure, to aid debugging if configure makes a mistake.
1879
1880 It was created by ssh-contact $as_me 0.1, which was
1881 generated by GNU Autoconf 2.65. Invocation command line was
1882
1883 $ $0 $@
1884
1885 _ACEOF
1886 exec 5>>config.log
1887 {
1888 cat <<_ASUNAME
1889 ## --------- ##
1890 ## Platform. ##
1891 ## --------- ##
1892
1893 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1894 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1895 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1896 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1897 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1898
1899 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1900 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1901
1902 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1903 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1904 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1905 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1906 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1907 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1908 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1909
1910 _ASUNAME
1911
1912 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1913 for as_dir in $PATH
1914 do
1915 IFS=$as_save_IFS
1916 test -z "$as_dir" && as_dir=.
1917 $as_echo "PATH: $as_dir"
1918 done
1919 IFS=$as_save_IFS
1920
1921 } >&5
1922
1923 cat >&5 <<_ACEOF
1924
1925
1926 ## ----------- ##
1927 ## Core tests. ##
1928 ## ----------- ##
1929
1930 _ACEOF
1931
1932
1933 # Keep a trace of the command line.
1934 # Strip out --no-create and --no-recursion so they do not pile up.
1935 # Strip out --silent because we don't want to record it for future runs.
1936 # Also quote any args containing shell meta-characters.
1937 # Make two passes to allow for proper duplicate-argument suppression.
1938 ac_configure_args=
1939 ac_configure_args0=
1940 ac_configure_args1=
1941 ac_must_keep_next=false
1942 for ac_pass in 1 2
1943 do
1944 for ac_arg
1945 do
1946 case $ac_arg in
1947 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1948 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1949 | -silent | --silent | --silen | --sile | --sil)
1950 continue ;;
1951 *\'*)
1952 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1953 esac
1954 case $ac_pass in
1955 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1956 2)
1957 as_fn_append ac_configure_args1 " '$ac_arg'"
1958 if test $ac_must_keep_next = true; then
1959 ac_must_keep_next=false # Got value, back to normal.
1960 else
1961 case $ac_arg in
1962 *=* | --config-cache | -C | -disable-* | --disable-* \
1963 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1964 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1965 | -with-* | --with-* | -without-* | --without-* | --x)
1966 case "$ac_configure_args0 " in
1967 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1968 esac
1969 ;;
1970 -* ) ac_must_keep_next=true ;;
1971 esac
1972 fi
1973 as_fn_append ac_configure_args " '$ac_arg'"
1974 ;;
1975 esac
1976 done
1977 done
1978 { ac_configure_args0=; unset ac_configure_args0;}
1979 { ac_configure_args1=; unset ac_configure_args1;}
1980
1981 # When interrupted or exit'd, cleanup temporary files, and complete
1982 # config.log. We remove comments because anyway the quotes in there
1983 # would cause problems or look ugly.
1984 # WARNING: Use '\'' to represent an apostrophe within the trap.
1985 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1986 trap 'exit_status=$?
1987 # Save into config.log some information that might help in debugging.
1988 {
1989 echo
1990
1991 cat <<\_ASBOX
1992 ## ---------------- ##
1993 ## Cache variables. ##
1994 ## ---------------- ##
1995 _ASBOX
1996 echo
1997 # The following way of writing the cache mishandles newlines in values,
1998 (
1999 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2000 eval ac_val=\$$ac_var
2001 case $ac_val in #(
2002 *${as_nl}*)
2003 case $ac_var in #(
2004 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2005 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2006 esac
2007 case $ac_var in #(
2008 _ | IFS | as_nl) ;; #(
2009 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2010 *) { eval $ac_var=; unset $ac_var;} ;;
2011 esac ;;
2012 esac
2013 done
2014 (set) 2>&1 |
2015 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2016 *${as_nl}ac_space=\ *)
2017 sed -n \
2018 "s/'\''/'\''\\\\'\'''\''/g;
2019 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2020 ;; #(
2021 *)
2022 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2023 ;;
2024 esac |
2025 sort
2026 )
2027 echo
2028
2029 cat <<\_ASBOX
2030 ## ----------------- ##
2031 ## Output variables. ##
2032 ## ----------------- ##
2033 _ASBOX
2034 echo
2035 for ac_var in $ac_subst_vars
2036 do
2037 eval ac_val=\$$ac_var
2038 case $ac_val in
2039 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2040 esac
2041 $as_echo "$ac_var='\''$ac_val'\''"
2042 done | sort
2043 echo
2044
2045 if test -n "$ac_subst_files"; then
2046 cat <<\_ASBOX
2047 ## ------------------- ##
2048 ## File substitutions. ##
2049 ## ------------------- ##
2050 _ASBOX
2051 echo
2052 for ac_var in $ac_subst_files
2053 do
2054 eval ac_val=\$$ac_var
2055 case $ac_val in
2056 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2057 esac
2058 $as_echo "$ac_var='\''$ac_val'\''"
2059 done | sort
2060 echo
2061 fi
2062
2063 if test -s confdefs.h; then
2064 cat <<\_ASBOX
2065 ## ----------- ##
2066 ## confdefs.h. ##
2067 ## ----------- ##
2068 _ASBOX
2069 echo
2070 cat confdefs.h
2071 echo
2072 fi
2073 test "$ac_signal" != 0 &&
2074 $as_echo "$as_me: caught signal $ac_signal"
2075 $as_echo "$as_me: exit $exit_status"
2076 } >&5
2077 rm -f core *.core core.conftest.* &&
2078 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2079 exit $exit_status
2080 ' 0
2081 for ac_signal in 1 2 13 15; do
2082 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2083 done
2084 ac_signal=0
2085
2086 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2087 rm -f -r conftest* confdefs.h
2088
2089 $as_echo "/* confdefs.h */" > confdefs.h
2090
2091 # Predefined preprocessor variables.
2092
2093 cat >>confdefs.h <<_ACEOF
2094 #define PACKAGE_NAME "$PACKAGE_NAME"
2095 _ACEOF
2096
2097 cat >>confdefs.h <<_ACEOF
2098 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2099 _ACEOF
2100
2101 cat >>confdefs.h <<_ACEOF
2102 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2103 _ACEOF
2104
2105 cat >>confdefs.h <<_ACEOF
2106 #define PACKAGE_STRING "$PACKAGE_STRING"
2107 _ACEOF
2108
2109 cat >>confdefs.h <<_ACEOF
2110 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2111 _ACEOF
2112
2113 cat >>confdefs.h <<_ACEOF
2114 #define PACKAGE_URL "$PACKAGE_URL"
2115 _ACEOF
2116
2117
2118 # Let the site file select an alternate cache file if it wants to.
2119 # Prefer an explicitly selected file to automatically selected ones.
2120 ac_site_file1=NONE
2121 ac_site_file2=NONE
2122 if test -n "$CONFIG_SITE"; then
2123 ac_site_file1=$CONFIG_SITE
2124 elif test "x$prefix" != xNONE; then
2125 ac_site_file1=$prefix/share/config.site
2126 ac_site_file2=$prefix/etc/config.site
2127 else
2128 ac_site_file1=$ac_default_prefix/share/config.site
2129 ac_site_file2=$ac_default_prefix/etc/config.site
2130 fi
2131 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2132 do
2133 test "x$ac_site_file" = xNONE && continue
2134 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2135 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2136 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2137 sed 's/^/| /' "$ac_site_file" >&5
2138 . "$ac_site_file"
2139 fi
2140 done
2141
2142 if test -r "$cache_file"; then
2143 # Some versions of bash will fail to source /dev/null (special files
2144 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2145 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2146 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2147 $as_echo "$as_me: loading cache $cache_file" >&6;}
2148 case $cache_file in
2149 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2150 *) . "./$cache_file";;
2151 esac
2152 fi
2153 else
2154 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2155 $as_echo "$as_me: creating cache $cache_file" >&6;}
2156 >$cache_file
2157 fi
2158
2159 # Check that the precious variables saved in the cache have kept the same
2160 # value.
2161 ac_cache_corrupted=false
2162 for ac_var in $ac_precious_vars; do
2163 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2164 eval ac_new_set=\$ac_env_${ac_var}_set
2165 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2166 eval ac_new_val=\$ac_env_${ac_var}_value
2167 case $ac_old_set,$ac_new_set in
2168 set,)
2169 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2170 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2171 ac_cache_corrupted=: ;;
2172 ,set)
2173 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2174 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2175 ac_cache_corrupted=: ;;
2176 ,);;
2177 *)
2178 if test "x$ac_old_val" != "x$ac_new_val"; then
2179 # differences in whitespace do not lead to failure.
2180 ac_old_val_w=`echo x $ac_old_val`
2181 ac_new_val_w=`echo x $ac_new_val`
2182 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2183 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2184 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2185 ac_cache_corrupted=:
2186 else
2187 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2188 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2189 eval $ac_var=\$ac_old_val
2190 fi
2191 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2192 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2193 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2194 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2195 fi;;
2196 esac
2197 # Pass precious variables to config.status.
2198 if test "$ac_new_set" = set; then
2199 case $ac_new_val in
2200 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2201 *) ac_arg=$ac_var=$ac_new_val ;;
2202 esac
2203 case " $ac_configure_args " in
2204 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2205 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2206 esac
2207 fi
2208 done
2209 if $ac_cache_corrupted; then
2210 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2211 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2212 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2213 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2214 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2215 fi
2216 ## -------------------- ##
2217 ## Main body of script. ##
2218 ## -------------------- ##
2219
2220 ac_ext=c
2221 ac_cpp='$CPP $CPPFLAGS'
2222 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2223 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2224 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2225
2226
2227 # Check whether --enable-silent-rules was given.
2228 if test "${enable_silent_rules+set}" = set; then :
2229 enableval=$enable_silent_rules;
2230 fi
2231
2232 case $enable_silent_rules in
2233 yes) AM_DEFAULT_VERBOSITY=0;;
2234 no) AM_DEFAULT_VERBOSITY=1;;
2235 *) AM_DEFAULT_VERBOSITY=0;;
2236 esac
2237 AM_BACKSLASH='\'
2238
2239
2240 am__api_version='1.11'
2241
2242 ac_aux_dir=
2243 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2244 for ac_t in install-sh install.sh shtool; do
2245 if test -f "$ac_dir/$ac_t"; then
2246 ac_aux_dir=$ac_dir
2247 ac_install_sh="$ac_aux_dir/$ac_t -c"
2248 break 2
2249 fi
2250 done
2251 done
2252 if test -z "$ac_aux_dir"; then
2253 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2254 fi
2255
2256 # These three variables are undocumented and unsupported,
2257 # and are intended to be withdrawn in a future Autoconf release.
2258 # They can cause serious problems if a builder's source tree is in a directory
2259 # whose full name contains unusual characters.
2260 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2261 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2262 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2263
2264
2265 # Find a good install program. We prefer a C program (faster),
2266 # so one script is as good as another. But avoid the broken or
2267 # incompatible versions:
2268 # SysV /etc/install, /usr/sbin/install
2269 # SunOS /usr/etc/install
2270 # IRIX /sbin/install
2271 # AIX /bin/install
2272 # AmigaOS /C/install, which installs bootblocks on floppy discs
2273 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2274 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2275 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2276 # OS/2's system install, which has a completely different semantic
2277 # ./install, which can be erroneously created by make from ./install.sh.
2278 # Reject install programs that cannot install multiple files.
2279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2280 $as_echo_n "checking for a BSD-compatible install... " >&6; }
2281 if test -z "$INSTALL"; then
2282 if test "${ac_cv_path_install+set}" = set; then :
2283 $as_echo_n "(cached) " >&6
2284 else
2285 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2286 for as_dir in $PATH
2287 do
2288 IFS=$as_save_IFS
2289 test -z "$as_dir" && as_dir=.
2290 # Account for people who put trailing slashes in PATH elements.
2291 case $as_dir/ in #((
2292 ./ | .// | /[cC]/* | \
2293 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2294 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2295 /usr/ucb/* ) ;;
2296 *)
2297 # OSF1 and SCO ODT 3.0 have their own names for install.
2298 # Don't use installbsd from OSF since it installs stuff as root
2299 # by default.
2300 for ac_prog in ginstall scoinst install; do
2301 for ac_exec_ext in '' $ac_executable_extensions; do
2302 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
2303 if test $ac_prog = install &&
2304 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2305 # AIX install. It has an incompatible calling convention.
2306 :
2307 elif test $ac_prog = install &&
2308 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2309 # program-specific install script used by HP pwplus--don't use.
2310 :
2311 else
2312 rm -rf conftest.one conftest.two conftest.dir
2313 echo one > conftest.one
2314 echo two > conftest.two
2315 mkdir conftest.dir
2316 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2317 test -s conftest.one && test -s conftest.two &&
2318 test -s conftest.dir/conftest.one &&
2319 test -s conftest.dir/conftest.two
2320 then
2321 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2322 break 3
2323 fi
2324 fi
2325 fi
2326 done
2327 done
2328 ;;
2329 esac
2330
2331 done
2332 IFS=$as_save_IFS
2333
2334 rm -rf conftest.one conftest.two conftest.dir
2335
2336 fi
2337 if test "${ac_cv_path_install+set}" = set; then
2338 INSTALL=$ac_cv_path_install
2339 else
2340 # As a last resort, use the slow shell script. Don't cache a
2341 # value for INSTALL within a source directory, because that will
2342 # break other packages using the cache if that directory is
2343 # removed, or if the value is a relative name.
2344 INSTALL=$ac_install_sh
2345 fi
2346 fi
2347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2348 $as_echo "$INSTALL" >&6; }
2349
2350 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2351 # It thinks the first close brace ends the variable substitution.
2352 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2353
2354 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2355
2356 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2357
2358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2359 $as_echo_n "checking whether build environment is sane... " >&6; }
2360 # Just in case
2361 sleep 1
2362 echo timestamp > conftest.file
2363 # Reject unsafe characters in $srcdir or the absolute working directory
2364 # name. Accept space and tab only in the latter.
2365 am_lf='
2366 '
2367 case `pwd` in
2368 *[\\\"\#\$\&\'\`$am_lf]*)
2369 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
2370 esac
2371 case $srcdir in
2372 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2373 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
2374 esac
2375
2376 # Do `set' in a subshell so we don't clobber the current shell's
2377 # arguments. Must try -L first in case configure is actually a
2378 # symlink; some systems play weird games with the mod time of symlinks
2379 # (eg FreeBSD returns the mod time of the symlink's containing
2380 # directory).
2381 if (
2382 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2383 if test "$*" = "X"; then
2384 # -L didn't work.
2385 set X `ls -t "$srcdir/configure" conftest.file`
2386 fi
2387 rm -f conftest.file
2388 if test "$*" != "X $srcdir/configure conftest.file" \
2389 && test "$*" != "X conftest.file $srcdir/configure"; then
2390
2391 # If neither matched, then we have a broken ls. This can happen
2392 # if, for instance, CONFIG_SHELL is bash and it inherits a
2393 # broken ls alias from the environment. This has actually
2394 # happened. Such a system could not be considered "sane".
2395 as_fn_error "ls -t appears to fail. Make sure there is not a broken
2396 alias in your environment" "$LINENO" 5
2397 fi
2398
2399 test "$2" = conftest.file
2400 )
2401 then
2402 # Ok.
2403 :
2404 else
2405 as_fn_error "newly created file is older than distributed files!
2406 Check your system clock" "$LINENO" 5
2407 fi
2408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2409 $as_echo "yes" >&6; }
2410 test "$program_prefix" != NONE &&
2411 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2412 # Use a double $ so make ignores it.
2413 test "$program_suffix" != NONE &&
2414 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2415 # Double any \ or $.
2416 # By default was `s,x,x', remove it if useless.
2417 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2418 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2419
2420 # expand $ac_aux_dir to an absolute path
2421 am_aux_dir=`cd $ac_aux_dir && pwd`
2422
2423 if test x"${MISSING+set}" != xset; then
2424 case $am_aux_dir in
2425 *\ * | *\ *)
2426 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2427 *)
2428 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2429 esac
2430 fi
2431 # Use eval to expand $SHELL
2432 if eval "$MISSING --run true"; then
2433 am_missing_run="$MISSING --run "
2434 else
2435 am_missing_run=
2436 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
2437 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
2438 fi
2439
2440 if test x"${install_sh}" != xset; then
2441 case $am_aux_dir in
2442 *\ * | *\ *)
2443 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2444 *)
2445 install_sh="\${SHELL} $am_aux_dir/install-sh"
2446 esac
2447 fi
2448
2449 # Installed binaries are usually stripped using `strip' when the user
2450 # run `make install-strip'. However `strip' might not be the right
2451 # tool to use in cross-compilation environments, therefore Automake
2452 # will honor the `STRIP' environment variable to overrule this program.
2453 if test "$cross_compiling" != no; then
2454 if test -n "$ac_tool_prefix"; then
2455 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2456 set dummy ${ac_tool_prefix}strip; ac_word=$2
2457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2458 $as_echo_n "checking for $ac_word... " >&6; }
2459 if test "${ac_cv_prog_STRIP+set}" = set; then :
2460 $as_echo_n "(cached) " >&6
2461 else
2462 if test -n "$STRIP"; then
2463 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2464 else
2465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2466 for as_dir in $PATH
2467 do
2468 IFS=$as_save_IFS
2469 test -z "$as_dir" && as_dir=.
2470 for ac_exec_ext in '' $ac_executable_extensions; do
2471 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2472 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2474 break 2
2475 fi
2476 done
2477 done
2478 IFS=$as_save_IFS
2479
2480 fi
2481 fi
2482 STRIP=$ac_cv_prog_STRIP
2483 if test -n "$STRIP"; then
2484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2485 $as_echo "$STRIP" >&6; }
2486 else
2487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2488 $as_echo "no" >&6; }
2489 fi
2490
2491
2492 fi
2493 if test -z "$ac_cv_prog_STRIP"; then
2494 ac_ct_STRIP=$STRIP
2495 # Extract the first word of "strip", so it can be a program name with args.
2496 set dummy strip; ac_word=$2
2497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2498 $as_echo_n "checking for $ac_word... " >&6; }
2499 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
2500 $as_echo_n "(cached) " >&6
2501 else
2502 if test -n "$ac_ct_STRIP"; then
2503 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2504 else
2505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2506 for as_dir in $PATH
2507 do
2508 IFS=$as_save_IFS
2509 test -z "$as_dir" && as_dir=.
2510 for ac_exec_ext in '' $ac_executable_extensions; do
2511 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2512 ac_cv_prog_ac_ct_STRIP="strip"
2513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2514 break 2
2515 fi
2516 done
2517 done
2518 IFS=$as_save_IFS
2519
2520 fi
2521 fi
2522 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2523 if test -n "$ac_ct_STRIP"; then
2524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
2525 $as_echo "$ac_ct_STRIP" >&6; }
2526 else
2527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2528 $as_echo "no" >&6; }
2529 fi
2530
2531 if test "x$ac_ct_STRIP" = x; then
2532 STRIP=":"
2533 else
2534 case $cross_compiling:$ac_tool_warned in
2535 yes:)
2536 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2537 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2538 ac_tool_warned=yes ;;
2539 esac
2540 STRIP=$ac_ct_STRIP
2541 fi
2542 else
2543 STRIP="$ac_cv_prog_STRIP"
2544 fi
2545
2546 fi
2547 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2548
2549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
2550 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
2551 if test -z "$MKDIR_P"; then
2552 if test "${ac_cv_path_mkdir+set}" = set; then :
2553 $as_echo_n "(cached) " >&6
2554 else
2555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2556 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2557 do
2558 IFS=$as_save_IFS
2559 test -z "$as_dir" && as_dir=.
2560 for ac_prog in mkdir gmkdir; do
2561 for ac_exec_ext in '' $ac_executable_extensions; do
2562 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
2563 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2564 'mkdir (GNU coreutils) '* | \
2565 'mkdir (coreutils) '* | \
2566 'mkdir (fileutils) '4.1*)
2567 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2568 break 3;;
2569 esac
2570 done
2571 done
2572 done
2573 IFS=$as_save_IFS
2574
2575 fi
2576
2577 test -d ./--version && rmdir ./--version
2578 if test "${ac_cv_path_mkdir+set}" = set; then
2579 MKDIR_P="$ac_cv_path_mkdir -p"
2580 else
2581 # As a last resort, use the slow shell script. Don't cache a
2582 # value for MKDIR_P within a source directory, because that will
2583 # break other packages using the cache if that directory is
2584 # removed, or if the value is a relative name.
2585 MKDIR_P="$ac_install_sh -d"
2586 fi
2587 fi
2588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
2589 $as_echo "$MKDIR_P" >&6; }
2590
2591 mkdir_p="$MKDIR_P"
2592 case $mkdir_p in
2593 [\\/$]* | ?:[\\/]*) ;;
2594 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2595 esac
2596
2597 for ac_prog in gawk mawk nawk awk
2598 do
2599 # Extract the first word of "$ac_prog", so it can be a program name with args.
2600 set dummy $ac_prog; ac_word=$2
2601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2602 $as_echo_n "checking for $ac_word... " >&6; }
2603 if test "${ac_cv_prog_AWK+set}" = set; then :
2604 $as_echo_n "(cached) " >&6
2605 else
2606 if test -n "$AWK"; then
2607 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2608 else
2609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2610 for as_dir in $PATH
2611 do
2612 IFS=$as_save_IFS
2613 test -z "$as_dir" && as_dir=.
2614 for ac_exec_ext in '' $ac_executable_extensions; do
2615 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2616 ac_cv_prog_AWK="$ac_prog"
2617 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2618 break 2
2619 fi
2620 done
2621 done
2622 IFS=$as_save_IFS
2623
2624 fi
2625 fi
2626 AWK=$ac_cv_prog_AWK
2627 if test -n "$AWK"; then
2628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
2629 $as_echo "$AWK" >&6; }
2630 else
2631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2632 $as_echo "no" >&6; }
2633 fi
2634
2635
2636 test -n "$AWK" && break
2637 done
2638
2639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2640 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2641 set x ${MAKE-make}
2642 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2643 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
2644 $as_echo_n "(cached) " >&6
2645 else
2646 cat >conftest.make <<\_ACEOF
2647 SHELL = /bin/sh
2648 all:
2649 @echo '@@@%%%=$(MAKE)=@@@%%%'
2650 _ACEOF
2651 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2652 case `${MAKE-make} -f conftest.make 2>/dev/null` in
2653 *@@@%%%=?*=@@@%%%*)
2654 eval ac_cv_prog_make_${ac_make}_set=yes;;
2655 *)
2656 eval ac_cv_prog_make_${ac_make}_set=no;;
2657 esac
2658 rm -f conftest.make
2659 fi
2660 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2662 $as_echo "yes" >&6; }
2663 SET_MAKE=
2664 else
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2666 $as_echo "no" >&6; }
2667 SET_MAKE="MAKE=${MAKE-make}"
2668 fi
2669
2670 rm -rf .tst 2>/dev/null
2671 mkdir .tst 2>/dev/null
2672 if test -d .tst; then
2673 am__leading_dot=.
2674 else
2675 am__leading_dot=_
2676 fi
2677 rmdir .tst 2>/dev/null
2678
2679 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2680 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2681 # is not polluted with repeated "-I."
2682 am__isrc=' -I$(srcdir)'
2683 # test to see if srcdir already configured
2684 if test -f $srcdir/config.status; then
2685 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2686 fi
2687 fi
2688
2689 # test whether we have cygpath
2690 if test -z "$CYGPATH_W"; then
2691 if (cygpath --version) >/dev/null 2>/dev/null; then
2692 CYGPATH_W='cygpath -w'
2693 else
2694 CYGPATH_W=echo
2695 fi
2696 fi
2697
2698
2699 # Define the identity of the package.
2700 PACKAGE=ssh-contact
2701 VERSION=0.1
2702
2703
2704 cat >>confdefs.h <<_ACEOF
2705 #define PACKAGE "$PACKAGE"
2706 _ACEOF
2707
2708
2709 cat >>confdefs.h <<_ACEOF
2710 #define VERSION "$VERSION"
2711 _ACEOF
2712
2713 # Some tools Automake needs.
2714
2715 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2716
2717
2718 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2719
2720
2721 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2722
2723
2724 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2725
2726
2727 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2728
2729 # We need awk for the "check" target. The system "awk" is bad on
2730 # some platforms.
2731 # Always define AMTAR for backward compatibility.
2732
2733 AMTAR=${AMTAR-"${am_missing_run}tar"}
2734
2735 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2736
2737
2738
2739
2740
2741 ac_config_headers="$ac_config_headers config.h"
2742
2743
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2745 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2746 # Check whether --enable-maintainer-mode was given.
2747 if test "${enable_maintainer_mode+set}" = set; then :
2748 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2749 else
2750 USE_MAINTAINER_MODE=no
2751 fi
2752
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2754 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2755 if test $USE_MAINTAINER_MODE = yes; then
2756 MAINTAINER_MODE_TRUE=
2757 MAINTAINER_MODE_FALSE='#'
2758 else
2759 MAINTAINER_MODE_TRUE='#'
2760 MAINTAINER_MODE_FALSE=
2761 fi
2762
2763 MAINT=$MAINTAINER_MODE_TRUE
2764
2765
2766
2767 DEPDIR="${am__leading_dot}deps"
2768
2769 ac_config_commands="$ac_config_commands depfiles"
2770
2771
2772 am_make=${MAKE-make}
2773 cat > confinc << 'END'
2774 am__doit:
2775 @echo this is the am__doit target
2776 .PHONY: am__doit
2777 END
2778 # If we don't find an include directive, just comment out the code.
2779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
2780 $as_echo_n "checking for style of include used by $am_make... " >&6; }
2781 am__include="#"
2782 am__quote=
2783 _am_result=none
2784 # First try GNU make style include.
2785 echo "include confinc" > confmf
2786 # Ignore all kinds of additional output from `make'.
2787 case `$am_make -s -f confmf 2> /dev/null` in #(
2788 *the\ am__doit\ target*)
2789 am__include=include
2790 am__quote=
2791 _am_result=GNU
2792 ;;
2793 esac
2794 # Now try BSD make style include.
2795 if test "$am__include" = "#"; then
2796 echo '.include "confinc"' > confmf
2797 case `$am_make -s -f confmf 2> /dev/null` in #(
2798 *the\ am__doit\ target*)
2799 am__include=.include
2800 am__quote="\""
2801 _am_result=BSD
2802 ;;
2803 esac
2804 fi
2805
2806
2807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
2808 $as_echo "$_am_result" >&6; }
2809 rm -f confinc confmf
2810
2811 # Check whether --enable-dependency-tracking was given.
2812 if test "${enable_dependency_tracking+set}" = set; then :
2813 enableval=$enable_dependency_tracking;
2814 fi
2815
2816 if test "x$enable_dependency_tracking" != xno; then
2817 am_depcomp="$ac_aux_dir/depcomp"
2818 AMDEPBACKSLASH='\'
2819 fi
2820 if test "x$enable_dependency_tracking" != xno; then
2821 AMDEP_TRUE=
2822 AMDEP_FALSE='#'
2823 else
2824 AMDEP_TRUE='#'
2825 AMDEP_FALSE=
2826 fi
2827
2828
2829 ac_ext=c
2830 ac_cpp='$CPP $CPPFLAGS'
2831 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2832 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2833 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2834 if test -n "$ac_tool_prefix"; then
2835 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2836 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2838 $as_echo_n "checking for $ac_word... " >&6; }
2839 if test "${ac_cv_prog_CC+set}" = set; then :
2840 $as_echo_n "(cached) " >&6
2841 else
2842 if test -n "$CC"; then
2843 ac_cv_prog_CC="$CC" # Let the user override the test.
2844 else
2845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2846 for as_dir in $PATH
2847 do
2848 IFS=$as_save_IFS
2849 test -z "$as_dir" && as_dir=.
2850 for ac_exec_ext in '' $ac_executable_extensions; do
2851 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2852 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2853 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2854 break 2
2855 fi
2856 done
2857 done
2858 IFS=$as_save_IFS
2859
2860 fi
2861 fi
2862 CC=$ac_cv_prog_CC
2863 if test -n "$CC"; then
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2865 $as_echo "$CC" >&6; }
2866 else
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2868 $as_echo "no" >&6; }
2869 fi
2870
2871
2872 fi
2873 if test -z "$ac_cv_prog_CC"; then
2874 ac_ct_CC=$CC
2875 # Extract the first word of "gcc", so it can be a program name with args.
2876 set dummy gcc; ac_word=$2
2877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2878 $as_echo_n "checking for $ac_word... " >&6; }
2879 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2880 $as_echo_n "(cached) " >&6
2881 else
2882 if test -n "$ac_ct_CC"; then
2883 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2884 else
2885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2886 for as_dir in $PATH
2887 do
2888 IFS=$as_save_IFS
2889 test -z "$as_dir" && as_dir=.
2890 for ac_exec_ext in '' $ac_executable_extensions; do
2891 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2892 ac_cv_prog_ac_ct_CC="gcc"
2893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2894 break 2
2895 fi
2896 done
2897 done
2898 IFS=$as_save_IFS
2899
2900 fi
2901 fi
2902 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2903 if test -n "$ac_ct_CC"; then
2904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2905 $as_echo "$ac_ct_CC" >&6; }
2906 else
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2908 $as_echo "no" >&6; }
2909 fi
2910
2911 if test "x$ac_ct_CC" = x; then
2912 CC=""
2913 else
2914 case $cross_compiling:$ac_tool_warned in
2915 yes:)
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2917 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2918 ac_tool_warned=yes ;;
2919 esac
2920 CC=$ac_ct_CC
2921 fi
2922 else
2923 CC="$ac_cv_prog_CC"
2924 fi
2925
2926 if test -z "$CC"; then
2927 if test -n "$ac_tool_prefix"; then
2928 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2929 set dummy ${ac_tool_prefix}cc; ac_word=$2
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2931 $as_echo_n "checking for $ac_word... " >&6; }
2932 if test "${ac_cv_prog_CC+set}" = set; then :
2933 $as_echo_n "(cached) " >&6
2934 else
2935 if test -n "$CC"; then
2936 ac_cv_prog_CC="$CC" # Let the user override the test.
2937 else
2938 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2939 for as_dir in $PATH
2940 do
2941 IFS=$as_save_IFS
2942 test -z "$as_dir" && as_dir=.
2943 for ac_exec_ext in '' $ac_executable_extensions; do
2944 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2945 ac_cv_prog_CC="${ac_tool_prefix}cc"
2946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2947 break 2
2948 fi
2949 done
2950 done
2951 IFS=$as_save_IFS
2952
2953 fi
2954 fi
2955 CC=$ac_cv_prog_CC
2956 if test -n "$CC"; then
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2958 $as_echo "$CC" >&6; }
2959 else
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2961 $as_echo "no" >&6; }
2962 fi
2963
2964
2965 fi
2966 fi
2967 if test -z "$CC"; then
2968 # Extract the first word of "cc", so it can be a program name with args.
2969 set dummy cc; ac_word=$2
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2971 $as_echo_n "checking for $ac_word... " >&6; }
2972 if test "${ac_cv_prog_CC+set}" = set; then :
2973 $as_echo_n "(cached) " >&6
2974 else
2975 if test -n "$CC"; then
2976 ac_cv_prog_CC="$CC" # Let the user override the test.
2977 else
2978 ac_prog_rejected=no
2979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2980 for as_dir in $PATH
2981 do
2982 IFS=$as_save_IFS
2983 test -z "$as_dir" && as_dir=.
2984 for ac_exec_ext in '' $ac_executable_extensions; do
2985 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2986 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2987 ac_prog_rejected=yes
2988 continue
2989 fi
2990 ac_cv_prog_CC="cc"
2991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2992 break 2
2993 fi
2994 done
2995 done
2996 IFS=$as_save_IFS
2997
2998 if test $ac_prog_rejected = yes; then
2999 # We found a bogon in the path, so make sure we never use it.
3000 set dummy $ac_cv_prog_CC
3001 shift
3002 if test $# != 0; then
3003 # We chose a different compiler from the bogus one.
3004 # However, it has the same basename, so the bogon will be chosen
3005 # first if we set CC to just the basename; use the full file name.
3006 shift
3007 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3008 fi
3009 fi
3010 fi
3011 fi
3012 CC=$ac_cv_prog_CC
3013 if test -n "$CC"; then
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3015 $as_echo "$CC" >&6; }
3016 else
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3018 $as_echo "no" >&6; }
3019 fi
3020
3021
3022 fi
3023 if test -z "$CC"; then
3024 if test -n "$ac_tool_prefix"; then
3025 for ac_prog in cl.exe
3026 do
3027 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3028 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3030 $as_echo_n "checking for $ac_word... " >&6; }
3031 if test "${ac_cv_prog_CC+set}" = set; then :
3032 $as_echo_n "(cached) " >&6
3033 else
3034 if test -n "$CC"; then
3035 ac_cv_prog_CC="$CC" # Let the user override the test.
3036 else
3037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3038 for as_dir in $PATH
3039 do
3040 IFS=$as_save_IFS
3041 test -z "$as_dir" && as_dir=.
3042 for ac_exec_ext in '' $ac_executable_extensions; do
3043 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3044 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3046 break 2
3047 fi
3048 done
3049 done
3050 IFS=$as_save_IFS
3051
3052 fi
3053 fi
3054 CC=$ac_cv_prog_CC
3055 if test -n "$CC"; then
3056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3057 $as_echo "$CC" >&6; }
3058 else
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3060 $as_echo "no" >&6; }
3061 fi
3062
3063
3064 test -n "$CC" && break
3065 done
3066 fi
3067 if test -z "$CC"; then
3068 ac_ct_CC=$CC
3069 for ac_prog in cl.exe
3070 do
3071 # Extract the first word of "$ac_prog", so it can be a program name with args.
3072 set dummy $ac_prog; ac_word=$2
3073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3074 $as_echo_n "checking for $ac_word... " >&6; }
3075 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3076 $as_echo_n "(cached) " >&6
3077 else
3078 if test -n "$ac_ct_CC"; then
3079 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3080 else
3081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3082 for as_dir in $PATH
3083 do
3084 IFS=$as_save_IFS
3085 test -z "$as_dir" && as_dir=.
3086 for ac_exec_ext in '' $ac_executable_extensions; do
3087 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3088 ac_cv_prog_ac_ct_CC="$ac_prog"
3089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3090 break 2
3091 fi
3092 done
3093 done
3094 IFS=$as_save_IFS
3095
3096 fi
3097 fi
3098 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3099 if test -n "$ac_ct_CC"; then
3100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3101 $as_echo "$ac_ct_CC" >&6; }
3102 else
3103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3104 $as_echo "no" >&6; }
3105 fi
3106
3107
3108 test -n "$ac_ct_CC" && break
3109 done
3110
3111 if test "x$ac_ct_CC" = x; then
3112 CC=""
3113 else
3114 case $cross_compiling:$ac_tool_warned in
3115 yes:)
3116 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3117 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3118 ac_tool_warned=yes ;;
3119 esac
3120 CC=$ac_ct_CC
3121 fi
3122 fi
3123
3124 fi
3125
3126
3127 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3128 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3129 as_fn_error "no acceptable C compiler found in \$PATH
3130 See \`config.log' for more details." "$LINENO" 5; }
3131
3132 # Provide some information about the compiler.
3133 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3134 set X $ac_compile
3135 ac_compiler=$2
3136 for ac_option in --version -v -V -qversion; do
3137 { { ac_try="$ac_compiler $ac_option >&5"
3138 case "(($ac_try" in
3139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3140 *) ac_try_echo=$ac_try;;
3141 esac
3142 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3143 $as_echo "$ac_try_echo"; } >&5
3144 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3145 ac_status=$?
3146 if test -s conftest.err; then
3147 sed '10a\
3148 ... rest of stderr output deleted ...
3149 10q' conftest.err >conftest.er1
3150 cat conftest.er1 >&5
3151 fi
3152 rm -f conftest.er1 conftest.err
3153 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3154 test $ac_status = 0; }
3155 done
3156
3157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3158 /* end confdefs.h. */
3159
3160 int
3161 main ()
3162 {
3163
3164 ;
3165 return 0;
3166 }
3167 _ACEOF
3168 ac_clean_files_save=$ac_clean_files
3169 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3170 # Try to create an executable without -o first, disregard a.out.
3171 # It will help us diagnose broken compilers, and finding out an intuition
3172 # of exeext.
3173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3174 $as_echo_n "checking whether the C compiler works... " >&6; }
3175 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3176
3177 # The possible output files:
3178 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3179
3180 ac_rmfiles=
3181 for ac_file in $ac_files
3182 do
3183 case $ac_file in
3184 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3185 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3186 esac
3187 done
3188 rm -f $ac_rmfiles
3189
3190 if { { ac_try="$ac_link_default"
3191 case "(($ac_try" in
3192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3193 *) ac_try_echo=$ac_try;;
3194 esac
3195 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3196 $as_echo "$ac_try_echo"; } >&5
3197 (eval "$ac_link_default") 2>&5
3198 ac_status=$?
3199 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3200 test $ac_status = 0; }; then :
3201 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3202 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3203 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3204 # so that the user can short-circuit this test for compilers unknown to
3205 # Autoconf.
3206 for ac_file in $ac_files ''
3207 do
3208 test -f "$ac_file" || continue
3209 case $ac_file in
3210 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3211 ;;
3212 [ab].out )
3213 # We found the default executable, but exeext='' is most
3214 # certainly right.
3215 break;;
3216 *.* )
3217 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3218 then :; else
3219 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3220 fi
3221 # We set ac_cv_exeext here because the later test for it is not
3222 # safe: cross compilers may not add the suffix if given an `-o'
3223 # argument, so we may need to know it at that point already.
3224 # Even if this section looks crufty: it has the advantage of
3225 # actually working.
3226 break;;
3227 * )
3228 break;;
3229 esac
3230 done
3231 test "$ac_cv_exeext" = no && ac_cv_exeext=
3232
3233 else
3234 ac_file=''
3235 fi
3236 if test -z "$ac_file"; then :
3237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3238 $as_echo "no" >&6; }
3239 $as_echo "$as_me: failed program was:" >&5
3240 sed 's/^/| /' conftest.$ac_ext >&5
3241
3242 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3243 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3244 { as_fn_set_status 77
3245 as_fn_error "C compiler cannot create executables
3246 See \`config.log' for more details." "$LINENO" 5; }; }
3247 else
3248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3249 $as_echo "yes" >&6; }
3250 fi
3251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3252 $as_echo_n "checking for C compiler default output file name... " >&6; }
3253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3254 $as_echo "$ac_file" >&6; }
3255 ac_exeext=$ac_cv_exeext
3256
3257 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3258 ac_clean_files=$ac_clean_files_save
3259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3260 $as_echo_n "checking for suffix of executables... " >&6; }
3261 if { { ac_try="$ac_link"
3262 case "(($ac_try" in
3263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3264 *) ac_try_echo=$ac_try;;
3265 esac
3266 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3267 $as_echo "$ac_try_echo"; } >&5
3268 (eval "$ac_link") 2>&5
3269 ac_status=$?
3270 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3271 test $ac_status = 0; }; then :
3272 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3273 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3274 # work properly (i.e., refer to `conftest.exe'), while it won't with
3275 # `rm'.
3276 for ac_file in conftest.exe conftest conftest.*; do
3277 test -f "$ac_file" || continue
3278 case $ac_file in
3279 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3280 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3281 break;;
3282 * ) break;;
3283 esac
3284 done
3285 else
3286 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3287 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3288 as_fn_error "cannot compute suffix of executables: cannot compile and link
3289 See \`config.log' for more details." "$LINENO" 5; }
3290 fi
3291 rm -f conftest conftest$ac_cv_exeext
3292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3293 $as_echo "$ac_cv_exeext" >&6; }
3294
3295 rm -f conftest.$ac_ext
3296 EXEEXT=$ac_cv_exeext
3297 ac_exeext=$EXEEXT
3298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3299 /* end confdefs.h. */
3300 #include <stdio.h>
3301 int
3302 main ()
3303 {
3304 FILE *f = fopen ("conftest.out", "w");
3305 return ferror (f) || fclose (f) != 0;
3306
3307 ;
3308 return 0;
3309 }
3310 _ACEOF
3311 ac_clean_files="$ac_clean_files conftest.out"
3312 # Check that the compiler produces executables we can run. If not, either
3313 # the compiler is broken, or we cross compile.
3314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3315 $as_echo_n "checking whether we are cross compiling... " >&6; }
3316 if test "$cross_compiling" != yes; then
3317 { { ac_try="$ac_link"
3318 case "(($ac_try" in
3319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3320 *) ac_try_echo=$ac_try;;
3321 esac
3322 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3323 $as_echo "$ac_try_echo"; } >&5
3324 (eval "$ac_link") 2>&5
3325 ac_status=$?
3326 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3327 test $ac_status = 0; }
3328 if { ac_try='./conftest$ac_cv_exeext'
3329 { { case "(($ac_try" in
3330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3331 *) ac_try_echo=$ac_try;;
3332 esac
3333 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3334 $as_echo "$ac_try_echo"; } >&5
3335 (eval "$ac_try") 2>&5
3336 ac_status=$?
3337 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3338 test $ac_status = 0; }; }; then
3339 cross_compiling=no
3340 else
3341 if test "$cross_compiling" = maybe; then
3342 cross_compiling=yes
3343 else
3344 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3345 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3346 as_fn_error "cannot run C compiled programs.
3347 If you meant to cross compile, use \`--host'.
3348 See \`config.log' for more details." "$LINENO" 5; }
3349 fi
3350 fi
3351 fi
3352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3353 $as_echo "$cross_compiling" >&6; }
3354
3355 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3356 ac_clean_files=$ac_clean_files_save
3357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3358 $as_echo_n "checking for suffix of object files... " >&6; }
3359 if test "${ac_cv_objext+set}" = set; then :
3360 $as_echo_n "(cached) " >&6
3361 else
3362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3363 /* end confdefs.h. */
3364
3365 int
3366 main ()
3367 {
3368
3369 ;
3370 return 0;
3371 }
3372 _ACEOF
3373 rm -f conftest.o conftest.obj
3374 if { { ac_try="$ac_compile"
3375 case "(($ac_try" in
3376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3377 *) ac_try_echo=$ac_try;;
3378 esac
3379 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3380 $as_echo "$ac_try_echo"; } >&5
3381 (eval "$ac_compile") 2>&5
3382 ac_status=$?
3383 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3384 test $ac_status = 0; }; then :
3385 for ac_file in conftest.o conftest.obj conftest.*; do
3386 test -f "$ac_file" || continue;
3387 case $ac_file in
3388 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3389 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3390 break;;
3391 esac
3392 done
3393 else
3394 $as_echo "$as_me: failed program was:" >&5
3395 sed 's/^/| /' conftest.$ac_ext >&5
3396
3397 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3398 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3399 as_fn_error "cannot compute suffix of object files: cannot compile
3400 See \`config.log' for more details." "$LINENO" 5; }
3401 fi
3402 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3403 fi
3404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3405 $as_echo "$ac_cv_objext" >&6; }
3406 OBJEXT=$ac_cv_objext
3407 ac_objext=$OBJEXT
3408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3409 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3410 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3411 $as_echo_n "(cached) " >&6
3412 else
3413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3414 /* end confdefs.h. */
3415
3416 int
3417 main ()
3418 {
3419 #ifndef __GNUC__
3420 choke me
3421 #endif
3422
3423 ;
3424 return 0;
3425 }
3426 _ACEOF
3427 if ac_fn_c_try_compile "$LINENO"; then :
3428 ac_compiler_gnu=yes
3429 else
3430 ac_compiler_gnu=no
3431 fi
3432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3433 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3434
3435 fi
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3437 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3438 if test $ac_compiler_gnu = yes; then
3439 GCC=yes
3440 else
3441 GCC=
3442 fi
3443 ac_test_CFLAGS=${CFLAGS+set}
3444 ac_save_CFLAGS=$CFLAGS
3445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3446 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3447 if test "${ac_cv_prog_cc_g+set}" = set; then :
3448 $as_echo_n "(cached) " >&6
3449 else
3450 ac_save_c_werror_flag=$ac_c_werror_flag
3451 ac_c_werror_flag=yes
3452 ac_cv_prog_cc_g=no
3453 CFLAGS="-g"
3454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3455 /* end confdefs.h. */
3456
3457 int
3458 main ()
3459 {
3460
3461 ;
3462 return 0;
3463 }
3464 _ACEOF
3465 if ac_fn_c_try_compile "$LINENO"; then :
3466 ac_cv_prog_cc_g=yes
3467 else
3468 CFLAGS=""
3469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3470 /* end confdefs.h. */
3471
3472 int
3473 main ()
3474 {
3475
3476 ;
3477 return 0;
3478 }
3479 _ACEOF
3480 if ac_fn_c_try_compile "$LINENO"; then :
3481
3482 else
3483 ac_c_werror_flag=$ac_save_c_werror_flag
3484 CFLAGS="-g"
3485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3486 /* end confdefs.h. */
3487
3488 int
3489 main ()
3490 {
3491
3492 ;
3493 return 0;
3494 }
3495 _ACEOF
3496 if ac_fn_c_try_compile "$LINENO"; then :
3497 ac_cv_prog_cc_g=yes
3498 fi
3499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3500 fi
3501 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3502 fi
3503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3504 ac_c_werror_flag=$ac_save_c_werror_flag
3505 fi
3506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3507 $as_echo "$ac_cv_prog_cc_g" >&6; }
3508 if test "$ac_test_CFLAGS" = set; then
3509 CFLAGS=$ac_save_CFLAGS
3510 elif test $ac_cv_prog_cc_g = yes; then
3511 if test "$GCC" = yes; then
3512 CFLAGS="-g -O2"
3513 else
3514 CFLAGS="-g"
3515 fi
3516 else
3517 if test "$GCC" = yes; then
3518 CFLAGS="-O2"
3519 else
3520 CFLAGS=
3521 fi
3522 fi
3523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3524 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3525 if test "${ac_cv_prog_cc_c89+set}" = set; then :
3526 $as_echo_n "(cached) " >&6
3527 else
3528 ac_cv_prog_cc_c89=no
3529 ac_save_CC=$CC
3530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3531 /* end confdefs.h. */
3532 #include <stdarg.h>
3533 #include <stdio.h>
3534 #include <sys/types.h>
3535 #include <sys/stat.h>
3536 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3537 struct buf { int x; };
3538 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3539 static char *e (p, i)
3540 char **p;
3541 int i;
3542 {
3543 return p[i];
3544 }
3545 static char *f (char * (*g) (char **, int), char **p, ...)
3546 {
3547 char *s;
3548 va_list v;
3549 va_start (v,p);
3550 s = g (p, va_arg (v,int));
3551 va_end (v);
3552 return s;
3553 }
3554
3555 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3556 function prototypes and stuff, but not '\xHH' hex character constants.
3557 These don't provoke an error unfortunately, instead are silently treated
3558 as 'x'. The following induces an error, until -std is added to get
3559 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3560 array size at least. It's necessary to write '\x00'==0 to get something
3561 that's true only with -std. */
3562 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3563
3564 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3565 inside strings and character constants. */
3566 #define FOO(x) 'x'
3567 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3568
3569 int test (int i, double x);
3570 struct s1 {int (*f) (int a);};
3571 struct s2 {int (*f) (double a);};
3572 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3573 int argc;
3574 char **argv;
3575 int
3576 main ()
3577 {
3578 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3579 ;
3580 return 0;
3581 }
3582 _ACEOF
3583 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3584 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3585 do
3586 CC="$ac_save_CC $ac_arg"
3587 if ac_fn_c_try_compile "$LINENO"; then :
3588 ac_cv_prog_cc_c89=$ac_arg
3589 fi
3590 rm -f core conftest.err conftest.$ac_objext
3591 test "x$ac_cv_prog_cc_c89" != "xno" && break
3592 done
3593 rm -f conftest.$ac_ext
3594 CC=$ac_save_CC
3595
3596 fi
3597 # AC_CACHE_VAL
3598 case "x$ac_cv_prog_cc_c89" in
3599 x)
3600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3601 $as_echo "none needed" >&6; } ;;
3602 xno)
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3604 $as_echo "unsupported" >&6; } ;;
3605 *)
3606 CC="$CC $ac_cv_prog_cc_c89"
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3608 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3609 esac
3610 if test "x$ac_cv_prog_cc_c89" != xno; then :
3611
3612 fi
3613
3614 ac_ext=c
3615 ac_cpp='$CPP $CPPFLAGS'
3616 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3617 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3618 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3619
3620 depcc="$CC" am_compiler_list=
3621
3622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
3623 $as_echo_n "checking dependency style of $depcc... " >&6; }
3624 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
3625 $as_echo_n "(cached) " >&6
3626 else
3627 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3628 # We make a subdir and do the tests there. Otherwise we can end up
3629 # making bogus files that we don't know about and never remove. For
3630 # instance it was reported that on HP-UX the gcc test will end up
3631 # making a dummy file named `D' -- because `-MD' means `put the output
3632 # in D'.
3633 mkdir conftest.dir
3634 # Copy depcomp to subdir because otherwise we won't find it if we're
3635 # using a relative directory.
3636 cp "$am_depcomp" conftest.dir
3637 cd conftest.dir
3638 # We will build objects and dependencies in a subdirectory because
3639 # it helps to detect inapplicable dependency modes. For instance
3640 # both Tru64's cc and ICC support -MD to output dependencies as a
3641 # side effect of compilation, but ICC will put the dependencies in
3642 # the current directory while Tru64 will put them in the object
3643 # directory.
3644 mkdir sub
3645
3646 am_cv_CC_dependencies_compiler_type=none
3647 if test "$am_compiler_list" = ""; then
3648 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3649 fi
3650 am__universal=false
3651 case " $depcc " in #(
3652 *\ -arch\ *\ -arch\ *) am__universal=true ;;
3653 esac
3654
3655 for depmode in $am_compiler_list; do
3656 # Setup a source with many dependencies, because some compilers
3657 # like to wrap large dependency lists on column 80 (with \), and
3658 # we should not choose a depcomp mode which is confused by this.
3659 #
3660 # We need to recreate these files for each test, as the compiler may
3661 # overwrite some of them when testing with obscure command lines.
3662 # This happens at least with the AIX C compiler.
3663 : > sub/conftest.c
3664 for i in 1 2 3 4 5 6; do
3665 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3666 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3667 # Solaris 8's {/usr,}/bin/sh.
3668 touch sub/conftst$i.h
3669 done
3670 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3671
3672 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3673 # mode. It turns out that the SunPro C++ compiler does not properly
3674 # handle `-M -o', and we need to detect this. Also, some Intel
3675 # versions had trouble with output in subdirs
3676 am__obj=sub/conftest.${OBJEXT-o}
3677 am__minus_obj="-o $am__obj"
3678 case $depmode in
3679 gcc)
3680 # This depmode causes a compiler race in universal mode.
3681 test "$am__universal" = false || continue
3682 ;;
3683 nosideeffect)
3684 # after this tag, mechanisms are not by side-effect, so they'll
3685 # only be used when explicitly requested
3686 if test "x$enable_dependency_tracking" = xyes; then
3687 continue
3688 else
3689 break
3690 fi
3691 ;;
3692 msvisualcpp | msvcmsys)
3693 # This compiler won't grok `-c -o', but also, the minuso test has
3694 # not run yet. These depmodes are late enough in the game, and
3695 # so weak that their functioning should not be impacted.
3696 am__obj=conftest.${OBJEXT-o}
3697 am__minus_obj=
3698 ;;
3699 none) break ;;
3700 esac
3701 if depmode=$depmode \
3702 source=sub/conftest.c object=$am__obj \
3703 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3704 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3705 >/dev/null 2>conftest.err &&
3706 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3707 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3708 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3709 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3710 # icc doesn't choke on unknown options, it will just issue warnings
3711 # or remarks (even with -Werror). So we grep stderr for any message
3712 # that says an option was ignored or not supported.
3713 # When given -MP, icc 7.0 and 7.1 complain thusly:
3714 # icc: Command line warning: ignoring option '-M'; no argument required
3715 # The diagnosis changed in icc 8.0:
3716 # icc: Command line remark: option '-MP' not supported
3717 if (grep 'ignoring option' conftest.err ||
3718 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3719 am_cv_CC_dependencies_compiler_type=$depmode
3720 break
3721 fi
3722 fi
3723 done
3724
3725 cd ..
3726 rm -rf conftest.dir
3727 else
3728 am_cv_CC_dependencies_compiler_type=none
3729 fi
3730
3731 fi
3732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
3733 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
3734 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3735
3736 if
3737 test "x$enable_dependency_tracking" != xno \
3738 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
3739 am__fastdepCC_TRUE=
3740 am__fastdepCC_FALSE='#'
3741 else
3742 am__fastdepCC_TRUE='#'
3743 am__fastdepCC_FALSE=
3744 fi
3745
3746
3747
3748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
3749 $as_echo_n "checking for library containing strerror... " >&6; }
3750 if test "${ac_cv_search_strerror+set}" = set; then :
3751 $as_echo_n "(cached) " >&6
3752 else
3753 ac_func_search_save_LIBS=$LIBS
3754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3755 /* end confdefs.h. */
3756
3757 /* Override any GCC internal prototype to avoid an error.
3758 Use char because int might match the return type of a GCC
3759 builtin and then its argument prototype would still apply. */
3760 #ifdef __cplusplus
3761 extern "C"
3762 #endif
3763 char strerror ();
3764 int
3765 main ()
3766 {
3767 return strerror ();
3768 ;
3769 return 0;
3770 }
3771 _ACEOF
3772 for ac_lib in '' cposix; do
3773 if test -z "$ac_lib"; then
3774 ac_res="none required"
3775 else
3776 ac_res=-l$ac_lib
3777 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
3778 fi
3779 if ac_fn_c_try_link "$LINENO"; then :
3780 ac_cv_search_strerror=$ac_res
3781 fi
3782 rm -f core conftest.err conftest.$ac_objext \
3783 conftest$ac_exeext
3784 if test "${ac_cv_search_strerror+set}" = set; then :
3785 break
3786 fi
3787 done
3788 if test "${ac_cv_search_strerror+set}" = set; then :
3789
3790 else
3791 ac_cv_search_strerror=no
3792 fi
3793 rm conftest.$ac_ext
3794 LIBS=$ac_func_search_save_LIBS
3795 fi
3796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
3797 $as_echo "$ac_cv_search_strerror" >&6; }
3798 ac_res=$ac_cv_search_strerror
3799 if test "$ac_res" != no; then :
3800 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
3801
3802 fi
3803
3804 ac_ext=c
3805 ac_cpp='$CPP $CPPFLAGS'
3806 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3807 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3808 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3809 if test -n "$ac_tool_prefix"; then
3810 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3811 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3813 $as_echo_n "checking for $ac_word... " >&6; }
3814 if test "${ac_cv_prog_CC+set}" = set; then :
3815 $as_echo_n "(cached) " >&6
3816 else
3817 if test -n "$CC"; then
3818 ac_cv_prog_CC="$CC" # Let the user override the test.
3819 else
3820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3821 for as_dir in $PATH
3822 do
3823 IFS=$as_save_IFS
3824 test -z "$as_dir" && as_dir=.
3825 for ac_exec_ext in '' $ac_executable_extensions; do
3826 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3827 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3829 break 2
3830 fi
3831 done
3832 done
3833 IFS=$as_save_IFS
3834
3835 fi
3836 fi
3837 CC=$ac_cv_prog_CC
3838 if test -n "$CC"; then
3839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3840 $as_echo "$CC" >&6; }
3841 else
3842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3843 $as_echo "no" >&6; }
3844 fi
3845
3846
3847 fi
3848 if test -z "$ac_cv_prog_CC"; then
3849 ac_ct_CC=$CC
3850 # Extract the first word of "gcc", so it can be a program name with args.
3851 set dummy gcc; ac_word=$2
3852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3853 $as_echo_n "checking for $ac_word... " >&6; }
3854 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3855 $as_echo_n "(cached) " >&6
3856 else
3857 if test -n "$ac_ct_CC"; then
3858 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3859 else
3860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3861 for as_dir in $PATH
3862 do
3863 IFS=$as_save_IFS
3864 test -z "$as_dir" && as_dir=.
3865 for ac_exec_ext in '' $ac_executable_extensions; do
3866 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3867 ac_cv_prog_ac_ct_CC="gcc"
3868 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3869 break 2
3870 fi
3871 done
3872 done
3873 IFS=$as_save_IFS
3874
3875 fi
3876 fi
3877 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3878 if test -n "$ac_ct_CC"; then
3879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3880 $as_echo "$ac_ct_CC" >&6; }
3881 else
3882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3883 $as_echo "no" >&6; }
3884 fi
3885
3886 if test "x$ac_ct_CC" = x; then
3887 CC=""
3888 else
3889 case $cross_compiling:$ac_tool_warned in
3890 yes:)
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3892 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3893 ac_tool_warned=yes ;;
3894 esac
3895 CC=$ac_ct_CC
3896 fi
3897 else
3898 CC="$ac_cv_prog_CC"
3899 fi
3900
3901 if test -z "$CC"; then
3902 if test -n "$ac_tool_prefix"; then
3903 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3904 set dummy ${ac_tool_prefix}cc; ac_word=$2
3905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3906 $as_echo_n "checking for $ac_word... " >&6; }
3907 if test "${ac_cv_prog_CC+set}" = set; then :
3908 $as_echo_n "(cached) " >&6
3909 else
3910 if test -n "$CC"; then
3911 ac_cv_prog_CC="$CC" # Let the user override the test.
3912 else
3913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3914 for as_dir in $PATH
3915 do
3916 IFS=$as_save_IFS
3917 test -z "$as_dir" && as_dir=.
3918 for ac_exec_ext in '' $ac_executable_extensions; do
3919 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3920 ac_cv_prog_CC="${ac_tool_prefix}cc"
3921 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3922 break 2
3923 fi
3924 done
3925 done
3926 IFS=$as_save_IFS
3927
3928 fi
3929 fi
3930 CC=$ac_cv_prog_CC
3931 if test -n "$CC"; then
3932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3933 $as_echo "$CC" >&6; }
3934 else
3935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3936 $as_echo "no" >&6; }
3937 fi
3938
3939
3940 fi
3941 fi
3942 if test -z "$CC"; then
3943 # Extract the first word of "cc", so it can be a program name with args.
3944 set dummy cc; ac_word=$2
3945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3946 $as_echo_n "checking for $ac_word... " >&6; }
3947 if test "${ac_cv_prog_CC+set}" = set; then :
3948 $as_echo_n "(cached) " >&6
3949 else
3950 if test -n "$CC"; then
3951 ac_cv_prog_CC="$CC" # Let the user override the test.
3952 else
3953 ac_prog_rejected=no
3954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3955 for as_dir in $PATH
3956 do
3957 IFS=$as_save_IFS
3958 test -z "$as_dir" && as_dir=.
3959 for ac_exec_ext in '' $ac_executable_extensions; do
3960 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3961 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3962 ac_prog_rejected=yes
3963 continue
3964 fi
3965 ac_cv_prog_CC="cc"
3966 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3967 break 2
3968 fi
3969 done
3970 done
3971 IFS=$as_save_IFS
3972
3973 if test $ac_prog_rejected = yes; then
3974 # We found a bogon in the path, so make sure we never use it.
3975 set dummy $ac_cv_prog_CC
3976 shift
3977 if test $# != 0; then
3978 # We chose a different compiler from the bogus one.
3979 # However, it has the same basename, so the bogon will be chosen
3980 # first if we set CC to just the basename; use the full file name.
3981 shift
3982 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3983 fi
3984 fi
3985 fi
3986 fi
3987 CC=$ac_cv_prog_CC
3988 if test -n "$CC"; then
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3990 $as_echo "$CC" >&6; }
3991 else
3992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3993 $as_echo "no" >&6; }
3994 fi
3995
3996
3997 fi
3998 if test -z "$CC"; then
3999 if test -n "$ac_tool_prefix"; then
4000 for ac_prog in cl.exe
4001 do
4002 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4003 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4005 $as_echo_n "checking for $ac_word... " >&6; }
4006 if test "${ac_cv_prog_CC+set}" = set; then :
4007 $as_echo_n "(cached) " >&6
4008 else
4009 if test -n "$CC"; then
4010 ac_cv_prog_CC="$CC" # Let the user override the test.
4011 else
4012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4013 for as_dir in $PATH
4014 do
4015 IFS=$as_save_IFS
4016 test -z "$as_dir" && as_dir=.
4017 for ac_exec_ext in '' $ac_executable_extensions; do
4018 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4019 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4021 break 2
4022 fi
4023 done
4024 done
4025 IFS=$as_save_IFS
4026
4027 fi
4028 fi
4029 CC=$ac_cv_prog_CC
4030 if test -n "$CC"; then
4031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4032 $as_echo "$CC" >&6; }
4033 else
4034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4035 $as_echo "no" >&6; }
4036 fi
4037
4038
4039 test -n "$CC" && break
4040 done
4041 fi
4042 if test -z "$CC"; then
4043 ac_ct_CC=$CC
4044 for ac_prog in cl.exe
4045 do
4046 # Extract the first word of "$ac_prog", so it can be a program name with args.
4047 set dummy $ac_prog; ac_word=$2
4048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4049 $as_echo_n "checking for $ac_word... " >&6; }
4050 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4051 $as_echo_n "(cached) " >&6
4052 else
4053 if test -n "$ac_ct_CC"; then
4054 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4055 else
4056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4057 for as_dir in $PATH
4058 do
4059 IFS=$as_save_IFS
4060 test -z "$as_dir" && as_dir=.
4061 for ac_exec_ext in '' $ac_executable_extensions; do
4062 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4063 ac_cv_prog_ac_ct_CC="$ac_prog"
4064 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4065 break 2
4066 fi
4067 done
4068 done
4069 IFS=$as_save_IFS
4070
4071 fi
4072 fi
4073 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4074 if test -n "$ac_ct_CC"; then
4075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4076 $as_echo "$ac_ct_CC" >&6; }
4077 else
4078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4079 $as_echo "no" >&6; }
4080 fi
4081
4082
4083 test -n "$ac_ct_CC" && break
4084 done
4085
4086 if test "x$ac_ct_CC" = x; then
4087 CC=""
4088 else
4089 case $cross_compiling:$ac_tool_warned in
4090 yes:)
4091 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4092 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4093 ac_tool_warned=yes ;;
4094 esac
4095 CC=$ac_ct_CC
4096 fi
4097 fi
4098
4099 fi
4100
4101
4102 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4103 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4104 as_fn_error "no acceptable C compiler found in \$PATH
4105 See \`config.log' for more details." "$LINENO" 5; }
4106
4107 # Provide some information about the compiler.
4108 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4109 set X $ac_compile
4110 ac_compiler=$2
4111 for ac_option in --version -v -V -qversion; do
4112 { { ac_try="$ac_compiler $ac_option >&5"
4113 case "(($ac_try" in
4114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4115 *) ac_try_echo=$ac_try;;
4116 esac
4117 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4118 $as_echo "$ac_try_echo"; } >&5
4119 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4120 ac_status=$?
4121 if test -s conftest.err; then
4122 sed '10a\
4123 ... rest of stderr output deleted ...
4124 10q' conftest.err >conftest.er1
4125 cat conftest.er1 >&5
4126 fi
4127 rm -f conftest.er1 conftest.err
4128 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4129 test $ac_status = 0; }
4130 done
4131
4132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4133 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4134 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4135 $as_echo_n "(cached) " >&6
4136 else
4137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4138 /* end confdefs.h. */
4139
4140 int
4141 main ()
4142 {
4143 #ifndef __GNUC__
4144 choke me
4145 #endif
4146
4147 ;
4148 return 0;
4149 }
4150 _ACEOF
4151 if ac_fn_c_try_compile "$LINENO"; then :
4152 ac_compiler_gnu=yes
4153 else
4154 ac_compiler_gnu=no
4155 fi
4156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4157 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4158
4159 fi
4160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4161 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4162 if test $ac_compiler_gnu = yes; then
4163 GCC=yes
4164 else
4165 GCC=
4166 fi
4167 ac_test_CFLAGS=${CFLAGS+set}
4168 ac_save_CFLAGS=$CFLAGS
4169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4170 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4171 if test "${ac_cv_prog_cc_g+set}" = set; then :
4172 $as_echo_n "(cached) " >&6
4173 else
4174 ac_save_c_werror_flag=$ac_c_werror_flag
4175 ac_c_werror_flag=yes
4176 ac_cv_prog_cc_g=no
4177 CFLAGS="-g"
4178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4179 /* end confdefs.h. */
4180
4181 int
4182 main ()
4183 {
4184
4185 ;
4186 return 0;
4187 }
4188 _ACEOF
4189 if ac_fn_c_try_compile "$LINENO"; then :
4190 ac_cv_prog_cc_g=yes
4191 else
4192 CFLAGS=""
4193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4194 /* end confdefs.h. */
4195
4196 int
4197 main ()
4198 {
4199
4200 ;
4201 return 0;
4202 }
4203 _ACEOF
4204 if ac_fn_c_try_compile "$LINENO"; then :
4205
4206 else
4207 ac_c_werror_flag=$ac_save_c_werror_flag
4208 CFLAGS="-g"
4209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4210 /* end confdefs.h. */
4211
4212 int
4213 main ()
4214 {
4215
4216 ;
4217 return 0;
4218 }
4219 _ACEOF
4220 if ac_fn_c_try_compile "$LINENO"; then :
4221 ac_cv_prog_cc_g=yes
4222 fi
4223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4224 fi
4225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4226 fi
4227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4228 ac_c_werror_flag=$ac_save_c_werror_flag
4229 fi
4230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4231 $as_echo "$ac_cv_prog_cc_g" >&6; }
4232 if test "$ac_test_CFLAGS" = set; then
4233 CFLAGS=$ac_save_CFLAGS
4234 elif test $ac_cv_prog_cc_g = yes; then
4235 if test "$GCC" = yes; then
4236 CFLAGS="-g -O2"
4237 else
4238 CFLAGS="-g"
4239 fi
4240 else
4241 if test "$GCC" = yes; then
4242 CFLAGS="-O2"
4243 else
4244 CFLAGS=
4245 fi
4246 fi
4247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4248 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4249 if test "${ac_cv_prog_cc_c89+set}" = set; then :
4250 $as_echo_n "(cached) " >&6
4251 else
4252 ac_cv_prog_cc_c89=no
4253 ac_save_CC=$CC
4254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4255 /* end confdefs.h. */
4256 #include <stdarg.h>
4257 #include <stdio.h>
4258 #include <sys/types.h>
4259 #include <sys/stat.h>
4260 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4261 struct buf { int x; };
4262 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4263 static char *e (p, i)
4264 char **p;
4265 int i;
4266 {
4267 return p[i];
4268 }
4269 static char *f (char * (*g) (char **, int), char **p, ...)
4270 {
4271 char *s;
4272 va_list v;
4273 va_start (v,p);
4274 s = g (p, va_arg (v,int));
4275 va_end (v);
4276 return s;
4277 }
4278
4279 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4280 function prototypes and stuff, but not '\xHH' hex character constants.
4281 These don't provoke an error unfortunately, instead are silently treated
4282 as 'x'. The following induces an error, until -std is added to get
4283 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4284 array size at least. It's necessary to write '\x00'==0 to get something
4285 that's true only with -std. */
4286 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4287
4288 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4289 inside strings and character constants. */
4290 #define FOO(x) 'x'
4291 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4292
4293 int test (int i, double x);
4294 struct s1 {int (*f) (int a);};
4295 struct s2 {int (*f) (double a);};
4296 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4297 int argc;
4298 char **argv;
4299 int
4300 main ()
4301 {
4302 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4303 ;
4304 return 0;
4305 }
4306 _ACEOF
4307 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4308 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4309 do
4310 CC="$ac_save_CC $ac_arg"
4311 if ac_fn_c_try_compile "$LINENO"; then :
4312 ac_cv_prog_cc_c89=$ac_arg
4313 fi
4314 rm -f core conftest.err conftest.$ac_objext
4315 test "x$ac_cv_prog_cc_c89" != "xno" && break
4316 done
4317 rm -f conftest.$ac_ext
4318 CC=$ac_save_CC
4319
4320 fi
4321 # AC_CACHE_VAL
4322 case "x$ac_cv_prog_cc_c89" in
4323 x)
4324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4325 $as_echo "none needed" >&6; } ;;
4326 xno)
4327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4328 $as_echo "unsupported" >&6; } ;;
4329 *)
4330 CC="$CC $ac_cv_prog_cc_c89"
4331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4332 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4333 esac
4334 if test "x$ac_cv_prog_cc_c89" != xno; then :
4335
4336 fi
4337
4338 ac_ext=c
4339 ac_cpp='$CPP $CPPFLAGS'
4340 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4341 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4342 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4343
4344 depcc="$CC" am_compiler_list=
4345
4346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4347 $as_echo_n "checking dependency style of $depcc... " >&6; }
4348 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4349 $as_echo_n "(cached) " >&6
4350 else
4351 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4352 # We make a subdir and do the tests there. Otherwise we can end up
4353 # making bogus files that we don't know about and never remove. For
4354 # instance it was reported that on HP-UX the gcc test will end up
4355 # making a dummy file named `D' -- because `-MD' means `put the output
4356 # in D'.
4357 mkdir conftest.dir
4358 # Copy depcomp to subdir because otherwise we won't find it if we're
4359 # using a relative directory.
4360 cp "$am_depcomp" conftest.dir
4361 cd conftest.dir
4362 # We will build objects and dependencies in a subdirectory because
4363 # it helps to detect inapplicable dependency modes. For instance
4364 # both Tru64's cc and ICC support -MD to output dependencies as a
4365 # side effect of compilation, but ICC will put the dependencies in
4366 # the current directory while Tru64 will put them in the object
4367 # directory.
4368 mkdir sub
4369
4370 am_cv_CC_dependencies_compiler_type=none
4371 if test "$am_compiler_list" = ""; then
4372 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4373 fi
4374 am__universal=false
4375 case " $depcc " in #(
4376 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4377 esac
4378
4379 for depmode in $am_compiler_list; do
4380 # Setup a source with many dependencies, because some compilers
4381 # like to wrap large dependency lists on column 80 (with \), and
4382 # we should not choose a depcomp mode which is confused by this.
4383 #
4384 # We need to recreate these files for each test, as the compiler may
4385 # overwrite some of them when testing with obscure command lines.
4386 # This happens at least with the AIX C compiler.
4387 : > sub/conftest.c
4388 for i in 1 2 3 4 5 6; do
4389 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4390 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4391 # Solaris 8's {/usr,}/bin/sh.
4392 touch sub/conftst$i.h
4393 done
4394 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4395
4396 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4397 # mode. It turns out that the SunPro C++ compiler does not properly
4398 # handle `-M -o', and we need to detect this. Also, some Intel
4399 # versions had trouble with output in subdirs
4400 am__obj=sub/conftest.${OBJEXT-o}
4401 am__minus_obj="-o $am__obj"
4402 case $depmode in
4403 gcc)
4404 # This depmode causes a compiler race in universal mode.
4405 test "$am__universal" = false || continue
4406 ;;
4407 nosideeffect)
4408 # after this tag, mechanisms are not by side-effect, so they'll
4409 # only be used when explicitly requested
4410 if test "x$enable_dependency_tracking" = xyes; then
4411 continue
4412 else
4413 break
4414 fi
4415 ;;
4416 msvisualcpp | msvcmsys)
4417 # This compiler won't grok `-c -o', but also, the minuso test has
4418 # not run yet. These depmodes are late enough in the game, and
4419 # so weak that their functioning should not be impacted.
4420 am__obj=conftest.${OBJEXT-o}
4421 am__minus_obj=
4422 ;;
4423 none) break ;;
4424 esac
4425 if depmode=$depmode \
4426 source=sub/conftest.c object=$am__obj \
4427 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4428 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4429 >/dev/null 2>conftest.err &&
4430 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4431 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4432 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4433 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4434 # icc doesn't choke on unknown options, it will just issue warnings
4435 # or remarks (even with -Werror). So we grep stderr for any message
4436 # that says an option was ignored or not supported.
4437 # When given -MP, icc 7.0 and 7.1 complain thusly:
4438 # icc: Command line warning: ignoring option '-M'; no argument required
4439 # The diagnosis changed in icc 8.0:
4440 # icc: Command line remark: option '-MP' not supported
4441 if (grep 'ignoring option' conftest.err ||
4442 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4443 am_cv_CC_dependencies_compiler_type=$depmode
4444 break
4445 fi
4446 fi
4447 done
4448
4449 cd ..
4450 rm -rf conftest.dir
4451 else
4452 am_cv_CC_dependencies_compiler_type=none
4453 fi
4454
4455 fi
4456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4457 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4458 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4459
4460 if
4461 test "x$enable_dependency_tracking" != xno \
4462 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4463 am__fastdepCC_TRUE=
4464 am__fastdepCC_FALSE='#'
4465 else
4466 am__fastdepCC_TRUE='#'
4467 am__fastdepCC_FALSE=
4468 fi
4469
4470
4471 ac_ext=c
4472 ac_cpp='$CPP $CPPFLAGS'
4473 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4474 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4475 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4476 if test -n "$ac_tool_prefix"; then
4477 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4478 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4480 $as_echo_n "checking for $ac_word... " >&6; }
4481 if test "${ac_cv_prog_CC+set}" = set; then :
4482 $as_echo_n "(cached) " >&6
4483 else
4484 if test -n "$CC"; then
4485 ac_cv_prog_CC="$CC" # Let the user override the test.
4486 else
4487 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4488 for as_dir in $PATH
4489 do
4490 IFS=$as_save_IFS
4491 test -z "$as_dir" && as_dir=.
4492 for ac_exec_ext in '' $ac_executable_extensions; do
4493 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4494 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4495 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4496 break 2
4497 fi
4498 done
4499 done
4500 IFS=$as_save_IFS
4501
4502 fi
4503 fi
4504 CC=$ac_cv_prog_CC
4505 if test -n "$CC"; then
4506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4507 $as_echo "$CC" >&6; }
4508 else
4509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4510 $as_echo "no" >&6; }
4511 fi
4512
4513
4514 fi
4515 if test -z "$ac_cv_prog_CC"; then
4516 ac_ct_CC=$CC
4517 # Extract the first word of "gcc", so it can be a program name with args.
4518 set dummy gcc; ac_word=$2
4519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4520 $as_echo_n "checking for $ac_word... " >&6; }
4521 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4522 $as_echo_n "(cached) " >&6
4523 else
4524 if test -n "$ac_ct_CC"; then
4525 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4526 else
4527 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4528 for as_dir in $PATH
4529 do
4530 IFS=$as_save_IFS
4531 test -z "$as_dir" && as_dir=.
4532 for ac_exec_ext in '' $ac_executable_extensions; do
4533 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4534 ac_cv_prog_ac_ct_CC="gcc"
4535 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4536 break 2
4537 fi
4538 done
4539 done
4540 IFS=$as_save_IFS
4541
4542 fi
4543 fi
4544 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4545 if test -n "$ac_ct_CC"; then
4546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4547 $as_echo "$ac_ct_CC" >&6; }
4548 else
4549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4550 $as_echo "no" >&6; }
4551 fi
4552
4553 if test "x$ac_ct_CC" = x; then
4554 CC=""
4555 else
4556 case $cross_compiling:$ac_tool_warned in
4557 yes:)
4558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4559 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4560 ac_tool_warned=yes ;;
4561 esac
4562 CC=$ac_ct_CC
4563 fi
4564 else
4565 CC="$ac_cv_prog_CC"
4566 fi
4567
4568 if test -z "$CC"; then
4569 if test -n "$ac_tool_prefix"; then
4570 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4571 set dummy ${ac_tool_prefix}cc; ac_word=$2
4572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4573 $as_echo_n "checking for $ac_word... " >&6; }
4574 if test "${ac_cv_prog_CC+set}" = set; then :
4575 $as_echo_n "(cached) " >&6
4576 else
4577 if test -n "$CC"; then
4578 ac_cv_prog_CC="$CC" # Let the user override the test.
4579 else
4580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4581 for as_dir in $PATH
4582 do
4583 IFS=$as_save_IFS
4584 test -z "$as_dir" && as_dir=.
4585 for ac_exec_ext in '' $ac_executable_extensions; do
4586 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4587 ac_cv_prog_CC="${ac_tool_prefix}cc"
4588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4589 break 2
4590 fi
4591 done
4592 done
4593 IFS=$as_save_IFS
4594
4595 fi
4596 fi
4597 CC=$ac_cv_prog_CC
4598 if test -n "$CC"; then
4599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4600 $as_echo "$CC" >&6; }
4601 else
4602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4603 $as_echo "no" >&6; }
4604 fi
4605
4606
4607 fi
4608 fi
4609 if test -z "$CC"; then
4610 # Extract the first word of "cc", so it can be a program name with args.
4611 set dummy cc; ac_word=$2
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4613 $as_echo_n "checking for $ac_word... " >&6; }
4614 if test "${ac_cv_prog_CC+set}" = set; then :
4615 $as_echo_n "(cached) " >&6
4616 else
4617 if test -n "$CC"; then
4618 ac_cv_prog_CC="$CC" # Let the user override the test.
4619 else
4620 ac_prog_rejected=no
4621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4622 for as_dir in $PATH
4623 do
4624 IFS=$as_save_IFS
4625 test -z "$as_dir" && as_dir=.
4626 for ac_exec_ext in '' $ac_executable_extensions; do
4627 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4628 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4629 ac_prog_rejected=yes
4630 continue
4631 fi
4632 ac_cv_prog_CC="cc"
4633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4634 break 2
4635 fi
4636 done
4637 done
4638 IFS=$as_save_IFS
4639
4640 if test $ac_prog_rejected = yes; then
4641 # We found a bogon in the path, so make sure we never use it.
4642 set dummy $ac_cv_prog_CC
4643 shift
4644 if test $# != 0; then
4645 # We chose a different compiler from the bogus one.
4646 # However, it has the same basename, so the bogon will be chosen
4647 # first if we set CC to just the basename; use the full file name.
4648 shift
4649 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4650 fi
4651 fi
4652 fi
4653 fi
4654 CC=$ac_cv_prog_CC
4655 if test -n "$CC"; then
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4657 $as_echo "$CC" >&6; }
4658 else
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4660 $as_echo "no" >&6; }
4661 fi
4662
4663
4664 fi
4665 if test -z "$CC"; then
4666 if test -n "$ac_tool_prefix"; then
4667 for ac_prog in cl.exe
4668 do
4669 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4670 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4672 $as_echo_n "checking for $ac_word... " >&6; }
4673 if test "${ac_cv_prog_CC+set}" = set; then :
4674 $as_echo_n "(cached) " >&6
4675 else
4676 if test -n "$CC"; then
4677 ac_cv_prog_CC="$CC" # Let the user override the test.
4678 else
4679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4680 for as_dir in $PATH
4681 do
4682 IFS=$as_save_IFS
4683 test -z "$as_dir" && as_dir=.
4684 for ac_exec_ext in '' $ac_executable_extensions; do
4685 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4686 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4688 break 2
4689 fi
4690 done
4691 done
4692 IFS=$as_save_IFS
4693
4694 fi
4695 fi
4696 CC=$ac_cv_prog_CC
4697 if test -n "$CC"; then
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4699 $as_echo "$CC" >&6; }
4700 else
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4702 $as_echo "no" >&6; }
4703 fi
4704
4705
4706 test -n "$CC" && break
4707 done
4708 fi
4709 if test -z "$CC"; then
4710 ac_ct_CC=$CC
4711 for ac_prog in cl.exe
4712 do
4713 # Extract the first word of "$ac_prog", so it can be a program name with args.
4714 set dummy $ac_prog; ac_word=$2
4715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4716 $as_echo_n "checking for $ac_word... " >&6; }
4717 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4718 $as_echo_n "(cached) " >&6
4719 else
4720 if test -n "$ac_ct_CC"; then
4721 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4722 else
4723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4724 for as_dir in $PATH
4725 do
4726 IFS=$as_save_IFS
4727 test -z "$as_dir" && as_dir=.
4728 for ac_exec_ext in '' $ac_executable_extensions; do
4729 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4730 ac_cv_prog_ac_ct_CC="$ac_prog"
4731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4732 break 2
4733 fi
4734 done
4735 done
4736 IFS=$as_save_IFS
4737
4738 fi
4739 fi
4740 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4741 if test -n "$ac_ct_CC"; then
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4743 $as_echo "$ac_ct_CC" >&6; }
4744 else
4745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4746 $as_echo "no" >&6; }
4747 fi
4748
4749
4750 test -n "$ac_ct_CC" && break
4751 done
4752
4753 if test "x$ac_ct_CC" = x; then
4754 CC=""
4755 else
4756 case $cross_compiling:$ac_tool_warned in
4757 yes:)
4758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4759 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4760 ac_tool_warned=yes ;;
4761 esac
4762 CC=$ac_ct_CC
4763 fi
4764 fi
4765
4766 fi
4767
4768
4769 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4770 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4771 as_fn_error "no acceptable C compiler found in \$PATH
4772 See \`config.log' for more details." "$LINENO" 5; }
4773
4774 # Provide some information about the compiler.
4775 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4776 set X $ac_compile
4777 ac_compiler=$2
4778 for ac_option in --version -v -V -qversion; do
4779 { { ac_try="$ac_compiler $ac_option >&5"
4780 case "(($ac_try" in
4781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4782 *) ac_try_echo=$ac_try;;
4783 esac
4784 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4785 $as_echo "$ac_try_echo"; } >&5
4786 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4787 ac_status=$?
4788 if test -s conftest.err; then
4789 sed '10a\
4790 ... rest of stderr output deleted ...
4791 10q' conftest.err >conftest.er1
4792 cat conftest.er1 >&5
4793 fi
4794 rm -f conftest.er1 conftest.err
4795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4796 test $ac_status = 0; }
4797 done
4798
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4800 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4801 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4802 $as_echo_n "(cached) " >&6
4803 else
4804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4805 /* end confdefs.h. */
4806
4807 int
4808 main ()
4809 {
4810 #ifndef __GNUC__
4811 choke me
4812 #endif
4813
4814 ;
4815 return 0;
4816 }
4817 _ACEOF
4818 if ac_fn_c_try_compile "$LINENO"; then :
4819 ac_compiler_gnu=yes
4820 else
4821 ac_compiler_gnu=no
4822 fi
4823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4824 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4825
4826 fi
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4828 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4829 if test $ac_compiler_gnu = yes; then
4830 GCC=yes
4831 else
4832 GCC=
4833 fi
4834 ac_test_CFLAGS=${CFLAGS+set}
4835 ac_save_CFLAGS=$CFLAGS
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4837 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4838 if test "${ac_cv_prog_cc_g+set}" = set; then :
4839 $as_echo_n "(cached) " >&6
4840 else
4841 ac_save_c_werror_flag=$ac_c_werror_flag
4842 ac_c_werror_flag=yes
4843 ac_cv_prog_cc_g=no
4844 CFLAGS="-g"
4845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4846 /* end confdefs.h. */
4847
4848 int
4849 main ()
4850 {
4851
4852 ;
4853 return 0;
4854 }
4855 _ACEOF
4856 if ac_fn_c_try_compile "$LINENO"; then :
4857 ac_cv_prog_cc_g=yes
4858 else
4859 CFLAGS=""
4860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4861 /* end confdefs.h. */
4862
4863 int
4864 main ()
4865 {
4866
4867 ;
4868 return 0;
4869 }
4870 _ACEOF
4871 if ac_fn_c_try_compile "$LINENO"; then :
4872
4873 else
4874 ac_c_werror_flag=$ac_save_c_werror_flag
4875 CFLAGS="-g"
4876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4877 /* end confdefs.h. */
4878
4879 int
4880 main ()
4881 {
4882
4883 ;
4884 return 0;
4885 }
4886 _ACEOF
4887 if ac_fn_c_try_compile "$LINENO"; then :
4888 ac_cv_prog_cc_g=yes
4889 fi
4890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4891 fi
4892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4893 fi
4894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4895 ac_c_werror_flag=$ac_save_c_werror_flag
4896 fi
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4898 $as_echo "$ac_cv_prog_cc_g" >&6; }
4899 if test "$ac_test_CFLAGS" = set; then
4900 CFLAGS=$ac_save_CFLAGS
4901 elif test $ac_cv_prog_cc_g = yes; then
4902 if test "$GCC" = yes; then
4903 CFLAGS="-g -O2"
4904 else
4905 CFLAGS="-g"
4906 fi
4907 else
4908 if test "$GCC" = yes; then
4909 CFLAGS="-O2"
4910 else
4911 CFLAGS=
4912 fi
4913 fi
4914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4915 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4916 if test "${ac_cv_prog_cc_c89+set}" = set; then :
4917 $as_echo_n "(cached) " >&6
4918 else
4919 ac_cv_prog_cc_c89=no
4920 ac_save_CC=$CC
4921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4922 /* end confdefs.h. */
4923 #include <stdarg.h>
4924 #include <stdio.h>
4925 #include <sys/types.h>
4926 #include <sys/stat.h>
4927 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4928 struct buf { int x; };
4929 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4930 static char *e (p, i)
4931 char **p;
4932 int i;
4933 {
4934 return p[i];
4935 }
4936 static char *f (char * (*g) (char **, int), char **p, ...)
4937 {
4938 char *s;
4939 va_list v;
4940 va_start (v,p);
4941 s = g (p, va_arg (v,int));
4942 va_end (v);
4943 return s;
4944 }
4945
4946 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4947 function prototypes and stuff, but not '\xHH' hex character constants.
4948 These don't provoke an error unfortunately, instead are silently treated
4949 as 'x'. The following induces an error, until -std is added to get
4950 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4951 array size at least. It's necessary to write '\x00'==0 to get something
4952 that's true only with -std. */
4953 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4954
4955 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4956 inside strings and character constants. */
4957 #define FOO(x) 'x'
4958 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4959
4960 int test (int i, double x);
4961 struct s1 {int (*f) (int a);};
4962 struct s2 {int (*f) (double a);};
4963 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4964 int argc;
4965 char **argv;
4966 int
4967 main ()
4968 {
4969 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4970 ;
4971 return 0;
4972 }
4973 _ACEOF
4974 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4975 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4976 do
4977 CC="$ac_save_CC $ac_arg"
4978 if ac_fn_c_try_compile "$LINENO"; then :
4979 ac_cv_prog_cc_c89=$ac_arg
4980 fi
4981 rm -f core conftest.err conftest.$ac_objext
4982 test "x$ac_cv_prog_cc_c89" != "xno" && break
4983 done
4984 rm -f conftest.$ac_ext
4985 CC=$ac_save_CC
4986
4987 fi
4988 # AC_CACHE_VAL
4989 case "x$ac_cv_prog_cc_c89" in
4990 x)
4991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4992 $as_echo "none needed" >&6; } ;;
4993 xno)
4994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4995 $as_echo "unsupported" >&6; } ;;
4996 *)
4997 CC="$CC $ac_cv_prog_cc_c89"
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4999 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5000 esac
5001 if test "x$ac_cv_prog_cc_c89" != xno; then :
5002
5003 fi
5004
5005 ac_ext=c
5006 ac_cpp='$CPP $CPPFLAGS'
5007 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5008 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5009 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5010
5011 depcc="$CC" am_compiler_list=
5012
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5014 $as_echo_n "checking dependency style of $depcc... " >&6; }
5015 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5016 $as_echo_n "(cached) " >&6
5017 else
5018 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5019 # We make a subdir and do the tests there. Otherwise we can end up
5020 # making bogus files that we don't know about and never remove. For
5021 # instance it was reported that on HP-UX the gcc test will end up
5022 # making a dummy file named `D' -- because `-MD' means `put the output
5023 # in D'.
5024 mkdir conftest.dir
5025 # Copy depcomp to subdir because otherwise we won't find it if we're
5026 # using a relative directory.
5027 cp "$am_depcomp" conftest.dir
5028 cd conftest.dir
5029 # We will build objects and dependencies in a subdirectory because
5030 # it helps to detect inapplicable dependency modes. For instance
5031 # both Tru64's cc and ICC support -MD to output dependencies as a
5032 # side effect of compilation, but ICC will put the dependencies in
5033 # the current directory while Tru64 will put them in the object
5034 # directory.
5035 mkdir sub
5036
5037 am_cv_CC_dependencies_compiler_type=none
5038 if test "$am_compiler_list" = ""; then
5039 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5040 fi
5041 am__universal=false
5042 case " $depcc " in #(
5043 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5044 esac
5045
5046 for depmode in $am_compiler_list; do
5047 # Setup a source with many dependencies, because some compilers
5048 # like to wrap large dependency lists on column 80 (with \), and
5049 # we should not choose a depcomp mode which is confused by this.
5050 #
5051 # We need to recreate these files for each test, as the compiler may
5052 # overwrite some of them when testing with obscure command lines.
5053 # This happens at least with the AIX C compiler.
5054 : > sub/conftest.c
5055 for i in 1 2 3 4 5 6; do
5056 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5057 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5058 # Solaris 8's {/usr,}/bin/sh.
5059 touch sub/conftst$i.h
5060 done
5061 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5062
5063 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5064 # mode. It turns out that the SunPro C++ compiler does not properly
5065 # handle `-M -o', and we need to detect this. Also, some Intel
5066 # versions had trouble with output in subdirs
5067 am__obj=sub/conftest.${OBJEXT-o}
5068 am__minus_obj="-o $am__obj"
5069 case $depmode in
5070 gcc)
5071 # This depmode causes a compiler race in universal mode.
5072 test "$am__universal" = false || continue
5073 ;;
5074 nosideeffect)
5075 # after this tag, mechanisms are not by side-effect, so they'll
5076 # only be used when explicitly requested
5077 if test "x$enable_dependency_tracking" = xyes; then
5078 continue
5079 else
5080 break
5081 fi
5082 ;;
5083 msvisualcpp | msvcmsys)
5084 # This compiler won't grok `-c -o', but also, the minuso test has
5085 # not run yet. These depmodes are late enough in the game, and
5086 # so weak that their functioning should not be impacted.
5087 am__obj=conftest.${OBJEXT-o}
5088 am__minus_obj=
5089 ;;
5090 none) break ;;
5091 esac
5092 if depmode=$depmode \
5093 source=sub/conftest.c object=$am__obj \
5094 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5095 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5096 >/dev/null 2>conftest.err &&
5097 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5098 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5099 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5100 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5101 # icc doesn't choke on unknown options, it will just issue warnings
5102 # or remarks (even with -Werror). So we grep stderr for any message
5103 # that says an option was ignored or not supported.
5104 # When given -MP, icc 7.0 and 7.1 complain thusly:
5105 # icc: Command line warning: ignoring option '-M'; no argument required
5106 # The diagnosis changed in icc 8.0:
5107 # icc: Command line remark: option '-MP' not supported
5108 if (grep 'ignoring option' conftest.err ||
5109 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5110 am_cv_CC_dependencies_compiler_type=$depmode
5111 break
5112 fi
5113 fi
5114 done
5115
5116 cd ..
5117 rm -rf conftest.dir
5118 else
5119 am_cv_CC_dependencies_compiler_type=none
5120 fi
5121
5122 fi
5123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5124 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5125 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5126
5127 if
5128 test "x$enable_dependency_tracking" != xno \
5129 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5130 am__fastdepCC_TRUE=
5131 am__fastdepCC_FALSE='#'
5132 else
5133 am__fastdepCC_TRUE='#'
5134 am__fastdepCC_FALSE=
5135 fi
5136
5137
5138
5139 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
5140
5141 ac_ext=c
5142 ac_cpp='$CPP $CPPFLAGS'
5143 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5144 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5145 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5147 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5148 # On Suns, sometimes $CPP names a directory.
5149 if test -n "$CPP" && test -d "$CPP"; then
5150 CPP=
5151 fi
5152 if test -z "$CPP"; then
5153 if test "${ac_cv_prog_CPP+set}" = set; then :
5154 $as_echo_n "(cached) " >&6
5155 else
5156 # Double quotes because CPP needs to be expanded
5157 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5158 do
5159 ac_preproc_ok=false
5160 for ac_c_preproc_warn_flag in '' yes
5161 do
5162 # Use a header file that comes with gcc, so configuring glibc
5163 # with a fresh cross-compiler works.
5164 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5165 # <limits.h> exists even on freestanding compilers.
5166 # On the NeXT, cc -E runs the code through the compiler's parser,
5167 # not just through cpp. "Syntax error" is here to catch this case.
5168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5169 /* end confdefs.h. */
5170 #ifdef __STDC__
5171 # include <limits.h>
5172 #else
5173 # include <assert.h>
5174 #endif
5175 Syntax error
5176 _ACEOF
5177 if ac_fn_c_try_cpp "$LINENO"; then :
5178
5179 else
5180 # Broken: fails on valid input.
5181 continue
5182 fi
5183 rm -f conftest.err conftest.$ac_ext
5184
5185 # OK, works on sane cases. Now check whether nonexistent headers
5186 # can be detected and how.
5187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5188 /* end confdefs.h. */
5189 #include <ac_nonexistent.h>
5190 _ACEOF
5191 if ac_fn_c_try_cpp "$LINENO"; then :
5192 # Broken: success on invalid input.
5193 continue
5194 else
5195 # Passes both tests.
5196 ac_preproc_ok=:
5197 break
5198 fi
5199 rm -f conftest.err conftest.$ac_ext
5200
5201 done
5202 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5203 rm -f conftest.err conftest.$ac_ext
5204 if $ac_preproc_ok; then :
5205 break
5206 fi
5207
5208 done
5209 ac_cv_prog_CPP=$CPP
5210
5211 fi
5212 CPP=$ac_cv_prog_CPP
5213 else
5214 ac_cv_prog_CPP=$CPP
5215 fi
5216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5217 $as_echo "$CPP" >&6; }
5218 ac_preproc_ok=false
5219 for ac_c_preproc_warn_flag in '' yes
5220 do
5221 # Use a header file that comes with gcc, so configuring glibc
5222 # with a fresh cross-compiler works.
5223 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5224 # <limits.h> exists even on freestanding compilers.
5225 # On the NeXT, cc -E runs the code through the compiler's parser,
5226 # not just through cpp. "Syntax error" is here to catch this case.
5227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5228 /* end confdefs.h. */
5229 #ifdef __STDC__
5230 # include <limits.h>
5231 #else
5232 # include <assert.h>
5233 #endif
5234 Syntax error
5235 _ACEOF
5236 if ac_fn_c_try_cpp "$LINENO"; then :
5237
5238 else
5239 # Broken: fails on valid input.
5240 continue
5241 fi
5242 rm -f conftest.err conftest.$ac_ext
5243
5244 # OK, works on sane cases. Now check whether nonexistent headers
5245 # can be detected and how.
5246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5247 /* end confdefs.h. */
5248 #include <ac_nonexistent.h>
5249 _ACEOF
5250 if ac_fn_c_try_cpp "$LINENO"; then :
5251 # Broken: success on invalid input.
5252 continue
5253 else
5254 # Passes both tests.
5255 ac_preproc_ok=:
5256 break
5257 fi
5258 rm -f conftest.err conftest.$ac_ext
5259
5260 done
5261 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5262 rm -f conftest.err conftest.$ac_ext
5263 if $ac_preproc_ok; then :
5264
5265 else
5266 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5267 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5268 as_fn_error "C preprocessor \"$CPP\" fails sanity check
5269 See \`config.log' for more details." "$LINENO" 5; }
5270 fi
5271
5272 ac_ext=c
5273 ac_cpp='$CPP $CPPFLAGS'
5274 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5275 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5276 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5277
5278
5279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5280 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5281 if test "${ac_cv_path_GREP+set}" = set; then :
5282 $as_echo_n "(cached) " >&6
5283 else
5284 if test -z "$GREP"; then
5285 ac_path_GREP_found=false
5286 # Loop through the user's path and test for each of PROGNAME-LIST
5287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5288 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5289 do
5290 IFS=$as_save_IFS
5291 test -z "$as_dir" && as_dir=.
5292 for ac_prog in grep ggrep; do
5293 for ac_exec_ext in '' $ac_executable_extensions; do
5294 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5295 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5296 # Check for GNU ac_path_GREP and select it if it is found.
5297 # Check for GNU $ac_path_GREP
5298 case `"$ac_path_GREP" --version 2>&1` in
5299 *GNU*)
5300 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5301 *)
5302 ac_count=0
5303 $as_echo_n 0123456789 >"conftest.in"
5304 while :
5305 do
5306 cat "conftest.in" "conftest.in" >"conftest.tmp"
5307 mv "conftest.tmp" "conftest.in"
5308 cp "conftest.in" "conftest.nl"
5309 $as_echo 'GREP' >> "conftest.nl"
5310 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5311 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5312 as_fn_arith $ac_count + 1 && ac_count=$as_val
5313 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5314 # Best one so far, save it but keep looking for a better one
5315 ac_cv_path_GREP="$ac_path_GREP"
5316 ac_path_GREP_max=$ac_count
5317 fi
5318 # 10*(2^10) chars as input seems more than enough
5319 test $ac_count -gt 10 && break
5320 done
5321 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5322 esac
5323
5324 $ac_path_GREP_found && break 3
5325 done
5326 done
5327 done
5328 IFS=$as_save_IFS
5329 if test -z "$ac_cv_path_GREP"; then
5330 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5331 fi
5332 else
5333 ac_cv_path_GREP=$GREP
5334 fi
5335
5336 fi
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5338 $as_echo "$ac_cv_path_GREP" >&6; }
5339 GREP="$ac_cv_path_GREP"
5340
5341
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5343 $as_echo_n "checking for egrep... " >&6; }
5344 if test "${ac_cv_path_EGREP+set}" = set; then :
5345 $as_echo_n "(cached) " >&6
5346 else
5347 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5348 then ac_cv_path_EGREP="$GREP -E"
5349 else
5350 if test -z "$EGREP"; then
5351 ac_path_EGREP_found=false
5352 # Loop through the user's path and test for each of PROGNAME-LIST
5353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5354 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5355 do
5356 IFS=$as_save_IFS
5357 test -z "$as_dir" && as_dir=.
5358 for ac_prog in egrep; do
5359 for ac_exec_ext in '' $ac_executable_extensions; do
5360 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5361 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5362 # Check for GNU ac_path_EGREP and select it if it is found.
5363 # Check for GNU $ac_path_EGREP
5364 case `"$ac_path_EGREP" --version 2>&1` in
5365 *GNU*)
5366 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5367 *)
5368 ac_count=0
5369 $as_echo_n 0123456789 >"conftest.in"
5370 while :
5371 do
5372 cat "conftest.in" "conftest.in" >"conftest.tmp"
5373 mv "conftest.tmp" "conftest.in"
5374 cp "conftest.in" "conftest.nl"
5375 $as_echo 'EGREP' >> "conftest.nl"
5376 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5377 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5378 as_fn_arith $ac_count + 1 && ac_count=$as_val
5379 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5380 # Best one so far, save it but keep looking for a better one
5381 ac_cv_path_EGREP="$ac_path_EGREP"
5382 ac_path_EGREP_max=$ac_count
5383 fi
5384 # 10*(2^10) chars as input seems more than enough
5385 test $ac_count -gt 10 && break
5386 done
5387 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5388 esac
5389
5390 $ac_path_EGREP_found && break 3
5391 done
5392 done
5393 done
5394 IFS=$as_save_IFS
5395 if test -z "$ac_cv_path_EGREP"; then
5396 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5397 fi
5398 else
5399 ac_cv_path_EGREP=$EGREP
5400 fi
5401
5402 fi
5403 fi
5404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5405 $as_echo "$ac_cv_path_EGREP" >&6; }
5406 EGREP="$ac_cv_path_EGREP"
5407
5408
5409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5410 $as_echo_n "checking for ANSI C header files... " >&6; }
5411 if test "${ac_cv_header_stdc+set}" = set; then :
5412 $as_echo_n "(cached) " >&6
5413 else
5414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5415 /* end confdefs.h. */
5416 #include <stdlib.h>
5417 #include <stdarg.h>
5418 #include <string.h>
5419 #include <float.h>
5420
5421 int
5422 main ()
5423 {
5424
5425 ;
5426 return 0;
5427 }
5428 _ACEOF
5429 if ac_fn_c_try_compile "$LINENO"; then :
5430 ac_cv_header_stdc=yes
5431 else
5432 ac_cv_header_stdc=no
5433 fi
5434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5435
5436 if test $ac_cv_header_stdc = yes; then
5437 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5439 /* end confdefs.h. */
5440 #include <string.h>
5441
5442 _ACEOF
5443 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5444 $EGREP "memchr" >/dev/null 2>&1; then :
5445
5446 else
5447 ac_cv_header_stdc=no
5448 fi
5449 rm -f conftest*
5450
5451 fi
5452
5453 if test $ac_cv_header_stdc = yes; then
5454 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5456 /* end confdefs.h. */
5457 #include <stdlib.h>
5458
5459 _ACEOF
5460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5461 $EGREP "free" >/dev/null 2>&1; then :
5462
5463 else
5464 ac_cv_header_stdc=no
5465 fi
5466 rm -f conftest*
5467
5468 fi
5469
5470 if test $ac_cv_header_stdc = yes; then
5471 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5472 if test "$cross_compiling" = yes; then :
5473 :
5474 else
5475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5476 /* end confdefs.h. */
5477 #include <ctype.h>
5478 #include <stdlib.h>
5479 #if ((' ' & 0x0FF) == 0x020)
5480 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5481 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5482 #else
5483 # define ISLOWER(c) \
5484 (('a' <= (c) && (c) <= 'i') \
5485 || ('j' <= (c) && (c) <= 'r') \
5486 || ('s' <= (c) && (c) <= 'z'))
5487 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5488 #endif
5489
5490 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5491 int
5492 main ()
5493 {
5494 int i;
5495 for (i = 0; i < 256; i++)
5496 if (XOR (islower (i), ISLOWER (i))
5497 || toupper (i) != TOUPPER (i))
5498 return 2;
5499 return 0;
5500 }
5501 _ACEOF
5502 if ac_fn_c_try_run "$LINENO"; then :
5503
5504 else
5505 ac_cv_header_stdc=no
5506 fi
5507 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5508 conftest.$ac_objext conftest.beam conftest.$ac_ext
5509 fi
5510
5511 fi
5512 fi
5513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5514 $as_echo "$ac_cv_header_stdc" >&6; }
5515 if test $ac_cv_header_stdc = yes; then
5516
5517 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5518
5519 fi
5520
5521 case `pwd` in
5522 *\ * | *\ *)
5523 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
5524 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
5525 esac
5526
5527
5528
5529 macro_version='2.2.6b'
5530 macro_revision='1.3017'
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544 ltmain="$ac_aux_dir/ltmain.sh"
5545
5546 # Make sure we can run config.sub.
5547 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5548 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5549
5550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5551 $as_echo_n "checking build system type... " >&6; }
5552 if test "${ac_cv_build+set}" = set; then :
5553 $as_echo_n "(cached) " >&6
5554 else
5555 ac_build_alias=$build_alias
5556 test "x$ac_build_alias" = x &&
5557 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5558 test "x$ac_build_alias" = x &&
5559 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
5560 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5561 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5562
5563 fi
5564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5565 $as_echo "$ac_cv_build" >&6; }
5566 case $ac_cv_build in
5567 *-*-*) ;;
5568 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
5569 esac
5570 build=$ac_cv_build
5571 ac_save_IFS=$IFS; IFS='-'
5572 set x $ac_cv_build
5573 shift
5574 build_cpu=$1
5575 build_vendor=$2
5576 shift; shift
5577 # Remember, the first character of IFS is used to create $*,
5578 # except with old shells:
5579 build_os=$*
5580 IFS=$ac_save_IFS
5581 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5582
5583
5584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5585 $as_echo_n "checking host system type... " >&6; }
5586 if test "${ac_cv_host+set}" = set; then :
5587 $as_echo_n "(cached) " >&6
5588 else
5589 if test "x$host_alias" = x; then
5590 ac_cv_host=$ac_cv_build
5591 else
5592 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5593 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5594 fi
5595
5596 fi
5597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5598 $as_echo "$ac_cv_host" >&6; }
5599 case $ac_cv_host in
5600 *-*-*) ;;
5601 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
5602 esac
5603 host=$ac_cv_host
5604 ac_save_IFS=$IFS; IFS='-'
5605 set x $ac_cv_host
5606 shift
5607 host_cpu=$1
5608 host_vendor=$2
5609 shift; shift
5610 # Remember, the first character of IFS is used to create $*,
5611 # except with old shells:
5612 host_os=$*
5613 IFS=$ac_save_IFS
5614 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5615
5616
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
5618 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
5619 if test "${ac_cv_path_SED+set}" = set; then :
5620 $as_echo_n "(cached) " >&6
5621 else
5622 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5623 for ac_i in 1 2 3 4 5 6 7; do
5624 ac_script="$ac_script$as_nl$ac_script"
5625 done
5626 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5627 { ac_script=; unset ac_script;}
5628 if test -z "$SED"; then
5629 ac_path_SED_found=false
5630 # Loop through the user's path and test for each of PROGNAME-LIST
5631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5632 for as_dir in $PATH
5633 do
5634 IFS=$as_save_IFS
5635 test -z "$as_dir" && as_dir=.
5636 for ac_prog in sed gsed; do
5637 for ac_exec_ext in '' $ac_executable_extensions; do
5638 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
5639 { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
5640 # Check for GNU ac_path_SED and select it if it is found.
5641 # Check for GNU $ac_path_SED
5642 case `"$ac_path_SED" --version 2>&1` in
5643 *GNU*)
5644 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5645 *)
5646 ac_count=0
5647 $as_echo_n 0123456789 >"conftest.in"
5648 while :
5649 do
5650 cat "conftest.in" "conftest.in" >"conftest.tmp"
5651 mv "conftest.tmp" "conftest.in"
5652 cp "conftest.in" "conftest.nl"
5653 $as_echo '' >> "conftest.nl"
5654 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5655 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5656 as_fn_arith $ac_count + 1 && ac_count=$as_val
5657 if test $ac_count -gt ${ac_path_SED_max-0}; then
5658 # Best one so far, save it but keep looking for a better one
5659 ac_cv_path_SED="$ac_path_SED"
5660 ac_path_SED_max=$ac_count
5661 fi
5662 # 10*(2^10) chars as input seems more than enough
5663 test $ac_count -gt 10 && break
5664 done
5665 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5666 esac
5667
5668 $ac_path_SED_found && break 3
5669 done
5670 done
5671 done
5672 IFS=$as_save_IFS
5673 if test -z "$ac_cv_path_SED"; then
5674 as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
5675 fi
5676 else
5677 ac_cv_path_SED=$SED
5678 fi
5679
5680 fi
5681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
5682 $as_echo "$ac_cv_path_SED" >&6; }
5683 SED="$ac_cv_path_SED"
5684 rm -f conftest.sed
5685
5686 test -z "$SED" && SED=sed
5687 Xsed="$SED -e 1s/^X//"
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5700 $as_echo_n "checking for fgrep... " >&6; }
5701 if test "${ac_cv_path_FGREP+set}" = set; then :
5702 $as_echo_n "(cached) " >&6
5703 else
5704 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5705 then ac_cv_path_FGREP="$GREP -F"
5706 else
5707 if test -z "$FGREP"; then
5708 ac_path_FGREP_found=false
5709 # Loop through the user's path and test for each of PROGNAME-LIST
5710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5712 do
5713 IFS=$as_save_IFS
5714 test -z "$as_dir" && as_dir=.
5715 for ac_prog in fgrep; do
5716 for ac_exec_ext in '' $ac_executable_extensions; do
5717 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
5718 { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
5719 # Check for GNU ac_path_FGREP and select it if it is found.
5720 # Check for GNU $ac_path_FGREP
5721 case `"$ac_path_FGREP" --version 2>&1` in
5722 *GNU*)
5723 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
5724 *)
5725 ac_count=0
5726 $as_echo_n 0123456789 >"conftest.in"
5727 while :
5728 do
5729 cat "conftest.in" "conftest.in" >"conftest.tmp"
5730 mv "conftest.tmp" "conftest.in"
5731 cp "conftest.in" "conftest.nl"
5732 $as_echo 'FGREP' >> "conftest.nl"
5733 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
5734 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5735 as_fn_arith $ac_count + 1 && ac_count=$as_val
5736 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
5737 # Best one so far, save it but keep looking for a better one
5738 ac_cv_path_FGREP="$ac_path_FGREP"
5739 ac_path_FGREP_max=$ac_count
5740 fi
5741 # 10*(2^10) chars as input seems more than enough
5742 test $ac_count -gt 10 && break
5743 done
5744 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5745 esac
5746
5747 $ac_path_FGREP_found && break 3
5748 done
5749 done
5750 done
5751 IFS=$as_save_IFS
5752 if test -z "$ac_cv_path_FGREP"; then
5753 as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5754 fi
5755 else
5756 ac_cv_path_FGREP=$FGREP
5757 fi
5758
5759 fi
5760 fi
5761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
5762 $as_echo "$ac_cv_path_FGREP" >&6; }
5763 FGREP="$ac_cv_path_FGREP"
5764
5765
5766 test -z "$GREP" && GREP=grep
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786 # Check whether --with-gnu-ld was given.
5787 if test "${with_gnu_ld+set}" = set; then :
5788 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5789 else
5790 with_gnu_ld=no
5791 fi
5792
5793 ac_prog=ld
5794 if test "$GCC" = yes; then
5795 # Check if gcc -print-prog-name=ld gives a path.
5796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
5797 $as_echo_n "checking for ld used by $CC... " >&6; }
5798 case $host in
5799 *-*-mingw*)
5800 # gcc leaves a trailing carriage return which upsets mingw
5801 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5802 *)
5803 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5804 esac
5805 case $ac_prog in
5806 # Accept absolute paths.
5807 [\\/]* | ?:[\\/]*)
5808 re_direlt='/[^/][^/]*/\.\./'
5809 # Canonicalize the pathname of ld
5810 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5811 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5812 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5813 done
5814 test -z "$LD" && LD="$ac_prog"
5815 ;;
5816 "")
5817 # If it fails, then pretend we aren't using GCC.
5818 ac_prog=ld
5819 ;;
5820 *)
5821 # If it is relative, then search for the first ld in PATH.
5822 with_gnu_ld=unknown
5823 ;;
5824 esac
5825 elif test "$with_gnu_ld" = yes; then
5826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5827 $as_echo_n "checking for GNU ld... " >&6; }
5828 else
5829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
5830 $as_echo_n "checking for non-GNU ld... " >&6; }
5831 fi
5832 if test "${lt_cv_path_LD+set}" = set; then :
5833 $as_echo_n "(cached) " >&6
5834 else
5835 if test -z "$LD"; then
5836 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5837 for ac_dir in $PATH; do
5838 IFS="$lt_save_ifs"
5839 test -z "$ac_dir" && ac_dir=.
5840 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5841 lt_cv_path_LD="$ac_dir/$ac_prog"
5842 # Check to see if the program is GNU ld. I'd rather use --version,
5843 # but apparently some variants of GNU ld only accept -v.
5844 # Break only if it was the GNU/non-GNU ld that we prefer.
5845 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5846 *GNU* | *'with BFD'*)
5847 test "$with_gnu_ld" != no && break
5848 ;;
5849 *)
5850 test "$with_gnu_ld" != yes && break
5851 ;;
5852 esac
5853 fi
5854 done
5855 IFS="$lt_save_ifs"
5856 else
5857 lt_cv_path_LD="$LD" # Let the user override the test with a path.
5858 fi
5859 fi
5860
5861 LD="$lt_cv_path_LD"
5862 if test -n "$LD"; then
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
5864 $as_echo "$LD" >&6; }
5865 else
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5867 $as_echo "no" >&6; }
5868 fi
5869 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
5870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
5871 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
5872 if test "${lt_cv_prog_gnu_ld+set}" = set; then :
5873 $as_echo_n "(cached) " >&6
5874 else
5875 # I'd rather use --version here, but apparently some GNU lds only accept -v.
5876 case `$LD -v 2>&1 </dev/null` in
5877 *GNU* | *'with BFD'*)
5878 lt_cv_prog_gnu_ld=yes
5879 ;;
5880 *)
5881 lt_cv_prog_gnu_ld=no
5882 ;;
5883 esac
5884 fi
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
5886 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
5887 with_gnu_ld=$lt_cv_prog_gnu_ld
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
5898 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
5899 if test "${lt_cv_path_NM+set}" = set; then :
5900 $as_echo_n "(cached) " >&6
5901 else
5902 if test -n "$NM"; then
5903 # Let the user override the test.
5904 lt_cv_path_NM="$NM"
5905 else
5906 lt_nm_to_check="${ac_tool_prefix}nm"
5907 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5908 lt_nm_to_check="$lt_nm_to_check nm"
5909 fi
5910 for lt_tmp_nm in $lt_nm_to_check; do
5911 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5912 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5913 IFS="$lt_save_ifs"
5914 test -z "$ac_dir" && ac_dir=.
5915 tmp_nm="$ac_dir/$lt_tmp_nm"
5916 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5917 # Check to see if the nm accepts a BSD-compat flag.
5918 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5919 # nm: unknown option "B" ignored
5920 # Tru64's nm complains that /dev/null is an invalid object file
5921 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5922 */dev/null* | *'Invalid file or object type'*)
5923 lt_cv_path_NM="$tmp_nm -B"
5924 break
5925 ;;
5926 *)
5927 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5928 */dev/null*)
5929 lt_cv_path_NM="$tmp_nm -p"
5930 break
5931 ;;
5932 *)
5933 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5934 continue # so that we can try to find one that supports BSD flags
5935 ;;
5936 esac
5937 ;;
5938 esac
5939 fi
5940 done
5941 IFS="$lt_save_ifs"
5942 done
5943 : ${lt_cv_path_NM=no}
5944 fi
5945 fi
5946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
5947 $as_echo "$lt_cv_path_NM" >&6; }
5948 if test "$lt_cv_path_NM" != "no"; then
5949 NM="$lt_cv_path_NM"
5950 else
5951 # Didn't find any BSD compatible name lister, look for dumpbin.
5952 if test -n "$ac_tool_prefix"; then
5953 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
5954 do
5955 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5956 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5958 $as_echo_n "checking for $ac_word... " >&6; }
5959 if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
5960 $as_echo_n "(cached) " >&6
5961 else
5962 if test -n "$DUMPBIN"; then
5963 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
5964 else
5965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5966 for as_dir in $PATH
5967 do
5968 IFS=$as_save_IFS
5969 test -z "$as_dir" && as_dir=.
5970 for ac_exec_ext in '' $ac_executable_extensions; do
5971 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5972 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
5973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5974 break 2
5975 fi
5976 done
5977 done
5978 IFS=$as_save_IFS
5979
5980 fi
5981 fi
5982 DUMPBIN=$ac_cv_prog_DUMPBIN
5983 if test -n "$DUMPBIN"; then
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
5985 $as_echo "$DUMPBIN" >&6; }
5986 else
5987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988 $as_echo "no" >&6; }
5989 fi
5990
5991
5992 test -n "$DUMPBIN" && break
5993 done
5994 fi
5995 if test -z "$DUMPBIN"; then
5996 ac_ct_DUMPBIN=$DUMPBIN
5997 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
5998 do
5999 # Extract the first word of "$ac_prog", so it can be a program name with args.
6000 set dummy $ac_prog; ac_word=$2
6001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6002 $as_echo_n "checking for $ac_word... " >&6; }
6003 if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
6004 $as_echo_n "(cached) " >&6
6005 else
6006 if test -n "$ac_ct_DUMPBIN"; then
6007 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
6008 else
6009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6010 for as_dir in $PATH
6011 do
6012 IFS=$as_save_IFS
6013 test -z "$as_dir" && as_dir=.
6014 for ac_exec_ext in '' $ac_executable_extensions; do
6015 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6016 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
6017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6018 break 2
6019 fi
6020 done
6021 done
6022 IFS=$as_save_IFS
6023
6024 fi
6025 fi
6026 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
6027 if test -n "$ac_ct_DUMPBIN"; then
6028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
6029 $as_echo "$ac_ct_DUMPBIN" >&6; }
6030 else
6031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6032 $as_echo "no" >&6; }
6033 fi
6034
6035
6036 test -n "$ac_ct_DUMPBIN" && break
6037 done
6038
6039 if test "x$ac_ct_DUMPBIN" = x; then
6040 DUMPBIN=":"
6041 else
6042 case $cross_compiling:$ac_tool_warned in
6043 yes:)
6044 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6045 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6046 ac_tool_warned=yes ;;
6047 esac
6048 DUMPBIN=$ac_ct_DUMPBIN
6049 fi
6050 fi
6051
6052
6053 if test "$DUMPBIN" != ":"; then
6054 NM="$DUMPBIN"
6055 fi
6056 fi
6057 test -z "$NM" && NM=nm
6058
6059
6060
6061
6062
6063
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
6065 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
6066 if test "${lt_cv_nm_interface+set}" = set; then :
6067 $as_echo_n "(cached) " >&6
6068 else
6069 lt_cv_nm_interface="BSD nm"
6070 echo "int some_variable = 0;" > conftest.$ac_ext
6071 (eval echo "\"\$as_me:6072: $ac_compile\"" >&5)
6072 (eval "$ac_compile" 2>conftest.err)
6073 cat conftest.err >&5
6074 (eval echo "\"\$as_me:6075: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
6075 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
6076 cat conftest.err >&5
6077 (eval echo "\"\$as_me:6078: output\"" >&5)
6078 cat conftest.out >&5
6079 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
6080 lt_cv_nm_interface="MS dumpbin"
6081 fi
6082 rm -f conftest*
6083 fi
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
6085 $as_echo "$lt_cv_nm_interface" >&6; }
6086
6087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6088 $as_echo_n "checking whether ln -s works... " >&6; }
6089 LN_S=$as_ln_s
6090 if test "$LN_S" = "ln -s"; then
6091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6092 $as_echo "yes" >&6; }
6093 else
6094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6095 $as_echo "no, using $LN_S" >&6; }
6096 fi
6097
6098 # find the maximum length of command line arguments
6099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
6100 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
6101 if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
6102 $as_echo_n "(cached) " >&6
6103 else
6104 i=0
6105 teststring="ABCD"
6106
6107 case $build_os in
6108 msdosdjgpp*)
6109 # On DJGPP, this test can blow up pretty badly due to problems in libc
6110 # (any single argument exceeding 2000 bytes causes a buffer overrun
6111 # during glob expansion). Even if it were fixed, the result of this
6112 # check would be larger than it should be.
6113 lt_cv_sys_max_cmd_len=12288; # 12K is about right
6114 ;;
6115
6116 gnu*)
6117 # Under GNU Hurd, this test is not required because there is
6118 # no limit to the length of command line arguments.
6119 # Libtool will interpret -1 as no limit whatsoever
6120 lt_cv_sys_max_cmd_len=-1;
6121 ;;
6122
6123 cygwin* | mingw* | cegcc*)
6124 # On Win9x/ME, this test blows up -- it succeeds, but takes
6125 # about 5 minutes as the teststring grows exponentially.
6126 # Worse, since 9x/ME are not pre-emptively multitasking,
6127 # you end up with a "frozen" computer, even though with patience
6128 # the test eventually succeeds (with a max line length of 256k).
6129 # Instead, let's just punt: use the minimum linelength reported by
6130 # all of the supported platforms: 8192 (on NT/2K/XP).
6131 lt_cv_sys_max_cmd_len=8192;
6132 ;;
6133
6134 amigaos*)
6135 # On AmigaOS with pdksh, this test takes hours, literally.
6136 # So we just punt and use a minimum line length of 8192.
6137 lt_cv_sys_max_cmd_len=8192;
6138 ;;
6139
6140 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6141 # This has been around since 386BSD, at least. Likely further.
6142 if test -x /sbin/sysctl; then
6143 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6144 elif test -x /usr/sbin/sysctl; then
6145 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6146 else
6147 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
6148 fi
6149 # And add a safety zone
6150 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6151 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6152 ;;
6153
6154 interix*)
6155 # We know the value 262144 and hardcode it with a safety zone (like BSD)
6156 lt_cv_sys_max_cmd_len=196608
6157 ;;
6158
6159 osf*)
6160 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6161 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6162 # nice to cause kernel panics so lets avoid the loop below.
6163 # First set a reasonable default.
6164 lt_cv_sys_max_cmd_len=16384
6165 #
6166 if test -x /sbin/sysconfig; then
6167 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6168 *1*) lt_cv_sys_max_cmd_len=-1 ;;
6169 esac
6170 fi
6171 ;;
6172 sco3.2v5*)
6173 lt_cv_sys_max_cmd_len=102400
6174 ;;
6175 sysv5* | sco5v6* | sysv4.2uw2*)
6176 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
6177 if test -n "$kargmax"; then
6178 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
6179 else
6180 lt_cv_sys_max_cmd_len=32768
6181 fi
6182 ;;
6183 *)
6184 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
6185 if test -n "$lt_cv_sys_max_cmd_len"; then
6186 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6187 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6188 else
6189 # Make teststring a little bigger before we do anything with it.
6190 # a 1K string should be a reasonable start.
6191 for i in 1 2 3 4 5 6 7 8 ; do
6192 teststring=$teststring$teststring
6193 done
6194 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6195 # If test is not a shell built-in, we'll probably end up computing a
6196 # maximum length that is only half of the actual maximum length, but
6197 # we can't tell.
6198 while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
6199 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
6200 test $i != 17 # 1/2 MB should be enough
6201 do
6202 i=`expr $i + 1`
6203 teststring=$teststring$teststring
6204 done
6205 # Only check the string length outside the loop.
6206 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
6207 teststring=
6208 # Add a significant safety factor because C++ compilers can tack on
6209 # massive amounts of additional arguments before passing them to the
6210 # linker. It appears as though 1/2 is a usable value.
6211 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6212 fi
6213 ;;
6214 esac
6215
6216 fi
6217
6218 if test -n $lt_cv_sys_max_cmd_len ; then
6219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
6220 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
6221 else
6222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
6223 $as_echo "none" >&6; }
6224 fi
6225 max_cmd_len=$lt_cv_sys_max_cmd_len
6226
6227
6228
6229
6230
6231
6232 : ${CP="cp -f"}
6233 : ${MV="mv -f"}
6234 : ${RM="rm -f"}
6235
6236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
6237 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
6238 # Try some XSI features
6239 xsi_shell=no
6240 ( _lt_dummy="a/b/c"
6241 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
6242 = c,a/b,, \
6243 && eval 'test $(( 1 + 1 )) -eq 2 \
6244 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
6245 && xsi_shell=yes
6246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
6247 $as_echo "$xsi_shell" >&6; }
6248
6249
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
6251 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
6252 lt_shell_append=no
6253 ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
6254 >/dev/null 2>&1 \
6255 && lt_shell_append=yes
6256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
6257 $as_echo "$lt_shell_append" >&6; }
6258
6259
6260 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6261 lt_unset=unset
6262 else
6263 lt_unset=false
6264 fi
6265
6266
6267
6268
6269
6270 # test EBCDIC or ASCII
6271 case `echo X|tr X '\101'` in
6272 A) # ASCII based system
6273 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
6274 lt_SP2NL='tr \040 \012'
6275 lt_NL2SP='tr \015\012 \040\040'
6276 ;;
6277 *) # EBCDIC based system
6278 lt_SP2NL='tr \100 \n'
6279 lt_NL2SP='tr \r\n \100\100'
6280 ;;
6281 esac
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
6292 $as_echo_n "checking for $LD option to reload object files... " >&6; }
6293 if test "${lt_cv_ld_reload_flag+set}" = set; then :
6294 $as_echo_n "(cached) " >&6
6295 else
6296 lt_cv_ld_reload_flag='-r'
6297 fi
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
6299 $as_echo "$lt_cv_ld_reload_flag" >&6; }
6300 reload_flag=$lt_cv_ld_reload_flag
6301 case $reload_flag in
6302 "" | " "*) ;;
6303 *) reload_flag=" $reload_flag" ;;
6304 esac
6305 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6306 case $host_os in
6307 darwin*)
6308 if test "$GCC" = yes; then
6309 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
6310 else
6311 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6312 fi
6313 ;;
6314 esac
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324 if test -n "$ac_tool_prefix"; then
6325 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
6326 set dummy ${ac_tool_prefix}objdump; ac_word=$2
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6328 $as_echo_n "checking for $ac_word... " >&6; }
6329 if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
6330 $as_echo_n "(cached) " >&6
6331 else
6332 if test -n "$OBJDUMP"; then
6333 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
6334 else
6335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6336 for as_dir in $PATH
6337 do
6338 IFS=$as_save_IFS
6339 test -z "$as_dir" && as_dir=.
6340 for ac_exec_ext in '' $ac_executable_extensions; do
6341 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6342 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6343 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6344 break 2
6345 fi
6346 done
6347 done
6348 IFS=$as_save_IFS
6349
6350 fi
6351 fi
6352 OBJDUMP=$ac_cv_prog_OBJDUMP
6353 if test -n "$OBJDUMP"; then
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
6355 $as_echo "$OBJDUMP" >&6; }
6356 else
6357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6358 $as_echo "no" >&6; }
6359 fi
6360
6361
6362 fi
6363 if test -z "$ac_cv_prog_OBJDUMP"; then
6364 ac_ct_OBJDUMP=$OBJDUMP
6365 # Extract the first word of "objdump", so it can be a program name with args.
6366 set dummy objdump; ac_word=$2
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6368 $as_echo_n "checking for $ac_word... " >&6; }
6369 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
6370 $as_echo_n "(cached) " >&6
6371 else
6372 if test -n "$ac_ct_OBJDUMP"; then
6373 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6374 else
6375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6376 for as_dir in $PATH
6377 do
6378 IFS=$as_save_IFS
6379 test -z "$as_dir" && as_dir=.
6380 for ac_exec_ext in '' $ac_executable_extensions; do
6381 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6382 ac_cv_prog_ac_ct_OBJDUMP="objdump"
6383 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6384 break 2
6385 fi
6386 done
6387 done
6388 IFS=$as_save_IFS
6389
6390 fi
6391 fi
6392 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6393 if test -n "$ac_ct_OBJDUMP"; then
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
6395 $as_echo "$ac_ct_OBJDUMP" >&6; }
6396 else
6397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6398 $as_echo "no" >&6; }
6399 fi
6400
6401 if test "x$ac_ct_OBJDUMP" = x; then
6402 OBJDUMP="false"
6403 else
6404 case $cross_compiling:$ac_tool_warned in
6405 yes:)
6406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6407 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6408 ac_tool_warned=yes ;;
6409 esac
6410 OBJDUMP=$ac_ct_OBJDUMP
6411 fi
6412 else
6413 OBJDUMP="$ac_cv_prog_OBJDUMP"
6414 fi
6415
6416 test -z "$OBJDUMP" && OBJDUMP=objdump
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
6427 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
6428 if test "${lt_cv_deplibs_check_method+set}" = set; then :
6429 $as_echo_n "(cached) " >&6
6430 else
6431 lt_cv_file_magic_cmd='$MAGIC_CMD'
6432 lt_cv_file_magic_test_file=
6433 lt_cv_deplibs_check_method='unknown'
6434 # Need to set the preceding variable on all platforms that support
6435 # interlibrary dependencies.
6436 # 'none' -- dependencies not supported.
6437 # `unknown' -- same as none, but documents that we really don't know.
6438 # 'pass_all' -- all dependencies passed with no checks.
6439 # 'test_compile' -- check by making test program.
6440 # 'file_magic [[regex]]' -- check by looking for files in library path
6441 # which responds to the $file_magic_cmd with a given extended regex.
6442 # If you have `file' or equivalent on your system and you're not sure
6443 # whether `pass_all' will *always* work, you probably want this one.
6444
6445 case $host_os in
6446 aix[4-9]*)
6447 lt_cv_deplibs_check_method=pass_all
6448 ;;
6449
6450 beos*)
6451 lt_cv_deplibs_check_method=pass_all
6452 ;;
6453
6454 bsdi[45]*)
6455 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6456 lt_cv_file_magic_cmd='/usr/bin/file -L'
6457 lt_cv_file_magic_test_file=/shlib/libc.so
6458 ;;
6459
6460 cygwin*)
6461 # func_win32_libid is a shell function defined in ltmain.sh
6462 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6463 lt_cv_file_magic_cmd='func_win32_libid'
6464 ;;
6465
6466 mingw* | pw32*)
6467 # Base MSYS/MinGW do not provide the 'file' command needed by
6468 # func_win32_libid shell function, so use a weaker test based on 'objdump',
6469 # unless we find 'file', for example because we are cross-compiling.
6470 if ( file / ) >/dev/null 2>&1; then
6471 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6472 lt_cv_file_magic_cmd='func_win32_libid'
6473 else
6474 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6475 lt_cv_file_magic_cmd='$OBJDUMP -f'
6476 fi
6477 ;;
6478
6479 cegcc)
6480 # use the weaker test based on 'objdump'. See mingw*.
6481 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
6482 lt_cv_file_magic_cmd='$OBJDUMP -f'
6483 ;;
6484
6485 darwin* | rhapsody*)
6486 lt_cv_deplibs_check_method=pass_all
6487 ;;
6488
6489 freebsd* | dragonfly*)
6490 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6491 case $host_cpu in
6492 i*86 )
6493 # Not sure whether the presence of OpenBSD here was a mistake.
6494 # Let's accept both of them until this is cleared up.
6495 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6496 lt_cv_file_magic_cmd=/usr/bin/file
6497 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6498 ;;
6499 esac
6500 else
6501 lt_cv_deplibs_check_method=pass_all
6502 fi
6503 ;;
6504
6505 gnu*)
6506 lt_cv_deplibs_check_method=pass_all
6507 ;;
6508
6509 hpux10.20* | hpux11*)
6510 lt_cv_file_magic_cmd=/usr/bin/file
6511 case $host_cpu in
6512 ia64*)
6513 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6514 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6515 ;;
6516 hppa*64*)
6517 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]'
6518 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6519 ;;
6520 *)
6521 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
6522 lt_cv_file_magic_test_file=/usr/lib/libc.sl
6523 ;;
6524 esac
6525 ;;
6526
6527 interix[3-9]*)
6528 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
6529 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
6530 ;;
6531
6532 irix5* | irix6* | nonstopux*)
6533 case $LD in
6534 *-32|*"-32 ") libmagic=32-bit;;
6535 *-n32|*"-n32 ") libmagic=N32;;
6536 *-64|*"-64 ") libmagic=64-bit;;
6537 *) libmagic=never-match;;
6538 esac
6539 lt_cv_deplibs_check_method=pass_all
6540 ;;
6541
6542 # This must be Linux ELF.
6543 linux* | k*bsd*-gnu | kopensolaris*-gnu)
6544 lt_cv_deplibs_check_method=pass_all
6545 ;;
6546
6547 netbsd* | netbsdelf*-gnu)
6548 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6549 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6550 else
6551 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6552 fi
6553 ;;
6554
6555 newos6*)
6556 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6557 lt_cv_file_magic_cmd=/usr/bin/file
6558 lt_cv_file_magic_test_file=/usr/lib/libnls.so
6559 ;;
6560
6561 *nto* | *qnx*)
6562 lt_cv_deplibs_check_method=pass_all
6563 ;;
6564
6565 openbsd*)
6566 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6567 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6568 else
6569 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6570 fi
6571 ;;
6572
6573 osf3* | osf4* | osf5*)
6574 lt_cv_deplibs_check_method=pass_all
6575 ;;
6576
6577 rdos*)
6578 lt_cv_deplibs_check_method=pass_all
6579 ;;
6580
6581 solaris*)
6582 lt_cv_deplibs_check_method=pass_all
6583 ;;
6584
6585 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
6586 lt_cv_deplibs_check_method=pass_all
6587 ;;
6588
6589 sysv4 | sysv4.3*)
6590 case $host_vendor in
6591 motorola)
6592 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]'
6593 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6594 ;;
6595 ncr)
6596 lt_cv_deplibs_check_method=pass_all
6597 ;;
6598 sequent)
6599 lt_cv_file_magic_cmd='/bin/file'
6600 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6601 ;;
6602 sni)
6603 lt_cv_file_magic_cmd='/bin/file'
6604 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6605 lt_cv_file_magic_test_file=/lib/libc.so
6606 ;;
6607 siemens)
6608 lt_cv_deplibs_check_method=pass_all
6609 ;;
6610 pc)
6611 lt_cv_deplibs_check_method=pass_all
6612 ;;
6613 esac
6614 ;;
6615
6616 tpf*)
6617 lt_cv_deplibs_check_method=pass_all
6618 ;;
6619 esac
6620
6621 fi
6622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
6623 $as_echo "$lt_cv_deplibs_check_method" >&6; }
6624 file_magic_cmd=$lt_cv_file_magic_cmd
6625 deplibs_check_method=$lt_cv_deplibs_check_method
6626 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639 if test -n "$ac_tool_prefix"; then
6640 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6641 set dummy ${ac_tool_prefix}ar; ac_word=$2
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6643 $as_echo_n "checking for $ac_word... " >&6; }
6644 if test "${ac_cv_prog_AR+set}" = set; then :
6645 $as_echo_n "(cached) " >&6
6646 else
6647 if test -n "$AR"; then
6648 ac_cv_prog_AR="$AR" # Let the user override the test.
6649 else
6650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6651 for as_dir in $PATH
6652 do
6653 IFS=$as_save_IFS
6654 test -z "$as_dir" && as_dir=.
6655 for ac_exec_ext in '' $ac_executable_extensions; do
6656 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6657 ac_cv_prog_AR="${ac_tool_prefix}ar"
6658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6659 break 2
6660 fi
6661 done
6662 done
6663 IFS=$as_save_IFS
6664
6665 fi
6666 fi
6667 AR=$ac_cv_prog_AR
6668 if test -n "$AR"; then
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6670 $as_echo "$AR" >&6; }
6671 else
6672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6673 $as_echo "no" >&6; }
6674 fi
6675
6676
6677 fi
6678 if test -z "$ac_cv_prog_AR"; then
6679 ac_ct_AR=$AR
6680 # Extract the first word of "ar", so it can be a program name with args.
6681 set dummy ar; ac_word=$2
6682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6683 $as_echo_n "checking for $ac_word... " >&6; }
6684 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6685 $as_echo_n "(cached) " >&6
6686 else
6687 if test -n "$ac_ct_AR"; then
6688 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6689 else
6690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6691 for as_dir in $PATH
6692 do
6693 IFS=$as_save_IFS
6694 test -z "$as_dir" && as_dir=.
6695 for ac_exec_ext in '' $ac_executable_extensions; do
6696 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6697 ac_cv_prog_ac_ct_AR="ar"
6698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6699 break 2
6700 fi
6701 done
6702 done
6703 IFS=$as_save_IFS
6704
6705 fi
6706 fi
6707 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6708 if test -n "$ac_ct_AR"; then
6709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6710 $as_echo "$ac_ct_AR" >&6; }
6711 else
6712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6713 $as_echo "no" >&6; }
6714 fi
6715
6716 if test "x$ac_ct_AR" = x; then
6717 AR="false"
6718 else
6719 case $cross_compiling:$ac_tool_warned in
6720 yes:)
6721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6722 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6723 ac_tool_warned=yes ;;
6724 esac
6725 AR=$ac_ct_AR
6726 fi
6727 else
6728 AR="$ac_cv_prog_AR"
6729 fi
6730
6731 test -z "$AR" && AR=ar
6732 test -z "$AR_FLAGS" && AR_FLAGS=cru
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744 if test -n "$ac_tool_prefix"; then
6745 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6746 set dummy ${ac_tool_prefix}strip; ac_word=$2
6747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6748 $as_echo_n "checking for $ac_word... " >&6; }
6749 if test "${ac_cv_prog_STRIP+set}" = set; then :
6750 $as_echo_n "(cached) " >&6
6751 else
6752 if test -n "$STRIP"; then
6753 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6754 else
6755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6756 for as_dir in $PATH
6757 do
6758 IFS=$as_save_IFS
6759 test -z "$as_dir" && as_dir=.
6760 for ac_exec_ext in '' $ac_executable_extensions; do
6761 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6762 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6764 break 2
6765 fi
6766 done
6767 done
6768 IFS=$as_save_IFS
6769
6770 fi
6771 fi
6772 STRIP=$ac_cv_prog_STRIP
6773 if test -n "$STRIP"; then
6774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6775 $as_echo "$STRIP" >&6; }
6776 else
6777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6778 $as_echo "no" >&6; }
6779 fi
6780
6781
6782 fi
6783 if test -z "$ac_cv_prog_STRIP"; then
6784 ac_ct_STRIP=$STRIP
6785 # Extract the first word of "strip", so it can be a program name with args.
6786 set dummy strip; ac_word=$2
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6788 $as_echo_n "checking for $ac_word... " >&6; }
6789 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
6790 $as_echo_n "(cached) " >&6
6791 else
6792 if test -n "$ac_ct_STRIP"; then
6793 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6794 else
6795 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6796 for as_dir in $PATH
6797 do
6798 IFS=$as_save_IFS
6799 test -z "$as_dir" && as_dir=.
6800 for ac_exec_ext in '' $ac_executable_extensions; do
6801 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6802 ac_cv_prog_ac_ct_STRIP="strip"
6803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6804 break 2
6805 fi
6806 done
6807 done
6808 IFS=$as_save_IFS
6809
6810 fi
6811 fi
6812 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6813 if test -n "$ac_ct_STRIP"; then
6814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6815 $as_echo "$ac_ct_STRIP" >&6; }
6816 else
6817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6818 $as_echo "no" >&6; }
6819 fi
6820
6821 if test "x$ac_ct_STRIP" = x; then
6822 STRIP=":"
6823 else
6824 case $cross_compiling:$ac_tool_warned in
6825 yes:)
6826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6827 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6828 ac_tool_warned=yes ;;
6829 esac
6830 STRIP=$ac_ct_STRIP
6831 fi
6832 else
6833 STRIP="$ac_cv_prog_STRIP"
6834 fi
6835
6836 test -z "$STRIP" && STRIP=:
6837
6838
6839
6840
6841
6842
6843 if test -n "$ac_tool_prefix"; then
6844 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6845 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6847 $as_echo_n "checking for $ac_word... " >&6; }
6848 if test "${ac_cv_prog_RANLIB+set}" = set; then :
6849 $as_echo_n "(cached) " >&6
6850 else
6851 if test -n "$RANLIB"; then
6852 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6853 else
6854 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6855 for as_dir in $PATH
6856 do
6857 IFS=$as_save_IFS
6858 test -z "$as_dir" && as_dir=.
6859 for ac_exec_ext in '' $ac_executable_extensions; do
6860 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6861 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6863 break 2
6864 fi
6865 done
6866 done
6867 IFS=$as_save_IFS
6868
6869 fi
6870 fi
6871 RANLIB=$ac_cv_prog_RANLIB
6872 if test -n "$RANLIB"; then
6873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6874 $as_echo "$RANLIB" >&6; }
6875 else
6876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6877 $as_echo "no" >&6; }
6878 fi
6879
6880
6881 fi
6882 if test -z "$ac_cv_prog_RANLIB"; then
6883 ac_ct_RANLIB=$RANLIB
6884 # Extract the first word of "ranlib", so it can be a program name with args.
6885 set dummy ranlib; ac_word=$2
6886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6887 $as_echo_n "checking for $ac_word... " >&6; }
6888 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6889 $as_echo_n "(cached) " >&6
6890 else
6891 if test -n "$ac_ct_RANLIB"; then
6892 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6893 else
6894 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6895 for as_dir in $PATH
6896 do
6897 IFS=$as_save_IFS
6898 test -z "$as_dir" && as_dir=.
6899 for ac_exec_ext in '' $ac_executable_extensions; do
6900 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6901 ac_cv_prog_ac_ct_RANLIB="ranlib"
6902 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6903 break 2
6904 fi
6905 done
6906 done
6907 IFS=$as_save_IFS
6908
6909 fi
6910 fi
6911 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6912 if test -n "$ac_ct_RANLIB"; then
6913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6914 $as_echo "$ac_ct_RANLIB" >&6; }
6915 else
6916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6917 $as_echo "no" >&6; }
6918 fi
6919
6920 if test "x$ac_ct_RANLIB" = x; then
6921 RANLIB=":"
6922 else
6923 case $cross_compiling:$ac_tool_warned in
6924 yes:)
6925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6926 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6927 ac_tool_warned=yes ;;
6928 esac
6929 RANLIB=$ac_ct_RANLIB
6930 fi
6931 else
6932 RANLIB="$ac_cv_prog_RANLIB"
6933 fi
6934
6935 test -z "$RANLIB" && RANLIB=:
6936
6937
6938
6939
6940
6941
6942 # Determine commands to create old-style static archives.
6943 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
6944 old_postinstall_cmds='chmod 644 $oldlib'
6945 old_postuninstall_cmds=
6946
6947 if test -n "$RANLIB"; then
6948 case $host_os in
6949 openbsd*)
6950 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
6951 ;;
6952 *)
6953 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
6954 ;;
6955 esac
6956 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6957 fi
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992 # If no C compiler was specified, use CC.
6993 LTCC=${LTCC-"$CC"}
6994
6995 # If no C compiler flags were specified, use CFLAGS.
6996 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
6997
6998 # Allow CC to be a program name with arguments.
6999 compiler=$CC
7000
7001
7002 # Check for command to grab the raw symbol name followed by C symbol from nm.
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
7004 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
7005 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
7006 $as_echo_n "(cached) " >&6
7007 else
7008
7009 # These are sane defaults that work on at least a few old systems.
7010 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
7011
7012 # Character class describing NM global symbol codes.
7013 symcode='[BCDEGRST]'
7014
7015 # Regexp to match symbols that can be accessed directly from C.
7016 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
7017
7018 # Define system-specific variables.
7019 case $host_os in
7020 aix*)
7021 symcode='[BCDT]'
7022 ;;
7023 cygwin* | mingw* | pw32* | cegcc*)
7024 symcode='[ABCDGISTW]'
7025 ;;
7026 hpux*)
7027 if test "$host_cpu" = ia64; then
7028 symcode='[ABCDEGRST]'
7029 fi
7030 ;;
7031 irix* | nonstopux*)
7032 symcode='[BCDEGRST]'
7033 ;;
7034 osf*)
7035 symcode='[BCDEGQRST]'
7036 ;;
7037 solaris*)
7038 symcode='[BDRT]'
7039 ;;
7040 sco3.2v5*)
7041 symcode='[DT]'
7042 ;;
7043 sysv4.2uw2*)
7044 symcode='[DT]'
7045 ;;
7046 sysv5* | sco5v6* | unixware* | OpenUNIX*)
7047 symcode='[ABDT]'
7048 ;;
7049 sysv4)
7050 symcode='[DFNSTU]'
7051 ;;
7052 esac
7053
7054 # If we're using GNU nm, then use its standard symbol codes.
7055 case `$NM -V 2>&1` in
7056 *GNU* | *'with BFD'*)
7057 symcode='[ABCDGIRSTW]' ;;
7058 esac
7059
7060 # Transform an extracted symbol line into a proper C declaration.
7061 # Some systems (esp. on ia64) link data and code symbols differently,
7062 # so use this general approach.
7063 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7064
7065 # Transform an extracted symbol line into symbol name and symbol address
7066 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
7067 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
7068
7069 # Handle CRLF in mingw tool chain
7070 opt_cr=
7071 case $build_os in
7072 mingw*)
7073 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7074 ;;
7075 esac
7076
7077 # Try without a prefix underscore, then with it.
7078 for ac_symprfx in "" "_"; do
7079
7080 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7081 symxfrm="\\1 $ac_symprfx\\2 \\2"
7082
7083 # Write the raw and C identifiers.
7084 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7085 # Fake it for dumpbin and say T for any non-static function
7086 # and D for any global variable.
7087 # Also find C++ and __fastcall symbols from MSVC++,
7088 # which start with @ or ?.
7089 lt_cv_sys_global_symbol_pipe="$AWK '"\
7090 " {last_section=section; section=\$ 3};"\
7091 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
7092 " \$ 0!~/External *\|/{next};"\
7093 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
7094 " {if(hide[section]) next};"\
7095 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
7096 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
7097 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
7098 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
7099 " ' prfx=^$ac_symprfx"
7100 else
7101 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7102 fi
7103
7104 # Check to see that the pipe works correctly.
7105 pipe_works=no
7106
7107 rm -f conftest*
7108 cat > conftest.$ac_ext <<_LT_EOF
7109 #ifdef __cplusplus
7110 extern "C" {
7111 #endif
7112 char nm_test_var;
7113 void nm_test_func(void);
7114 void nm_test_func(void){}
7115 #ifdef __cplusplus
7116 }
7117 #endif
7118 int main(){nm_test_var='a';nm_test_func();return(0);}
7119 _LT_EOF
7120
7121 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7122 (eval $ac_compile) 2>&5
7123 ac_status=$?
7124 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7125 test $ac_status = 0; }; then
7126 # Now try to grab the symbols.
7127 nlist=conftest.nm
7128 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
7129 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
7130 ac_status=$?
7131 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7132 test $ac_status = 0; } && test -s "$nlist"; then
7133 # Try sorting and uniquifying the output.
7134 if sort "$nlist" | uniq > "$nlist"T; then
7135 mv -f "$nlist"T "$nlist"
7136 else
7137 rm -f "$nlist"T
7138 fi
7139
7140 # Make sure that we snagged all the symbols we need.
7141 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
7142 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
7143 cat <<_LT_EOF > conftest.$ac_ext
7144 #ifdef __cplusplus
7145 extern "C" {
7146 #endif
7147
7148 _LT_EOF
7149 # Now generate the symbol file.
7150 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
7151
7152 cat <<_LT_EOF >> conftest.$ac_ext
7153
7154 /* The mapping between symbol names and symbols. */
7155 const struct {
7156 const char *name;
7157 void *address;
7158 }
7159 lt__PROGRAM__LTX_preloaded_symbols[] =
7160 {
7161 { "@PROGRAM@", (void *) 0 },
7162 _LT_EOF
7163 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
7164 cat <<\_LT_EOF >> conftest.$ac_ext
7165 {0, (void *) 0}
7166 };
7167
7168 /* This works around a problem in FreeBSD linker */
7169 #ifdef FREEBSD_WORKAROUND
7170 static const void *lt_preloaded_setup() {
7171 return lt__PROGRAM__LTX_preloaded_symbols;
7172 }
7173 #endif
7174
7175 #ifdef __cplusplus
7176 }
7177 #endif
7178 _LT_EOF
7179 # Now try linking the two files.
7180 mv conftest.$ac_objext conftstm.$ac_objext
7181 lt_save_LIBS="$LIBS"
7182 lt_save_CFLAGS="$CFLAGS"
7183 LIBS="conftstm.$ac_objext"
7184 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7185 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7186 (eval $ac_link) 2>&5
7187 ac_status=$?
7188 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7189 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
7190 pipe_works=yes
7191 fi
7192 LIBS="$lt_save_LIBS"
7193 CFLAGS="$lt_save_CFLAGS"
7194 else
7195 echo "cannot find nm_test_func in $nlist" >&5
7196 fi
7197 else
7198 echo "cannot find nm_test_var in $nlist" >&5
7199 fi
7200 else
7201 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7202 fi
7203 else
7204 echo "$progname: failed program was:" >&5
7205 cat conftest.$ac_ext >&5
7206 fi
7207 rm -rf conftest* conftst*
7208
7209 # Do not use the global_symbol_pipe unless it works.
7210 if test "$pipe_works" = yes; then
7211 break
7212 else
7213 lt_cv_sys_global_symbol_pipe=
7214 fi
7215 done
7216
7217 fi
7218
7219 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7220 lt_cv_sys_global_symbol_to_cdecl=
7221 fi
7222 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7224 $as_echo "failed" >&6; }
7225 else
7226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
7227 $as_echo "ok" >&6; }
7228 fi
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251 # Check whether --enable-libtool-lock was given.
7252 if test "${enable_libtool_lock+set}" = set; then :
7253 enableval=$enable_libtool_lock;
7254 fi
7255
7256 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7257
7258 # Some flags need to be propagated to the compiler or linker for good
7259 # libtool support.
7260 case $host in
7261 ia64-*-hpux*)
7262 # Find out which ABI we are using.
7263 echo 'int i;' > conftest.$ac_ext
7264 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7265 (eval $ac_compile) 2>&5
7266 ac_status=$?
7267 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7268 test $ac_status = 0; }; then
7269 case `/usr/bin/file conftest.$ac_objext` in
7270 *ELF-32*)
7271 HPUX_IA64_MODE="32"
7272 ;;
7273 *ELF-64*)
7274 HPUX_IA64_MODE="64"
7275 ;;
7276 esac
7277 fi
7278 rm -rf conftest*
7279 ;;
7280 *-*-irix6*)
7281 # Find out which ABI we are using.
7282 echo '#line 7283 "configure"' > conftest.$ac_ext
7283 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7284 (eval $ac_compile) 2>&5
7285 ac_status=$?
7286 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7287 test $ac_status = 0; }; then
7288 if test "$lt_cv_prog_gnu_ld" = yes; then
7289 case `/usr/bin/file conftest.$ac_objext` in
7290 *32-bit*)
7291 LD="${LD-ld} -melf32bsmip"
7292 ;;
7293 *N32*)
7294 LD="${LD-ld} -melf32bmipn32"
7295 ;;
7296 *64-bit*)
7297 LD="${LD-ld} -melf64bmip"
7298 ;;
7299 esac
7300 else
7301 case `/usr/bin/file conftest.$ac_objext` in
7302 *32-bit*)
7303 LD="${LD-ld} -32"
7304 ;;
7305 *N32*)
7306 LD="${LD-ld} -n32"
7307 ;;
7308 *64-bit*)
7309 LD="${LD-ld} -64"
7310 ;;
7311 esac
7312 fi
7313 fi
7314 rm -rf conftest*
7315 ;;
7316
7317 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
7318 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
7319 # Find out which ABI we are using.
7320 echo 'int i;' > conftest.$ac_ext
7321 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7322 (eval $ac_compile) 2>&5
7323 ac_status=$?
7324 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7325 test $ac_status = 0; }; then
7326 case `/usr/bin/file conftest.o` in
7327 *32-bit*)
7328 case $host in
7329 x86_64-*kfreebsd*-gnu)
7330 LD="${LD-ld} -m elf_i386_fbsd"
7331 ;;
7332 x86_64-*linux*)
7333 LD="${LD-ld} -m elf_i386"
7334 ;;
7335 ppc64-*linux*|powerpc64-*linux*)
7336 LD="${LD-ld} -m elf32ppclinux"
7337 ;;
7338 s390x-*linux*)
7339 LD="${LD-ld} -m elf_s390"
7340 ;;
7341 sparc64-*linux*)
7342 LD="${LD-ld} -m elf32_sparc"
7343 ;;
7344 esac
7345 ;;
7346 *64-bit*)
7347 case $host in
7348 x86_64-*kfreebsd*-gnu)
7349 LD="${LD-ld} -m elf_x86_64_fbsd"
7350 ;;
7351 x86_64-*linux*)
7352 LD="${LD-ld} -m elf_x86_64"
7353 ;;
7354 ppc*-*linux*|powerpc*-*linux*)
7355 LD="${LD-ld} -m elf64ppc"
7356 ;;
7357 s390*-*linux*|s390*-*tpf*)
7358 LD="${LD-ld} -m elf64_s390"
7359 ;;
7360 sparc*-*linux*)
7361 LD="${LD-ld} -m elf64_sparc"
7362 ;;
7363 esac
7364 ;;
7365 esac
7366 fi
7367 rm -rf conftest*
7368 ;;
7369
7370 *-*-sco3.2v5*)
7371 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
7372 SAVE_CFLAGS="$CFLAGS"
7373 CFLAGS="$CFLAGS -belf"
7374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
7375 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
7376 if test "${lt_cv_cc_needs_belf+set}" = set; then :
7377 $as_echo_n "(cached) " >&6
7378 else
7379 ac_ext=c
7380 ac_cpp='$CPP $CPPFLAGS'
7381 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7382 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7383 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7384
7385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7386 /* end confdefs.h. */
7387
7388 int
7389 main ()
7390 {
7391
7392 ;
7393 return 0;
7394 }
7395 _ACEOF
7396 if ac_fn_c_try_link "$LINENO"; then :
7397 lt_cv_cc_needs_belf=yes
7398 else
7399 lt_cv_cc_needs_belf=no
7400 fi
7401 rm -f core conftest.err conftest.$ac_objext \
7402 conftest$ac_exeext conftest.$ac_ext
7403 ac_ext=c
7404 ac_cpp='$CPP $CPPFLAGS'
7405 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7406 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7407 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7408
7409 fi
7410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
7411 $as_echo "$lt_cv_cc_needs_belf" >&6; }
7412 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
7413 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
7414 CFLAGS="$SAVE_CFLAGS"
7415 fi
7416 ;;
7417 sparc*-*solaris*)
7418 # Find out which ABI we are using.
7419 echo 'int i;' > conftest.$ac_ext
7420 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7421 (eval $ac_compile) 2>&5
7422 ac_status=$?
7423 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7424 test $ac_status = 0; }; then
7425 case `/usr/bin/file conftest.o` in
7426 *64-bit*)
7427 case $lt_cv_prog_gnu_ld in
7428 yes*) LD="${LD-ld} -m elf64_sparc" ;;
7429 *)
7430 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
7431 LD="${LD-ld} -64"
7432 fi
7433 ;;
7434 esac
7435 ;;
7436 esac
7437 fi
7438 rm -rf conftest*
7439 ;;
7440 esac
7441
7442 need_locks="$enable_libtool_lock"
7443
7444
7445 case $host_os in
7446 rhapsody* | darwin*)
7447 if test -n "$ac_tool_prefix"; then
7448 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
7449 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
7450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7451 $as_echo_n "checking for $ac_word... " >&6; }
7452 if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
7453 $as_echo_n "(cached) " >&6
7454 else
7455 if test -n "$DSYMUTIL"; then
7456 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
7457 else
7458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7459 for as_dir in $PATH
7460 do
7461 IFS=$as_save_IFS
7462 test -z "$as_dir" && as_dir=.
7463 for ac_exec_ext in '' $ac_executable_extensions; do
7464 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7465 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
7466 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7467 break 2
7468 fi
7469 done
7470 done
7471 IFS=$as_save_IFS
7472
7473 fi
7474 fi
7475 DSYMUTIL=$ac_cv_prog_DSYMUTIL
7476 if test -n "$DSYMUTIL"; then
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
7478 $as_echo "$DSYMUTIL" >&6; }
7479 else
7480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7481 $as_echo "no" >&6; }
7482 fi
7483
7484
7485 fi
7486 if test -z "$ac_cv_prog_DSYMUTIL"; then
7487 ac_ct_DSYMUTIL=$DSYMUTIL
7488 # Extract the first word of "dsymutil", so it can be a program name with args.
7489 set dummy dsymutil; ac_word=$2
7490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7491 $as_echo_n "checking for $ac_word... " >&6; }
7492 if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
7493 $as_echo_n "(cached) " >&6
7494 else
7495 if test -n "$ac_ct_DSYMUTIL"; then
7496 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
7497 else
7498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7499 for as_dir in $PATH
7500 do
7501 IFS=$as_save_IFS
7502 test -z "$as_dir" && as_dir=.
7503 for ac_exec_ext in '' $ac_executable_extensions; do
7504 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7505 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
7506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7507 break 2
7508 fi
7509 done
7510 done
7511 IFS=$as_save_IFS
7512
7513 fi
7514 fi
7515 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
7516 if test -n "$ac_ct_DSYMUTIL"; then
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
7518 $as_echo "$ac_ct_DSYMUTIL" >&6; }
7519 else
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7521 $as_echo "no" >&6; }
7522 fi
7523
7524 if test "x$ac_ct_DSYMUTIL" = x; then
7525 DSYMUTIL=":"
7526 else
7527 case $cross_compiling:$ac_tool_warned in
7528 yes:)
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7530 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7531 ac_tool_warned=yes ;;
7532 esac
7533 DSYMUTIL=$ac_ct_DSYMUTIL
7534 fi
7535 else
7536 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
7537 fi
7538
7539 if test -n "$ac_tool_prefix"; then
7540 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
7541 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
7542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7543 $as_echo_n "checking for $ac_word... " >&6; }
7544 if test "${ac_cv_prog_NMEDIT+set}" = set; then :
7545 $as_echo_n "(cached) " >&6
7546 else
7547 if test -n "$NMEDIT"; then
7548 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
7549 else
7550 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7551 for as_dir in $PATH
7552 do
7553 IFS=$as_save_IFS
7554 test -z "$as_dir" && as_dir=.
7555 for ac_exec_ext in '' $ac_executable_extensions; do
7556 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7557 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
7558 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7559 break 2
7560 fi
7561 done
7562 done
7563 IFS=$as_save_IFS
7564
7565 fi
7566 fi
7567 NMEDIT=$ac_cv_prog_NMEDIT
7568 if test -n "$NMEDIT"; then
7569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
7570 $as_echo "$NMEDIT" >&6; }
7571 else
7572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7573 $as_echo "no" >&6; }
7574 fi
7575
7576
7577 fi
7578 if test -z "$ac_cv_prog_NMEDIT"; then
7579 ac_ct_NMEDIT=$NMEDIT
7580 # Extract the first word of "nmedit", so it can be a program name with args.
7581 set dummy nmedit; ac_word=$2
7582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7583 $as_echo_n "checking for $ac_word... " >&6; }
7584 if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
7585 $as_echo_n "(cached) " >&6
7586 else
7587 if test -n "$ac_ct_NMEDIT"; then
7588 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
7589 else
7590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7591 for as_dir in $PATH
7592 do
7593 IFS=$as_save_IFS
7594 test -z "$as_dir" && as_dir=.
7595 for ac_exec_ext in '' $ac_executable_extensions; do
7596 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7597 ac_cv_prog_ac_ct_NMEDIT="nmedit"
7598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7599 break 2
7600 fi
7601 done
7602 done
7603 IFS=$as_save_IFS
7604
7605 fi
7606 fi
7607 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
7608 if test -n "$ac_ct_NMEDIT"; then
7609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
7610 $as_echo "$ac_ct_NMEDIT" >&6; }
7611 else
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7613 $as_echo "no" >&6; }
7614 fi
7615
7616 if test "x$ac_ct_NMEDIT" = x; then
7617 NMEDIT=":"
7618 else
7619 case $cross_compiling:$ac_tool_warned in
7620 yes:)
7621 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7622 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7623 ac_tool_warned=yes ;;
7624 esac
7625 NMEDIT=$ac_ct_NMEDIT
7626 fi
7627 else
7628 NMEDIT="$ac_cv_prog_NMEDIT"
7629 fi
7630
7631 if test -n "$ac_tool_prefix"; then
7632 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
7633 set dummy ${ac_tool_prefix}lipo; ac_word=$2
7634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7635 $as_echo_n "checking for $ac_word... " >&6; }
7636 if test "${ac_cv_prog_LIPO+set}" = set; then :
7637 $as_echo_n "(cached) " >&6
7638 else
7639 if test -n "$LIPO"; then
7640 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
7641 else
7642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7643 for as_dir in $PATH
7644 do
7645 IFS=$as_save_IFS
7646 test -z "$as_dir" && as_dir=.
7647 for ac_exec_ext in '' $ac_executable_extensions; do
7648 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7649 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
7650 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7651 break 2
7652 fi
7653 done
7654 done
7655 IFS=$as_save_IFS
7656
7657 fi
7658 fi
7659 LIPO=$ac_cv_prog_LIPO
7660 if test -n "$LIPO"; then
7661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
7662 $as_echo "$LIPO" >&6; }
7663 else
7664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7665 $as_echo "no" >&6; }
7666 fi
7667
7668
7669 fi
7670 if test -z "$ac_cv_prog_LIPO"; then
7671 ac_ct_LIPO=$LIPO
7672 # Extract the first word of "lipo", so it can be a program name with args.
7673 set dummy lipo; ac_word=$2
7674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7675 $as_echo_n "checking for $ac_word... " >&6; }
7676 if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
7677 $as_echo_n "(cached) " >&6
7678 else
7679 if test -n "$ac_ct_LIPO"; then
7680 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
7681 else
7682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683 for as_dir in $PATH
7684 do
7685 IFS=$as_save_IFS
7686 test -z "$as_dir" && as_dir=.
7687 for ac_exec_ext in '' $ac_executable_extensions; do
7688 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7689 ac_cv_prog_ac_ct_LIPO="lipo"
7690 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7691 break 2
7692 fi
7693 done
7694 done
7695 IFS=$as_save_IFS
7696
7697 fi
7698 fi
7699 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
7700 if test -n "$ac_ct_LIPO"; then
7701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
7702 $as_echo "$ac_ct_LIPO" >&6; }
7703 else
7704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7705 $as_echo "no" >&6; }
7706 fi
7707
7708 if test "x$ac_ct_LIPO" = x; then
7709 LIPO=":"
7710 else
7711 case $cross_compiling:$ac_tool_warned in
7712 yes:)
7713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7714 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7715 ac_tool_warned=yes ;;
7716 esac
7717 LIPO=$ac_ct_LIPO
7718 fi
7719 else
7720 LIPO="$ac_cv_prog_LIPO"
7721 fi
7722
7723 if test -n "$ac_tool_prefix"; then
7724 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
7725 set dummy ${ac_tool_prefix}otool; ac_word=$2
7726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7727 $as_echo_n "checking for $ac_word... " >&6; }
7728 if test "${ac_cv_prog_OTOOL+set}" = set; then :
7729 $as_echo_n "(cached) " >&6
7730 else
7731 if test -n "$OTOOL"; then
7732 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
7733 else
7734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7735 for as_dir in $PATH
7736 do
7737 IFS=$as_save_IFS
7738 test -z "$as_dir" && as_dir=.
7739 for ac_exec_ext in '' $ac_executable_extensions; do
7740 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7741 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
7742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7743 break 2
7744 fi
7745 done
7746 done
7747 IFS=$as_save_IFS
7748
7749 fi
7750 fi
7751 OTOOL=$ac_cv_prog_OTOOL
7752 if test -n "$OTOOL"; then
7753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
7754 $as_echo "$OTOOL" >&6; }
7755 else
7756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7757 $as_echo "no" >&6; }
7758 fi
7759
7760
7761 fi
7762 if test -z "$ac_cv_prog_OTOOL"; then
7763 ac_ct_OTOOL=$OTOOL
7764 # Extract the first word of "otool", so it can be a program name with args.
7765 set dummy otool; ac_word=$2
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7767 $as_echo_n "checking for $ac_word... " >&6; }
7768 if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
7769 $as_echo_n "(cached) " >&6
7770 else
7771 if test -n "$ac_ct_OTOOL"; then
7772 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
7773 else
7774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7775 for as_dir in $PATH
7776 do
7777 IFS=$as_save_IFS
7778 test -z "$as_dir" && as_dir=.
7779 for ac_exec_ext in '' $ac_executable_extensions; do
7780 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7781 ac_cv_prog_ac_ct_OTOOL="otool"
7782 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7783 break 2
7784 fi
7785 done
7786 done
7787 IFS=$as_save_IFS
7788
7789 fi
7790 fi
7791 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
7792 if test -n "$ac_ct_OTOOL"; then
7793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
7794 $as_echo "$ac_ct_OTOOL" >&6; }
7795 else
7796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7797 $as_echo "no" >&6; }
7798 fi
7799
7800 if test "x$ac_ct_OTOOL" = x; then
7801 OTOOL=":"
7802 else
7803 case $cross_compiling:$ac_tool_warned in
7804 yes:)
7805 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7806 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7807 ac_tool_warned=yes ;;
7808 esac
7809 OTOOL=$ac_ct_OTOOL
7810 fi
7811 else
7812 OTOOL="$ac_cv_prog_OTOOL"
7813 fi
7814
7815 if test -n "$ac_tool_prefix"; then
7816 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
7817 set dummy ${ac_tool_prefix}otool64; ac_word=$2
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7819 $as_echo_n "checking for $ac_word... " >&6; }
7820 if test "${ac_cv_prog_OTOOL64+set}" = set; then :
7821 $as_echo_n "(cached) " >&6
7822 else
7823 if test -n "$OTOOL64"; then
7824 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
7825 else
7826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7827 for as_dir in $PATH
7828 do
7829 IFS=$as_save_IFS
7830 test -z "$as_dir" && as_dir=.
7831 for ac_exec_ext in '' $ac_executable_extensions; do
7832 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7833 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
7834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7835 break 2
7836 fi
7837 done
7838 done
7839 IFS=$as_save_IFS
7840
7841 fi
7842 fi
7843 OTOOL64=$ac_cv_prog_OTOOL64
7844 if test -n "$OTOOL64"; then
7845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
7846 $as_echo "$OTOOL64" >&6; }
7847 else
7848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7849 $as_echo "no" >&6; }
7850 fi
7851
7852
7853 fi
7854 if test -z "$ac_cv_prog_OTOOL64"; then
7855 ac_ct_OTOOL64=$OTOOL64
7856 # Extract the first word of "otool64", so it can be a program name with args.
7857 set dummy otool64; ac_word=$2
7858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7859 $as_echo_n "checking for $ac_word... " >&6; }
7860 if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
7861 $as_echo_n "(cached) " >&6
7862 else
7863 if test -n "$ac_ct_OTOOL64"; then
7864 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
7865 else
7866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7867 for as_dir in $PATH
7868 do
7869 IFS=$as_save_IFS
7870 test -z "$as_dir" && as_dir=.
7871 for ac_exec_ext in '' $ac_executable_extensions; do
7872 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7873 ac_cv_prog_ac_ct_OTOOL64="otool64"
7874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7875 break 2
7876 fi
7877 done
7878 done
7879 IFS=$as_save_IFS
7880
7881 fi
7882 fi
7883 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
7884 if test -n "$ac_ct_OTOOL64"; then
7885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
7886 $as_echo "$ac_ct_OTOOL64" >&6; }
7887 else
7888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7889 $as_echo "no" >&6; }
7890 fi
7891
7892 if test "x$ac_ct_OTOOL64" = x; then
7893 OTOOL64=":"
7894 else
7895 case $cross_compiling:$ac_tool_warned in
7896 yes:)
7897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7898 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7899 ac_tool_warned=yes ;;
7900 esac
7901 OTOOL64=$ac_ct_OTOOL64
7902 fi
7903 else
7904 OTOOL64="$ac_cv_prog_OTOOL64"
7905 fi
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
7934 $as_echo_n "checking for -single_module linker flag... " >&6; }
7935 if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
7936 $as_echo_n "(cached) " >&6
7937 else
7938 lt_cv_apple_cc_single_mod=no
7939 if test -z "${LT_MULTI_MODULE}"; then
7940 # By default we will add the -single_module flag. You can override
7941 # by either setting the environment variable LT_MULTI_MODULE
7942 # non-empty at configure time, or by adding -multi_module to the
7943 # link flags.
7944 rm -rf libconftest.dylib*
7945 echo "int foo(void){return 1;}" > conftest.c
7946 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
7947 -dynamiclib -Wl,-single_module conftest.c" >&5
7948 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
7949 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
7950 _lt_result=$?
7951 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
7952 lt_cv_apple_cc_single_mod=yes
7953 else
7954 cat conftest.err >&5
7955 fi
7956 rm -rf libconftest.dylib*
7957 rm -f conftest.*
7958 fi
7959 fi
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
7961 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
7963 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
7964 if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
7965 $as_echo_n "(cached) " >&6
7966 else
7967 lt_cv_ld_exported_symbols_list=no
7968 save_LDFLAGS=$LDFLAGS
7969 echo "_main" > conftest.sym
7970 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
7971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7972 /* end confdefs.h. */
7973
7974 int
7975 main ()
7976 {
7977
7978 ;
7979 return 0;
7980 }
7981 _ACEOF
7982 if ac_fn_c_try_link "$LINENO"; then :
7983 lt_cv_ld_exported_symbols_list=yes
7984 else
7985 lt_cv_ld_exported_symbols_list=no
7986 fi
7987 rm -f core conftest.err conftest.$ac_objext \
7988 conftest$ac_exeext conftest.$ac_ext
7989 LDFLAGS="$save_LDFLAGS"
7990
7991 fi
7992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
7993 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
7994 case $host_os in
7995 rhapsody* | darwin1.[012])
7996 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
7997 darwin1.*)
7998 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
7999 darwin*) # darwin 5.x on
8000 # if running on 10.5 or later, the deployment target defaults
8001 # to the OS version, if on x86, and 10.4, the deployment
8002 # target defaults to 10.4. Don't you love it?
8003 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
8004 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
8005 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
8006 10.[012]*)
8007 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
8008 10.*)
8009 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
8010 esac
8011 ;;
8012 esac
8013 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
8014 _lt_dar_single_mod='$single_module'
8015 fi
8016 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
8017 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
8018 else
8019 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
8020 fi
8021 if test "$DSYMUTIL" != ":"; then
8022 _lt_dsymutil='~$DSYMUTIL $lib || :'
8023 else
8024 _lt_dsymutil=
8025 fi
8026 ;;
8027 esac
8028
8029 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8030 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8031 inttypes.h stdint.h unistd.h
8032 do :
8033 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8034 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8035 "
8036 eval as_val=\$$as_ac_Header
8037 if test "x$as_val" = x""yes; then :
8038 cat >>confdefs.h <<_ACEOF
8039 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8040 _ACEOF
8041
8042 fi
8043
8044 done
8045
8046
8047 for ac_header in dlfcn.h
8048 do :
8049 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
8050 "
8051 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
8052 cat >>confdefs.h <<_ACEOF
8053 #define HAVE_DLFCN_H 1
8054 _ACEOF
8055
8056 fi
8057
8058 done
8059
8060
8061
8062 # Set options
8063
8064
8065
8066 enable_dlopen=no
8067
8068
8069 enable_win32_dll=no
8070
8071
8072 # Check whether --enable-shared was given.
8073 if test "${enable_shared+set}" = set; then :
8074 enableval=$enable_shared; p=${PACKAGE-default}
8075 case $enableval in
8076 yes) enable_shared=yes ;;
8077 no) enable_shared=no ;;
8078 *)
8079 enable_shared=no
8080 # Look at the argument we got. We use all the common list separators.
8081 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8082 for pkg in $enableval; do
8083 IFS="$lt_save_ifs"
8084 if test "X$pkg" = "X$p"; then
8085 enable_shared=yes
8086 fi
8087 done
8088 IFS="$lt_save_ifs"
8089 ;;
8090 esac
8091 else
8092 enable_shared=yes
8093 fi
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103 # Check whether --enable-static was given.
8104 if test "${enable_static+set}" = set; then :
8105 enableval=$enable_static; p=${PACKAGE-default}
8106 case $enableval in
8107 yes) enable_static=yes ;;
8108 no) enable_static=no ;;
8109 *)
8110 enable_static=no
8111 # Look at the argument we got. We use all the common list separators.
8112 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8113 for pkg in $enableval; do
8114 IFS="$lt_save_ifs"
8115 if test "X$pkg" = "X$p"; then
8116 enable_static=yes
8117 fi
8118 done
8119 IFS="$lt_save_ifs"
8120 ;;
8121 esac
8122 else
8123 enable_static=yes
8124 fi
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135 # Check whether --with-pic was given.
8136 if test "${with_pic+set}" = set; then :
8137 withval=$with_pic; pic_mode="$withval"
8138 else
8139 pic_mode=default
8140 fi
8141
8142
8143 test -z "$pic_mode" && pic_mode=default
8144
8145
8146
8147
8148
8149
8150
8151 # Check whether --enable-fast-install was given.
8152 if test "${enable_fast_install+set}" = set; then :
8153 enableval=$enable_fast_install; p=${PACKAGE-default}
8154 case $enableval in
8155 yes) enable_fast_install=yes ;;
8156 no) enable_fast_install=no ;;
8157 *)
8158 enable_fast_install=no
8159 # Look at the argument we got. We use all the common list separators.
8160 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8161 for pkg in $enableval; do
8162 IFS="$lt_save_ifs"
8163 if test "X$pkg" = "X$p"; then
8164 enable_fast_install=yes
8165 fi
8166 done
8167 IFS="$lt_save_ifs"
8168 ;;
8169 esac
8170 else
8171 enable_fast_install=yes
8172 fi
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184 # This can be used to rebuild libtool when needed
8185 LIBTOOL_DEPS="$ltmain"
8186
8187 # Always use our own libtool.
8188 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214 test -z "$LN_S" && LN_S="ln -s"
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229 if test -n "${ZSH_VERSION+set}" ; then
8230 setopt NO_GLOB_SUBST
8231 fi
8232
8233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
8234 $as_echo_n "checking for objdir... " >&6; }
8235 if test "${lt_cv_objdir+set}" = set; then :
8236 $as_echo_n "(cached) " >&6
8237 else
8238 rm -f .libs 2>/dev/null
8239 mkdir .libs 2>/dev/null
8240 if test -d .libs; then
8241 lt_cv_objdir=.libs
8242 else
8243 # MS-DOS does not allow filenames that begin with a dot.
8244 lt_cv_objdir=_libs
8245 fi
8246 rmdir .libs 2>/dev/null
8247 fi
8248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
8249 $as_echo "$lt_cv_objdir" >&6; }
8250 objdir=$lt_cv_objdir
8251
8252
8253
8254
8255
8256 cat >>confdefs.h <<_ACEOF
8257 #define LT_OBJDIR "$lt_cv_objdir/"
8258 _ACEOF
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276 case $host_os in
8277 aix3*)
8278 # AIX sometimes has problems with the GCC collect2 program. For some
8279 # reason, if we set the COLLECT_NAMES environment variable, the problems
8280 # vanish in a puff of smoke.
8281 if test "X${COLLECT_NAMES+set}" != Xset; then
8282 COLLECT_NAMES=
8283 export COLLECT_NAMES
8284 fi
8285 ;;
8286 esac
8287
8288 # Sed substitution that helps us do robust quoting. It backslashifies
8289 # metacharacters that are still active within double-quoted strings.
8290 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
8291
8292 # Same as above, but do not quote variable references.
8293 double_quote_subst='s/\(["`\\]\)/\\\1/g'
8294
8295 # Sed substitution to delay expansion of an escaped shell variable in a
8296 # double_quote_subst'ed string.
8297 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
8298
8299 # Sed substitution to delay expansion of an escaped single quote.
8300 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
8301
8302 # Sed substitution to avoid accidental globbing in evaled expressions
8303 no_glob_subst='s/\*/\\\*/g'
8304
8305 # Global variables:
8306 ofile=libtool
8307 can_build_shared=yes
8308
8309 # All known linkers require a `.a' archive for static linking (except MSVC,
8310 # which needs '.lib').
8311 libext=a
8312
8313 with_gnu_ld="$lt_cv_prog_gnu_ld"
8314
8315 old_CC="$CC"
8316 old_CFLAGS="$CFLAGS"
8317
8318 # Set sane defaults for various variables
8319 test -z "$CC" && CC=cc
8320 test -z "$LTCC" && LTCC=$CC
8321 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
8322 test -z "$LD" && LD=ld
8323 test -z "$ac_objext" && ac_objext=o
8324
8325 for cc_temp in $compiler""; do
8326 case $cc_temp in
8327 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8328 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8329 \-*) ;;
8330 *) break;;
8331 esac
8332 done
8333 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8334
8335
8336 # Only perform the check for file, if the check method requires it
8337 test -z "$MAGIC_CMD" && MAGIC_CMD=file
8338 case $deplibs_check_method in
8339 file_magic*)
8340 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
8342 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
8343 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8344 $as_echo_n "(cached) " >&6
8345 else
8346 case $MAGIC_CMD in
8347 [\\/*] | ?:[\\/]*)
8348 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8349 ;;
8350 *)
8351 lt_save_MAGIC_CMD="$MAGIC_CMD"
8352 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8353 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8354 for ac_dir in $ac_dummy; do
8355 IFS="$lt_save_ifs"
8356 test -z "$ac_dir" && ac_dir=.
8357 if test -f $ac_dir/${ac_tool_prefix}file; then
8358 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
8359 if test -n "$file_magic_test_file"; then
8360 case $deplibs_check_method in
8361 "file_magic "*)
8362 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8363 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8364 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8365 $EGREP "$file_magic_regex" > /dev/null; then
8366 :
8367 else
8368 cat <<_LT_EOF 1>&2
8369
8370 *** Warning: the command libtool uses to detect shared libraries,
8371 *** $file_magic_cmd, produces output that libtool cannot recognize.
8372 *** The result is that libtool may fail to recognize shared libraries
8373 *** as such. This will affect the creation of libtool libraries that
8374 *** depend on shared libraries, but programs linked with such libtool
8375 *** libraries will work regardless of this problem. Nevertheless, you
8376 *** may want to report the problem to your system manager and/or to
8377 *** bug-libtool@gnu.org
8378
8379 _LT_EOF
8380 fi ;;
8381 esac
8382 fi
8383 break
8384 fi
8385 done
8386 IFS="$lt_save_ifs"
8387 MAGIC_CMD="$lt_save_MAGIC_CMD"
8388 ;;
8389 esac
8390 fi
8391
8392 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8393 if test -n "$MAGIC_CMD"; then
8394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8395 $as_echo "$MAGIC_CMD" >&6; }
8396 else
8397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8398 $as_echo "no" >&6; }
8399 fi
8400
8401
8402
8403
8404
8405 if test -z "$lt_cv_path_MAGIC_CMD"; then
8406 if test -n "$ac_tool_prefix"; then
8407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
8408 $as_echo_n "checking for file... " >&6; }
8409 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8410 $as_echo_n "(cached) " >&6
8411 else
8412 case $MAGIC_CMD in
8413 [\\/*] | ?:[\\/]*)
8414 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8415 ;;
8416 *)
8417 lt_save_MAGIC_CMD="$MAGIC_CMD"
8418 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8419 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8420 for ac_dir in $ac_dummy; do
8421 IFS="$lt_save_ifs"
8422 test -z "$ac_dir" && ac_dir=.
8423 if test -f $ac_dir/file; then
8424 lt_cv_path_MAGIC_CMD="$ac_dir/file"
8425 if test -n "$file_magic_test_file"; then
8426 case $deplibs_check_method in
8427 "file_magic "*)
8428 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8429 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8430 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8431 $EGREP "$file_magic_regex" > /dev/null; then
8432 :
8433 else
8434 cat <<_LT_EOF 1>&2
8435
8436 *** Warning: the command libtool uses to detect shared libraries,
8437 *** $file_magic_cmd, produces output that libtool cannot recognize.
8438 *** The result is that libtool may fail to recognize shared libraries
8439 *** as such. This will affect the creation of libtool libraries that
8440 *** depend on shared libraries, but programs linked with such libtool
8441 *** libraries will work regardless of this problem. Nevertheless, you
8442 *** may want to report the problem to your system manager and/or to
8443 *** bug-libtool@gnu.org
8444
8445 _LT_EOF
8446 fi ;;
8447 esac
8448 fi
8449 break
8450 fi
8451 done
8452 IFS="$lt_save_ifs"
8453 MAGIC_CMD="$lt_save_MAGIC_CMD"
8454 ;;
8455 esac
8456 fi
8457
8458 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8459 if test -n "$MAGIC_CMD"; then
8460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8461 $as_echo "$MAGIC_CMD" >&6; }
8462 else
8463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8464 $as_echo "no" >&6; }
8465 fi
8466
8467
8468 else
8469 MAGIC_CMD=:
8470 fi
8471 fi
8472
8473 fi
8474 ;;
8475 esac
8476
8477 # Use C for the default configuration in the libtool script
8478
8479 lt_save_CC="$CC"
8480 ac_ext=c
8481 ac_cpp='$CPP $CPPFLAGS'
8482 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8483 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8484 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8485
8486
8487 # Source file extension for C test sources.
8488 ac_ext=c
8489
8490 # Object file extension for compiled C test sources.
8491 objext=o
8492 objext=$objext
8493
8494 # Code to be used in simple compile tests
8495 lt_simple_compile_test_code="int some_variable = 0;"
8496
8497 # Code to be used in simple link tests
8498 lt_simple_link_test_code='int main(){return(0);}'
8499
8500
8501
8502
8503
8504
8505
8506 # If no C compiler was specified, use CC.
8507 LTCC=${LTCC-"$CC"}
8508
8509 # If no C compiler flags were specified, use CFLAGS.
8510 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8511
8512 # Allow CC to be a program name with arguments.
8513 compiler=$CC
8514
8515 # Save the default compiler, since it gets overwritten when the other
8516 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
8517 compiler_DEFAULT=$CC
8518
8519 # save warnings/boilerplate of simple test code
8520 ac_outfile=conftest.$ac_objext
8521 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
8522 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
8523 _lt_compiler_boilerplate=`cat conftest.err`
8524 $RM conftest*
8525
8526 ac_outfile=conftest.$ac_objext
8527 echo "$lt_simple_link_test_code" >conftest.$ac_ext
8528 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
8529 _lt_linker_boilerplate=`cat conftest.err`
8530 $RM -r conftest*
8531
8532
8533 if test -n "$compiler"; then
8534
8535 lt_prog_compiler_no_builtin_flag=
8536
8537 if test "$GCC" = yes; then
8538 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
8539
8540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
8541 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
8542 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
8543 $as_echo_n "(cached) " >&6
8544 else
8545 lt_cv_prog_compiler_rtti_exceptions=no
8546 ac_outfile=conftest.$ac_objext
8547 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8548 lt_compiler_flag="-fno-rtti -fno-exceptions"
8549 # Insert the option either (1) after the last *FLAGS variable, or
8550 # (2) before a word containing "conftest.", or (3) at the end.
8551 # Note that $ac_compile itself does not contain backslashes and begins
8552 # with a dollar sign (not a hyphen), so the echo should work correctly.
8553 # The option is referenced via a variable to avoid confusing sed.
8554 lt_compile=`echo "$ac_compile" | $SED \
8555 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8556 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8557 -e 's:$: $lt_compiler_flag:'`
8558 (eval echo "\"\$as_me:8559: $lt_compile\"" >&5)
8559 (eval "$lt_compile" 2>conftest.err)
8560 ac_status=$?
8561 cat conftest.err >&5
8562 echo "$as_me:8563: \$? = $ac_status" >&5
8563 if (exit $ac_status) && test -s "$ac_outfile"; then
8564 # The compiler can only warn and ignore the option if not recognized
8565 # So say no if there are warnings other than the usual output.
8566 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
8567 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8568 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
8569 lt_cv_prog_compiler_rtti_exceptions=yes
8570 fi
8571 fi
8572 $RM conftest*
8573
8574 fi
8575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
8576 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
8577
8578 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
8579 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
8580 else
8581 :
8582 fi
8583
8584 fi
8585
8586
8587
8588
8589
8590
8591 lt_prog_compiler_wl=
8592 lt_prog_compiler_pic=
8593 lt_prog_compiler_static=
8594
8595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8596 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8597
8598 if test "$GCC" = yes; then
8599 lt_prog_compiler_wl='-Wl,'
8600 lt_prog_compiler_static='-static'
8601
8602 case $host_os in
8603 aix*)
8604 # All AIX code is PIC.
8605 if test "$host_cpu" = ia64; then
8606 # AIX 5 now supports IA64 processor
8607 lt_prog_compiler_static='-Bstatic'
8608 fi
8609 ;;
8610
8611 amigaos*)
8612 case $host_cpu in
8613 powerpc)
8614 # see comment about AmigaOS4 .so support
8615 lt_prog_compiler_pic='-fPIC'
8616 ;;
8617 m68k)
8618 # FIXME: we need at least 68020 code to build shared libraries, but
8619 # adding the `-m68020' flag to GCC prevents building anything better,
8620 # like `-m68040'.
8621 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
8622 ;;
8623 esac
8624 ;;
8625
8626 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8627 # PIC is the default for these OSes.
8628 ;;
8629
8630 mingw* | cygwin* | pw32* | os2* | cegcc*)
8631 # This hack is so that the source file can tell whether it is being
8632 # built for inclusion in a dll (and should export symbols for example).
8633 # Although the cygwin gcc ignores -fPIC, still need this for old-style
8634 # (--disable-auto-import) libraries
8635 lt_prog_compiler_pic='-DDLL_EXPORT'
8636 ;;
8637
8638 darwin* | rhapsody*)
8639 # PIC is the default on this platform
8640 # Common symbols not allowed in MH_DYLIB files
8641 lt_prog_compiler_pic='-fno-common'
8642 ;;
8643
8644 hpux*)
8645 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
8646 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
8647 # sets the default TLS model and affects inlining.
8648 case $host_cpu in
8649 hppa*64*)
8650 # +Z the default
8651 ;;
8652 *)
8653 lt_prog_compiler_pic='-fPIC'
8654 ;;
8655 esac
8656 ;;
8657
8658 interix[3-9]*)
8659 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
8660 # Instead, we relocate shared libraries at runtime.
8661 ;;
8662
8663 msdosdjgpp*)
8664 # Just because we use GCC doesn't mean we suddenly get shared libraries
8665 # on systems that don't support them.
8666 lt_prog_compiler_can_build_shared=no
8667 enable_shared=no
8668 ;;
8669
8670 *nto* | *qnx*)
8671 # QNX uses GNU C++, but need to define -shared option too, otherwise
8672 # it will coredump.
8673 lt_prog_compiler_pic='-fPIC -shared'
8674 ;;
8675
8676 sysv4*MP*)
8677 if test -d /usr/nec; then
8678 lt_prog_compiler_pic=-Kconform_pic
8679 fi
8680 ;;
8681
8682 *)
8683 lt_prog_compiler_pic='-fPIC'
8684 ;;
8685 esac
8686 else
8687 # PORTME Check for flag to pass linker flags through the system compiler.
8688 case $host_os in
8689 aix*)
8690 lt_prog_compiler_wl='-Wl,'
8691 if test "$host_cpu" = ia64; then
8692 # AIX 5 now supports IA64 processor
8693 lt_prog_compiler_static='-Bstatic'
8694 else
8695 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
8696 fi
8697 ;;
8698
8699 mingw* | cygwin* | pw32* | os2* | cegcc*)
8700 # This hack is so that the source file can tell whether it is being
8701 # built for inclusion in a dll (and should export symbols for example).
8702 lt_prog_compiler_pic='-DDLL_EXPORT'
8703 ;;
8704
8705 hpux9* | hpux10* | hpux11*)
8706 lt_prog_compiler_wl='-Wl,'
8707 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8708 # not for PA HP-UX.
8709 case $host_cpu in
8710 hppa*64*|ia64*)
8711 # +Z the default
8712 ;;
8713 *)
8714 lt_prog_compiler_pic='+Z'
8715 ;;
8716 esac
8717 # Is there a better lt_prog_compiler_static that works with the bundled CC?
8718 lt_prog_compiler_static='${wl}-a ${wl}archive'
8719 ;;
8720
8721 irix5* | irix6* | nonstopux*)
8722 lt_prog_compiler_wl='-Wl,'
8723 # PIC (with -KPIC) is the default.
8724 lt_prog_compiler_static='-non_shared'
8725 ;;
8726
8727 linux* | k*bsd*-gnu | kopensolaris*-gnu)
8728 case $cc_basename in
8729 # old Intel for x86_64 which still supported -KPIC.
8730 ecc*)
8731 lt_prog_compiler_wl='-Wl,'
8732 lt_prog_compiler_pic='-KPIC'
8733 lt_prog_compiler_static='-static'
8734 ;;
8735 # icc used to be incompatible with GCC.
8736 # ICC 10 doesn't accept -KPIC any more.
8737 icc* | ifort*)
8738 lt_prog_compiler_wl='-Wl,'
8739 lt_prog_compiler_pic='-fPIC'
8740 lt_prog_compiler_static='-static'
8741 ;;
8742 # Lahey Fortran 8.1.
8743 lf95*)
8744 lt_prog_compiler_wl='-Wl,'
8745 lt_prog_compiler_pic='--shared'
8746 lt_prog_compiler_static='--static'
8747 ;;
8748 pgcc* | pgf77* | pgf90* | pgf95*)
8749 # Portland Group compilers (*not* the Pentium gcc compiler,
8750 # which looks to be a dead project)
8751 lt_prog_compiler_wl='-Wl,'
8752 lt_prog_compiler_pic='-fpic'
8753 lt_prog_compiler_static='-Bstatic'
8754 ;;
8755 ccc*)
8756 lt_prog_compiler_wl='-Wl,'
8757 # All Alpha code is PIC.
8758 lt_prog_compiler_static='-non_shared'
8759 ;;
8760 xl*)
8761 # IBM XL C 8.0/Fortran 10.1 on PPC
8762 lt_prog_compiler_wl='-Wl,'
8763 lt_prog_compiler_pic='-qpic'
8764 lt_prog_compiler_static='-qstaticlink'
8765 ;;
8766 *)
8767 case `$CC -V 2>&1 | sed 5q` in
8768 *Sun\ C*)
8769 # Sun C 5.9
8770 lt_prog_compiler_pic='-KPIC'
8771 lt_prog_compiler_static='-Bstatic'
8772 lt_prog_compiler_wl='-Wl,'
8773 ;;
8774 *Sun\ F*)
8775 # Sun Fortran 8.3 passes all unrecognized flags to the linker
8776 lt_prog_compiler_pic='-KPIC'
8777 lt_prog_compiler_static='-Bstatic'
8778 lt_prog_compiler_wl=''
8779 ;;
8780 esac
8781 ;;
8782 esac
8783 ;;
8784
8785 newsos6)
8786 lt_prog_compiler_pic='-KPIC'
8787 lt_prog_compiler_static='-Bstatic'
8788 ;;
8789
8790 *nto* | *qnx*)
8791 # QNX uses GNU C++, but need to define -shared option too, otherwise
8792 # it will coredump.
8793 lt_prog_compiler_pic='-fPIC -shared'
8794 ;;
8795
8796 osf3* | osf4* | osf5*)
8797 lt_prog_compiler_wl='-Wl,'
8798 # All OSF/1 code is PIC.
8799 lt_prog_compiler_static='-non_shared'
8800 ;;
8801
8802 rdos*)
8803 lt_prog_compiler_static='-non_shared'
8804 ;;
8805
8806 solaris*)
8807 lt_prog_compiler_pic='-KPIC'
8808 lt_prog_compiler_static='-Bstatic'
8809 case $cc_basename in
8810 f77* | f90* | f95*)
8811 lt_prog_compiler_wl='-Qoption ld ';;
8812 *)
8813 lt_prog_compiler_wl='-Wl,';;
8814 esac
8815 ;;
8816
8817 sunos4*)
8818 lt_prog_compiler_wl='-Qoption ld '
8819 lt_prog_compiler_pic='-PIC'
8820 lt_prog_compiler_static='-Bstatic'
8821 ;;
8822
8823 sysv4 | sysv4.2uw2* | sysv4.3*)
8824 lt_prog_compiler_wl='-Wl,'
8825 lt_prog_compiler_pic='-KPIC'
8826 lt_prog_compiler_static='-Bstatic'
8827 ;;
8828
8829 sysv4*MP*)
8830 if test -d /usr/nec ;then
8831 lt_prog_compiler_pic='-Kconform_pic'
8832 lt_prog_compiler_static='-Bstatic'
8833 fi
8834 ;;
8835
8836 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
8837 lt_prog_compiler_wl='-Wl,'
8838 lt_prog_compiler_pic='-KPIC'
8839 lt_prog_compiler_static='-Bstatic'
8840 ;;
8841
8842 unicos*)
8843 lt_prog_compiler_wl='-Wl,'
8844 lt_prog_compiler_can_build_shared=no
8845 ;;
8846
8847 uts4*)
8848 lt_prog_compiler_pic='-pic'
8849 lt_prog_compiler_static='-Bstatic'
8850 ;;
8851
8852 *)
8853 lt_prog_compiler_can_build_shared=no
8854 ;;
8855 esac
8856 fi
8857
8858 case $host_os in
8859 # For platforms which do not support PIC, -DPIC is meaningless:
8860 *djgpp*)
8861 lt_prog_compiler_pic=
8862 ;;
8863 *)
8864 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8865 ;;
8866 esac
8867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
8868 $as_echo "$lt_prog_compiler_pic" >&6; }
8869
8870
8871
8872
8873
8874
8875 #
8876 # Check to make sure the PIC flag actually works.
8877 #
8878 if test -n "$lt_prog_compiler_pic"; then
8879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
8880 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
8881 if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
8882 $as_echo_n "(cached) " >&6
8883 else
8884 lt_cv_prog_compiler_pic_works=no
8885 ac_outfile=conftest.$ac_objext
8886 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8887 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
8888 # Insert the option either (1) after the last *FLAGS variable, or
8889 # (2) before a word containing "conftest.", or (3) at the end.
8890 # Note that $ac_compile itself does not contain backslashes and begins
8891 # with a dollar sign (not a hyphen), so the echo should work correctly.
8892 # The option is referenced via a variable to avoid confusing sed.
8893 lt_compile=`echo "$ac_compile" | $SED \
8894 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8895 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8896 -e 's:$: $lt_compiler_flag:'`
8897 (eval echo "\"\$as_me:8898: $lt_compile\"" >&5)
8898 (eval "$lt_compile" 2>conftest.err)
8899 ac_status=$?
8900 cat conftest.err >&5
8901 echo "$as_me:8902: \$? = $ac_status" >&5
8902 if (exit $ac_status) && test -s "$ac_outfile"; then
8903 # The compiler can only warn and ignore the option if not recognized
8904 # So say no if there are warnings other than the usual output.
8905 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
8906 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8907 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
8908 lt_cv_prog_compiler_pic_works=yes
8909 fi
8910 fi
8911 $RM conftest*
8912
8913 fi
8914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
8915 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
8916
8917 if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
8918 case $lt_prog_compiler_pic in
8919 "" | " "*) ;;
8920 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8921 esac
8922 else
8923 lt_prog_compiler_pic=
8924 lt_prog_compiler_can_build_shared=no
8925 fi
8926
8927 fi
8928
8929
8930
8931
8932
8933
8934 #
8935 # Check to make sure the static flag actually works.
8936 #
8937 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
8938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
8939 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
8940 if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
8941 $as_echo_n "(cached) " >&6
8942 else
8943 lt_cv_prog_compiler_static_works=no
8944 save_LDFLAGS="$LDFLAGS"
8945 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
8946 echo "$lt_simple_link_test_code" > conftest.$ac_ext
8947 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8948 # The linker can only warn and ignore the option if not recognized
8949 # So say no if there are warnings
8950 if test -s conftest.err; then
8951 # Append any errors to the config.log.
8952 cat conftest.err 1>&5
8953 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
8954 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8955 if diff conftest.exp conftest.er2 >/dev/null; then
8956 lt_cv_prog_compiler_static_works=yes
8957 fi
8958 else
8959 lt_cv_prog_compiler_static_works=yes
8960 fi
8961 fi
8962 $RM -r conftest*
8963 LDFLAGS="$save_LDFLAGS"
8964
8965 fi
8966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
8967 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
8968
8969 if test x"$lt_cv_prog_compiler_static_works" = xyes; then
8970 :
8971 else
8972 lt_prog_compiler_static=
8973 fi
8974
8975
8976
8977
8978
8979
8980
8981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8982 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8983 if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8984 $as_echo_n "(cached) " >&6
8985 else
8986 lt_cv_prog_compiler_c_o=no
8987 $RM -r conftest 2>/dev/null
8988 mkdir conftest
8989 cd conftest
8990 mkdir out
8991 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8992
8993 lt_compiler_flag="-o out/conftest2.$ac_objext"
8994 # Insert the option either (1) after the last *FLAGS variable, or
8995 # (2) before a word containing "conftest.", or (3) at the end.
8996 # Note that $ac_compile itself does not contain backslashes and begins
8997 # with a dollar sign (not a hyphen), so the echo should work correctly.
8998 lt_compile=`echo "$ac_compile" | $SED \
8999 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9000 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9001 -e 's:$: $lt_compiler_flag:'`
9002 (eval echo "\"\$as_me:9003: $lt_compile\"" >&5)
9003 (eval "$lt_compile" 2>out/conftest.err)
9004 ac_status=$?
9005 cat out/conftest.err >&5
9006 echo "$as_me:9007: \$? = $ac_status" >&5
9007 if (exit $ac_status) && test -s out/conftest2.$ac_objext
9008 then
9009 # The compiler can only warn and ignore the option if not recognized
9010 # So say no if there are warnings
9011 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
9012 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
9013 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
9014 lt_cv_prog_compiler_c_o=yes
9015 fi
9016 fi
9017 chmod u+w . 2>&5
9018 $RM conftest*
9019 # SGI C++ compiler will create directory out/ii_files/ for
9020 # template instantiation
9021 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
9022 $RM out/* && rmdir out
9023 cd ..
9024 $RM -r conftest
9025 $RM conftest*
9026
9027 fi
9028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
9029 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
9030
9031
9032
9033
9034
9035
9036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
9037 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
9038 if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
9039 $as_echo_n "(cached) " >&6
9040 else
9041 lt_cv_prog_compiler_c_o=no
9042 $RM -r conftest 2>/dev/null
9043 mkdir conftest
9044 cd conftest
9045 mkdir out
9046 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9047
9048 lt_compiler_flag="-o out/conftest2.$ac_objext"
9049 # Insert the option either (1) after the last *FLAGS variable, or
9050 # (2) before a word containing "conftest.", or (3) at the end.
9051 # Note that $ac_compile itself does not contain backslashes and begins
9052 # with a dollar sign (not a hyphen), so the echo should work correctly.
9053 lt_compile=`echo "$ac_compile" | $SED \
9054 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9055 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9056 -e 's:$: $lt_compiler_flag:'`
9057 (eval echo "\"\$as_me:9058: $lt_compile\"" >&5)
9058 (eval "$lt_compile" 2>out/conftest.err)
9059 ac_status=$?
9060 cat out/conftest.err >&5
9061 echo "$as_me:9062: \$? = $ac_status" >&5
9062 if (exit $ac_status) && test -s out/conftest2.$ac_objext
9063 then
9064 # The compiler can only warn and ignore the option if not recognized
9065 # So say no if there are warnings
9066 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
9067 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
9068 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
9069 lt_cv_prog_compiler_c_o=yes
9070 fi
9071 fi
9072 chmod u+w . 2>&5
9073 $RM conftest*
9074 # SGI C++ compiler will create directory out/ii_files/ for
9075 # template instantiation
9076 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
9077 $RM out/* && rmdir out
9078 cd ..
9079 $RM -r conftest
9080 $RM conftest*
9081
9082 fi
9083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
9084 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
9085
9086
9087
9088
9089 hard_links="nottested"
9090 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
9091 # do not overwrite the value of need_locks provided by the user
9092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
9093 $as_echo_n "checking if we can lock with hard links... " >&6; }
9094 hard_links=yes
9095 $RM conftest*
9096 ln conftest.a conftest.b 2>/dev/null && hard_links=no
9097 touch conftest.a
9098 ln conftest.a conftest.b 2>&5 || hard_links=no
9099 ln conftest.a conftest.b 2>/dev/null && hard_links=no
9100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
9101 $as_echo "$hard_links" >&6; }
9102 if test "$hard_links" = no; then
9103 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
9104 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
9105 need_locks=warn
9106 fi
9107 else
9108 need_locks=no
9109 fi
9110
9111
9112
9113
9114
9115
9116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
9117 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
9118
9119 runpath_var=
9120 allow_undefined_flag=
9121 always_export_symbols=no
9122 archive_cmds=
9123 archive_expsym_cmds=
9124 compiler_needs_object=no
9125 enable_shared_with_static_runtimes=no
9126 export_dynamic_flag_spec=
9127 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
9128 hardcode_automatic=no
9129 hardcode_direct=no
9130 hardcode_direct_absolute=no
9131 hardcode_libdir_flag_spec=
9132 hardcode_libdir_flag_spec_ld=
9133 hardcode_libdir_separator=
9134 hardcode_minus_L=no
9135 hardcode_shlibpath_var=unsupported
9136 inherit_rpath=no
9137 link_all_deplibs=unknown
9138 module_cmds=
9139 module_expsym_cmds=
9140 old_archive_from_new_cmds=
9141 old_archive_from_expsyms_cmds=
9142 thread_safe_flag_spec=
9143 whole_archive_flag_spec=
9144 # include_expsyms should be a list of space-separated symbols to be *always*
9145 # included in the symbol list
9146 include_expsyms=
9147 # exclude_expsyms can be an extended regexp of symbols to exclude
9148 # it will be wrapped by ` (' and `)$', so one must not match beginning or
9149 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9150 # as well as any symbol that contains `d'.
9151 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
9152 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9153 # platforms (ab)use it in PIC code, but their linkers get confused if
9154 # the symbol is explicitly referenced. Since portable code cannot
9155 # rely on this symbol name, it's probably fine to never include it in
9156 # preloaded symbol tables.
9157 # Exclude shared library initialization/finalization symbols.
9158 extract_expsyms_cmds=
9159
9160 case $host_os in
9161 cygwin* | mingw* | pw32* | cegcc*)
9162 # FIXME: the MSVC++ port hasn't been tested in a loooong time
9163 # When not using gcc, we currently assume that we are using
9164 # Microsoft Visual C++.
9165 if test "$GCC" != yes; then
9166 with_gnu_ld=no
9167 fi
9168 ;;
9169 interix*)
9170 # we just hope/assume this is gcc and not c89 (= MSVC++)
9171 with_gnu_ld=yes
9172 ;;
9173 openbsd*)
9174 with_gnu_ld=no
9175 ;;
9176 linux* | k*bsd*-gnu)
9177 link_all_deplibs=no
9178 ;;
9179 esac
9180
9181 ld_shlibs=yes
9182 if test "$with_gnu_ld" = yes; then
9183 # If archive_cmds runs LD, not CC, wlarc should be empty
9184 wlarc='${wl}'
9185
9186 # Set some defaults for GNU ld with shared library support. These
9187 # are reset later if shared libraries are not supported. Putting them
9188 # here allows them to be overridden if necessary.
9189 runpath_var=LD_RUN_PATH
9190 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9191 export_dynamic_flag_spec='${wl}--export-dynamic'
9192 # ancient GNU ld didn't support --whole-archive et. al.
9193 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
9194 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9195 else
9196 whole_archive_flag_spec=
9197 fi
9198 supports_anon_versioning=no
9199 case `$LD -v 2>&1` in
9200 *GNU\ gold*) supports_anon_versioning=yes ;;
9201 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
9202 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
9203 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
9204 *\ 2.11.*) ;; # other 2.11 versions
9205 *) supports_anon_versioning=yes ;;
9206 esac
9207
9208 # See if GNU ld supports shared libraries.
9209 case $host_os in
9210 aix[3-9]*)
9211 # On AIX/PPC, the GNU linker is very broken
9212 if test "$host_cpu" != ia64; then
9213 ld_shlibs=no
9214 cat <<_LT_EOF 1>&2
9215
9216 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
9217 *** to be unable to reliably create shared libraries on AIX.
9218 *** Therefore, libtool is disabling shared libraries support. If you
9219 *** really care for shared libraries, you may want to modify your PATH
9220 *** so that a non-GNU linker is found, and then restart.
9221
9222 _LT_EOF
9223 fi
9224 ;;
9225
9226 amigaos*)
9227 case $host_cpu in
9228 powerpc)
9229 # see comment about AmigaOS4 .so support
9230 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9231 archive_expsym_cmds=''
9232 ;;
9233 m68k)
9234 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
9235 hardcode_libdir_flag_spec='-L$libdir'
9236 hardcode_minus_L=yes
9237 ;;
9238 esac
9239 ;;
9240
9241 beos*)
9242 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9243 allow_undefined_flag=unsupported
9244 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9245 # support --undefined. This deserves some investigation. FIXME
9246 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9247 else
9248 ld_shlibs=no
9249 fi
9250 ;;
9251
9252 cygwin* | mingw* | pw32* | cegcc*)
9253 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
9254 # as there is no search path for DLLs.
9255 hardcode_libdir_flag_spec='-L$libdir'
9256 allow_undefined_flag=unsupported
9257 always_export_symbols=no
9258 enable_shared_with_static_runtimes=yes
9259 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
9260
9261 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
9262 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9263 # If the export-symbols file already is a .def file (1st line
9264 # is EXPORTS), use it as is; otherwise, prepend...
9265 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9266 cp $export_symbols $output_objdir/$soname.def;
9267 else
9268 echo EXPORTS > $output_objdir/$soname.def;
9269 cat $export_symbols >> $output_objdir/$soname.def;
9270 fi~
9271 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9272 else
9273 ld_shlibs=no
9274 fi
9275 ;;
9276
9277 interix[3-9]*)
9278 hardcode_direct=no
9279 hardcode_shlibpath_var=no
9280 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9281 export_dynamic_flag_spec='${wl}-E'
9282 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
9283 # Instead, shared libraries are loaded at an image base (0x10000000 by
9284 # default) and relocated if they conflict, which is a slow very memory
9285 # consuming and fragmenting process. To avoid this, we pick a random,
9286 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
9287 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
9288 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9289 archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9290 ;;
9291
9292 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
9293 tmp_diet=no
9294 if test "$host_os" = linux-dietlibc; then
9295 case $cc_basename in
9296 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
9297 esac
9298 fi
9299 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
9300 && test "$tmp_diet" = no
9301 then
9302 tmp_addflag=
9303 tmp_sharedflag='-shared'
9304 case $cc_basename,$host_cpu in
9305 pgcc*) # Portland Group C compiler
9306 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
9307 tmp_addflag=' $pic_flag'
9308 ;;
9309 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
9310 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
9311 tmp_addflag=' $pic_flag -Mnomain' ;;
9312 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
9313 tmp_addflag=' -i_dynamic' ;;
9314 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
9315 tmp_addflag=' -i_dynamic -nofor_main' ;;
9316 ifc* | ifort*) # Intel Fortran compiler
9317 tmp_addflag=' -nofor_main' ;;
9318 lf95*) # Lahey Fortran 8.1
9319 whole_archive_flag_spec=
9320 tmp_sharedflag='--shared' ;;
9321 xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
9322 tmp_sharedflag='-qmkshrobj'
9323 tmp_addflag= ;;
9324 esac
9325 case `$CC -V 2>&1 | sed 5q` in
9326 *Sun\ C*) # Sun C 5.9
9327 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
9328 compiler_needs_object=yes
9329 tmp_sharedflag='-G' ;;
9330 *Sun\ F*) # Sun Fortran 8.3
9331 tmp_sharedflag='-G' ;;
9332 esac
9333 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9334
9335 if test "x$supports_anon_versioning" = xyes; then
9336 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
9337 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9338 echo "local: *; };" >> $output_objdir/$libname.ver~
9339 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9340 fi
9341
9342 case $cc_basename in
9343 xlf*)
9344 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
9345 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
9346 hardcode_libdir_flag_spec=
9347 hardcode_libdir_flag_spec_ld='-rpath $libdir'
9348 archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
9349 if test "x$supports_anon_versioning" = xyes; then
9350 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
9351 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9352 echo "local: *; };" >> $output_objdir/$libname.ver~
9353 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
9354 fi
9355 ;;
9356 esac
9357 else
9358 ld_shlibs=no
9359 fi
9360 ;;
9361
9362 netbsd* | netbsdelf*-gnu)
9363 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9364 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9365 wlarc=
9366 else
9367 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9368 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9369 fi
9370 ;;
9371
9372 solaris*)
9373 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
9374 ld_shlibs=no
9375 cat <<_LT_EOF 1>&2
9376
9377 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
9378 *** create shared libraries on Solaris systems. Therefore, libtool
9379 *** is disabling shared libraries support. We urge you to upgrade GNU
9380 *** binutils to release 2.9.1 or newer. Another option is to modify
9381 *** your PATH or compiler configuration so that the native linker is
9382 *** used, and then restart.
9383
9384 _LT_EOF
9385 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9386 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9387 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9388 else
9389 ld_shlibs=no
9390 fi
9391 ;;
9392
9393 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
9394 case `$LD -v 2>&1` in
9395 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
9396 ld_shlibs=no
9397 cat <<_LT_EOF 1>&2
9398
9399 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
9400 *** reliably create shared libraries on SCO systems. Therefore, libtool
9401 *** is disabling shared libraries support. We urge you to upgrade GNU
9402 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
9403 *** your PATH or compiler configuration so that the native linker is
9404 *** used, and then restart.
9405
9406 _LT_EOF
9407 ;;
9408 *)
9409 # For security reasons, it is highly recommended that you always
9410 # use absolute paths for naming shared libraries, and exclude the
9411 # DT_RUNPATH tag from executables and libraries. But doing so
9412 # requires that you compile everything twice, which is a pain.
9413 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9414 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9415 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9416 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9417 else
9418 ld_shlibs=no
9419 fi
9420 ;;
9421 esac
9422 ;;
9423
9424 sunos4*)
9425 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9426 wlarc=
9427 hardcode_direct=yes
9428 hardcode_shlibpath_var=no
9429 ;;
9430
9431 *)
9432 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9433 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9434 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9435 else
9436 ld_shlibs=no
9437 fi
9438 ;;
9439 esac
9440
9441 if test "$ld_shlibs" = no; then
9442 runpath_var=
9443 hardcode_libdir_flag_spec=
9444 export_dynamic_flag_spec=
9445 whole_archive_flag_spec=
9446 fi
9447 else
9448 # PORTME fill in a description of your system's linker (not GNU ld)
9449 case $host_os in
9450 aix3*)
9451 allow_undefined_flag=unsupported
9452 always_export_symbols=yes
9453 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
9454 # Note: this linker hardcodes the directories in LIBPATH if there
9455 # are no directories specified by -L.
9456 hardcode_minus_L=yes
9457 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
9458 # Neither direct hardcoding nor static linking is supported with a
9459 # broken collect2.
9460 hardcode_direct=unsupported
9461 fi
9462 ;;
9463
9464 aix[4-9]*)
9465 if test "$host_cpu" = ia64; then
9466 # On IA64, the linker does run time linking by default, so we don't
9467 # have to do anything special.
9468 aix_use_runtimelinking=no
9469 exp_sym_flag='-Bexport'
9470 no_entry_flag=""
9471 else
9472 # If we're using GNU nm, then we don't want the "-C" option.
9473 # -C means demangle to AIX nm, but means don't demangle with GNU nm
9474 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
9475 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
9476 else
9477 export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
9478 fi
9479 aix_use_runtimelinking=no
9480
9481 # Test if we are trying to use run time linking or normal
9482 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9483 # need to do runtime linking.
9484 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
9485 for ld_flag in $LDFLAGS; do
9486 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
9487 aix_use_runtimelinking=yes
9488 break
9489 fi
9490 done
9491 ;;
9492 esac
9493
9494 exp_sym_flag='-bexport'
9495 no_entry_flag='-bnoentry'
9496 fi
9497
9498 # When large executables or shared objects are built, AIX ld can
9499 # have problems creating the table of contents. If linking a library
9500 # or program results in "error TOC overflow" add -mminimal-toc to
9501 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
9502 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9503
9504 archive_cmds=''
9505 hardcode_direct=yes
9506 hardcode_direct_absolute=yes
9507 hardcode_libdir_separator=':'
9508 link_all_deplibs=yes
9509 file_list_spec='${wl}-f,'
9510
9511 if test "$GCC" = yes; then
9512 case $host_os in aix4.[012]|aix4.[012].*)
9513 # We only want to do this on AIX 4.2 and lower, the check
9514 # below for broken collect2 doesn't work under 4.3+
9515 collect2name=`${CC} -print-prog-name=collect2`
9516 if test -f "$collect2name" &&
9517 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
9518 then
9519 # We have reworked collect2
9520 :
9521 else
9522 # We have old collect2
9523 hardcode_direct=unsupported
9524 # It fails to find uninstalled libraries when the uninstalled
9525 # path is not listed in the libpath. Setting hardcode_minus_L
9526 # to unsupported forces relinking
9527 hardcode_minus_L=yes
9528 hardcode_libdir_flag_spec='-L$libdir'
9529 hardcode_libdir_separator=
9530 fi
9531 ;;
9532 esac
9533 shared_flag='-shared'
9534 if test "$aix_use_runtimelinking" = yes; then
9535 shared_flag="$shared_flag "'${wl}-G'
9536 fi
9537 link_all_deplibs=no
9538 else
9539 # not using gcc
9540 if test "$host_cpu" = ia64; then
9541 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9542 # chokes on -Wl,-G. The following line is correct:
9543 shared_flag='-G'
9544 else
9545 if test "$aix_use_runtimelinking" = yes; then
9546 shared_flag='${wl}-G'
9547 else
9548 shared_flag='${wl}-bM:SRE'
9549 fi
9550 fi
9551 fi
9552
9553 export_dynamic_flag_spec='${wl}-bexpall'
9554 # It seems that -bexpall does not export symbols beginning with
9555 # underscore (_), so it is better to generate a list of symbols to export.
9556 always_export_symbols=yes
9557 if test "$aix_use_runtimelinking" = yes; then
9558 # Warning - without using the other runtime loading flags (-brtl),
9559 # -berok will link without error, but may produce a broken library.
9560 allow_undefined_flag='-berok'
9561 # Determine the default libpath from the value encoded in an
9562 # empty executable.
9563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9564 /* end confdefs.h. */
9565
9566 int
9567 main ()
9568 {
9569
9570 ;
9571 return 0;
9572 }
9573 _ACEOF
9574 if ac_fn_c_try_link "$LINENO"; then :
9575
9576 lt_aix_libpath_sed='
9577 /Import File Strings/,/^$/ {
9578 /^0/ {
9579 s/^0 *\(.*\)$/\1/
9580 p
9581 }
9582 }'
9583 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9584 # Check for a 64-bit object if we didn't find anything.
9585 if test -z "$aix_libpath"; then
9586 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9587 fi
9588 fi
9589 rm -f core conftest.err conftest.$ac_objext \
9590 conftest$ac_exeext conftest.$ac_ext
9591 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9592
9593 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9594 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
9595 else
9596 if test "$host_cpu" = ia64; then
9597 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
9598 allow_undefined_flag="-z nodefs"
9599 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
9600 else
9601 # Determine the default libpath from the value encoded in an
9602 # empty executable.
9603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9604 /* end confdefs.h. */
9605
9606 int
9607 main ()
9608 {
9609
9610 ;
9611 return 0;
9612 }
9613 _ACEOF
9614 if ac_fn_c_try_link "$LINENO"; then :
9615
9616 lt_aix_libpath_sed='
9617 /Import File Strings/,/^$/ {
9618 /^0/ {
9619 s/^0 *\(.*\)$/\1/
9620 p
9621 }
9622 }'
9623 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9624 # Check for a 64-bit object if we didn't find anything.
9625 if test -z "$aix_libpath"; then
9626 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9627 fi
9628 fi
9629 rm -f core conftest.err conftest.$ac_objext \
9630 conftest$ac_exeext conftest.$ac_ext
9631 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9632
9633 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9634 # Warning - without using the other run time loading flags,
9635 # -berok will link without error, but may produce a broken library.
9636 no_undefined_flag=' ${wl}-bernotok'
9637 allow_undefined_flag=' ${wl}-berok'
9638 # Exported symbols can be pulled into shared objects from archives
9639 whole_archive_flag_spec='$convenience'
9640 archive_cmds_need_lc=yes
9641 # This is similar to how AIX traditionally builds its shared libraries.
9642 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
9643 fi
9644 fi
9645 ;;
9646
9647 amigaos*)
9648 case $host_cpu in
9649 powerpc)
9650 # see comment about AmigaOS4 .so support
9651 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9652 archive_expsym_cmds=''
9653 ;;
9654 m68k)
9655 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
9656 hardcode_libdir_flag_spec='-L$libdir'
9657 hardcode_minus_L=yes
9658 ;;
9659 esac
9660 ;;
9661
9662 bsdi[45]*)
9663 export_dynamic_flag_spec=-rdynamic
9664 ;;
9665
9666 cygwin* | mingw* | pw32* | cegcc*)
9667 # When not using gcc, we currently assume that we are using
9668 # Microsoft Visual C++.
9669 # hardcode_libdir_flag_spec is actually meaningless, as there is
9670 # no search path for DLLs.
9671 hardcode_libdir_flag_spec=' '
9672 allow_undefined_flag=unsupported
9673 # Tell ltmain to make .lib files, not .a files.
9674 libext=lib
9675 # Tell ltmain to make .dll files, not .so files.
9676 shrext_cmds=".dll"
9677 # FIXME: Setting linknames here is a bad hack.
9678 archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
9679 # The linker will automatically build a .lib file if we build a DLL.
9680 old_archive_from_new_cmds='true'
9681 # FIXME: Should let the user specify the lib program.
9682 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
9683 fix_srcfile_path='`cygpath -w "$srcfile"`'
9684 enable_shared_with_static_runtimes=yes
9685 ;;
9686
9687 darwin* | rhapsody*)
9688
9689
9690 archive_cmds_need_lc=no
9691 hardcode_direct=no
9692 hardcode_automatic=yes
9693 hardcode_shlibpath_var=unsupported
9694 whole_archive_flag_spec=''
9695 link_all_deplibs=yes
9696 allow_undefined_flag="$_lt_dar_allow_undefined"
9697 case $cc_basename in
9698 ifort*) _lt_dar_can_shared=yes ;;
9699 *) _lt_dar_can_shared=$GCC ;;
9700 esac
9701 if test "$_lt_dar_can_shared" = "yes"; then
9702 output_verbose_link_cmd=echo
9703 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
9704 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
9705 archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
9706 module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
9707
9708 else
9709 ld_shlibs=no
9710 fi
9711
9712 ;;
9713
9714 dgux*)
9715 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9716 hardcode_libdir_flag_spec='-L$libdir'
9717 hardcode_shlibpath_var=no
9718 ;;
9719
9720 freebsd1*)
9721 ld_shlibs=no
9722 ;;
9723
9724 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9725 # support. Future versions do this automatically, but an explicit c++rt0.o
9726 # does not break anything, and helps significantly (at the cost of a little
9727 # extra space).
9728 freebsd2.2*)
9729 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9730 hardcode_libdir_flag_spec='-R$libdir'
9731 hardcode_direct=yes
9732 hardcode_shlibpath_var=no
9733 ;;
9734
9735 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9736 freebsd2*)
9737 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9738 hardcode_direct=yes
9739 hardcode_minus_L=yes
9740 hardcode_shlibpath_var=no
9741 ;;
9742
9743 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9744 freebsd* | dragonfly*)
9745 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
9746 hardcode_libdir_flag_spec='-R$libdir'
9747 hardcode_direct=yes
9748 hardcode_shlibpath_var=no
9749 ;;
9750
9751 hpux9*)
9752 if test "$GCC" = yes; then
9753 archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
9754 else
9755 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
9756 fi
9757 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9758 hardcode_libdir_separator=:
9759 hardcode_direct=yes
9760
9761 # hardcode_minus_L: Not really in the search PATH,
9762 # but as the default location of the library.
9763 hardcode_minus_L=yes
9764 export_dynamic_flag_spec='${wl}-E'
9765 ;;
9766
9767 hpux10*)
9768 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9769 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9770 else
9771 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9772 fi
9773 if test "$with_gnu_ld" = no; then
9774 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9775 hardcode_libdir_flag_spec_ld='+b $libdir'
9776 hardcode_libdir_separator=:
9777 hardcode_direct=yes
9778 hardcode_direct_absolute=yes
9779 export_dynamic_flag_spec='${wl}-E'
9780 # hardcode_minus_L: Not really in the search PATH,
9781 # but as the default location of the library.
9782 hardcode_minus_L=yes
9783 fi
9784 ;;
9785
9786 hpux11*)
9787 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9788 case $host_cpu in
9789 hppa*64*)
9790 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9791 ;;
9792 ia64*)
9793 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9794 ;;
9795 *)
9796 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9797 ;;
9798 esac
9799 else
9800 case $host_cpu in
9801 hppa*64*)
9802 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9803 ;;
9804 ia64*)
9805 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9806 ;;
9807 *)
9808 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9809 ;;
9810 esac
9811 fi
9812 if test "$with_gnu_ld" = no; then
9813 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9814 hardcode_libdir_separator=:
9815
9816 case $host_cpu in
9817 hppa*64*|ia64*)
9818 hardcode_direct=no
9819 hardcode_shlibpath_var=no
9820 ;;
9821 *)
9822 hardcode_direct=yes
9823 hardcode_direct_absolute=yes
9824 export_dynamic_flag_spec='${wl}-E'
9825
9826 # hardcode_minus_L: Not really in the search PATH,
9827 # but as the default location of the library.
9828 hardcode_minus_L=yes
9829 ;;
9830 esac
9831 fi
9832 ;;
9833
9834 irix5* | irix6* | nonstopux*)
9835 if test "$GCC" = yes; then
9836 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9837 # Try to use the -exported_symbol ld option, if it does not
9838 # work, assume that -exports_file does not work either and
9839 # implicitly export all symbols.
9840 save_LDFLAGS="$LDFLAGS"
9841 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
9842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9843 /* end confdefs.h. */
9844 int foo(void) {}
9845 _ACEOF
9846 if ac_fn_c_try_link "$LINENO"; then :
9847 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
9848
9849 fi
9850 rm -f core conftest.err conftest.$ac_objext \
9851 conftest$ac_exeext conftest.$ac_ext
9852 LDFLAGS="$save_LDFLAGS"
9853 else
9854 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
9855 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
9856 fi
9857 archive_cmds_need_lc='no'
9858 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9859 hardcode_libdir_separator=:
9860 inherit_rpath=yes
9861 link_all_deplibs=yes
9862 ;;
9863
9864 netbsd* | netbsdelf*-gnu)
9865 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9866 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
9867 else
9868 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
9869 fi
9870 hardcode_libdir_flag_spec='-R$libdir'
9871 hardcode_direct=yes
9872 hardcode_shlibpath_var=no
9873 ;;
9874
9875 newsos6)
9876 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9877 hardcode_direct=yes
9878 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9879 hardcode_libdir_separator=:
9880 hardcode_shlibpath_var=no
9881 ;;
9882
9883 *nto* | *qnx*)
9884 ;;
9885
9886 openbsd*)
9887 if test -f /usr/libexec/ld.so; then
9888 hardcode_direct=yes
9889 hardcode_shlibpath_var=no
9890 hardcode_direct_absolute=yes
9891 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9892 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9893 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
9894 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9895 export_dynamic_flag_spec='${wl}-E'
9896 else
9897 case $host_os in
9898 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
9899 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9900 hardcode_libdir_flag_spec='-R$libdir'
9901 ;;
9902 *)
9903 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9904 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9905 ;;
9906 esac
9907 fi
9908 else
9909 ld_shlibs=no
9910 fi
9911 ;;
9912
9913 os2*)
9914 hardcode_libdir_flag_spec='-L$libdir'
9915 hardcode_minus_L=yes
9916 allow_undefined_flag=unsupported
9917 archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
9918 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
9919 ;;
9920
9921 osf3*)
9922 if test "$GCC" = yes; then
9923 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9924 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9925 else
9926 allow_undefined_flag=' -expect_unresolved \*'
9927 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
9928 fi
9929 archive_cmds_need_lc='no'
9930 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9931 hardcode_libdir_separator=:
9932 ;;
9933
9934 osf4* | osf5*) # as osf3* with the addition of -msym flag
9935 if test "$GCC" = yes; then
9936 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9937 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9938 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9939 else
9940 allow_undefined_flag=' -expect_unresolved \*'
9941 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
9942 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
9943 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
9944
9945 # Both c and cxx compiler support -rpath directly
9946 hardcode_libdir_flag_spec='-rpath $libdir'
9947 fi
9948 archive_cmds_need_lc='no'
9949 hardcode_libdir_separator=:
9950 ;;
9951
9952 solaris*)
9953 no_undefined_flag=' -z defs'
9954 if test "$GCC" = yes; then
9955 wlarc='${wl}'
9956 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9957 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9958 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9959 else
9960 case `$CC -V 2>&1` in
9961 *"Compilers 5.0"*)
9962 wlarc=''
9963 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9964 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9965 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
9966 ;;
9967 *)
9968 wlarc='${wl}'
9969 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
9970 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9971 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9972 ;;
9973 esac
9974 fi
9975 hardcode_libdir_flag_spec='-R$libdir'
9976 hardcode_shlibpath_var=no
9977 case $host_os in
9978 solaris2.[0-5] | solaris2.[0-5].*) ;;
9979 *)
9980 # The compiler driver will combine and reorder linker options,
9981 # but understands `-z linker_flag'. GCC discards it without `$wl',
9982 # but is careful enough not to reorder.
9983 # Supported since Solaris 2.6 (maybe 2.5.1?)
9984 if test "$GCC" = yes; then
9985 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
9986 else
9987 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
9988 fi
9989 ;;
9990 esac
9991 link_all_deplibs=yes
9992 ;;
9993
9994 sunos4*)
9995 if test "x$host_vendor" = xsequent; then
9996 # Use $CC to link under sequent, because it throws in some extra .o
9997 # files that make .init and .fini sections work.
9998 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9999 else
10000 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10001 fi
10002 hardcode_libdir_flag_spec='-L$libdir'
10003 hardcode_direct=yes
10004 hardcode_minus_L=yes
10005 hardcode_shlibpath_var=no
10006 ;;
10007
10008 sysv4)
10009 case $host_vendor in
10010 sni)
10011 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10012 hardcode_direct=yes # is this really true???
10013 ;;
10014 siemens)
10015 ## LD is ld it makes a PLAMLIB
10016 ## CC just makes a GrossModule.
10017 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10018 reload_cmds='$CC -r -o $output$reload_objs'
10019 hardcode_direct=no
10020 ;;
10021 motorola)
10022 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10023 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
10024 ;;
10025 esac
10026 runpath_var='LD_RUN_PATH'
10027 hardcode_shlibpath_var=no
10028 ;;
10029
10030 sysv4.3*)
10031 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10032 hardcode_shlibpath_var=no
10033 export_dynamic_flag_spec='-Bexport'
10034 ;;
10035
10036 sysv4*MP*)
10037 if test -d /usr/nec; then
10038 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10039 hardcode_shlibpath_var=no
10040 runpath_var=LD_RUN_PATH
10041 hardcode_runpath_var=yes
10042 ld_shlibs=yes
10043 fi
10044 ;;
10045
10046 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
10047 no_undefined_flag='${wl}-z,text'
10048 archive_cmds_need_lc=no
10049 hardcode_shlibpath_var=no
10050 runpath_var='LD_RUN_PATH'
10051
10052 if test "$GCC" = yes; then
10053 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10054 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10055 else
10056 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10057 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10058 fi
10059 ;;
10060
10061 sysv5* | sco3.2v5* | sco5v6*)
10062 # Note: We can NOT use -z defs as we might desire, because we do not
10063 # link with -lc, and that would cause any symbols used from libc to
10064 # always be unresolved, which means just about no library would
10065 # ever link correctly. If we're not using GNU ld we use -z text
10066 # though, which does catch some bad symbols but isn't as heavy-handed
10067 # as -z defs.
10068 no_undefined_flag='${wl}-z,text'
10069 allow_undefined_flag='${wl}-z,nodefs'
10070 archive_cmds_need_lc=no
10071 hardcode_shlibpath_var=no
10072 hardcode_libdir_flag_spec='${wl}-R,$libdir'
10073 hardcode_libdir_separator=':'
10074 link_all_deplibs=yes
10075 export_dynamic_flag_spec='${wl}-Bexport'
10076 runpath_var='LD_RUN_PATH'
10077
10078 if test "$GCC" = yes; then
10079 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10080 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10081 else
10082 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10083 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10084 fi
10085 ;;
10086
10087 uts4*)
10088 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10089 hardcode_libdir_flag_spec='-L$libdir'
10090 hardcode_shlibpath_var=no
10091 ;;
10092
10093 *)
10094 ld_shlibs=no
10095 ;;
10096 esac
10097
10098 if test x$host_vendor = xsni; then
10099 case $host in
10100 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10101 export_dynamic_flag_spec='${wl}-Blargedynsym'
10102 ;;
10103 esac
10104 fi
10105 fi
10106
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
10108 $as_echo "$ld_shlibs" >&6; }
10109 test "$ld_shlibs" = no && can_build_shared=no
10110
10111 with_gnu_ld=$with_gnu_ld
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127 #
10128 # Do we need to explicitly link libc?
10129 #
10130 case "x$archive_cmds_need_lc" in
10131 x|xyes)
10132 # Assume -lc should be added
10133 archive_cmds_need_lc=yes
10134
10135 if test "$enable_shared" = yes && test "$GCC" = yes; then
10136 case $archive_cmds in
10137 *'~'*)
10138 # FIXME: we may have to deal with multi-command sequences.
10139 ;;
10140 '$CC '*)
10141 # Test whether the compiler implicitly links with -lc since on some
10142 # systems, -lgcc has to come before -lc. If gcc already passes -lc
10143 # to ld, don't add -lc before -lgcc.
10144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
10145 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
10146 $RM conftest*
10147 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10148
10149 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10150 (eval $ac_compile) 2>&5
10151 ac_status=$?
10152 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10153 test $ac_status = 0; } 2>conftest.err; then
10154 soname=conftest
10155 lib=conftest
10156 libobjs=conftest.$ac_objext
10157 deplibs=
10158 wl=$lt_prog_compiler_wl
10159 pic_flag=$lt_prog_compiler_pic
10160 compiler_flags=-v
10161 linker_flags=-v
10162 verstring=
10163 output_objdir=.
10164 libname=conftest
10165 lt_save_allow_undefined_flag=$allow_undefined_flag
10166 allow_undefined_flag=
10167 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
10168 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
10169 ac_status=$?
10170 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10171 test $ac_status = 0; }
10172 then
10173 archive_cmds_need_lc=no
10174 else
10175 archive_cmds_need_lc=yes
10176 fi
10177 allow_undefined_flag=$lt_save_allow_undefined_flag
10178 else
10179 cat conftest.err 1>&5
10180 fi
10181 $RM conftest*
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
10183 $as_echo "$archive_cmds_need_lc" >&6; }
10184 ;;
10185 esac
10186 fi
10187 ;;
10188 esac
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
10347 $as_echo_n "checking dynamic linker characteristics... " >&6; }
10348
10349 if test "$GCC" = yes; then
10350 case $host_os in
10351 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
10352 *) lt_awk_arg="/^libraries:/" ;;
10353 esac
10354 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
10355 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
10356 # if the path contains ";" then we assume it to be the separator
10357 # otherwise default to the standard path separator (i.e. ":") - it is
10358 # assumed that no part of a normal pathname contains ";" but that should
10359 # okay in the real world where ";" in dirpaths is itself problematic.
10360 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
10361 else
10362 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10363 fi
10364 # Ok, now we have the path, separated by spaces, we can step through it
10365 # and add multilib dir if necessary.
10366 lt_tmp_lt_search_path_spec=
10367 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
10368 for lt_sys_path in $lt_search_path_spec; do
10369 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
10370 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
10371 else
10372 test -d "$lt_sys_path" && \
10373 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
10374 fi
10375 done
10376 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
10377 BEGIN {RS=" "; FS="/|\n";} {
10378 lt_foo="";
10379 lt_count=0;
10380 for (lt_i = NF; lt_i > 0; lt_i--) {
10381 if ($lt_i != "" && $lt_i != ".") {
10382 if ($lt_i == "..") {
10383 lt_count++;
10384 } else {
10385 if (lt_count == 0) {
10386 lt_foo="/" $lt_i lt_foo;
10387 } else {
10388 lt_count--;
10389 }
10390 }
10391 }
10392 }
10393 if (lt_foo != "") { lt_freq[lt_foo]++; }
10394 if (lt_freq[lt_foo] == 1) { print lt_foo; }
10395 }'`
10396 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
10397 else
10398 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
10399 fi
10400 library_names_spec=
10401 libname_spec='lib$name'
10402 soname_spec=
10403 shrext_cmds=".so"
10404 postinstall_cmds=
10405 postuninstall_cmds=
10406 finish_cmds=
10407 finish_eval=
10408 shlibpath_var=
10409 shlibpath_overrides_runpath=unknown
10410 version_type=none
10411 dynamic_linker="$host_os ld.so"
10412 sys_lib_dlsearch_path_spec="/lib /usr/lib"
10413 need_lib_prefix=unknown
10414 hardcode_into_libs=no
10415
10416 # when you set need_version to no, make sure it does not cause -set_version
10417 # flags to be left without arguments
10418 need_version=unknown
10419
10420 case $host_os in
10421 aix3*)
10422 version_type=linux
10423 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
10424 shlibpath_var=LIBPATH
10425
10426 # AIX 3 has no versioning support, so we append a major version to the name.
10427 soname_spec='${libname}${release}${shared_ext}$major'
10428 ;;
10429
10430 aix[4-9]*)
10431 version_type=linux
10432 need_lib_prefix=no
10433 need_version=no
10434 hardcode_into_libs=yes
10435 if test "$host_cpu" = ia64; then
10436 # AIX 5 supports IA64
10437 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
10438 shlibpath_var=LD_LIBRARY_PATH
10439 else
10440 # With GCC up to 2.95.x, collect2 would create an import file
10441 # for dependence libraries. The import file would start with
10442 # the line `#! .'. This would cause the generated library to
10443 # depend on `.', always an invalid library. This was fixed in
10444 # development snapshots of GCC prior to 3.0.
10445 case $host_os in
10446 aix4 | aix4.[01] | aix4.[01].*)
10447 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
10448 echo ' yes '
10449 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
10450 :
10451 else
10452 can_build_shared=no
10453 fi
10454 ;;
10455 esac
10456 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
10457 # soname into executable. Probably we can add versioning support to
10458 # collect2, so additional links can be useful in future.
10459 if test "$aix_use_runtimelinking" = yes; then
10460 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
10461 # instead of lib<name>.a to let people know that these are not
10462 # typical AIX shared libraries.
10463 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10464 else
10465 # We preserve .a as extension for shared libraries through AIX4.2
10466 # and later when we are not doing run time linking.
10467 library_names_spec='${libname}${release}.a $libname.a'
10468 soname_spec='${libname}${release}${shared_ext}$major'
10469 fi
10470 shlibpath_var=LIBPATH
10471 fi
10472 ;;
10473
10474 amigaos*)
10475 case $host_cpu in
10476 powerpc)
10477 # Since July 2007 AmigaOS4 officially supports .so libraries.
10478 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
10479 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10480 ;;
10481 m68k)
10482 library_names_spec='$libname.ixlibrary $libname.a'
10483 # Create ${libname}_ixlibrary.a entries in /sys/libs.
10484 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'
10485 ;;
10486 esac
10487 ;;
10488
10489 beos*)
10490 library_names_spec='${libname}${shared_ext}'
10491 dynamic_linker="$host_os ld.so"
10492 shlibpath_var=LIBRARY_PATH
10493 ;;
10494
10495 bsdi[45]*)
10496 version_type=linux
10497 need_version=no
10498 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10499 soname_spec='${libname}${release}${shared_ext}$major'
10500 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
10501 shlibpath_var=LD_LIBRARY_PATH
10502 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
10503 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
10504 # the default ld.so.conf also contains /usr/contrib/lib and
10505 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
10506 # libtool to hard-code these into programs
10507 ;;
10508
10509 cygwin* | mingw* | pw32* | cegcc*)
10510 version_type=windows
10511 shrext_cmds=".dll"
10512 need_version=no
10513 need_lib_prefix=no
10514
10515 case $GCC,$host_os in
10516 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
10517 library_names_spec='$libname.dll.a'
10518 # DLL is installed to $(libdir)/../bin by postinstall_cmds
10519 postinstall_cmds='base_file=`basename \${file}`~
10520 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
10521 dldir=$destdir/`dirname \$dlpath`~
10522 test -d \$dldir || mkdir -p \$dldir~
10523 $install_prog $dir/$dlname \$dldir/$dlname~
10524 chmod a+x \$dldir/$dlname~
10525 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
10526 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
10527 fi'
10528 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10529 dlpath=$dir/\$dldll~
10530 $RM \$dlpath'
10531 shlibpath_overrides_runpath=yes
10532
10533 case $host_os in
10534 cygwin*)
10535 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
10536 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10537 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
10538 ;;
10539 mingw* | cegcc*)
10540 # MinGW DLLs use traditional 'lib' prefix
10541 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10542 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
10543 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
10544 # It is most probably a Windows format PATH printed by
10545 # mingw gcc, but we are running on Cygwin. Gcc prints its search
10546 # path with ; separators, and with drive letters. We can handle the
10547 # drive letters (cygwin fileutils understands them), so leave them,
10548 # especially as we might pass files found there to a mingw objdump,
10549 # which wouldn't understand a cygwinified path. Ahh.
10550 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10551 else
10552 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10553 fi
10554 ;;
10555 pw32*)
10556 # pw32 DLLs use 'pw' prefix rather than 'lib'
10557 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10558 ;;
10559 esac
10560 ;;
10561
10562 *)
10563 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10564 ;;
10565 esac
10566 dynamic_linker='Win32 ld.exe'
10567 # FIXME: first we should search . and the directory the executable is in
10568 shlibpath_var=PATH
10569 ;;
10570
10571 darwin* | rhapsody*)
10572 dynamic_linker="$host_os dyld"
10573 version_type=darwin
10574 need_lib_prefix=no
10575 need_version=no
10576 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
10577 soname_spec='${libname}${release}${major}$shared_ext'
10578 shlibpath_overrides_runpath=yes
10579 shlibpath_var=DYLD_LIBRARY_PATH
10580 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
10581
10582 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
10583 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
10584 ;;
10585
10586 dgux*)
10587 version_type=linux
10588 need_lib_prefix=no
10589 need_version=no
10590 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
10591 soname_spec='${libname}${release}${shared_ext}$major'
10592 shlibpath_var=LD_LIBRARY_PATH
10593 ;;
10594
10595 freebsd1*)
10596 dynamic_linker=no
10597 ;;
10598
10599 freebsd* | dragonfly*)
10600 # DragonFly does not have aout. When/if they implement a new
10601 # versioning mechanism, adjust this.
10602 if test -x /usr/bin/objformat; then
10603 objformat=`/usr/bin/objformat`
10604 else
10605 case $host_os in
10606 freebsd[123]*) objformat=aout ;;
10607 *) objformat=elf ;;
10608 esac
10609 fi
10610 version_type=freebsd-$objformat
10611 case $version_type in
10612 freebsd-elf*)
10613 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10614 need_version=no
10615 need_lib_prefix=no
10616 ;;
10617 freebsd-*)
10618 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
10619 need_version=yes
10620 ;;
10621 esac
10622 shlibpath_var=LD_LIBRARY_PATH
10623 case $host_os in
10624 freebsd2*)
10625 shlibpath_overrides_runpath=yes
10626 ;;
10627 freebsd3.[01]* | freebsdelf3.[01]*)
10628 shlibpath_overrides_runpath=yes
10629 hardcode_into_libs=yes
10630 ;;
10631 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
10632 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
10633 shlibpath_overrides_runpath=no
10634 hardcode_into_libs=yes
10635 ;;
10636 *) # from 4.6 on, and DragonFly
10637 shlibpath_overrides_runpath=yes
10638 hardcode_into_libs=yes
10639 ;;
10640 esac
10641 ;;
10642
10643 gnu*)
10644 version_type=linux
10645 need_lib_prefix=no
10646 need_version=no
10647 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10648 soname_spec='${libname}${release}${shared_ext}$major'
10649 shlibpath_var=LD_LIBRARY_PATH
10650 hardcode_into_libs=yes
10651 ;;
10652
10653 hpux9* | hpux10* | hpux11*)
10654 # Give a soname corresponding to the major version so that dld.sl refuses to
10655 # link against other versions.
10656 version_type=sunos
10657 need_lib_prefix=no
10658 need_version=no
10659 case $host_cpu in
10660 ia64*)
10661 shrext_cmds='.so'
10662 hardcode_into_libs=yes
10663 dynamic_linker="$host_os dld.so"
10664 shlibpath_var=LD_LIBRARY_PATH
10665 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10666 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10667 soname_spec='${libname}${release}${shared_ext}$major'
10668 if test "X$HPUX_IA64_MODE" = X32; then
10669 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
10670 else
10671 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
10672 fi
10673 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10674 ;;
10675 hppa*64*)
10676 shrext_cmds='.sl'
10677 hardcode_into_libs=yes
10678 dynamic_linker="$host_os dld.sl"
10679 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
10680 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10681 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10682 soname_spec='${libname}${release}${shared_ext}$major'
10683 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
10684 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10685 ;;
10686 *)
10687 shrext_cmds='.sl'
10688 dynamic_linker="$host_os dld.sl"
10689 shlibpath_var=SHLIB_PATH
10690 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
10691 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10692 soname_spec='${libname}${release}${shared_ext}$major'
10693 ;;
10694 esac
10695 # HP-UX runs *really* slowly unless shared libraries are mode 555.
10696 postinstall_cmds='chmod 555 $lib'
10697 ;;
10698
10699 interix[3-9]*)
10700 version_type=linux
10701 need_lib_prefix=no
10702 need_version=no
10703 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10704 soname_spec='${libname}${release}${shared_ext}$major'
10705 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
10706 shlibpath_var=LD_LIBRARY_PATH
10707 shlibpath_overrides_runpath=no
10708 hardcode_into_libs=yes
10709 ;;
10710
10711 irix5* | irix6* | nonstopux*)
10712 case $host_os in
10713 nonstopux*) version_type=nonstopux ;;
10714 *)
10715 if test "$lt_cv_prog_gnu_ld" = yes; then
10716 version_type=linux
10717 else
10718 version_type=irix
10719 fi ;;
10720 esac
10721 need_lib_prefix=no
10722 need_version=no
10723 soname_spec='${libname}${release}${shared_ext}$major'
10724 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
10725 case $host_os in
10726 irix5* | nonstopux*)
10727 libsuff= shlibsuff=
10728 ;;
10729 *)
10730 case $LD in # libtool.m4 will add one of these switches to LD
10731 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
10732 libsuff= shlibsuff= libmagic=32-bit;;
10733 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
10734 libsuff=32 shlibsuff=N32 libmagic=N32;;
10735 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
10736 libsuff=64 shlibsuff=64 libmagic=64-bit;;
10737 *) libsuff= shlibsuff= libmagic=never-match;;
10738 esac
10739 ;;
10740 esac
10741 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
10742 shlibpath_overrides_runpath=no
10743 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
10744 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
10745 hardcode_into_libs=yes
10746 ;;
10747
10748 # No shared lib support for Linux oldld, aout, or coff.
10749 linux*oldld* | linux*aout* | linux*coff*)
10750 dynamic_linker=no
10751 ;;
10752
10753 # This must be Linux ELF.
10754 linux* | k*bsd*-gnu | kopensolaris*-gnu)
10755 version_type=linux
10756 need_lib_prefix=no
10757 need_version=no
10758 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10759 soname_spec='${libname}${release}${shared_ext}$major'
10760 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
10761 shlibpath_var=LD_LIBRARY_PATH
10762 shlibpath_overrides_runpath=no
10763 # Some binutils ld are patched to set DT_RUNPATH
10764 save_LDFLAGS=$LDFLAGS
10765 save_libdir=$libdir
10766 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
10767 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
10768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10769 /* end confdefs.h. */
10770
10771 int
10772 main ()
10773 {
10774
10775 ;
10776 return 0;
10777 }
10778 _ACEOF
10779 if ac_fn_c_try_link "$LINENO"; then :
10780 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
10781 shlibpath_overrides_runpath=yes
10782 fi
10783 fi
10784 rm -f core conftest.err conftest.$ac_objext \
10785 conftest$ac_exeext conftest.$ac_ext
10786 LDFLAGS=$save_LDFLAGS
10787 libdir=$save_libdir
10788
10789 # This implies no fast_install, which is unacceptable.
10790 # Some rework will be needed to allow for fast_install
10791 # before this can be enabled.
10792 hardcode_into_libs=yes
10793
10794 # Append ld.so.conf contents to the search path
10795 if test -f /etc/ld.so.conf; then
10796 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
10797 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
10798 fi
10799
10800 # We used to test for /lib/ld.so.1 and disable shared libraries on
10801 # powerpc, because MkLinux only supported shared libraries with the
10802 # GNU dynamic linker. Since this was broken with cross compilers,
10803 # most powerpc-linux boxes support dynamic linking these days and
10804 # people can always --disable-shared, the test was removed, and we
10805 # assume the GNU/Linux dynamic linker is in use.
10806 dynamic_linker='GNU/Linux ld.so'
10807 ;;
10808
10809 netbsdelf*-gnu)
10810 version_type=linux
10811 need_lib_prefix=no
10812 need_version=no
10813 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10814 soname_spec='${libname}${release}${shared_ext}$major'
10815 shlibpath_var=LD_LIBRARY_PATH
10816 shlibpath_overrides_runpath=no
10817 hardcode_into_libs=yes
10818 dynamic_linker='NetBSD ld.elf_so'
10819 ;;
10820
10821 netbsd*)
10822 version_type=sunos
10823 need_lib_prefix=no
10824 need_version=no
10825 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10826 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10827 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10828 dynamic_linker='NetBSD (a.out) ld.so'
10829 else
10830 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10831 soname_spec='${libname}${release}${shared_ext}$major'
10832 dynamic_linker='NetBSD ld.elf_so'
10833 fi
10834 shlibpath_var=LD_LIBRARY_PATH
10835 shlibpath_overrides_runpath=yes
10836 hardcode_into_libs=yes
10837 ;;
10838
10839 newsos6)
10840 version_type=linux
10841 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10842 shlibpath_var=LD_LIBRARY_PATH
10843 shlibpath_overrides_runpath=yes
10844 ;;
10845
10846 *nto* | *qnx*)
10847 version_type=qnx
10848 need_lib_prefix=no
10849 need_version=no
10850 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10851 soname_spec='${libname}${release}${shared_ext}$major'
10852 shlibpath_var=LD_LIBRARY_PATH
10853 shlibpath_overrides_runpath=no
10854 hardcode_into_libs=yes
10855 dynamic_linker='ldqnx.so'
10856 ;;
10857
10858 openbsd*)
10859 version_type=sunos
10860 sys_lib_dlsearch_path_spec="/usr/lib"
10861 need_lib_prefix=no
10862 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
10863 case $host_os in
10864 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
10865 *) need_version=no ;;
10866 esac
10867 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10868 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10869 shlibpath_var=LD_LIBRARY_PATH
10870 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10871 case $host_os in
10872 openbsd2.[89] | openbsd2.[89].*)
10873 shlibpath_overrides_runpath=no
10874 ;;
10875 *)
10876 shlibpath_overrides_runpath=yes
10877 ;;
10878 esac
10879 else
10880 shlibpath_overrides_runpath=yes
10881 fi
10882 ;;
10883
10884 os2*)
10885 libname_spec='$name'
10886 shrext_cmds=".dll"
10887 need_lib_prefix=no
10888 library_names_spec='$libname${shared_ext} $libname.a'
10889 dynamic_linker='OS/2 ld.exe'
10890 shlibpath_var=LIBPATH
10891 ;;
10892
10893 osf3* | osf4* | osf5*)
10894 version_type=osf
10895 need_lib_prefix=no
10896 need_version=no
10897 soname_spec='${libname}${release}${shared_ext}$major'
10898 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10899 shlibpath_var=LD_LIBRARY_PATH
10900 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
10901 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
10902 ;;
10903
10904 rdos*)
10905 dynamic_linker=no
10906 ;;
10907
10908 solaris*)
10909 version_type=linux
10910 need_lib_prefix=no
10911 need_version=no
10912 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10913 soname_spec='${libname}${release}${shared_ext}$major'
10914 shlibpath_var=LD_LIBRARY_PATH
10915 shlibpath_overrides_runpath=yes
10916 hardcode_into_libs=yes
10917 # ldd complains unless libraries are executable
10918 postinstall_cmds='chmod +x $lib'
10919 ;;
10920
10921 sunos4*)
10922 version_type=sunos
10923 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10924 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
10925 shlibpath_var=LD_LIBRARY_PATH
10926 shlibpath_overrides_runpath=yes
10927 if test "$with_gnu_ld" = yes; then
10928 need_lib_prefix=no
10929 fi
10930 need_version=yes
10931 ;;
10932
10933 sysv4 | sysv4.3*)
10934 version_type=linux
10935 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10936 soname_spec='${libname}${release}${shared_ext}$major'
10937 shlibpath_var=LD_LIBRARY_PATH
10938 case $host_vendor in
10939 sni)
10940 shlibpath_overrides_runpath=no
10941 need_lib_prefix=no
10942 runpath_var=LD_RUN_PATH
10943 ;;
10944 siemens)
10945 need_lib_prefix=no
10946 ;;
10947 motorola)
10948 need_lib_prefix=no
10949 need_version=no
10950 shlibpath_overrides_runpath=no
10951 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
10952 ;;
10953 esac
10954 ;;
10955
10956 sysv4*MP*)
10957 if test -d /usr/nec ;then
10958 version_type=linux
10959 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
10960 soname_spec='$libname${shared_ext}.$major'
10961 shlibpath_var=LD_LIBRARY_PATH
10962 fi
10963 ;;
10964
10965 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
10966 version_type=freebsd-elf
10967 need_lib_prefix=no
10968 need_version=no
10969 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10970 soname_spec='${libname}${release}${shared_ext}$major'
10971 shlibpath_var=LD_LIBRARY_PATH
10972 shlibpath_overrides_runpath=yes
10973 hardcode_into_libs=yes
10974 if test "$with_gnu_ld" = yes; then
10975 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
10976 else
10977 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
10978 case $host_os in
10979 sco3.2v5*)
10980 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
10981 ;;
10982 esac
10983 fi
10984 sys_lib_dlsearch_path_spec='/usr/lib'
10985 ;;
10986
10987 tpf*)
10988 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
10989 version_type=linux
10990 need_lib_prefix=no
10991 need_version=no
10992 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10993 shlibpath_var=LD_LIBRARY_PATH
10994 shlibpath_overrides_runpath=no
10995 hardcode_into_libs=yes
10996 ;;
10997
10998 uts4*)
10999 version_type=linux
11000 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11001 soname_spec='${libname}${release}${shared_ext}$major'
11002 shlibpath_var=LD_LIBRARY_PATH
11003 ;;
11004
11005 *)
11006 dynamic_linker=no
11007 ;;
11008 esac
11009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
11010 $as_echo "$dynamic_linker" >&6; }
11011 test "$dynamic_linker" = no && can_build_shared=no
11012
11013 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11014 if test "$GCC" = yes; then
11015 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11016 fi
11017
11018 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
11019 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
11020 fi
11021 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
11022 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
11023 fi
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
11112 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
11113 hardcode_action=
11114 if test -n "$hardcode_libdir_flag_spec" ||
11115 test -n "$runpath_var" ||
11116 test "X$hardcode_automatic" = "Xyes" ; then
11117
11118 # We can hardcode non-existent directories.
11119 if test "$hardcode_direct" != no &&
11120 # If the only mechanism to avoid hardcoding is shlibpath_var, we
11121 # have to relink, otherwise we might link with an installed library
11122 # when we should be linking with a yet-to-be-installed one
11123 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
11124 test "$hardcode_minus_L" != no; then
11125 # Linking always hardcodes the temporary library directory.
11126 hardcode_action=relink
11127 else
11128 # We can link without hardcoding, and we can hardcode nonexisting dirs.
11129 hardcode_action=immediate
11130 fi
11131 else
11132 # We cannot hardcode anything, or else we can only hardcode existing
11133 # directories.
11134 hardcode_action=unsupported
11135 fi
11136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
11137 $as_echo "$hardcode_action" >&6; }
11138
11139 if test "$hardcode_action" = relink ||
11140 test "$inherit_rpath" = yes; then
11141 # Fast installation is not supported
11142 enable_fast_install=no
11143 elif test "$shlibpath_overrides_runpath" = yes ||
11144 test "$enable_shared" = no; then
11145 # Fast installation is not necessary
11146 enable_fast_install=needless
11147 fi
11148
11149
11150
11151
11152
11153
11154 if test "x$enable_dlopen" != xyes; then
11155 enable_dlopen=unknown
11156 enable_dlopen_self=unknown
11157 enable_dlopen_self_static=unknown
11158 else
11159 lt_cv_dlopen=no
11160 lt_cv_dlopen_libs=
11161
11162 case $host_os in
11163 beos*)
11164 lt_cv_dlopen="load_add_on"
11165 lt_cv_dlopen_libs=
11166 lt_cv_dlopen_self=yes
11167 ;;
11168
11169 mingw* | pw32* | cegcc*)
11170 lt_cv_dlopen="LoadLibrary"
11171 lt_cv_dlopen_libs=
11172 ;;
11173
11174 cygwin*)
11175 lt_cv_dlopen="dlopen"
11176 lt_cv_dlopen_libs=
11177 ;;
11178
11179 darwin*)
11180 # if libdl is installed we need to link against it
11181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11182 $as_echo_n "checking for dlopen in -ldl... " >&6; }
11183 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11184 $as_echo_n "(cached) " >&6
11185 else
11186 ac_check_lib_save_LIBS=$LIBS
11187 LIBS="-ldl $LIBS"
11188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11189 /* end confdefs.h. */
11190
11191 /* Override any GCC internal prototype to avoid an error.
11192 Use char because int might match the return type of a GCC
11193 builtin and then its argument prototype would still apply. */
11194 #ifdef __cplusplus
11195 extern "C"
11196 #endif
11197 char dlopen ();
11198 int
11199 main ()
11200 {
11201 return dlopen ();
11202 ;
11203 return 0;
11204 }
11205 _ACEOF
11206 if ac_fn_c_try_link "$LINENO"; then :
11207 ac_cv_lib_dl_dlopen=yes
11208 else
11209 ac_cv_lib_dl_dlopen=no
11210 fi
11211 rm -f core conftest.err conftest.$ac_objext \
11212 conftest$ac_exeext conftest.$ac_ext
11213 LIBS=$ac_check_lib_save_LIBS
11214 fi
11215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11216 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11217 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
11218 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
11219 else
11220
11221 lt_cv_dlopen="dyld"
11222 lt_cv_dlopen_libs=
11223 lt_cv_dlopen_self=yes
11224
11225 fi
11226
11227 ;;
11228
11229 *)
11230 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
11231 if test "x$ac_cv_func_shl_load" = x""yes; then :
11232 lt_cv_dlopen="shl_load"
11233 else
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
11235 $as_echo_n "checking for shl_load in -ldld... " >&6; }
11236 if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
11237 $as_echo_n "(cached) " >&6
11238 else
11239 ac_check_lib_save_LIBS=$LIBS
11240 LIBS="-ldld $LIBS"
11241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11242 /* end confdefs.h. */
11243
11244 /* Override any GCC internal prototype to avoid an error.
11245 Use char because int might match the return type of a GCC
11246 builtin and then its argument prototype would still apply. */
11247 #ifdef __cplusplus
11248 extern "C"
11249 #endif
11250 char shl_load ();
11251 int
11252 main ()
11253 {
11254 return shl_load ();
11255 ;
11256 return 0;
11257 }
11258 _ACEOF
11259 if ac_fn_c_try_link "$LINENO"; then :
11260 ac_cv_lib_dld_shl_load=yes
11261 else
11262 ac_cv_lib_dld_shl_load=no
11263 fi
11264 rm -f core conftest.err conftest.$ac_objext \
11265 conftest$ac_exeext conftest.$ac_ext
11266 LIBS=$ac_check_lib_save_LIBS
11267 fi
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
11269 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
11270 if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
11271 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
11272 else
11273 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
11274 if test "x$ac_cv_func_dlopen" = x""yes; then :
11275 lt_cv_dlopen="dlopen"
11276 else
11277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11278 $as_echo_n "checking for dlopen in -ldl... " >&6; }
11279 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11280 $as_echo_n "(cached) " >&6
11281 else
11282 ac_check_lib_save_LIBS=$LIBS
11283 LIBS="-ldl $LIBS"
11284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11285 /* end confdefs.h. */
11286
11287 /* Override any GCC internal prototype to avoid an error.
11288 Use char because int might match the return type of a GCC
11289 builtin and then its argument prototype would still apply. */
11290 #ifdef __cplusplus
11291 extern "C"
11292 #endif
11293 char dlopen ();
11294 int
11295 main ()
11296 {
11297 return dlopen ();
11298 ;
11299 return 0;
11300 }
11301 _ACEOF
11302 if ac_fn_c_try_link "$LINENO"; then :
11303 ac_cv_lib_dl_dlopen=yes
11304 else
11305 ac_cv_lib_dl_dlopen=no
11306 fi
11307 rm -f core conftest.err conftest.$ac_objext \
11308 conftest$ac_exeext conftest.$ac_ext
11309 LIBS=$ac_check_lib_save_LIBS
11310 fi
11311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11312 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11313 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
11314 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
11315 else
11316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
11317 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
11318 if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
11319 $as_echo_n "(cached) " >&6
11320 else
11321 ac_check_lib_save_LIBS=$LIBS
11322 LIBS="-lsvld $LIBS"
11323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11324 /* end confdefs.h. */
11325
11326 /* Override any GCC internal prototype to avoid an error.
11327 Use char because int might match the return type of a GCC
11328 builtin and then its argument prototype would still apply. */
11329 #ifdef __cplusplus
11330 extern "C"
11331 #endif
11332 char dlopen ();
11333 int
11334 main ()
11335 {
11336 return dlopen ();
11337 ;
11338 return 0;
11339 }
11340 _ACEOF
11341 if ac_fn_c_try_link "$LINENO"; then :
11342 ac_cv_lib_svld_dlopen=yes
11343 else
11344 ac_cv_lib_svld_dlopen=no
11345 fi
11346 rm -f core conftest.err conftest.$ac_objext \
11347 conftest$ac_exeext conftest.$ac_ext
11348 LIBS=$ac_check_lib_save_LIBS
11349 fi
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
11351 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
11352 if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
11353 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
11354 else
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
11356 $as_echo_n "checking for dld_link in -ldld... " >&6; }
11357 if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
11358 $as_echo_n "(cached) " >&6
11359 else
11360 ac_check_lib_save_LIBS=$LIBS
11361 LIBS="-ldld $LIBS"
11362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11363 /* end confdefs.h. */
11364
11365 /* Override any GCC internal prototype to avoid an error.
11366 Use char because int might match the return type of a GCC
11367 builtin and then its argument prototype would still apply. */
11368 #ifdef __cplusplus
11369 extern "C"
11370 #endif
11371 char dld_link ();
11372 int
11373 main ()
11374 {
11375 return dld_link ();
11376 ;
11377 return 0;
11378 }
11379 _ACEOF
11380 if ac_fn_c_try_link "$LINENO"; then :
11381 ac_cv_lib_dld_dld_link=yes
11382 else
11383 ac_cv_lib_dld_dld_link=no
11384 fi
11385 rm -f core conftest.err conftest.$ac_objext \
11386 conftest$ac_exeext conftest.$ac_ext
11387 LIBS=$ac_check_lib_save_LIBS
11388 fi
11389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
11390 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
11391 if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
11392 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
11393 fi
11394
11395
11396 fi
11397
11398
11399 fi
11400
11401
11402 fi
11403
11404
11405 fi
11406
11407
11408 fi
11409
11410 ;;
11411 esac
11412
11413 if test "x$lt_cv_dlopen" != xno; then
11414 enable_dlopen=yes
11415 else
11416 enable_dlopen=no
11417 fi
11418
11419 case $lt_cv_dlopen in
11420 dlopen)
11421 save_CPPFLAGS="$CPPFLAGS"
11422 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
11423
11424 save_LDFLAGS="$LDFLAGS"
11425 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
11426
11427 save_LIBS="$LIBS"
11428 LIBS="$lt_cv_dlopen_libs $LIBS"
11429
11430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
11431 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
11432 if test "${lt_cv_dlopen_self+set}" = set; then :
11433 $as_echo_n "(cached) " >&6
11434 else
11435 if test "$cross_compiling" = yes; then :
11436 lt_cv_dlopen_self=cross
11437 else
11438 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11439 lt_status=$lt_dlunknown
11440 cat > conftest.$ac_ext <<_LT_EOF
11441 #line 11442 "configure"
11442 #include "confdefs.h"
11443
11444 #if HAVE_DLFCN_H
11445 #include <dlfcn.h>
11446 #endif
11447
11448 #include <stdio.h>
11449
11450 #ifdef RTLD_GLOBAL
11451 # define LT_DLGLOBAL RTLD_GLOBAL
11452 #else
11453 # ifdef DL_GLOBAL
11454 # define LT_DLGLOBAL DL_GLOBAL
11455 # else
11456 # define LT_DLGLOBAL 0
11457 # endif
11458 #endif
11459
11460 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
11461 find out it does not work in some platform. */
11462 #ifndef LT_DLLAZY_OR_NOW
11463 # ifdef RTLD_LAZY
11464 # define LT_DLLAZY_OR_NOW RTLD_LAZY
11465 # else
11466 # ifdef DL_LAZY
11467 # define LT_DLLAZY_OR_NOW DL_LAZY
11468 # else
11469 # ifdef RTLD_NOW
11470 # define LT_DLLAZY_OR_NOW RTLD_NOW
11471 # else
11472 # ifdef DL_NOW
11473 # define LT_DLLAZY_OR_NOW DL_NOW
11474 # else
11475 # define LT_DLLAZY_OR_NOW 0
11476 # endif
11477 # endif
11478 # endif
11479 # endif
11480 #endif
11481
11482 void fnord() { int i=42;}
11483 int main ()
11484 {
11485 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11486 int status = $lt_dlunknown;
11487
11488 if (self)
11489 {
11490 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
11491 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11492 /* dlclose (self); */
11493 }
11494 else
11495 puts (dlerror ());
11496
11497 return status;
11498 }
11499 _LT_EOF
11500 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11501 (eval $ac_link) 2>&5
11502 ac_status=$?
11503 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11504 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
11505 (./conftest; exit; ) >&5 2>/dev/null
11506 lt_status=$?
11507 case x$lt_status in
11508 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
11509 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
11510 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
11511 esac
11512 else :
11513 # compilation failed
11514 lt_cv_dlopen_self=no
11515 fi
11516 fi
11517 rm -fr conftest*
11518
11519
11520 fi
11521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
11522 $as_echo "$lt_cv_dlopen_self" >&6; }
11523
11524 if test "x$lt_cv_dlopen_self" = xyes; then
11525 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
11527 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
11528 if test "${lt_cv_dlopen_self_static+set}" = set; then :
11529 $as_echo_n "(cached) " >&6
11530 else
11531 if test "$cross_compiling" = yes; then :
11532 lt_cv_dlopen_self_static=cross
11533 else
11534 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11535 lt_status=$lt_dlunknown
11536 cat > conftest.$ac_ext <<_LT_EOF
11537 #line 11538 "configure"
11538 #include "confdefs.h"
11539
11540 #if HAVE_DLFCN_H
11541 #include <dlfcn.h>
11542 #endif
11543
11544 #include <stdio.h>
11545
11546 #ifdef RTLD_GLOBAL
11547 # define LT_DLGLOBAL RTLD_GLOBAL
11548 #else
11549 # ifdef DL_GLOBAL
11550 # define LT_DLGLOBAL DL_GLOBAL
11551 # else
11552 # define LT_DLGLOBAL 0
11553 # endif
11554 #endif
11555
11556 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
11557 find out it does not work in some platform. */
11558 #ifndef LT_DLLAZY_OR_NOW
11559 # ifdef RTLD_LAZY
11560 # define LT_DLLAZY_OR_NOW RTLD_LAZY
11561 # else
11562 # ifdef DL_LAZY
11563 # define LT_DLLAZY_OR_NOW DL_LAZY
11564 # else
11565 # ifdef RTLD_NOW
11566 # define LT_DLLAZY_OR_NOW RTLD_NOW
11567 # else
11568 # ifdef DL_NOW
11569 # define LT_DLLAZY_OR_NOW DL_NOW
11570 # else
11571 # define LT_DLLAZY_OR_NOW 0
11572 # endif
11573 # endif
11574 # endif
11575 # endif
11576 #endif
11577
11578 void fnord() { int i=42;}
11579 int main ()
11580 {
11581 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11582 int status = $lt_dlunknown;
11583
11584 if (self)
11585 {
11586 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
11587 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11588 /* dlclose (self); */
11589 }
11590 else
11591 puts (dlerror ());
11592
11593 return status;
11594 }
11595 _LT_EOF
11596 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11597 (eval $ac_link) 2>&5
11598 ac_status=$?
11599 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11600 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
11601 (./conftest; exit; ) >&5 2>/dev/null
11602 lt_status=$?
11603 case x$lt_status in
11604 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
11605 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
11606 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
11607 esac
11608 else :
11609 # compilation failed
11610 lt_cv_dlopen_self_static=no
11611 fi
11612 fi
11613 rm -fr conftest*
11614
11615
11616 fi
11617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
11618 $as_echo "$lt_cv_dlopen_self_static" >&6; }
11619 fi
11620
11621 CPPFLAGS="$save_CPPFLAGS"
11622 LDFLAGS="$save_LDFLAGS"
11623 LIBS="$save_LIBS"
11624 ;;
11625 esac
11626
11627 case $lt_cv_dlopen_self in
11628 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
11629 *) enable_dlopen_self=unknown ;;
11630 esac
11631
11632 case $lt_cv_dlopen_self_static in
11633 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
11634 *) enable_dlopen_self_static=unknown ;;
11635 esac
11636 fi
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654 striplib=
11655 old_striplib=
11656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
11657 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
11658 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
11659 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
11660 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
11661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11662 $as_echo "yes" >&6; }
11663 else
11664 # FIXME - insert some real tests, host_os isn't really good enough
11665 case $host_os in
11666 darwin*)
11667 if test -n "$STRIP" ; then
11668 striplib="$STRIP -x"
11669 old_striplib="$STRIP -S"
11670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11671 $as_echo "yes" >&6; }
11672 else
11673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11674 $as_echo "no" >&6; }
11675 fi
11676 ;;
11677 *)
11678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11679 $as_echo "no" >&6; }
11680 ;;
11681 esac
11682 fi
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695 # Report which library types will actually be built
11696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
11697 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
11698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
11699 $as_echo "$can_build_shared" >&6; }
11700
11701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
11702 $as_echo_n "checking whether to build shared libraries... " >&6; }
11703 test "$can_build_shared" = "no" && enable_shared=no
11704
11705 # On AIX, shared libraries and static libraries use the same namespace, and
11706 # are all built from PIC.
11707 case $host_os in
11708 aix3*)
11709 test "$enable_shared" = yes && enable_static=no
11710 if test -n "$RANLIB"; then
11711 archive_cmds="$archive_cmds~\$RANLIB \$lib"
11712 postinstall_cmds='$RANLIB $lib'
11713 fi
11714 ;;
11715
11716 aix[4-9]*)
11717 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
11718 test "$enable_shared" = yes && enable_static=no
11719 fi
11720 ;;
11721 esac
11722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
11723 $as_echo "$enable_shared" >&6; }
11724
11725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
11726 $as_echo_n "checking whether to build static libraries... " >&6; }
11727 # Make sure either enable_shared or enable_static is yes.
11728 test "$enable_shared" = yes || enable_static=yes
11729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
11730 $as_echo "$enable_static" >&6; }
11731
11732
11733
11734
11735 fi
11736 ac_ext=c
11737 ac_cpp='$CPP $CPPFLAGS'
11738 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11739 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11740 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11741
11742 CC="$lt_save_CC"
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756 ac_config_commands="$ac_config_commands libtool"
11757
11758
11759
11760
11761 # Only expand once:
11762
11763
11764
11765
11766
11767 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11768 if test -n "$ac_tool_prefix"; then
11769 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
11770 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
11771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11772 $as_echo_n "checking for $ac_word... " >&6; }
11773 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
11774 $as_echo_n "(cached) " >&6
11775 else
11776 case $PKG_CONFIG in
11777 [\\/]* | ?:[\\/]*)
11778 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11779 ;;
11780 *)
11781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11782 for as_dir in $PATH
11783 do
11784 IFS=$as_save_IFS
11785 test -z "$as_dir" && as_dir=.
11786 for ac_exec_ext in '' $ac_executable_extensions; do
11787 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11788 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11790 break 2
11791 fi
11792 done
11793 done
11794 IFS=$as_save_IFS
11795
11796 ;;
11797 esac
11798 fi
11799 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11800 if test -n "$PKG_CONFIG"; then
11801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11802 $as_echo "$PKG_CONFIG" >&6; }
11803 else
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11805 $as_echo "no" >&6; }
11806 fi
11807
11808
11809 fi
11810 if test -z "$ac_cv_path_PKG_CONFIG"; then
11811 ac_pt_PKG_CONFIG=$PKG_CONFIG
11812 # Extract the first word of "pkg-config", so it can be a program name with args.
11813 set dummy pkg-config; ac_word=$2
11814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11815 $as_echo_n "checking for $ac_word... " >&6; }
11816 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
11817 $as_echo_n "(cached) " >&6
11818 else
11819 case $ac_pt_PKG_CONFIG in
11820 [\\/]* | ?:[\\/]*)
11821 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
11822 ;;
11823 *)
11824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11825 for as_dir in $PATH
11826 do
11827 IFS=$as_save_IFS
11828 test -z "$as_dir" && as_dir=.
11829 for ac_exec_ext in '' $ac_executable_extensions; do
11830 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11831 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11833 break 2
11834 fi
11835 done
11836 done
11837 IFS=$as_save_IFS
11838
11839 ;;
11840 esac
11841 fi
11842 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
11843 if test -n "$ac_pt_PKG_CONFIG"; then
11844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
11845 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
11846 else
11847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11848 $as_echo "no" >&6; }
11849 fi
11850
11851 if test "x$ac_pt_PKG_CONFIG" = x; then
11852 PKG_CONFIG=""
11853 else
11854 case $cross_compiling:$ac_tool_warned in
11855 yes:)
11856 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11857 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11858 ac_tool_warned=yes ;;
11859 esac
11860 PKG_CONFIG=$ac_pt_PKG_CONFIG
11861 fi
11862 else
11863 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
11864 fi
11865
11866 fi
11867 if test -n "$PKG_CONFIG"; then
11868 _pkg_min_version=0.9.0
11869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
11870 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
11871 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
11872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11873 $as_echo "yes" >&6; }
11874 else
11875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11876 $as_echo "no" >&6; }
11877 PKG_CONFIG=""
11878 fi
11879
11880 fi
11881
11882 pkg_failed=no
11883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSH_CONTACT" >&5
11884 $as_echo_n "checking for SSH_CONTACT... " >&6; }
11885
11886 if test -n "$PKG_CONFIG"; then
11887 if test -n "$SSH_CONTACT_CFLAGS"; then
11888 pkg_cv_SSH_CONTACT_CFLAGS="$SSH_CONTACT_CFLAGS"
11889 else
11890 if test -n "$PKG_CONFIG" && \
11891 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
11892 telepathy-glib >= 0.11.9
11893 glib-2.0 >= 2.24
11894 gio-2.0
11895 gio-unix-2.0
11896 \""; } >&5
11897 ($PKG_CONFIG --exists --print-errors "
11898 telepathy-glib >= 0.11.9
11899 glib-2.0 >= 2.24
11900 gio-2.0
11901 gio-unix-2.0
11902 ") 2>&5
11903 ac_status=$?
11904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11905 test $ac_status = 0; }; then
11906 pkg_cv_SSH_CONTACT_CFLAGS=`$PKG_CONFIG --cflags "
11907 telepathy-glib >= 0.11.9
11908 glib-2.0 >= 2.24
11909 gio-2.0
11910 gio-unix-2.0
11911 " 2>/dev/null`
11912 else
11913 pkg_failed=yes
11914 fi
11915 fi
11916 else
11917 pkg_failed=untried
11918 fi
11919 if test -n "$PKG_CONFIG"; then
11920 if test -n "$SSH_CONTACT_LIBS"; then
11921 pkg_cv_SSH_CONTACT_LIBS="$SSH_CONTACT_LIBS"
11922 else
11923 if test -n "$PKG_CONFIG" && \
11924 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
11925 telepathy-glib >= 0.11.9
11926 glib-2.0 >= 2.24
11927 gio-2.0
11928 gio-unix-2.0
11929 \""; } >&5
11930 ($PKG_CONFIG --exists --print-errors "
11931 telepathy-glib >= 0.11.9
11932 glib-2.0 >= 2.24
11933 gio-2.0
11934 gio-unix-2.0
11935 ") 2>&5
11936 ac_status=$?
11937 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11938 test $ac_status = 0; }; then
11939 pkg_cv_SSH_CONTACT_LIBS=`$PKG_CONFIG --libs "
11940 telepathy-glib >= 0.11.9
11941 glib-2.0 >= 2.24
11942 gio-2.0
11943 gio-unix-2.0
11944 " 2>/dev/null`
11945 else
11946 pkg_failed=yes
11947 fi
11948 fi
11949 else
11950 pkg_failed=untried
11951 fi
11952
11953
11954
11955 if test $pkg_failed = yes; then
11956
11957 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11958 _pkg_short_errors_supported=yes
11959 else
11960 _pkg_short_errors_supported=no
11961 fi
11962 if test $_pkg_short_errors_supported = yes; then
11963 SSH_CONTACT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "
11964 telepathy-glib >= 0.11.9
11965 glib-2.0 >= 2.24
11966 gio-2.0
11967 gio-unix-2.0
11968 "`
11969 else
11970 SSH_CONTACT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "
11971 telepathy-glib >= 0.11.9
11972 glib-2.0 >= 2.24
11973 gio-2.0
11974 gio-unix-2.0
11975 "`
11976 fi
11977 # Put the nasty error message in config.log where it belongs
11978 echo "$SSH_CONTACT_PKG_ERRORS" >&5
11979
11980 as_fn_error "Package requirements (
11981 telepathy-glib >= 0.11.9
11982 glib-2.0 >= 2.24
11983 gio-2.0
11984 gio-unix-2.0
11985 ) were not met:
11986
11987 $SSH_CONTACT_PKG_ERRORS
11988
11989 Consider adjusting the PKG_CONFIG_PATH environment variable if you
11990 installed software in a non-standard prefix.
11991
11992 Alternatively, you may set the environment variables SSH_CONTACT_CFLAGS
11993 and SSH_CONTACT_LIBS to avoid the need to call pkg-config.
11994 See the pkg-config man page for more details.
11995 " "$LINENO" 5
11996 elif test $pkg_failed = untried; then
11997 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11998 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11999 as_fn_error "The pkg-config script could not be found or is too old. Make sure it
12000 is in your PATH or set the PKG_CONFIG environment variable to the full
12001 path to pkg-config.
12002
12003 Alternatively, you may set the environment variables SSH_CONTACT_CFLAGS
12004 and SSH_CONTACT_LIBS to avoid the need to call pkg-config.
12005 See the pkg-config man page for more details.
12006
12007 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
12008 See \`config.log' for more details." "$LINENO" 5; }
12009 else
12010 SSH_CONTACT_CFLAGS=$pkg_cv_SSH_CONTACT_CFLAGS
12011 SSH_CONTACT_LIBS=$pkg_cv_SSH_CONTACT_LIBS
12012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12013 $as_echo "yes" >&6; }
12014 :
12015 fi
12016
12017 ac_config_files="$ac_config_files Makefile src/Makefile"
12018
12019 cat >confcache <<\_ACEOF
12020 # This file is a shell script that caches the results of configure
12021 # tests run on this system so they can be shared between configure
12022 # scripts and configure runs, see configure's option --config-cache.
12023 # It is not useful on other systems. If it contains results you don't
12024 # want to keep, you may remove or edit it.
12025 #
12026 # config.status only pays attention to the cache file if you give it
12027 # the --recheck option to rerun configure.
12028 #
12029 # `ac_cv_env_foo' variables (set or unset) will be overridden when
12030 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12031 # following values.
12032
12033 _ACEOF
12034
12035 # The following way of writing the cache mishandles newlines in values,
12036 # but we know of no workaround that is simple, portable, and efficient.
12037 # So, we kill variables containing newlines.
12038 # Ultrix sh set writes to stderr and can't be redirected directly,
12039 # and sets the high bit in the cache file unless we assign to the vars.
12040 (
12041 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
12042 eval ac_val=\$$ac_var
12043 case $ac_val in #(
12044 *${as_nl}*)
12045 case $ac_var in #(
12046 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
12047 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
12048 esac
12049 case $ac_var in #(
12050 _ | IFS | as_nl) ;; #(
12051 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
12052 *) { eval $ac_var=; unset $ac_var;} ;;
12053 esac ;;
12054 esac
12055 done
12056
12057 (set) 2>&1 |
12058 case $as_nl`(ac_space=' '; set) 2>&1` in #(
12059 *${as_nl}ac_space=\ *)
12060 # `set' does not quote correctly, so add quotes: double-quote
12061 # substitution turns \\\\ into \\, and sed turns \\ into \.
12062 sed -n \
12063 "s/'/'\\\\''/g;
12064 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12065 ;; #(
12066 *)
12067 # `set' quotes correctly as required by POSIX, so do not add quotes.
12068 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
12069 ;;
12070 esac |
12071 sort
12072 ) |
12073 sed '
12074 /^ac_cv_env_/b end
12075 t clear
12076 :clear
12077 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12078 t end
12079 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12080 :end' >>confcache
12081 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
12082 if test -w "$cache_file"; then
12083 test "x$cache_file" != "x/dev/null" &&
12084 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
12085 $as_echo "$as_me: updating cache $cache_file" >&6;}
12086 cat confcache >$cache_file
12087 else
12088 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
12089 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
12090 fi
12091 fi
12092 rm -f confcache
12093
12094 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12095 # Let make expand exec_prefix.
12096 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12097
12098 DEFS=-DHAVE_CONFIG_H
12099
12100 ac_libobjs=
12101 ac_ltlibobjs=
12102 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
12103 # 1. Remove the extension, and $U if already installed.
12104 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
12105 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
12106 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
12107 # will be set to the directory where LIBOBJS objects are built.
12108 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
12109 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
12110 done
12111 LIBOBJS=$ac_libobjs
12112
12113 LTLIBOBJS=$ac_ltlibobjs
12114
12115
12116 if test -n "$EXEEXT"; then
12117 am__EXEEXT_TRUE=
12118 am__EXEEXT_FALSE='#'
12119 else
12120 am__EXEEXT_TRUE='#'
12121 am__EXEEXT_FALSE=
12122 fi
12123
12124 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
12125 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
12126 Usually this means the macro was only invoked conditionally." "$LINENO" 5
12127 fi
12128 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
12129 as_fn_error "conditional \"AMDEP\" was never defined.
12130 Usually this means the macro was only invoked conditionally." "$LINENO" 5
12131 fi
12132 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
12133 as_fn_error "conditional \"am__fastdepCC\" was never defined.
12134 Usually this means the macro was only invoked conditionally." "$LINENO" 5
12135 fi
12136 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
12137 as_fn_error "conditional \"am__fastdepCC\" was never defined.
12138 Usually this means the macro was only invoked conditionally." "$LINENO" 5
12139 fi
12140 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
12141 as_fn_error "conditional \"am__fastdepCC\" was never defined.
12142 Usually this means the macro was only invoked conditionally." "$LINENO" 5
12143 fi
12144
12145 : ${CONFIG_STATUS=./config.status}
12146 ac_write_fail=0
12147 ac_clean_files_save=$ac_clean_files
12148 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12149 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
12150 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
12151 as_write_fail=0
12152 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
12153 #! $SHELL
12154 # Generated by $as_me.
12155 # Run this file to recreate the current configuration.
12156 # Compiler output produced by configure, useful for debugging
12157 # configure, is in config.log if it exists.
12158
12159 debug=false
12160 ac_cs_recheck=false
12161 ac_cs_silent=false
12162
12163 SHELL=\${CONFIG_SHELL-$SHELL}
12164 export SHELL
12165 _ASEOF
12166 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
12167 ## -------------------- ##
12168 ## M4sh Initialization. ##
12169 ## -------------------- ##
12170
12171 # Be more Bourne compatible
12172 DUALCASE=1; export DUALCASE # for MKS sh
12173 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
12174 emulate sh
12175 NULLCMD=:
12176 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
12177 # is contrary to our usage. Disable this feature.
12178 alias -g '${1+"$@"}'='"$@"'
12179 setopt NO_GLOB_SUBST
12180 else
12181 case `(set -o) 2>/dev/null` in #(
12182 *posix*) :
12183 set -o posix ;; #(
12184 *) :
12185 ;;
12186 esac
12187 fi
12188
12189
12190 as_nl='
12191 '
12192 export as_nl
12193 # Printing a long string crashes Solaris 7 /usr/bin/printf.
12194 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12195 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
12196 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
12197 # Prefer a ksh shell builtin over an external printf program on Solaris,
12198 # but without wasting forks for bash or zsh.
12199 if test -z "$BASH_VERSION$ZSH_VERSION" \
12200 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
12201 as_echo='print -r --'
12202 as_echo_n='print -rn --'
12203 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
12204 as_echo='printf %s\n'
12205 as_echo_n='printf %s'
12206 else
12207 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
12208 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
12209 as_echo_n='/usr/ucb/echo -n'
12210 else
12211 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
12212 as_echo_n_body='eval
12213 arg=$1;
12214 case $arg in #(
12215 *"$as_nl"*)
12216 expr "X$arg" : "X\\(.*\\)$as_nl";
12217 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
12218 esac;
12219 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
12220 '
12221 export as_echo_n_body
12222 as_echo_n='sh -c $as_echo_n_body as_echo'
12223 fi
12224 export as_echo_body
12225 as_echo='sh -c $as_echo_body as_echo'
12226 fi
12227
12228 # The user is always right.
12229 if test "${PATH_SEPARATOR+set}" != set; then
12230 PATH_SEPARATOR=:
12231 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
12232 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
12233 PATH_SEPARATOR=';'
12234 }
12235 fi
12236
12237
12238 # IFS
12239 # We need space, tab and new line, in precisely that order. Quoting is
12240 # there to prevent editors from complaining about space-tab.
12241 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
12242 # splitting by setting IFS to empty value.)
12243 IFS=" "" $as_nl"
12244
12245 # Find who we are. Look in the path if we contain no directory separator.
12246 case $0 in #((
12247 *[\\/]* ) as_myself=$0 ;;
12248 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12249 for as_dir in $PATH
12250 do
12251 IFS=$as_save_IFS
12252 test -z "$as_dir" && as_dir=.
12253 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12254 done
12255 IFS=$as_save_IFS
12256
12257 ;;
12258 esac
12259 # We did not find ourselves, most probably we were run as `sh COMMAND'
12260 # in which case we are not to be found in the path.
12261 if test "x$as_myself" = x; then
12262 as_myself=$0
12263 fi
12264 if test ! -f "$as_myself"; then
12265 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
12266 exit 1
12267 fi
12268
12269 # Unset variables that we do not need and which cause bugs (e.g. in
12270 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
12271 # suppresses any "Segmentation fault" message there. '((' could
12272 # trigger a bug in pdksh 5.2.14.
12273 for as_var in BASH_ENV ENV MAIL MAILPATH
12274 do eval test x\${$as_var+set} = xset \
12275 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
12276 done
12277 PS1='$ '
12278 PS2='> '
12279 PS4='+ '
12280
12281 # NLS nuisances.
12282 LC_ALL=C
12283 export LC_ALL
12284 LANGUAGE=C
12285 export LANGUAGE
12286
12287 # CDPATH.
12288 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
12289
12290
12291 # as_fn_error ERROR [LINENO LOG_FD]
12292 # ---------------------------------
12293 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
12294 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
12295 # script with status $?, using 1 if that was 0.
12296 as_fn_error ()
12297 {
12298 as_status=$?; test $as_status -eq 0 && as_status=1
12299 if test "$3"; then
12300 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
12301 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
12302 fi
12303 $as_echo "$as_me: error: $1" >&2
12304 as_fn_exit $as_status
12305 } # as_fn_error
12306
12307
12308 # as_fn_set_status STATUS
12309 # -----------------------
12310 # Set $? to STATUS, without forking.
12311 as_fn_set_status ()
12312 {
12313 return $1
12314 } # as_fn_set_status
12315
12316 # as_fn_exit STATUS
12317 # -----------------
12318 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
12319 as_fn_exit ()
12320 {
12321 set +e
12322 as_fn_set_status $1
12323 exit $1
12324 } # as_fn_exit
12325
12326 # as_fn_unset VAR
12327 # ---------------
12328 # Portably unset VAR.
12329 as_fn_unset ()
12330 {
12331 { eval $1=; unset $1;}
12332 }
12333 as_unset=as_fn_unset
12334 # as_fn_append VAR VALUE
12335 # ----------------------
12336 # Append the text in VALUE to the end of the definition contained in VAR. Take
12337 # advantage of any shell optimizations that allow amortized linear growth over
12338 # repeated appends, instead of the typical quadratic growth present in naive
12339 # implementations.
12340 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
12341 eval 'as_fn_append ()
12342 {
12343 eval $1+=\$2
12344 }'
12345 else
12346 as_fn_append ()
12347 {
12348 eval $1=\$$1\$2
12349 }
12350 fi # as_fn_append
12351
12352 # as_fn_arith ARG...
12353 # ------------------
12354 # Perform arithmetic evaluation on the ARGs, and store the result in the
12355 # global $as_val. Take advantage of shells that can avoid forks. The arguments
12356 # must be portable across $(()) and expr.
12357 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
12358 eval 'as_fn_arith ()
12359 {
12360 as_val=$(( $* ))
12361 }'
12362 else
12363 as_fn_arith ()
12364 {
12365 as_val=`expr "$@" || test $? -eq 1`
12366 }
12367 fi # as_fn_arith
12368
12369
12370 if expr a : '\(a\)' >/dev/null 2>&1 &&
12371 test "X`expr 00001 : '.*\(...\)'`" = X001; then
12372 as_expr=expr
12373 else
12374 as_expr=false
12375 fi
12376
12377 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
12378 as_basename=basename
12379 else
12380 as_basename=false
12381 fi
12382
12383 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
12384 as_dirname=dirname
12385 else
12386 as_dirname=false
12387 fi
12388
12389 as_me=`$as_basename -- "$0" ||
12390 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
12391 X"$0" : 'X\(//\)$' \| \
12392 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
12393 $as_echo X/"$0" |
12394 sed '/^.*\/\([^/][^/]*\)\/*$/{
12395 s//\1/
12396 q
12397 }
12398 /^X\/\(\/\/\)$/{
12399 s//\1/
12400 q
12401 }
12402 /^X\/\(\/\).*/{
12403 s//\1/
12404 q
12405 }
12406 s/.*/./; q'`
12407
12408 # Avoid depending upon Character Ranges.
12409 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12410 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
12411 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
12412 as_cr_digits='0123456789'
12413 as_cr_alnum=$as_cr_Letters$as_cr_digits
12414
12415 ECHO_C= ECHO_N= ECHO_T=
12416 case `echo -n x` in #(((((
12417 -n*)
12418 case `echo 'xy\c'` in
12419 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
12420 xy) ECHO_C='\c';;
12421 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
12422 ECHO_T=' ';;
12423 esac;;
12424 *)
12425 ECHO_N='-n';;
12426 esac
12427
12428 rm -f conf$$ conf$$.exe conf$$.file
12429 if test -d conf$$.dir; then
12430 rm -f conf$$.dir/conf$$.file
12431 else
12432 rm -f conf$$.dir
12433 mkdir conf$$.dir 2>/dev/null
12434 fi
12435 if (echo >conf$$.file) 2>/dev/null; then
12436 if ln -s conf$$.file conf$$ 2>/dev/null; then
12437 as_ln_s='ln -s'
12438 # ... but there are two gotchas:
12439 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
12440 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
12441 # In both cases, we have to default to `cp -p'.
12442 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
12443 as_ln_s='cp -p'
12444 elif ln conf$$.file conf$$ 2>/dev/null; then
12445 as_ln_s=ln
12446 else
12447 as_ln_s='cp -p'
12448 fi
12449 else
12450 as_ln_s='cp -p'
12451 fi
12452 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
12453 rmdir conf$$.dir 2>/dev/null
12454
12455
12456 # as_fn_mkdir_p
12457 # -------------
12458 # Create "$as_dir" as a directory, including parents if necessary.
12459 as_fn_mkdir_p ()
12460 {
12461
12462 case $as_dir in #(
12463 -*) as_dir=./$as_dir;;
12464 esac
12465 test -d "$as_dir" || eval $as_mkdir_p || {
12466 as_dirs=
12467 while :; do
12468 case $as_dir in #(
12469 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
12470 *) as_qdir=$as_dir;;
12471 esac
12472 as_dirs="'$as_qdir' $as_dirs"
12473 as_dir=`$as_dirname -- "$as_dir" ||
12474 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12475 X"$as_dir" : 'X\(//\)[^/]' \| \
12476 X"$as_dir" : 'X\(//\)$' \| \
12477 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
12478 $as_echo X"$as_dir" |
12479 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12480 s//\1/
12481 q
12482 }
12483 /^X\(\/\/\)[^/].*/{
12484 s//\1/
12485 q
12486 }
12487 /^X\(\/\/\)$/{
12488 s//\1/
12489 q
12490 }
12491 /^X\(\/\).*/{
12492 s//\1/
12493 q
12494 }
12495 s/.*/./; q'`
12496 test -d "$as_dir" && break
12497 done
12498 test -z "$as_dirs" || eval "mkdir $as_dirs"
12499 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
12500
12501
12502 } # as_fn_mkdir_p
12503 if mkdir -p . 2>/dev/null; then
12504 as_mkdir_p='mkdir -p "$as_dir"'
12505 else
12506 test -d ./-p && rmdir ./-p
12507 as_mkdir_p=false
12508 fi
12509
12510 if test -x / >/dev/null 2>&1; then
12511 as_test_x='test -x'
12512 else
12513 if ls -dL / >/dev/null 2>&1; then
12514 as_ls_L_option=L
12515 else
12516 as_ls_L_option=
12517 fi
12518 as_test_x='
12519 eval sh -c '\''
12520 if test -d "$1"; then
12521 test -d "$1/.";
12522 else
12523 case $1 in #(
12524 -*)set "./$1";;
12525 esac;
12526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
12527 ???[sx]*):;;*)false;;esac;fi
12528 '\'' sh
12529 '
12530 fi
12531 as_executable_p=$as_test_x
12532
12533 # Sed expression to map a string onto a valid CPP name.
12534 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
12535
12536 # Sed expression to map a string onto a valid variable name.
12537 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
12538
12539
12540 exec 6>&1
12541 ## ----------------------------------- ##
12542 ## Main body of $CONFIG_STATUS script. ##
12543 ## ----------------------------------- ##
12544 _ASEOF
12545 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
12546
12547 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12548 # Save the log message, to keep $0 and so on meaningful, and to
12549 # report actual input values of CONFIG_FILES etc. instead of their
12550 # values after options handling.
12551 ac_log="
12552 This file was extended by ssh-contact $as_me 0.1, which was
12553 generated by GNU Autoconf 2.65. Invocation command line was
12554
12555 CONFIG_FILES = $CONFIG_FILES
12556 CONFIG_HEADERS = $CONFIG_HEADERS
12557 CONFIG_LINKS = $CONFIG_LINKS
12558 CONFIG_COMMANDS = $CONFIG_COMMANDS
12559 $ $0 $@
12560
12561 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12562 "
12563
12564 _ACEOF
12565
12566 case $ac_config_files in *"
12567 "*) set x $ac_config_files; shift; ac_config_files=$*;;
12568 esac
12569
12570 case $ac_config_headers in *"
12571 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
12572 esac
12573
12574
12575 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12576 # Files that config.status was made for.
12577 config_files="$ac_config_files"
12578 config_headers="$ac_config_headers"
12579 config_commands="$ac_config_commands"
12580
12581 _ACEOF
12582
12583 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12584 ac_cs_usage="\
12585 \`$as_me' instantiates files and other configuration actions
12586 from templates according to the current configuration. Unless the files
12587 and actions are specified as TAGs, all are instantiated by default.
12588
12589 Usage: $0 [OPTION]... [TAG]...
12590
12591 -h, --help print this help, then exit
12592 -V, --version print version number and configuration settings, then exit
12593 --config print configuration, then exit
12594 -q, --quiet, --silent
12595 do not print progress messages
12596 -d, --debug don't remove temporary files
12597 --recheck update $as_me by reconfiguring in the same conditions
12598 --file=FILE[:TEMPLATE]
12599 instantiate the configuration file FILE
12600 --header=FILE[:TEMPLATE]
12601 instantiate the configuration header FILE
12602
12603 Configuration files:
12604 $config_files
12605
12606 Configuration headers:
12607 $config_headers
12608
12609 Configuration commands:
12610 $config_commands
12611
12612 Report bugs to the package provider."
12613
12614 _ACEOF
12615 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12616 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
12617 ac_cs_version="\\
12618 ssh-contact config.status 0.1
12619 configured by $0, generated by GNU Autoconf 2.65,
12620 with options \\"\$ac_cs_config\\"
12621
12622 Copyright (C) 2009 Free Software Foundation, Inc.
12623 This config.status script is free software; the Free Software Foundation
12624 gives unlimited permission to copy, distribute and modify it."
12625
12626 ac_pwd='$ac_pwd'
12627 srcdir='$srcdir'
12628 INSTALL='$INSTALL'
12629 MKDIR_P='$MKDIR_P'
12630 AWK='$AWK'
12631 test -n "\$AWK" || AWK=awk
12632 _ACEOF
12633
12634 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12635 # The default lists apply if the user does not specify any file.
12636 ac_need_defaults=:
12637 while test $# != 0
12638 do
12639 case $1 in
12640 --*=*)
12641 ac_option=`expr "X$1" : 'X\([^=]*\)='`
12642 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
12643 ac_shift=:
12644 ;;
12645 *)
12646 ac_option=$1
12647 ac_optarg=$2
12648 ac_shift=shift
12649 ;;
12650 esac
12651
12652 case $ac_option in
12653 # Handling of the options.
12654 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12655 ac_cs_recheck=: ;;
12656 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
12657 $as_echo "$ac_cs_version"; exit ;;
12658 --config | --confi | --conf | --con | --co | --c )
12659 $as_echo "$ac_cs_config"; exit ;;
12660 --debug | --debu | --deb | --de | --d | -d )
12661 debug=: ;;
12662 --file | --fil | --fi | --f )
12663 $ac_shift
12664 case $ac_optarg in
12665 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12666 esac
12667 as_fn_append CONFIG_FILES " '$ac_optarg'"
12668 ac_need_defaults=false;;
12669 --header | --heade | --head | --hea )
12670 $ac_shift
12671 case $ac_optarg in
12672 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12673 esac
12674 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
12675 ac_need_defaults=false;;
12676 --he | --h)
12677 # Conflict between --help and --header
12678 as_fn_error "ambiguous option: \`$1'
12679 Try \`$0 --help' for more information.";;
12680 --help | --hel | -h )
12681 $as_echo "$ac_cs_usage"; exit ;;
12682 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12683 | -silent | --silent | --silen | --sile | --sil | --si | --s)
12684 ac_cs_silent=: ;;
12685
12686 # This is an error.
12687 -*) as_fn_error "unrecognized option: \`$1'
12688 Try \`$0 --help' for more information." ;;
12689
12690 *) as_fn_append ac_config_targets " $1"
12691 ac_need_defaults=false ;;
12692
12693 esac
12694 shift
12695 done
12696
12697 ac_configure_extra_args=
12698
12699 if $ac_cs_silent; then
12700 exec 6>/dev/null
12701 ac_configure_extra_args="$ac_configure_extra_args --silent"
12702 fi
12703
12704 _ACEOF
12705 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12706 if \$ac_cs_recheck; then
12707 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12708 shift
12709 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
12710 CONFIG_SHELL='$SHELL'
12711 export CONFIG_SHELL
12712 exec "\$@"
12713 fi
12714
12715 _ACEOF
12716 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12717 exec 5>>config.log
12718 {
12719 echo
12720 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
12721 ## Running $as_me. ##
12722 _ASBOX
12723 $as_echo "$ac_log"
12724 } >&5
12725
12726 _ACEOF
12727 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12728 #
12729 # INIT-COMMANDS
12730 #
12731 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
12732
12733
12734 # The HP-UX ksh and POSIX shell print the target directory to stdout
12735 # if CDPATH is set.
12736 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
12737
12738 sed_quote_subst='$sed_quote_subst'
12739 double_quote_subst='$double_quote_subst'
12740 delay_variable_subst='$delay_variable_subst'
12741 macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
12742 macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
12743 enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
12744 enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
12745 pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
12746 enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
12747 host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
12748 host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
12749 host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
12750 build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
12751 build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
12752 build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
12753 SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
12754 Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
12755 GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
12756 EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
12757 FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
12758 LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
12759 NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
12760 LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
12761 max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
12762 ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
12763 exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
12764 lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
12765 lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
12766 lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
12767 reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
12768 reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12769 OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
12770 deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
12771 file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
12772 AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
12773 AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
12774 STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
12775 RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
12776 old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12777 old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12778 old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12779 CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
12780 CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
12781 compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
12782 GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
12783 lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
12784 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
12785 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
12786 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
12787 objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
12788 SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
12789 ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
12790 MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
12791 lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
12792 lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
12793 lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
12794 lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
12795 lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
12796 need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
12797 DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
12798 NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
12799 LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
12800 OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
12801 OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
12802 libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
12803 shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12804 extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12805 archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
12806 enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
12807 export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
12808 whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
12809 compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
12810 old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12811 old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12812 archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12813 archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12814 module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12815 module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12816 with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
12817 allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
12818 no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
12819 hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
12820 hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
12821 hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
12822 hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
12823 hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
12824 hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
12825 hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
12826 hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
12827 inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
12828 link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
12829 fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
12830 always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
12831 export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12832 exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
12833 include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
12834 prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12835 file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
12836 variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
12837 need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
12838 need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
12839 version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
12840 runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
12841 shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
12842 shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
12843 libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
12844 library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
12845 soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
12846 postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12847 postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12848 finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12849 finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
12850 hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
12851 sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
12852 sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
12853 hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
12854 enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
12855 enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
12856 enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
12857 old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
12858 striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
12859
12860 LTCC='$LTCC'
12861 LTCFLAGS='$LTCFLAGS'
12862 compiler='$compiler_DEFAULT'
12863
12864 # Quote evaled strings.
12865 for var in SED \
12866 GREP \
12867 EGREP \
12868 FGREP \
12869 LD \
12870 NM \
12871 LN_S \
12872 lt_SP2NL \
12873 lt_NL2SP \
12874 reload_flag \
12875 OBJDUMP \
12876 deplibs_check_method \
12877 file_magic_cmd \
12878 AR \
12879 AR_FLAGS \
12880 STRIP \
12881 RANLIB \
12882 CC \
12883 CFLAGS \
12884 compiler \
12885 lt_cv_sys_global_symbol_pipe \
12886 lt_cv_sys_global_symbol_to_cdecl \
12887 lt_cv_sys_global_symbol_to_c_name_address \
12888 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
12889 SHELL \
12890 ECHO \
12891 lt_prog_compiler_no_builtin_flag \
12892 lt_prog_compiler_wl \
12893 lt_prog_compiler_pic \
12894 lt_prog_compiler_static \
12895 lt_cv_prog_compiler_c_o \
12896 need_locks \
12897 DSYMUTIL \
12898 NMEDIT \
12899 LIPO \
12900 OTOOL \
12901 OTOOL64 \
12902 shrext_cmds \
12903 export_dynamic_flag_spec \
12904 whole_archive_flag_spec \
12905 compiler_needs_object \
12906 with_gnu_ld \
12907 allow_undefined_flag \
12908 no_undefined_flag \
12909 hardcode_libdir_flag_spec \
12910 hardcode_libdir_flag_spec_ld \
12911 hardcode_libdir_separator \
12912 fix_srcfile_path \
12913 exclude_expsyms \
12914 include_expsyms \
12915 file_list_spec \
12916 variables_saved_for_relink \
12917 libname_spec \
12918 library_names_spec \
12919 soname_spec \
12920 finish_eval \
12921 old_striplib \
12922 striplib; do
12923 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
12924 *[\\\\\\\`\\"\\\$]*)
12925 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
12926 ;;
12927 *)
12928 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
12929 ;;
12930 esac
12931 done
12932
12933 # Double-quote double-evaled strings.
12934 for var in reload_cmds \
12935 old_postinstall_cmds \
12936 old_postuninstall_cmds \
12937 old_archive_cmds \
12938 extract_expsyms_cmds \
12939 old_archive_from_new_cmds \
12940 old_archive_from_expsyms_cmds \
12941 archive_cmds \
12942 archive_expsym_cmds \
12943 module_cmds \
12944 module_expsym_cmds \
12945 export_symbols_cmds \
12946 prelink_cmds \
12947 postinstall_cmds \
12948 postuninstall_cmds \
12949 finish_cmds \
12950 sys_lib_search_path_spec \
12951 sys_lib_dlsearch_path_spec; do
12952 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
12953 *[\\\\\\\`\\"\\\$]*)
12954 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
12955 ;;
12956 *)
12957 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
12958 ;;
12959 esac
12960 done
12961
12962 # Fix-up fallback echo if it was mangled by the above quoting rules.
12963 case \$lt_ECHO in
12964 *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
12965 ;;
12966 esac
12967
12968 ac_aux_dir='$ac_aux_dir'
12969 xsi_shell='$xsi_shell'
12970 lt_shell_append='$lt_shell_append'
12971
12972 # See if we are running on zsh, and set the options which allow our
12973 # commands through without removal of \ escapes INIT.
12974 if test -n "\${ZSH_VERSION+set}" ; then
12975 setopt NO_GLOB_SUBST
12976 fi
12977
12978
12979 PACKAGE='$PACKAGE'
12980 VERSION='$VERSION'
12981 TIMESTAMP='$TIMESTAMP'
12982 RM='$RM'
12983 ofile='$ofile'
12984
12985
12986
12987
12988 _ACEOF
12989
12990 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12991
12992 # Handling of arguments.
12993 for ac_config_target in $ac_config_targets
12994 do
12995 case $ac_config_target in
12996 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
12997 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
12998 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
12999 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
13000 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
13001
13002 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
13003 esac
13004 done
13005
13006
13007 # If the user did not use the arguments to specify the items to instantiate,
13008 # then the envvar interface is used. Set only those that are not.
13009 # We use the long form for the default assignment because of an extremely
13010 # bizarre bug on SunOS 4.1.3.
13011 if $ac_need_defaults; then
13012 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
13013 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
13014 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
13015 fi
13016
13017 # Have a temporary directory for convenience. Make it in the build tree
13018 # simply because there is no reason against having it here, and in addition,
13019 # creating and moving files from /tmp can sometimes cause problems.
13020 # Hook for its removal unless debugging.
13021 # Note that there is a small window in which the directory will not be cleaned:
13022 # after its creation but before its name has been assigned to `$tmp'.
13023 $debug ||
13024 {
13025 tmp=
13026 trap 'exit_status=$?
13027 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
13028 ' 0
13029 trap 'as_fn_exit 1' 1 2 13 15
13030 }
13031 # Create a (secure) tmp directory for tmp files.
13032
13033 {
13034 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
13035 test -n "$tmp" && test -d "$tmp"
13036 } ||
13037 {
13038 tmp=./conf$$-$RANDOM
13039 (umask 077 && mkdir "$tmp")
13040 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
13041
13042 # Set up the scripts for CONFIG_FILES section.
13043 # No need to generate them if there are no CONFIG_FILES.
13044 # This happens for instance with `./config.status config.h'.
13045 if test -n "$CONFIG_FILES"; then
13046
13047
13048 ac_cr=`echo X | tr X '\015'`
13049 # On cygwin, bash can eat \r inside `` if the user requested igncr.
13050 # But we know of no other shell where ac_cr would be empty at this
13051 # point, so we can use a bashism as a fallback.
13052 if test "x$ac_cr" = x; then
13053 eval ac_cr=\$\'\\r\'
13054 fi
13055 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
13056 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
13057 ac_cs_awk_cr='\r'
13058 else
13059 ac_cs_awk_cr=$ac_cr
13060 fi
13061
13062 echo 'BEGIN {' >"$tmp/subs1.awk" &&
13063 _ACEOF
13064
13065
13066 {
13067 echo "cat >conf$$subs.awk <<_ACEOF" &&
13068 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
13069 echo "_ACEOF"
13070 } >conf$$subs.sh ||
13071 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
13072 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
13073 ac_delim='%!_!# '
13074 for ac_last_try in false false false false false :; do
13075 . ./conf$$subs.sh ||
13076 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
13077
13078 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
13079 if test $ac_delim_n = $ac_delim_num; then
13080 break
13081 elif $ac_last_try; then
13082 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
13083 else
13084 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13085 fi
13086 done
13087 rm -f conf$$subs.sh
13088
13089 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13090 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
13091 _ACEOF
13092 sed -n '
13093 h
13094 s/^/S["/; s/!.*/"]=/
13095 p
13096 g
13097 s/^[^!]*!//
13098 :repl
13099 t repl
13100 s/'"$ac_delim"'$//
13101 t delim
13102 :nl
13103 h
13104 s/\(.\{148\}\)..*/\1/
13105 t more1
13106 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
13107 p
13108 n
13109 b repl
13110 :more1
13111 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
13112 p
13113 g
13114 s/.\{148\}//
13115 t nl
13116 :delim
13117 h
13118 s/\(.\{148\}\)..*/\1/
13119 t more2
13120 s/["\\]/\\&/g; s/^/"/; s/$/"/
13121 p
13122 b
13123 :more2
13124 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
13125 p
13126 g
13127 s/.\{148\}//
13128 t delim
13129 ' <conf$$subs.awk | sed '
13130 /^[^""]/{
13131 N
13132 s/\n//
13133 }
13134 ' >>$CONFIG_STATUS || ac_write_fail=1
13135 rm -f conf$$subs.awk
13136 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13137 _ACAWK
13138 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
13139 for (key in S) S_is_set[key] = 1
13140 FS = ""
13141
13142 }
13143 {
13144 line = $ 0
13145 nfields = split(line, field, "@")
13146 substed = 0
13147 len = length(field[1])
13148 for (i = 2; i < nfields; i++) {
13149 key = field[i]
13150 keylen = length(key)
13151 if (S_is_set[key]) {
13152 value = S[key]
13153 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
13154 len += length(value) + length(field[++i])
13155 substed = 1
13156 } else
13157 len += 1 + keylen
13158 }
13159
13160 print line
13161 }
13162
13163 _ACAWK
13164 _ACEOF
13165 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13166 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
13167 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
13168 else
13169 cat
13170 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
13171 || as_fn_error "could not setup config files machinery" "$LINENO" 5
13172 _ACEOF
13173
13174 # VPATH may cause trouble with some makes, so we remove $(srcdir),
13175 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
13176 # trailing colons and then remove the whole line if VPATH becomes empty
13177 # (actually we leave an empty line to preserve line numbers).
13178 if test "x$srcdir" = x.; then
13179 ac_vpsub='/^[ ]*VPATH[ ]*=/{
13180 s/:*\$(srcdir):*/:/
13181 s/:*\${srcdir}:*/:/
13182 s/:*@srcdir@:*/:/
13183 s/^\([^=]*=[ ]*\):*/\1/
13184 s/:*$//
13185 s/^[^=]*=[ ]*$//
13186 }'
13187 fi
13188
13189 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13190 fi # test -n "$CONFIG_FILES"
13191
13192 # Set up the scripts for CONFIG_HEADERS section.
13193 # No need to generate them if there are no CONFIG_HEADERS.
13194 # This happens for instance with `./config.status Makefile'.
13195 if test -n "$CONFIG_HEADERS"; then
13196 cat >"$tmp/defines.awk" <<\_ACAWK ||
13197 BEGIN {
13198 _ACEOF
13199
13200 # Transform confdefs.h into an awk script `defines.awk', embedded as
13201 # here-document in config.status, that substitutes the proper values into
13202 # config.h.in to produce config.h.
13203
13204 # Create a delimiter string that does not exist in confdefs.h, to ease
13205 # handling of long lines.
13206 ac_delim='%!_!# '
13207 for ac_last_try in false false :; do
13208 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
13209 if test -z "$ac_t"; then
13210 break
13211 elif $ac_last_try; then
13212 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
13213 else
13214 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13215 fi
13216 done
13217
13218 # For the awk script, D is an array of macro values keyed by name,
13219 # likewise P contains macro parameters if any. Preserve backslash
13220 # newline sequences.
13221
13222 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
13223 sed -n '
13224 s/.\{148\}/&'"$ac_delim"'/g
13225 t rset
13226 :rset
13227 s/^[ ]*#[ ]*define[ ][ ]*/ /
13228 t def
13229 d
13230 :def
13231 s/\\$//
13232 t bsnl
13233 s/["\\]/\\&/g
13234 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
13235 D["\1"]=" \3"/p
13236 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
13237 d
13238 :bsnl
13239 s/["\\]/\\&/g
13240 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
13241 D["\1"]=" \3\\\\\\n"\\/p
13242 t cont
13243 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
13244 t cont
13245 d
13246 :cont
13247 n
13248 s/.\{148\}/&'"$ac_delim"'/g
13249 t clear
13250 :clear
13251 s/\\$//
13252 t bsnlc
13253 s/["\\]/\\&/g; s/^/"/; s/$/"/p
13254 d
13255 :bsnlc
13256 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
13257 b cont
13258 ' <confdefs.h | sed '
13259 s/'"$ac_delim"'/"\\\
13260 "/g' >>$CONFIG_STATUS || ac_write_fail=1
13261
13262 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13263 for (key in D) D_is_set[key] = 1
13264 FS = ""
13265 }
13266 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
13267 line = \$ 0
13268 split(line, arg, " ")
13269 if (arg[1] == "#") {
13270 defundef = arg[2]
13271 mac1 = arg[3]
13272 } else {
13273 defundef = substr(arg[1], 2)
13274 mac1 = arg[2]
13275 }
13276 split(mac1, mac2, "(") #)
13277 macro = mac2[1]
13278 prefix = substr(line, 1, index(line, defundef) - 1)
13279 if (D_is_set[macro]) {
13280 # Preserve the white space surrounding the "#".
13281 print prefix "define", macro P[macro] D[macro]
13282 next
13283 } else {
13284 # Replace #undef with comments. This is necessary, for example,
13285 # in the case of _POSIX_SOURCE, which is predefined and required
13286 # on some systems where configure will not decide to define it.
13287 if (defundef == "undef") {
13288 print "/*", prefix defundef, macro, "*/"
13289 next
13290 }
13291 }
13292 }
13293 { print }
13294 _ACAWK
13295 _ACEOF
13296 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13297 as_fn_error "could not setup config headers machinery" "$LINENO" 5
13298 fi # test -n "$CONFIG_HEADERS"
13299
13300
13301 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
13302 shift
13303 for ac_tag
13304 do
13305 case $ac_tag in
13306 :[FHLC]) ac_mode=$ac_tag; continue;;
13307 esac
13308 case $ac_mode$ac_tag in
13309 :[FHL]*:*);;
13310 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
13311 :[FH]-) ac_tag=-:-;;
13312 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
13313 esac
13314 ac_save_IFS=$IFS
13315 IFS=:
13316 set x $ac_tag
13317 IFS=$ac_save_IFS
13318 shift
13319 ac_file=$1
13320 shift
13321
13322 case $ac_mode in
13323 :L) ac_source=$1;;
13324 :[FH])
13325 ac_file_inputs=
13326 for ac_f
13327 do
13328 case $ac_f in
13329 -) ac_f="$tmp/stdin";;
13330 *) # Look for the file first in the build tree, then in the source tree
13331 # (if the path is not absolute). The absolute path cannot be DOS-style,
13332 # because $ac_f cannot contain `:'.
13333 test -f "$ac_f" ||
13334 case $ac_f in
13335 [\\/$]*) false;;
13336 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
13337 esac ||
13338 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
13339 esac
13340 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
13341 as_fn_append ac_file_inputs " '$ac_f'"
13342 done
13343
13344 # Let's still pretend it is `configure' which instantiates (i.e., don't
13345 # use $as_me), people would be surprised to read:
13346 # /* config.h. Generated by config.status. */
13347 configure_input='Generated from '`
13348 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
13349 `' by configure.'
13350 if test x"$ac_file" != x-; then
13351 configure_input="$ac_file. $configure_input"
13352 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
13353 $as_echo "$as_me: creating $ac_file" >&6;}
13354 fi
13355 # Neutralize special characters interpreted by sed in replacement strings.
13356 case $configure_input in #(
13357 *\&* | *\|* | *\\* )
13358 ac_sed_conf_input=`$as_echo "$configure_input" |
13359 sed 's/[\\\\&|]/\\\\&/g'`;; #(
13360 *) ac_sed_conf_input=$configure_input;;
13361 esac
13362
13363 case $ac_tag in
13364 *:-:* | *:-) cat >"$tmp/stdin" \
13365 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
13366 esac
13367 ;;
13368 esac
13369
13370 ac_dir=`$as_dirname -- "$ac_file" ||
13371 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13372 X"$ac_file" : 'X\(//\)[^/]' \| \
13373 X"$ac_file" : 'X\(//\)$' \| \
13374 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
13375 $as_echo X"$ac_file" |
13376 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13377 s//\1/
13378 q
13379 }
13380 /^X\(\/\/\)[^/].*/{
13381 s//\1/
13382 q
13383 }
13384 /^X\(\/\/\)$/{
13385 s//\1/
13386 q
13387 }
13388 /^X\(\/\).*/{
13389 s//\1/
13390 q
13391 }
13392 s/.*/./; q'`
13393 as_dir="$ac_dir"; as_fn_mkdir_p
13394 ac_builddir=.
13395
13396 case "$ac_dir" in
13397 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
13398 *)
13399 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
13400 # A ".." for each directory in $ac_dir_suffix.
13401 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
13402 case $ac_top_builddir_sub in
13403 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
13404 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
13405 esac ;;
13406 esac
13407 ac_abs_top_builddir=$ac_pwd
13408 ac_abs_builddir=$ac_pwd$ac_dir_suffix
13409 # for backward compatibility:
13410 ac_top_builddir=$ac_top_build_prefix
13411
13412 case $srcdir in
13413 .) # We are building in place.
13414 ac_srcdir=.
13415 ac_top_srcdir=$ac_top_builddir_sub
13416 ac_abs_top_srcdir=$ac_pwd ;;
13417 [\\/]* | ?:[\\/]* ) # Absolute name.
13418 ac_srcdir=$srcdir$ac_dir_suffix;
13419 ac_top_srcdir=$srcdir
13420 ac_abs_top_srcdir=$srcdir ;;
13421 *) # Relative name.
13422 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
13423 ac_top_srcdir=$ac_top_build_prefix$srcdir
13424 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
13425 esac
13426 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
13427
13428
13429 case $ac_mode in
13430 :F)
13431 #
13432 # CONFIG_FILE
13433 #
13434
13435 case $INSTALL in
13436 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
13437 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
13438 esac
13439 ac_MKDIR_P=$MKDIR_P
13440 case $MKDIR_P in
13441 [\\/$]* | ?:[\\/]* ) ;;
13442 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
13443 esac
13444 _ACEOF
13445
13446 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13447 # If the template does not know about datarootdir, expand it.
13448 # FIXME: This hack should be removed a few years after 2.60.
13449 ac_datarootdir_hack=; ac_datarootdir_seen=
13450 ac_sed_dataroot='
13451 /datarootdir/ {
13452 p
13453 q
13454 }
13455 /@datadir@/p
13456 /@docdir@/p
13457 /@infodir@/p
13458 /@localedir@/p
13459 /@mandir@/p'
13460 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
13461 *datarootdir*) ac_datarootdir_seen=yes;;
13462 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
13463 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
13464 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
13465 _ACEOF
13466 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13467 ac_datarootdir_hack='
13468 s&@datadir@&$datadir&g
13469 s&@docdir@&$docdir&g
13470 s&@infodir@&$infodir&g
13471 s&@localedir@&$localedir&g
13472 s&@mandir@&$mandir&g
13473 s&\\\${datarootdir}&$datarootdir&g' ;;
13474 esac
13475 _ACEOF
13476
13477 # Neutralize VPATH when `$srcdir' = `.'.
13478 # Shell code in configure.ac might set extrasub.
13479 # FIXME: do we really want to maintain this feature?
13480 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13481 ac_sed_extra="$ac_vpsub
13482 $extrasub
13483 _ACEOF
13484 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13485 :t
13486 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13487 s|@configure_input@|$ac_sed_conf_input|;t t
13488 s&@top_builddir@&$ac_top_builddir_sub&;t t
13489 s&@top_build_prefix@&$ac_top_build_prefix&;t t
13490 s&@srcdir@&$ac_srcdir&;t t
13491 s&@abs_srcdir@&$ac_abs_srcdir&;t t
13492 s&@top_srcdir@&$ac_top_srcdir&;t t
13493 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
13494 s&@builddir@&$ac_builddir&;t t
13495 s&@abs_builddir@&$ac_abs_builddir&;t t
13496 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
13497 s&@INSTALL@&$ac_INSTALL&;t t
13498 s&@MKDIR_P@&$ac_MKDIR_P&;t t
13499 $ac_datarootdir_hack
13500 "
13501 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
13502 || as_fn_error "could not create $ac_file" "$LINENO" 5
13503
13504 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
13505 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
13506 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
13507 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13508 which seems to be undefined. Please make sure it is defined." >&5
13509 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13510 which seems to be undefined. Please make sure it is defined." >&2;}
13511
13512 rm -f "$tmp/stdin"
13513 case $ac_file in
13514 -) cat "$tmp/out" && rm -f "$tmp/out";;
13515 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
13516 esac \
13517 || as_fn_error "could not create $ac_file" "$LINENO" 5
13518 ;;
13519 :H)
13520 #
13521 # CONFIG_HEADER
13522 #
13523 if test x"$ac_file" != x-; then
13524 {
13525 $as_echo "/* $configure_input */" \
13526 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
13527 } >"$tmp/config.h" \
13528 || as_fn_error "could not create $ac_file" "$LINENO" 5
13529 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
13530 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
13531 $as_echo "$as_me: $ac_file is unchanged" >&6;}
13532 else
13533 rm -f "$ac_file"
13534 mv "$tmp/config.h" "$ac_file" \
13535 || as_fn_error "could not create $ac_file" "$LINENO" 5
13536 fi
13537 else
13538 $as_echo "/* $configure_input */" \
13539 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
13540 || as_fn_error "could not create -" "$LINENO" 5
13541 fi
13542 # Compute "$ac_file"'s index in $config_headers.
13543 _am_arg="$ac_file"
13544 _am_stamp_count=1
13545 for _am_header in $config_headers :; do
13546 case $_am_header in
13547 $_am_arg | $_am_arg:* )
13548 break ;;
13549 * )
13550 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
13551 esac
13552 done
13553 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
13554 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13555 X"$_am_arg" : 'X\(//\)[^/]' \| \
13556 X"$_am_arg" : 'X\(//\)$' \| \
13557 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
13558 $as_echo X"$_am_arg" |
13559 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13560 s//\1/
13561 q
13562 }
13563 /^X\(\/\/\)[^/].*/{
13564 s//\1/
13565 q
13566 }
13567 /^X\(\/\/\)$/{
13568 s//\1/
13569 q
13570 }
13571 /^X\(\/\).*/{
13572 s//\1/
13573 q
13574 }
13575 s/.*/./; q'`/stamp-h$_am_stamp_count
13576 ;;
13577
13578 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
13579 $as_echo "$as_me: executing $ac_file commands" >&6;}
13580 ;;
13581 esac
13582
13583
13584 case $ac_file$ac_mode in
13585 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
13586 # Autoconf 2.62 quotes --file arguments for eval, but not when files
13587 # are listed without --file. Let's play safe and only enable the eval
13588 # if we detect the quoting.
13589 case $CONFIG_FILES in
13590 *\'*) eval set x "$CONFIG_FILES" ;;
13591 *) set x $CONFIG_FILES ;;
13592 esac
13593 shift
13594 for mf
13595 do
13596 # Strip MF so we end up with the name of the file.
13597 mf=`echo "$mf" | sed -e 's/:.*$//'`
13598 # Check whether this is an Automake generated Makefile or not.
13599 # We used to match only the files named `Makefile.in', but
13600 # some people rename them; so instead we look at the file content.
13601 # Grep'ing the first line is not enough: some people post-process
13602 # each Makefile.in and add a new line on top of each file to say so.
13603 # Grep'ing the whole file is not good either: AIX grep has a line
13604 # limit of 2048, but all sed's we know have understand at least 4000.
13605 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
13606 dirpart=`$as_dirname -- "$mf" ||
13607 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13608 X"$mf" : 'X\(//\)[^/]' \| \
13609 X"$mf" : 'X\(//\)$' \| \
13610 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
13611 $as_echo X"$mf" |
13612 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13613 s//\1/
13614 q
13615 }
13616 /^X\(\/\/\)[^/].*/{
13617 s//\1/
13618 q
13619 }
13620 /^X\(\/\/\)$/{
13621 s//\1/
13622 q
13623 }
13624 /^X\(\/\).*/{
13625 s//\1/
13626 q
13627 }
13628 s/.*/./; q'`
13629 else
13630 continue
13631 fi
13632 # Extract the definition of DEPDIR, am__include, and am__quote
13633 # from the Makefile without running `make'.
13634 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
13635 test -z "$DEPDIR" && continue
13636 am__include=`sed -n 's/^am__include = //p' < "$mf"`
13637 test -z "am__include" && continue
13638 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
13639 # When using ansi2knr, U may be empty or an underscore; expand it
13640 U=`sed -n 's/^U = //p' < "$mf"`
13641 # Find all dependency output files, they are included files with
13642 # $(DEPDIR) in their names. We invoke sed twice because it is the
13643 # simplest approach to changing $(DEPDIR) to its actual value in the
13644 # expansion.
13645 for file in `sed -n "
13646 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
13647 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
13648 # Make sure the directory exists.
13649 test -f "$dirpart/$file" && continue
13650 fdir=`$as_dirname -- "$file" ||
13651 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13652 X"$file" : 'X\(//\)[^/]' \| \
13653 X"$file" : 'X\(//\)$' \| \
13654 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
13655 $as_echo X"$file" |
13656 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13657 s//\1/
13658 q
13659 }
13660 /^X\(\/\/\)[^/].*/{
13661 s//\1/
13662 q
13663 }
13664 /^X\(\/\/\)$/{
13665 s//\1/
13666 q
13667 }
13668 /^X\(\/\).*/{
13669 s//\1/
13670 q
13671 }
13672 s/.*/./; q'`
13673 as_dir=$dirpart/$fdir; as_fn_mkdir_p
13674 # echo "creating $dirpart/$file"
13675 echo '# dummy' > "$dirpart/$file"
13676 done
13677 done
13678 }
13679 ;;
13680 "libtool":C)
13681
13682 # See if we are running on zsh, and set the options which allow our
13683 # commands through without removal of \ escapes.
13684 if test -n "${ZSH_VERSION+set}" ; then
13685 setopt NO_GLOB_SUBST
13686 fi
13687
13688 cfgfile="${ofile}T"
13689 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
13690 $RM "$cfgfile"
13691
13692 cat <<_LT_EOF >> "$cfgfile"
13693 #! $SHELL
13694
13695 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
13696 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
13697 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13698 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
13699 #
13700 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
13701 # 2006, 2007, 2008 Free Software Foundation, Inc.
13702 # Written by Gordon Matzigkeit, 1996
13703 #
13704 # This file is part of GNU Libtool.
13705 #
13706 # GNU Libtool is free software; you can redistribute it and/or
13707 # modify it under the terms of the GNU General Public License as
13708 # published by the Free Software Foundation; either version 2 of
13709 # the License, or (at your option) any later version.
13710 #
13711 # As a special exception to the GNU General Public License,
13712 # if you distribute this file as part of a program or library that
13713 # is built using GNU Libtool, you may include this file under the
13714 # same distribution terms that you use for the rest of that program.
13715 #
13716 # GNU Libtool is distributed in the hope that it will be useful,
13717 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13718 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13719 # GNU General Public License for more details.
13720 #
13721 # You should have received a copy of the GNU General Public License
13722 # along with GNU Libtool; see the file COPYING. If not, a copy
13723 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
13724 # obtained by writing to the Free Software Foundation, Inc.,
13725 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
13726
13727
13728 # The names of the tagged configurations supported by this script.
13729 available_tags=""
13730
13731 # ### BEGIN LIBTOOL CONFIG
13732
13733 # Which release of libtool.m4 was used?
13734 macro_version=$macro_version
13735 macro_revision=$macro_revision
13736
13737 # Whether or not to build shared libraries.
13738 build_libtool_libs=$enable_shared
13739
13740 # Whether or not to build static libraries.
13741 build_old_libs=$enable_static
13742
13743 # What type of objects to build.
13744 pic_mode=$pic_mode
13745
13746 # Whether or not to optimize for fast installation.
13747 fast_install=$enable_fast_install
13748
13749 # The host system.
13750 host_alias=$host_alias
13751 host=$host
13752 host_os=$host_os
13753
13754 # The build system.
13755 build_alias=$build_alias
13756 build=$build
13757 build_os=$build_os
13758
13759 # A sed program that does not truncate output.
13760 SED=$lt_SED
13761
13762 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
13763 Xsed="\$SED -e 1s/^X//"
13764
13765 # A grep program that handles long lines.
13766 GREP=$lt_GREP
13767
13768 # An ERE matcher.
13769 EGREP=$lt_EGREP
13770
13771 # A literal string matcher.
13772 FGREP=$lt_FGREP
13773
13774 # A BSD- or MS-compatible name lister.
13775 NM=$lt_NM
13776
13777 # Whether we need soft or hard links.
13778 LN_S=$lt_LN_S
13779
13780 # What is the maximum length of a command?
13781 max_cmd_len=$max_cmd_len
13782
13783 # Object file suffix (normally "o").
13784 objext=$ac_objext
13785
13786 # Executable file suffix (normally "").
13787 exeext=$exeext
13788
13789 # whether the shell understands "unset".
13790 lt_unset=$lt_unset
13791
13792 # turn spaces into newlines.
13793 SP2NL=$lt_lt_SP2NL
13794
13795 # turn newlines into spaces.
13796 NL2SP=$lt_lt_NL2SP
13797
13798 # How to create reloadable object files.
13799 reload_flag=$lt_reload_flag
13800 reload_cmds=$lt_reload_cmds
13801
13802 # An object symbol dumper.
13803 OBJDUMP=$lt_OBJDUMP
13804
13805 # Method to check whether dependent libraries are shared objects.
13806 deplibs_check_method=$lt_deplibs_check_method
13807
13808 # Command to use when deplibs_check_method == "file_magic".
13809 file_magic_cmd=$lt_file_magic_cmd
13810
13811 # The archiver.
13812 AR=$lt_AR
13813 AR_FLAGS=$lt_AR_FLAGS
13814
13815 # A symbol stripping program.
13816 STRIP=$lt_STRIP
13817
13818 # Commands used to install an old-style archive.
13819 RANLIB=$lt_RANLIB
13820 old_postinstall_cmds=$lt_old_postinstall_cmds
13821 old_postuninstall_cmds=$lt_old_postuninstall_cmds
13822
13823 # A C compiler.
13824 LTCC=$lt_CC
13825
13826 # LTCC compiler flags.
13827 LTCFLAGS=$lt_CFLAGS
13828
13829 # Take the output of nm and produce a listing of raw symbols and C names.
13830 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
13831
13832 # Transform the output of nm in a proper C declaration.
13833 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
13834
13835 # Transform the output of nm in a C name address pair.
13836 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
13837
13838 # Transform the output of nm in a C name address pair when lib prefix is needed.
13839 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
13840
13841 # The name of the directory that contains temporary libtool files.
13842 objdir=$objdir
13843
13844 # Shell to use when invoking shell scripts.
13845 SHELL=$lt_SHELL
13846
13847 # An echo program that does not interpret backslashes.
13848 ECHO=$lt_ECHO
13849
13850 # Used to examine libraries when file_magic_cmd begins with "file".
13851 MAGIC_CMD=$MAGIC_CMD
13852
13853 # Must we lock files when doing compilation?
13854 need_locks=$lt_need_locks
13855
13856 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
13857 DSYMUTIL=$lt_DSYMUTIL
13858
13859 # Tool to change global to local symbols on Mac OS X.
13860 NMEDIT=$lt_NMEDIT
13861
13862 # Tool to manipulate fat objects and archives on Mac OS X.
13863 LIPO=$lt_LIPO
13864
13865 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
13866 OTOOL=$lt_OTOOL
13867
13868 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
13869 OTOOL64=$lt_OTOOL64
13870
13871 # Old archive suffix (normally "a").
13872 libext=$libext
13873
13874 # Shared library suffix (normally ".so").
13875 shrext_cmds=$lt_shrext_cmds
13876
13877 # The commands to extract the exported symbol list from a shared archive.
13878 extract_expsyms_cmds=$lt_extract_expsyms_cmds
13879
13880 # Variables whose values should be saved in libtool wrapper scripts and
13881 # restored at link time.
13882 variables_saved_for_relink=$lt_variables_saved_for_relink
13883
13884 # Do we need the "lib" prefix for modules?
13885 need_lib_prefix=$need_lib_prefix
13886
13887 # Do we need a version for libraries?
13888 need_version=$need_version
13889
13890 # Library versioning type.
13891 version_type=$version_type
13892
13893 # Shared library runtime path variable.
13894 runpath_var=$runpath_var
13895
13896 # Shared library path variable.
13897 shlibpath_var=$shlibpath_var
13898
13899 # Is shlibpath searched before the hard-coded library search path?
13900 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
13901
13902 # Format of library name prefix.
13903 libname_spec=$lt_libname_spec
13904
13905 # List of archive names. First name is the real one, the rest are links.
13906 # The last name is the one that the linker finds with -lNAME
13907 library_names_spec=$lt_library_names_spec
13908
13909 # The coded name of the library, if different from the real name.
13910 soname_spec=$lt_soname_spec
13911
13912 # Command to use after installation of a shared archive.
13913 postinstall_cmds=$lt_postinstall_cmds
13914
13915 # Command to use after uninstallation of a shared archive.
13916 postuninstall_cmds=$lt_postuninstall_cmds
13917
13918 # Commands used to finish a libtool library installation in a directory.
13919 finish_cmds=$lt_finish_cmds
13920
13921 # As "finish_cmds", except a single script fragment to be evaled but
13922 # not shown.
13923 finish_eval=$lt_finish_eval
13924
13925 # Whether we should hardcode library paths into libraries.
13926 hardcode_into_libs=$hardcode_into_libs
13927
13928 # Compile-time system search path for libraries.
13929 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
13930
13931 # Run-time system search path for libraries.
13932 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
13933
13934 # Whether dlopen is supported.
13935 dlopen_support=$enable_dlopen
13936
13937 # Whether dlopen of programs is supported.
13938 dlopen_self=$enable_dlopen_self
13939
13940 # Whether dlopen of statically linked programs is supported.
13941 dlopen_self_static=$enable_dlopen_self_static
13942
13943 # Commands to strip libraries.
13944 old_striplib=$lt_old_striplib
13945 striplib=$lt_striplib
13946
13947
13948 # The linker used to build libraries.
13949 LD=$lt_LD
13950
13951 # Commands used to build an old-style archive.
13952 old_archive_cmds=$lt_old_archive_cmds
13953
13954 # A language specific compiler.
13955 CC=$lt_compiler
13956
13957 # Is the compiler the GNU compiler?
13958 with_gcc=$GCC
13959
13960 # Compiler flag to turn off builtin functions.
13961 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
13962
13963 # How to pass a linker flag through the compiler.
13964 wl=$lt_lt_prog_compiler_wl
13965
13966 # Additional compiler flags for building library objects.
13967 pic_flag=$lt_lt_prog_compiler_pic
13968
13969 # Compiler flag to prevent dynamic linking.
13970 link_static_flag=$lt_lt_prog_compiler_static
13971
13972 # Does compiler simultaneously support -c and -o options?
13973 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
13974
13975 # Whether or not to add -lc for building shared libraries.
13976 build_libtool_need_lc=$archive_cmds_need_lc
13977
13978 # Whether or not to disallow shared libs when runtime libs are static.
13979 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
13980
13981 # Compiler flag to allow reflexive dlopens.
13982 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
13983
13984 # Compiler flag to generate shared objects directly from archives.
13985 whole_archive_flag_spec=$lt_whole_archive_flag_spec
13986
13987 # Whether the compiler copes with passing no objects directly.
13988 compiler_needs_object=$lt_compiler_needs_object
13989
13990 # Create an old-style archive from a shared archive.
13991 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
13992
13993 # Create a temporary old-style archive to link instead of a shared archive.
13994 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
13995
13996 # Commands used to build a shared archive.
13997 archive_cmds=$lt_archive_cmds
13998 archive_expsym_cmds=$lt_archive_expsym_cmds
13999
14000 # Commands used to build a loadable module if different from building
14001 # a shared archive.
14002 module_cmds=$lt_module_cmds
14003 module_expsym_cmds=$lt_module_expsym_cmds
14004
14005 # Whether we are building with GNU ld or not.
14006 with_gnu_ld=$lt_with_gnu_ld
14007
14008 # Flag that allows shared libraries with undefined symbols to be built.
14009 allow_undefined_flag=$lt_allow_undefined_flag
14010
14011 # Flag that enforces no undefined symbols.
14012 no_undefined_flag=$lt_no_undefined_flag
14013
14014 # Flag to hardcode \$libdir into a binary during linking.
14015 # This must work even if \$libdir does not exist
14016 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
14017
14018 # If ld is used when linking, flag to hardcode \$libdir into a binary
14019 # during linking. This must work even if \$libdir does not exist.
14020 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
14021
14022 # Whether we need a single "-rpath" flag with a separated argument.
14023 hardcode_libdir_separator=$lt_hardcode_libdir_separator
14024
14025 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
14026 # DIR into the resulting binary.
14027 hardcode_direct=$hardcode_direct
14028
14029 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
14030 # DIR into the resulting binary and the resulting library dependency is
14031 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
14032 # library is relocated.
14033 hardcode_direct_absolute=$hardcode_direct_absolute
14034
14035 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
14036 # into the resulting binary.
14037 hardcode_minus_L=$hardcode_minus_L
14038
14039 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
14040 # into the resulting binary.
14041 hardcode_shlibpath_var=$hardcode_shlibpath_var
14042
14043 # Set to "yes" if building a shared library automatically hardcodes DIR
14044 # into the library and all subsequent libraries and executables linked
14045 # against it.
14046 hardcode_automatic=$hardcode_automatic
14047
14048 # Set to yes if linker adds runtime paths of dependent libraries
14049 # to runtime path list.
14050 inherit_rpath=$inherit_rpath
14051
14052 # Whether libtool must link a program against all its dependency libraries.
14053 link_all_deplibs=$link_all_deplibs
14054
14055 # Fix the shell variable \$srcfile for the compiler.
14056 fix_srcfile_path=$lt_fix_srcfile_path
14057
14058 # Set to "yes" if exported symbols are required.
14059 always_export_symbols=$always_export_symbols
14060
14061 # The commands to list exported symbols.
14062 export_symbols_cmds=$lt_export_symbols_cmds
14063
14064 # Symbols that should not be listed in the preloaded symbols.
14065 exclude_expsyms=$lt_exclude_expsyms
14066
14067 # Symbols that must always be exported.
14068 include_expsyms=$lt_include_expsyms
14069
14070 # Commands necessary for linking programs (against libraries) with templates.
14071 prelink_cmds=$lt_prelink_cmds
14072
14073 # Specify filename containing input files.
14074 file_list_spec=$lt_file_list_spec
14075
14076 # How to hardcode a shared library path into an executable.
14077 hardcode_action=$hardcode_action
14078
14079 # ### END LIBTOOL CONFIG
14080
14081 _LT_EOF
14082
14083 case $host_os in
14084 aix3*)
14085 cat <<\_LT_EOF >> "$cfgfile"
14086 # AIX sometimes has problems with the GCC collect2 program. For some
14087 # reason, if we set the COLLECT_NAMES environment variable, the problems
14088 # vanish in a puff of smoke.
14089 if test "X${COLLECT_NAMES+set}" != Xset; then
14090 COLLECT_NAMES=
14091 export COLLECT_NAMES
14092 fi
14093 _LT_EOF
14094 ;;
14095 esac
14096
14097
14098 ltmain="$ac_aux_dir/ltmain.sh"
14099
14100
14101 # We use sed instead of cat because bash on DJGPP gets confused if
14102 # if finds mixed CR/LF and LF-only lines. Since sed operates in
14103 # text mode, it properly converts lines to CR/LF. This bash problem
14104 # is reportedly fixed, but why not run on old versions too?
14105 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
14106 || (rm -f "$cfgfile"; exit 1)
14107
14108 case $xsi_shell in
14109 yes)
14110 cat << \_LT_EOF >> "$cfgfile"
14111
14112 # func_dirname file append nondir_replacement
14113 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
14114 # otherwise set result to NONDIR_REPLACEMENT.
14115 func_dirname ()
14116 {
14117 case ${1} in
14118 */*) func_dirname_result="${1%/*}${2}" ;;
14119 * ) func_dirname_result="${3}" ;;
14120 esac
14121 }
14122
14123 # func_basename file
14124 func_basename ()
14125 {
14126 func_basename_result="${1##*/}"
14127 }
14128
14129 # func_dirname_and_basename file append nondir_replacement
14130 # perform func_basename and func_dirname in a single function
14131 # call:
14132 # dirname: Compute the dirname of FILE. If nonempty,
14133 # add APPEND to the result, otherwise set result
14134 # to NONDIR_REPLACEMENT.
14135 # value returned in "$func_dirname_result"
14136 # basename: Compute filename of FILE.
14137 # value retuned in "$func_basename_result"
14138 # Implementation must be kept synchronized with func_dirname
14139 # and func_basename. For efficiency, we do not delegate to
14140 # those functions but instead duplicate the functionality here.
14141 func_dirname_and_basename ()
14142 {
14143 case ${1} in
14144 */*) func_dirname_result="${1%/*}${2}" ;;
14145 * ) func_dirname_result="${3}" ;;
14146 esac
14147 func_basename_result="${1##*/}"
14148 }
14149
14150 # func_stripname prefix suffix name
14151 # strip PREFIX and SUFFIX off of NAME.
14152 # PREFIX and SUFFIX must not contain globbing or regex special
14153 # characters, hashes, percent signs, but SUFFIX may contain a leading
14154 # dot (in which case that matches only a dot).
14155 func_stripname ()
14156 {
14157 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
14158 # positional parameters, so assign one to ordinary parameter first.
14159 func_stripname_result=${3}
14160 func_stripname_result=${func_stripname_result#"${1}"}
14161 func_stripname_result=${func_stripname_result%"${2}"}
14162 }
14163
14164 # func_opt_split
14165 func_opt_split ()
14166 {
14167 func_opt_split_opt=${1%%=*}
14168 func_opt_split_arg=${1#*=}
14169 }
14170
14171 # func_lo2o object
14172 func_lo2o ()
14173 {
14174 case ${1} in
14175 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
14176 *) func_lo2o_result=${1} ;;
14177 esac
14178 }
14179
14180 # func_xform libobj-or-source
14181 func_xform ()
14182 {
14183 func_xform_result=${1%.*}.lo
14184 }
14185
14186 # func_arith arithmetic-term...
14187 func_arith ()
14188 {
14189 func_arith_result=$(( $* ))
14190 }
14191
14192 # func_len string
14193 # STRING may not start with a hyphen.
14194 func_len ()
14195 {
14196 func_len_result=${#1}
14197 }
14198
14199 _LT_EOF
14200 ;;
14201 *) # Bourne compatible functions.
14202 cat << \_LT_EOF >> "$cfgfile"
14203
14204 # func_dirname file append nondir_replacement
14205 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
14206 # otherwise set result to NONDIR_REPLACEMENT.
14207 func_dirname ()
14208 {
14209 # Extract subdirectory from the argument.
14210 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
14211 if test "X$func_dirname_result" = "X${1}"; then
14212 func_dirname_result="${3}"
14213 else
14214 func_dirname_result="$func_dirname_result${2}"
14215 fi
14216 }
14217
14218 # func_basename file
14219 func_basename ()
14220 {
14221 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
14222 }
14223
14224
14225 # func_stripname prefix suffix name
14226 # strip PREFIX and SUFFIX off of NAME.
14227 # PREFIX and SUFFIX must not contain globbing or regex special
14228 # characters, hashes, percent signs, but SUFFIX may contain a leading
14229 # dot (in which case that matches only a dot).
14230 # func_strip_suffix prefix name
14231 func_stripname ()
14232 {
14233 case ${2} in
14234 .*) func_stripname_result=`$ECHO "X${3}" \
14235 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
14236 *) func_stripname_result=`$ECHO "X${3}" \
14237 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
14238 esac
14239 }
14240
14241 # sed scripts:
14242 my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
14243 my_sed_long_arg='1s/^-[^=]*=//'
14244
14245 # func_opt_split
14246 func_opt_split ()
14247 {
14248 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
14249 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
14250 }
14251
14252 # func_lo2o object
14253 func_lo2o ()
14254 {
14255 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
14256 }
14257
14258 # func_xform libobj-or-source
14259 func_xform ()
14260 {
14261 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
14262 }
14263
14264 # func_arith arithmetic-term...
14265 func_arith ()
14266 {
14267 func_arith_result=`expr "$@"`
14268 }
14269
14270 # func_len string
14271 # STRING may not start with a hyphen.
14272 func_len ()
14273 {
14274 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
14275 }
14276
14277 _LT_EOF
14278 esac
14279
14280 case $lt_shell_append in
14281 yes)
14282 cat << \_LT_EOF >> "$cfgfile"
14283
14284 # func_append var value
14285 # Append VALUE to the end of shell variable VAR.
14286 func_append ()
14287 {
14288 eval "$1+=\$2"
14289 }
14290 _LT_EOF
14291 ;;
14292 *)
14293 cat << \_LT_EOF >> "$cfgfile"
14294
14295 # func_append var value
14296 # Append VALUE to the end of shell variable VAR.
14297 func_append ()
14298 {
14299 eval "$1=\$$1\$2"
14300 }
14301
14302 _LT_EOF
14303 ;;
14304 esac
14305
14306
14307 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
14308 || (rm -f "$cfgfile"; exit 1)
14309
14310 mv -f "$cfgfile" "$ofile" ||
14311 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
14312 chmod +x "$ofile"
14313
14314 ;;
14315
14316 esac
14317 done # for ac_tag
14318
14319
14320 as_fn_exit 0
14321 _ACEOF
14322 ac_clean_files=$ac_clean_files_save
14323
14324 test $ac_write_fail = 0 ||
14325 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14326
14327
14328 # configure is writing to config.log, and then calls config.status.
14329 # config.status does its own redirection, appending to config.log.
14330 # Unfortunately, on DOS this fails, as config.log is still kept open
14331 # by configure, so config.status won't be able to write to it; its
14332 # output is simply discarded. So we exec the FD to /dev/null,
14333 # effectively closing config.log, so it can be properly (re)opened and
14334 # appended to by config.status. When coming back to configure, we
14335 # need to make the FD available again.
14336 if test "$no_create" != yes; then
14337 ac_cs_success=:
14338 ac_config_status_args=
14339 test "$silent" = yes &&
14340 ac_config_status_args="$ac_config_status_args --quiet"
14341 exec 5>/dev/null
14342 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
14343 exec 5>>config.log
14344 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14345 # would make configure fail if this is the last instruction.
14346 $ac_cs_success || as_fn_exit $?
14347 fi
14348 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14349 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14350 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
14351 fi
14352
0 AC_INIT(ssh-contact, 0.1)
1 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
2
3 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
4 AC_CONFIG_HEADERS([config.h])
5 AM_MAINTAINER_MODE
6
7 AC_ISC_POSIX
8 AC_PROG_CC
9 AM_PROG_CC_STDC
10 AC_HEADER_STDC
11 AM_PROG_LIBTOOL
12
13 PKG_CHECK_MODULES(SSH_CONTACT,
14 [
15 telepathy-glib >= 0.11.9
16 glib-2.0 >= 2.24
17 gio-2.0
18 gio-unix-2.0
19 ])
20
21 AC_OUTPUT([
22 Makefile
23 src/Makefile
24 ])
0 #! /bin/sh
1 # depcomp - compile a program generating dependencies as side-effects
2
3 scriptversion=2009-04-28.21; # UTC
4
5 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
6 # Software Foundation, Inc.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
27
28 case $1 in
29 '')
30 echo "$0: No command. Try \`$0 --help' for more information." 1>&2
31 exit 1;
32 ;;
33 -h | --h*)
34 cat <<\EOF
35 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
36
37 Run PROGRAMS ARGS to compile a file, generating dependencies
38 as side-effects.
39
40 Environment variables:
41 depmode Dependency tracking mode.
42 source Source file read by `PROGRAMS ARGS'.
43 object Object file output by `PROGRAMS ARGS'.
44 DEPDIR directory where to store dependencies.
45 depfile Dependency file to output.
46 tmpdepfile Temporary file to use when outputing dependencies.
47 libtool Whether libtool is used (yes/no).
48
49 Report bugs to <bug-automake@gnu.org>.
50 EOF
51 exit $?
52 ;;
53 -v | --v*)
54 echo "depcomp $scriptversion"
55 exit $?
56 ;;
57 esac
58
59 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
60 echo "depcomp: Variables source, object and depmode must be set" 1>&2
61 exit 1
62 fi
63
64 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
65 depfile=${depfile-`echo "$object" |
66 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
67 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
68
69 rm -f "$tmpdepfile"
70
71 # Some modes work just like other modes, but use different flags. We
72 # parameterize here, but still list the modes in the big case below,
73 # to make depend.m4 easier to write. Note that we *cannot* use a case
74 # here, because this file can only contain one case statement.
75 if test "$depmode" = hp; then
76 # HP compiler uses -M and no extra arg.
77 gccflag=-M
78 depmode=gcc
79 fi
80
81 if test "$depmode" = dashXmstdout; then
82 # This is just like dashmstdout with a different argument.
83 dashmflag=-xM
84 depmode=dashmstdout
85 fi
86
87 cygpath_u="cygpath -u -f -"
88 if test "$depmode" = msvcmsys; then
89 # This is just like msvisualcpp but w/o cygpath translation.
90 # Just convert the backslash-escaped backslashes to single forward
91 # slashes to satisfy depend.m4
92 cygpath_u="sed s,\\\\\\\\,/,g"
93 depmode=msvisualcpp
94 fi
95
96 case "$depmode" in
97 gcc3)
98 ## gcc 3 implements dependency tracking that does exactly what
99 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
100 ## it if -MD -MP comes after the -MF stuff. Hmm.
101 ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
102 ## the command line argument order; so add the flags where they
103 ## appear in depend2.am. Note that the slowdown incurred here
104 ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
105 for arg
106 do
107 case $arg in
108 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
109 *) set fnord "$@" "$arg" ;;
110 esac
111 shift # fnord
112 shift # $arg
113 done
114 "$@"
115 stat=$?
116 if test $stat -eq 0; then :
117 else
118 rm -f "$tmpdepfile"
119 exit $stat
120 fi
121 mv "$tmpdepfile" "$depfile"
122 ;;
123
124 gcc)
125 ## There are various ways to get dependency output from gcc. Here's
126 ## why we pick this rather obscure method:
127 ## - Don't want to use -MD because we'd like the dependencies to end
128 ## up in a subdir. Having to rename by hand is ugly.
129 ## (We might end up doing this anyway to support other compilers.)
130 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
131 ## -MM, not -M (despite what the docs say).
132 ## - Using -M directly means running the compiler twice (even worse
133 ## than renaming).
134 if test -z "$gccflag"; then
135 gccflag=-MD,
136 fi
137 "$@" -Wp,"$gccflag$tmpdepfile"
138 stat=$?
139 if test $stat -eq 0; then :
140 else
141 rm -f "$tmpdepfile"
142 exit $stat
143 fi
144 rm -f "$depfile"
145 echo "$object : \\" > "$depfile"
146 alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
147 ## The second -e expression handles DOS-style file names with drive letters.
148 sed -e 's/^[^:]*: / /' \
149 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
150 ## This next piece of magic avoids the `deleted header file' problem.
151 ## The problem is that when a header file which appears in a .P file
152 ## is deleted, the dependency causes make to die (because there is
153 ## typically no way to rebuild the header). We avoid this by adding
154 ## dummy dependencies for each header file. Too bad gcc doesn't do
155 ## this for us directly.
156 tr ' ' '
157 ' < "$tmpdepfile" |
158 ## Some versions of gcc put a space before the `:'. On the theory
159 ## that the space means something, we add a space to the output as
160 ## well.
161 ## Some versions of the HPUX 10.20 sed can't process this invocation
162 ## correctly. Breaking it into two sed invocations is a workaround.
163 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
164 rm -f "$tmpdepfile"
165 ;;
166
167 hp)
168 # This case exists only to let depend.m4 do its work. It works by
169 # looking at the text of this script. This case will never be run,
170 # since it is checked for above.
171 exit 1
172 ;;
173
174 sgi)
175 if test "$libtool" = yes; then
176 "$@" "-Wp,-MDupdate,$tmpdepfile"
177 else
178 "$@" -MDupdate "$tmpdepfile"
179 fi
180 stat=$?
181 if test $stat -eq 0; then :
182 else
183 rm -f "$tmpdepfile"
184 exit $stat
185 fi
186 rm -f "$depfile"
187
188 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
189 echo "$object : \\" > "$depfile"
190
191 # Clip off the initial element (the dependent). Don't try to be
192 # clever and replace this with sed code, as IRIX sed won't handle
193 # lines with more than a fixed number of characters (4096 in
194 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
195 # the IRIX cc adds comments like `#:fec' to the end of the
196 # dependency line.
197 tr ' ' '
198 ' < "$tmpdepfile" \
199 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
200 tr '
201 ' ' ' >> "$depfile"
202 echo >> "$depfile"
203
204 # The second pass generates a dummy entry for each header file.
205 tr ' ' '
206 ' < "$tmpdepfile" \
207 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
208 >> "$depfile"
209 else
210 # The sourcefile does not contain any dependencies, so just
211 # store a dummy comment line, to avoid errors with the Makefile
212 # "include basename.Plo" scheme.
213 echo "#dummy" > "$depfile"
214 fi
215 rm -f "$tmpdepfile"
216 ;;
217
218 aix)
219 # The C for AIX Compiler uses -M and outputs the dependencies
220 # in a .u file. In older versions, this file always lives in the
221 # current directory. Also, the AIX compiler puts `$object:' at the
222 # start of each line; $object doesn't have directory information.
223 # Version 6 uses the directory in both cases.
224 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
225 test "x$dir" = "x$object" && dir=
226 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
227 if test "$libtool" = yes; then
228 tmpdepfile1=$dir$base.u
229 tmpdepfile2=$base.u
230 tmpdepfile3=$dir.libs/$base.u
231 "$@" -Wc,-M
232 else
233 tmpdepfile1=$dir$base.u
234 tmpdepfile2=$dir$base.u
235 tmpdepfile3=$dir$base.u
236 "$@" -M
237 fi
238 stat=$?
239
240 if test $stat -eq 0; then :
241 else
242 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
243 exit $stat
244 fi
245
246 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
247 do
248 test -f "$tmpdepfile" && break
249 done
250 if test -f "$tmpdepfile"; then
251 # Each line is of the form `foo.o: dependent.h'.
252 # Do two passes, one to just change these to
253 # `$object: dependent.h' and one to simply `dependent.h:'.
254 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
255 # That's a tab and a space in the [].
256 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
257 else
258 # The sourcefile does not contain any dependencies, so just
259 # store a dummy comment line, to avoid errors with the Makefile
260 # "include basename.Plo" scheme.
261 echo "#dummy" > "$depfile"
262 fi
263 rm -f "$tmpdepfile"
264 ;;
265
266 icc)
267 # Intel's C compiler understands `-MD -MF file'. However on
268 # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
269 # ICC 7.0 will fill foo.d with something like
270 # foo.o: sub/foo.c
271 # foo.o: sub/foo.h
272 # which is wrong. We want:
273 # sub/foo.o: sub/foo.c
274 # sub/foo.o: sub/foo.h
275 # sub/foo.c:
276 # sub/foo.h:
277 # ICC 7.1 will output
278 # foo.o: sub/foo.c sub/foo.h
279 # and will wrap long lines using \ :
280 # foo.o: sub/foo.c ... \
281 # sub/foo.h ... \
282 # ...
283
284 "$@" -MD -MF "$tmpdepfile"
285 stat=$?
286 if test $stat -eq 0; then :
287 else
288 rm -f "$tmpdepfile"
289 exit $stat
290 fi
291 rm -f "$depfile"
292 # Each line is of the form `foo.o: dependent.h',
293 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
294 # Do two passes, one to just change these to
295 # `$object: dependent.h' and one to simply `dependent.h:'.
296 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
297 # Some versions of the HPUX 10.20 sed can't process this invocation
298 # correctly. Breaking it into two sed invocations is a workaround.
299 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
300 sed -e 's/$/ :/' >> "$depfile"
301 rm -f "$tmpdepfile"
302 ;;
303
304 hp2)
305 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
306 # compilers, which have integrated preprocessors. The correct option
307 # to use with these is +Maked; it writes dependencies to a file named
308 # 'foo.d', which lands next to the object file, wherever that
309 # happens to be.
310 # Much of this is similar to the tru64 case; see comments there.
311 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
312 test "x$dir" = "x$object" && dir=
313 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
314 if test "$libtool" = yes; then
315 tmpdepfile1=$dir$base.d
316 tmpdepfile2=$dir.libs/$base.d
317 "$@" -Wc,+Maked
318 else
319 tmpdepfile1=$dir$base.d
320 tmpdepfile2=$dir$base.d
321 "$@" +Maked
322 fi
323 stat=$?
324 if test $stat -eq 0; then :
325 else
326 rm -f "$tmpdepfile1" "$tmpdepfile2"
327 exit $stat
328 fi
329
330 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
331 do
332 test -f "$tmpdepfile" && break
333 done
334 if test -f "$tmpdepfile"; then
335 sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
336 # Add `dependent.h:' lines.
337 sed -ne '2,${
338 s/^ *//
339 s/ \\*$//
340 s/$/:/
341 p
342 }' "$tmpdepfile" >> "$depfile"
343 else
344 echo "#dummy" > "$depfile"
345 fi
346 rm -f "$tmpdepfile" "$tmpdepfile2"
347 ;;
348
349 tru64)
350 # The Tru64 compiler uses -MD to generate dependencies as a side
351 # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
352 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
353 # dependencies in `foo.d' instead, so we check for that too.
354 # Subdirectories are respected.
355 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
356 test "x$dir" = "x$object" && dir=
357 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
358
359 if test "$libtool" = yes; then
360 # With Tru64 cc, shared objects can also be used to make a
361 # static library. This mechanism is used in libtool 1.4 series to
362 # handle both shared and static libraries in a single compilation.
363 # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
364 #
365 # With libtool 1.5 this exception was removed, and libtool now
366 # generates 2 separate objects for the 2 libraries. These two
367 # compilations output dependencies in $dir.libs/$base.o.d and
368 # in $dir$base.o.d. We have to check for both files, because
369 # one of the two compilations can be disabled. We should prefer
370 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
371 # automatically cleaned when .libs/ is deleted, while ignoring
372 # the former would cause a distcleancheck panic.
373 tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
374 tmpdepfile2=$dir$base.o.d # libtool 1.5
375 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
376 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
377 "$@" -Wc,-MD
378 else
379 tmpdepfile1=$dir$base.o.d
380 tmpdepfile2=$dir$base.d
381 tmpdepfile3=$dir$base.d
382 tmpdepfile4=$dir$base.d
383 "$@" -MD
384 fi
385
386 stat=$?
387 if test $stat -eq 0; then :
388 else
389 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
390 exit $stat
391 fi
392
393 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
394 do
395 test -f "$tmpdepfile" && break
396 done
397 if test -f "$tmpdepfile"; then
398 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
399 # That's a tab and a space in the [].
400 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
401 else
402 echo "#dummy" > "$depfile"
403 fi
404 rm -f "$tmpdepfile"
405 ;;
406
407 #nosideeffect)
408 # This comment above is used by automake to tell side-effect
409 # dependency tracking mechanisms from slower ones.
410
411 dashmstdout)
412 # Important note: in order to support this mode, a compiler *must*
413 # always write the preprocessed file to stdout, regardless of -o.
414 "$@" || exit $?
415
416 # Remove the call to Libtool.
417 if test "$libtool" = yes; then
418 while test "X$1" != 'X--mode=compile'; do
419 shift
420 done
421 shift
422 fi
423
424 # Remove `-o $object'.
425 IFS=" "
426 for arg
427 do
428 case $arg in
429 -o)
430 shift
431 ;;
432 $object)
433 shift
434 ;;
435 *)
436 set fnord "$@" "$arg"
437 shift # fnord
438 shift # $arg
439 ;;
440 esac
441 done
442
443 test -z "$dashmflag" && dashmflag=-M
444 # Require at least two characters before searching for `:'
445 # in the target name. This is to cope with DOS-style filenames:
446 # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
447 "$@" $dashmflag |
448 sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
449 rm -f "$depfile"
450 cat < "$tmpdepfile" > "$depfile"
451 tr ' ' '
452 ' < "$tmpdepfile" | \
453 ## Some versions of the HPUX 10.20 sed can't process this invocation
454 ## correctly. Breaking it into two sed invocations is a workaround.
455 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
456 rm -f "$tmpdepfile"
457 ;;
458
459 dashXmstdout)
460 # This case only exists to satisfy depend.m4. It is never actually
461 # run, as this mode is specially recognized in the preamble.
462 exit 1
463 ;;
464
465 makedepend)
466 "$@" || exit $?
467 # Remove any Libtool call
468 if test "$libtool" = yes; then
469 while test "X$1" != 'X--mode=compile'; do
470 shift
471 done
472 shift
473 fi
474 # X makedepend
475 shift
476 cleared=no eat=no
477 for arg
478 do
479 case $cleared in
480 no)
481 set ""; shift
482 cleared=yes ;;
483 esac
484 if test $eat = yes; then
485 eat=no
486 continue
487 fi
488 case "$arg" in
489 -D*|-I*)
490 set fnord "$@" "$arg"; shift ;;
491 # Strip any option that makedepend may not understand. Remove
492 # the object too, otherwise makedepend will parse it as a source file.
493 -arch)
494 eat=yes ;;
495 -*|$object)
496 ;;
497 *)
498 set fnord "$@" "$arg"; shift ;;
499 esac
500 done
501 obj_suffix=`echo "$object" | sed 's/^.*\././'`
502 touch "$tmpdepfile"
503 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
504 rm -f "$depfile"
505 cat < "$tmpdepfile" > "$depfile"
506 sed '1,2d' "$tmpdepfile" | tr ' ' '
507 ' | \
508 ## Some versions of the HPUX 10.20 sed can't process this invocation
509 ## correctly. Breaking it into two sed invocations is a workaround.
510 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
511 rm -f "$tmpdepfile" "$tmpdepfile".bak
512 ;;
513
514 cpp)
515 # Important note: in order to support this mode, a compiler *must*
516 # always write the preprocessed file to stdout.
517 "$@" || exit $?
518
519 # Remove the call to Libtool.
520 if test "$libtool" = yes; then
521 while test "X$1" != 'X--mode=compile'; do
522 shift
523 done
524 shift
525 fi
526
527 # Remove `-o $object'.
528 IFS=" "
529 for arg
530 do
531 case $arg in
532 -o)
533 shift
534 ;;
535 $object)
536 shift
537 ;;
538 *)
539 set fnord "$@" "$arg"
540 shift # fnord
541 shift # $arg
542 ;;
543 esac
544 done
545
546 "$@" -E |
547 sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
548 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
549 sed '$ s: \\$::' > "$tmpdepfile"
550 rm -f "$depfile"
551 echo "$object : \\" > "$depfile"
552 cat < "$tmpdepfile" >> "$depfile"
553 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
554 rm -f "$tmpdepfile"
555 ;;
556
557 msvisualcpp)
558 # Important note: in order to support this mode, a compiler *must*
559 # always write the preprocessed file to stdout.
560 "$@" || exit $?
561
562 # Remove the call to Libtool.
563 if test "$libtool" = yes; then
564 while test "X$1" != 'X--mode=compile'; do
565 shift
566 done
567 shift
568 fi
569
570 IFS=" "
571 for arg
572 do
573 case "$arg" in
574 -o)
575 shift
576 ;;
577 $object)
578 shift
579 ;;
580 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
581 set fnord "$@"
582 shift
583 shift
584 ;;
585 *)
586 set fnord "$@" "$arg"
587 shift
588 shift
589 ;;
590 esac
591 done
592 "$@" -E 2>/dev/null |
593 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
594 rm -f "$depfile"
595 echo "$object : \\" > "$depfile"
596 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
597 echo " " >> "$depfile"
598 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
599 rm -f "$tmpdepfile"
600 ;;
601
602 msvcmsys)
603 # This case exists only to let depend.m4 do its work. It works by
604 # looking at the text of this script. This case will never be run,
605 # since it is checked for above.
606 exit 1
607 ;;
608
609 none)
610 exec "$@"
611 ;;
612
613 *)
614 echo "Unknown depmode $depmode" 1>&2
615 exit 1
616 ;;
617 esac
618
619 exit 0
620
621 # Local Variables:
622 # mode: shell-script
623 # sh-indentation: 2
624 # eval: (add-hook 'write-file-hooks 'time-stamp)
625 # time-stamp-start: "scriptversion="
626 # time-stamp-format: "%:y-%02m-%02d.%02H"
627 # time-stamp-time-zone: "UTC"
628 # time-stamp-end: "; # UTC"
629 # End:
0 #!/bin/sh
1 # install - install a program, script, or datafile
2
3 scriptversion=2009-04-28.21; # UTC
4
5 # This originates from X11R5 (mit/util/scripts/install.sh), which was
6 # later released in X11R6 (xc/config/util/install.sh) with the
7 # following copyright and license.
8 #
9 # Copyright (C) 1994 X Consortium
10 #
11 # Permission is hereby granted, free of charge, to any person obtaining a copy
12 # of this software and associated documentation files (the "Software"), to
13 # deal in the Software without restriction, including without limitation the
14 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15 # sell copies of the Software, and to permit persons to whom the Software is
16 # furnished to do so, subject to the following conditions:
17 #
18 # The above copyright notice and this permission notice shall be included in
19 # all copies or substantial portions of the Software.
20 #
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
25 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
26 # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #
28 # Except as contained in this notice, the name of the X Consortium shall not
29 # be used in advertising or otherwise to promote the sale, use or other deal-
30 # ings in this Software without prior written authorization from the X Consor-
31 # tium.
32 #
33 #
34 # FSF changes to this file are in the public domain.
35 #
36 # Calling this script install-sh is preferred over install.sh, to prevent
37 # `make' implicit rules from creating a file called install from it
38 # when there is no Makefile.
39 #
40 # This script is compatible with the BSD install script, but was written
41 # from scratch.
42
43 nl='
44 '
45 IFS=" "" $nl"
46
47 # set DOITPROG to echo to test this script
48
49 # Don't use :- since 4.3BSD and earlier shells don't like it.
50 doit=${DOITPROG-}
51 if test -z "$doit"; then
52 doit_exec=exec
53 else
54 doit_exec=$doit
55 fi
56
57 # Put in absolute file names if you don't have them in your path;
58 # or use environment vars.
59
60 chgrpprog=${CHGRPPROG-chgrp}
61 chmodprog=${CHMODPROG-chmod}
62 chownprog=${CHOWNPROG-chown}
63 cmpprog=${CMPPROG-cmp}
64 cpprog=${CPPROG-cp}
65 mkdirprog=${MKDIRPROG-mkdir}
66 mvprog=${MVPROG-mv}
67 rmprog=${RMPROG-rm}
68 stripprog=${STRIPPROG-strip}
69
70 posix_glob='?'
71 initialize_posix_glob='
72 test "$posix_glob" != "?" || {
73 if (set -f) 2>/dev/null; then
74 posix_glob=
75 else
76 posix_glob=:
77 fi
78 }
79 '
80
81 posix_mkdir=
82
83 # Desired mode of installed file.
84 mode=0755
85
86 chgrpcmd=
87 chmodcmd=$chmodprog
88 chowncmd=
89 mvcmd=$mvprog
90 rmcmd="$rmprog -f"
91 stripcmd=
92
93 src=
94 dst=
95 dir_arg=
96 dst_arg=
97
98 copy_on_change=false
99 no_target_directory=
100
101 usage="\
102 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
103 or: $0 [OPTION]... SRCFILES... DIRECTORY
104 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
105 or: $0 [OPTION]... -d DIRECTORIES...
106
107 In the 1st form, copy SRCFILE to DSTFILE.
108 In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
109 In the 4th, create DIRECTORIES.
110
111 Options:
112 --help display this help and exit.
113 --version display version info and exit.
114
115 -c (ignored)
116 -C install only if different (preserve the last data modification time)
117 -d create directories instead of installing files.
118 -g GROUP $chgrpprog installed files to GROUP.
119 -m MODE $chmodprog installed files to MODE.
120 -o USER $chownprog installed files to USER.
121 -s $stripprog installed files.
122 -t DIRECTORY install into DIRECTORY.
123 -T report an error if DSTFILE is a directory.
124
125 Environment variables override the default commands:
126 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
127 RMPROG STRIPPROG
128 "
129
130 while test $# -ne 0; do
131 case $1 in
132 -c) ;;
133
134 -C) copy_on_change=true;;
135
136 -d) dir_arg=true;;
137
138 -g) chgrpcmd="$chgrpprog $2"
139 shift;;
140
141 --help) echo "$usage"; exit $?;;
142
143 -m) mode=$2
144 case $mode in
145 *' '* | *' '* | *'
146 '* | *'*'* | *'?'* | *'['*)
147 echo "$0: invalid mode: $mode" >&2
148 exit 1;;
149 esac
150 shift;;
151
152 -o) chowncmd="$chownprog $2"
153 shift;;
154
155 -s) stripcmd=$stripprog;;
156
157 -t) dst_arg=$2
158 shift;;
159
160 -T) no_target_directory=true;;
161
162 --version) echo "$0 $scriptversion"; exit $?;;
163
164 --) shift
165 break;;
166
167 -*) echo "$0: invalid option: $1" >&2
168 exit 1;;
169
170 *) break;;
171 esac
172 shift
173 done
174
175 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
176 # When -d is used, all remaining arguments are directories to create.
177 # When -t is used, the destination is already specified.
178 # Otherwise, the last argument is the destination. Remove it from $@.
179 for arg
180 do
181 if test -n "$dst_arg"; then
182 # $@ is not empty: it contains at least $arg.
183 set fnord "$@" "$dst_arg"
184 shift # fnord
185 fi
186 shift # arg
187 dst_arg=$arg
188 done
189 fi
190
191 if test $# -eq 0; then
192 if test -z "$dir_arg"; then
193 echo "$0: no input file specified." >&2
194 exit 1
195 fi
196 # It's OK to call `install-sh -d' without argument.
197 # This can happen when creating conditional directories.
198 exit 0
199 fi
200
201 if test -z "$dir_arg"; then
202 trap '(exit $?); exit' 1 2 13 15
203
204 # Set umask so as not to create temps with too-generous modes.
205 # However, 'strip' requires both read and write access to temps.
206 case $mode in
207 # Optimize common cases.
208 *644) cp_umask=133;;
209 *755) cp_umask=22;;
210
211 *[0-7])
212 if test -z "$stripcmd"; then
213 u_plus_rw=
214 else
215 u_plus_rw='% 200'
216 fi
217 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
218 *)
219 if test -z "$stripcmd"; then
220 u_plus_rw=
221 else
222 u_plus_rw=,u+rw
223 fi
224 cp_umask=$mode$u_plus_rw;;
225 esac
226 fi
227
228 for src
229 do
230 # Protect names starting with `-'.
231 case $src in
232 -*) src=./$src;;
233 esac
234
235 if test -n "$dir_arg"; then
236 dst=$src
237 dstdir=$dst
238 test -d "$dstdir"
239 dstdir_status=$?
240 else
241
242 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
243 # might cause directories to be created, which would be especially bad
244 # if $src (and thus $dsttmp) contains '*'.
245 if test ! -f "$src" && test ! -d "$src"; then
246 echo "$0: $src does not exist." >&2
247 exit 1
248 fi
249
250 if test -z "$dst_arg"; then
251 echo "$0: no destination specified." >&2
252 exit 1
253 fi
254
255 dst=$dst_arg
256 # Protect names starting with `-'.
257 case $dst in
258 -*) dst=./$dst;;
259 esac
260
261 # If destination is a directory, append the input filename; won't work
262 # if double slashes aren't ignored.
263 if test -d "$dst"; then
264 if test -n "$no_target_directory"; then
265 echo "$0: $dst_arg: Is a directory" >&2
266 exit 1
267 fi
268 dstdir=$dst
269 dst=$dstdir/`basename "$src"`
270 dstdir_status=0
271 else
272 # Prefer dirname, but fall back on a substitute if dirname fails.
273 dstdir=`
274 (dirname "$dst") 2>/dev/null ||
275 expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
276 X"$dst" : 'X\(//\)[^/]' \| \
277 X"$dst" : 'X\(//\)$' \| \
278 X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
279 echo X"$dst" |
280 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
281 s//\1/
282 q
283 }
284 /^X\(\/\/\)[^/].*/{
285 s//\1/
286 q
287 }
288 /^X\(\/\/\)$/{
289 s//\1/
290 q
291 }
292 /^X\(\/\).*/{
293 s//\1/
294 q
295 }
296 s/.*/./; q'
297 `
298
299 test -d "$dstdir"
300 dstdir_status=$?
301 fi
302 fi
303
304 obsolete_mkdir_used=false
305
306 if test $dstdir_status != 0; then
307 case $posix_mkdir in
308 '')
309 # Create intermediate dirs using mode 755 as modified by the umask.
310 # This is like FreeBSD 'install' as of 1997-10-28.
311 umask=`umask`
312 case $stripcmd.$umask in
313 # Optimize common cases.
314 *[2367][2367]) mkdir_umask=$umask;;
315 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
316
317 *[0-7])
318 mkdir_umask=`expr $umask + 22 \
319 - $umask % 100 % 40 + $umask % 20 \
320 - $umask % 10 % 4 + $umask % 2
321 `;;
322 *) mkdir_umask=$umask,go-w;;
323 esac
324
325 # With -d, create the new directory with the user-specified mode.
326 # Otherwise, rely on $mkdir_umask.
327 if test -n "$dir_arg"; then
328 mkdir_mode=-m$mode
329 else
330 mkdir_mode=
331 fi
332
333 posix_mkdir=false
334 case $umask in
335 *[123567][0-7][0-7])
336 # POSIX mkdir -p sets u+wx bits regardless of umask, which
337 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
338 ;;
339 *)
340 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
341 trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
342
343 if (umask $mkdir_umask &&
344 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
345 then
346 if test -z "$dir_arg" || {
347 # Check for POSIX incompatibilities with -m.
348 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
349 # other-writeable bit of parent directory when it shouldn't.
350 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
351 ls_ld_tmpdir=`ls -ld "$tmpdir"`
352 case $ls_ld_tmpdir in
353 d????-?r-*) different_mode=700;;
354 d????-?--*) different_mode=755;;
355 *) false;;
356 esac &&
357 $mkdirprog -m$different_mode -p -- "$tmpdir" && {
358 ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
359 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
360 }
361 }
362 then posix_mkdir=:
363 fi
364 rmdir "$tmpdir/d" "$tmpdir"
365 else
366 # Remove any dirs left behind by ancient mkdir implementations.
367 rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
368 fi
369 trap '' 0;;
370 esac;;
371 esac
372
373 if
374 $posix_mkdir && (
375 umask $mkdir_umask &&
376 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
377 )
378 then :
379 else
380
381 # The umask is ridiculous, or mkdir does not conform to POSIX,
382 # or it failed possibly due to a race condition. Create the
383 # directory the slow way, step by step, checking for races as we go.
384
385 case $dstdir in
386 /*) prefix='/';;
387 -*) prefix='./';;
388 *) prefix='';;
389 esac
390
391 eval "$initialize_posix_glob"
392
393 oIFS=$IFS
394 IFS=/
395 $posix_glob set -f
396 set fnord $dstdir
397 shift
398 $posix_glob set +f
399 IFS=$oIFS
400
401 prefixes=
402
403 for d
404 do
405 test -z "$d" && continue
406
407 prefix=$prefix$d
408 if test -d "$prefix"; then
409 prefixes=
410 else
411 if $posix_mkdir; then
412 (umask=$mkdir_umask &&
413 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
414 # Don't fail if two instances are running concurrently.
415 test -d "$prefix" || exit 1
416 else
417 case $prefix in
418 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
419 *) qprefix=$prefix;;
420 esac
421 prefixes="$prefixes '$qprefix'"
422 fi
423 fi
424 prefix=$prefix/
425 done
426
427 if test -n "$prefixes"; then
428 # Don't fail if two instances are running concurrently.
429 (umask $mkdir_umask &&
430 eval "\$doit_exec \$mkdirprog $prefixes") ||
431 test -d "$dstdir" || exit 1
432 obsolete_mkdir_used=true
433 fi
434 fi
435 fi
436
437 if test -n "$dir_arg"; then
438 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
439 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
440 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
441 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
442 else
443
444 # Make a couple of temp file names in the proper directory.
445 dsttmp=$dstdir/_inst.$$_
446 rmtmp=$dstdir/_rm.$$_
447
448 # Trap to clean up those temp files at exit.
449 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
450
451 # Copy the file name to the temp name.
452 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
453
454 # and set any options; do chmod last to preserve setuid bits.
455 #
456 # If any of these fail, we abort the whole thing. If we want to
457 # ignore errors from any of these, just make sure not to ignore
458 # errors from the above "$doit $cpprog $src $dsttmp" command.
459 #
460 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
461 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
462 { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
463 { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
464
465 # If -C, don't bother to copy if it wouldn't change the file.
466 if $copy_on_change &&
467 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
468 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
469
470 eval "$initialize_posix_glob" &&
471 $posix_glob set -f &&
472 set X $old && old=:$2:$4:$5:$6 &&
473 set X $new && new=:$2:$4:$5:$6 &&
474 $posix_glob set +f &&
475
476 test "$old" = "$new" &&
477 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
478 then
479 rm -f "$dsttmp"
480 else
481 # Rename the file to the real destination.
482 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
483
484 # The rename failed, perhaps because mv can't rename something else
485 # to itself, or perhaps because mv is so ancient that it does not
486 # support -f.
487 {
488 # Now remove or move aside any old file at destination location.
489 # We try this two ways since rm can't unlink itself on some
490 # systems and the destination file might be busy for other
491 # reasons. In this case, the final cleanup might fail but the new
492 # file should still install successfully.
493 {
494 test ! -f "$dst" ||
495 $doit $rmcmd -f "$dst" 2>/dev/null ||
496 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
497 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
498 } ||
499 { echo "$0: cannot unlink or rename $dst" >&2
500 (exit 1); exit 1
501 }
502 } &&
503
504 # Now rename the file to the real destination.
505 $doit $mvcmd "$dsttmp" "$dst"
506 }
507 fi || exit 1
508
509 trap '' 0
510 fi
511 done
512
513 # Local variables:
514 # eval: (add-hook 'write-file-hooks 'time-stamp)
515 # time-stamp-start: "scriptversion="
516 # time-stamp-format: "%:y-%02m-%02d.%02H"
517 # time-stamp-time-zone: "UTC"
518 # time-stamp-end: "; # UTC"
519 # End:
0 # Generated from ltmain.m4sh.
1
2 # ltmain.sh (GNU libtool) 2.2.6b
3 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4
5 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
6 # This is free software; see the source for copying conditions. There is NO
7 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8
9 # GNU Libtool is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
13 #
14 # As a special exception to the GNU General Public License,
15 # if you distribute this file as part of a program or library that
16 # is built using GNU Libtool, you may include this file under the
17 # same distribution terms that you use for the rest of that program.
18 #
19 # GNU Libtool is distributed in the hope that it will be useful, but
20 # WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 # General Public License for more details.
23 #
24 # You should have received a copy of the GNU General Public License
25 # along with GNU Libtool; see the file COPYING. If not, a copy
26 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
27 # or obtained by writing to the Free Software Foundation, Inc.,
28 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29
30 # Usage: $progname [OPTION]... [MODE-ARG]...
31 #
32 # Provide generalized library-building support services.
33 #
34 # --config show all configuration variables
35 # --debug enable verbose shell tracing
36 # -n, --dry-run display commands without modifying any files
37 # --features display basic configuration information and exit
38 # --mode=MODE use operation mode MODE
39 # --preserve-dup-deps don't remove duplicate dependency libraries
40 # --quiet, --silent don't print informational messages
41 # --tag=TAG use configuration variables from tag TAG
42 # -v, --verbose print informational messages (default)
43 # --version print version information
44 # -h, --help print short or long help message
45 #
46 # MODE must be one of the following:
47 #
48 # clean remove files from the build directory
49 # compile compile a source file into a libtool object
50 # execute automatically set library path, then run a program
51 # finish complete the installation of libtool libraries
52 # install install libraries or executables
53 # link create a library or an executable
54 # uninstall remove libraries from an installed directory
55 #
56 # MODE-ARGS vary depending on the MODE.
57 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
58 #
59 # When reporting a bug, please describe a test case to reproduce it and
60 # include the following information:
61 #
62 # host-triplet: $host
63 # shell: $SHELL
64 # compiler: $LTCC
65 # compiler flags: $LTCFLAGS
66 # linker: $LD (gnu? $with_gnu_ld)
67 # $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1
68 # automake: $automake_version
69 # autoconf: $autoconf_version
70 #
71 # Report bugs to <bug-libtool@gnu.org>.
72
73 PROGRAM=ltmain.sh
74 PACKAGE=libtool
75 VERSION="2.2.6b Debian-2.2.6b-2ubuntu1"
76 TIMESTAMP=""
77 package_revision=1.3017
78
79 # Be Bourne compatible
80 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
81 emulate sh
82 NULLCMD=:
83 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
84 # is contrary to our usage. Disable this feature.
85 alias -g '${1+"$@"}'='"$@"'
86 setopt NO_GLOB_SUBST
87 else
88 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
89 fi
90 BIN_SH=xpg4; export BIN_SH # for Tru64
91 DUALCASE=1; export DUALCASE # for MKS sh
92
93 # NLS nuisances: We save the old values to restore during execute mode.
94 # Only set LANG and LC_ALL to C if already set.
95 # These must not be set unconditionally because not all systems understand
96 # e.g. LANG=C (notably SCO).
97 lt_user_locale=
98 lt_safe_locale=
99 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
100 do
101 eval "if test \"\${$lt_var+set}\" = set; then
102 save_$lt_var=\$$lt_var
103 $lt_var=C
104 export $lt_var
105 lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
106 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
107 fi"
108 done
109
110 $lt_unset CDPATH
111
112
113
114
115
116 : ${CP="cp -f"}
117 : ${ECHO="echo"}
118 : ${EGREP="/bin/grep -E"}
119 : ${FGREP="/bin/grep -F"}
120 : ${GREP="/bin/grep"}
121 : ${LN_S="ln -s"}
122 : ${MAKE="make"}
123 : ${MKDIR="mkdir"}
124 : ${MV="mv -f"}
125 : ${RM="rm -f"}
126 : ${SED="/bin/sed"}
127 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
128 : ${Xsed="$SED -e 1s/^X//"}
129
130 # Global variables:
131 EXIT_SUCCESS=0
132 EXIT_FAILURE=1
133 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
134 EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
135
136 exit_status=$EXIT_SUCCESS
137
138 # Make sure IFS has a sensible default
139 lt_nl='
140 '
141 IFS=" $lt_nl"
142
143 dirname="s,/[^/]*$,,"
144 basename="s,^.*/,,"
145
146 # func_dirname_and_basename file append nondir_replacement
147 # perform func_basename and func_dirname in a single function
148 # call:
149 # dirname: Compute the dirname of FILE. If nonempty,
150 # add APPEND to the result, otherwise set result
151 # to NONDIR_REPLACEMENT.
152 # value returned in "$func_dirname_result"
153 # basename: Compute filename of FILE.
154 # value retuned in "$func_basename_result"
155 # Implementation must be kept synchronized with func_dirname
156 # and func_basename. For efficiency, we do not delegate to
157 # those functions but instead duplicate the functionality here.
158 func_dirname_and_basename ()
159 {
160 # Extract subdirectory from the argument.
161 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
162 if test "X$func_dirname_result" = "X${1}"; then
163 func_dirname_result="${3}"
164 else
165 func_dirname_result="$func_dirname_result${2}"
166 fi
167 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
168 }
169
170 # Generated shell functions inserted here.
171
172 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
173 # is ksh but when the shell is invoked as "sh" and the current value of
174 # the _XPG environment variable is not equal to 1 (one), the special
175 # positional parameter $0, within a function call, is the name of the
176 # function.
177 progpath="$0"
178
179 # The name of this program:
180 # In the unlikely event $progname began with a '-', it would play havoc with
181 # func_echo (imagine progname=-n), so we prepend ./ in that case:
182 func_dirname_and_basename "$progpath"
183 progname=$func_basename_result
184 case $progname in
185 -*) progname=./$progname ;;
186 esac
187
188 # Make sure we have an absolute path for reexecution:
189 case $progpath in
190 [\\/]*|[A-Za-z]:\\*) ;;
191 *[\\/]*)
192 progdir=$func_dirname_result
193 progdir=`cd "$progdir" && pwd`
194 progpath="$progdir/$progname"
195 ;;
196 *)
197 save_IFS="$IFS"
198 IFS=:
199 for progdir in $PATH; do
200 IFS="$save_IFS"
201 test -x "$progdir/$progname" && break
202 done
203 IFS="$save_IFS"
204 test -n "$progdir" || progdir=`pwd`
205 progpath="$progdir/$progname"
206 ;;
207 esac
208
209 # Sed substitution that helps us do robust quoting. It backslashifies
210 # metacharacters that are still active within double-quoted strings.
211 Xsed="${SED}"' -e 1s/^X//'
212 sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
213
214 # Same as above, but do not quote variable references.
215 double_quote_subst='s/\(["`\\]\)/\\\1/g'
216
217 # Re-`\' parameter expansions in output of double_quote_subst that were
218 # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
219 # in input to double_quote_subst, that '$' was protected from expansion.
220 # Since each input `\' is now two `\'s, look for any number of runs of
221 # four `\'s followed by two `\'s and then a '$'. `\' that '$'.
222 bs='\\'
223 bs2='\\\\'
224 bs4='\\\\\\\\'
225 dollar='\$'
226 sed_double_backslash="\
227 s/$bs4/&\\
228 /g
229 s/^$bs2$dollar/$bs&/
230 s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
231 s/\n//g"
232
233 # Standard options:
234 opt_dry_run=false
235 opt_help=false
236 opt_quiet=false
237 opt_verbose=false
238 opt_warning=:
239
240 # func_echo arg...
241 # Echo program name prefixed message, along with the current mode
242 # name if it has been set yet.
243 func_echo ()
244 {
245 $ECHO "$progname${mode+: }$mode: $*"
246 }
247
248 # func_verbose arg...
249 # Echo program name prefixed message in verbose mode only.
250 func_verbose ()
251 {
252 $opt_verbose && func_echo ${1+"$@"}
253
254 # A bug in bash halts the script if the last line of a function
255 # fails when set -e is in force, so we need another command to
256 # work around that:
257 :
258 }
259
260 # func_error arg...
261 # Echo program name prefixed message to standard error.
262 func_error ()
263 {
264 $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
265 }
266
267 # func_warning arg...
268 # Echo program name prefixed warning message to standard error.
269 func_warning ()
270 {
271 $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
272
273 # bash bug again:
274 :
275 }
276
277 # func_fatal_error arg...
278 # Echo program name prefixed message to standard error, and exit.
279 func_fatal_error ()
280 {
281 func_error ${1+"$@"}
282 exit $EXIT_FAILURE
283 }
284
285 # func_fatal_help arg...
286 # Echo program name prefixed message to standard error, followed by
287 # a help hint, and exit.
288 func_fatal_help ()
289 {
290 func_error ${1+"$@"}
291 func_fatal_error "$help"
292 }
293 help="Try \`$progname --help' for more information." ## default
294
295
296 # func_grep expression filename
297 # Check whether EXPRESSION matches any line of FILENAME, without output.
298 func_grep ()
299 {
300 $GREP "$1" "$2" >/dev/null 2>&1
301 }
302
303
304 # func_mkdir_p directory-path
305 # Make sure the entire path to DIRECTORY-PATH is available.
306 func_mkdir_p ()
307 {
308 my_directory_path="$1"
309 my_dir_list=
310
311 if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
312
313 # Protect directory names starting with `-'
314 case $my_directory_path in
315 -*) my_directory_path="./$my_directory_path" ;;
316 esac
317
318 # While some portion of DIR does not yet exist...
319 while test ! -d "$my_directory_path"; do
320 # ...make a list in topmost first order. Use a colon delimited
321 # list incase some portion of path contains whitespace.
322 my_dir_list="$my_directory_path:$my_dir_list"
323
324 # If the last portion added has no slash in it, the list is done
325 case $my_directory_path in */*) ;; *) break ;; esac
326
327 # ...otherwise throw away the child directory and loop
328 my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
329 done
330 my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
331
332 save_mkdir_p_IFS="$IFS"; IFS=':'
333 for my_dir in $my_dir_list; do
334 IFS="$save_mkdir_p_IFS"
335 # mkdir can fail with a `File exist' error if two processes
336 # try to create one of the directories concurrently. Don't
337 # stop in that case!
338 $MKDIR "$my_dir" 2>/dev/null || :
339 done
340 IFS="$save_mkdir_p_IFS"
341
342 # Bail out if we (or some other process) failed to create a directory.
343 test -d "$my_directory_path" || \
344 func_fatal_error "Failed to create \`$1'"
345 fi
346 }
347
348
349 # func_mktempdir [string]
350 # Make a temporary directory that won't clash with other running
351 # libtool processes, and avoids race conditions if possible. If
352 # given, STRING is the basename for that directory.
353 func_mktempdir ()
354 {
355 my_template="${TMPDIR-/tmp}/${1-$progname}"
356
357 if test "$opt_dry_run" = ":"; then
358 # Return a directory name, but don't create it in dry-run mode
359 my_tmpdir="${my_template}-$$"
360 else
361
362 # If mktemp works, use that first and foremost
363 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
364
365 if test ! -d "$my_tmpdir"; then
366 # Failing that, at least try and use $RANDOM to avoid a race
367 my_tmpdir="${my_template}-${RANDOM-0}$$"
368
369 save_mktempdir_umask=`umask`
370 umask 0077
371 $MKDIR "$my_tmpdir"
372 umask $save_mktempdir_umask
373 fi
374
375 # If we're not in dry-run mode, bomb out on failure
376 test -d "$my_tmpdir" || \
377 func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
378 fi
379
380 $ECHO "X$my_tmpdir" | $Xsed
381 }
382
383
384 # func_quote_for_eval arg
385 # Aesthetically quote ARG to be evaled later.
386 # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
387 # is double-quoted, suitable for a subsequent eval, whereas
388 # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
389 # which are still active within double quotes backslashified.
390 func_quote_for_eval ()
391 {
392 case $1 in
393 *[\\\`\"\$]*)
394 func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
395 *)
396 func_quote_for_eval_unquoted_result="$1" ;;
397 esac
398
399 case $func_quote_for_eval_unquoted_result in
400 # Double-quote args containing shell metacharacters to delay
401 # word splitting, command substitution and and variable
402 # expansion for a subsequent eval.
403 # Many Bourne shells cannot handle close brackets correctly
404 # in scan sets, so we specify it separately.
405 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
406 func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
407 ;;
408 *)
409 func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
410 esac
411 }
412
413
414 # func_quote_for_expand arg
415 # Aesthetically quote ARG to be evaled later; same as above,
416 # but do not quote variable references.
417 func_quote_for_expand ()
418 {
419 case $1 in
420 *[\\\`\"]*)
421 my_arg=`$ECHO "X$1" | $Xsed \
422 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
423 *)
424 my_arg="$1" ;;
425 esac
426
427 case $my_arg in
428 # Double-quote args containing shell metacharacters to delay
429 # word splitting and command substitution for a subsequent eval.
430 # Many Bourne shells cannot handle close brackets correctly
431 # in scan sets, so we specify it separately.
432 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
433 my_arg="\"$my_arg\""
434 ;;
435 esac
436
437 func_quote_for_expand_result="$my_arg"
438 }
439
440
441 # func_show_eval cmd [fail_exp]
442 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
443 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
444 # is given, then evaluate it.
445 func_show_eval ()
446 {
447 my_cmd="$1"
448 my_fail_exp="${2-:}"
449
450 ${opt_silent-false} || {
451 func_quote_for_expand "$my_cmd"
452 eval "func_echo $func_quote_for_expand_result"
453 }
454
455 if ${opt_dry_run-false}; then :; else
456 eval "$my_cmd"
457 my_status=$?
458 if test "$my_status" -eq 0; then :; else
459 eval "(exit $my_status); $my_fail_exp"
460 fi
461 fi
462 }
463
464
465 # func_show_eval_locale cmd [fail_exp]
466 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
467 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
468 # is given, then evaluate it. Use the saved locale for evaluation.
469 func_show_eval_locale ()
470 {
471 my_cmd="$1"
472 my_fail_exp="${2-:}"
473
474 ${opt_silent-false} || {
475 func_quote_for_expand "$my_cmd"
476 eval "func_echo $func_quote_for_expand_result"
477 }
478
479 if ${opt_dry_run-false}; then :; else
480 eval "$lt_user_locale
481 $my_cmd"
482 my_status=$?
483 eval "$lt_safe_locale"
484 if test "$my_status" -eq 0; then :; else
485 eval "(exit $my_status); $my_fail_exp"
486 fi
487 fi
488 }
489
490
491
492
493
494 # func_version
495 # Echo version message to standard output and exit.
496 func_version ()
497 {
498 $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
499 s/^# //
500 s/^# *$//
501 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
502 p
503 }' < "$progpath"
504 exit $?
505 }
506
507 # func_usage
508 # Echo short help message to standard output and exit.
509 func_usage ()
510 {
511 $SED -n '/^# Usage:/,/# -h/ {
512 s/^# //
513 s/^# *$//
514 s/\$progname/'$progname'/
515 p
516 }' < "$progpath"
517 $ECHO
518 $ECHO "run \`$progname --help | more' for full usage"
519 exit $?
520 }
521
522 # func_help
523 # Echo long help message to standard output and exit.
524 func_help ()
525 {
526 $SED -n '/^# Usage:/,/# Report bugs to/ {
527 s/^# //
528 s/^# *$//
529 s*\$progname*'$progname'*
530 s*\$host*'"$host"'*
531 s*\$SHELL*'"$SHELL"'*
532 s*\$LTCC*'"$LTCC"'*
533 s*\$LTCFLAGS*'"$LTCFLAGS"'*
534 s*\$LD*'"$LD"'*
535 s/\$with_gnu_ld/'"$with_gnu_ld"'/
536 s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
537 s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
538 p
539 }' < "$progpath"
540 exit $?
541 }
542
543 # func_missing_arg argname
544 # Echo program name prefixed message to standard error and set global
545 # exit_cmd.
546 func_missing_arg ()
547 {
548 func_error "missing argument for $1"
549 exit_cmd=exit
550 }
551
552 exit_cmd=:
553
554
555
556
557
558 # Check that we have a working $ECHO.
559 if test "X$1" = X--no-reexec; then
560 # Discard the --no-reexec flag, and continue.
561 shift
562 elif test "X$1" = X--fallback-echo; then
563 # Avoid inline document here, it may be left over
564 :
565 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
566 # Yippee, $ECHO works!
567 :
568 else
569 # Restart under the correct shell, and then maybe $ECHO will work.
570 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
571 fi
572
573 if test "X$1" = X--fallback-echo; then
574 # used as fallback echo
575 shift
576 cat <<EOF
577 $*
578 EOF
579 exit $EXIT_SUCCESS
580 fi
581
582 magic="%%%MAGIC variable%%%"
583 magic_exe="%%%MAGIC EXE variable%%%"
584
585 # Global variables.
586 # $mode is unset
587 nonopt=
588 execute_dlfiles=
589 preserve_args=
590 lo2o="s/\\.lo\$/.${objext}/"
591 o2lo="s/\\.${objext}\$/.lo/"
592 extracted_archives=
593 extracted_serial=0
594
595 opt_dry_run=false
596 opt_duplicate_deps=false
597 opt_silent=false
598 opt_debug=:
599
600 # If this variable is set in any of the actions, the command in it
601 # will be execed at the end. This prevents here-documents from being
602 # left over by shells.
603 exec_cmd=
604
605 # func_fatal_configuration arg...
606 # Echo program name prefixed message to standard error, followed by
607 # a configuration failure hint, and exit.
608 func_fatal_configuration ()
609 {
610 func_error ${1+"$@"}
611 func_error "See the $PACKAGE documentation for more information."
612 func_fatal_error "Fatal configuration error."
613 }
614
615
616 # func_config
617 # Display the configuration for all the tags in this script.
618 func_config ()
619 {
620 re_begincf='^# ### BEGIN LIBTOOL'
621 re_endcf='^# ### END LIBTOOL'
622
623 # Default configuration.
624 $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
625
626 # Now print the configurations for the tags.
627 for tagname in $taglist; do
628 $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
629 done
630
631 exit $?
632 }
633
634 # func_features
635 # Display the features supported by this script.
636 func_features ()
637 {
638 $ECHO "host: $host"
639 if test "$build_libtool_libs" = yes; then
640 $ECHO "enable shared libraries"
641 else
642 $ECHO "disable shared libraries"
643 fi
644 if test "$build_old_libs" = yes; then
645 $ECHO "enable static libraries"
646 else
647 $ECHO "disable static libraries"
648 fi
649
650 exit $?
651 }
652
653 # func_enable_tag tagname
654 # Verify that TAGNAME is valid, and either flag an error and exit, or
655 # enable the TAGNAME tag. We also add TAGNAME to the global $taglist
656 # variable here.
657 func_enable_tag ()
658 {
659 # Global variable:
660 tagname="$1"
661
662 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
663 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
664 sed_extractcf="/$re_begincf/,/$re_endcf/p"
665
666 # Validate tagname.
667 case $tagname in
668 *[!-_A-Za-z0-9,/]*)
669 func_fatal_error "invalid tag name: $tagname"
670 ;;
671 esac
672
673 # Don't test for the "default" C tag, as we know it's
674 # there but not specially marked.
675 case $tagname in
676 CC) ;;
677 *)
678 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
679 taglist="$taglist $tagname"
680
681 # Evaluate the configuration. Be careful to quote the path
682 # and the sed script, to avoid splitting on whitespace, but
683 # also don't use non-portable quotes within backquotes within
684 # quotes we have to do it in 2 steps:
685 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
686 eval "$extractedcf"
687 else
688 func_error "ignoring unknown tag $tagname"
689 fi
690 ;;
691 esac
692 }
693
694 # Parse options once, thoroughly. This comes as soon as possible in
695 # the script to make things like `libtool --version' happen quickly.
696 {
697
698 # Shorthand for --mode=foo, only valid as the first argument
699 case $1 in
700 clean|clea|cle|cl)
701 shift; set dummy --mode clean ${1+"$@"}; shift
702 ;;
703 compile|compil|compi|comp|com|co|c)
704 shift; set dummy --mode compile ${1+"$@"}; shift
705 ;;
706 execute|execut|execu|exec|exe|ex|e)
707 shift; set dummy --mode execute ${1+"$@"}; shift
708 ;;
709 finish|finis|fini|fin|fi|f)
710 shift; set dummy --mode finish ${1+"$@"}; shift
711 ;;
712 install|instal|insta|inst|ins|in|i)
713 shift; set dummy --mode install ${1+"$@"}; shift
714 ;;
715 link|lin|li|l)
716 shift; set dummy --mode link ${1+"$@"}; shift
717 ;;
718 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
719 shift; set dummy --mode uninstall ${1+"$@"}; shift
720 ;;
721 esac
722
723 # Parse non-mode specific arguments:
724 while test "$#" -gt 0; do
725 opt="$1"
726 shift
727
728 case $opt in
729 --config) func_config ;;
730
731 --debug) preserve_args="$preserve_args $opt"
732 func_echo "enabling shell trace mode"
733 opt_debug='set -x'
734 $opt_debug
735 ;;
736
737 -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
738 execute_dlfiles="$execute_dlfiles $1"
739 shift
740 ;;
741
742 --dry-run | -n) opt_dry_run=: ;;
743 --features) func_features ;;
744 --finish) mode="finish" ;;
745
746 --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
747 case $1 in
748 # Valid mode arguments:
749 clean) ;;
750 compile) ;;
751 execute) ;;
752 finish) ;;
753 install) ;;
754 link) ;;
755 relink) ;;
756 uninstall) ;;
757
758 # Catch anything else as an error
759 *) func_error "invalid argument for $opt"
760 exit_cmd=exit
761 break
762 ;;
763 esac
764
765 mode="$1"
766 shift
767 ;;
768
769 --preserve-dup-deps)
770 opt_duplicate_deps=: ;;
771
772 --quiet|--silent) preserve_args="$preserve_args $opt"
773 opt_silent=:
774 ;;
775
776 --verbose| -v) preserve_args="$preserve_args $opt"
777 opt_silent=false
778 ;;
779
780 --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
781 preserve_args="$preserve_args $opt $1"
782 func_enable_tag "$1" # tagname is set here
783 shift
784 ;;
785
786 # Separate optargs to long options:
787 -dlopen=*|--mode=*|--tag=*)
788 func_opt_split "$opt"
789 set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
790 shift
791 ;;
792
793 -\?|-h) func_usage ;;
794 --help) opt_help=: ;;
795 --version) func_version ;;
796
797 -*) func_fatal_help "unrecognized option \`$opt'" ;;
798
799 *) nonopt="$opt"
800 break
801 ;;
802 esac
803 done
804
805
806 case $host in
807 *cygwin* | *mingw* | *pw32* | *cegcc*)
808 # don't eliminate duplications in $postdeps and $predeps
809 opt_duplicate_compiler_generated_deps=:
810 ;;
811 *)
812 opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
813 ;;
814 esac
815
816 # Having warned about all mis-specified options, bail out if
817 # anything was wrong.
818 $exit_cmd $EXIT_FAILURE
819 }
820
821 # func_check_version_match
822 # Ensure that we are using m4 macros, and libtool script from the same
823 # release of libtool.
824 func_check_version_match ()
825 {
826 if test "$package_revision" != "$macro_revision"; then
827 if test "$VERSION" != "$macro_version"; then
828 if test -z "$macro_version"; then
829 cat >&2 <<_LT_EOF
830 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
831 $progname: definition of this LT_INIT comes from an older release.
832 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
833 $progname: and run autoconf again.
834 _LT_EOF
835 else
836 cat >&2 <<_LT_EOF
837 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
838 $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
839 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
840 $progname: and run autoconf again.
841 _LT_EOF
842 fi
843 else
844 cat >&2 <<_LT_EOF
845 $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
846 $progname: but the definition of this LT_INIT comes from revision $macro_revision.
847 $progname: You should recreate aclocal.m4 with macros from revision $package_revision
848 $progname: of $PACKAGE $VERSION and run autoconf again.
849 _LT_EOF
850 fi
851
852 exit $EXIT_MISMATCH
853 fi
854 }
855
856
857 ## ----------- ##
858 ## Main. ##
859 ## ----------- ##
860
861 $opt_help || {
862 # Sanity checks first:
863 func_check_version_match
864
865 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
866 func_fatal_configuration "not configured to build any kind of library"
867 fi
868
869 test -z "$mode" && func_fatal_error "error: you must specify a MODE."
870
871
872 # Darwin sucks
873 eval std_shrext=\"$shrext_cmds\"
874
875
876 # Only execute mode is allowed to have -dlopen flags.
877 if test -n "$execute_dlfiles" && test "$mode" != execute; then
878 func_error "unrecognized option \`-dlopen'"
879 $ECHO "$help" 1>&2
880 exit $EXIT_FAILURE
881 fi
882
883 # Change the help message to a mode-specific one.
884 generic_help="$help"
885 help="Try \`$progname --help --mode=$mode' for more information."
886 }
887
888
889 # func_lalib_p file
890 # True iff FILE is a libtool `.la' library or `.lo' object file.
891 # This function is only a basic sanity check; it will hardly flush out
892 # determined imposters.
893 func_lalib_p ()
894 {
895 test -f "$1" &&
896 $SED -e 4q "$1" 2>/dev/null \
897 | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
898 }
899
900 # func_lalib_unsafe_p file
901 # True iff FILE is a libtool `.la' library or `.lo' object file.
902 # This function implements the same check as func_lalib_p without
903 # resorting to external programs. To this end, it redirects stdin and
904 # closes it afterwards, without saving the original file descriptor.
905 # As a safety measure, use it only where a negative result would be
906 # fatal anyway. Works if `file' does not exist.
907 func_lalib_unsafe_p ()
908 {
909 lalib_p=no
910 if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
911 for lalib_p_l in 1 2 3 4
912 do
913 read lalib_p_line
914 case "$lalib_p_line" in
915 \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
916 esac
917 done
918 exec 0<&5 5<&-
919 fi
920 test "$lalib_p" = yes
921 }
922
923 # func_ltwrapper_script_p file
924 # True iff FILE is a libtool wrapper script
925 # This function is only a basic sanity check; it will hardly flush out
926 # determined imposters.
927 func_ltwrapper_script_p ()
928 {
929 func_lalib_p "$1"
930 }
931
932 # func_ltwrapper_executable_p file
933 # True iff FILE is a libtool wrapper executable
934 # This function is only a basic sanity check; it will hardly flush out
935 # determined imposters.
936 func_ltwrapper_executable_p ()
937 {
938 func_ltwrapper_exec_suffix=
939 case $1 in
940 *.exe) ;;
941 *) func_ltwrapper_exec_suffix=.exe ;;
942 esac
943 $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
944 }
945
946 # func_ltwrapper_scriptname file
947 # Assumes file is an ltwrapper_executable
948 # uses $file to determine the appropriate filename for a
949 # temporary ltwrapper_script.
950 func_ltwrapper_scriptname ()
951 {
952 func_ltwrapper_scriptname_result=""
953 if func_ltwrapper_executable_p "$1"; then
954 func_dirname_and_basename "$1" "" "."
955 func_stripname '' '.exe' "$func_basename_result"
956 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
957 fi
958 }
959
960 # func_ltwrapper_p file
961 # True iff FILE is a libtool wrapper script or wrapper executable
962 # This function is only a basic sanity check; it will hardly flush out
963 # determined imposters.
964 func_ltwrapper_p ()
965 {
966 func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
967 }
968
969
970 # func_execute_cmds commands fail_cmd
971 # Execute tilde-delimited COMMANDS.
972 # If FAIL_CMD is given, eval that upon failure.
973 # FAIL_CMD may read-access the current command in variable CMD!
974 func_execute_cmds ()
975 {
976 $opt_debug
977 save_ifs=$IFS; IFS='~'
978 for cmd in $1; do
979 IFS=$save_ifs
980 eval cmd=\"$cmd\"
981 func_show_eval "$cmd" "${2-:}"
982 done
983 IFS=$save_ifs
984 }
985
986
987 # func_source file
988 # Source FILE, adding directory component if necessary.
989 # Note that it is not necessary on cygwin/mingw to append a dot to
990 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
991 # behavior happens only for exec(3), not for open(2)! Also, sourcing
992 # `FILE.' does not work on cygwin managed mounts.
993 func_source ()
994 {
995 $opt_debug
996 case $1 in
997 */* | *\\*) . "$1" ;;
998 *) . "./$1" ;;
999 esac
1000 }
1001
1002
1003 # func_infer_tag arg
1004 # Infer tagged configuration to use if any are available and
1005 # if one wasn't chosen via the "--tag" command line option.
1006 # Only attempt this if the compiler in the base compile
1007 # command doesn't match the default compiler.
1008 # arg is usually of the form 'gcc ...'
1009 func_infer_tag ()
1010 {
1011 $opt_debug
1012 if test -n "$available_tags" && test -z "$tagname"; then
1013 CC_quoted=
1014 for arg in $CC; do
1015 func_quote_for_eval "$arg"
1016 CC_quoted="$CC_quoted $func_quote_for_eval_result"
1017 done
1018 case $@ in
1019 # Blanks in the command may have been stripped by the calling shell,
1020 # but not from the CC environment variable when configure was run.
1021 " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
1022 # Blanks at the start of $base_compile will cause this to fail
1023 # if we don't check for them as well.
1024 *)
1025 for z in $available_tags; do
1026 if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
1027 # Evaluate the configuration.
1028 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
1029 CC_quoted=
1030 for arg in $CC; do
1031 # Double-quote args containing other shell metacharacters.
1032 func_quote_for_eval "$arg"
1033 CC_quoted="$CC_quoted $func_quote_for_eval_result"
1034 done
1035 case "$@ " in
1036 " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
1037 # The compiler in the base compile command matches
1038 # the one in the tagged configuration.
1039 # Assume this is the tagged configuration we want.
1040 tagname=$z
1041 break
1042 ;;
1043 esac
1044 fi
1045 done
1046 # If $tagname still isn't set, then no tagged configuration
1047 # was found and let the user know that the "--tag" command
1048 # line option must be used.
1049 if test -z "$tagname"; then
1050 func_echo "unable to infer tagged configuration"
1051 func_fatal_error "specify a tag with \`--tag'"
1052 # else
1053 # func_verbose "using $tagname tagged configuration"
1054 fi
1055 ;;
1056 esac
1057 fi
1058 }
1059
1060
1061
1062 # func_write_libtool_object output_name pic_name nonpic_name
1063 # Create a libtool object file (analogous to a ".la" file),
1064 # but don't create it if we're doing a dry run.
1065 func_write_libtool_object ()
1066 {
1067 write_libobj=${1}
1068 if test "$build_libtool_libs" = yes; then
1069 write_lobj=\'${2}\'
1070 else
1071 write_lobj=none
1072 fi
1073
1074 if test "$build_old_libs" = yes; then
1075 write_oldobj=\'${3}\'
1076 else
1077 write_oldobj=none
1078 fi
1079
1080 $opt_dry_run || {
1081 cat >${write_libobj}T <<EOF
1082 # $write_libobj - a libtool object file
1083 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
1084 #
1085 # Please DO NOT delete this file!
1086 # It is necessary for linking the library.
1087
1088 # Name of the PIC object.
1089 pic_object=$write_lobj
1090
1091 # Name of the non-PIC object
1092 non_pic_object=$write_oldobj
1093
1094 EOF
1095 $MV "${write_libobj}T" "${write_libobj}"
1096 }
1097 }
1098
1099 # func_mode_compile arg...
1100 func_mode_compile ()
1101 {
1102 $opt_debug
1103 # Get the compilation command and the source file.
1104 base_compile=
1105 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
1106 suppress_opt=yes
1107 suppress_output=
1108 arg_mode=normal
1109 libobj=
1110 later=
1111 pie_flag=
1112
1113 for arg
1114 do
1115 case $arg_mode in
1116 arg )
1117 # do not "continue". Instead, add this to base_compile
1118 lastarg="$arg"
1119 arg_mode=normal
1120 ;;
1121
1122 target )
1123 libobj="$arg"
1124 arg_mode=normal
1125 continue
1126 ;;
1127
1128 normal )
1129 # Accept any command-line options.
1130 case $arg in
1131 -o)
1132 test -n "$libobj" && \
1133 func_fatal_error "you cannot specify \`-o' more than once"
1134 arg_mode=target
1135 continue
1136 ;;
1137
1138 -pie | -fpie | -fPIE)
1139 pie_flag="$pie_flag $arg"
1140 continue
1141 ;;
1142
1143 -shared | -static | -prefer-pic | -prefer-non-pic)
1144 later="$later $arg"
1145 continue
1146 ;;
1147
1148 -no-suppress)
1149 suppress_opt=no
1150 continue
1151 ;;
1152
1153 -Xcompiler)
1154 arg_mode=arg # the next one goes into the "base_compile" arg list
1155 continue # The current "srcfile" will either be retained or
1156 ;; # replaced later. I would guess that would be a bug.
1157
1158 -Wc,*)
1159 func_stripname '-Wc,' '' "$arg"
1160 args=$func_stripname_result
1161 lastarg=
1162 save_ifs="$IFS"; IFS=','
1163 for arg in $args; do
1164 IFS="$save_ifs"
1165 func_quote_for_eval "$arg"
1166 lastarg="$lastarg $func_quote_for_eval_result"
1167 done
1168 IFS="$save_ifs"
1169 func_stripname ' ' '' "$lastarg"
1170 lastarg=$func_stripname_result
1171
1172 # Add the arguments to base_compile.
1173 base_compile="$base_compile $lastarg"
1174 continue
1175 ;;
1176
1177 *)
1178 # Accept the current argument as the source file.
1179 # The previous "srcfile" becomes the current argument.
1180 #
1181 lastarg="$srcfile"
1182 srcfile="$arg"
1183 ;;
1184 esac # case $arg
1185 ;;
1186 esac # case $arg_mode
1187
1188 # Aesthetically quote the previous argument.
1189 func_quote_for_eval "$lastarg"
1190 base_compile="$base_compile $func_quote_for_eval_result"
1191 done # for arg
1192
1193 case $arg_mode in
1194 arg)
1195 func_fatal_error "you must specify an argument for -Xcompile"
1196 ;;
1197 target)
1198 func_fatal_error "you must specify a target with \`-o'"
1199 ;;
1200 *)
1201 # Get the name of the library object.
1202 test -z "$libobj" && {
1203 func_basename "$srcfile"
1204 libobj="$func_basename_result"
1205 }
1206 ;;
1207 esac
1208
1209 # Recognize several different file suffixes.
1210 # If the user specifies -o file.o, it is replaced with file.lo
1211 case $libobj in
1212 *.[cCFSifmso] | \
1213 *.ada | *.adb | *.ads | *.asm | \
1214 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
1215 *.[fF][09]? | *.for | *.java | *.obj | *.sx)
1216 func_xform "$libobj"
1217 libobj=$func_xform_result
1218 ;;
1219 esac
1220
1221 case $libobj in
1222 *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
1223 *)
1224 func_fatal_error "cannot determine name of library object from \`$libobj'"
1225 ;;
1226 esac
1227
1228 func_infer_tag $base_compile
1229
1230 for arg in $later; do
1231 case $arg in
1232 -shared)
1233 test "$build_libtool_libs" != yes && \
1234 func_fatal_configuration "can not build a shared library"
1235 build_old_libs=no
1236 continue
1237 ;;
1238
1239 -static)
1240 build_libtool_libs=no
1241 build_old_libs=yes
1242 continue
1243 ;;
1244
1245 -prefer-pic)
1246 pic_mode=yes
1247 continue
1248 ;;
1249
1250 -prefer-non-pic)
1251 pic_mode=no
1252 continue
1253 ;;
1254 esac
1255 done
1256
1257 func_quote_for_eval "$libobj"
1258 test "X$libobj" != "X$func_quote_for_eval_result" \
1259 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
1260 && func_warning "libobj name \`$libobj' may not contain shell special characters."
1261 func_dirname_and_basename "$obj" "/" ""
1262 objname="$func_basename_result"
1263 xdir="$func_dirname_result"
1264 lobj=${xdir}$objdir/$objname
1265
1266 test -z "$base_compile" && \
1267 func_fatal_help "you must specify a compilation command"
1268
1269 # Delete any leftover library objects.
1270 if test "$build_old_libs" = yes; then
1271 removelist="$obj $lobj $libobj ${libobj}T"
1272 else
1273 removelist="$lobj $libobj ${libobj}T"
1274 fi
1275
1276 # On Cygwin there's no "real" PIC flag so we must build both object types
1277 case $host_os in
1278 cygwin* | mingw* | pw32* | os2* | cegcc*)
1279 pic_mode=default
1280 ;;
1281 esac
1282 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
1283 # non-PIC code in shared libraries is not supported
1284 pic_mode=default
1285 fi
1286
1287 # Calculate the filename of the output object if compiler does
1288 # not support -o with -c
1289 if test "$compiler_c_o" = no; then
1290 output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
1291 lockfile="$output_obj.lock"
1292 else
1293 output_obj=
1294 need_locks=no
1295 lockfile=
1296 fi
1297
1298 # Lock this critical section if it is needed
1299 # We use this script file to make the link, it avoids creating a new file
1300 if test "$need_locks" = yes; then
1301 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
1302 func_echo "Waiting for $lockfile to be removed"
1303 sleep 2
1304 done
1305 elif test "$need_locks" = warn; then
1306 if test -f "$lockfile"; then
1307 $ECHO "\
1308 *** ERROR, $lockfile exists and contains:
1309 `cat $lockfile 2>/dev/null`
1310
1311 This indicates that another process is trying to use the same
1312 temporary object file, and libtool could not work around it because
1313 your compiler does not support \`-c' and \`-o' together. If you
1314 repeat this compilation, it may succeed, by chance, but you had better
1315 avoid parallel builds (make -j) in this platform, or get a better
1316 compiler."
1317
1318 $opt_dry_run || $RM $removelist
1319 exit $EXIT_FAILURE
1320 fi
1321 removelist="$removelist $output_obj"
1322 $ECHO "$srcfile" > "$lockfile"
1323 fi
1324
1325 $opt_dry_run || $RM $removelist
1326 removelist="$removelist $lockfile"
1327 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
1328
1329 if test -n "$fix_srcfile_path"; then
1330 eval srcfile=\"$fix_srcfile_path\"
1331 fi
1332 func_quote_for_eval "$srcfile"
1333 qsrcfile=$func_quote_for_eval_result
1334
1335 # Only build a PIC object if we are building libtool libraries.
1336 if test "$build_libtool_libs" = yes; then
1337 # Without this assignment, base_compile gets emptied.
1338 fbsd_hideous_sh_bug=$base_compile
1339
1340 if test "$pic_mode" != no; then
1341 command="$base_compile $qsrcfile $pic_flag"
1342 else
1343 # Don't build PIC code
1344 command="$base_compile $qsrcfile"
1345 fi
1346
1347 func_mkdir_p "$xdir$objdir"
1348
1349 if test -z "$output_obj"; then
1350 # Place PIC objects in $objdir
1351 command="$command -o $lobj"
1352 fi
1353
1354 func_show_eval_locale "$command" \
1355 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
1356
1357 if test "$need_locks" = warn &&
1358 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1359 $ECHO "\
1360 *** ERROR, $lockfile contains:
1361 `cat $lockfile 2>/dev/null`
1362
1363 but it should contain:
1364 $srcfile
1365
1366 This indicates that another process is trying to use the same
1367 temporary object file, and libtool could not work around it because
1368 your compiler does not support \`-c' and \`-o' together. If you
1369 repeat this compilation, it may succeed, by chance, but you had better
1370 avoid parallel builds (make -j) in this platform, or get a better
1371 compiler."
1372
1373 $opt_dry_run || $RM $removelist
1374 exit $EXIT_FAILURE
1375 fi
1376
1377 # Just move the object if needed, then go on to compile the next one
1378 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1379 func_show_eval '$MV "$output_obj" "$lobj"' \
1380 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
1381 fi
1382
1383 # Allow error messages only from the first compilation.
1384 if test "$suppress_opt" = yes; then
1385 suppress_output=' >/dev/null 2>&1'
1386 fi
1387 fi
1388
1389 # Only build a position-dependent object if we build old libraries.
1390 if test "$build_old_libs" = yes; then
1391 if test "$pic_mode" != yes; then
1392 # Don't build PIC code
1393 command="$base_compile $qsrcfile$pie_flag"
1394 else
1395 command="$base_compile $qsrcfile $pic_flag"
1396 fi
1397 if test "$compiler_c_o" = yes; then
1398 command="$command -o $obj"
1399 fi
1400
1401 # Suppress compiler output if we already did a PIC compilation.
1402 command="$command$suppress_output"
1403 func_show_eval_locale "$command" \
1404 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
1405
1406 if test "$need_locks" = warn &&
1407 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1408 $ECHO "\
1409 *** ERROR, $lockfile contains:
1410 `cat $lockfile 2>/dev/null`
1411
1412 but it should contain:
1413 $srcfile
1414
1415 This indicates that another process is trying to use the same
1416 temporary object file, and libtool could not work around it because
1417 your compiler does not support \`-c' and \`-o' together. If you
1418 repeat this compilation, it may succeed, by chance, but you had better
1419 avoid parallel builds (make -j) in this platform, or get a better
1420 compiler."
1421
1422 $opt_dry_run || $RM $removelist
1423 exit $EXIT_FAILURE
1424 fi
1425
1426 # Just move the object if needed
1427 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1428 func_show_eval '$MV "$output_obj" "$obj"' \
1429 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
1430 fi
1431 fi
1432
1433 $opt_dry_run || {
1434 func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
1435
1436 # Unlock the critical section if it was locked
1437 if test "$need_locks" != no; then
1438 removelist=$lockfile
1439 $RM "$lockfile"
1440 fi
1441 }
1442
1443 exit $EXIT_SUCCESS
1444 }
1445
1446 $opt_help || {
1447 test "$mode" = compile && func_mode_compile ${1+"$@"}
1448 }
1449
1450 func_mode_help ()
1451 {
1452 # We need to display help for each of the modes.
1453 case $mode in
1454 "")
1455 # Generic help is extracted from the usage comments
1456 # at the start of this file.
1457 func_help
1458 ;;
1459
1460 clean)
1461 $ECHO \
1462 "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
1463
1464 Remove files from the build directory.
1465
1466 RM is the name of the program to use to delete files associated with each FILE
1467 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
1468 to RM.
1469
1470 If FILE is a libtool library, object or program, all the files associated
1471 with it are deleted. Otherwise, only FILE itself is deleted using RM."
1472 ;;
1473
1474 compile)
1475 $ECHO \
1476 "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
1477
1478 Compile a source file into a libtool library object.
1479
1480 This mode accepts the following additional options:
1481
1482 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
1483 -no-suppress do not suppress compiler output for multiple passes
1484 -prefer-pic try to building PIC objects only
1485 -prefer-non-pic try to building non-PIC objects only
1486 -shared do not build a \`.o' file suitable for static linking
1487 -static only build a \`.o' file suitable for static linking
1488
1489 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
1490 from the given SOURCEFILE.
1491
1492 The output file name is determined by removing the directory component from
1493 SOURCEFILE, then substituting the C source code suffix \`.c' with the
1494 library object suffix, \`.lo'."
1495 ;;
1496
1497 execute)
1498 $ECHO \
1499 "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
1500
1501 Automatically set library path, then run a program.
1502
1503 This mode accepts the following additional options:
1504
1505 -dlopen FILE add the directory containing FILE to the library path
1506
1507 This mode sets the library path environment variable according to \`-dlopen'
1508 flags.
1509
1510 If any of the ARGS are libtool executable wrappers, then they are translated
1511 into their corresponding uninstalled binary, and any of their required library
1512 directories are added to the library path.
1513
1514 Then, COMMAND is executed, with ARGS as arguments."
1515 ;;
1516
1517 finish)
1518 $ECHO \
1519 "Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
1520
1521 Complete the installation of libtool libraries.
1522
1523 Each LIBDIR is a directory that contains libtool libraries.
1524
1525 The commands that this mode executes may require superuser privileges. Use
1526 the \`--dry-run' option if you just want to see what would be executed."
1527 ;;
1528
1529 install)
1530 $ECHO \
1531 "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
1532
1533 Install executables or libraries.
1534
1535 INSTALL-COMMAND is the installation command. The first component should be
1536 either the \`install' or \`cp' program.
1537
1538 The following components of INSTALL-COMMAND are treated specially:
1539
1540 -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
1541
1542 The rest of the components are interpreted as arguments to that command (only
1543 BSD-compatible install options are recognized)."
1544 ;;
1545
1546 link)
1547 $ECHO \
1548 "Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
1549
1550 Link object files or libraries together to form another library, or to
1551 create an executable program.
1552
1553 LINK-COMMAND is a command using the C compiler that you would use to create
1554 a program from several object files.
1555
1556 The following components of LINK-COMMAND are treated specially:
1557
1558 -all-static do not do any dynamic linking at all
1559 -avoid-version do not add a version suffix if possible
1560 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
1561 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
1562 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
1563 -export-symbols SYMFILE
1564 try to export only the symbols listed in SYMFILE
1565 -export-symbols-regex REGEX
1566 try to export only the symbols matching REGEX
1567 -LLIBDIR search LIBDIR for required installed libraries
1568 -lNAME OUTPUT-FILE requires the installed library libNAME
1569 -module build a library that can dlopened
1570 -no-fast-install disable the fast-install mode
1571 -no-install link a not-installable executable
1572 -no-undefined declare that a library does not refer to external symbols
1573 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
1574 -objectlist FILE Use a list of object files found in FILE to specify objects
1575 -precious-files-regex REGEX
1576 don't remove output files matching REGEX
1577 -release RELEASE specify package release information
1578 -rpath LIBDIR the created library will eventually be installed in LIBDIR
1579 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
1580 -shared only do dynamic linking of libtool libraries
1581 -shrext SUFFIX override the standard shared library file extension
1582 -static do not do any dynamic linking of uninstalled libtool libraries
1583 -static-libtool-libs
1584 do not do any dynamic linking of libtool libraries
1585 -version-info CURRENT[:REVISION[:AGE]]
1586 specify library version info [each variable defaults to 0]
1587 -weak LIBNAME declare that the target provides the LIBNAME interface
1588
1589 All other options (arguments beginning with \`-') are ignored.
1590
1591 Every other argument is treated as a filename. Files ending in \`.la' are
1592 treated as uninstalled libtool libraries, other files are standard or library
1593 object files.
1594
1595 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
1596 only library objects (\`.lo' files) may be specified, and \`-rpath' is
1597 required, except when creating a convenience library.
1598
1599 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
1600 using \`ar' and \`ranlib', or on Windows using \`lib'.
1601
1602 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
1603 is created, otherwise an executable program is created."
1604 ;;
1605
1606 uninstall)
1607 $ECHO \
1608 "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
1609
1610 Remove libraries from an installation directory.
1611
1612 RM is the name of the program to use to delete files associated with each FILE
1613 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
1614 to RM.
1615
1616 If FILE is a libtool library, all the files associated with it are deleted.
1617 Otherwise, only FILE itself is deleted using RM."
1618 ;;
1619
1620 *)
1621 func_fatal_help "invalid operation mode \`$mode'"
1622 ;;
1623 esac
1624
1625 $ECHO
1626 $ECHO "Try \`$progname --help' for more information about other modes."
1627
1628 exit $?
1629 }
1630
1631 # Now that we've collected a possible --mode arg, show help if necessary
1632 $opt_help && func_mode_help
1633
1634
1635 # func_mode_execute arg...
1636 func_mode_execute ()
1637 {
1638 $opt_debug
1639 # The first argument is the command name.
1640 cmd="$nonopt"
1641 test -z "$cmd" && \
1642 func_fatal_help "you must specify a COMMAND"
1643
1644 # Handle -dlopen flags immediately.
1645 for file in $execute_dlfiles; do
1646 test -f "$file" \
1647 || func_fatal_help "\`$file' is not a file"
1648
1649 dir=
1650 case $file in
1651 *.la)
1652 # Check to see that this really is a libtool archive.
1653 func_lalib_unsafe_p "$file" \
1654 || func_fatal_help "\`$lib' is not a valid libtool archive"
1655
1656 # Read the libtool library.
1657 dlname=
1658 library_names=
1659 func_source "$file"
1660
1661 # Skip this library if it cannot be dlopened.
1662 if test -z "$dlname"; then
1663 # Warn if it was a shared library.
1664 test -n "$library_names" && \
1665 func_warning "\`$file' was not linked with \`-export-dynamic'"
1666 continue
1667 fi
1668
1669 func_dirname "$file" "" "."
1670 dir="$func_dirname_result"
1671
1672 if test -f "$dir/$objdir/$dlname"; then
1673 dir="$dir/$objdir"
1674 else
1675 if test ! -f "$dir/$dlname"; then
1676 func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
1677 fi
1678 fi
1679 ;;
1680
1681 *.lo)
1682 # Just add the directory containing the .lo file.
1683 func_dirname "$file" "" "."
1684 dir="$func_dirname_result"
1685 ;;
1686
1687 *)
1688 func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
1689 continue
1690 ;;
1691 esac
1692
1693 # Get the absolute pathname.
1694 absdir=`cd "$dir" && pwd`
1695 test -n "$absdir" && dir="$absdir"
1696
1697 # Now add the directory to shlibpath_var.
1698 if eval "test -z \"\$$shlibpath_var\""; then
1699 eval "$shlibpath_var=\"\$dir\""
1700 else
1701 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
1702 fi
1703 done
1704
1705 # This variable tells wrapper scripts just to set shlibpath_var
1706 # rather than running their programs.
1707 libtool_execute_magic="$magic"
1708
1709 # Check if any of the arguments is a wrapper script.
1710 args=
1711 for file
1712 do
1713 case $file in
1714 -*) ;;
1715 *)
1716 # Do a test to see if this is really a libtool program.
1717 if func_ltwrapper_script_p "$file"; then
1718 func_source "$file"
1719 # Transform arg to wrapped name.
1720 file="$progdir/$program"
1721 elif func_ltwrapper_executable_p "$file"; then
1722 func_ltwrapper_scriptname "$file"
1723 func_source "$func_ltwrapper_scriptname_result"
1724 # Transform arg to wrapped name.
1725 file="$progdir/$program"
1726 fi
1727 ;;
1728 esac
1729 # Quote arguments (to preserve shell metacharacters).
1730 func_quote_for_eval "$file"
1731 args="$args $func_quote_for_eval_result"
1732 done
1733
1734 if test "X$opt_dry_run" = Xfalse; then
1735 if test -n "$shlibpath_var"; then
1736 # Export the shlibpath_var.
1737 eval "export $shlibpath_var"
1738 fi
1739
1740 # Restore saved environment variables
1741 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
1742 do
1743 eval "if test \"\${save_$lt_var+set}\" = set; then
1744 $lt_var=\$save_$lt_var; export $lt_var
1745 else
1746 $lt_unset $lt_var
1747 fi"
1748 done
1749
1750 # Now prepare to actually exec the command.
1751 exec_cmd="\$cmd$args"
1752 else
1753 # Display what would be done.
1754 if test -n "$shlibpath_var"; then
1755 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
1756 $ECHO "export $shlibpath_var"
1757 fi
1758 $ECHO "$cmd$args"
1759 exit $EXIT_SUCCESS
1760 fi
1761 }
1762
1763 test "$mode" = execute && func_mode_execute ${1+"$@"}
1764
1765
1766 # func_mode_finish arg...
1767 func_mode_finish ()
1768 {
1769 $opt_debug
1770 libdirs="$nonopt"
1771 admincmds=
1772
1773 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
1774 for dir
1775 do
1776 libdirs="$libdirs $dir"
1777 done
1778
1779 for libdir in $libdirs; do
1780 if test -n "$finish_cmds"; then
1781 # Do each command in the finish commands.
1782 func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
1783 '"$cmd"'"'
1784 fi
1785 if test -n "$finish_eval"; then
1786 # Do the single finish_eval.
1787 eval cmds=\"$finish_eval\"
1788 $opt_dry_run || eval "$cmds" || admincmds="$admincmds
1789 $cmds"
1790 fi
1791 done
1792 fi
1793
1794 # Exit here if they wanted silent mode.
1795 $opt_silent && exit $EXIT_SUCCESS
1796
1797 $ECHO "X----------------------------------------------------------------------" | $Xsed
1798 $ECHO "Libraries have been installed in:"
1799 for libdir in $libdirs; do
1800 $ECHO " $libdir"
1801 done
1802 $ECHO
1803 $ECHO "If you ever happen to want to link against installed libraries"
1804 $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
1805 $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
1806 $ECHO "flag during linking and do at least one of the following:"
1807 if test -n "$shlibpath_var"; then
1808 $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
1809 $ECHO " during execution"
1810 fi
1811 if test -n "$runpath_var"; then
1812 $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
1813 $ECHO " during linking"
1814 fi
1815 if test -n "$hardcode_libdir_flag_spec"; then
1816 libdir=LIBDIR
1817 eval flag=\"$hardcode_libdir_flag_spec\"
1818
1819 $ECHO " - use the \`$flag' linker flag"
1820 fi
1821 if test -n "$admincmds"; then
1822 $ECHO " - have your system administrator run these commands:$admincmds"
1823 fi
1824 if test -f /etc/ld.so.conf; then
1825 $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
1826 fi
1827 $ECHO
1828
1829 $ECHO "See any operating system documentation about shared libraries for"
1830 case $host in
1831 solaris2.[6789]|solaris2.1[0-9])
1832 $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
1833 $ECHO "pages."
1834 ;;
1835 *)
1836 $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
1837 ;;
1838 esac
1839 $ECHO "X----------------------------------------------------------------------" | $Xsed
1840 exit $EXIT_SUCCESS
1841 }
1842
1843 test "$mode" = finish && func_mode_finish ${1+"$@"}
1844
1845
1846 # func_mode_install arg...
1847 func_mode_install ()
1848 {
1849 $opt_debug
1850 # There may be an optional sh(1) argument at the beginning of
1851 # install_prog (especially on Windows NT).
1852 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
1853 # Allow the use of GNU shtool's install command.
1854 $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
1855 # Aesthetically quote it.
1856 func_quote_for_eval "$nonopt"
1857 install_prog="$func_quote_for_eval_result "
1858 arg=$1
1859 shift
1860 else
1861 install_prog=
1862 arg=$nonopt
1863 fi
1864
1865 # The real first argument should be the name of the installation program.
1866 # Aesthetically quote it.
1867 func_quote_for_eval "$arg"
1868 install_prog="$install_prog$func_quote_for_eval_result"
1869
1870 # We need to accept at least all the BSD install flags.
1871 dest=
1872 files=
1873 opts=
1874 prev=
1875 install_type=
1876 isdir=no
1877 stripme=
1878 for arg
1879 do
1880 if test -n "$dest"; then
1881 files="$files $dest"
1882 dest=$arg
1883 continue
1884 fi
1885
1886 case $arg in
1887 -d) isdir=yes ;;
1888 -f)
1889 case " $install_prog " in
1890 *[\\\ /]cp\ *) ;;
1891 *) prev=$arg ;;
1892 esac
1893 ;;
1894 -g | -m | -o)
1895 prev=$arg
1896 ;;
1897 -s)
1898 stripme=" -s"
1899 continue
1900 ;;
1901 -*)
1902 ;;
1903 *)
1904 # If the previous option needed an argument, then skip it.
1905 if test -n "$prev"; then
1906 prev=
1907 else
1908 dest=$arg
1909 continue
1910 fi
1911 ;;
1912 esac
1913
1914 # Aesthetically quote the argument.
1915 func_quote_for_eval "$arg"
1916 install_prog="$install_prog $func_quote_for_eval_result"
1917 done
1918
1919 test -z "$install_prog" && \
1920 func_fatal_help "you must specify an install program"
1921
1922 test -n "$prev" && \
1923 func_fatal_help "the \`$prev' option requires an argument"
1924
1925 if test -z "$files"; then
1926 if test -z "$dest"; then
1927 func_fatal_help "no file or destination specified"
1928 else
1929 func_fatal_help "you must specify a destination"
1930 fi
1931 fi
1932
1933 # Strip any trailing slash from the destination.
1934 func_stripname '' '/' "$dest"
1935 dest=$func_stripname_result
1936
1937 # Check to see that the destination is a directory.
1938 test -d "$dest" && isdir=yes
1939 if test "$isdir" = yes; then
1940 destdir="$dest"
1941 destname=
1942 else
1943 func_dirname_and_basename "$dest" "" "."
1944 destdir="$func_dirname_result"
1945 destname="$func_basename_result"
1946
1947 # Not a directory, so check to see that there is only one file specified.
1948 set dummy $files; shift
1949 test "$#" -gt 1 && \
1950 func_fatal_help "\`$dest' is not a directory"
1951 fi
1952 case $destdir in
1953 [\\/]* | [A-Za-z]:[\\/]*) ;;
1954 *)
1955 for file in $files; do
1956 case $file in
1957 *.lo) ;;
1958 *)
1959 func_fatal_help "\`$destdir' must be an absolute directory name"
1960 ;;
1961 esac
1962 done
1963 ;;
1964 esac
1965
1966 # This variable tells wrapper scripts just to set variables rather
1967 # than running their programs.
1968 libtool_install_magic="$magic"
1969
1970 staticlibs=
1971 future_libdirs=
1972 current_libdirs=
1973 for file in $files; do
1974
1975 # Do each installation.
1976 case $file in
1977 *.$libext)
1978 # Do the static libraries later.
1979 staticlibs="$staticlibs $file"
1980 ;;
1981
1982 *.la)
1983 # Check to see that this really is a libtool archive.
1984 func_lalib_unsafe_p "$file" \
1985 || func_fatal_help "\`$file' is not a valid libtool archive"
1986
1987 library_names=
1988 old_library=
1989 relink_command=
1990 func_source "$file"
1991
1992 # Add the libdir to current_libdirs if it is the destination.
1993 if test "X$destdir" = "X$libdir"; then
1994 case "$current_libdirs " in
1995 *" $libdir "*) ;;
1996 *) current_libdirs="$current_libdirs $libdir" ;;
1997 esac
1998 else
1999 # Note the libdir as a future libdir.
2000 case "$future_libdirs " in
2001 *" $libdir "*) ;;
2002 *) future_libdirs="$future_libdirs $libdir" ;;
2003 esac
2004 fi
2005
2006 func_dirname "$file" "/" ""
2007 dir="$func_dirname_result"
2008 dir="$dir$objdir"
2009
2010 if test -n "$relink_command"; then
2011 # Determine the prefix the user has applied to our future dir.
2012 inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
2013
2014 # Don't allow the user to place us outside of our expected
2015 # location b/c this prevents finding dependent libraries that
2016 # are installed to the same prefix.
2017 # At present, this check doesn't affect windows .dll's that
2018 # are installed into $libdir/../bin (currently, that works fine)
2019 # but it's something to keep an eye on.
2020 test "$inst_prefix_dir" = "$destdir" && \
2021 func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
2022
2023 if test -n "$inst_prefix_dir"; then
2024 # Stick the inst_prefix_dir data into the link command.
2025 relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
2026 else
2027 relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
2028 fi
2029
2030 func_warning "relinking \`$file'"
2031 func_show_eval "$relink_command" \
2032 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
2033 fi
2034
2035 # See the names of the shared library.
2036 set dummy $library_names; shift
2037 if test -n "$1"; then
2038 realname="$1"
2039 shift
2040
2041 srcname="$realname"
2042 test -n "$relink_command" && srcname="$realname"T
2043
2044 # Install the shared library and build the symlinks.
2045 func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
2046 'exit $?'
2047 tstripme="$stripme"
2048 case $host_os in
2049 cygwin* | mingw* | pw32* | cegcc*)
2050 case $realname in
2051 *.dll.a)
2052 tstripme=""
2053 ;;
2054 esac
2055 ;;
2056 esac
2057 if test -n "$tstripme" && test -n "$striplib"; then
2058 func_show_eval "$striplib $destdir/$realname" 'exit $?'
2059 fi
2060
2061 if test "$#" -gt 0; then
2062 # Delete the old symlinks, and create new ones.
2063 # Try `ln -sf' first, because the `ln' binary might depend on
2064 # the symlink we replace! Solaris /bin/ln does not understand -f,
2065 # so we also need to try rm && ln -s.
2066 for linkname
2067 do
2068 test "$linkname" != "$realname" \
2069 && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
2070 done
2071 fi
2072
2073 # Do each command in the postinstall commands.
2074 lib="$destdir/$realname"
2075 func_execute_cmds "$postinstall_cmds" 'exit $?'
2076 fi
2077
2078 # Install the pseudo-library for information purposes.
2079 func_basename "$file"
2080 name="$func_basename_result"
2081 instname="$dir/$name"i
2082 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
2083
2084 # Maybe install the static library, too.
2085 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
2086 ;;
2087
2088 *.lo)
2089 # Install (i.e. copy) a libtool object.
2090
2091 # Figure out destination file name, if it wasn't already specified.
2092 if test -n "$destname"; then
2093 destfile="$destdir/$destname"
2094 else
2095 func_basename "$file"
2096 destfile="$func_basename_result"
2097 destfile="$destdir/$destfile"
2098 fi
2099
2100 # Deduce the name of the destination old-style object file.
2101 case $destfile in
2102 *.lo)
2103 func_lo2o "$destfile"
2104 staticdest=$func_lo2o_result
2105 ;;
2106 *.$objext)
2107 staticdest="$destfile"
2108 destfile=
2109 ;;
2110 *)
2111 func_fatal_help "cannot copy a libtool object to \`$destfile'"
2112 ;;
2113 esac
2114
2115 # Install the libtool object if requested.
2116 test -n "$destfile" && \
2117 func_show_eval "$install_prog $file $destfile" 'exit $?'
2118
2119 # Install the old object if enabled.
2120 if test "$build_old_libs" = yes; then
2121 # Deduce the name of the old-style object file.
2122 func_lo2o "$file"
2123 staticobj=$func_lo2o_result
2124 func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
2125 fi
2126 exit $EXIT_SUCCESS
2127 ;;
2128
2129 *)
2130 # Figure out destination file name, if it wasn't already specified.
2131 if test -n "$destname"; then
2132 destfile="$destdir/$destname"
2133 else
2134 func_basename "$file"
2135 destfile="$func_basename_result"
2136 destfile="$destdir/$destfile"
2137 fi
2138
2139 # If the file is missing, and there is a .exe on the end, strip it
2140 # because it is most likely a libtool script we actually want to
2141 # install
2142 stripped_ext=""
2143 case $file in
2144 *.exe)
2145 if test ! -f "$file"; then
2146 func_stripname '' '.exe' "$file"
2147 file=$func_stripname_result
2148 stripped_ext=".exe"
2149 fi
2150 ;;
2151 esac
2152
2153 # Do a test to see if this is really a libtool program.
2154 case $host in
2155 *cygwin* | *mingw*)
2156 if func_ltwrapper_executable_p "$file"; then
2157 func_ltwrapper_scriptname "$file"
2158 wrapper=$func_ltwrapper_scriptname_result
2159 else
2160 func_stripname '' '.exe' "$file"
2161 wrapper=$func_stripname_result
2162 fi
2163 ;;
2164 *)
2165 wrapper=$file
2166 ;;
2167 esac
2168 if func_ltwrapper_script_p "$wrapper"; then
2169 notinst_deplibs=
2170 relink_command=
2171
2172 func_source "$wrapper"
2173
2174 # Check the variables that should have been set.
2175 test -z "$generated_by_libtool_version" && \
2176 func_fatal_error "invalid libtool wrapper script \`$wrapper'"
2177
2178 finalize=yes
2179 for lib in $notinst_deplibs; do
2180 # Check to see that each library is installed.
2181 libdir=
2182 if test -f "$lib"; then
2183 func_source "$lib"
2184 fi
2185 libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
2186 if test -n "$libdir" && test ! -f "$libfile"; then
2187 func_warning "\`$lib' has not been installed in \`$libdir'"
2188 finalize=no
2189 fi
2190 done
2191
2192 relink_command=
2193 func_source "$wrapper"
2194
2195 outputname=
2196 if test "$fast_install" = no && test -n "$relink_command"; then
2197 $opt_dry_run || {
2198 if test "$finalize" = yes; then
2199 tmpdir=`func_mktempdir`
2200 func_basename "$file$stripped_ext"
2201 file="$func_basename_result"
2202 outputname="$tmpdir/$file"
2203 # Replace the output file specification.
2204 relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
2205
2206 $opt_silent || {
2207 func_quote_for_expand "$relink_command"
2208 eval "func_echo $func_quote_for_expand_result"
2209 }
2210 if eval "$relink_command"; then :
2211 else
2212 func_error "error: relink \`$file' with the above command before installing it"
2213 $opt_dry_run || ${RM}r "$tmpdir"
2214 continue
2215 fi
2216 file="$outputname"
2217 else
2218 func_warning "cannot relink \`$file'"
2219 fi
2220 }
2221 else
2222 # Install the binary that we compiled earlier.
2223 file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
2224 fi
2225 fi
2226
2227 # remove .exe since cygwin /usr/bin/install will append another
2228 # one anyway
2229 case $install_prog,$host in
2230 */usr/bin/install*,*cygwin*)
2231 case $file:$destfile in
2232 *.exe:*.exe)
2233 # this is ok
2234 ;;
2235 *.exe:*)
2236 destfile=$destfile.exe
2237 ;;
2238 *:*.exe)
2239 func_stripname '' '.exe' "$destfile"
2240 destfile=$func_stripname_result
2241 ;;
2242 esac
2243 ;;
2244 esac
2245 func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
2246 $opt_dry_run || if test -n "$outputname"; then
2247 ${RM}r "$tmpdir"
2248 fi
2249 ;;
2250 esac
2251 done
2252
2253 for file in $staticlibs; do
2254 func_basename "$file"
2255 name="$func_basename_result"
2256
2257 # Set up the ranlib parameters.
2258 oldlib="$destdir/$name"
2259
2260 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
2261
2262 if test -n "$stripme" && test -n "$old_striplib"; then
2263 func_show_eval "$old_striplib $oldlib" 'exit $?'
2264 fi
2265
2266 # Do each command in the postinstall commands.
2267 func_execute_cmds "$old_postinstall_cmds" 'exit $?'
2268 done
2269
2270 test -n "$future_libdirs" && \
2271 func_warning "remember to run \`$progname --finish$future_libdirs'"
2272
2273 if test -n "$current_libdirs"; then
2274 # Maybe just do a dry run.
2275 $opt_dry_run && current_libdirs=" -n$current_libdirs"
2276 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
2277 else
2278 exit $EXIT_SUCCESS
2279 fi
2280 }
2281
2282 test "$mode" = install && func_mode_install ${1+"$@"}
2283
2284
2285 # func_generate_dlsyms outputname originator pic_p
2286 # Extract symbols from dlprefiles and create ${outputname}S.o with
2287 # a dlpreopen symbol table.
2288 func_generate_dlsyms ()
2289 {
2290 $opt_debug
2291 my_outputname="$1"
2292 my_originator="$2"
2293 my_pic_p="${3-no}"
2294 my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
2295 my_dlsyms=
2296
2297 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2298 if test -n "$NM" && test -n "$global_symbol_pipe"; then
2299 my_dlsyms="${my_outputname}S.c"
2300 else
2301 func_error "not configured to extract global symbols from dlpreopened files"
2302 fi
2303 fi
2304
2305 if test -n "$my_dlsyms"; then
2306 case $my_dlsyms in
2307 "") ;;
2308 *.c)
2309 # Discover the nlist of each of the dlfiles.
2310 nlist="$output_objdir/${my_outputname}.nm"
2311
2312 func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
2313
2314 # Parse the name list into a source file.
2315 func_verbose "creating $output_objdir/$my_dlsyms"
2316
2317 $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
2318 /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
2319 /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
2320
2321 #ifdef __cplusplus
2322 extern \"C\" {
2323 #endif
2324
2325 /* External symbol declarations for the compiler. */\
2326 "
2327
2328 if test "$dlself" = yes; then
2329 func_verbose "generating symbol list for \`$output'"
2330
2331 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
2332
2333 # Add our own program objects to the symbol list.
2334 progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2335 for progfile in $progfiles; do
2336 func_verbose "extracting global C symbols from \`$progfile'"
2337 $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
2338 done
2339
2340 if test -n "$exclude_expsyms"; then
2341 $opt_dry_run || {
2342 eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
2343 eval '$MV "$nlist"T "$nlist"'
2344 }
2345 fi
2346
2347 if test -n "$export_symbols_regex"; then
2348 $opt_dry_run || {
2349 eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
2350 eval '$MV "$nlist"T "$nlist"'
2351 }
2352 fi
2353
2354 # Prepare the list of exported symbols
2355 if test -z "$export_symbols"; then
2356 export_symbols="$output_objdir/$outputname.exp"
2357 $opt_dry_run || {
2358 $RM $export_symbols
2359 eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
2360 case $host in
2361 *cygwin* | *mingw* | *cegcc* )
2362 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
2363 eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
2364 ;;
2365 esac
2366 }
2367 else
2368 $opt_dry_run || {
2369 eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
2370 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
2371 eval '$MV "$nlist"T "$nlist"'
2372 case $host in
2373 *cygwin | *mingw* | *cegcc* )
2374 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
2375 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
2376 ;;
2377 esac
2378 }
2379 fi
2380 fi
2381
2382 for dlprefile in $dlprefiles; do
2383 func_verbose "extracting global C symbols from \`$dlprefile'"
2384 func_basename "$dlprefile"
2385 name="$func_basename_result"
2386 $opt_dry_run || {
2387 eval '$ECHO ": $name " >> "$nlist"'
2388 eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
2389 }
2390 done
2391
2392 $opt_dry_run || {
2393 # Make sure we have at least an empty file.
2394 test -f "$nlist" || : > "$nlist"
2395
2396 if test -n "$exclude_expsyms"; then
2397 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
2398 $MV "$nlist"T "$nlist"
2399 fi
2400
2401 # Try sorting and uniquifying the output.
2402 if $GREP -v "^: " < "$nlist" |
2403 if sort -k 3 </dev/null >/dev/null 2>&1; then
2404 sort -k 3
2405 else
2406 sort +2
2407 fi |
2408 uniq > "$nlist"S; then
2409 :
2410 else
2411 $GREP -v "^: " < "$nlist" > "$nlist"S
2412 fi
2413
2414 if test -f "$nlist"S; then
2415 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
2416 else
2417 $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
2418 fi
2419
2420 $ECHO >> "$output_objdir/$my_dlsyms" "\
2421
2422 /* The mapping between symbol names and symbols. */
2423 typedef struct {
2424 const char *name;
2425 void *address;
2426 } lt_dlsymlist;
2427 "
2428 case $host in
2429 *cygwin* | *mingw* | *cegcc* )
2430 $ECHO >> "$output_objdir/$my_dlsyms" "\
2431 /* DATA imports from DLLs on WIN32 con't be const, because
2432 runtime relocations are performed -- see ld's documentation
2433 on pseudo-relocs. */"
2434 lt_dlsym_const= ;;
2435 *osf5*)
2436 echo >> "$output_objdir/$my_dlsyms" "\
2437 /* This system does not cope well with relocations in const data */"
2438 lt_dlsym_const= ;;
2439 *)
2440 lt_dlsym_const=const ;;
2441 esac
2442
2443 $ECHO >> "$output_objdir/$my_dlsyms" "\
2444 extern $lt_dlsym_const lt_dlsymlist
2445 lt_${my_prefix}_LTX_preloaded_symbols[];
2446 $lt_dlsym_const lt_dlsymlist
2447 lt_${my_prefix}_LTX_preloaded_symbols[] =
2448 {\
2449 { \"$my_originator\", (void *) 0 },"
2450
2451 case $need_lib_prefix in
2452 no)
2453 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
2454 ;;
2455 *)
2456 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
2457 ;;
2458 esac
2459 $ECHO >> "$output_objdir/$my_dlsyms" "\
2460 {0, (void *) 0}
2461 };
2462
2463 /* This works around a problem in FreeBSD linker */
2464 #ifdef FREEBSD_WORKAROUND
2465 static const void *lt_preloaded_setup() {
2466 return lt_${my_prefix}_LTX_preloaded_symbols;
2467 }
2468 #endif
2469
2470 #ifdef __cplusplus
2471 }
2472 #endif\
2473 "
2474 } # !$opt_dry_run
2475
2476 pic_flag_for_symtable=
2477 case "$compile_command " in
2478 *" -static "*) ;;
2479 *)
2480 case $host in
2481 # compiling the symbol table file with pic_flag works around
2482 # a FreeBSD bug that causes programs to crash when -lm is
2483 # linked before any other PIC object. But we must not use
2484 # pic_flag when linking with -static. The problem exists in
2485 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
2486 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
2487 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
2488 *-*-hpux*)
2489 pic_flag_for_symtable=" $pic_flag" ;;
2490 *)
2491 if test "X$my_pic_p" != Xno; then
2492 pic_flag_for_symtable=" $pic_flag"
2493 fi
2494 ;;
2495 esac
2496 ;;
2497 esac
2498 symtab_cflags=
2499 for arg in $LTCFLAGS; do
2500 case $arg in
2501 -pie | -fpie | -fPIE) ;;
2502 *) symtab_cflags="$symtab_cflags $arg" ;;
2503 esac
2504 done
2505
2506 # Now compile the dynamic symbol file.
2507 func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
2508
2509 # Clean up the generated files.
2510 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
2511
2512 # Transform the symbol file into the correct name.
2513 symfileobj="$output_objdir/${my_outputname}S.$objext"
2514 case $host in
2515 *cygwin* | *mingw* | *cegcc* )
2516 if test -f "$output_objdir/$my_outputname.def"; then
2517 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2518 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2519 else
2520 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2521 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2522 fi
2523 ;;
2524 *)
2525 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2526 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2527 ;;
2528 esac
2529 ;;
2530 *)
2531 func_fatal_error "unknown suffix for \`$my_dlsyms'"
2532 ;;
2533 esac
2534 else
2535 # We keep going just in case the user didn't refer to
2536 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
2537 # really was required.
2538
2539 # Nullify the symbol file.
2540 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
2541 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
2542 fi
2543 }
2544
2545 # func_win32_libid arg
2546 # return the library type of file 'arg'
2547 #
2548 # Need a lot of goo to handle *both* DLLs and import libs
2549 # Has to be a shell function in order to 'eat' the argument
2550 # that is supplied when $file_magic_command is called.
2551 func_win32_libid ()
2552 {
2553 $opt_debug
2554 win32_libid_type="unknown"
2555 win32_fileres=`file -L $1 2>/dev/null`
2556 case $win32_fileres in
2557 *ar\ archive\ import\ library*) # definitely import
2558 win32_libid_type="x86 archive import"
2559 ;;
2560 *ar\ archive*) # could be an import, or static
2561 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
2562 $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
2563 win32_nmres=`eval $NM -f posix -A $1 |
2564 $SED -n -e '
2565 1,100{
2566 / I /{
2567 s,.*,import,
2568 p
2569 q
2570 }
2571 }'`
2572 case $win32_nmres in
2573 import*) win32_libid_type="x86 archive import";;
2574 *) win32_libid_type="x86 archive static";;
2575 esac
2576 fi
2577 ;;
2578 *DLL*)
2579 win32_libid_type="x86 DLL"
2580 ;;
2581 *executable*) # but shell scripts are "executable" too...
2582 case $win32_fileres in
2583 *MS\ Windows\ PE\ Intel*)
2584 win32_libid_type="x86 DLL"
2585 ;;
2586 esac
2587 ;;
2588 esac
2589 $ECHO "$win32_libid_type"
2590 }
2591
2592
2593
2594 # func_extract_an_archive dir oldlib
2595 func_extract_an_archive ()
2596 {
2597 $opt_debug
2598 f_ex_an_ar_dir="$1"; shift
2599 f_ex_an_ar_oldlib="$1"
2600 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
2601 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
2602 :
2603 else
2604 func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
2605 fi
2606 }
2607
2608
2609 # func_extract_archives gentop oldlib ...
2610 func_extract_archives ()
2611 {
2612 $opt_debug
2613 my_gentop="$1"; shift
2614 my_oldlibs=${1+"$@"}
2615 my_oldobjs=""
2616 my_xlib=""
2617 my_xabs=""
2618 my_xdir=""
2619
2620 for my_xlib in $my_oldlibs; do
2621 # Extract the objects.
2622 case $my_xlib in
2623 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
2624 *) my_xabs=`pwd`"/$my_xlib" ;;
2625 esac
2626 func_basename "$my_xlib"
2627 my_xlib="$func_basename_result"
2628 my_xlib_u=$my_xlib
2629 while :; do
2630 case " $extracted_archives " in
2631 *" $my_xlib_u "*)
2632 func_arith $extracted_serial + 1
2633 extracted_serial=$func_arith_result
2634 my_xlib_u=lt$extracted_serial-$my_xlib ;;
2635 *) break ;;
2636 esac
2637 done
2638 extracted_archives="$extracted_archives $my_xlib_u"
2639 my_xdir="$my_gentop/$my_xlib_u"
2640
2641 func_mkdir_p "$my_xdir"
2642
2643 case $host in
2644 *-darwin*)
2645 func_verbose "Extracting $my_xabs"
2646 # Do not bother doing anything if just a dry run
2647 $opt_dry_run || {
2648 darwin_orig_dir=`pwd`
2649 cd $my_xdir || exit $?
2650 darwin_archive=$my_xabs
2651 darwin_curdir=`pwd`
2652 darwin_base_archive=`basename "$darwin_archive"`
2653 darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
2654 if test -n "$darwin_arches"; then
2655 darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
2656 darwin_arch=
2657 func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
2658 for darwin_arch in $darwin_arches ; do
2659 func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
2660 $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
2661 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
2662 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
2663 cd "$darwin_curdir"
2664 $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
2665 done # $darwin_arches
2666 ## Okay now we've a bunch of thin objects, gotta fatten them up :)
2667 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
2668 darwin_file=
2669 darwin_files=
2670 for darwin_file in $darwin_filelist; do
2671 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
2672 $LIPO -create -output "$darwin_file" $darwin_files
2673 done # $darwin_filelist
2674 $RM -rf unfat-$$
2675 cd "$darwin_orig_dir"
2676 else
2677 cd $darwin_orig_dir
2678 func_extract_an_archive "$my_xdir" "$my_xabs"
2679 fi # $darwin_arches
2680 } # !$opt_dry_run
2681 ;;
2682 *)
2683 func_extract_an_archive "$my_xdir" "$my_xabs"
2684 ;;
2685 esac
2686 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
2687 done
2688
2689 func_extract_archives_result="$my_oldobjs"
2690 }
2691
2692
2693
2694 # func_emit_wrapper_part1 [arg=no]
2695 #
2696 # Emit the first part of a libtool wrapper script on stdout.
2697 # For more information, see the description associated with
2698 # func_emit_wrapper(), below.
2699 func_emit_wrapper_part1 ()
2700 {
2701 func_emit_wrapper_part1_arg1=no
2702 if test -n "$1" ; then
2703 func_emit_wrapper_part1_arg1=$1
2704 fi
2705
2706 $ECHO "\
2707 #! $SHELL
2708
2709 # $output - temporary wrapper script for $objdir/$outputname
2710 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
2711 #
2712 # The $output program cannot be directly executed until all the libtool
2713 # libraries that it depends on are installed.
2714 #
2715 # This wrapper script should never be moved out of the build directory.
2716 # If it is, it will not operate correctly.
2717
2718 # Sed substitution that helps us do robust quoting. It backslashifies
2719 # metacharacters that are still active within double-quoted strings.
2720 Xsed='${SED} -e 1s/^X//'
2721 sed_quote_subst='$sed_quote_subst'
2722
2723 # Be Bourne compatible
2724 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
2725 emulate sh
2726 NULLCMD=:
2727 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
2728 # is contrary to our usage. Disable this feature.
2729 alias -g '\${1+\"\$@\"}'='\"\$@\"'
2730 setopt NO_GLOB_SUBST
2731 else
2732 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
2733 fi
2734 BIN_SH=xpg4; export BIN_SH # for Tru64
2735 DUALCASE=1; export DUALCASE # for MKS sh
2736
2737 # The HP-UX ksh and POSIX shell print the target directory to stdout
2738 # if CDPATH is set.
2739 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2740
2741 relink_command=\"$relink_command\"
2742
2743 # This environment variable determines our operation mode.
2744 if test \"\$libtool_install_magic\" = \"$magic\"; then
2745 # install mode needs the following variables:
2746 generated_by_libtool_version='$macro_version'
2747 notinst_deplibs='$notinst_deplibs'
2748 else
2749 # When we are sourced in execute mode, \$file and \$ECHO are already set.
2750 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2751 ECHO=\"$qecho\"
2752 file=\"\$0\"
2753 # Make sure echo works.
2754 if test \"X\$1\" = X--no-reexec; then
2755 # Discard the --no-reexec flag, and continue.
2756 shift
2757 elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
2758 # Yippee, \$ECHO works!
2759 :
2760 else
2761 # Restart under the correct shell, and then maybe \$ECHO will work.
2762 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
2763 fi
2764 fi\
2765 "
2766 $ECHO "\
2767
2768 # Find the directory that this script lives in.
2769 thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
2770 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
2771
2772 # Follow symbolic links until we get to the real thisdir.
2773 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
2774 while test -n \"\$file\"; do
2775 destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
2776
2777 # If there was a directory component, then change thisdir.
2778 if test \"x\$destdir\" != \"x\$file\"; then
2779 case \"\$destdir\" in
2780 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
2781 *) thisdir=\"\$thisdir/\$destdir\" ;;
2782 esac
2783 fi
2784
2785 file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2786 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
2787 done
2788 "
2789 }
2790 # end: func_emit_wrapper_part1
2791
2792 # func_emit_wrapper_part2 [arg=no]
2793 #
2794 # Emit the second part of a libtool wrapper script on stdout.
2795 # For more information, see the description associated with
2796 # func_emit_wrapper(), below.
2797 func_emit_wrapper_part2 ()
2798 {
2799 func_emit_wrapper_part2_arg1=no
2800 if test -n "$1" ; then
2801 func_emit_wrapper_part2_arg1=$1
2802 fi
2803
2804 $ECHO "\
2805
2806 # Usually 'no', except on cygwin/mingw when embedded into
2807 # the cwrapper.
2808 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
2809 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
2810 # special case for '.'
2811 if test \"\$thisdir\" = \".\"; then
2812 thisdir=\`pwd\`
2813 fi
2814 # remove .libs from thisdir
2815 case \"\$thisdir\" in
2816 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
2817 $objdir ) thisdir=. ;;
2818 esac
2819 fi
2820
2821 # Try to get the absolute directory name.
2822 absdir=\`cd \"\$thisdir\" && pwd\`
2823 test -n \"\$absdir\" && thisdir=\"\$absdir\"
2824 "
2825
2826 if test "$fast_install" = yes; then
2827 $ECHO "\
2828 program=lt-'$outputname'$exeext
2829 progdir=\"\$thisdir/$objdir\"
2830
2831 if test ! -f \"\$progdir/\$program\" ||
2832 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
2833 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
2834
2835 file=\"\$\$-\$program\"
2836
2837 if test ! -d \"\$progdir\"; then
2838 $MKDIR \"\$progdir\"
2839 else
2840 $RM \"\$progdir/\$file\"
2841 fi"
2842
2843 $ECHO "\
2844
2845 # relink executable if necessary
2846 if test -n \"\$relink_command\"; then
2847 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
2848 else
2849 $ECHO \"\$relink_command_output\" >&2
2850 $RM \"\$progdir/\$file\"
2851 exit 1
2852 fi
2853 fi
2854
2855 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
2856 { $RM \"\$progdir/\$program\";
2857 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
2858 $RM \"\$progdir/\$file\"
2859 fi"
2860 else
2861 $ECHO "\
2862 program='$outputname'
2863 progdir=\"\$thisdir/$objdir\"
2864 "
2865 fi
2866
2867 $ECHO "\
2868
2869 if test -f \"\$progdir/\$program\"; then"
2870
2871 # Export our shlibpath_var if we have one.
2872 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
2873 $ECHO "\
2874 # Add our own library path to $shlibpath_var
2875 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
2876
2877 # Some systems cannot cope with colon-terminated $shlibpath_var
2878 # The second colon is a workaround for a bug in BeOS R4 sed
2879 $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
2880
2881 export $shlibpath_var
2882 "
2883 fi
2884
2885 # fixup the dll searchpath if we need to.
2886 if test -n "$dllsearchpath"; then
2887 $ECHO "\
2888 # Add the dll search path components to the executable PATH
2889 PATH=$dllsearchpath:\$PATH
2890 "
2891 fi
2892
2893 $ECHO "\
2894 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2895 # Run the actual program with our arguments.
2896 "
2897 case $host in
2898 # Backslashes separate directories on plain windows
2899 *-*-mingw | *-*-os2* | *-cegcc*)
2900 $ECHO "\
2901 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
2902 "
2903 ;;
2904
2905 *)
2906 $ECHO "\
2907 exec \"\$progdir/\$program\" \${1+\"\$@\"}
2908 "
2909 ;;
2910 esac
2911 $ECHO "\
2912 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
2913 exit 1
2914 fi
2915 else
2916 # The program doesn't exist.
2917 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
2918 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
2919 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
2920 exit 1
2921 fi
2922 fi\
2923 "
2924 }
2925 # end: func_emit_wrapper_part2
2926
2927
2928 # func_emit_wrapper [arg=no]
2929 #
2930 # Emit a libtool wrapper script on stdout.
2931 # Don't directly open a file because we may want to
2932 # incorporate the script contents within a cygwin/mingw
2933 # wrapper executable. Must ONLY be called from within
2934 # func_mode_link because it depends on a number of variables
2935 # set therein.
2936 #
2937 # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
2938 # variable will take. If 'yes', then the emitted script
2939 # will assume that the directory in which it is stored is
2940 # the $objdir directory. This is a cygwin/mingw-specific
2941 # behavior.
2942 func_emit_wrapper ()
2943 {
2944 func_emit_wrapper_arg1=no
2945 if test -n "$1" ; then
2946 func_emit_wrapper_arg1=$1
2947 fi
2948
2949 # split this up so that func_emit_cwrapperexe_src
2950 # can call each part independently.
2951 func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
2952 func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
2953 }
2954
2955
2956 # func_to_host_path arg
2957 #
2958 # Convert paths to host format when used with build tools.
2959 # Intended for use with "native" mingw (where libtool itself
2960 # is running under the msys shell), or in the following cross-
2961 # build environments:
2962 # $build $host
2963 # mingw (msys) mingw [e.g. native]
2964 # cygwin mingw
2965 # *nix + wine mingw
2966 # where wine is equipped with the `winepath' executable.
2967 # In the native mingw case, the (msys) shell automatically
2968 # converts paths for any non-msys applications it launches,
2969 # but that facility isn't available from inside the cwrapper.
2970 # Similar accommodations are necessary for $host mingw and
2971 # $build cygwin. Calling this function does no harm for other
2972 # $host/$build combinations not listed above.
2973 #
2974 # ARG is the path (on $build) that should be converted to
2975 # the proper representation for $host. The result is stored
2976 # in $func_to_host_path_result.
2977 func_to_host_path ()
2978 {
2979 func_to_host_path_result="$1"
2980 if test -n "$1" ; then
2981 case $host in
2982 *mingw* )
2983 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
2984 case $build in
2985 *mingw* ) # actually, msys
2986 # awkward: cmd appends spaces to result
2987 lt_sed_strip_trailing_spaces="s/[ ]*\$//"
2988 func_to_host_path_tmp1=`( cmd //c echo "$1" |\
2989 $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
2990 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
2991 $SED -e "$lt_sed_naive_backslashify"`
2992 ;;
2993 *cygwin* )
2994 func_to_host_path_tmp1=`cygpath -w "$1"`
2995 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
2996 $SED -e "$lt_sed_naive_backslashify"`
2997 ;;
2998 * )
2999 # Unfortunately, winepath does not exit with a non-zero
3000 # error code, so we are forced to check the contents of
3001 # stdout. On the other hand, if the command is not
3002 # found, the shell will set an exit code of 127 and print
3003 # *an error message* to stdout. So we must check for both
3004 # error code of zero AND non-empty stdout, which explains
3005 # the odd construction:
3006 func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
3007 if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
3008 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
3009 $SED -e "$lt_sed_naive_backslashify"`
3010 else
3011 # Allow warning below.
3012 func_to_host_path_result=""
3013 fi
3014 ;;
3015 esac
3016 if test -z "$func_to_host_path_result" ; then
3017 func_error "Could not determine host path corresponding to"
3018 func_error " '$1'"
3019 func_error "Continuing, but uninstalled executables may not work."
3020 # Fallback:
3021 func_to_host_path_result="$1"
3022 fi
3023 ;;
3024 esac
3025 fi
3026 }
3027 # end: func_to_host_path
3028
3029 # func_to_host_pathlist arg
3030 #
3031 # Convert pathlists to host format when used with build tools.
3032 # See func_to_host_path(), above. This function supports the
3033 # following $build/$host combinations (but does no harm for
3034 # combinations not listed here):
3035 # $build $host
3036 # mingw (msys) mingw [e.g. native]
3037 # cygwin mingw
3038 # *nix + wine mingw
3039 #
3040 # Path separators are also converted from $build format to
3041 # $host format. If ARG begins or ends with a path separator
3042 # character, it is preserved (but converted to $host format)
3043 # on output.
3044 #
3045 # ARG is a pathlist (on $build) that should be converted to
3046 # the proper representation on $host. The result is stored
3047 # in $func_to_host_pathlist_result.
3048 func_to_host_pathlist ()
3049 {
3050 func_to_host_pathlist_result="$1"
3051 if test -n "$1" ; then
3052 case $host in
3053 *mingw* )
3054 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3055 # Remove leading and trailing path separator characters from
3056 # ARG. msys behavior is inconsistent here, cygpath turns them
3057 # into '.;' and ';.', and winepath ignores them completely.
3058 func_to_host_pathlist_tmp2="$1"
3059 # Once set for this call, this variable should not be
3060 # reassigned. It is used in tha fallback case.
3061 func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
3062 $SED -e 's|^:*||' -e 's|:*$||'`
3063 case $build in
3064 *mingw* ) # Actually, msys.
3065 # Awkward: cmd appends spaces to result.
3066 lt_sed_strip_trailing_spaces="s/[ ]*\$//"
3067 func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
3068 $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
3069 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3070 $SED -e "$lt_sed_naive_backslashify"`
3071 ;;
3072 *cygwin* )
3073 func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
3074 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3075 $SED -e "$lt_sed_naive_backslashify"`
3076 ;;
3077 * )
3078 # unfortunately, winepath doesn't convert pathlists
3079 func_to_host_pathlist_result=""
3080 func_to_host_pathlist_oldIFS=$IFS
3081 IFS=:
3082 for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
3083 IFS=$func_to_host_pathlist_oldIFS
3084 if test -n "$func_to_host_pathlist_f" ; then
3085 func_to_host_path "$func_to_host_pathlist_f"
3086 if test -n "$func_to_host_path_result" ; then
3087 if test -z "$func_to_host_pathlist_result" ; then
3088 func_to_host_pathlist_result="$func_to_host_path_result"
3089 else
3090 func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
3091 fi
3092 fi
3093 fi
3094 IFS=:
3095 done
3096 IFS=$func_to_host_pathlist_oldIFS
3097 ;;
3098 esac
3099 if test -z "$func_to_host_pathlist_result" ; then
3100 func_error "Could not determine the host path(s) corresponding to"
3101 func_error " '$1'"
3102 func_error "Continuing, but uninstalled executables may not work."
3103 # Fallback. This may break if $1 contains DOS-style drive
3104 # specifications. The fix is not to complicate the expression
3105 # below, but for the user to provide a working wine installation
3106 # with winepath so that path translation in the cross-to-mingw
3107 # case works properly.
3108 lt_replace_pathsep_nix_to_dos="s|:|;|g"
3109 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
3110 $SED -e "$lt_replace_pathsep_nix_to_dos"`
3111 fi
3112 # Now, add the leading and trailing path separators back
3113 case "$1" in
3114 :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
3115 ;;
3116 esac
3117 case "$1" in
3118 *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
3119 ;;
3120 esac
3121 ;;
3122 esac
3123 fi
3124 }
3125 # end: func_to_host_pathlist
3126
3127 # func_emit_cwrapperexe_src
3128 # emit the source code for a wrapper executable on stdout
3129 # Must ONLY be called from within func_mode_link because
3130 # it depends on a number of variable set therein.
3131 func_emit_cwrapperexe_src ()
3132 {
3133 cat <<EOF
3134
3135 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
3136 Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
3137
3138 The $output program cannot be directly executed until all the libtool
3139 libraries that it depends on are installed.
3140
3141 This wrapper executable should never be moved out of the build directory.
3142 If it is, it will not operate correctly.
3143
3144 Currently, it simply execs the wrapper *script* "$SHELL $output",
3145 but could eventually absorb all of the scripts functionality and
3146 exec $objdir/$outputname directly.
3147 */
3148 EOF
3149 cat <<"EOF"
3150 #include <stdio.h>
3151 #include <stdlib.h>
3152 #ifdef _MSC_VER
3153 # include <direct.h>
3154 # include <process.h>
3155 # include <io.h>
3156 # define setmode _setmode
3157 #else
3158 # include <unistd.h>
3159 # include <stdint.h>
3160 # ifdef __CYGWIN__
3161 # include <io.h>
3162 # define HAVE_SETENV
3163 # ifdef __STRICT_ANSI__
3164 char *realpath (const char *, char *);
3165 int putenv (char *);
3166 int setenv (const char *, const char *, int);
3167 # endif
3168 # endif
3169 #endif
3170 #include <malloc.h>
3171 #include <stdarg.h>
3172 #include <assert.h>
3173 #include <string.h>
3174 #include <ctype.h>
3175 #include <errno.h>
3176 #include <fcntl.h>
3177 #include <sys/stat.h>
3178
3179 #if defined(PATH_MAX)
3180 # define LT_PATHMAX PATH_MAX
3181 #elif defined(MAXPATHLEN)
3182 # define LT_PATHMAX MAXPATHLEN
3183 #else
3184 # define LT_PATHMAX 1024
3185 #endif
3186
3187 #ifndef S_IXOTH
3188 # define S_IXOTH 0
3189 #endif
3190 #ifndef S_IXGRP
3191 # define S_IXGRP 0
3192 #endif
3193
3194 #ifdef _MSC_VER
3195 # define S_IXUSR _S_IEXEC
3196 # define stat _stat
3197 # ifndef _INTPTR_T_DEFINED
3198 # define intptr_t int
3199 # endif
3200 #endif
3201
3202 #ifndef DIR_SEPARATOR
3203 # define DIR_SEPARATOR '/'
3204 # define PATH_SEPARATOR ':'
3205 #endif
3206
3207 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
3208 defined (__OS2__)
3209 # define HAVE_DOS_BASED_FILE_SYSTEM
3210 # define FOPEN_WB "wb"
3211 # ifndef DIR_SEPARATOR_2
3212 # define DIR_SEPARATOR_2 '\\'
3213 # endif
3214 # ifndef PATH_SEPARATOR_2
3215 # define PATH_SEPARATOR_2 ';'
3216 # endif
3217 #endif
3218
3219 #ifndef DIR_SEPARATOR_2
3220 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
3221 #else /* DIR_SEPARATOR_2 */
3222 # define IS_DIR_SEPARATOR(ch) \
3223 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
3224 #endif /* DIR_SEPARATOR_2 */
3225
3226 #ifndef PATH_SEPARATOR_2
3227 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
3228 #else /* PATH_SEPARATOR_2 */
3229 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
3230 #endif /* PATH_SEPARATOR_2 */
3231
3232 #ifdef __CYGWIN__
3233 # define FOPEN_WB "wb"
3234 #endif
3235
3236 #ifndef FOPEN_WB
3237 # define FOPEN_WB "w"
3238 #endif
3239 #ifndef _O_BINARY
3240 # define _O_BINARY 0
3241 #endif
3242
3243 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
3244 #define XFREE(stale) do { \
3245 if (stale) { free ((void *) stale); stale = 0; } \
3246 } while (0)
3247
3248 #undef LTWRAPPER_DEBUGPRINTF
3249 #if defined DEBUGWRAPPER
3250 # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
3251 static void
3252 ltwrapper_debugprintf (const char *fmt, ...)
3253 {
3254 va_list args;
3255 va_start (args, fmt);
3256 (void) vfprintf (stderr, fmt, args);
3257 va_end (args);
3258 }
3259 #else
3260 # define LTWRAPPER_DEBUGPRINTF(args)
3261 #endif
3262
3263 const char *program_name = NULL;
3264
3265 void *xmalloc (size_t num);
3266 char *xstrdup (const char *string);
3267 const char *base_name (const char *name);
3268 char *find_executable (const char *wrapper);
3269 char *chase_symlinks (const char *pathspec);
3270 int make_executable (const char *path);
3271 int check_executable (const char *path);
3272 char *strendzap (char *str, const char *pat);
3273 void lt_fatal (const char *message, ...);
3274 void lt_setenv (const char *name, const char *value);
3275 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
3276 void lt_opt_process_env_set (const char *arg);
3277 void lt_opt_process_env_prepend (const char *arg);
3278 void lt_opt_process_env_append (const char *arg);
3279 int lt_split_name_value (const char *arg, char** name, char** value);
3280 void lt_update_exe_path (const char *name, const char *value);
3281 void lt_update_lib_path (const char *name, const char *value);
3282
3283 static const char *script_text_part1 =
3284 EOF
3285
3286 func_emit_wrapper_part1 yes |
3287 $SED -e 's/\([\\"]\)/\\\1/g' \
3288 -e 's/^/ "/' -e 's/$/\\n"/'
3289 echo ";"
3290 cat <<EOF
3291
3292 static const char *script_text_part2 =
3293 EOF
3294 func_emit_wrapper_part2 yes |
3295 $SED -e 's/\([\\"]\)/\\\1/g' \
3296 -e 's/^/ "/' -e 's/$/\\n"/'
3297 echo ";"
3298
3299 cat <<EOF
3300 const char * MAGIC_EXE = "$magic_exe";
3301 const char * LIB_PATH_VARNAME = "$shlibpath_var";
3302 EOF
3303
3304 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3305 func_to_host_pathlist "$temp_rpath"
3306 cat <<EOF
3307 const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
3308 EOF
3309 else
3310 cat <<"EOF"
3311 const char * LIB_PATH_VALUE = "";
3312 EOF
3313 fi
3314
3315 if test -n "$dllsearchpath"; then
3316 func_to_host_pathlist "$dllsearchpath:"
3317 cat <<EOF
3318 const char * EXE_PATH_VARNAME = "PATH";
3319 const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
3320 EOF
3321 else
3322 cat <<"EOF"
3323 const char * EXE_PATH_VARNAME = "";
3324 const char * EXE_PATH_VALUE = "";
3325 EOF
3326 fi
3327
3328 if test "$fast_install" = yes; then
3329 cat <<EOF
3330 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
3331 EOF
3332 else
3333 cat <<EOF
3334 const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
3335 EOF
3336 fi
3337
3338
3339 cat <<"EOF"
3340
3341 #define LTWRAPPER_OPTION_PREFIX "--lt-"
3342 #define LTWRAPPER_OPTION_PREFIX_LENGTH 5
3343
3344 static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
3345 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
3346
3347 static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
3348
3349 static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
3350 static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
3351 /* argument is putenv-style "foo=bar", value of foo is set to bar */
3352
3353 static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
3354 static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
3355 /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
3356
3357 static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
3358 static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
3359 /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
3360
3361 int
3362 main (int argc, char *argv[])
3363 {
3364 char **newargz;
3365 int newargc;
3366 char *tmp_pathspec;
3367 char *actual_cwrapper_path;
3368 char *actual_cwrapper_name;
3369 char *target_name;
3370 char *lt_argv_zero;
3371 intptr_t rval = 127;
3372
3373 int i;
3374
3375 program_name = (char *) xstrdup (base_name (argv[0]));
3376 LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
3377 LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
3378
3379 /* very simple arg parsing; don't want to rely on getopt */
3380 for (i = 1; i < argc; i++)
3381 {
3382 if (strcmp (argv[i], dumpscript_opt) == 0)
3383 {
3384 EOF
3385 case "$host" in
3386 *mingw* | *cygwin* )
3387 # make stdout use "unix" line endings
3388 echo " setmode(1,_O_BINARY);"
3389 ;;
3390 esac
3391
3392 cat <<"EOF"
3393 printf ("%s", script_text_part1);
3394 printf ("%s", script_text_part2);
3395 return 0;
3396 }
3397 }
3398
3399 newargz = XMALLOC (char *, argc + 1);
3400 tmp_pathspec = find_executable (argv[0]);
3401 if (tmp_pathspec == NULL)
3402 lt_fatal ("Couldn't find %s", argv[0]);
3403 LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
3404 tmp_pathspec));
3405
3406 actual_cwrapper_path = chase_symlinks (tmp_pathspec);
3407 LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
3408 actual_cwrapper_path));
3409 XFREE (tmp_pathspec);
3410
3411 actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
3412 strendzap (actual_cwrapper_path, actual_cwrapper_name);
3413
3414 /* wrapper name transforms */
3415 strendzap (actual_cwrapper_name, ".exe");
3416 tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
3417 XFREE (actual_cwrapper_name);
3418 actual_cwrapper_name = tmp_pathspec;
3419 tmp_pathspec = 0;
3420
3421 /* target_name transforms -- use actual target program name; might have lt- prefix */
3422 target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
3423 strendzap (target_name, ".exe");
3424 tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
3425 XFREE (target_name);
3426 target_name = tmp_pathspec;
3427 tmp_pathspec = 0;
3428
3429 LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
3430 target_name));
3431 EOF
3432
3433 cat <<EOF
3434 newargz[0] =
3435 XMALLOC (char, (strlen (actual_cwrapper_path) +
3436 strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
3437 strcpy (newargz[0], actual_cwrapper_path);
3438 strcat (newargz[0], "$objdir");
3439 strcat (newargz[0], "/");
3440 EOF
3441
3442 cat <<"EOF"
3443 /* stop here, and copy so we don't have to do this twice */
3444 tmp_pathspec = xstrdup (newargz[0]);
3445
3446 /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
3447 strcat (newargz[0], actual_cwrapper_name);
3448
3449 /* DO want the lt- prefix here if it exists, so use target_name */
3450 lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
3451 XFREE (tmp_pathspec);
3452 tmp_pathspec = NULL;
3453 EOF
3454
3455 case $host_os in
3456 mingw*)
3457 cat <<"EOF"
3458 {
3459 char* p;
3460 while ((p = strchr (newargz[0], '\\')) != NULL)
3461 {
3462 *p = '/';
3463 }
3464 while ((p = strchr (lt_argv_zero, '\\')) != NULL)
3465 {
3466 *p = '/';
3467 }
3468 }
3469 EOF
3470 ;;
3471 esac
3472
3473 cat <<"EOF"
3474 XFREE (target_name);
3475 XFREE (actual_cwrapper_path);
3476 XFREE (actual_cwrapper_name);
3477
3478 lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
3479 lt_setenv ("DUALCASE", "1"); /* for MSK sh */
3480 lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
3481 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
3482
3483 newargc=0;
3484 for (i = 1; i < argc; i++)
3485 {
3486 if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
3487 {
3488 if (argv[i][env_set_opt_len] == '=')
3489 {
3490 const char *p = argv[i] + env_set_opt_len + 1;
3491 lt_opt_process_env_set (p);
3492 }
3493 else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
3494 {
3495 lt_opt_process_env_set (argv[++i]); /* don't copy */
3496 }
3497 else
3498 lt_fatal ("%s missing required argument", env_set_opt);
3499 continue;
3500 }
3501 if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
3502 {
3503 if (argv[i][env_prepend_opt_len] == '=')
3504 {
3505 const char *p = argv[i] + env_prepend_opt_len + 1;
3506 lt_opt_process_env_prepend (p);
3507 }
3508 else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
3509 {
3510 lt_opt_process_env_prepend (argv[++i]); /* don't copy */
3511 }
3512 else
3513 lt_fatal ("%s missing required argument", env_prepend_opt);
3514 continue;
3515 }
3516 if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
3517 {
3518 if (argv[i][env_append_opt_len] == '=')
3519 {
3520 const char *p = argv[i] + env_append_opt_len + 1;
3521 lt_opt_process_env_append (p);
3522 }
3523 else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
3524 {
3525 lt_opt_process_env_append (argv[++i]); /* don't copy */
3526 }
3527 else
3528 lt_fatal ("%s missing required argument", env_append_opt);
3529 continue;
3530 }
3531 if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
3532 {
3533 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
3534 namespace, but it is not one of the ones we know about and
3535 have already dealt with, above (inluding dump-script), then
3536 report an error. Otherwise, targets might begin to believe
3537 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
3538 namespace. The first time any user complains about this, we'll
3539 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
3540 or a configure.ac-settable value.
3541 */
3542 lt_fatal ("Unrecognized option in %s namespace: '%s'",
3543 ltwrapper_option_prefix, argv[i]);
3544 }
3545 /* otherwise ... */
3546 newargz[++newargc] = xstrdup (argv[i]);
3547 }
3548 newargz[++newargc] = NULL;
3549
3550 LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
3551 for (i = 0; i < newargc; i++)
3552 {
3553 LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
3554 }
3555
3556 EOF
3557
3558 case $host_os in
3559 mingw*)
3560 cat <<"EOF"
3561 /* execv doesn't actually work on mingw as expected on unix */
3562 rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
3563 if (rval == -1)
3564 {
3565 /* failed to start process */
3566 LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
3567 return 127;
3568 }
3569 return rval;
3570 EOF
3571 ;;
3572 *)
3573 cat <<"EOF"
3574 execv (lt_argv_zero, newargz);
3575 return rval; /* =127, but avoids unused variable warning */
3576 EOF
3577 ;;
3578 esac
3579
3580 cat <<"EOF"
3581 }
3582
3583 void *
3584 xmalloc (size_t num)
3585 {
3586 void *p = (void *) malloc (num);
3587 if (!p)
3588 lt_fatal ("Memory exhausted");
3589
3590 return p;
3591 }
3592
3593 char *
3594 xstrdup (const char *string)
3595 {
3596 return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
3597 string) : NULL;
3598 }
3599
3600 const char *
3601 base_name (const char *name)
3602 {
3603 const char *base;
3604
3605 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
3606 /* Skip over the disk name in MSDOS pathnames. */
3607 if (isalpha ((unsigned char) name[0]) && name[1] == ':')
3608 name += 2;
3609 #endif
3610
3611 for (base = name; *name; name++)
3612 if (IS_DIR_SEPARATOR (*name))
3613 base = name + 1;
3614 return base;
3615 }
3616
3617 int
3618 check_executable (const char *path)
3619 {
3620 struct stat st;
3621
3622 LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
3623 path ? (*path ? path : "EMPTY!") : "NULL!"));
3624 if ((!path) || (!*path))
3625 return 0;
3626
3627 if ((stat (path, &st) >= 0)
3628 && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
3629 return 1;
3630 else
3631 return 0;
3632 }
3633
3634 int
3635 make_executable (const char *path)
3636 {
3637 int rval = 0;
3638 struct stat st;
3639
3640 LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
3641 path ? (*path ? path : "EMPTY!") : "NULL!"));
3642 if ((!path) || (!*path))
3643 return 0;
3644
3645 if (stat (path, &st) >= 0)
3646 {
3647 rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
3648 }
3649 return rval;
3650 }
3651
3652 /* Searches for the full path of the wrapper. Returns
3653 newly allocated full path name if found, NULL otherwise
3654 Does not chase symlinks, even on platforms that support them.
3655 */
3656 char *
3657 find_executable (const char *wrapper)
3658 {
3659 int has_slash = 0;
3660 const char *p;
3661 const char *p_next;
3662 /* static buffer for getcwd */
3663 char tmp[LT_PATHMAX + 1];
3664 int tmp_len;
3665 char *concat_name;
3666
3667 LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
3668 wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
3669
3670 if ((wrapper == NULL) || (*wrapper == '\0'))
3671 return NULL;
3672
3673 /* Absolute path? */
3674 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
3675 if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
3676 {
3677 concat_name = xstrdup (wrapper);
3678 if (check_executable (concat_name))
3679 return concat_name;
3680 XFREE (concat_name);
3681 }
3682 else
3683 {
3684 #endif
3685 if (IS_DIR_SEPARATOR (wrapper[0]))
3686 {
3687 concat_name = xstrdup (wrapper);
3688 if (check_executable (concat_name))
3689 return concat_name;
3690 XFREE (concat_name);
3691 }
3692 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
3693 }
3694 #endif
3695
3696 for (p = wrapper; *p; p++)
3697 if (*p == '/')
3698 {
3699 has_slash = 1;
3700 break;
3701 }
3702 if (!has_slash)
3703 {
3704 /* no slashes; search PATH */
3705 const char *path = getenv ("PATH");
3706 if (path != NULL)
3707 {
3708 for (p = path; *p; p = p_next)
3709 {
3710 const char *q;
3711 size_t p_len;
3712 for (q = p; *q; q++)
3713 if (IS_PATH_SEPARATOR (*q))
3714 break;
3715 p_len = q - p;
3716 p_next = (*q == '\0' ? q : q + 1);
3717 if (p_len == 0)
3718 {
3719 /* empty path: current directory */
3720 if (getcwd (tmp, LT_PATHMAX) == NULL)
3721 lt_fatal ("getcwd failed");
3722 tmp_len = strlen (tmp);
3723 concat_name =
3724 XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
3725 memcpy (concat_name, tmp, tmp_len);
3726 concat_name[tmp_len] = '/';
3727 strcpy (concat_name + tmp_len + 1, wrapper);
3728 }
3729 else
3730 {
3731 concat_name =
3732 XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
3733 memcpy (concat_name, p, p_len);
3734 concat_name[p_len] = '/';
3735 strcpy (concat_name + p_len + 1, wrapper);
3736 }
3737 if (check_executable (concat_name))
3738 return concat_name;
3739 XFREE (concat_name);
3740 }
3741 }
3742 /* not found in PATH; assume curdir */
3743 }
3744 /* Relative path | not found in path: prepend cwd */
3745 if (getcwd (tmp, LT_PATHMAX) == NULL)
3746 lt_fatal ("getcwd failed");
3747 tmp_len = strlen (tmp);
3748 concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
3749 memcpy (concat_name, tmp, tmp_len);
3750 concat_name[tmp_len] = '/';
3751 strcpy (concat_name + tmp_len + 1, wrapper);
3752
3753 if (check_executable (concat_name))
3754 return concat_name;
3755 XFREE (concat_name);
3756 return NULL;
3757 }
3758
3759 char *
3760 chase_symlinks (const char *pathspec)
3761 {
3762 #ifndef S_ISLNK
3763 return xstrdup (pathspec);
3764 #else
3765 char buf[LT_PATHMAX];
3766 struct stat s;
3767 char *tmp_pathspec = xstrdup (pathspec);
3768 char *p;
3769 int has_symlinks = 0;
3770 while (strlen (tmp_pathspec) && !has_symlinks)
3771 {
3772 LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
3773 tmp_pathspec));
3774 if (lstat (tmp_pathspec, &s) == 0)
3775 {
3776 if (S_ISLNK (s.st_mode) != 0)
3777 {
3778 has_symlinks = 1;
3779 break;
3780 }
3781
3782 /* search backwards for last DIR_SEPARATOR */
3783 p = tmp_pathspec + strlen (tmp_pathspec) - 1;
3784 while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
3785 p--;
3786 if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
3787 {
3788 /* no more DIR_SEPARATORS left */
3789 break;
3790 }
3791 *p = '\0';
3792 }
3793 else
3794 {
3795 char *errstr = strerror (errno);
3796 lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
3797 }
3798 }
3799 XFREE (tmp_pathspec);
3800
3801 if (!has_symlinks)
3802 {
3803 return xstrdup (pathspec);
3804 }
3805
3806 tmp_pathspec = realpath (pathspec, buf);
3807 if (tmp_pathspec == 0)
3808 {
3809 lt_fatal ("Could not follow symlinks for %s", pathspec);
3810 }
3811 return xstrdup (tmp_pathspec);
3812 #endif
3813 }
3814
3815 char *
3816 strendzap (char *str, const char *pat)
3817 {
3818 size_t len, patlen;
3819
3820 assert (str != NULL);
3821 assert (pat != NULL);
3822
3823 len = strlen (str);
3824 patlen = strlen (pat);
3825
3826 if (patlen <= len)
3827 {
3828 str += len - patlen;
3829 if (strcmp (str, pat) == 0)
3830 *str = '\0';
3831 }
3832 return str;
3833 }
3834
3835 static void
3836 lt_error_core (int exit_status, const char *mode,
3837 const char *message, va_list ap)
3838 {
3839 fprintf (stderr, "%s: %s: ", program_name, mode);
3840 vfprintf (stderr, message, ap);
3841 fprintf (stderr, ".\n");
3842
3843 if (exit_status >= 0)
3844 exit (exit_status);
3845 }
3846
3847 void
3848 lt_fatal (const char *message, ...)
3849 {
3850 va_list ap;
3851 va_start (ap, message);
3852 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
3853 va_end (ap);
3854 }
3855
3856 void
3857 lt_setenv (const char *name, const char *value)
3858 {
3859 LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
3860 (name ? name : "<NULL>"),
3861 (value ? value : "<NULL>")));
3862 {
3863 #ifdef HAVE_SETENV
3864 /* always make a copy, for consistency with !HAVE_SETENV */
3865 char *str = xstrdup (value);
3866 setenv (name, str, 1);
3867 #else
3868 int len = strlen (name) + 1 + strlen (value) + 1;
3869 char *str = XMALLOC (char, len);
3870 sprintf (str, "%s=%s", name, value);
3871 if (putenv (str) != EXIT_SUCCESS)
3872 {
3873 XFREE (str);
3874 }
3875 #endif
3876 }
3877 }
3878
3879 char *
3880 lt_extend_str (const char *orig_value, const char *add, int to_end)
3881 {
3882 char *new_value;
3883 if (orig_value && *orig_value)
3884 {
3885 int orig_value_len = strlen (orig_value);
3886 int add_len = strlen (add);
3887 new_value = XMALLOC (char, add_len + orig_value_len + 1);
3888 if (to_end)
3889 {
3890 strcpy (new_value, orig_value);
3891 strcpy (new_value + orig_value_len, add);
3892 }
3893 else
3894 {
3895 strcpy (new_value, add);
3896 strcpy (new_value + add_len, orig_value);
3897 }
3898 }
3899 else
3900 {
3901 new_value = xstrdup (add);
3902 }
3903 return new_value;
3904 }
3905
3906 int
3907 lt_split_name_value (const char *arg, char** name, char** value)
3908 {
3909 const char *p;
3910 int len;
3911 if (!arg || !*arg)
3912 return 1;
3913
3914 p = strchr (arg, (int)'=');
3915
3916 if (!p)
3917 return 1;
3918
3919 *value = xstrdup (++p);
3920
3921 len = strlen (arg) - strlen (*value);
3922 *name = XMALLOC (char, len);
3923 strncpy (*name, arg, len-1);
3924 (*name)[len - 1] = '\0';
3925
3926 return 0;
3927 }
3928
3929 void
3930 lt_opt_process_env_set (const char *arg)
3931 {
3932 char *name = NULL;
3933 char *value = NULL;
3934
3935 if (lt_split_name_value (arg, &name, &value) != 0)
3936 {
3937 XFREE (name);
3938 XFREE (value);
3939 lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
3940 }
3941
3942 lt_setenv (name, value);
3943 XFREE (name);
3944 XFREE (value);
3945 }
3946
3947 void
3948 lt_opt_process_env_prepend (const char *arg)
3949 {
3950 char *name = NULL;
3951 char *value = NULL;
3952 char *new_value = NULL;
3953
3954 if (lt_split_name_value (arg, &name, &value) != 0)
3955 {
3956 XFREE (name);
3957 XFREE (value);
3958 lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
3959 }
3960
3961 new_value = lt_extend_str (getenv (name), value, 0);
3962 lt_setenv (name, new_value);
3963 XFREE (new_value);
3964 XFREE (name);
3965 XFREE (value);
3966 }
3967
3968 void
3969 lt_opt_process_env_append (const char *arg)
3970 {
3971 char *name = NULL;
3972 char *value = NULL;
3973 char *new_value = NULL;
3974
3975 if (lt_split_name_value (arg, &name, &value) != 0)
3976 {
3977 XFREE (name);
3978 XFREE (value);
3979 lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
3980 }
3981
3982 new_value = lt_extend_str (getenv (name), value, 1);
3983 lt_setenv (name, new_value);
3984 XFREE (new_value);
3985 XFREE (name);
3986 XFREE (value);
3987 }
3988
3989 void
3990 lt_update_exe_path (const char *name, const char *value)
3991 {
3992 LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
3993 (name ? name : "<NULL>"),
3994 (value ? value : "<NULL>")));
3995
3996 if (name && *name && value && *value)
3997 {
3998 char *new_value = lt_extend_str (getenv (name), value, 0);
3999 /* some systems can't cope with a ':'-terminated path #' */
4000 int len = strlen (new_value);
4001 while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
4002 {
4003 new_value[len-1] = '\0';
4004 }
4005 lt_setenv (name, new_value);
4006 XFREE (new_value);
4007 }
4008 }
4009
4010 void
4011 lt_update_lib_path (const char *name, const char *value)
4012 {
4013 LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4014 (name ? name : "<NULL>"),
4015 (value ? value : "<NULL>")));
4016
4017 if (name && *name && value && *value)
4018 {
4019 char *new_value = lt_extend_str (getenv (name), value, 0);
4020 lt_setenv (name, new_value);
4021 XFREE (new_value);
4022 }
4023 }
4024
4025
4026 EOF
4027 }
4028 # end: func_emit_cwrapperexe_src
4029
4030 # func_mode_link arg...
4031 func_mode_link ()
4032 {
4033 $opt_debug
4034 case $host in
4035 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
4036 # It is impossible to link a dll without this setting, and
4037 # we shouldn't force the makefile maintainer to figure out
4038 # which system we are compiling for in order to pass an extra
4039 # flag for every libtool invocation.
4040 # allow_undefined=no
4041
4042 # FIXME: Unfortunately, there are problems with the above when trying
4043 # to make a dll which has undefined symbols, in which case not
4044 # even a static library is built. For now, we need to specify
4045 # -no-undefined on the libtool link line when we can be certain
4046 # that all symbols are satisfied, otherwise we get a static library.
4047 allow_undefined=yes
4048 ;;
4049 *)
4050 allow_undefined=yes
4051 ;;
4052 esac
4053 libtool_args=$nonopt
4054 base_compile="$nonopt $@"
4055 compile_command=$nonopt
4056 finalize_command=$nonopt
4057
4058 compile_rpath=
4059 finalize_rpath=
4060 compile_shlibpath=
4061 finalize_shlibpath=
4062 convenience=
4063 old_convenience=
4064 deplibs=
4065 old_deplibs=
4066 compiler_flags=
4067 linker_flags=
4068 dllsearchpath=
4069 lib_search_path=`pwd`
4070 inst_prefix_dir=
4071 new_inherited_linker_flags=
4072
4073 avoid_version=no
4074 dlfiles=
4075 dlprefiles=
4076 dlself=no
4077 export_dynamic=no
4078 export_symbols=
4079 export_symbols_regex=
4080 generated=
4081 libobjs=
4082 ltlibs=
4083 module=no
4084 no_install=no
4085 objs=
4086 non_pic_objects=
4087 precious_files_regex=
4088 prefer_static_libs=no
4089 preload=no
4090 prev=
4091 prevarg=
4092 release=
4093 rpath=
4094 xrpath=
4095 perm_rpath=
4096 temp_rpath=
4097 thread_safe=no
4098 vinfo=
4099 vinfo_number=no
4100 weak_libs=
4101 single_module="${wl}-single_module"
4102 func_infer_tag $base_compile
4103
4104 # We need to know -static, to get the right output filenames.
4105 for arg
4106 do
4107 case $arg in
4108 -shared)
4109 test "$build_libtool_libs" != yes && \
4110 func_fatal_configuration "can not build a shared library"
4111 build_old_libs=no
4112 break
4113 ;;
4114 -all-static | -static | -static-libtool-libs)
4115 case $arg in
4116 -all-static)
4117 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
4118 func_warning "complete static linking is impossible in this configuration"
4119 fi
4120 if test -n "$link_static_flag"; then
4121 dlopen_self=$dlopen_self_static
4122 fi
4123 prefer_static_libs=yes
4124 ;;
4125 -static)
4126 if test -z "$pic_flag" && test -n "$link_static_flag"; then
4127 dlopen_self=$dlopen_self_static
4128 fi
4129 prefer_static_libs=built
4130 ;;
4131 -static-libtool-libs)
4132 if test -z "$pic_flag" && test -n "$link_static_flag"; then
4133 dlopen_self=$dlopen_self_static
4134 fi
4135 prefer_static_libs=yes
4136 ;;
4137 esac
4138 build_libtool_libs=no
4139 build_old_libs=yes
4140 break
4141 ;;
4142 esac
4143 done
4144
4145 # See if our shared archives depend on static archives.
4146 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
4147
4148 # Go through the arguments, transforming them on the way.
4149 while test "$#" -gt 0; do
4150 arg="$1"
4151 shift
4152 func_quote_for_eval "$arg"
4153 qarg=$func_quote_for_eval_unquoted_result
4154 func_append libtool_args " $func_quote_for_eval_result"
4155
4156 # If the previous option needs an argument, assign it.
4157 if test -n "$prev"; then
4158 case $prev in
4159 output)
4160 func_append compile_command " @OUTPUT@"
4161 func_append finalize_command " @OUTPUT@"
4162 ;;
4163 esac
4164
4165 case $prev in
4166 dlfiles|dlprefiles)
4167 if test "$preload" = no; then
4168 # Add the symbol object into the linking commands.
4169 func_append compile_command " @SYMFILE@"
4170 func_append finalize_command " @SYMFILE@"
4171 preload=yes
4172 fi
4173 case $arg in
4174 *.la | *.lo) ;; # We handle these cases below.
4175 force)
4176 if test "$dlself" = no; then
4177 dlself=needless
4178 export_dynamic=yes
4179 fi
4180 prev=
4181 continue
4182 ;;
4183 self)
4184 if test "$prev" = dlprefiles; then
4185 dlself=yes
4186 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
4187 dlself=yes
4188 else
4189 dlself=needless
4190 export_dynamic=yes
4191 fi
4192 prev=
4193 continue
4194 ;;
4195 *)
4196 if test "$prev" = dlfiles; then
4197 dlfiles="$dlfiles $arg"
4198 else
4199 dlprefiles="$dlprefiles $arg"
4200 fi
4201 prev=
4202 continue
4203 ;;
4204 esac
4205 ;;
4206 expsyms)
4207 export_symbols="$arg"
4208 test -f "$arg" \
4209 || func_fatal_error "symbol file \`$arg' does not exist"
4210 prev=
4211 continue
4212 ;;
4213 expsyms_regex)
4214 export_symbols_regex="$arg"
4215 prev=
4216 continue
4217 ;;
4218 framework)
4219 case $host in
4220 *-*-darwin*)
4221 case "$deplibs " in
4222 *" $qarg.ltframework "*) ;;
4223 *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
4224 ;;
4225 esac
4226 ;;
4227 esac
4228 prev=
4229 continue
4230 ;;
4231 inst_prefix)
4232 inst_prefix_dir="$arg"
4233 prev=
4234 continue
4235 ;;
4236 objectlist)
4237 if test -f "$arg"; then
4238 save_arg=$arg
4239 moreargs=
4240 for fil in `cat "$save_arg"`
4241 do
4242 # moreargs="$moreargs $fil"
4243 arg=$fil
4244 # A libtool-controlled object.
4245
4246 # Check to see that this really is a libtool object.
4247 if func_lalib_unsafe_p "$arg"; then
4248 pic_object=
4249 non_pic_object=
4250
4251 # Read the .lo file
4252 func_source "$arg"
4253
4254 if test -z "$pic_object" ||
4255 test -z "$non_pic_object" ||
4256 test "$pic_object" = none &&
4257 test "$non_pic_object" = none; then
4258 func_fatal_error "cannot find name of object for \`$arg'"
4259 fi
4260
4261 # Extract subdirectory from the argument.
4262 func_dirname "$arg" "/" ""
4263 xdir="$func_dirname_result"
4264
4265 if test "$pic_object" != none; then
4266 # Prepend the subdirectory the object is found in.
4267 pic_object="$xdir$pic_object"
4268
4269 if test "$prev" = dlfiles; then
4270 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4271 dlfiles="$dlfiles $pic_object"
4272 prev=
4273 continue
4274 else
4275 # If libtool objects are unsupported, then we need to preload.
4276 prev=dlprefiles
4277 fi
4278 fi
4279
4280 # CHECK ME: I think I busted this. -Ossama
4281 if test "$prev" = dlprefiles; then
4282 # Preload the old-style object.
4283 dlprefiles="$dlprefiles $pic_object"
4284 prev=
4285 fi
4286
4287 # A PIC object.
4288 func_append libobjs " $pic_object"
4289 arg="$pic_object"
4290 fi
4291
4292 # Non-PIC object.
4293 if test "$non_pic_object" != none; then
4294 # Prepend the subdirectory the object is found in.
4295 non_pic_object="$xdir$non_pic_object"
4296
4297 # A standard non-PIC object
4298 func_append non_pic_objects " $non_pic_object"
4299 if test -z "$pic_object" || test "$pic_object" = none ; then
4300 arg="$non_pic_object"
4301 fi
4302 else
4303 # If the PIC object exists, use it instead.
4304 # $xdir was prepended to $pic_object above.
4305 non_pic_object="$pic_object"
4306 func_append non_pic_objects " $non_pic_object"
4307 fi
4308 else
4309 # Only an error if not doing a dry-run.
4310 if $opt_dry_run; then
4311 # Extract subdirectory from the argument.
4312 func_dirname "$arg" "/" ""
4313 xdir="$func_dirname_result"
4314
4315 func_lo2o "$arg"
4316 pic_object=$xdir$objdir/$func_lo2o_result
4317 non_pic_object=$xdir$func_lo2o_result
4318 func_append libobjs " $pic_object"
4319 func_append non_pic_objects " $non_pic_object"
4320 else
4321 func_fatal_error "\`$arg' is not a valid libtool object"
4322 fi
4323 fi
4324 done
4325 else
4326 func_fatal_error "link input file \`$arg' does not exist"
4327 fi
4328 arg=$save_arg
4329 prev=
4330 continue
4331 ;;
4332 precious_regex)
4333 precious_files_regex="$arg"
4334 prev=
4335 continue
4336 ;;
4337 release)
4338 release="-$arg"
4339 prev=
4340 continue
4341 ;;
4342 rpath | xrpath)
4343 # We need an absolute path.
4344 case $arg in
4345 [\\/]* | [A-Za-z]:[\\/]*) ;;
4346 *)
4347 func_fatal_error "only absolute run-paths are allowed"
4348 ;;
4349 esac
4350 if test "$prev" = rpath; then
4351 case "$rpath " in
4352 *" $arg "*) ;;
4353 *) rpath="$rpath $arg" ;;
4354 esac
4355 else
4356 case "$xrpath " in
4357 *" $arg "*) ;;
4358 *) xrpath="$xrpath $arg" ;;
4359 esac
4360 fi
4361 prev=
4362 continue
4363 ;;
4364 shrext)
4365 shrext_cmds="$arg"
4366 prev=
4367 continue
4368 ;;
4369 weak)
4370 weak_libs="$weak_libs $arg"
4371 prev=
4372 continue
4373 ;;
4374 xcclinker)
4375 linker_flags="$linker_flags $qarg"
4376 compiler_flags="$compiler_flags $qarg"
4377 prev=
4378 func_append compile_command " $qarg"
4379 func_append finalize_command " $qarg"
4380 continue
4381 ;;
4382 xcompiler)
4383 compiler_flags="$compiler_flags $qarg"
4384 prev=
4385 func_append compile_command " $qarg"
4386 func_append finalize_command " $qarg"
4387 continue
4388 ;;
4389 xlinker)
4390 linker_flags="$linker_flags $qarg"
4391 compiler_flags="$compiler_flags $wl$qarg"
4392 prev=
4393 func_append compile_command " $wl$qarg"
4394 func_append finalize_command " $wl$qarg"
4395 continue
4396 ;;
4397 *)
4398 eval "$prev=\"\$arg\""
4399 prev=
4400 continue
4401 ;;
4402 esac
4403 fi # test -n "$prev"
4404
4405 prevarg="$arg"
4406
4407 case $arg in
4408 -all-static)
4409 if test -n "$link_static_flag"; then
4410 # See comment for -static flag below, for more details.
4411 func_append compile_command " $link_static_flag"
4412 func_append finalize_command " $link_static_flag"
4413 fi
4414 continue
4415 ;;
4416
4417 -allow-undefined)
4418 # FIXME: remove this flag sometime in the future.
4419 func_fatal_error "\`-allow-undefined' must not be used because it is the default"
4420 ;;
4421
4422 -avoid-version)
4423 avoid_version=yes
4424 continue
4425 ;;
4426
4427 -dlopen)
4428 prev=dlfiles
4429 continue
4430 ;;
4431
4432 -dlpreopen)
4433 prev=dlprefiles
4434 continue
4435 ;;
4436
4437 -export-dynamic)
4438 export_dynamic=yes
4439 continue
4440 ;;
4441
4442 -export-symbols | -export-symbols-regex)
4443 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
4444 func_fatal_error "more than one -exported-symbols argument is not allowed"
4445 fi
4446 if test "X$arg" = "X-export-symbols"; then
4447 prev=expsyms
4448 else
4449 prev=expsyms_regex
4450 fi
4451 continue
4452 ;;
4453
4454 -framework)
4455 prev=framework
4456 continue
4457 ;;
4458
4459 -inst-prefix-dir)
4460 prev=inst_prefix
4461 continue
4462 ;;
4463
4464 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
4465 # so, if we see these flags be careful not to treat them like -L
4466 -L[A-Z][A-Z]*:*)
4467 case $with_gcc/$host in
4468 no/*-*-irix* | /*-*-irix*)
4469 func_append compile_command " $arg"
4470 func_append finalize_command " $arg"
4471 ;;
4472 esac
4473 continue
4474 ;;
4475
4476 -L*)
4477 func_stripname '-L' '' "$arg"
4478 dir=$func_stripname_result
4479 if test -z "$dir"; then
4480 if test "$#" -gt 0; then
4481 func_fatal_error "require no space between \`-L' and \`$1'"
4482 else
4483 func_fatal_error "need path for \`-L' option"
4484 fi
4485 fi
4486 # We need an absolute path.
4487 case $dir in
4488 [\\/]* | [A-Za-z]:[\\/]*) ;;
4489 *)
4490 absdir=`cd "$dir" && pwd`
4491 test -z "$absdir" && \
4492 func_fatal_error "cannot determine absolute directory name of \`$dir'"
4493 dir="$absdir"
4494 ;;
4495 esac
4496 case "$deplibs " in
4497 *" -L$dir "*) ;;
4498 *)
4499 deplibs="$deplibs -L$dir"
4500 lib_search_path="$lib_search_path $dir"
4501 ;;
4502 esac
4503 case $host in
4504 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
4505 testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
4506 case :$dllsearchpath: in
4507 *":$dir:"*) ;;
4508 ::) dllsearchpath=$dir;;
4509 *) dllsearchpath="$dllsearchpath:$dir";;
4510 esac
4511 case :$dllsearchpath: in
4512 *":$testbindir:"*) ;;
4513 ::) dllsearchpath=$testbindir;;
4514 *) dllsearchpath="$dllsearchpath:$testbindir";;
4515 esac
4516 ;;
4517 esac
4518 continue
4519 ;;
4520
4521 -l*)
4522 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
4523 case $host in
4524 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
4525 # These systems don't actually have a C or math library (as such)
4526 continue
4527 ;;
4528 *-*-os2*)
4529 # These systems don't actually have a C library (as such)
4530 test "X$arg" = "X-lc" && continue
4531 ;;
4532 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
4533 # Do not include libc due to us having libc/libc_r.
4534 test "X$arg" = "X-lc" && continue
4535 ;;
4536 *-*-rhapsody* | *-*-darwin1.[012])
4537 # Rhapsody C and math libraries are in the System framework
4538 deplibs="$deplibs System.ltframework"
4539 continue
4540 ;;
4541 *-*-sco3.2v5* | *-*-sco5v6*)
4542 # Causes problems with __ctype
4543 test "X$arg" = "X-lc" && continue
4544 ;;
4545 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
4546 # Compiler inserts libc in the correct place for threads to work
4547 test "X$arg" = "X-lc" && continue
4548 ;;
4549 esac
4550 elif test "X$arg" = "X-lc_r"; then
4551 case $host in
4552 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
4553 # Do not include libc_r directly, use -pthread flag.
4554 continue
4555 ;;
4556 esac
4557 fi
4558 deplibs="$deplibs $arg"
4559 continue
4560 ;;
4561
4562 -module)
4563 module=yes
4564 continue
4565 ;;
4566
4567 # Tru64 UNIX uses -model [arg] to determine the layout of C++
4568 # classes, name mangling, and exception handling.
4569 # Darwin uses the -arch flag to determine output architecture.
4570 -model|-arch|-isysroot)
4571 compiler_flags="$compiler_flags $arg"
4572 func_append compile_command " $arg"
4573 func_append finalize_command " $arg"
4574 prev=xcompiler
4575 continue
4576 ;;
4577
4578 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
4579 compiler_flags="$compiler_flags $arg"
4580 func_append compile_command " $arg"
4581 func_append finalize_command " $arg"
4582 case "$new_inherited_linker_flags " in
4583 *" $arg "*) ;;
4584 * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
4585 esac
4586 continue
4587 ;;
4588
4589 -multi_module)
4590 single_module="${wl}-multi_module"
4591 continue
4592 ;;
4593
4594 -no-fast-install)
4595 fast_install=no
4596 continue
4597 ;;
4598
4599 -no-install)
4600 case $host in
4601 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
4602 # The PATH hackery in wrapper scripts is required on Windows
4603 # and Darwin in order for the loader to find any dlls it needs.
4604 func_warning "\`-no-install' is ignored for $host"
4605 func_warning "assuming \`-no-fast-install' instead"
4606 fast_install=no
4607 ;;
4608 *) no_install=yes ;;
4609 esac
4610 continue
4611 ;;
4612
4613 -no-undefined)
4614 allow_undefined=no
4615 continue
4616 ;;
4617
4618 -objectlist)
4619 prev=objectlist
4620 continue
4621 ;;
4622
4623 -o) prev=output ;;
4624
4625 -precious-files-regex)
4626 prev=precious_regex
4627 continue
4628 ;;
4629
4630 -release)
4631 prev=release
4632 continue
4633 ;;
4634
4635 -rpath)
4636 prev=rpath
4637 continue
4638 ;;
4639
4640 -R)
4641 prev=xrpath
4642 continue
4643 ;;
4644
4645 -R*)
4646 func_stripname '-R' '' "$arg"
4647 dir=$func_stripname_result
4648 # We need an absolute path.
4649 case $dir in
4650 [\\/]* | [A-Za-z]:[\\/]*) ;;
4651 *)
4652 func_fatal_error "only absolute run-paths are allowed"
4653 ;;
4654 esac
4655 case "$xrpath " in
4656 *" $dir "*) ;;
4657 *) xrpath="$xrpath $dir" ;;
4658 esac
4659 continue
4660 ;;
4661
4662 -shared)
4663 # The effects of -shared are defined in a previous loop.
4664 continue
4665 ;;
4666
4667 -shrext)
4668 prev=shrext
4669 continue
4670 ;;
4671
4672 -static | -static-libtool-libs)
4673 # The effects of -static are defined in a previous loop.
4674 # We used to do the same as -all-static on platforms that
4675 # didn't have a PIC flag, but the assumption that the effects
4676 # would be equivalent was wrong. It would break on at least
4677 # Digital Unix and AIX.
4678 continue
4679 ;;
4680
4681 -thread-safe)
4682 thread_safe=yes
4683 continue
4684 ;;
4685
4686 -version-info)
4687 prev=vinfo
4688 continue
4689 ;;
4690
4691 -version-number)
4692 prev=vinfo
4693 vinfo_number=yes
4694 continue
4695 ;;
4696
4697 -weak)
4698 prev=weak
4699 continue
4700 ;;
4701
4702 -Wc,*)
4703 func_stripname '-Wc,' '' "$arg"
4704 args=$func_stripname_result
4705 arg=
4706 save_ifs="$IFS"; IFS=','
4707 for flag in $args; do
4708 IFS="$save_ifs"
4709 func_quote_for_eval "$flag"
4710 arg="$arg $wl$func_quote_for_eval_result"
4711 compiler_flags="$compiler_flags $func_quote_for_eval_result"
4712 done
4713 IFS="$save_ifs"
4714 func_stripname ' ' '' "$arg"
4715 arg=$func_stripname_result
4716 ;;
4717
4718 -Wl,*)
4719 func_stripname '-Wl,' '' "$arg"
4720 args=$func_stripname_result
4721 arg=
4722 save_ifs="$IFS"; IFS=','
4723 for flag in $args; do
4724 IFS="$save_ifs"
4725 func_quote_for_eval "$flag"
4726 arg="$arg $wl$func_quote_for_eval_result"
4727 compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
4728 linker_flags="$linker_flags $func_quote_for_eval_result"
4729 done
4730 IFS="$save_ifs"
4731 func_stripname ' ' '' "$arg"
4732 arg=$func_stripname_result
4733 ;;
4734
4735 -Xcompiler)
4736 prev=xcompiler
4737 continue
4738 ;;
4739
4740 -Xlinker)
4741 prev=xlinker
4742 continue
4743 ;;
4744
4745 -XCClinker)
4746 prev=xcclinker
4747 continue
4748 ;;
4749
4750 # -msg_* for osf cc
4751 -msg_*)
4752 func_quote_for_eval "$arg"
4753 arg="$func_quote_for_eval_result"
4754 ;;
4755
4756 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
4757 # -r[0-9][0-9]* specifies the processor on the SGI compiler
4758 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
4759 # +DA*, +DD* enable 64-bit mode on the HP compiler
4760 # -q* pass through compiler args for the IBM compiler
4761 # -m*, -t[45]*, -txscale* pass through architecture-specific
4762 # compiler args for GCC
4763 # -F/path gives path to uninstalled frameworks, gcc on darwin
4764 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
4765 # @file GCC response files
4766 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
4767 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
4768 func_quote_for_eval "$arg"
4769 arg="$func_quote_for_eval_result"
4770 func_append compile_command " $arg"
4771 func_append finalize_command " $arg"
4772 compiler_flags="$compiler_flags $arg"
4773 continue
4774 ;;
4775
4776 # Some other compiler flag.
4777 -* | +*)
4778 func_quote_for_eval "$arg"
4779 arg="$func_quote_for_eval_result"
4780 ;;
4781
4782 *.$objext)
4783 # A standard object.
4784 objs="$objs $arg"
4785 ;;
4786
4787 *.lo)
4788 # A libtool-controlled object.
4789
4790 # Check to see that this really is a libtool object.
4791 if func_lalib_unsafe_p "$arg"; then
4792 pic_object=
4793 non_pic_object=
4794
4795 # Read the .lo file
4796 func_source "$arg"
4797
4798 if test -z "$pic_object" ||
4799 test -z "$non_pic_object" ||
4800 test "$pic_object" = none &&
4801 test "$non_pic_object" = none; then
4802 func_fatal_error "cannot find name of object for \`$arg'"
4803 fi
4804
4805 # Extract subdirectory from the argument.
4806 func_dirname "$arg" "/" ""
4807 xdir="$func_dirname_result"
4808
4809 if test "$pic_object" != none; then
4810 # Prepend the subdirectory the object is found in.
4811 pic_object="$xdir$pic_object"
4812
4813 if test "$prev" = dlfiles; then
4814 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4815 dlfiles="$dlfiles $pic_object"
4816 prev=
4817 continue
4818 else
4819 # If libtool objects are unsupported, then we need to preload.
4820 prev=dlprefiles
4821 fi
4822 fi
4823
4824 # CHECK ME: I think I busted this. -Ossama
4825 if test "$prev" = dlprefiles; then
4826 # Preload the old-style object.
4827 dlprefiles="$dlprefiles $pic_object"
4828 prev=
4829 fi
4830
4831 # A PIC object.
4832 func_append libobjs " $pic_object"
4833 arg="$pic_object"
4834 fi
4835
4836 # Non-PIC object.
4837 if test "$non_pic_object" != none; then
4838 # Prepend the subdirectory the object is found in.
4839 non_pic_object="$xdir$non_pic_object"
4840
4841 # A standard non-PIC object
4842 func_append non_pic_objects " $non_pic_object"
4843 if test -z "$pic_object" || test "$pic_object" = none ; then
4844 arg="$non_pic_object"
4845 fi
4846 else
4847 # If the PIC object exists, use it instead.
4848 # $xdir was prepended to $pic_object above.
4849 non_pic_object="$pic_object"
4850 func_append non_pic_objects " $non_pic_object"
4851 fi
4852 else
4853 # Only an error if not doing a dry-run.
4854 if $opt_dry_run; then
4855 # Extract subdirectory from the argument.
4856 func_dirname "$arg" "/" ""
4857 xdir="$func_dirname_result"
4858
4859 func_lo2o "$arg"
4860 pic_object=$xdir$objdir/$func_lo2o_result
4861 non_pic_object=$xdir$func_lo2o_result
4862 func_append libobjs " $pic_object"
4863 func_append non_pic_objects " $non_pic_object"
4864 else
4865 func_fatal_error "\`$arg' is not a valid libtool object"
4866 fi
4867 fi
4868 ;;
4869
4870 *.$libext)
4871 # An archive.
4872 deplibs="$deplibs $arg"
4873 old_deplibs="$old_deplibs $arg"
4874 continue
4875 ;;
4876
4877 *.la)
4878 # A libtool-controlled library.
4879
4880 if test "$prev" = dlfiles; then
4881 # This library was specified with -dlopen.
4882 dlfiles="$dlfiles $arg"
4883 prev=
4884 elif test "$prev" = dlprefiles; then
4885 # The library was specified with -dlpreopen.
4886 dlprefiles="$dlprefiles $arg"
4887 prev=
4888 else
4889 deplibs="$deplibs $arg"
4890 fi
4891 continue
4892 ;;
4893
4894 # Some other compiler argument.
4895 *)
4896 # Unknown arguments in both finalize_command and compile_command need
4897 # to be aesthetically quoted because they are evaled later.
4898 func_quote_for_eval "$arg"
4899 arg="$func_quote_for_eval_result"
4900 ;;
4901 esac # arg
4902
4903 # Now actually substitute the argument into the commands.
4904 if test -n "$arg"; then
4905 func_append compile_command " $arg"
4906 func_append finalize_command " $arg"
4907 fi
4908 done # argument parsing loop
4909
4910 test -n "$prev" && \
4911 func_fatal_help "the \`$prevarg' option requires an argument"
4912
4913 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
4914 eval arg=\"$export_dynamic_flag_spec\"
4915 func_append compile_command " $arg"
4916 func_append finalize_command " $arg"
4917 fi
4918
4919 oldlibs=
4920 # calculate the name of the file, without its directory
4921 func_basename "$output"
4922 outputname="$func_basename_result"
4923 libobjs_save="$libobjs"
4924
4925 if test -n "$shlibpath_var"; then
4926 # get the directories listed in $shlibpath_var
4927 eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
4928 else
4929 shlib_search_path=
4930 fi
4931 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
4932 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
4933
4934 func_dirname "$output" "/" ""
4935 output_objdir="$func_dirname_result$objdir"
4936 # Create the object directory.
4937 func_mkdir_p "$output_objdir"
4938
4939 # Determine the type of output
4940 case $output in
4941 "")
4942 func_fatal_help "you must specify an output file"
4943 ;;
4944 *.$libext) linkmode=oldlib ;;
4945 *.lo | *.$objext) linkmode=obj ;;
4946 *.la) linkmode=lib ;;
4947 *) linkmode=prog ;; # Anything else should be a program.
4948 esac
4949
4950 specialdeplibs=
4951
4952 libs=
4953 # Find all interdependent deplibs by searching for libraries
4954 # that are linked more than once (e.g. -la -lb -la)
4955 for deplib in $deplibs; do
4956 if $opt_duplicate_deps ; then
4957 case "$libs " in
4958 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
4959 esac
4960 fi
4961 libs="$libs $deplib"
4962 done
4963
4964 if test "$linkmode" = lib; then
4965 libs="$predeps $libs $compiler_lib_search_path $postdeps"
4966
4967 # Compute libraries that are listed more than once in $predeps
4968 # $postdeps and mark them as special (i.e., whose duplicates are
4969 # not to be eliminated).
4970 pre_post_deps=
4971 if $opt_duplicate_compiler_generated_deps; then
4972 for pre_post_dep in $predeps $postdeps; do
4973 case "$pre_post_deps " in
4974 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
4975 esac
4976 pre_post_deps="$pre_post_deps $pre_post_dep"
4977 done
4978 fi
4979 pre_post_deps=
4980 fi
4981
4982 deplibs=
4983 newdependency_libs=
4984 newlib_search_path=
4985 need_relink=no # whether we're linking any uninstalled libtool libraries
4986 notinst_deplibs= # not-installed libtool libraries
4987 notinst_path= # paths that contain not-installed libtool libraries
4988
4989 case $linkmode in
4990 lib)
4991 passes="conv dlpreopen link"
4992 for file in $dlfiles $dlprefiles; do
4993 case $file in
4994 *.la) ;;
4995 *)
4996 func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
4997 ;;
4998 esac
4999 done
5000 ;;
5001 prog)
5002 compile_deplibs=
5003 finalize_deplibs=
5004 alldeplibs=no
5005 newdlfiles=
5006 newdlprefiles=
5007 passes="conv scan dlopen dlpreopen link"
5008 ;;
5009 *) passes="conv"
5010 ;;
5011 esac
5012
5013 for pass in $passes; do
5014 # The preopen pass in lib mode reverses $deplibs; put it back here
5015 # so that -L comes before libs that need it for instance...
5016 if test "$linkmode,$pass" = "lib,link"; then
5017 ## FIXME: Find the place where the list is rebuilt in the wrong
5018 ## order, and fix it there properly
5019 tmp_deplibs=
5020 for deplib in $deplibs; do
5021 tmp_deplibs="$deplib $tmp_deplibs"
5022 done
5023 deplibs="$tmp_deplibs"
5024 fi
5025
5026 if test "$linkmode,$pass" = "lib,link" ||
5027 test "$linkmode,$pass" = "prog,scan"; then
5028 libs="$deplibs"
5029 deplibs=
5030 fi
5031 if test "$linkmode" = prog; then
5032 case $pass in
5033 dlopen) libs="$dlfiles" ;;
5034 dlpreopen) libs="$dlprefiles" ;;
5035 link)
5036 libs="$deplibs %DEPLIBS%"
5037 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
5038 ;;
5039 esac
5040 fi
5041 if test "$linkmode,$pass" = "lib,dlpreopen"; then
5042 # Collect and forward deplibs of preopened libtool libs
5043 for lib in $dlprefiles; do
5044 # Ignore non-libtool-libs
5045 dependency_libs=
5046 case $lib in
5047 *.la) func_source "$lib" ;;
5048 esac
5049
5050 # Collect preopened libtool deplibs, except any this library
5051 # has declared as weak libs
5052 for deplib in $dependency_libs; do
5053 deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
5054 case " $weak_libs " in
5055 *" $deplib_base "*) ;;
5056 *) deplibs="$deplibs $deplib" ;;
5057 esac
5058 done
5059 done
5060 libs="$dlprefiles"
5061 fi
5062 if test "$pass" = dlopen; then
5063 # Collect dlpreopened libraries
5064 save_deplibs="$deplibs"
5065 deplibs=
5066 fi
5067
5068 for deplib in $libs; do
5069 lib=
5070 found=no
5071 case $deplib in
5072 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
5073 if test "$linkmode,$pass" = "prog,link"; then
5074 compile_deplibs="$deplib $compile_deplibs"
5075 finalize_deplibs="$deplib $finalize_deplibs"
5076 else
5077 compiler_flags="$compiler_flags $deplib"
5078 if test "$linkmode" = lib ; then
5079 case "$new_inherited_linker_flags " in
5080 *" $deplib "*) ;;
5081 * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
5082 esac
5083 fi
5084 fi
5085 continue
5086 ;;
5087 -l*)
5088 if test "$linkmode" != lib && test "$linkmode" != prog; then
5089 func_warning "\`-l' is ignored for archives/objects"
5090 continue
5091 fi
5092 func_stripname '-l' '' "$deplib"
5093 name=$func_stripname_result
5094 if test "$linkmode" = lib; then
5095 searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
5096 else
5097 searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
5098 fi
5099 for searchdir in $searchdirs; do
5100 for search_ext in .la $std_shrext .so .a; do
5101 # Search the libtool library
5102 lib="$searchdir/lib${name}${search_ext}"
5103 if test -f "$lib"; then
5104 if test "$search_ext" = ".la"; then
5105 found=yes
5106 else
5107 found=no
5108 fi
5109 break 2
5110 fi
5111 done
5112 done
5113 if test "$found" != yes; then
5114 # deplib doesn't seem to be a libtool library
5115 if test "$linkmode,$pass" = "prog,link"; then
5116 compile_deplibs="$deplib $compile_deplibs"
5117 finalize_deplibs="$deplib $finalize_deplibs"
5118 else
5119 deplibs="$deplib $deplibs"
5120 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
5121 fi
5122 continue
5123 else # deplib is a libtool library
5124 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
5125 # We need to do some special things here, and not later.
5126 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
5127 case " $predeps $postdeps " in
5128 *" $deplib "*)
5129 if func_lalib_p "$lib"; then
5130 library_names=
5131 old_library=
5132 func_source "$lib"
5133 for l in $old_library $library_names; do
5134 ll="$l"
5135 done
5136 if test "X$ll" = "X$old_library" ; then # only static version available
5137 found=no
5138 func_dirname "$lib" "" "."
5139 ladir="$func_dirname_result"
5140 lib=$ladir/$old_library
5141 if test "$linkmode,$pass" = "prog,link"; then
5142 compile_deplibs="$deplib $compile_deplibs"
5143 finalize_deplibs="$deplib $finalize_deplibs"
5144 else
5145 deplibs="$deplib $deplibs"
5146 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
5147 fi
5148 continue
5149 fi
5150 fi
5151 ;;
5152 *) ;;
5153 esac
5154 fi
5155 fi
5156 ;; # -l
5157 *.ltframework)
5158 if test "$linkmode,$pass" = "prog,link"; then
5159 compile_deplibs="$deplib $compile_deplibs"
5160 finalize_deplibs="$deplib $finalize_deplibs"
5161 else
5162 deplibs="$deplib $deplibs"
5163 if test "$linkmode" = lib ; then
5164 case "$new_inherited_linker_flags " in
5165 *" $deplib "*) ;;
5166 * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
5167 esac
5168 fi
5169 fi
5170 continue
5171 ;;
5172 -L*)
5173 case $linkmode in
5174 lib)
5175 deplibs="$deplib $deplibs"
5176 test "$pass" = conv && continue
5177 newdependency_libs="$deplib $newdependency_libs"
5178 func_stripname '-L' '' "$deplib"
5179 newlib_search_path="$newlib_search_path $func_stripname_result"
5180 ;;
5181 prog)
5182 if test "$pass" = conv; then
5183 deplibs="$deplib $deplibs"
5184 continue
5185 fi
5186 if test "$pass" = scan; then
5187 deplibs="$deplib $deplibs"
5188 else
5189 compile_deplibs="$deplib $compile_deplibs"
5190 finalize_deplibs="$deplib $finalize_deplibs"
5191 fi
5192 func_stripname '-L' '' "$deplib"
5193 newlib_search_path="$newlib_search_path $func_stripname_result"
5194 ;;
5195 *)
5196 func_warning "\`-L' is ignored for archives/objects"
5197 ;;
5198 esac # linkmode
5199 continue
5200 ;; # -L
5201 -R*)
5202 if test "$pass" = link; then
5203 func_stripname '-R' '' "$deplib"
5204 dir=$func_stripname_result
5205 # Make sure the xrpath contains only unique directories.
5206 case "$xrpath " in
5207 *" $dir "*) ;;
5208 *) xrpath="$xrpath $dir" ;;
5209 esac
5210 fi
5211 deplibs="$deplib $deplibs"
5212 continue
5213 ;;
5214 *.la) lib="$deplib" ;;
5215 *.$libext)
5216 if test "$pass" = conv; then
5217 deplibs="$deplib $deplibs"
5218 continue
5219 fi
5220 case $linkmode in
5221 lib)
5222 # Linking convenience modules into shared libraries is allowed,
5223 # but linking other static libraries is non-portable.
5224 case " $dlpreconveniencelibs " in
5225 *" $deplib "*) ;;
5226 *)
5227 valid_a_lib=no
5228 case $deplibs_check_method in
5229 match_pattern*)
5230 set dummy $deplibs_check_method; shift
5231 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
5232 if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
5233 | $EGREP "$match_pattern_regex" > /dev/null; then
5234 valid_a_lib=yes
5235 fi
5236 ;;
5237 pass_all)
5238 valid_a_lib=yes
5239 ;;
5240 esac
5241 if test "$valid_a_lib" != yes; then
5242 $ECHO
5243 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
5244 $ECHO "*** I have the capability to make that library automatically link in when"
5245 $ECHO "*** you link to this library. But I can only do this if you have a"
5246 $ECHO "*** shared version of the library, which you do not appear to have"
5247 $ECHO "*** because the file extensions .$libext of this argument makes me believe"
5248 $ECHO "*** that it is just a static archive that I should not use here."
5249 else
5250 $ECHO
5251 $ECHO "*** Warning: Linking the shared library $output against the"
5252 $ECHO "*** static library $deplib is not portable!"
5253 deplibs="$deplib $deplibs"
5254 fi
5255 ;;
5256 esac
5257 continue
5258 ;;
5259 prog)
5260 if test "$pass" != link; then
5261 deplibs="$deplib $deplibs"
5262 else
5263 compile_deplibs="$deplib $compile_deplibs"
5264 finalize_deplibs="$deplib $finalize_deplibs"
5265 fi
5266 continue
5267 ;;
5268 esac # linkmode
5269 ;; # *.$libext
5270 *.lo | *.$objext)
5271 if test "$pass" = conv; then
5272 deplibs="$deplib $deplibs"
5273 elif test "$linkmode" = prog; then
5274 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
5275 # If there is no dlopen support or we're linking statically,
5276 # we need to preload.
5277 newdlprefiles="$newdlprefiles $deplib"
5278 compile_deplibs="$deplib $compile_deplibs"
5279 finalize_deplibs="$deplib $finalize_deplibs"
5280 else
5281 newdlfiles="$newdlfiles $deplib"
5282 fi
5283 fi
5284 continue
5285 ;;
5286 %DEPLIBS%)
5287 alldeplibs=yes
5288 continue
5289 ;;
5290 esac # case $deplib
5291
5292 if test "$found" = yes || test -f "$lib"; then :
5293 else
5294 func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
5295 fi
5296
5297 # Check to see that this really is a libtool archive.
5298 func_lalib_unsafe_p "$lib" \
5299 || func_fatal_error "\`$lib' is not a valid libtool archive"
5300
5301 func_dirname "$lib" "" "."
5302 ladir="$func_dirname_result"
5303
5304 dlname=
5305 dlopen=
5306 dlpreopen=
5307 libdir=
5308 library_names=
5309 old_library=
5310 inherited_linker_flags=
5311 # If the library was installed with an old release of libtool,
5312 # it will not redefine variables installed, or shouldnotlink
5313 installed=yes
5314 shouldnotlink=no
5315 avoidtemprpath=
5316
5317
5318 # Read the .la file
5319 func_source "$lib"
5320
5321 # Convert "-framework foo" to "foo.ltframework"
5322 if test -n "$inherited_linker_flags"; then
5323 tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
5324 for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
5325 case " $new_inherited_linker_flags " in
5326 *" $tmp_inherited_linker_flag "*) ;;
5327 *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
5328 esac
5329 done
5330 fi
5331 dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
5332 if test "$linkmode,$pass" = "lib,link" ||
5333 test "$linkmode,$pass" = "prog,scan" ||
5334 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
5335 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
5336 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
5337 fi
5338
5339 if test "$pass" = conv; then
5340 # Only check for convenience libraries
5341 deplibs="$lib $deplibs"
5342 if test -z "$libdir"; then
5343 if test -z "$old_library"; then
5344 func_fatal_error "cannot find name of link library for \`$lib'"
5345 fi
5346 # It is a libtool convenience library, so add in its objects.
5347 convenience="$convenience $ladir/$objdir/$old_library"
5348 old_convenience="$old_convenience $ladir/$objdir/$old_library"
5349 tmp_libs=
5350 for deplib in $dependency_libs; do
5351 deplibs="$deplib $deplibs"
5352 if $opt_duplicate_deps ; then
5353 case "$tmp_libs " in
5354 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5355 esac
5356 fi
5357 tmp_libs="$tmp_libs $deplib"
5358 done
5359 elif test "$linkmode" != prog && test "$linkmode" != lib; then
5360 func_fatal_error "\`$lib' is not a convenience library"
5361 fi
5362 continue
5363 fi # $pass = conv
5364
5365
5366 # Get the name of the library we link against.
5367 linklib=
5368 for l in $old_library $library_names; do
5369 linklib="$l"
5370 done
5371 if test -z "$linklib"; then
5372 func_fatal_error "cannot find name of link library for \`$lib'"
5373 fi
5374
5375 # This library was specified with -dlopen.
5376 if test "$pass" = dlopen; then
5377 if test -z "$libdir"; then
5378 func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
5379 fi
5380 if test -z "$dlname" ||
5381 test "$dlopen_support" != yes ||
5382 test "$build_libtool_libs" = no; then
5383 # If there is no dlname, no dlopen support or we're linking
5384 # statically, we need to preload. We also need to preload any
5385 # dependent libraries so libltdl's deplib preloader doesn't
5386 # bomb out in the load deplibs phase.
5387 dlprefiles="$dlprefiles $lib $dependency_libs"
5388 else
5389 newdlfiles="$newdlfiles $lib"
5390 fi
5391 continue
5392 fi # $pass = dlopen
5393
5394 # We need an absolute path.
5395 case $ladir in
5396 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
5397 *)
5398 abs_ladir=`cd "$ladir" && pwd`
5399 if test -z "$abs_ladir"; then
5400 func_warning "cannot determine absolute directory name of \`$ladir'"
5401 func_warning "passing it literally to the linker, although it might fail"
5402 abs_ladir="$ladir"
5403 fi
5404 ;;
5405 esac
5406 func_basename "$lib"
5407 laname="$func_basename_result"
5408
5409 # Find the relevant object directory and library name.
5410 if test "X$installed" = Xyes; then
5411 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
5412 func_warning "library \`$lib' was moved."
5413 dir="$ladir"
5414 absdir="$abs_ladir"
5415 libdir="$abs_ladir"
5416 else
5417 dir="$libdir"
5418 absdir="$libdir"
5419 fi
5420 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
5421 else
5422 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
5423 dir="$ladir"
5424 absdir="$abs_ladir"
5425 # Remove this search path later
5426 notinst_path="$notinst_path $abs_ladir"
5427 else
5428 dir="$ladir/$objdir"
5429 absdir="$abs_ladir/$objdir"
5430 # Remove this search path later
5431 notinst_path="$notinst_path $abs_ladir"
5432 fi
5433 fi # $installed = yes
5434 func_stripname 'lib' '.la' "$laname"
5435 name=$func_stripname_result
5436
5437 # This library was specified with -dlpreopen.
5438 if test "$pass" = dlpreopen; then
5439 if test -z "$libdir" && test "$linkmode" = prog; then
5440 func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
5441 fi
5442 # Prefer using a static library (so that no silly _DYNAMIC symbols
5443 # are required to link).
5444 if test -n "$old_library"; then
5445 newdlprefiles="$newdlprefiles $dir/$old_library"
5446 # Keep a list of preopened convenience libraries to check
5447 # that they are being used correctly in the link pass.
5448 test -z "$libdir" && \
5449 dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
5450 # Otherwise, use the dlname, so that lt_dlopen finds it.
5451 elif test -n "$dlname"; then
5452 newdlprefiles="$newdlprefiles $dir/$dlname"
5453 else
5454 newdlprefiles="$newdlprefiles $dir/$linklib"
5455 fi
5456 fi # $pass = dlpreopen
5457
5458 if test -z "$libdir"; then
5459 # Link the convenience library
5460 if test "$linkmode" = lib; then
5461 deplibs="$dir/$old_library $deplibs"
5462 elif test "$linkmode,$pass" = "prog,link"; then
5463 compile_deplibs="$dir/$old_library $compile_deplibs"
5464 finalize_deplibs="$dir/$old_library $finalize_deplibs"
5465 else
5466 deplibs="$lib $deplibs" # used for prog,scan pass
5467 fi
5468 continue
5469 fi
5470
5471
5472 if test "$linkmode" = prog && test "$pass" != link; then
5473 newlib_search_path="$newlib_search_path $ladir"
5474 deplibs="$lib $deplibs"
5475
5476 linkalldeplibs=no
5477 if test "$link_all_deplibs" != no || test -z "$library_names" ||
5478 test "$build_libtool_libs" = no; then
5479 linkalldeplibs=yes
5480 fi
5481
5482 tmp_libs=
5483 for deplib in $dependency_libs; do
5484 case $deplib in
5485 -L*) func_stripname '-L' '' "$deplib"
5486 newlib_search_path="$newlib_search_path $func_stripname_result"
5487 ;;
5488 esac
5489 # Need to link against all dependency_libs?
5490 if test "$linkalldeplibs" = yes; then
5491 deplibs="$deplib $deplibs"
5492 else
5493 # Need to hardcode shared library paths
5494 # or/and link against static libraries
5495 newdependency_libs="$deplib $newdependency_libs"
5496 fi
5497 if $opt_duplicate_deps ; then
5498 case "$tmp_libs " in
5499 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5500 esac
5501 fi
5502 tmp_libs="$tmp_libs $deplib"
5503 done # for deplib
5504 continue
5505 fi # $linkmode = prog...
5506
5507 if test "$linkmode,$pass" = "prog,link"; then
5508 if test -n "$library_names" &&
5509 { { test "$prefer_static_libs" = no ||
5510 test "$prefer_static_libs,$installed" = "built,yes"; } ||
5511 test -z "$old_library"; }; then
5512 # We need to hardcode the library path
5513 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
5514 # Make sure the rpath contains only unique directories.
5515 case "$temp_rpath:" in
5516 *"$absdir:"*) ;;
5517 *) temp_rpath="$temp_rpath$absdir:" ;;
5518 esac
5519 fi
5520
5521 # Hardcode the library path.
5522 # Skip directories that are in the system default run-time
5523 # search path.
5524 case " $sys_lib_dlsearch_path " in
5525 *" $absdir "*) ;;
5526 *)
5527 case "$compile_rpath " in
5528 *" $absdir "*) ;;
5529 *) compile_rpath="$compile_rpath $absdir"
5530 esac
5531 ;;
5532 esac
5533 case " $sys_lib_dlsearch_path " in
5534 *" $libdir "*) ;;
5535 *)
5536 case "$finalize_rpath " in
5537 *" $libdir "*) ;;
5538 *) finalize_rpath="$finalize_rpath $libdir"
5539 esac
5540 ;;
5541 esac
5542 fi # $linkmode,$pass = prog,link...
5543
5544 if test "$alldeplibs" = yes &&
5545 { test "$deplibs_check_method" = pass_all ||
5546 { test "$build_libtool_libs" = yes &&
5547 test -n "$library_names"; }; }; then
5548 # We only need to search for static libraries
5549 continue
5550 fi
5551 fi
5552
5553 link_static=no # Whether the deplib will be linked statically
5554 use_static_libs=$prefer_static_libs
5555 if test "$use_static_libs" = built && test "$installed" = yes; then
5556 use_static_libs=no
5557 fi
5558 if test -n "$library_names" &&
5559 { test "$use_static_libs" = no || test -z "$old_library"; }; then
5560 case $host in
5561 *cygwin* | *mingw* | *cegcc*)
5562 # No point in relinking DLLs because paths are not encoded
5563 notinst_deplibs="$notinst_deplibs $lib"
5564 need_relink=no
5565 ;;
5566 *)
5567 if test "$installed" = no; then
5568 notinst_deplibs="$notinst_deplibs $lib"
5569 need_relink=yes
5570 fi
5571 ;;
5572 esac
5573 # This is a shared library
5574
5575 # Warn about portability, can't link against -module's on some
5576 # systems (darwin). Don't bleat about dlopened modules though!
5577 dlopenmodule=""
5578 for dlpremoduletest in $dlprefiles; do
5579 if test "X$dlpremoduletest" = "X$lib"; then
5580 dlopenmodule="$dlpremoduletest"
5581 break
5582 fi
5583 done
5584 if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
5585 $ECHO
5586 if test "$linkmode" = prog; then
5587 $ECHO "*** Warning: Linking the executable $output against the loadable module"
5588 else
5589 $ECHO "*** Warning: Linking the shared library $output against the loadable module"
5590 fi
5591 $ECHO "*** $linklib is not portable!"
5592 fi
5593 if test "$linkmode" = lib &&
5594 test "$hardcode_into_libs" = yes; then
5595 # Hardcode the library path.
5596 # Skip directories that are in the system default run-time
5597 # search path.
5598 case " $sys_lib_dlsearch_path " in
5599 *" $absdir "*) ;;
5600 *)
5601 case "$compile_rpath " in
5602 *" $absdir "*) ;;
5603 *) compile_rpath="$compile_rpath $absdir"
5604 esac
5605 ;;
5606 esac
5607 case " $sys_lib_dlsearch_path " in
5608 *" $libdir "*) ;;
5609 *)
5610 case "$finalize_rpath " in
5611 *" $libdir "*) ;;
5612 *) finalize_rpath="$finalize_rpath $libdir"
5613 esac
5614 ;;
5615 esac
5616 fi
5617
5618 if test -n "$old_archive_from_expsyms_cmds"; then
5619 # figure out the soname
5620 set dummy $library_names
5621 shift
5622 realname="$1"
5623 shift
5624 libname=`eval "\\$ECHO \"$libname_spec\""`
5625 # use dlname if we got it. it's perfectly good, no?
5626 if test -n "$dlname"; then
5627 soname="$dlname"
5628 elif test -n "$soname_spec"; then
5629 # bleh windows
5630 case $host in
5631 *cygwin* | mingw* | *cegcc*)
5632 func_arith $current - $age
5633 major=$func_arith_result
5634 versuffix="-$major"
5635 ;;
5636 esac
5637 eval soname=\"$soname_spec\"
5638 else
5639 soname="$realname"
5640 fi
5641
5642 # Make a new name for the extract_expsyms_cmds to use
5643 soroot="$soname"
5644 func_basename "$soroot"
5645 soname="$func_basename_result"
5646 func_stripname 'lib' '.dll' "$soname"
5647 newlib=libimp-$func_stripname_result.a
5648
5649 # If the library has no export list, then create one now
5650 if test -f "$output_objdir/$soname-def"; then :
5651 else
5652 func_verbose "extracting exported symbol list from \`$soname'"
5653 func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
5654 fi
5655
5656 # Create $newlib
5657 if test -f "$output_objdir/$newlib"; then :; else
5658 func_verbose "generating import library for \`$soname'"
5659 func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
5660 fi
5661 # make sure the library variables are pointing to the new library
5662 dir=$output_objdir
5663 linklib=$newlib
5664 fi # test -n "$old_archive_from_expsyms_cmds"
5665
5666 if test "$linkmode" = prog || test "$mode" != relink; then
5667 add_shlibpath=
5668 add_dir=
5669 add=
5670 lib_linked=yes
5671 case $hardcode_action in
5672 immediate | unsupported)
5673 if test "$hardcode_direct" = no; then
5674 add="$dir/$linklib"
5675 case $host in
5676 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
5677 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
5678 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
5679 *-*-unixware7*) add_dir="-L$dir" ;;
5680 *-*-darwin* )
5681 # if the lib is a (non-dlopened) module then we can not
5682 # link against it, someone is ignoring the earlier warnings
5683 if /usr/bin/file -L $add 2> /dev/null |
5684 $GREP ": [^:]* bundle" >/dev/null ; then
5685 if test "X$dlopenmodule" != "X$lib"; then
5686 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
5687 if test -z "$old_library" ; then
5688 $ECHO
5689 $ECHO "*** And there doesn't seem to be a static archive available"
5690 $ECHO "*** The link will probably fail, sorry"
5691 else
5692 add="$dir/$old_library"
5693 fi
5694 elif test -n "$old_library"; then
5695 add="$dir/$old_library"
5696 fi
5697 fi
5698 esac
5699 elif test "$hardcode_minus_L" = no; then
5700 case $host in
5701 *-*-sunos*) add_shlibpath="$dir" ;;
5702 esac
5703 add_dir="-L$dir"
5704 add="-l$name"
5705 elif test "$hardcode_shlibpath_var" = no; then
5706 add_shlibpath="$dir"
5707 add="-l$name"
5708 else
5709 lib_linked=no
5710 fi
5711 ;;
5712 relink)
5713 if test "$hardcode_direct" = yes &&
5714 test "$hardcode_direct_absolute" = no; then
5715 add="$dir/$linklib"
5716 elif test "$hardcode_minus_L" = yes; then
5717 add_dir="-L$dir"
5718 # Try looking first in the location we're being installed to.
5719 if test -n "$inst_prefix_dir"; then
5720 case $libdir in
5721 [\\/]*)
5722 add_dir="$add_dir -L$inst_prefix_dir$libdir"
5723 ;;
5724 esac
5725 fi
5726 add="-l$name"
5727 elif test "$hardcode_shlibpath_var" = yes; then
5728 add_shlibpath="$dir"
5729 add="-l$name"
5730 else
5731 lib_linked=no
5732 fi
5733 ;;
5734 *) lib_linked=no ;;
5735 esac
5736
5737 if test "$lib_linked" != yes; then
5738 func_fatal_configuration "unsupported hardcode properties"
5739 fi
5740
5741 if test -n "$add_shlibpath"; then
5742 case :$compile_shlibpath: in
5743 *":$add_shlibpath:"*) ;;
5744 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
5745 esac
5746 fi
5747 if test "$linkmode" = prog; then
5748 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
5749 test -n "$add" && compile_deplibs="$add $compile_deplibs"
5750 else
5751 test -n "$add_dir" && deplibs="$add_dir $deplibs"
5752 test -n "$add" && deplibs="$add $deplibs"
5753 if test "$hardcode_direct" != yes &&
5754 test "$hardcode_minus_L" != yes &&
5755 test "$hardcode_shlibpath_var" = yes; then
5756 case :$finalize_shlibpath: in
5757 *":$libdir:"*) ;;
5758 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
5759 esac
5760 fi
5761 fi
5762 fi
5763
5764 if test "$linkmode" = prog || test "$mode" = relink; then
5765 add_shlibpath=
5766 add_dir=
5767 add=
5768 # Finalize command for both is simple: just hardcode it.
5769 if test "$hardcode_direct" = yes &&
5770 test "$hardcode_direct_absolute" = no; then
5771 add="$libdir/$linklib"
5772 elif test "$hardcode_minus_L" = yes; then
5773 add_dir="-L$libdir"
5774 add="-l$name"
5775 elif test "$hardcode_shlibpath_var" = yes; then
5776 case :$finalize_shlibpath: in
5777 *":$libdir:"*) ;;
5778 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
5779 esac
5780 add="-l$name"
5781 elif test "$hardcode_automatic" = yes; then
5782 if test -n "$inst_prefix_dir" &&
5783 test -f "$inst_prefix_dir$libdir/$linklib" ; then
5784 add="$inst_prefix_dir$libdir/$linklib"
5785 else
5786 add="$libdir/$linklib"
5787 fi
5788 else
5789 # We cannot seem to hardcode it, guess we'll fake it.
5790 add_dir="-L$libdir"
5791 # Try looking first in the location we're being installed to.
5792 if test -n "$inst_prefix_dir"; then
5793 case $libdir in
5794 [\\/]*)
5795 add_dir="$add_dir -L$inst_prefix_dir$libdir"
5796 ;;
5797 esac
5798 fi
5799 add="-l$name"
5800 fi
5801
5802 if test "$linkmode" = prog; then
5803 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
5804 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
5805 else
5806 test -n "$add_dir" && deplibs="$add_dir $deplibs"
5807 test -n "$add" && deplibs="$add $deplibs"
5808 fi
5809 fi
5810 elif test "$linkmode" = prog; then
5811 # Here we assume that one of hardcode_direct or hardcode_minus_L
5812 # is not unsupported. This is valid on all known static and
5813 # shared platforms.
5814 if test "$hardcode_direct" != unsupported; then
5815 test -n "$old_library" && linklib="$old_library"
5816 compile_deplibs="$dir/$linklib $compile_deplibs"
5817 finalize_deplibs="$dir/$linklib $finalize_deplibs"
5818 else
5819 compile_deplibs="-l$name -L$dir $compile_deplibs"
5820 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
5821 fi
5822 elif test "$build_libtool_libs" = yes; then
5823 # Not a shared library
5824 if test "$deplibs_check_method" != pass_all; then
5825 # We're trying link a shared library against a static one
5826 # but the system doesn't support it.
5827
5828 # Just print a warning and add the library to dependency_libs so
5829 # that the program can be linked against the static library.
5830 $ECHO
5831 $ECHO "*** Warning: This system can not link to static lib archive $lib."
5832 $ECHO "*** I have the capability to make that library automatically link in when"
5833 $ECHO "*** you link to this library. But I can only do this if you have a"
5834 $ECHO "*** shared version of the library, which you do not appear to have."
5835 if test "$module" = yes; then
5836 $ECHO "*** But as you try to build a module library, libtool will still create "
5837 $ECHO "*** a static module, that should work as long as the dlopening application"
5838 $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
5839 if test -z "$global_symbol_pipe"; then
5840 $ECHO
5841 $ECHO "*** However, this would only work if libtool was able to extract symbol"
5842 $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
5843 $ECHO "*** not find such a program. So, this module is probably useless."
5844 $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
5845 fi
5846 if test "$build_old_libs" = no; then
5847 build_libtool_libs=module
5848 build_old_libs=yes
5849 else
5850 build_libtool_libs=no
5851 fi
5852 fi
5853 else
5854 deplibs="$dir/$old_library $deplibs"
5855 link_static=yes
5856 fi
5857 fi # link shared/static library?
5858
5859 if test "$linkmode" = lib; then
5860 if test -n "$dependency_libs" &&
5861 { test "$hardcode_into_libs" != yes ||
5862 test "$build_old_libs" = yes ||
5863 test "$link_static" = yes; }; then
5864 # Extract -R from dependency_libs
5865 temp_deplibs=
5866 for libdir in $dependency_libs; do
5867 case $libdir in
5868 -R*) func_stripname '-R' '' "$libdir"
5869 temp_xrpath=$func_stripname_result
5870 case " $xrpath " in
5871 *" $temp_xrpath "*) ;;
5872 *) xrpath="$xrpath $temp_xrpath";;
5873 esac;;
5874 *) temp_deplibs="$temp_deplibs $libdir";;
5875 esac
5876 done
5877 dependency_libs="$temp_deplibs"
5878 fi
5879
5880 newlib_search_path="$newlib_search_path $absdir"
5881 # Link against this library
5882 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
5883 # ... and its dependency_libs
5884 tmp_libs=
5885 for deplib in $dependency_libs; do
5886 newdependency_libs="$deplib $newdependency_libs"
5887 if $opt_duplicate_deps ; then
5888 case "$tmp_libs " in
5889 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5890 esac
5891 fi
5892 tmp_libs="$tmp_libs $deplib"
5893 done
5894
5895 if test "$link_all_deplibs" != no; then
5896 # Add the search paths of all dependency libraries
5897 for deplib in $dependency_libs; do
5898 path=
5899 case $deplib in
5900 -L*) path="$deplib" ;;
5901 *.la)
5902 func_dirname "$deplib" "" "."
5903 dir="$func_dirname_result"
5904 # We need an absolute path.
5905 case $dir in
5906 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
5907 *)
5908 absdir=`cd "$dir" && pwd`
5909 if test -z "$absdir"; then
5910 func_warning "cannot determine absolute directory name of \`$dir'"
5911 absdir="$dir"
5912 fi
5913 ;;
5914 esac
5915 if $GREP "^installed=no" $deplib > /dev/null; then
5916 case $host in
5917 *-*-darwin*)
5918 depdepl=
5919 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
5920 if test -n "$deplibrary_names" ; then
5921 for tmp in $deplibrary_names ; do
5922 depdepl=$tmp
5923 done
5924 if test -f "$absdir/$objdir/$depdepl" ; then
5925 depdepl="$absdir/$objdir/$depdepl"
5926 darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
5927 if test -z "$darwin_install_name"; then
5928 darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
5929 fi
5930 compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
5931 linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
5932 path=
5933 fi
5934 fi
5935 ;;
5936 *)
5937 path="-L$absdir/$objdir"
5938 ;;
5939 esac
5940 else
5941 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5942 test -z "$libdir" && \
5943 func_fatal_error "\`$deplib' is not a valid libtool archive"
5944 test "$absdir" != "$libdir" && \
5945 func_warning "\`$deplib' seems to be moved"
5946
5947 path="-L$absdir"
5948 fi
5949 ;;
5950 esac
5951 case " $deplibs " in
5952 *" $path "*) ;;
5953 *) deplibs="$path $deplibs" ;;
5954 esac
5955 done
5956 fi # link_all_deplibs != no
5957 fi # linkmode = lib
5958 done # for deplib in $libs
5959 if test "$pass" = link; then
5960 if test "$linkmode" = "prog"; then
5961 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
5962 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
5963 else
5964 compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
5965 fi
5966 fi
5967 dependency_libs="$newdependency_libs"
5968 if test "$pass" = dlpreopen; then
5969 # Link the dlpreopened libraries before other libraries
5970 for deplib in $save_deplibs; do
5971 deplibs="$deplib $deplibs"
5972 done
5973 fi
5974 if test "$pass" != dlopen; then
5975 if test "$pass" != conv; then
5976 # Make sure lib_search_path contains only unique directories.
5977 lib_search_path=
5978 for dir in $newlib_search_path; do
5979 case "$lib_search_path " in
5980 *" $dir "*) ;;
5981 *) lib_search_path="$lib_search_path $dir" ;;
5982 esac
5983 done
5984 newlib_search_path=
5985 fi
5986
5987 if test "$linkmode,$pass" != "prog,link"; then
5988 vars="deplibs"
5989 else
5990 vars="compile_deplibs finalize_deplibs"
5991 fi
5992 for var in $vars dependency_libs; do
5993 # Add libraries to $var in reverse order
5994 eval tmp_libs=\"\$$var\"
5995 new_libs=
5996 for deplib in $tmp_libs; do
5997 # FIXME: Pedantically, this is the right thing to do, so
5998 # that some nasty dependency loop isn't accidentally
5999 # broken:
6000 #new_libs="$deplib $new_libs"
6001 # Pragmatically, this seems to cause very few problems in
6002 # practice:
6003 case $deplib in
6004 -L*) new_libs="$deplib $new_libs" ;;
6005 -R*) ;;
6006 *)
6007 # And here is the reason: when a library appears more
6008 # than once as an explicit dependence of a library, or
6009 # is implicitly linked in more than once by the
6010 # compiler, it is considered special, and multiple
6011 # occurrences thereof are not removed. Compare this
6012 # with having the same library being listed as a
6013 # dependency of multiple other libraries: in this case,
6014 # we know (pedantically, we assume) the library does not
6015 # need to be listed more than once, so we keep only the
6016 # last copy. This is not always right, but it is rare
6017 # enough that we require users that really mean to play
6018 # such unportable linking tricks to link the library
6019 # using -Wl,-lname, so that libtool does not consider it
6020 # for duplicate removal.
6021 case " $specialdeplibs " in
6022 *" $deplib "*) new_libs="$deplib $new_libs" ;;
6023 *)
6024 case " $new_libs " in
6025 *" $deplib "*) ;;
6026 *) new_libs="$deplib $new_libs" ;;
6027 esac
6028 ;;
6029 esac
6030 ;;
6031 esac
6032 done
6033 tmp_libs=
6034 for deplib in $new_libs; do
6035 case $deplib in
6036 -L*)
6037 case " $tmp_libs " in
6038 *" $deplib "*) ;;
6039 *) tmp_libs="$tmp_libs $deplib" ;;
6040 esac
6041 ;;
6042 *) tmp_libs="$tmp_libs $deplib" ;;
6043 esac
6044 done
6045 eval $var=\"$tmp_libs\"
6046 done # for var
6047 fi
6048 # Last step: remove runtime libs from dependency_libs
6049 # (they stay in deplibs)
6050 tmp_libs=
6051 for i in $dependency_libs ; do
6052 case " $predeps $postdeps $compiler_lib_search_path " in
6053 *" $i "*)
6054 i=""
6055 ;;
6056 esac
6057 if test -n "$i" ; then
6058 tmp_libs="$tmp_libs $i"
6059 fi
6060 done
6061 dependency_libs=$tmp_libs
6062 done # for pass
6063 if test "$linkmode" = prog; then
6064 dlfiles="$newdlfiles"
6065 fi
6066 if test "$linkmode" = prog || test "$linkmode" = lib; then
6067 dlprefiles="$newdlprefiles"
6068 fi
6069
6070 case $linkmode in
6071 oldlib)
6072 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
6073 func_warning "\`-dlopen' is ignored for archives"
6074 fi
6075
6076 case " $deplibs" in
6077 *\ -l* | *\ -L*)
6078 func_warning "\`-l' and \`-L' are ignored for archives" ;;
6079 esac
6080
6081 test -n "$rpath" && \
6082 func_warning "\`-rpath' is ignored for archives"
6083
6084 test -n "$xrpath" && \
6085 func_warning "\`-R' is ignored for archives"
6086
6087 test -n "$vinfo" && \
6088 func_warning "\`-version-info/-version-number' is ignored for archives"
6089
6090 test -n "$release" && \
6091 func_warning "\`-release' is ignored for archives"
6092
6093 test -n "$export_symbols$export_symbols_regex" && \
6094 func_warning "\`-export-symbols' is ignored for archives"
6095
6096 # Now set the variables for building old libraries.
6097 build_libtool_libs=no
6098 oldlibs="$output"
6099 objs="$objs$old_deplibs"
6100 ;;
6101
6102 lib)
6103 # Make sure we only generate libraries of the form `libNAME.la'.
6104 case $outputname in
6105 lib*)
6106 func_stripname 'lib' '.la' "$outputname"
6107 name=$func_stripname_result
6108 eval shared_ext=\"$shrext_cmds\"
6109 eval libname=\"$libname_spec\"
6110 ;;
6111 *)
6112 test "$module" = no && \
6113 func_fatal_help "libtool library \`$output' must begin with \`lib'"
6114
6115 if test "$need_lib_prefix" != no; then
6116 # Add the "lib" prefix for modules if required
6117 func_stripname '' '.la' "$outputname"
6118 name=$func_stripname_result
6119 eval shared_ext=\"$shrext_cmds\"
6120 eval libname=\"$libname_spec\"
6121 else
6122 func_stripname '' '.la' "$outputname"
6123 libname=$func_stripname_result
6124 fi
6125 ;;
6126 esac
6127
6128 if test -n "$objs"; then
6129 if test "$deplibs_check_method" != pass_all; then
6130 func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
6131 else
6132 $ECHO
6133 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
6134 $ECHO "*** objects $objs is not portable!"
6135 libobjs="$libobjs $objs"
6136 fi
6137 fi
6138
6139 test "$dlself" != no && \
6140 func_warning "\`-dlopen self' is ignored for libtool libraries"
6141
6142 set dummy $rpath
6143 shift
6144 test "$#" -gt 1 && \
6145 func_warning "ignoring multiple \`-rpath's for a libtool library"
6146
6147 install_libdir="$1"
6148
6149 oldlibs=
6150 if test -z "$rpath"; then
6151 if test "$build_libtool_libs" = yes; then
6152 # Building a libtool convenience library.
6153 # Some compilers have problems with a `.al' extension so
6154 # convenience libraries should have the same extension an
6155 # archive normally would.
6156 oldlibs="$output_objdir/$libname.$libext $oldlibs"
6157 build_libtool_libs=convenience
6158 build_old_libs=yes
6159 fi
6160
6161 test -n "$vinfo" && \
6162 func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
6163
6164 test -n "$release" && \
6165 func_warning "\`-release' is ignored for convenience libraries"
6166 else
6167
6168 # Parse the version information argument.
6169 save_ifs="$IFS"; IFS=':'
6170 set dummy $vinfo 0 0 0
6171 shift
6172 IFS="$save_ifs"
6173
6174 test -n "$7" && \
6175 func_fatal_help "too many parameters to \`-version-info'"
6176
6177 # convert absolute version numbers to libtool ages
6178 # this retains compatibility with .la files and attempts
6179 # to make the code below a bit more comprehensible
6180
6181 case $vinfo_number in
6182 yes)
6183 number_major="$1"
6184 number_minor="$2"
6185 number_revision="$3"
6186 #
6187 # There are really only two kinds -- those that
6188 # use the current revision as the major version
6189 # and those that subtract age and use age as
6190 # a minor version. But, then there is irix
6191 # which has an extra 1 added just for fun
6192 #
6193 case $version_type in
6194 darwin|linux|osf|windows|none)
6195 func_arith $number_major + $number_minor
6196 current=$func_arith_result
6197 age="$number_minor"
6198 revision="$number_revision"
6199 ;;
6200 freebsd-aout|freebsd-elf|sunos)
6201 current="$number_major"
6202 revision="$number_minor"
6203 age="0"
6204 ;;
6205 irix|nonstopux)
6206 func_arith $number_major + $number_minor
6207 current=$func_arith_result
6208 age="$number_minor"
6209 revision="$number_minor"
6210 lt_irix_increment=no
6211 ;;
6212 *)
6213 func_fatal_configuration "$modename: unknown library version type \`$version_type'"
6214 ;;
6215 esac
6216 ;;
6217 no)
6218 current="$1"
6219 revision="$2"
6220 age="$3"
6221 ;;
6222 esac
6223
6224 # Check that each of the things are valid numbers.
6225 case $current in
6226 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]) ;;
6227 *)
6228 func_error "CURRENT \`$current' must be a nonnegative integer"
6229 func_fatal_error "\`$vinfo' is not valid version information"
6230 ;;
6231 esac
6232
6233 case $revision in
6234 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]) ;;
6235 *)
6236 func_error "REVISION \`$revision' must be a nonnegative integer"
6237 func_fatal_error "\`$vinfo' is not valid version information"
6238 ;;
6239 esac
6240
6241 case $age in
6242 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]) ;;
6243 *)
6244 func_error "AGE \`$age' must be a nonnegative integer"
6245 func_fatal_error "\`$vinfo' is not valid version information"
6246 ;;
6247 esac
6248
6249 if test "$age" -gt "$current"; then
6250 func_error "AGE \`$age' is greater than the current interface number \`$current'"
6251 func_fatal_error "\`$vinfo' is not valid version information"
6252 fi
6253
6254 # Calculate the version variables.
6255 major=
6256 versuffix=
6257 verstring=
6258 case $version_type in
6259 none) ;;
6260
6261 darwin)
6262 # Like Linux, but with the current version available in
6263 # verstring for coding it into the library header
6264 func_arith $current - $age
6265 major=.$func_arith_result
6266 versuffix="$major.$age.$revision"
6267 # Darwin ld doesn't like 0 for these options...
6268 func_arith $current + 1
6269 minor_current=$func_arith_result
6270 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
6271 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
6272 ;;
6273
6274 freebsd-aout)
6275 major=".$current"
6276 versuffix=".$current.$revision";
6277 ;;
6278
6279 freebsd-elf)
6280 major=".$current"
6281 versuffix=".$current"
6282 ;;
6283
6284 irix | nonstopux)
6285 if test "X$lt_irix_increment" = "Xno"; then
6286 func_arith $current - $age
6287 else
6288 func_arith $current - $age + 1
6289 fi
6290 major=$func_arith_result
6291
6292 case $version_type in
6293 nonstopux) verstring_prefix=nonstopux ;;
6294 *) verstring_prefix=sgi ;;
6295 esac
6296 verstring="$verstring_prefix$major.$revision"
6297
6298 # Add in all the interfaces that we are compatible with.
6299 loop=$revision
6300 while test "$loop" -ne 0; do
6301 func_arith $revision - $loop
6302 iface=$func_arith_result
6303 func_arith $loop - 1
6304 loop=$func_arith_result
6305 verstring="$verstring_prefix$major.$iface:$verstring"
6306 done
6307
6308 # Before this point, $major must not contain `.'.
6309 major=.$major
6310 versuffix="$major.$revision"
6311 ;;
6312
6313 linux)
6314 func_arith $current - $age
6315 major=.$func_arith_result
6316 versuffix="$major.$age.$revision"
6317 ;;
6318
6319 osf)
6320 func_arith $current - $age
6321 major=.$func_arith_result
6322 versuffix=".$current.$age.$revision"
6323 verstring="$current.$age.$revision"
6324
6325 # Add in all the interfaces that we are compatible with.
6326 loop=$age
6327 while test "$loop" -ne 0; do
6328 func_arith $current - $loop
6329 iface=$func_arith_result
6330 func_arith $loop - 1
6331 loop=$func_arith_result
6332 verstring="$verstring:${iface}.0"
6333 done
6334
6335 # Make executables depend on our current version.
6336 verstring="$verstring:${current}.0"
6337 ;;
6338
6339 qnx)
6340 major=".$current"
6341 versuffix=".$current"
6342 ;;
6343
6344 sunos)
6345 major=".$current"
6346 versuffix=".$current.$revision"
6347 ;;
6348
6349 windows)
6350 # Use '-' rather than '.', since we only want one
6351 # extension on DOS 8.3 filesystems.
6352 func_arith $current - $age
6353 major=$func_arith_result
6354 versuffix="-$major"
6355 ;;
6356
6357 *)
6358 func_fatal_configuration "unknown library version type \`$version_type'"
6359 ;;
6360 esac
6361
6362 # Clear the version info if we defaulted, and they specified a release.
6363 if test -z "$vinfo" && test -n "$release"; then
6364 major=
6365 case $version_type in
6366 darwin)
6367 # we can't check for "0.0" in archive_cmds due to quoting
6368 # problems, so we reset it completely
6369 verstring=
6370 ;;
6371 *)
6372 verstring="0.0"
6373 ;;
6374 esac
6375 if test "$need_version" = no; then
6376 versuffix=
6377 else
6378 versuffix=".0.0"
6379 fi
6380 fi
6381
6382 # Remove version info from name if versioning should be avoided
6383 if test "$avoid_version" = yes && test "$need_version" = no; then
6384 major=
6385 versuffix=
6386 verstring=""
6387 fi
6388
6389 # Check to see if the archive will have undefined symbols.
6390 if test "$allow_undefined" = yes; then
6391 if test "$allow_undefined_flag" = unsupported; then
6392 func_warning "undefined symbols not allowed in $host shared libraries"
6393 build_libtool_libs=no
6394 build_old_libs=yes
6395 fi
6396 else
6397 # Don't allow undefined symbols.
6398 allow_undefined_flag="$no_undefined_flag"
6399 fi
6400
6401 fi
6402
6403 func_generate_dlsyms "$libname" "$libname" "yes"
6404 libobjs="$libobjs $symfileobj"
6405 test "X$libobjs" = "X " && libobjs=
6406
6407 if test "$mode" != relink; then
6408 # Remove our outputs, but don't remove object files since they
6409 # may have been created when compiling PIC objects.
6410 removelist=
6411 tempremovelist=`$ECHO "$output_objdir/*"`
6412 for p in $tempremovelist; do
6413 case $p in
6414 *.$objext | *.gcno)
6415 ;;
6416 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
6417 if test "X$precious_files_regex" != "X"; then
6418 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
6419 then
6420 continue
6421 fi
6422 fi
6423 removelist="$removelist $p"
6424 ;;
6425 *) ;;
6426 esac
6427 done
6428 test -n "$removelist" && \
6429 func_show_eval "${RM}r \$removelist"
6430 fi
6431
6432 # Now set the variables for building old libraries.
6433 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
6434 oldlibs="$oldlibs $output_objdir/$libname.$libext"
6435
6436 # Transform .lo files to .o files.
6437 oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
6438 fi
6439
6440 # Eliminate all temporary directories.
6441 #for path in $notinst_path; do
6442 # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
6443 # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
6444 # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
6445 #done
6446
6447 if test -n "$xrpath"; then
6448 # If the user specified any rpath flags, then add them.
6449 temp_xrpath=
6450 for libdir in $xrpath; do
6451 temp_xrpath="$temp_xrpath -R$libdir"
6452 case "$finalize_rpath " in
6453 *" $libdir "*) ;;
6454 *) finalize_rpath="$finalize_rpath $libdir" ;;
6455 esac
6456 done
6457 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
6458 dependency_libs="$temp_xrpath $dependency_libs"
6459 fi
6460 fi
6461
6462 # Make sure dlfiles contains only unique files that won't be dlpreopened
6463 old_dlfiles="$dlfiles"
6464 dlfiles=
6465 for lib in $old_dlfiles; do
6466 case " $dlprefiles $dlfiles " in
6467 *" $lib "*) ;;
6468 *) dlfiles="$dlfiles $lib" ;;
6469 esac
6470 done
6471
6472 # Make sure dlprefiles contains only unique files
6473 old_dlprefiles="$dlprefiles"
6474 dlprefiles=
6475 for lib in $old_dlprefiles; do
6476 case "$dlprefiles " in
6477 *" $lib "*) ;;
6478 *) dlprefiles="$dlprefiles $lib" ;;
6479 esac
6480 done
6481
6482 if test "$build_libtool_libs" = yes; then
6483 if test -n "$rpath"; then
6484 case $host in
6485 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
6486 # these systems don't actually have a c library (as such)!
6487 ;;
6488 *-*-rhapsody* | *-*-darwin1.[012])
6489 # Rhapsody C library is in the System framework
6490 deplibs="$deplibs System.ltframework"
6491 ;;
6492 *-*-netbsd*)
6493 # Don't link with libc until the a.out ld.so is fixed.
6494 ;;
6495 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
6496 # Do not include libc due to us having libc/libc_r.
6497 ;;
6498 *-*-sco3.2v5* | *-*-sco5v6*)
6499 # Causes problems with __ctype
6500 ;;
6501 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
6502 # Compiler inserts libc in the correct place for threads to work
6503 ;;
6504 *)
6505 # Add libc to deplibs on all other systems if necessary.
6506 if test "$build_libtool_need_lc" = "yes"; then
6507 deplibs="$deplibs -lc"
6508 fi
6509 ;;
6510 esac
6511 fi
6512
6513 # Transform deplibs into only deplibs that can be linked in shared.
6514 name_save=$name
6515 libname_save=$libname
6516 release_save=$release
6517 versuffix_save=$versuffix
6518 major_save=$major
6519 # I'm not sure if I'm treating the release correctly. I think
6520 # release should show up in the -l (ie -lgmp5) so we don't want to
6521 # add it in twice. Is that correct?
6522 release=""
6523 versuffix=""
6524 major=""
6525 newdeplibs=
6526 droppeddeps=no
6527 case $deplibs_check_method in
6528 pass_all)
6529 # Don't check for shared/static. Everything works.
6530 # This might be a little naive. We might want to check
6531 # whether the library exists or not. But this is on
6532 # osf3 & osf4 and I'm not really sure... Just
6533 # implementing what was already the behavior.
6534 newdeplibs=$deplibs
6535 ;;
6536 test_compile)
6537 # This code stresses the "libraries are programs" paradigm to its
6538 # limits. Maybe even breaks it. We compile a program, linking it
6539 # against the deplibs as a proxy for the library. Then we can check
6540 # whether they linked in statically or dynamically with ldd.
6541 $opt_dry_run || $RM conftest.c
6542 cat > conftest.c <<EOF
6543 int main() { return 0; }
6544 EOF
6545 $opt_dry_run || $RM conftest
6546 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
6547 ldd_output=`ldd conftest`
6548 for i in $deplibs; do
6549 case $i in
6550 -l*)
6551 func_stripname -l '' "$i"
6552 name=$func_stripname_result
6553 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6554 case " $predeps $postdeps " in
6555 *" $i "*)
6556 newdeplibs="$newdeplibs $i"
6557 i=""
6558 ;;
6559 esac
6560 fi
6561 if test -n "$i" ; then
6562 libname=`eval "\\$ECHO \"$libname_spec\""`
6563 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
6564 set dummy $deplib_matches; shift
6565 deplib_match=$1
6566 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6567 newdeplibs="$newdeplibs $i"
6568 else
6569 droppeddeps=yes
6570 $ECHO
6571 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
6572 $ECHO "*** I have the capability to make that library automatically link in when"
6573 $ECHO "*** you link to this library. But I can only do this if you have a"
6574 $ECHO "*** shared version of the library, which I believe you do not have"
6575 $ECHO "*** because a test_compile did reveal that the linker did not use it for"
6576 $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
6577 fi
6578 fi
6579 ;;
6580 *)
6581 newdeplibs="$newdeplibs $i"
6582 ;;
6583 esac
6584 done
6585 else
6586 # Error occurred in the first compile. Let's try to salvage
6587 # the situation: Compile a separate program for each library.
6588 for i in $deplibs; do
6589 case $i in
6590 -l*)
6591 func_stripname -l '' "$i"
6592 name=$func_stripname_result
6593 $opt_dry_run || $RM conftest
6594 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
6595 ldd_output=`ldd conftest`
6596 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6597 case " $predeps $postdeps " in
6598 *" $i "*)
6599 newdeplibs="$newdeplibs $i"
6600 i=""
6601 ;;
6602 esac
6603 fi
6604 if test -n "$i" ; then
6605 libname=`eval "\\$ECHO \"$libname_spec\""`
6606 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
6607 set dummy $deplib_matches; shift
6608 deplib_match=$1
6609 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6610 newdeplibs="$newdeplibs $i"
6611 else
6612 droppeddeps=yes
6613 $ECHO
6614 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
6615 $ECHO "*** I have the capability to make that library automatically link in when"
6616 $ECHO "*** you link to this library. But I can only do this if you have a"
6617 $ECHO "*** shared version of the library, which you do not appear to have"
6618 $ECHO "*** because a test_compile did reveal that the linker did not use this one"
6619 $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
6620 fi
6621 fi
6622 else
6623 droppeddeps=yes
6624 $ECHO
6625 $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
6626 $ECHO "*** make it link in! You will probably need to install it or some"
6627 $ECHO "*** library that it depends on before this library will be fully"
6628 $ECHO "*** functional. Installing it before continuing would be even better."
6629 fi
6630 ;;
6631 *)
6632 newdeplibs="$newdeplibs $i"
6633 ;;
6634 esac
6635 done
6636 fi
6637 ;;
6638 file_magic*)
6639 set dummy $deplibs_check_method; shift
6640 file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
6641 for a_deplib in $deplibs; do
6642 case $a_deplib in
6643 -l*)
6644 func_stripname -l '' "$a_deplib"
6645 name=$func_stripname_result
6646 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6647 case " $predeps $postdeps " in
6648 *" $a_deplib "*)
6649 newdeplibs="$newdeplibs $a_deplib"
6650 a_deplib=""
6651 ;;
6652 esac
6653 fi
6654 if test -n "$a_deplib" ; then
6655 libname=`eval "\\$ECHO \"$libname_spec\""`
6656 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
6657 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
6658 for potent_lib in $potential_libs; do
6659 # Follow soft links.
6660 if ls -lLd "$potent_lib" 2>/dev/null |
6661 $GREP " -> " >/dev/null; then
6662 continue
6663 fi
6664 # The statement above tries to avoid entering an
6665 # endless loop below, in case of cyclic links.
6666 # We might still enter an endless loop, since a link
6667 # loop can be closed while we follow links,
6668 # but so what?
6669 potlib="$potent_lib"
6670 while test -h "$potlib" 2>/dev/null; do
6671 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
6672 case $potliblink in
6673 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
6674 *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
6675 esac
6676 done
6677 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
6678 $SED -e 10q |
6679 $EGREP "$file_magic_regex" > /dev/null; then
6680 newdeplibs="$newdeplibs $a_deplib"
6681 a_deplib=""
6682 break 2
6683 fi
6684 done
6685 done
6686 fi
6687 if test -n "$a_deplib" ; then
6688 droppeddeps=yes
6689 $ECHO
6690 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6691 $ECHO "*** I have the capability to make that library automatically link in when"
6692 $ECHO "*** you link to this library. But I can only do this if you have a"
6693 $ECHO "*** shared version of the library, which you do not appear to have"
6694 $ECHO "*** because I did check the linker path looking for a file starting"
6695 if test -z "$potlib" ; then
6696 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
6697 else
6698 $ECHO "*** with $libname and none of the candidates passed a file format test"
6699 $ECHO "*** using a file magic. Last file checked: $potlib"
6700 fi
6701 fi
6702 ;;
6703 *)
6704 # Add a -L argument.
6705 newdeplibs="$newdeplibs $a_deplib"
6706 ;;
6707 esac
6708 done # Gone through all deplibs.
6709 ;;
6710 match_pattern*)
6711 set dummy $deplibs_check_method; shift
6712 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
6713 for a_deplib in $deplibs; do
6714 case $a_deplib in
6715 -l*)
6716 func_stripname -l '' "$a_deplib"
6717 name=$func_stripname_result
6718 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6719 case " $predeps $postdeps " in
6720 *" $a_deplib "*)
6721 newdeplibs="$newdeplibs $a_deplib"
6722 a_deplib=""
6723 ;;
6724 esac
6725 fi
6726 if test -n "$a_deplib" ; then
6727 libname=`eval "\\$ECHO \"$libname_spec\""`
6728 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
6729 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
6730 for potent_lib in $potential_libs; do
6731 potlib="$potent_lib" # see symlink-check above in file_magic test
6732 if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
6733 $EGREP "$match_pattern_regex" > /dev/null; then
6734 newdeplibs="$newdeplibs $a_deplib"
6735 a_deplib=""
6736 break 2
6737 fi
6738 done
6739 done
6740 fi
6741 if test -n "$a_deplib" ; then
6742 droppeddeps=yes
6743 $ECHO
6744 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6745 $ECHO "*** I have the capability to make that library automatically link in when"
6746 $ECHO "*** you link to this library. But I can only do this if you have a"
6747 $ECHO "*** shared version of the library, which you do not appear to have"
6748 $ECHO "*** because I did check the linker path looking for a file starting"
6749 if test -z "$potlib" ; then
6750 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
6751 else
6752 $ECHO "*** with $libname and none of the candidates passed a file format test"
6753 $ECHO "*** using a regex pattern. Last file checked: $potlib"
6754 fi
6755 fi
6756 ;;
6757 *)
6758 # Add a -L argument.
6759 newdeplibs="$newdeplibs $a_deplib"
6760 ;;
6761 esac
6762 done # Gone through all deplibs.
6763 ;;
6764 none | unknown | *)
6765 newdeplibs=""
6766 tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
6767 -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
6768 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6769 for i in $predeps $postdeps ; do
6770 # can't use Xsed below, because $i might contain '/'
6771 tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
6772 done
6773 fi
6774 if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
6775 $GREP . >/dev/null; then
6776 $ECHO
6777 if test "X$deplibs_check_method" = "Xnone"; then
6778 $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
6779 else
6780 $ECHO "*** Warning: inter-library dependencies are not known to be supported."
6781 fi
6782 $ECHO "*** All declared inter-library dependencies are being dropped."
6783 droppeddeps=yes
6784 fi
6785 ;;
6786 esac
6787 versuffix=$versuffix_save
6788 major=$major_save
6789 release=$release_save
6790 libname=$libname_save
6791 name=$name_save
6792
6793 case $host in
6794 *-*-rhapsody* | *-*-darwin1.[012])
6795 # On Rhapsody replace the C library with the System framework
6796 newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
6797 ;;
6798 esac
6799
6800 if test "$droppeddeps" = yes; then
6801 if test "$module" = yes; then
6802 $ECHO
6803 $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
6804 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
6805 $ECHO "*** a static module, that should work as long as the dlopening"
6806 $ECHO "*** application is linked with the -dlopen flag."
6807 if test -z "$global_symbol_pipe"; then
6808 $ECHO
6809 $ECHO "*** However, this would only work if libtool was able to extract symbol"
6810 $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
6811 $ECHO "*** not find such a program. So, this module is probably useless."
6812 $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
6813 fi
6814 if test "$build_old_libs" = no; then
6815 oldlibs="$output_objdir/$libname.$libext"
6816 build_libtool_libs=module
6817 build_old_libs=yes
6818 else
6819 build_libtool_libs=no
6820 fi
6821 else
6822 $ECHO "*** The inter-library dependencies that have been dropped here will be"
6823 $ECHO "*** automatically added whenever a program is linked with this library"
6824 $ECHO "*** or is declared to -dlopen it."
6825
6826 if test "$allow_undefined" = no; then
6827 $ECHO
6828 $ECHO "*** Since this library must not contain undefined symbols,"
6829 $ECHO "*** because either the platform does not support them or"
6830 $ECHO "*** it was explicitly requested with -no-undefined,"
6831 $ECHO "*** libtool will only create a static version of it."
6832 if test "$build_old_libs" = no; then
6833 oldlibs="$output_objdir/$libname.$libext"
6834 build_libtool_libs=module
6835 build_old_libs=yes
6836 else
6837 build_libtool_libs=no
6838 fi
6839 fi
6840 fi
6841 fi
6842 # Done checking deplibs!
6843 deplibs=$newdeplibs
6844 fi
6845 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
6846 case $host in
6847 *-*-darwin*)
6848 newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6849 new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6850 deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6851 ;;
6852 esac
6853
6854 # move library search paths that coincide with paths to not yet
6855 # installed libraries to the beginning of the library search list
6856 new_libs=
6857 for path in $notinst_path; do
6858 case " $new_libs " in
6859 *" -L$path/$objdir "*) ;;
6860 *)
6861 case " $deplibs " in
6862 *" -L$path/$objdir "*)
6863 new_libs="$new_libs -L$path/$objdir" ;;
6864 esac
6865 ;;
6866 esac
6867 done
6868 for deplib in $deplibs; do
6869 case $deplib in
6870 -L*)
6871 case " $new_libs " in
6872 *" $deplib "*) ;;
6873 *) new_libs="$new_libs $deplib" ;;
6874 esac
6875 ;;
6876 *) new_libs="$new_libs $deplib" ;;
6877 esac
6878 done
6879 deplibs="$new_libs"
6880
6881 # All the library-specific variables (install_libdir is set above).
6882 library_names=
6883 old_library=
6884 dlname=
6885
6886 # Test again, we may have decided not to build it any more
6887 if test "$build_libtool_libs" = yes; then
6888 if test "$hardcode_into_libs" = yes; then
6889 # Hardcode the library paths
6890 hardcode_libdirs=
6891 dep_rpath=
6892 rpath="$finalize_rpath"
6893 test "$mode" != relink && rpath="$compile_rpath$rpath"
6894 for libdir in $rpath; do
6895 if test -n "$hardcode_libdir_flag_spec"; then
6896 if test -n "$hardcode_libdir_separator"; then
6897 if test -z "$hardcode_libdirs"; then
6898 hardcode_libdirs="$libdir"
6899 else
6900 # Just accumulate the unique libdirs.
6901 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
6902 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
6903 ;;
6904 *)
6905 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
6906 ;;
6907 esac
6908 fi
6909 else
6910 eval flag=\"$hardcode_libdir_flag_spec\"
6911 dep_rpath="$dep_rpath $flag"
6912 fi
6913 elif test -n "$runpath_var"; then
6914 case "$perm_rpath " in
6915 *" $libdir "*) ;;
6916 *) perm_rpath="$perm_rpath $libdir" ;;
6917 esac
6918 fi
6919 done
6920 # Substitute the hardcoded libdirs into the rpath.
6921 if test -n "$hardcode_libdir_separator" &&
6922 test -n "$hardcode_libdirs"; then
6923 libdir="$hardcode_libdirs"
6924 if test -n "$hardcode_libdir_flag_spec_ld"; then
6925 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
6926 else
6927 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
6928 fi
6929 fi
6930 if test -n "$runpath_var" && test -n "$perm_rpath"; then
6931 # We should set the runpath_var.
6932 rpath=
6933 for dir in $perm_rpath; do
6934 rpath="$rpath$dir:"
6935 done
6936 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
6937 fi
6938 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
6939 fi
6940
6941 shlibpath="$finalize_shlibpath"
6942 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
6943 if test -n "$shlibpath"; then
6944 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
6945 fi
6946
6947 # Get the real and link names of the library.
6948 eval shared_ext=\"$shrext_cmds\"
6949 eval library_names=\"$library_names_spec\"
6950 set dummy $library_names
6951 shift
6952 realname="$1"
6953 shift
6954
6955 if test -n "$soname_spec"; then
6956 eval soname=\"$soname_spec\"
6957 else
6958 soname="$realname"
6959 fi
6960 if test -z "$dlname"; then
6961 dlname=$soname
6962 fi
6963
6964 lib="$output_objdir/$realname"
6965 linknames=
6966 for link
6967 do
6968 linknames="$linknames $link"
6969 done
6970
6971 # Use standard objects if they are pic
6972 test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
6973 test "X$libobjs" = "X " && libobjs=
6974
6975 delfiles=
6976 if test -n "$export_symbols" && test -n "$include_expsyms"; then
6977 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
6978 export_symbols="$output_objdir/$libname.uexp"
6979 delfiles="$delfiles $export_symbols"
6980 fi
6981
6982 orig_export_symbols=
6983 case $host_os in
6984 cygwin* | mingw* | cegcc*)
6985 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
6986 # exporting using user supplied symfile
6987 if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
6988 # and it's NOT already a .def file. Must figure out
6989 # which of the given symbols are data symbols and tag
6990 # them as such. So, trigger use of export_symbols_cmds.
6991 # export_symbols gets reassigned inside the "prepare
6992 # the list of exported symbols" if statement, so the
6993 # include_expsyms logic still works.
6994 orig_export_symbols="$export_symbols"
6995 export_symbols=
6996 always_export_symbols=yes
6997 fi
6998 fi
6999 ;;
7000 esac
7001
7002 # Prepare the list of exported symbols
7003 if test -z "$export_symbols"; then
7004 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
7005 func_verbose "generating symbol list for \`$libname.la'"
7006 export_symbols="$output_objdir/$libname.exp"
7007 $opt_dry_run || $RM $export_symbols
7008 cmds=$export_symbols_cmds
7009 save_ifs="$IFS"; IFS='~'
7010 for cmd in $cmds; do
7011 IFS="$save_ifs"
7012 eval cmd=\"$cmd\"
7013 func_len " $cmd"
7014 len=$func_len_result
7015 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7016 func_show_eval "$cmd" 'exit $?'
7017 skipped_export=false
7018 else
7019 # The command line is too long to execute in one step.
7020 func_verbose "using reloadable object file for export list..."
7021 skipped_export=:
7022 # Break out early, otherwise skipped_export may be
7023 # set to false by a later but shorter cmd.
7024 break
7025 fi
7026 done
7027 IFS="$save_ifs"
7028 if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
7029 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
7030 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
7031 fi
7032 fi
7033 fi
7034
7035 if test -n "$export_symbols" && test -n "$include_expsyms"; then
7036 tmp_export_symbols="$export_symbols"
7037 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7038 $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
7039 fi
7040
7041 if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
7042 # The given exports_symbols file has to be filtered, so filter it.
7043 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
7044 # FIXME: $output_objdir/$libname.filter potentially contains lots of
7045 # 's' commands which not all seds can handle. GNU sed should be fine
7046 # though. Also, the filter scales superlinearly with the number of
7047 # global variables. join(1) would be nice here, but unfortunately
7048 # isn't a blessed tool.
7049 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
7050 delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
7051 export_symbols=$output_objdir/$libname.def
7052 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
7053 fi
7054
7055 tmp_deplibs=
7056 for test_deplib in $deplibs; do
7057 case " $convenience " in
7058 *" $test_deplib "*) ;;
7059 *)
7060 tmp_deplibs="$tmp_deplibs $test_deplib"
7061 ;;
7062 esac
7063 done
7064 deplibs="$tmp_deplibs"
7065
7066 if test -n "$convenience"; then
7067 if test -n "$whole_archive_flag_spec" &&
7068 test "$compiler_needs_object" = yes &&
7069 test -z "$libobjs"; then
7070 # extract the archives, so we have objects to list.
7071 # TODO: could optimize this to just extract one archive.
7072 whole_archive_flag_spec=
7073 fi
7074 if test -n "$whole_archive_flag_spec"; then
7075 save_libobjs=$libobjs
7076 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
7077 test "X$libobjs" = "X " && libobjs=
7078 else
7079 gentop="$output_objdir/${outputname}x"
7080 generated="$generated $gentop"
7081
7082 func_extract_archives $gentop $convenience
7083 libobjs="$libobjs $func_extract_archives_result"
7084 test "X$libobjs" = "X " && libobjs=
7085 fi
7086 fi
7087
7088 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
7089 eval flag=\"$thread_safe_flag_spec\"
7090 linker_flags="$linker_flags $flag"
7091 fi
7092
7093 # Make a backup of the uninstalled library when relinking
7094 if test "$mode" = relink; then
7095 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
7096 fi
7097
7098 # Do each of the archive commands.
7099 if test "$module" = yes && test -n "$module_cmds" ; then
7100 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
7101 eval test_cmds=\"$module_expsym_cmds\"
7102 cmds=$module_expsym_cmds
7103 else
7104 eval test_cmds=\"$module_cmds\"
7105 cmds=$module_cmds
7106 fi
7107 else
7108 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
7109 eval test_cmds=\"$archive_expsym_cmds\"
7110 cmds=$archive_expsym_cmds
7111 else
7112 eval test_cmds=\"$archive_cmds\"
7113 cmds=$archive_cmds
7114 fi
7115 fi
7116
7117 if test "X$skipped_export" != "X:" &&
7118 func_len " $test_cmds" &&
7119 len=$func_len_result &&
7120 test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7121 :
7122 else
7123 # The command line is too long to link in one step, link piecewise
7124 # or, if using GNU ld and skipped_export is not :, use a linker
7125 # script.
7126
7127 # Save the value of $output and $libobjs because we want to
7128 # use them later. If we have whole_archive_flag_spec, we
7129 # want to use save_libobjs as it was before
7130 # whole_archive_flag_spec was expanded, because we can't
7131 # assume the linker understands whole_archive_flag_spec.
7132 # This may have to be revisited, in case too many
7133 # convenience libraries get linked in and end up exceeding
7134 # the spec.
7135 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
7136 save_libobjs=$libobjs
7137 fi
7138 save_output=$output
7139 output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
7140
7141 # Clear the reloadable object creation command queue and
7142 # initialize k to one.
7143 test_cmds=
7144 concat_cmds=
7145 objlist=
7146 last_robj=
7147 k=1
7148
7149 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
7150 output=${output_objdir}/${output_la}.lnkscript
7151 func_verbose "creating GNU ld script: $output"
7152 $ECHO 'INPUT (' > $output
7153 for obj in $save_libobjs
7154 do
7155 $ECHO "$obj" >> $output
7156 done
7157 $ECHO ')' >> $output
7158 delfiles="$delfiles $output"
7159 elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
7160 output=${output_objdir}/${output_la}.lnk
7161 func_verbose "creating linker input file list: $output"
7162 : > $output
7163 set x $save_libobjs
7164 shift
7165 firstobj=
7166 if test "$compiler_needs_object" = yes; then
7167 firstobj="$1 "
7168 shift
7169 fi
7170 for obj
7171 do
7172 $ECHO "$obj" >> $output
7173 done
7174 delfiles="$delfiles $output"
7175 output=$firstobj\"$file_list_spec$output\"
7176 else
7177 if test -n "$save_libobjs"; then
7178 func_verbose "creating reloadable object files..."
7179 output=$output_objdir/$output_la-${k}.$objext
7180 eval test_cmds=\"$reload_cmds\"
7181 func_len " $test_cmds"
7182 len0=$func_len_result
7183 len=$len0
7184
7185 # Loop over the list of objects to be linked.
7186 for obj in $save_libobjs
7187 do
7188 func_len " $obj"
7189 func_arith $len + $func_len_result
7190 len=$func_arith_result
7191 if test "X$objlist" = X ||
7192 test "$len" -lt "$max_cmd_len"; then
7193 func_append objlist " $obj"
7194 else
7195 # The command $test_cmds is almost too long, add a
7196 # command to the queue.
7197 if test "$k" -eq 1 ; then
7198 # The first file doesn't have a previous command to add.
7199 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
7200 else
7201 # All subsequent reloadable object files will link in
7202 # the last one created.
7203 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
7204 fi
7205 last_robj=$output_objdir/$output_la-${k}.$objext
7206 func_arith $k + 1
7207 k=$func_arith_result
7208 output=$output_objdir/$output_la-${k}.$objext
7209 objlist=$obj
7210 func_len " $last_robj"
7211 func_arith $len0 + $func_len_result
7212 len=$func_arith_result
7213 fi
7214 done
7215 # Handle the remaining objects by creating one last
7216 # reloadable object file. All subsequent reloadable object
7217 # files will link in the last one created.
7218 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
7219 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
7220 if test -n "$last_robj"; then
7221 eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
7222 fi
7223 delfiles="$delfiles $output"
7224
7225 else
7226 output=
7227 fi
7228
7229 if ${skipped_export-false}; then
7230 func_verbose "generating symbol list for \`$libname.la'"
7231 export_symbols="$output_objdir/$libname.exp"
7232 $opt_dry_run || $RM $export_symbols
7233 libobjs=$output
7234 # Append the command to create the export file.
7235 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
7236 eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
7237 if test -n "$last_robj"; then
7238 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
7239 fi
7240 fi
7241
7242 test -n "$save_libobjs" &&
7243 func_verbose "creating a temporary reloadable object file: $output"
7244
7245 # Loop through the commands generated above and execute them.
7246 save_ifs="$IFS"; IFS='~'
7247 for cmd in $concat_cmds; do
7248 IFS="$save_ifs"
7249 $opt_silent || {
7250 func_quote_for_expand "$cmd"
7251 eval "func_echo $func_quote_for_expand_result"
7252 }
7253 $opt_dry_run || eval "$cmd" || {
7254 lt_exit=$?
7255
7256 # Restore the uninstalled library and exit
7257 if test "$mode" = relink; then
7258 ( cd "$output_objdir" && \
7259 $RM "${realname}T" && \
7260 $MV "${realname}U" "$realname" )
7261 fi
7262
7263 exit $lt_exit
7264 }
7265 done
7266 IFS="$save_ifs"
7267
7268 if test -n "$export_symbols_regex" && ${skipped_export-false}; then
7269 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
7270 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
7271 fi
7272 fi
7273
7274 if ${skipped_export-false}; then
7275 if test -n "$export_symbols" && test -n "$include_expsyms"; then
7276 tmp_export_symbols="$export_symbols"
7277 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7278 $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
7279 fi
7280
7281 if test -n "$orig_export_symbols"; then
7282 # The given exports_symbols file has to be filtered, so filter it.
7283 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
7284 # FIXME: $output_objdir/$libname.filter potentially contains lots of
7285 # 's' commands which not all seds can handle. GNU sed should be fine
7286 # though. Also, the filter scales superlinearly with the number of
7287 # global variables. join(1) would be nice here, but unfortunately
7288 # isn't a blessed tool.
7289 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
7290 delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
7291 export_symbols=$output_objdir/$libname.def
7292 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
7293 fi
7294 fi
7295
7296 libobjs=$output
7297 # Restore the value of output.
7298 output=$save_output
7299
7300 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
7301 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
7302 test "X$libobjs" = "X " && libobjs=
7303 fi
7304 # Expand the library linking commands again to reset the
7305 # value of $libobjs for piecewise linking.
7306
7307 # Do each of the archive commands.
7308 if test "$module" = yes && test -n "$module_cmds" ; then
7309 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
7310 cmds=$module_expsym_cmds
7311 else
7312 cmds=$module_cmds
7313 fi
7314 else
7315 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
7316 cmds=$archive_expsym_cmds
7317 else
7318 cmds=$archive_cmds
7319 fi
7320 fi
7321 fi
7322
7323 if test -n "$delfiles"; then
7324 # Append the command to remove temporary files to $cmds.
7325 eval cmds=\"\$cmds~\$RM $delfiles\"
7326 fi
7327
7328 # Add any objects from preloaded convenience libraries
7329 if test -n "$dlprefiles"; then
7330 gentop="$output_objdir/${outputname}x"
7331 generated="$generated $gentop"
7332
7333 func_extract_archives $gentop $dlprefiles
7334 libobjs="$libobjs $func_extract_archives_result"
7335 test "X$libobjs" = "X " && libobjs=
7336 fi
7337
7338 save_ifs="$IFS"; IFS='~'
7339 for cmd in $cmds; do
7340 IFS="$save_ifs"
7341 eval cmd=\"$cmd\"
7342 $opt_silent || {
7343 func_quote_for_expand "$cmd"
7344 eval "func_echo $func_quote_for_expand_result"
7345 }
7346 $opt_dry_run || eval "$cmd" || {
7347 lt_exit=$?
7348
7349 # Restore the uninstalled library and exit
7350 if test "$mode" = relink; then
7351 ( cd "$output_objdir" && \
7352 $RM "${realname}T" && \
7353 $MV "${realname}U" "$realname" )
7354 fi
7355
7356 exit $lt_exit
7357 }
7358 done
7359 IFS="$save_ifs"
7360
7361 # Restore the uninstalled library and exit
7362 if test "$mode" = relink; then
7363 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
7364
7365 if test -n "$convenience"; then
7366 if test -z "$whole_archive_flag_spec"; then
7367 func_show_eval '${RM}r "$gentop"'
7368 fi
7369 fi
7370
7371 exit $EXIT_SUCCESS
7372 fi
7373
7374 # Create links to the real library.
7375 for linkname in $linknames; do
7376 if test "$realname" != "$linkname"; then
7377 func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
7378 fi
7379 done
7380
7381 # If -module or -export-dynamic was specified, set the dlname.
7382 if test "$module" = yes || test "$export_dynamic" = yes; then
7383 # On all known operating systems, these are identical.
7384 dlname="$soname"
7385 fi
7386 fi
7387 ;;
7388
7389 obj)
7390 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
7391 func_warning "\`-dlopen' is ignored for objects"
7392 fi
7393
7394 case " $deplibs" in
7395 *\ -l* | *\ -L*)
7396 func_warning "\`-l' and \`-L' are ignored for objects" ;;
7397 esac
7398
7399 test -n "$rpath" && \
7400 func_warning "\`-rpath' is ignored for objects"
7401
7402 test -n "$xrpath" && \
7403 func_warning "\`-R' is ignored for objects"
7404
7405 test -n "$vinfo" && \
7406 func_warning "\`-version-info' is ignored for objects"
7407
7408 test -n "$release" && \
7409 func_warning "\`-release' is ignored for objects"
7410
7411 case $output in
7412 *.lo)
7413 test -n "$objs$old_deplibs" && \
7414 func_fatal_error "cannot build library object \`$output' from non-libtool objects"
7415
7416 libobj=$output
7417 func_lo2o "$libobj"
7418 obj=$func_lo2o_result
7419 ;;
7420 *)
7421 libobj=
7422 obj="$output"
7423 ;;
7424 esac
7425
7426 # Delete the old objects.
7427 $opt_dry_run || $RM $obj $libobj
7428
7429 # Objects from convenience libraries. This assumes
7430 # single-version convenience libraries. Whenever we create
7431 # different ones for PIC/non-PIC, this we'll have to duplicate
7432 # the extraction.
7433 reload_conv_objs=
7434 gentop=
7435 # reload_cmds runs $LD directly, so let us get rid of
7436 # -Wl from whole_archive_flag_spec and hope we can get by with
7437 # turning comma into space..
7438 wl=
7439
7440 if test -n "$convenience"; then
7441 if test -n "$whole_archive_flag_spec"; then
7442 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
7443 reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
7444 else
7445 gentop="$output_objdir/${obj}x"
7446 generated="$generated $gentop"
7447
7448 func_extract_archives $gentop $convenience
7449 reload_conv_objs="$reload_objs $func_extract_archives_result"
7450 fi
7451 fi
7452
7453 # Create the old-style object.
7454 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
7455
7456 output="$obj"
7457 func_execute_cmds "$reload_cmds" 'exit $?'
7458
7459 # Exit if we aren't doing a library object file.
7460 if test -z "$libobj"; then
7461 if test -n "$gentop"; then
7462 func_show_eval '${RM}r "$gentop"'
7463 fi
7464
7465 exit $EXIT_SUCCESS
7466 fi
7467
7468 if test "$build_libtool_libs" != yes; then
7469 if test -n "$gentop"; then
7470 func_show_eval '${RM}r "$gentop"'
7471 fi
7472
7473 # Create an invalid libtool object if no PIC, so that we don't
7474 # accidentally link it into a program.
7475 # $show "echo timestamp > $libobj"
7476 # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
7477 exit $EXIT_SUCCESS
7478 fi
7479
7480 if test -n "$pic_flag" || test "$pic_mode" != default; then
7481 # Only do commands if we really have different PIC objects.
7482 reload_objs="$libobjs $reload_conv_objs"
7483 output="$libobj"
7484 func_execute_cmds "$reload_cmds" 'exit $?'
7485 fi
7486
7487 if test -n "$gentop"; then
7488 func_show_eval '${RM}r "$gentop"'
7489 fi
7490
7491 exit $EXIT_SUCCESS
7492 ;;
7493
7494 prog)
7495 case $host in
7496 *cygwin*) func_stripname '' '.exe' "$output"
7497 output=$func_stripname_result.exe;;
7498 esac
7499 test -n "$vinfo" && \
7500 func_warning "\`-version-info' is ignored for programs"
7501
7502 test -n "$release" && \
7503 func_warning "\`-release' is ignored for programs"
7504
7505 test "$preload" = yes \
7506 && test "$dlopen_support" = unknown \
7507 && test "$dlopen_self" = unknown \
7508 && test "$dlopen_self_static" = unknown && \
7509 func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
7510
7511 case $host in
7512 *-*-rhapsody* | *-*-darwin1.[012])
7513 # On Rhapsody replace the C library is the System framework
7514 compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7515 finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7516 ;;
7517 esac
7518
7519 case $host in
7520 *-*-darwin*)
7521 # Don't allow lazy linking, it breaks C++ global constructors
7522 # But is supposedly fixed on 10.4 or later (yay!).
7523 if test "$tagname" = CXX ; then
7524 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
7525 10.[0123])
7526 compile_command="$compile_command ${wl}-bind_at_load"
7527 finalize_command="$finalize_command ${wl}-bind_at_load"
7528 ;;
7529 esac
7530 fi
7531 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
7532 compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7533 finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7534 ;;
7535 esac
7536
7537
7538 # move library search paths that coincide with paths to not yet
7539 # installed libraries to the beginning of the library search list
7540 new_libs=
7541 for path in $notinst_path; do
7542 case " $new_libs " in
7543 *" -L$path/$objdir "*) ;;
7544 *)
7545 case " $compile_deplibs " in
7546 *" -L$path/$objdir "*)
7547 new_libs="$new_libs -L$path/$objdir" ;;
7548 esac
7549 ;;
7550 esac
7551 done
7552 for deplib in $compile_deplibs; do
7553 case $deplib in
7554 -L*)
7555 case " $new_libs " in
7556 *" $deplib "*) ;;
7557 *) new_libs="$new_libs $deplib" ;;
7558 esac
7559 ;;
7560 *) new_libs="$new_libs $deplib" ;;
7561 esac
7562 done
7563 compile_deplibs="$new_libs"
7564
7565
7566 compile_command="$compile_command $compile_deplibs"
7567 finalize_command="$finalize_command $finalize_deplibs"
7568
7569 if test -n "$rpath$xrpath"; then
7570 # If the user specified any rpath flags, then add them.
7571 for libdir in $rpath $xrpath; do
7572 # This is the magic to use -rpath.
7573 case "$finalize_rpath " in
7574 *" $libdir "*) ;;
7575 *) finalize_rpath="$finalize_rpath $libdir" ;;
7576 esac
7577 done
7578 fi
7579
7580 # Now hardcode the library paths
7581 rpath=
7582 hardcode_libdirs=
7583 for libdir in $compile_rpath $finalize_rpath; do
7584 if test -n "$hardcode_libdir_flag_spec"; then
7585 if test -n "$hardcode_libdir_separator"; then
7586 if test -z "$hardcode_libdirs"; then
7587 hardcode_libdirs="$libdir"
7588 else
7589 # Just accumulate the unique libdirs.
7590 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
7591 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
7592 ;;
7593 *)
7594 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
7595 ;;
7596 esac
7597 fi
7598 else
7599 eval flag=\"$hardcode_libdir_flag_spec\"
7600 rpath="$rpath $flag"
7601 fi
7602 elif test -n "$runpath_var"; then
7603 case "$perm_rpath " in
7604 *" $libdir "*) ;;
7605 *) perm_rpath="$perm_rpath $libdir" ;;
7606 esac
7607 fi
7608 case $host in
7609 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
7610 testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
7611 case :$dllsearchpath: in
7612 *":$libdir:"*) ;;
7613 ::) dllsearchpath=$libdir;;
7614 *) dllsearchpath="$dllsearchpath:$libdir";;
7615 esac
7616 case :$dllsearchpath: in
7617 *":$testbindir:"*) ;;
7618 ::) dllsearchpath=$testbindir;;
7619 *) dllsearchpath="$dllsearchpath:$testbindir";;
7620 esac
7621 ;;
7622 esac
7623 done
7624 # Substitute the hardcoded libdirs into the rpath.
7625 if test -n "$hardcode_libdir_separator" &&
7626 test -n "$hardcode_libdirs"; then
7627 libdir="$hardcode_libdirs"
7628 eval rpath=\" $hardcode_libdir_flag_spec\"
7629 fi
7630 compile_rpath="$rpath"
7631
7632 rpath=
7633 hardcode_libdirs=
7634 for libdir in $finalize_rpath; do
7635 if test -n "$hardcode_libdir_flag_spec"; then
7636 if test -n "$hardcode_libdir_separator"; then
7637 if test -z "$hardcode_libdirs"; then
7638 hardcode_libdirs="$libdir"
7639 else
7640 # Just accumulate the unique libdirs.
7641 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
7642 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
7643 ;;
7644 *)
7645 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
7646 ;;
7647 esac
7648 fi
7649 else
7650 eval flag=\"$hardcode_libdir_flag_spec\"
7651 rpath="$rpath $flag"
7652 fi
7653 elif test -n "$runpath_var"; then
7654 case "$finalize_perm_rpath " in
7655 *" $libdir "*) ;;
7656 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
7657 esac
7658 fi
7659 done
7660 # Substitute the hardcoded libdirs into the rpath.
7661 if test -n "$hardcode_libdir_separator" &&
7662 test -n "$hardcode_libdirs"; then
7663 libdir="$hardcode_libdirs"
7664 eval rpath=\" $hardcode_libdir_flag_spec\"
7665 fi
7666 finalize_rpath="$rpath"
7667
7668 if test -n "$libobjs" && test "$build_old_libs" = yes; then
7669 # Transform all the library objects into standard objects.
7670 compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7671 finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7672 fi
7673
7674 func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
7675
7676 # template prelinking step
7677 if test -n "$prelink_cmds"; then
7678 func_execute_cmds "$prelink_cmds" 'exit $?'
7679 fi
7680
7681 wrappers_required=yes
7682 case $host in
7683 *cygwin* | *mingw* )
7684 if test "$build_libtool_libs" != yes; then
7685 wrappers_required=no
7686 fi
7687 ;;
7688 *cegcc)
7689 # Disable wrappers for cegcc, we are cross compiling anyway.
7690 wrappers_required=no
7691 ;;
7692 *)
7693 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
7694 wrappers_required=no
7695 fi
7696 ;;
7697 esac
7698 if test "$wrappers_required" = no; then
7699 # Replace the output file specification.
7700 compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
7701 link_command="$compile_command$compile_rpath"
7702
7703 # We have no uninstalled library dependencies, so finalize right now.
7704 exit_status=0
7705 func_show_eval "$link_command" 'exit_status=$?'
7706
7707 # Delete the generated files.
7708 if test -f "$output_objdir/${outputname}S.${objext}"; then
7709 func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
7710 fi
7711
7712 exit $exit_status
7713 fi
7714
7715 if test -n "$compile_shlibpath$finalize_shlibpath"; then
7716 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
7717 fi
7718 if test -n "$finalize_shlibpath"; then
7719 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
7720 fi
7721
7722 compile_var=
7723 finalize_var=
7724 if test -n "$runpath_var"; then
7725 if test -n "$perm_rpath"; then
7726 # We should set the runpath_var.
7727 rpath=
7728 for dir in $perm_rpath; do
7729 rpath="$rpath$dir:"
7730 done
7731 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
7732 fi
7733 if test -n "$finalize_perm_rpath"; then
7734 # We should set the runpath_var.
7735 rpath=
7736 for dir in $finalize_perm_rpath; do
7737 rpath="$rpath$dir:"
7738 done
7739 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
7740 fi
7741 fi
7742
7743 if test "$no_install" = yes; then
7744 # We don't need to create a wrapper script.
7745 link_command="$compile_var$compile_command$compile_rpath"
7746 # Replace the output file specification.
7747 link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
7748 # Delete the old output file.
7749 $opt_dry_run || $RM $output
7750 # Link the executable and exit
7751 func_show_eval "$link_command" 'exit $?'
7752 exit $EXIT_SUCCESS
7753 fi
7754
7755 if test "$hardcode_action" = relink; then
7756 # Fast installation is not supported
7757 link_command="$compile_var$compile_command$compile_rpath"
7758 relink_command="$finalize_var$finalize_command$finalize_rpath"
7759
7760 func_warning "this platform does not like uninstalled shared libraries"
7761 func_warning "\`$output' will be relinked during installation"
7762 else
7763 if test "$fast_install" != no; then
7764 link_command="$finalize_var$compile_command$finalize_rpath"
7765 if test "$fast_install" = yes; then
7766 relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
7767 else
7768 # fast_install is set to needless
7769 relink_command=
7770 fi
7771 else
7772 link_command="$compile_var$compile_command$compile_rpath"
7773 relink_command="$finalize_var$finalize_command$finalize_rpath"
7774 fi
7775 fi
7776
7777 # Replace the output file specification.
7778 link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
7779
7780 # Delete the old output files.
7781 $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
7782
7783 func_show_eval "$link_command" 'exit $?'
7784
7785 # Now create the wrapper script.
7786 func_verbose "creating $output"
7787
7788 # Quote the relink command for shipping.
7789 if test -n "$relink_command"; then
7790 # Preserve any variables that may affect compiler behavior
7791 for var in $variables_saved_for_relink; do
7792 if eval test -z \"\${$var+set}\"; then
7793 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
7794 elif eval var_value=\$$var; test -z "$var_value"; then
7795 relink_command="$var=; export $var; $relink_command"
7796 else
7797 func_quote_for_eval "$var_value"
7798 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
7799 fi
7800 done
7801 relink_command="(cd `pwd`; $relink_command)"
7802 relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
7803 fi
7804
7805 # Quote $ECHO for shipping.
7806 if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
7807 case $progpath in
7808 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
7809 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
7810 esac
7811 qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
7812 else
7813 qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
7814 fi
7815
7816 # Only actually do things if not in dry run mode.
7817 $opt_dry_run || {
7818 # win32 will think the script is a binary if it has
7819 # a .exe suffix, so we strip it off here.
7820 case $output in
7821 *.exe) func_stripname '' '.exe' "$output"
7822 output=$func_stripname_result ;;
7823 esac
7824 # test for cygwin because mv fails w/o .exe extensions
7825 case $host in
7826 *cygwin*)
7827 exeext=.exe
7828 func_stripname '' '.exe' "$outputname"
7829 outputname=$func_stripname_result ;;
7830 *) exeext= ;;
7831 esac
7832 case $host in
7833 *cygwin* | *mingw* )
7834 func_dirname_and_basename "$output" "" "."
7835 output_name=$func_basename_result
7836 output_path=$func_dirname_result
7837 cwrappersource="$output_path/$objdir/lt-$output_name.c"
7838 cwrapper="$output_path/$output_name.exe"
7839 $RM $cwrappersource $cwrapper
7840 trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
7841
7842 func_emit_cwrapperexe_src > $cwrappersource
7843
7844 # The wrapper executable is built using the $host compiler,
7845 # because it contains $host paths and files. If cross-
7846 # compiling, it, like the target executable, must be
7847 # executed on the $host or under an emulation environment.
7848 $opt_dry_run || {
7849 $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
7850 $STRIP $cwrapper
7851 }
7852
7853 # Now, create the wrapper script for func_source use:
7854 func_ltwrapper_scriptname $cwrapper
7855 $RM $func_ltwrapper_scriptname_result
7856 trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
7857 $opt_dry_run || {
7858 # note: this script will not be executed, so do not chmod.
7859 if test "x$build" = "x$host" ; then
7860 $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
7861 else
7862 func_emit_wrapper no > $func_ltwrapper_scriptname_result
7863 fi
7864 }
7865 ;;
7866 * )
7867 $RM $output
7868 trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
7869
7870 func_emit_wrapper no > $output
7871 chmod +x $output
7872 ;;
7873 esac
7874 }
7875 exit $EXIT_SUCCESS
7876 ;;
7877 esac
7878
7879 # See if we need to build an old-fashioned archive.
7880 for oldlib in $oldlibs; do
7881
7882 if test "$build_libtool_libs" = convenience; then
7883 oldobjs="$libobjs_save $symfileobj"
7884 addlibs="$convenience"
7885 build_libtool_libs=no
7886 else
7887 if test "$build_libtool_libs" = module; then
7888 oldobjs="$libobjs_save"
7889 build_libtool_libs=no
7890 else
7891 oldobjs="$old_deplibs $non_pic_objects"
7892 if test "$preload" = yes && test -f "$symfileobj"; then
7893 oldobjs="$oldobjs $symfileobj"
7894 fi
7895 fi
7896 addlibs="$old_convenience"
7897 fi
7898
7899 if test -n "$addlibs"; then
7900 gentop="$output_objdir/${outputname}x"
7901 generated="$generated $gentop"
7902
7903 func_extract_archives $gentop $addlibs
7904 oldobjs="$oldobjs $func_extract_archives_result"
7905 fi
7906
7907 # Do each command in the archive commands.
7908 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
7909 cmds=$old_archive_from_new_cmds
7910 else
7911
7912 # Add any objects from preloaded convenience libraries
7913 if test -n "$dlprefiles"; then
7914 gentop="$output_objdir/${outputname}x"
7915 generated="$generated $gentop"
7916
7917 func_extract_archives $gentop $dlprefiles
7918 oldobjs="$oldobjs $func_extract_archives_result"
7919 fi
7920
7921 # POSIX demands no paths to be encoded in archives. We have
7922 # to avoid creating archives with duplicate basenames if we
7923 # might have to extract them afterwards, e.g., when creating a
7924 # static archive out of a convenience library, or when linking
7925 # the entirety of a libtool archive into another (currently
7926 # not supported by libtool).
7927 if (for obj in $oldobjs
7928 do
7929 func_basename "$obj"
7930 $ECHO "$func_basename_result"
7931 done | sort | sort -uc >/dev/null 2>&1); then
7932 :
7933 else
7934 $ECHO "copying selected object files to avoid basename conflicts..."
7935 gentop="$output_objdir/${outputname}x"
7936 generated="$generated $gentop"
7937 func_mkdir_p "$gentop"
7938 save_oldobjs=$oldobjs
7939 oldobjs=
7940 counter=1
7941 for obj in $save_oldobjs
7942 do
7943 func_basename "$obj"
7944 objbase="$func_basename_result"
7945 case " $oldobjs " in
7946 " ") oldobjs=$obj ;;
7947 *[\ /]"$objbase "*)
7948 while :; do
7949 # Make sure we don't pick an alternate name that also
7950 # overlaps.
7951 newobj=lt$counter-$objbase
7952 func_arith $counter + 1
7953 counter=$func_arith_result
7954 case " $oldobjs " in
7955 *[\ /]"$newobj "*) ;;
7956 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
7957 esac
7958 done
7959 func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
7960 oldobjs="$oldobjs $gentop/$newobj"
7961 ;;
7962 *) oldobjs="$oldobjs $obj" ;;
7963 esac
7964 done
7965 fi
7966 eval cmds=\"$old_archive_cmds\"
7967
7968 func_len " $cmds"
7969 len=$func_len_result
7970 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7971 cmds=$old_archive_cmds
7972 else
7973 # the command line is too long to link in one step, link in parts
7974 func_verbose "using piecewise archive linking..."
7975 save_RANLIB=$RANLIB
7976 RANLIB=:
7977 objlist=
7978 concat_cmds=
7979 save_oldobjs=$oldobjs
7980 oldobjs=
7981 # Is there a better way of finding the last object in the list?
7982 for obj in $save_oldobjs
7983 do
7984 last_oldobj=$obj
7985 done
7986 eval test_cmds=\"$old_archive_cmds\"
7987 func_len " $test_cmds"
7988 len0=$func_len_result
7989 len=$len0
7990 for obj in $save_oldobjs
7991 do
7992 func_len " $obj"
7993 func_arith $len + $func_len_result
7994 len=$func_arith_result
7995 func_append objlist " $obj"
7996 if test "$len" -lt "$max_cmd_len"; then
7997 :
7998 else
7999 # the above command should be used before it gets too long
8000 oldobjs=$objlist
8001 if test "$obj" = "$last_oldobj" ; then
8002 RANLIB=$save_RANLIB
8003 fi
8004 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
8005 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
8006 objlist=
8007 len=$len0
8008 fi
8009 done
8010 RANLIB=$save_RANLIB
8011 oldobjs=$objlist
8012 if test "X$oldobjs" = "X" ; then
8013 eval cmds=\"\$concat_cmds\"
8014 else
8015 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
8016 fi
8017 fi
8018 fi
8019 func_execute_cmds "$cmds" 'exit $?'
8020 done
8021
8022 test -n "$generated" && \
8023 func_show_eval "${RM}r$generated"
8024
8025 # Now create the libtool archive.
8026 case $output in
8027 *.la)
8028 old_library=
8029 test "$build_old_libs" = yes && old_library="$libname.$libext"
8030 func_verbose "creating $output"
8031
8032 # Preserve any variables that may affect compiler behavior
8033 for var in $variables_saved_for_relink; do
8034 if eval test -z \"\${$var+set}\"; then
8035 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
8036 elif eval var_value=\$$var; test -z "$var_value"; then
8037 relink_command="$var=; export $var; $relink_command"
8038 else
8039 func_quote_for_eval "$var_value"
8040 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
8041 fi
8042 done
8043 # Quote the link command for shipping.
8044 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
8045 relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
8046 if test "$hardcode_automatic" = yes ; then
8047 relink_command=
8048 fi
8049
8050 # Only create the output if not a dry run.
8051 $opt_dry_run || {
8052 for installed in no yes; do
8053 if test "$installed" = yes; then
8054 if test -z "$install_libdir"; then
8055 break
8056 fi
8057 output="$output_objdir/$outputname"i
8058 # Replace all uninstalled libtool libraries with the installed ones
8059 newdependency_libs=
8060 for deplib in $dependency_libs; do
8061 case $deplib in
8062 *.la)
8063 func_basename "$deplib"
8064 name="$func_basename_result"
8065 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
8066 test -z "$libdir" && \
8067 func_fatal_error "\`$deplib' is not a valid libtool archive"
8068 newdependency_libs="$newdependency_libs $libdir/$name"
8069 ;;
8070 *) newdependency_libs="$newdependency_libs $deplib" ;;
8071 esac
8072 done
8073 dependency_libs="$newdependency_libs"
8074 newdlfiles=
8075
8076 for lib in $dlfiles; do
8077 case $lib in
8078 *.la)
8079 func_basename "$lib"
8080 name="$func_basename_result"
8081 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
8082 test -z "$libdir" && \
8083 func_fatal_error "\`$lib' is not a valid libtool archive"
8084 newdlfiles="$newdlfiles $libdir/$name"
8085 ;;
8086 *) newdlfiles="$newdlfiles $lib" ;;
8087 esac
8088 done
8089 dlfiles="$newdlfiles"
8090 newdlprefiles=
8091 for lib in $dlprefiles; do
8092 case $lib in
8093 *.la)
8094 # Only pass preopened files to the pseudo-archive (for
8095 # eventual linking with the app. that links it) if we
8096 # didn't already link the preopened objects directly into
8097 # the library:
8098 func_basename "$lib"
8099 name="$func_basename_result"
8100 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
8101 test -z "$libdir" && \
8102 func_fatal_error "\`$lib' is not a valid libtool archive"
8103 newdlprefiles="$newdlprefiles $libdir/$name"
8104 ;;
8105 esac
8106 done
8107 dlprefiles="$newdlprefiles"
8108 else
8109 newdlfiles=
8110 for lib in $dlfiles; do
8111 case $lib in
8112 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
8113 *) abs=`pwd`"/$lib" ;;
8114 esac
8115 newdlfiles="$newdlfiles $abs"
8116 done
8117 dlfiles="$newdlfiles"
8118 newdlprefiles=
8119 for lib in $dlprefiles; do
8120 case $lib in
8121 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
8122 *) abs=`pwd`"/$lib" ;;
8123 esac
8124 newdlprefiles="$newdlprefiles $abs"
8125 done
8126 dlprefiles="$newdlprefiles"
8127 fi
8128 $RM $output
8129 # place dlname in correct position for cygwin
8130 tdlname=$dlname
8131 case $host,$output,$installed,$module,$dlname in
8132 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
8133 esac
8134 $ECHO > $output "\
8135 # $outputname - a libtool library file
8136 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
8137 #
8138 # Please DO NOT delete this file!
8139 # It is necessary for linking the library.
8140
8141 # The name that we can dlopen(3).
8142 dlname='$tdlname'
8143
8144 # Names of this library.
8145 library_names='$library_names'
8146
8147 # The name of the static archive.
8148 old_library='$old_library'
8149
8150 # Linker flags that can not go in dependency_libs.
8151 inherited_linker_flags='$new_inherited_linker_flags'
8152
8153 # Libraries that this one depends upon.
8154 dependency_libs='$dependency_libs'
8155
8156 # Names of additional weak libraries provided by this library
8157 weak_library_names='$weak_libs'
8158
8159 # Version information for $libname.
8160 current=$current
8161 age=$age
8162 revision=$revision
8163
8164 # Is this an already installed library?
8165 installed=$installed
8166
8167 # Should we warn about portability when linking against -modules?
8168 shouldnotlink=$module
8169
8170 # Files to dlopen/dlpreopen
8171 dlopen='$dlfiles'
8172 dlpreopen='$dlprefiles'
8173
8174 # Directory that this library needs to be installed in:
8175 libdir='$install_libdir'"
8176 if test "$installed" = no && test "$need_relink" = yes; then
8177 $ECHO >> $output "\
8178 relink_command=\"$relink_command\""
8179 fi
8180 done
8181 }
8182
8183 # Do a symbolic link so that the libtool archive can be found in
8184 # LD_LIBRARY_PATH before the program is installed.
8185 func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
8186 ;;
8187 esac
8188 exit $EXIT_SUCCESS
8189 }
8190
8191 { test "$mode" = link || test "$mode" = relink; } &&
8192 func_mode_link ${1+"$@"}
8193
8194
8195 # func_mode_uninstall arg...
8196 func_mode_uninstall ()
8197 {
8198 $opt_debug
8199 RM="$nonopt"
8200 files=
8201 rmforce=
8202 exit_status=0
8203
8204 # This variable tells wrapper scripts just to set variables rather
8205 # than running their programs.
8206 libtool_install_magic="$magic"
8207
8208 for arg
8209 do
8210 case $arg in
8211 -f) RM="$RM $arg"; rmforce=yes ;;
8212 -*) RM="$RM $arg" ;;
8213 *) files="$files $arg" ;;
8214 esac
8215 done
8216
8217 test -z "$RM" && \
8218 func_fatal_help "you must specify an RM program"
8219
8220 rmdirs=
8221
8222 origobjdir="$objdir"
8223 for file in $files; do
8224 func_dirname "$file" "" "."
8225 dir="$func_dirname_result"
8226 if test "X$dir" = X.; then
8227 objdir="$origobjdir"
8228 else
8229 objdir="$dir/$origobjdir"
8230 fi
8231 func_basename "$file"
8232 name="$func_basename_result"
8233 test "$mode" = uninstall && objdir="$dir"
8234
8235 # Remember objdir for removal later, being careful to avoid duplicates
8236 if test "$mode" = clean; then
8237 case " $rmdirs " in
8238 *" $objdir "*) ;;
8239 *) rmdirs="$rmdirs $objdir" ;;
8240 esac
8241 fi
8242
8243 # Don't error if the file doesn't exist and rm -f was used.
8244 if { test -L "$file"; } >/dev/null 2>&1 ||
8245 { test -h "$file"; } >/dev/null 2>&1 ||
8246 test -f "$file"; then
8247 :
8248 elif test -d "$file"; then
8249 exit_status=1
8250 continue
8251 elif test "$rmforce" = yes; then
8252 continue
8253 fi
8254
8255 rmfiles="$file"
8256
8257 case $name in
8258 *.la)
8259 # Possibly a libtool archive, so verify it.
8260 if func_lalib_p "$file"; then
8261 func_source $dir/$name
8262
8263 # Delete the libtool libraries and symlinks.
8264 for n in $library_names; do
8265 rmfiles="$rmfiles $objdir/$n"
8266 done
8267 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
8268
8269 case "$mode" in
8270 clean)
8271 case " $library_names " in
8272 # " " in the beginning catches empty $dlname
8273 *" $dlname "*) ;;
8274 *) rmfiles="$rmfiles $objdir/$dlname" ;;
8275 esac
8276 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
8277 ;;
8278 uninstall)
8279 if test -n "$library_names"; then
8280 # Do each command in the postuninstall commands.
8281 func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
8282 fi
8283
8284 if test -n "$old_library"; then
8285 # Do each command in the old_postuninstall commands.
8286 func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
8287 fi
8288 # FIXME: should reinstall the best remaining shared library.
8289 ;;
8290 esac
8291 fi
8292 ;;
8293
8294 *.lo)
8295 # Possibly a libtool object, so verify it.
8296 if func_lalib_p "$file"; then
8297
8298 # Read the .lo file
8299 func_source $dir/$name
8300
8301 # Add PIC object to the list of files to remove.
8302 if test -n "$pic_object" &&
8303 test "$pic_object" != none; then
8304 rmfiles="$rmfiles $dir/$pic_object"
8305 fi
8306
8307 # Add non-PIC object to the list of files to remove.
8308 if test -n "$non_pic_object" &&
8309 test "$non_pic_object" != none; then
8310 rmfiles="$rmfiles $dir/$non_pic_object"
8311 fi
8312 fi
8313 ;;
8314
8315 *)
8316 if test "$mode" = clean ; then
8317 noexename=$name
8318 case $file in
8319 *.exe)
8320 func_stripname '' '.exe' "$file"
8321 file=$func_stripname_result
8322 func_stripname '' '.exe' "$name"
8323 noexename=$func_stripname_result
8324 # $file with .exe has already been added to rmfiles,
8325 # add $file without .exe
8326 rmfiles="$rmfiles $file"
8327 ;;
8328 esac
8329 # Do a test to see if this is a libtool program.
8330 if func_ltwrapper_p "$file"; then
8331 if func_ltwrapper_executable_p "$file"; then
8332 func_ltwrapper_scriptname "$file"
8333 relink_command=
8334 func_source $func_ltwrapper_scriptname_result
8335 rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
8336 else
8337 relink_command=
8338 func_source $dir/$noexename
8339 fi
8340
8341 # note $name still contains .exe if it was in $file originally
8342 # as does the version of $file that was added into $rmfiles
8343 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
8344 if test "$fast_install" = yes && test -n "$relink_command"; then
8345 rmfiles="$rmfiles $objdir/lt-$name"
8346 fi
8347 if test "X$noexename" != "X$name" ; then
8348 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
8349 fi
8350 fi
8351 fi
8352 ;;
8353 esac
8354 func_show_eval "$RM $rmfiles" 'exit_status=1'
8355 done
8356 objdir="$origobjdir"
8357
8358 # Try to remove the ${objdir}s in the directories where we deleted files
8359 for dir in $rmdirs; do
8360 if test -d "$dir"; then
8361 func_show_eval "rmdir $dir >/dev/null 2>&1"
8362 fi
8363 done
8364
8365 exit $exit_status
8366 }
8367
8368 { test "$mode" = uninstall || test "$mode" = clean; } &&
8369 func_mode_uninstall ${1+"$@"}
8370
8371 test -z "$mode" && {
8372 help="$generic_help"
8373 func_fatal_help "you must specify a MODE"
8374 }
8375
8376 test -z "$exec_cmd" && \
8377 func_fatal_help "invalid operation mode \`$mode'"
8378
8379 if test -n "$exec_cmd"; then
8380 eval exec "$exec_cmd"
8381 exit $EXIT_FAILURE
8382 fi
8383
8384 exit $exit_status
8385
8386
8387 # The TAGs below are defined such that we never get into a situation
8388 # in which we disable both kinds of libraries. Given conflicting
8389 # choices, we go for a static library, that is the most portable,
8390 # since we can't tell whether shared libraries were disabled because
8391 # the user asked for that or because the platform doesn't support
8392 # them. This is particularly important on AIX, because we don't
8393 # support having both static and shared libraries enabled at the same
8394 # time on that platform, so we default to a shared-only configuration.
8395 # If a disable-shared tag is given, we'll fallback to a static-only
8396 # configuration. But we'll never go from static-only to shared-only.
8397
8398 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
8399 build_libtool_libs=no
8400 build_old_libs=yes
8401 # ### END LIBTOOL TAG CONFIG: disable-shared
8402
8403 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
8404 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
8405 # ### END LIBTOOL TAG CONFIG: disable-static
8406
8407 # Local Variables:
8408 # mode:shell-script
8409 # sh-indentation:2
8410 # End:
8411 # vi:sw=2
8412
0 #! /bin/sh
1 # Common stub for a few missing GNU programs while installing.
2
3 scriptversion=2009-04-28.21; # UTC
4
5 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
6 # 2008, 2009 Free Software Foundation, Inc.
7 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
12 # any later version.
13
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21
22 # As a special exception to the GNU General Public License, if you
23 # distribute this file as part of a program that contains a
24 # configuration script generated by Autoconf, you may include it under
25 # the same distribution terms that you use for the rest of that program.
26
27 if test $# -eq 0; then
28 echo 1>&2 "Try \`$0 --help' for more information"
29 exit 1
30 fi
31
32 run=:
33 sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
34 sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
35
36 # In the cases where this matters, `missing' is being run in the
37 # srcdir already.
38 if test -f configure.ac; then
39 configure_ac=configure.ac
40 else
41 configure_ac=configure.in
42 fi
43
44 msg="missing on your system"
45
46 case $1 in
47 --run)
48 # Try to run requested program, and just exit if it succeeds.
49 run=
50 shift
51 "$@" && exit 0
52 # Exit code 63 means version mismatch. This often happens
53 # when the user try to use an ancient version of a tool on
54 # a file that requires a minimum version. In this case we
55 # we should proceed has if the program had been absent, or
56 # if --run hadn't been passed.
57 if test $? = 63; then
58 run=:
59 msg="probably too old"
60 fi
61 ;;
62
63 -h|--h|--he|--hel|--help)
64 echo "\
65 $0 [OPTION]... PROGRAM [ARGUMENT]...
66
67 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
68 error status if there is no known handling for PROGRAM.
69
70 Options:
71 -h, --help display this help and exit
72 -v, --version output version information and exit
73 --run try to run the given command, and emulate it if it fails
74
75 Supported PROGRAM values:
76 aclocal touch file \`aclocal.m4'
77 autoconf touch file \`configure'
78 autoheader touch file \`config.h.in'
79 autom4te touch the output file, or create a stub one
80 automake touch all \`Makefile.in' files
81 bison create \`y.tab.[ch]', if possible, from existing .[ch]
82 flex create \`lex.yy.c', if possible, from existing .c
83 help2man touch the output file
84 lex create \`lex.yy.c', if possible, from existing .c
85 makeinfo touch the output file
86 tar try tar, gnutar, gtar, then tar without non-portable flags
87 yacc create \`y.tab.[ch]', if possible, from existing .[ch]
88
89 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
90 \`g' are ignored when checking the name.
91
92 Send bug reports to <bug-automake@gnu.org>."
93 exit $?
94 ;;
95
96 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
97 echo "missing $scriptversion (GNU Automake)"
98 exit $?
99 ;;
100
101 -*)
102 echo 1>&2 "$0: Unknown \`$1' option"
103 echo 1>&2 "Try \`$0 --help' for more information"
104 exit 1
105 ;;
106
107 esac
108
109 # normalize program name to check for.
110 program=`echo "$1" | sed '
111 s/^gnu-//; t
112 s/^gnu//; t
113 s/^g//; t'`
114
115 # Now exit if we have it, but it failed. Also exit now if we
116 # don't have it and --version was passed (most likely to detect
117 # the program). This is about non-GNU programs, so use $1 not
118 # $program.
119 case $1 in
120 lex*|yacc*)
121 # Not GNU programs, they don't have --version.
122 ;;
123
124 tar*)
125 if test -n "$run"; then
126 echo 1>&2 "ERROR: \`tar' requires --run"
127 exit 1
128 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
129 exit 1
130 fi
131 ;;
132
133 *)
134 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
135 # We have it, but it failed.
136 exit 1
137 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
138 # Could not run --version or --help. This is probably someone
139 # running `$TOOL --version' or `$TOOL --help' to check whether
140 # $TOOL exists and not knowing $TOOL uses missing.
141 exit 1
142 fi
143 ;;
144 esac
145
146 # If it does not exist, or fails to run (possibly an outdated version),
147 # try to emulate it.
148 case $program in
149 aclocal*)
150 echo 1>&2 "\
151 WARNING: \`$1' is $msg. You should only need it if
152 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
153 to install the \`Automake' and \`Perl' packages. Grab them from
154 any GNU archive site."
155 touch aclocal.m4
156 ;;
157
158 autoconf*)
159 echo 1>&2 "\
160 WARNING: \`$1' is $msg. You should only need it if
161 you modified \`${configure_ac}'. You might want to install the
162 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
163 archive site."
164 touch configure
165 ;;
166
167 autoheader*)
168 echo 1>&2 "\
169 WARNING: \`$1' is $msg. You should only need it if
170 you modified \`acconfig.h' or \`${configure_ac}'. You might want
171 to install the \`Autoconf' and \`GNU m4' packages. Grab them
172 from any GNU archive site."
173 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
174 test -z "$files" && files="config.h"
175 touch_files=
176 for f in $files; do
177 case $f in
178 *:*) touch_files="$touch_files "`echo "$f" |
179 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
180 *) touch_files="$touch_files $f.in";;
181 esac
182 done
183 touch $touch_files
184 ;;
185
186 automake*)
187 echo 1>&2 "\
188 WARNING: \`$1' is $msg. You should only need it if
189 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
190 You might want to install the \`Automake' and \`Perl' packages.
191 Grab them from any GNU archive site."
192 find . -type f -name Makefile.am -print |
193 sed 's/\.am$/.in/' |
194 while read f; do touch "$f"; done
195 ;;
196
197 autom4te*)
198 echo 1>&2 "\
199 WARNING: \`$1' is needed, but is $msg.
200 You might have modified some files without having the
201 proper tools for further handling them.
202 You can get \`$1' as part of \`Autoconf' from any GNU
203 archive site."
204
205 file=`echo "$*" | sed -n "$sed_output"`
206 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
207 if test -f "$file"; then
208 touch $file
209 else
210 test -z "$file" || exec >$file
211 echo "#! /bin/sh"
212 echo "# Created by GNU Automake missing as a replacement of"
213 echo "# $ $@"
214 echo "exit 0"
215 chmod +x $file
216 exit 1
217 fi
218 ;;
219
220 bison*|yacc*)
221 echo 1>&2 "\
222 WARNING: \`$1' $msg. You should only need it if
223 you modified a \`.y' file. You may need the \`Bison' package
224 in order for those modifications to take effect. You can get
225 \`Bison' from any GNU archive site."
226 rm -f y.tab.c y.tab.h
227 if test $# -ne 1; then
228 eval LASTARG="\${$#}"
229 case $LASTARG in
230 *.y)
231 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
232 if test -f "$SRCFILE"; then
233 cp "$SRCFILE" y.tab.c
234 fi
235 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
236 if test -f "$SRCFILE"; then
237 cp "$SRCFILE" y.tab.h
238 fi
239 ;;
240 esac
241 fi
242 if test ! -f y.tab.h; then
243 echo >y.tab.h
244 fi
245 if test ! -f y.tab.c; then
246 echo 'main() { return 0; }' >y.tab.c
247 fi
248 ;;
249
250 lex*|flex*)
251 echo 1>&2 "\
252 WARNING: \`$1' is $msg. You should only need it if
253 you modified a \`.l' file. You may need the \`Flex' package
254 in order for those modifications to take effect. You can get
255 \`Flex' from any GNU archive site."
256 rm -f lex.yy.c
257 if test $# -ne 1; then
258 eval LASTARG="\${$#}"
259 case $LASTARG in
260 *.l)
261 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
262 if test -f "$SRCFILE"; then
263 cp "$SRCFILE" lex.yy.c
264 fi
265 ;;
266 esac
267 fi
268 if test ! -f lex.yy.c; then
269 echo 'main() { return 0; }' >lex.yy.c
270 fi
271 ;;
272
273 help2man*)
274 echo 1>&2 "\
275 WARNING: \`$1' is $msg. You should only need it if
276 you modified a dependency of a manual page. You may need the
277 \`Help2man' package in order for those modifications to take
278 effect. You can get \`Help2man' from any GNU archive site."
279
280 file=`echo "$*" | sed -n "$sed_output"`
281 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
282 if test -f "$file"; then
283 touch $file
284 else
285 test -z "$file" || exec >$file
286 echo ".ab help2man is required to generate this page"
287 exit $?
288 fi
289 ;;
290
291 makeinfo*)
292 echo 1>&2 "\
293 WARNING: \`$1' is $msg. You should only need it if
294 you modified a \`.texi' or \`.texinfo' file, or any other file
295 indirectly affecting the aspect of the manual. The spurious
296 call might also be the consequence of using a buggy \`make' (AIX,
297 DU, IRIX). You might want to install the \`Texinfo' package or
298 the \`GNU make' package. Grab either from any GNU archive site."
299 # The file to touch is that specified with -o ...
300 file=`echo "$*" | sed -n "$sed_output"`
301 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
302 if test -z "$file"; then
303 # ... or it is the one specified with @setfilename ...
304 infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
305 file=`sed -n '
306 /^@setfilename/{
307 s/.* \([^ ]*\) *$/\1/
308 p
309 q
310 }' $infile`
311 # ... or it is derived from the source name (dir/f.texi becomes f.info)
312 test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
313 fi
314 # If the file does not exist, the user really needs makeinfo;
315 # let's fail without touching anything.
316 test -f $file || exit 1
317 touch $file
318 ;;
319
320 tar*)
321 shift
322
323 # We have already tried tar in the generic part.
324 # Look for gnutar/gtar before invocation to avoid ugly error
325 # messages.
326 if (gnutar --version > /dev/null 2>&1); then
327 gnutar "$@" && exit 0
328 fi
329 if (gtar --version > /dev/null 2>&1); then
330 gtar "$@" && exit 0
331 fi
332 firstarg="$1"
333 if shift; then
334 case $firstarg in
335 *o*)
336 firstarg=`echo "$firstarg" | sed s/o//`
337 tar "$firstarg" "$@" && exit 0
338 ;;
339 esac
340 case $firstarg in
341 *h*)
342 firstarg=`echo "$firstarg" | sed s/h//`
343 tar "$firstarg" "$@" && exit 0
344 ;;
345 esac
346 fi
347
348 echo 1>&2 "\
349 WARNING: I can't seem to be able to run \`tar' with the given arguments.
350 You may want to install GNU tar or Free paxutils, or check the
351 command line arguments."
352 exit 1
353 ;;
354
355 *)
356 echo 1>&2 "\
357 WARNING: \`$1' is needed, and is $msg.
358 You might have modified some files without having the
359 proper tools for further handling them. Check the \`README' file,
360 it often tells you about the needed prerequisites for installing
361 this package. You may also peek at any GNU archive site, in case
362 some other package would contain this missing \`$1' program."
363 exit 1
364 ;;
365 esac
366
367 exit 0
368
369 # Local variables:
370 # eval: (add-hook 'write-file-hooks 'time-stamp)
371 # time-stamp-start: "scriptversion="
372 # time-stamp-format: "%:y-%02m-%02d.%02H"
373 # time-stamp-time-zone: "UTC"
374 # time-stamp-end: "; # UTC"
375 # End:
0 AM_CPPFLAGS = \
1 -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
2 -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
3 -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
4 $(SSH_CONTACT_CFLAGS)
5
6 AM_CFLAGS = -Wall -g -Werror
7
8 LDADD = $(SSH_CONTACT_LIBS)
9
10 bin_PROGRAMS = ssh-contact ssh-contact-service
11
12 ssh_contact_SOURCES = \
13 common.c common.h \
14 client.c
15
16 ssh_contact_service_SOURCES = \
17 common.c common.h \
18 service.c
19
20 servicefiledir = $(datadir)/dbus-1/services
21 servicefile_in_files = \
22 org.freedesktop.Telepathy.Client.SSHContact.service.in
23
24 servicefile_DATA = $(servicefile_in_files:.service.in=.service)
25
26 org.freedesktop.Telepathy.Client.SSHContact.service: org.freedesktop.Telepathy.Client.SSHContact.service.in
27 $(AM_V_GEN)sed -e "s|[@]bindir[@]|$(bindir)|" $< > $@
28
29 clientfiledir = $(datarootdir)/telepathy/clients
30 clientfile_DATA = \
31 SSHContact.client
32
33 EXTRA_DIST = \
34 $(clientfile_DATA) \
35 $(servicefile_in_files) \
36 $(NULL)
37
38 DISTCLEANFILES = \
39 $(servicefile_DATA) \
40 $(NULL)
41
0 # Makefile.in generated by automake 1.11.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17
18 VPATH = @srcdir@
19 pkgdatadir = $(datadir)/@PACKAGE@
20 pkgincludedir = $(includedir)/@PACKAGE@
21 pkglibdir = $(libdir)/@PACKAGE@
22 pkglibexecdir = $(libexecdir)/@PACKAGE@
23 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24 install_sh_DATA = $(install_sh) -c -m 644
25 install_sh_PROGRAM = $(install_sh) -c
26 install_sh_SCRIPT = $(install_sh) -c
27 INSTALL_HEADER = $(INSTALL_DATA)
28 transform = $(program_transform_name)
29 NORMAL_INSTALL = :
30 PRE_INSTALL = :
31 POST_INSTALL = :
32 NORMAL_UNINSTALL = :
33 PRE_UNINSTALL = :
34 POST_UNINSTALL = :
35 build_triplet = @build@
36 host_triplet = @host@
37 bin_PROGRAMS = ssh-contact$(EXEEXT) ssh-contact-service$(EXEEXT)
38 subdir = src
39 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
40 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
42 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
43 $(ACLOCAL_M4)
44 mkinstalldirs = $(install_sh) -d
45 CONFIG_HEADER = $(top_builddir)/config.h
46 CONFIG_CLEAN_FILES =
47 CONFIG_CLEAN_VPATH_FILES =
48 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(clientfiledir)" \
49 "$(DESTDIR)$(servicefiledir)"
50 PROGRAMS = $(bin_PROGRAMS)
51 am_ssh_contact_OBJECTS = common.$(OBJEXT) client.$(OBJEXT)
52 ssh_contact_OBJECTS = $(am_ssh_contact_OBJECTS)
53 ssh_contact_LDADD = $(LDADD)
54 am__DEPENDENCIES_1 =
55 ssh_contact_DEPENDENCIES = $(am__DEPENDENCIES_1)
56 AM_V_lt = $(am__v_lt_$(V))
57 am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
58 am__v_lt_0 = --silent
59 am_ssh_contact_service_OBJECTS = common.$(OBJEXT) service.$(OBJEXT)
60 ssh_contact_service_OBJECTS = $(am_ssh_contact_service_OBJECTS)
61 ssh_contact_service_LDADD = $(LDADD)
62 ssh_contact_service_DEPENDENCIES = $(am__DEPENDENCIES_1)
63 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
64 depcomp = $(SHELL) $(top_srcdir)/depcomp
65 am__depfiles_maybe = depfiles
66 am__mv = mv -f
67 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
68 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
69 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
70 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
71 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
72 $(AM_CFLAGS) $(CFLAGS)
73 AM_V_CC = $(am__v_CC_$(V))
74 am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
75 am__v_CC_0 = @echo " CC " $@;
76 AM_V_at = $(am__v_at_$(V))
77 am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
78 am__v_at_0 = @
79 CCLD = $(CC)
80 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
81 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
82 $(AM_LDFLAGS) $(LDFLAGS) -o $@
83 AM_V_CCLD = $(am__v_CCLD_$(V))
84 am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
85 am__v_CCLD_0 = @echo " CCLD " $@;
86 AM_V_GEN = $(am__v_GEN_$(V))
87 am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
88 am__v_GEN_0 = @echo " GEN " $@;
89 SOURCES = $(ssh_contact_SOURCES) $(ssh_contact_service_SOURCES)
90 DIST_SOURCES = $(ssh_contact_SOURCES) $(ssh_contact_service_SOURCES)
91 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
92 am__vpath_adj = case $$p in \
93 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
94 *) f=$$p;; \
95 esac;
96 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
97 am__install_max = 40
98 am__nobase_strip_setup = \
99 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
100 am__nobase_strip = \
101 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
102 am__nobase_list = $(am__nobase_strip_setup); \
103 for p in $$list; do echo "$$p $$p"; done | \
104 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
105 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
106 if (++n[$$2] == $(am__install_max)) \
107 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
108 END { for (dir in files) print dir, files[dir] }'
109 am__base_list = \
110 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
111 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
112 DATA = $(clientfile_DATA) $(servicefile_DATA)
113 ETAGS = etags
114 CTAGS = ctags
115 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
116 ACLOCAL = @ACLOCAL@
117 AMTAR = @AMTAR@
118 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
119 AR = @AR@
120 AUTOCONF = @AUTOCONF@
121 AUTOHEADER = @AUTOHEADER@
122 AUTOMAKE = @AUTOMAKE@
123 AWK = @AWK@
124 CC = @CC@
125 CCDEPMODE = @CCDEPMODE@
126 CFLAGS = @CFLAGS@
127 CPP = @CPP@
128 CPPFLAGS = @CPPFLAGS@
129 CYGPATH_W = @CYGPATH_W@
130 DEFS = @DEFS@
131 DEPDIR = @DEPDIR@
132 DSYMUTIL = @DSYMUTIL@
133 DUMPBIN = @DUMPBIN@
134 ECHO_C = @ECHO_C@
135 ECHO_N = @ECHO_N@
136 ECHO_T = @ECHO_T@
137 EGREP = @EGREP@
138 EXEEXT = @EXEEXT@
139 FGREP = @FGREP@
140 GREP = @GREP@
141 INSTALL = @INSTALL@
142 INSTALL_DATA = @INSTALL_DATA@
143 INSTALL_PROGRAM = @INSTALL_PROGRAM@
144 INSTALL_SCRIPT = @INSTALL_SCRIPT@
145 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
146 LD = @LD@
147 LDFLAGS = @LDFLAGS@
148 LIBOBJS = @LIBOBJS@
149 LIBS = @LIBS@
150 LIBTOOL = @LIBTOOL@
151 LIPO = @LIPO@
152 LN_S = @LN_S@
153 LTLIBOBJS = @LTLIBOBJS@
154 MAINT = @MAINT@
155 MAKEINFO = @MAKEINFO@
156 MKDIR_P = @MKDIR_P@
157 NM = @NM@
158 NMEDIT = @NMEDIT@
159 OBJDUMP = @OBJDUMP@
160 OBJEXT = @OBJEXT@
161 OTOOL = @OTOOL@
162 OTOOL64 = @OTOOL64@
163 PACKAGE = @PACKAGE@
164 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
165 PACKAGE_NAME = @PACKAGE_NAME@
166 PACKAGE_STRING = @PACKAGE_STRING@
167 PACKAGE_TARNAME = @PACKAGE_TARNAME@
168 PACKAGE_URL = @PACKAGE_URL@
169 PACKAGE_VERSION = @PACKAGE_VERSION@
170 PATH_SEPARATOR = @PATH_SEPARATOR@
171 PKG_CONFIG = @PKG_CONFIG@
172 RANLIB = @RANLIB@
173 SED = @SED@
174 SET_MAKE = @SET_MAKE@
175 SHELL = @SHELL@
176 SSH_CONTACT_CFLAGS = @SSH_CONTACT_CFLAGS@
177 SSH_CONTACT_LIBS = @SSH_CONTACT_LIBS@
178 STRIP = @STRIP@
179 VERSION = @VERSION@
180 abs_builddir = @abs_builddir@
181 abs_srcdir = @abs_srcdir@
182 abs_top_builddir = @abs_top_builddir@
183 abs_top_srcdir = @abs_top_srcdir@
184 ac_ct_CC = @ac_ct_CC@
185 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
186 am__include = @am__include@
187 am__leading_dot = @am__leading_dot@
188 am__quote = @am__quote@
189 am__tar = @am__tar@
190 am__untar = @am__untar@
191 bindir = @bindir@
192 build = @build@
193 build_alias = @build_alias@
194 build_cpu = @build_cpu@
195 build_os = @build_os@
196 build_vendor = @build_vendor@
197 builddir = @builddir@
198 datadir = @datadir@
199 datarootdir = @datarootdir@
200 docdir = @docdir@
201 dvidir = @dvidir@
202 exec_prefix = @exec_prefix@
203 host = @host@
204 host_alias = @host_alias@
205 host_cpu = @host_cpu@
206 host_os = @host_os@
207 host_vendor = @host_vendor@
208 htmldir = @htmldir@
209 includedir = @includedir@
210 infodir = @infodir@
211 install_sh = @install_sh@
212 libdir = @libdir@
213 libexecdir = @libexecdir@
214 localedir = @localedir@
215 localstatedir = @localstatedir@
216 lt_ECHO = @lt_ECHO@
217 mandir = @mandir@
218 mkdir_p = @mkdir_p@
219 oldincludedir = @oldincludedir@
220 pdfdir = @pdfdir@
221 prefix = @prefix@
222 program_transform_name = @program_transform_name@
223 psdir = @psdir@
224 sbindir = @sbindir@
225 sharedstatedir = @sharedstatedir@
226 srcdir = @srcdir@
227 sysconfdir = @sysconfdir@
228 target_alias = @target_alias@
229 top_build_prefix = @top_build_prefix@
230 top_builddir = @top_builddir@
231 top_srcdir = @top_srcdir@
232 AM_CPPFLAGS = \
233 -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
234 -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
235 -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
236 $(SSH_CONTACT_CFLAGS)
237
238 AM_CFLAGS = -Wall -g -Werror
239 LDADD = $(SSH_CONTACT_LIBS)
240 ssh_contact_SOURCES = \
241 common.c common.h \
242 client.c
243
244 ssh_contact_service_SOURCES = \
245 common.c common.h \
246 service.c
247
248 servicefiledir = $(datadir)/dbus-1/services
249 servicefile_in_files = \
250 org.freedesktop.Telepathy.Client.SSHContact.service.in
251
252 servicefile_DATA = $(servicefile_in_files:.service.in=.service)
253 clientfiledir = $(datarootdir)/telepathy/clients
254 clientfile_DATA = \
255 SSHContact.client
256
257 EXTRA_DIST = \
258 $(clientfile_DATA) \
259 $(servicefile_in_files) \
260 $(NULL)
261
262 DISTCLEANFILES = \
263 $(servicefile_DATA) \
264 $(NULL)
265
266 all: all-am
267
268 .SUFFIXES:
269 .SUFFIXES: .c .lo .o .obj
270 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
271 @for dep in $?; do \
272 case '$(am__configure_deps)' in \
273 *$$dep*) \
274 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
275 && { if test -f $@; then exit 0; else break; fi; }; \
276 exit 1;; \
277 esac; \
278 done; \
279 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
280 $(am__cd) $(top_srcdir) && \
281 $(AUTOMAKE) --foreign src/Makefile
282 .PRECIOUS: Makefile
283 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
284 @case '$?' in \
285 *config.status*) \
286 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
287 *) \
288 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
289 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
290 esac;
291
292 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
293 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
294
295 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
296 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
297 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
298 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
299 $(am__aclocal_m4_deps):
300 install-binPROGRAMS: $(bin_PROGRAMS)
301 @$(NORMAL_INSTALL)
302 test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
303 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
304 for p in $$list; do echo "$$p $$p"; done | \
305 sed 's/$(EXEEXT)$$//' | \
306 while read p p1; do if test -f $$p || test -f $$p1; \
307 then echo "$$p"; echo "$$p"; else :; fi; \
308 done | \
309 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
310 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
311 sed 'N;N;N;s,\n, ,g' | \
312 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
313 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
314 if ($$2 == $$4) files[d] = files[d] " " $$1; \
315 else { print "f", $$3 "/" $$4, $$1; } } \
316 END { for (d in files) print "f", d, files[d] }' | \
317 while read type dir files; do \
318 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
319 test -z "$$files" || { \
320 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
321 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
322 } \
323 ; done
324
325 uninstall-binPROGRAMS:
326 @$(NORMAL_UNINSTALL)
327 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
328 files=`for p in $$list; do echo "$$p"; done | \
329 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
330 -e 's/$$/$(EXEEXT)/' `; \
331 test -n "$$list" || exit 0; \
332 echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
333 cd "$(DESTDIR)$(bindir)" && rm -f $$files
334
335 clean-binPROGRAMS:
336 @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
337 echo " rm -f" $$list; \
338 rm -f $$list || exit $$?; \
339 test -n "$(EXEEXT)" || exit 0; \
340 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
341 echo " rm -f" $$list; \
342 rm -f $$list
343 ssh-contact$(EXEEXT): $(ssh_contact_OBJECTS) $(ssh_contact_DEPENDENCIES)
344 @rm -f ssh-contact$(EXEEXT)
345 $(AM_V_CCLD)$(LINK) $(ssh_contact_OBJECTS) $(ssh_contact_LDADD) $(LIBS)
346 ssh-contact-service$(EXEEXT): $(ssh_contact_service_OBJECTS) $(ssh_contact_service_DEPENDENCIES)
347 @rm -f ssh-contact-service$(EXEEXT)
348 $(AM_V_CCLD)$(LINK) $(ssh_contact_service_OBJECTS) $(ssh_contact_service_LDADD) $(LIBS)
349
350 mostlyclean-compile:
351 -rm -f *.$(OBJEXT)
352
353 distclean-compile:
354 -rm -f *.tab.c
355
356 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Po@am__quote@
357 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@
358 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/service.Po@am__quote@
359
360 .c.o:
361 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
362 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
363 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
364 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
365 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
366 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
367
368 .c.obj:
369 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
370 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
371 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
372 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
373 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
374 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
375
376 .c.lo:
377 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
378 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
379 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
380 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
381 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
382 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
383
384 mostlyclean-libtool:
385 -rm -f *.lo
386
387 clean-libtool:
388 -rm -rf .libs _libs
389 install-clientfileDATA: $(clientfile_DATA)
390 @$(NORMAL_INSTALL)
391 test -z "$(clientfiledir)" || $(MKDIR_P) "$(DESTDIR)$(clientfiledir)"
392 @list='$(clientfile_DATA)'; test -n "$(clientfiledir)" || list=; \
393 for p in $$list; do \
394 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
395 echo "$$d$$p"; \
396 done | $(am__base_list) | \
397 while read files; do \
398 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(clientfiledir)'"; \
399 $(INSTALL_DATA) $$files "$(DESTDIR)$(clientfiledir)" || exit $$?; \
400 done
401
402 uninstall-clientfileDATA:
403 @$(NORMAL_UNINSTALL)
404 @list='$(clientfile_DATA)'; test -n "$(clientfiledir)" || list=; \
405 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
406 test -n "$$files" || exit 0; \
407 echo " ( cd '$(DESTDIR)$(clientfiledir)' && rm -f" $$files ")"; \
408 cd "$(DESTDIR)$(clientfiledir)" && rm -f $$files
409 install-servicefileDATA: $(servicefile_DATA)
410 @$(NORMAL_INSTALL)
411 test -z "$(servicefiledir)" || $(MKDIR_P) "$(DESTDIR)$(servicefiledir)"
412 @list='$(servicefile_DATA)'; test -n "$(servicefiledir)" || list=; \
413 for p in $$list; do \
414 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
415 echo "$$d$$p"; \
416 done | $(am__base_list) | \
417 while read files; do \
418 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(servicefiledir)'"; \
419 $(INSTALL_DATA) $$files "$(DESTDIR)$(servicefiledir)" || exit $$?; \
420 done
421
422 uninstall-servicefileDATA:
423 @$(NORMAL_UNINSTALL)
424 @list='$(servicefile_DATA)'; test -n "$(servicefiledir)" || list=; \
425 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
426 test -n "$$files" || exit 0; \
427 echo " ( cd '$(DESTDIR)$(servicefiledir)' && rm -f" $$files ")"; \
428 cd "$(DESTDIR)$(servicefiledir)" && rm -f $$files
429
430 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
431 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
432 unique=`for i in $$list; do \
433 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
434 done | \
435 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
436 END { if (nonempty) { for (i in files) print i; }; }'`; \
437 mkid -fID $$unique
438 tags: TAGS
439
440 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
441 $(TAGS_FILES) $(LISP)
442 set x; \
443 here=`pwd`; \
444 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
445 unique=`for i in $$list; do \
446 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
447 done | \
448 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
449 END { if (nonempty) { for (i in files) print i; }; }'`; \
450 shift; \
451 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
452 test -n "$$unique" || unique=$$empty_fix; \
453 if test $$# -gt 0; then \
454 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
455 "$$@" $$unique; \
456 else \
457 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
458 $$unique; \
459 fi; \
460 fi
461 ctags: CTAGS
462 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
463 $(TAGS_FILES) $(LISP)
464 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
465 unique=`for i in $$list; do \
466 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
467 done | \
468 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
469 END { if (nonempty) { for (i in files) print i; }; }'`; \
470 test -z "$(CTAGS_ARGS)$$unique" \
471 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
472 $$unique
473
474 GTAGS:
475 here=`$(am__cd) $(top_builddir) && pwd` \
476 && $(am__cd) $(top_srcdir) \
477 && gtags -i $(GTAGS_ARGS) "$$here"
478
479 distclean-tags:
480 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
481
482 distdir: $(DISTFILES)
483 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
484 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
485 list='$(DISTFILES)'; \
486 dist_files=`for file in $$list; do echo $$file; done | \
487 sed -e "s|^$$srcdirstrip/||;t" \
488 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
489 case $$dist_files in \
490 */*) $(MKDIR_P) `echo "$$dist_files" | \
491 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
492 sort -u` ;; \
493 esac; \
494 for file in $$dist_files; do \
495 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
496 if test -d $$d/$$file; then \
497 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
498 if test -d "$(distdir)/$$file"; then \
499 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
500 fi; \
501 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
502 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
503 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
504 fi; \
505 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
506 else \
507 test -f "$(distdir)/$$file" \
508 || cp -p $$d/$$file "$(distdir)/$$file" \
509 || exit 1; \
510 fi; \
511 done
512 check-am: all-am
513 check: check-am
514 all-am: Makefile $(PROGRAMS) $(DATA)
515 installdirs:
516 for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(clientfiledir)" "$(DESTDIR)$(servicefiledir)"; do \
517 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
518 done
519 install: install-am
520 install-exec: install-exec-am
521 install-data: install-data-am
522 uninstall: uninstall-am
523
524 install-am: all-am
525 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
526
527 installcheck: installcheck-am
528 install-strip:
529 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
530 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
531 `test -z '$(STRIP)' || \
532 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
533 mostlyclean-generic:
534
535 clean-generic:
536
537 distclean-generic:
538 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
539 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
540 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
541
542 maintainer-clean-generic:
543 @echo "This command is intended for maintainers to use"
544 @echo "it deletes files that may require special tools to rebuild."
545 clean: clean-am
546
547 clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
548
549 distclean: distclean-am
550 -rm -rf ./$(DEPDIR)
551 -rm -f Makefile
552 distclean-am: clean-am distclean-compile distclean-generic \
553 distclean-tags
554
555 dvi: dvi-am
556
557 dvi-am:
558
559 html: html-am
560
561 html-am:
562
563 info: info-am
564
565 info-am:
566
567 install-data-am: install-clientfileDATA install-servicefileDATA
568
569 install-dvi: install-dvi-am
570
571 install-dvi-am:
572
573 install-exec-am: install-binPROGRAMS
574
575 install-html: install-html-am
576
577 install-html-am:
578
579 install-info: install-info-am
580
581 install-info-am:
582
583 install-man:
584
585 install-pdf: install-pdf-am
586
587 install-pdf-am:
588
589 install-ps: install-ps-am
590
591 install-ps-am:
592
593 installcheck-am:
594
595 maintainer-clean: maintainer-clean-am
596 -rm -rf ./$(DEPDIR)
597 -rm -f Makefile
598 maintainer-clean-am: distclean-am maintainer-clean-generic
599
600 mostlyclean: mostlyclean-am
601
602 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
603 mostlyclean-libtool
604
605 pdf: pdf-am
606
607 pdf-am:
608
609 ps: ps-am
610
611 ps-am:
612
613 uninstall-am: uninstall-binPROGRAMS uninstall-clientfileDATA \
614 uninstall-servicefileDATA
615
616 .MAKE: install-am install-strip
617
618 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
619 clean-generic clean-libtool ctags distclean distclean-compile \
620 distclean-generic distclean-libtool distclean-tags distdir dvi \
621 dvi-am html html-am info info-am install install-am \
622 install-binPROGRAMS install-clientfileDATA install-data \
623 install-data-am install-dvi install-dvi-am install-exec \
624 install-exec-am install-html install-html-am install-info \
625 install-info-am install-man install-pdf install-pdf-am \
626 install-ps install-ps-am install-servicefileDATA install-strip \
627 installcheck installcheck-am installdirs maintainer-clean \
628 maintainer-clean-generic mostlyclean mostlyclean-compile \
629 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
630 tags uninstall uninstall-am uninstall-binPROGRAMS \
631 uninstall-clientfileDATA uninstall-servicefileDATA
632
633
634 org.freedesktop.Telepathy.Client.SSHContact.service: org.freedesktop.Telepathy.Client.SSHContact.service.in
635 $(AM_V_GEN)sed -e "s|[@]bindir[@]|$(bindir)|" $< > $@
636
637 # Tell versions [3.59,3.63) of GNU make to not export all variables.
638 # Otherwise a system limit (for SysV at least) may be exceeded.
639 .NOEXPORT:
0 [org.freedesktop.Telepathy.Client]
1 Interfaces=org.freedesktop.Telepathy.Client.Handler
2
3 [org.freedesktop.Telepathy.Client.Handler.HandlerChannelFilter 0]
4 org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.StreamTube
5 org.freedesktop.Telepathy.Channel.TargetHandleType u=1
6 org.freedesktop.Telepathy.Channel.Type.StreamTube.Service s=x-ssh-contact
7 org.freedesktop.Telepathy.Channel.Requested b=false
8
0 /*
1 * Copyright (C) 2010 Xavier Claessens <xclaesse@gmail.com>
2 * Copyright (C) 2010 Collabora Ltd.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301 USA
18 */
19
20 #include "config.h"
21
22 #include <stdlib.h>
23 #include <string.h>
24 #include <unistd.h>
25
26 #include <glib/gstdio.h>
27 #include <gio/gunixsocketaddress.h>
28 #include <telepathy-glib/telepathy-glib.h>
29
30 #include "common.h"
31
32 typedef struct
33 {
34 GMainLoop *loop;
35
36 gchar *account_id;
37 gchar *contact_id;
38 gchar *login;
39
40 TpBaseClient *client;
41
42 GList *accounts;
43 guint n_readying_connections;
44 TpAccount *account;
45
46 gchar *unix_path;
47 GSocketConnection *tube_connection;
48 GSocketConnection *ssh_connection;
49
50 gboolean success:1;
51 } ClientContext;
52
53 static void
54 throw_error_message (ClientContext *context,
55 const gchar *message)
56 {
57 g_debug ("Error: %s", message);
58 context->success = FALSE;
59 g_main_loop_quit (context->loop);
60 }
61
62 static void
63 throw_error (ClientContext *context,
64 const GError *error)
65 {
66 throw_error_message (context, error ? error->message : "No error message");
67 }
68
69 static void
70 splice_cb (GIOStream *stream1,
71 GIOStream *stream2,
72 const GError *error,
73 gpointer user_data)
74 {
75 ClientContext *context = user_data;
76
77 if (error != NULL)
78 throw_error (context, error);
79 else
80 g_main_loop_quit (context->loop);
81 }
82
83 static void
84 ssh_socket_connected_cb (GObject *source_object,
85 GAsyncResult *res,
86 gpointer user_data)
87 {
88 ClientContext *context = user_data;
89 GSocketListener *listener = G_SOCKET_LISTENER (source_object);
90 GError *error = NULL;
91
92 context->ssh_connection = g_socket_listener_accept_finish (listener, res,
93 NULL, &error);
94 if (context->ssh_connection == NULL)
95 {
96 throw_error (context, error);
97 return;
98 }
99
100 /* Splice tube and ssh connections */
101 _g_io_stream_splice (G_IO_STREAM (context->tube_connection),
102 G_IO_STREAM (context->ssh_connection), splice_cb, context);
103 }
104
105 static void
106 exec_ssh_on_socket (ClientContext *context,
107 GSocket *socket)
108 {
109 GSocketAddress *socket_address;
110 GInetAddress *inet_address;
111 GError *error = NULL;
112 guint16 port;
113 gchar *host;
114
115 socket_address = g_socket_get_local_address (socket, &error);
116 if (socket_address == NULL)
117 {
118 throw_error (context, error);
119 return;
120 }
121
122 inet_address = g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (socket_address));
123 port = g_inet_socket_address_get_port (G_INET_SOCKET_ADDRESS (socket_address));
124 host = g_inet_address_to_string (inet_address);
125
126 if (fork() == 0)
127 {
128 GPtrArray *args;
129 gchar *str;
130
131 args = g_ptr_array_new ();
132 g_ptr_array_add (args, "ssh");
133 g_ptr_array_add (args, host);
134
135 g_ptr_array_add (args, "-p");
136 str = g_strdup_printf ("%d", port);
137 g_ptr_array_add (args, str);
138
139 if (context->login != NULL)
140 {
141 g_ptr_array_add (args, "-l");
142 str = g_strdup_printf ("%s", context->login);
143 g_ptr_array_add (args, str);
144 }
145
146 str = g_strdup_printf ("-oHostKeyAlias=%s", context->contact_id);
147 g_ptr_array_add (args, str);
148
149 g_ptr_array_add (args, NULL);
150
151 execvp ("ssh", (gchar **) args->pdata);
152 }
153
154 g_free (host);
155 }
156
157 static void
158 tube_socket_connected_cb (GObject *source_object,
159 GAsyncResult *res,
160 gpointer user_data)
161 {
162 ClientContext *context = user_data;
163 GSocketListener *listener = G_SOCKET_LISTENER (source_object);
164 GSocket *socket = NULL;
165 GInetAddress * inet_address = NULL;
166 GSocketAddress *socket_address = NULL;
167 GError *error = NULL;
168
169 context->tube_connection = g_socket_listener_accept_finish (listener, res,
170 NULL, &error);
171 if (context->tube_connection == NULL)
172 goto OUT;
173
174 /* Create the IPv4 socket, and listen for connection on it */
175 socket = g_socket_new (G_SOCKET_FAMILY_IPV4, G_SOCKET_TYPE_STREAM,
176 G_SOCKET_PROTOCOL_DEFAULT, &error);
177 if (socket == NULL)
178 goto OUT;
179 inet_address = g_inet_address_new_loopback (G_SOCKET_FAMILY_IPV4);
180 socket_address = g_inet_socket_address_new (inet_address, 0);
181 if (!g_socket_bind (socket, socket_address, FALSE, &error))
182 goto OUT;
183 if (!g_socket_listen (socket, &error))
184 goto OUT;
185 if (!g_socket_listener_add_socket (listener, socket, NULL, &error))
186 goto OUT;
187
188 g_socket_listener_accept_async (listener, NULL,
189 ssh_socket_connected_cb, context);
190
191 exec_ssh_on_socket (context, socket);
192
193 OUT:
194
195 if (error != NULL)
196 throw_error (context, error);
197
198 tp_clear_object (&socket);
199 tp_clear_object (&inet_address);
200 tp_clear_object (&socket_address);
201 g_clear_error (&error);
202 }
203
204 static void
205 offer_tube_cb (TpChannel *channel,
206 const GError *error,
207 gpointer user_data,
208 GObject *weak_object)
209 {
210 ClientContext *context = user_data;
211
212 if (error != NULL)
213 throw_error (context, error);
214 }
215
216 static void
217 channel_invalidated_cb (TpProxy *proxy,
218 guint domain,
219 gint code,
220 gchar *message,
221 ClientContext *context)
222 {
223 const GError *error;
224
225 error = tp_proxy_get_invalidated (proxy);
226 throw_error (context, error);
227 }
228
229 static void
230 handle_channel (ClientContext *context,
231 TpChannel *channel)
232 {
233 gchar *dir;
234 GSocketListener *listener = NULL;
235 GSocket *socket = NULL;
236 GSocketAddress *socket_address = NULL;
237 GValue *address;
238 GHashTable *parameters;
239 GError *error = NULL;
240
241 g_signal_connect (channel, "invalidated",
242 G_CALLBACK (channel_invalidated_cb), context);
243
244 /* We are client side, but we have to offer a socket... So we offer an unix
245 * socket on which the service side can connect. We also create an IPv4 socket
246 * on which the ssh client can connect. When both sockets are connected,
247 * we can forward all communications between them. */
248
249 /* FIXME: I don't think we close socket connections, or cancel
250 * g_socket_listener_accept_async in all error cases... */
251
252 listener = g_socket_listener_new ();
253
254 /* Create temporary file for our unix socket */
255 dir = g_build_filename (g_get_tmp_dir (), "telepathy-ssh-XXXXXX", NULL);
256 dir = mkdtemp (dir);
257 context->unix_path = g_build_filename (dir, "unix-socket", NULL);
258 g_free (dir);
259
260 /* Create the unix socket, and listen for connection on it */
261 socket = g_socket_new (G_SOCKET_FAMILY_UNIX, G_SOCKET_TYPE_STREAM,
262 G_SOCKET_PROTOCOL_DEFAULT, &error);
263 if (socket == NULL)
264 goto OUT;
265 socket_address = g_unix_socket_address_new (context->unix_path);
266 if (!g_socket_bind (socket, socket_address, FALSE, &error))
267 goto OUT;
268 if (!g_socket_listen (socket, &error))
269 goto OUT;
270 if (!g_socket_listener_add_socket (listener, socket, NULL, &error))
271 goto OUT;
272
273 g_socket_listener_accept_async (listener, NULL,
274 tube_socket_connected_cb, context);
275
276 /* Offer the socket */
277 address = tp_address_variant_from_g_socket_address (socket_address,
278 TP_SOCKET_ADDRESS_TYPE_UNIX, &error);
279 if (address == NULL)
280 goto OUT;
281 parameters = g_hash_table_new (NULL, NULL);
282 tp_cli_channel_type_stream_tube_call_offer (channel, -1,
283 TP_SOCKET_ADDRESS_TYPE_UNIX, address,
284 TP_SOCKET_ACCESS_CONTROL_LOCALHOST, parameters,
285 offer_tube_cb, context, NULL, NULL);
286 tp_g_value_slice_free (address);
287 g_hash_table_unref (parameters);
288
289 OUT:
290
291 if (error != NULL)
292 throw_error (context, error);
293
294 tp_clear_object (&listener);
295 tp_clear_object (&socket);
296 tp_clear_object (&socket_address);
297 g_clear_error (&error);
298 }
299
300 static void
301 got_channel_cb (TpSimpleHandler *handler,
302 TpAccount *account,
303 TpConnection *connection,
304 GList *channels,
305 GList *requests_satisfied,
306 gint64 user_action_time,
307 TpHandleChannelsContext *channel_context,
308 gpointer user_data)
309 {
310 ClientContext *context = user_data;
311 GList *l;
312
313 for (l = channels; l != NULL; l = l->next)
314 {
315 TpChannel *channel = l->data;
316
317 if (tp_strdiff (tp_channel_get_channel_type (channel),
318 TP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
319 continue;
320
321 handle_channel (context, channel);
322 }
323
324 tp_handle_channels_context_accept (channel_context);
325 }
326
327 static void
328 channel_request_invalidated_cb (TpProxy *proxy,
329 guint domain,
330 gint code,
331 gchar *message,
332 ClientContext *context)
333 {
334 const GError *error;
335
336 error = tp_proxy_get_invalidated (proxy);
337 if (!g_error_matches (error, TP_DBUS_ERRORS, TP_DBUS_ERROR_OBJECT_REMOVED))
338 throw_error (context, error);
339
340 g_object_unref (proxy);
341 }
342
343 static void
344 request_proceed_cb (TpChannelRequest *request,
345 const GError *error,
346 gpointer user_data,
347 GObject *weak_object)
348 {
349 ClientContext *context = user_data;
350
351 if (error != NULL)
352 throw_error (context, error);
353 }
354
355 static void
356 create_channel_cb (TpChannelDispatcher *dispatcher,
357 const gchar *request_path,
358 const GError *error,
359 gpointer user_data,
360 GObject *weak_object)
361 {
362 ClientContext *context = user_data;
363 TpDBusDaemon *dbus;
364 TpChannelRequest *request;
365 GError *err = NULL;
366
367 if (error != NULL)
368 {
369 throw_error (context, error);
370 return;
371 }
372
373 dbus = tp_proxy_get_dbus_daemon (TP_PROXY (dispatcher));
374 request = tp_channel_request_new (dbus, request_path, NULL, &err);
375 if (request == NULL)
376 {
377 throw_error (context, err);
378 g_clear_error (&err);
379 return;
380 }
381
382 g_signal_connect (request, "invalidated",
383 G_CALLBACK (channel_request_invalidated_cb), context);
384
385 tp_cli_channel_request_call_proceed (request, -1, request_proceed_cb,
386 context, NULL, NULL);
387 }
388
389 static void
390 request_channel (ClientContext *context)
391 {
392 TpDBusDaemon *dbus = NULL;
393 TpChannelDispatcher *dispatcher = NULL;
394 GHashTable *request = NULL;
395
396 dbus = tp_dbus_daemon_dup (NULL);
397 dispatcher = tp_channel_dispatcher_new (dbus);
398 request = tp_asv_new (
399 TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
400 TP_IFACE_CHANNEL_TYPE_STREAM_TUBE,
401 TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
402 TP_HANDLE_TYPE_CONTACT,
403 TP_PROP_CHANNEL_TARGET_ID, G_TYPE_STRING,
404 context->contact_id,
405 TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE, G_TYPE_STRING,
406 TUBE_SERVICE,
407 NULL);
408
409 tp_cli_channel_dispatcher_call_create_channel (dispatcher, -1,
410 tp_proxy_get_object_path (TP_PROXY (context->account)), request, G_MAXINT64,
411 tp_base_client_get_bus_name (context->client), create_channel_cb,
412 context, NULL, NULL);
413
414 g_object_unref (dbus);
415 g_object_unref (dispatcher);
416 g_hash_table_unref (request);
417 }
418
419 static gboolean
420 has_stream_tube_cap (TpCapabilities *caps)
421 {
422 GPtrArray *classes;
423 guint i;
424
425 if (caps == NULL)
426 return FALSE;
427
428 classes = tp_capabilities_get_channel_classes (caps);
429 for (i = 0; i < classes->len; i++)
430 {
431 GValueArray *arr = g_ptr_array_index (classes, i);
432 GHashTable *fixed;
433 const gchar *chan_type;
434 const gchar *service;
435 TpHandleType handle_type;
436
437 fixed = g_value_get_boxed (g_value_array_get_nth (arr, 0));
438 chan_type = tp_asv_get_string (fixed, TP_PROP_CHANNEL_CHANNEL_TYPE);
439 service = tp_asv_get_string (fixed, TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE);
440 handle_type = tp_asv_get_uint32 (fixed,
441 TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL);
442
443 if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE) &&
444 handle_type == TP_HANDLE_TYPE_CONTACT &&
445 (!tp_capabilities_is_specific_to_contact (caps) ||
446 !tp_strdiff (service, TUBE_SERVICE)))
447 return TRUE;
448 }
449
450 return FALSE;
451 }
452
453 static void
454 got_contacts_cb (TpConnection *connection,
455 guint n_contacts,
456 TpContact * const *contacts,
457 guint n_failed,
458 const TpHandle *failed,
459 const GError *error,
460 gpointer user_data,
461 GObject *weak_object)
462 {
463 ClientContext *context = user_data;
464 guint i;
465 GList *candidates = NULL, *l;
466 guint count = 0;
467 gchar buffer[10];
468 gchar *str;
469
470 if (error != NULL)
471 {
472 throw_error (context, error);
473 return;
474 }
475
476 /* Build a list of all contacts supporting StreamTube */
477 for (i = 0; i < n_contacts; i++)
478 if (has_stream_tube_cap (tp_contact_get_capabilities (contacts[i])))
479 candidates = g_list_prepend (candidates, contacts[i]);
480
481 if (candidates == NULL)
482 {
483 throw_error_message (context, "No suitable contact");
484 return;
485 }
486
487 /* Ask the user which candidate to use */
488 for (l = candidates; l != NULL; l = l->next)
489 {
490 TpContact *contact = l->data;
491
492 g_print ("%d) %s (%s)\n", ++count, tp_contact_get_alias (contact),
493 tp_contact_get_identifier (contact));
494 }
495
496 g_print ("Which contact to use? ");
497 str = fgets (buffer, sizeof (buffer), stdin);
498 if (str != NULL)
499 {
500 str[strlen (str) - 1] = '\0';
501 l = g_list_nth (candidates, atoi (str) - 1);
502 }
503 if (l == NULL)
504 {
505 throw_error_message (context, "Invalid contact number");
506 return;
507 }
508
509 context->contact_id = g_strdup (tp_contact_get_identifier (l->data));
510 request_channel (context);
511
512 g_list_free (candidates);
513 }
514
515 static void
516 stored_channel_prepare_cb (GObject *object,
517 GAsyncResult *res,
518 gpointer user_data)
519 {
520 ClientContext *context = user_data;
521 TpChannel *channel = TP_CHANNEL (object);
522 TpConnection *connection;
523 TpContactFeature features[] = { TP_CONTACT_FEATURE_ALIAS,
524 TP_CONTACT_FEATURE_CAPABILITIES };
525 const TpIntSet *set;
526 GArray *handles;
527 GError *error = NULL;
528
529 if (!tp_proxy_prepare_finish (channel, res, &error))
530 {
531 throw_error (context, error);
532 g_clear_error (&error);
533 return;
534 }
535
536 connection = tp_channel_borrow_connection (channel);
537 set = tp_channel_group_get_members (channel);
538 handles = tp_intset_to_array (set);
539
540 tp_connection_get_contacts_by_handle (connection, handles->len,
541 (TpHandle *) handles->data, G_N_ELEMENTS (features), features,
542 got_contacts_cb, context, NULL, NULL);
543
544 g_array_unref (handles);
545 }
546
547 static void
548 ensure_stored_channel_cb (TpConnection *connection,
549 gboolean yours,
550 const gchar *channel_path,
551 GHashTable *properties,
552 const GError *error,
553 gpointer user_data,
554 GObject *weak_object)
555 {
556 ClientContext *context = user_data;
557 TpChannel *channel;
558 GQuark features[] = { TP_CHANNEL_FEATURE_GROUP, 0 };
559 GError *err = NULL;
560
561 if (error != NULL)
562 {
563 throw_error (context, error);
564 return;
565 }
566
567 channel = tp_channel_new_from_properties (connection, channel_path,
568 properties, &err);
569 if (channel == NULL)
570 {
571 throw_error (context, err);
572 g_clear_error (&err);
573 return;
574 }
575
576 tp_proxy_prepare_async (TP_PROXY (channel), features,
577 stored_channel_prepare_cb, context);
578
579 g_object_unref (channel);
580 }
581
582 static void
583 chooser_contact (ClientContext *context)
584 {
585 TpConnection *connection;
586 GHashTable *request;
587
588 /* If a contact ID was passed in the options, use it */
589 if (context->contact_id != NULL)
590 request_channel (context);
591
592 /* Otherwise, we'll get TpContact objects for all stored contacts on that
593 * account. */
594 request = tp_asv_new (
595 TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
596 TP_IFACE_CHANNEL_TYPE_CONTACT_LIST,
597 TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
598 TP_HANDLE_TYPE_LIST,
599 TP_PROP_CHANNEL_TARGET_ID, G_TYPE_STRING,
600 "stored",
601 NULL);
602
603 connection = tp_account_get_connection (context->account);
604 tp_cli_connection_interface_requests_call_ensure_channel (connection, -1,
605 request, ensure_stored_channel_cb, context, NULL, NULL);
606
607 g_hash_table_unref (request);
608 }
609
610 static void
611 chooser_account (ClientContext *context)
612 {
613 GList *l;
614 guint count = 0;
615 gchar buffer[10];
616 gchar *str;
617
618 if (context->accounts == NULL)
619 {
620 throw_error_message (context, "No suitable account");
621 return;
622 }
623
624 for (l = context->accounts; l != NULL; l = l->next)
625 {
626 g_print ("%d) %s (%s)\n", ++count,
627 tp_account_get_display_name (l->data),
628 tp_account_get_protocol (l->data));
629 }
630
631 g_print ("Which account to use? ");
632 str = fgets (buffer, sizeof (buffer), stdin);
633 if (str != NULL)
634 {
635 str[strlen (str) - 1] = '\0';
636 l = g_list_nth (context->accounts, atoi (str) - 1);
637 }
638 if (l == NULL)
639 {
640 throw_error_message (context, "Invalid account number");
641 return;
642 }
643 context->account = g_object_ref (l->data);
644
645 /* If the account id was not in the options, print it now. It makes easier to
646 * copy/paste later. */
647 if (context->account_id == NULL)
648 {
649 const gchar *account_path;
650
651 account_path = tp_proxy_get_object_path (context->account);
652 context->account_id = g_strdup (account_path +
653 strlen (TP_ACCOUNT_OBJECT_PATH_BASE));
654
655 g_print ("Going to use account: '%s'\n", context->account_id);
656 }
657
658 chooser_contact (context);
659 }
660
661 static void
662 connection_prepare_cb (GObject *object,
663 GAsyncResult *res,
664 gpointer user_data)
665 {
666 TpConnection *connection = TP_CONNECTION (object);
667 ClientContext *context = user_data;
668
669 if (!tp_proxy_prepare_finish (TP_PROXY (connection), res, NULL) ||
670 !has_stream_tube_cap (tp_connection_get_capabilities (connection)))
671 {
672 GList *l;
673
674 /* Remove the account that has that connection from the list */
675 for (l = context->accounts; l != NULL; l = l->next)
676 if (tp_account_get_connection (l->data) == connection)
677 {
678 g_object_unref (l->data);
679 context->accounts = g_list_delete_link (context->accounts, l);
680 break;
681 }
682 }
683
684 if (--context->n_readying_connections == 0)
685 chooser_account (context);
686 }
687
688 static void
689 account_manager_prepare_cb (GObject *object,
690 GAsyncResult *res,
691 gpointer user_data)
692 {
693 TpAccountManager *manager = TP_ACCOUNT_MANAGER (object);
694 ClientContext *context = user_data;
695 GList *l, *next;
696 GError *error = NULL;
697
698 if (!tp_proxy_prepare_finish (TP_PROXY (manager), res, &error))
699 {
700 throw_error (context, error);
701 g_clear_error (&error);
702 return;
703 }
704
705 /* We want to list all accounts which has a connection that have StreamTube
706 * support. So first we prepare all connections, and we keep in
707 * context->accounts those that are suitable. */
708
709 context->accounts = tp_account_manager_get_valid_accounts (manager);
710 g_list_foreach (context->accounts, (GFunc) g_object_ref, NULL);
711
712 for (l = context->accounts; l != NULL; l = next)
713 {
714 GQuark features[] = { TP_CONNECTION_FEATURE_CAPABILITIES, 0 };
715 TpAccount *account = l->data;
716 TpConnection *connection;
717
718 next = l->next;
719
720 connection = tp_account_get_connection (account);
721 if (connection == NULL)
722 {
723 g_object_unref (account);
724 context->accounts = g_list_delete_link (context->accounts, l);
725 continue;
726 }
727
728 context->n_readying_connections++;
729 tp_proxy_prepare_async (TP_PROXY (connection), features,
730 connection_prepare_cb, context);
731 }
732
733 if (context->n_readying_connections == 0)
734 chooser_account (context);
735 }
736
737 static void
738 account_prepare_cb (GObject *object,
739 GAsyncResult *res,
740 gpointer user_data)
741 {
742 TpAccount *account = TP_ACCOUNT (object);
743 ClientContext *context = user_data;
744 GQuark features[] = { TP_CONNECTION_FEATURE_CAPABILITIES, 0 };
745 TpConnection *connection;
746 GError *error = NULL;
747
748 /* We are in the case where an account was specified in options, so we have
749 * only one candidate, if that accounts has no connection or the connection
750 * has no StreamTube support, we'll fail. */
751
752 if (!tp_proxy_prepare_finish (TP_PROXY (account), res, &error))
753 {
754 throw_error (context, error);
755 return;
756 }
757
758 connection = tp_account_get_connection (account);
759 if (connection == NULL)
760 {
761 throw_error_message (context, "Account not online");
762 return;
763 }
764
765 /* Prepare account's connection with caps feature */
766 context->accounts = g_list_prepend (NULL, g_object_ref (account));
767 context->n_readying_connections = 1;
768 tp_proxy_prepare_async (TP_PROXY (connection), features,
769 connection_prepare_cb, context);
770 }
771
772 static void
773 client_context_clear (ClientContext *context)
774 {
775 tp_clear_pointer (&context->loop, g_main_loop_unref);
776 g_free (context->account_id);
777 g_free (context->contact_id);
778 g_free (context->login);
779
780 tp_clear_object (&context->client);
781
782 g_list_foreach (context->accounts, (GFunc) g_object_unref, NULL);
783 g_list_free (context->accounts);
784 tp_clear_object (&context->account);
785
786 if (context->unix_path != NULL)
787 {
788 gchar *p;
789
790 g_unlink (context->unix_path);
791 p = g_strrstr (context->unix_path, G_DIR_SEPARATOR_S);
792 *p = '\0';
793 g_rmdir (context->unix_path);
794 g_free (context->unix_path);
795 }
796 tp_clear_object (&context->tube_connection);
797 tp_clear_object (&context->ssh_connection);
798 }
799
800 int
801 main (gint argc, gchar *argv[])
802 {
803 TpDBusDaemon *dbus = NULL;
804 GError *error = NULL;
805 ClientContext context = { 0, };
806 GOptionContext *optcontext;
807 GOptionEntry options[] = {
808 { "account", 'a',
809 0, G_OPTION_ARG_STRING, &context.account_id,
810 "The account ID",
811 NULL },
812 { "contact", 'c',
813 0, G_OPTION_ARG_STRING, &context.contact_id,
814 "The contact ID",
815 NULL },
816 { "login", 'l',
817 0, G_OPTION_ARG_STRING, &context.login,
818 "Specifies the user to log in as on the remote machine",
819 NULL },
820 { NULL }
821 };
822
823 g_type_init ();
824
825 optcontext = g_option_context_new ("- ssh-contact");
826 g_option_context_add_main_entries (optcontext, options, NULL);
827 if (!g_option_context_parse (optcontext, &argc, &argv, &error))
828 {
829 g_print ("%s\nRun '%s --help' to see a full list of available command "
830 "line options.\n", error->message, argv[0]);
831 return EXIT_FAILURE;
832 }
833 g_option_context_free (optcontext);
834
835 g_set_application_name (PACKAGE_NAME);
836
837 /* Register an handler for the StreamTube channel we'll request */
838 dbus = tp_dbus_daemon_dup (&error);
839 if (dbus == NULL)
840 goto OUT;
841
842 context.client = tp_simple_handler_new (dbus, FALSE, FALSE,
843 "SSHContactClient", TRUE, got_channel_cb, &context, NULL);
844
845 tp_base_client_take_handler_filter (context.client, tp_asv_new (
846 TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
847 TP_IFACE_CHANNEL_TYPE_STREAM_TUBE,
848 TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
849 TP_HANDLE_TYPE_CONTACT,
850 TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE, G_TYPE_STRING,
851 "ssh",
852 TP_PROP_CHANNEL_REQUESTED, G_TYPE_BOOLEAN,
853 TRUE,
854 NULL));
855
856 if (!tp_base_client_register (context.client, &error))
857 goto OUT;
858
859 /* If an account id was specified in options, then prepare it, otherwise
860 * we get the account manager to get a list of all accounts */
861 if (context.account_id != NULL)
862 {
863 gchar *account_path;
864
865 account_path = g_strconcat (TP_ACCOUNT_OBJECT_PATH_BASE, context.account_id,
866 NULL);
867 context.account = tp_account_new (dbus, account_path, &error);
868 if (context.account == NULL)
869 goto OUT;
870
871 tp_proxy_prepare_async (TP_PROXY (context.account), NULL,
872 account_prepare_cb, &context);
873
874 g_free (account_path);
875 }
876 else
877 {
878 TpAccountManager *manager;
879
880 manager = tp_account_manager_new (dbus);
881 tp_proxy_prepare_async (TP_PROXY (manager), NULL,
882 account_manager_prepare_cb, &context);
883
884 g_object_unref (manager);
885 }
886
887 context.loop = g_main_loop_new (NULL, FALSE);
888 g_main_loop_run (context.loop);
889
890 OUT:
891
892 if (error != NULL)
893 {
894 context.success = FALSE;
895 g_debug ("Error: %s", error->message);
896 }
897
898 tp_clear_object (&dbus);
899 g_clear_error (&error);
900 client_context_clear (&context);
901
902 return context.success ? EXIT_SUCCESS : EXIT_FAILURE;
903 }
904
0 /*
1 * Copyright (C) 2010 Xavier Claessens <xclaesse@gmail.com>
2 * Copyright (C) 2010 Collabora Ltd.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301 USA
18 */
19
20 #include "config.h"
21
22 #include "common.h"
23
24 typedef struct
25 {
26 guint ref_count;
27 gboolean closed;
28 GError *error;
29
30 GIOStream *stream1;
31 GIOStream *stream2;
32
33 _GIOStreamSpliceCallback callback;
34 gpointer user_data;
35 } SpliceContext;
36
37 static SpliceContext *
38 splice_context_ref (SpliceContext *self)
39 {
40 self->ref_count++;
41 return self;
42 }
43
44 static void
45 splice_context_unref (SpliceContext *self)
46 {
47 if (--self->ref_count == 0)
48 {
49 if (self->callback != NULL)
50 self->callback (self->stream1, self->stream2, self->error,
51 self->user_data);
52
53 g_clear_error (&self->error);
54 g_object_unref (self->stream1);
55 g_object_unref (self->stream2);
56
57 g_slice_free (SpliceContext, self);
58 }
59 }
60
61 static void
62 splice_context_close (SpliceContext *self, const GError *error)
63 {
64 if (self->closed)
65 return;
66 self->closed = TRUE;
67
68 if (error != NULL)
69 self->error = g_error_copy (error);
70
71 g_io_stream_close (self->stream1, NULL, NULL);
72 g_io_stream_close (self->stream2, NULL, NULL);
73 }
74
75 static void
76 splice_cb (GObject *ostream,
77 GAsyncResult *res,
78 gpointer user_data)
79 {
80 SpliceContext *ctx = user_data;
81 GError *error = NULL;
82
83 g_output_stream_splice_finish (G_OUTPUT_STREAM (ostream), res, &error);
84
85 splice_context_close (ctx, error);
86 splice_context_unref (ctx);
87
88 g_clear_error (&error);
89 }
90
91 void
92 _g_io_stream_splice (GIOStream *stream1,
93 GIOStream *stream2,
94 _GIOStreamSpliceCallback callback,
95 gpointer user_data)
96 {
97 SpliceContext *ctx;
98 GInputStream *istream;
99 GOutputStream *ostream;
100
101 ctx = g_slice_new0 (SpliceContext);
102 ctx->ref_count = 1;
103 ctx->stream1 = g_object_ref (stream1);
104 ctx->stream2 = g_object_ref (stream2);
105 ctx->callback = callback;
106 ctx->user_data = user_data;
107
108 istream = g_io_stream_get_input_stream (stream1);
109 ostream = g_io_stream_get_output_stream (stream2);
110 g_output_stream_splice_async (ostream, istream, G_OUTPUT_STREAM_SPLICE_NONE,
111 G_PRIORITY_DEFAULT, NULL, splice_cb, splice_context_ref (ctx));
112
113 istream = g_io_stream_get_input_stream (stream2);
114 ostream = g_io_stream_get_output_stream (stream1);
115 g_output_stream_splice_async (ostream, istream, G_OUTPUT_STREAM_SPLICE_NONE,
116 G_PRIORITY_DEFAULT, NULL, splice_cb, splice_context_ref (ctx));
117
118 splice_context_unref (ctx);
119 }
120
0 /*
1 * Copyright (C) 2010 Xavier Claessens <xclaesse@gmail.com>
2 * Copyright (C) 2010 Collabora Ltd.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301 USA
18 */
19
20 #ifndef __COMMON_H__
21 #define __COMMON_H__
22
23 #include <gio/gio.h>
24
25 #define TUBE_SERVICE "x-ssh-contact"
26
27 G_BEGIN_DECLS
28
29 typedef void (*_GIOStreamSpliceCallback) (GIOStream *stream1,
30 GIOStream *stream2, const GError *error, gpointer user_data);
31
32 void _g_io_stream_splice (GIOStream *stream1, GIOStream *stream2,
33 _GIOStreamSpliceCallback callback, gpointer user_data);
34
35 G_END_DECLS
36
37 #endif /* #ifndef __COMMON_H__*/
0 [D-BUS Service]
1 Name=org.freedesktop.Telepathy.Client.SSHContact
2 Exec=@bindir@/ssh-contact-service
0 /*
1 * Copyright (C) 2010 Xavier Claessens <xclaesse@gmail.com>
2 * Copyright (C) 2010 Collabora Ltd.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301 USA
18 */
19
20 #include "config.h"
21
22 #include <stdlib.h>
23
24 #include <gio/gunixsocketaddress.h>
25 #include <telepathy-glib/telepathy-glib.h>
26
27 #include "common.h"
28
29 static GMainLoop *loop = NULL;
30 static guint n_sessions = 0;
31
32 static void
33 throw_error (const GError *error)
34 {
35 g_debug ("Error: %s", error ? error->message : "No error message");
36
37 if (--n_sessions == 0)
38 g_main_loop_quit (loop);
39 }
40
41 static void
42 splice_cb (GIOStream *stream1,
43 GIOStream *stream2,
44 const GError *error,
45 gpointer user_data)
46 {
47 if (error != NULL)
48 throw_error (error);
49 else if (--n_sessions == 0)
50 g_main_loop_quit (loop);
51 }
52
53 static void
54 accept_tube_cb (TpChannel *channel,
55 const GValue *address,
56 const GError *error,
57 gpointer user_data,
58 GObject *weak_object)
59 {
60 GSocketAddress *socket_address = NULL;
61 GInetAddress *inet_address = NULL;
62 GSocket *socket = NULL;
63 GSocketConnection *tube_connection = NULL;
64 GSocketConnection *sshd_connection = NULL;
65 GError *err = NULL;
66
67 if (error != NULL)
68 {
69 throw_error (error);
70 return;
71 }
72
73 /* Connect to the unix socket we received */
74 socket_address = tp_g_socket_address_from_variant (
75 TP_SOCKET_ADDRESS_TYPE_UNIX, address, &err);
76 if (socket_address == NULL)
77 goto OUT;
78 socket = g_socket_new (G_SOCKET_FAMILY_UNIX, G_SOCKET_TYPE_STREAM,
79 G_SOCKET_PROTOCOL_DEFAULT, &err);
80 if (socket == NULL)
81 goto OUT;
82 if (!g_socket_connect (socket, socket_address, NULL, &err))
83 goto OUT;
84 tube_connection = g_socket_connection_factory_create_connection (socket);
85 tp_clear_object (&socket_address);
86 tp_clear_object (&socket);
87
88 /* Connect to the sshd */
89 inet_address = g_inet_address_new_loopback (G_SOCKET_FAMILY_IPV4);
90 socket_address = g_inet_socket_address_new (inet_address, 22);
91 socket = g_socket_new (G_SOCKET_FAMILY_IPV4, G_SOCKET_TYPE_STREAM,
92 G_SOCKET_PROTOCOL_DEFAULT, &err);
93 if (socket == NULL)
94 goto OUT;
95 if (!g_socket_connect (socket, socket_address, NULL, &err))
96 goto OUT;
97 sshd_connection = g_socket_connection_factory_create_connection (socket);
98
99 /* Splice tube and ssh connections */
100 _g_io_stream_splice (G_IO_STREAM (tube_connection),
101 G_IO_STREAM (sshd_connection), splice_cb, NULL);
102
103 OUT:
104
105 if (err != NULL)
106 throw_error (err);
107
108 tp_clear_object (&inet_address);
109 tp_clear_object (&socket_address);
110 tp_clear_object (&socket);
111 tp_clear_object (&tube_connection);
112 tp_clear_object (&sshd_connection);
113 g_clear_error (&err);
114 }
115
116 static void
117 got_channel_cb (TpSimpleHandler *handler,
118 TpAccount *account,
119 TpConnection *connection,
120 GList *channels,
121 GList *requests_satisfied,
122 gint64 user_action_time,
123 TpHandleChannelsContext *context,
124 gpointer user_data)
125 {
126 GValue value = { 0, };
127 GList *l;
128
129 /* FIXME: Dummy value because passing NULL makes tp-glib crash */
130 g_value_init (&value, G_TYPE_STRING);
131
132 for (l = channels; l != NULL; l = l->next)
133 {
134 TpChannel *channel = l->data;
135
136 if (tp_strdiff (tp_channel_get_channel_type (channel),
137 TP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
138 continue;
139
140 n_sessions++;
141
142 tp_cli_channel_type_stream_tube_call_accept (channel, -1,
143 TP_SOCKET_ADDRESS_TYPE_UNIX,
144 TP_SOCKET_ACCESS_CONTROL_LOCALHOST, &value,
145 accept_tube_cb, NULL, NULL, NULL);
146
147 }
148 tp_handle_channels_context_accept (context);
149
150 g_value_reset (&value);
151 }
152
153 int
154 main (gint argc, gchar *argv[])
155 {
156 TpDBusDaemon *dbus = NULL;
157 TpBaseClient *client = NULL;
158 gboolean success = TRUE;
159 GError *error = NULL;
160
161 g_type_init ();
162
163 dbus = tp_dbus_daemon_dup (&error);
164 if (dbus == NULL)
165 goto OUT;
166
167 client = tp_simple_handler_new (dbus, FALSE, FALSE, "SSHContact",
168 FALSE, got_channel_cb, NULL, NULL);
169
170 tp_base_client_take_handler_filter (client, tp_asv_new (
171 TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
172 TP_IFACE_CHANNEL_TYPE_STREAM_TUBE,
173 TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
174 TP_HANDLE_TYPE_CONTACT,
175 TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE, G_TYPE_STRING,
176 TUBE_SERVICE,
177 TP_PROP_CHANNEL_REQUESTED, G_TYPE_BOOLEAN,
178 FALSE,
179 NULL));
180
181 if (!tp_base_client_register (client, &error))
182 goto OUT;
183
184 loop = g_main_loop_new (NULL, FALSE);
185 g_main_loop_run (loop);
186
187 OUT:
188
189 if (error != NULL)
190 {
191 g_debug ("Error: %s", error->message);
192 success = FALSE;
193 }
194
195 tp_clear_pointer (&loop, g_main_loop_unref);
196 tp_clear_object (&dbus);
197 tp_clear_object (&client);
198 g_clear_error (&error);
199
200 return success ? EXIT_SUCCESS : EXIT_FAILURE;
201 }
202