diff options
author | Christian Grothoff <christian@grothoff.org> | 2006-09-06 18:57:01 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2006-09-06 18:57:01 +0000 |
commit | 96b2dcfc43eb89eeaec4689b7eb802370f6be741 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
parent | 7f89238dc989897a085bc9b4dc32d4498aaea313 (diff) | |
download | libmicrohttpd-96b2dcfc43eb89eeaec4689b7eb802370f6be741.tar.gz libmicrohttpd-96b2dcfc43eb89eeaec4689b7eb802370f6be741.zip |
bye
-rw-r--r-- | COPYING | 506 | ||||
-rw-r--r-- | COPYRIGHT | 7 | ||||
-rw-r--r-- | INSTALL | 229 | ||||
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | README | 7 | ||||
-rw-r--r-- | TODO | 51 | ||||
-rwxr-xr-x | bootstrap | 2 | ||||
-rwxr-xr-x | config.sub | 1608 | ||||
-rw-r--r-- | configure.ac | 36 | ||||
-rwxr-xr-x | ltmain.sh | 6871 |
11 files changed, 0 insertions, 9321 deletions
diff --git a/COPYING b/COPYING deleted file mode 100644 index 807db791..00000000 --- a/COPYING +++ /dev/null | |||
@@ -1,506 +0,0 @@ | |||
1 | GNU LESSER GENERAL PUBLIC LICENSE | ||
2 | Version 2.1, February 1999 | ||
3 | |||
4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. | ||
5 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
6 | Everyone is permitted to copy and distribute verbatim copies | ||
7 | of this license document, but changing it is not allowed. | ||
8 | |||
9 | [This is the first released version of the Lesser GPL. It also counts | ||
10 | as the successor of the GNU Library Public License, version 2, hence | ||
11 | the version number 2.1.] | ||
12 | |||
13 | Preamble | ||
14 | |||
15 | The licenses for most software are designed to take away your | ||
16 | freedom to share and change it. By contrast, the GNU General Public | ||
17 | Licenses are intended to guarantee your freedom to share and change | ||
18 | free software--to make sure the software is free for all its users. | ||
19 | |||
20 | This license, the Lesser General Public License, applies to some | ||
21 | specially designated software packages--typically libraries--of the | ||
22 | Free Software Foundation and other authors who decide to use it. You | ||
23 | can use it too, but we suggest you first think carefully about whether | ||
24 | this license or the ordinary General Public License is the better | ||
25 | strategy to use in any particular case, based on the explanations below. | ||
26 | |||
27 | When we speak of free software, we are referring to freedom of use, | ||
28 | not price. Our General Public Licenses are designed to make sure that | ||
29 | you have the freedom to distribute copies of free software (and charge | ||
30 | for this service if you wish); that you receive source code or can get | ||
31 | it if you want it; that you can change the software and use pieces of | ||
32 | it in new free programs; and that you are informed that you can do | ||
33 | these things. | ||
34 | |||
35 | To protect your rights, we need to make restrictions that forbid | ||
36 | distributors to deny you these rights or to ask you to surrender these | ||
37 | rights. These restrictions translate to certain responsibilities for | ||
38 | you if you distribute copies of the library or if you modify it. | ||
39 | |||
40 | For example, if you distribute copies of the library, whether gratis | ||
41 | or for a fee, you must give the recipients all the rights that we gave | ||
42 | you. You must make sure that they, too, receive or can get the source | ||
43 | code. If you link other code with the library, you must provide | ||
44 | complete object files to the recipients, so that they can relink them | ||
45 | with the library after making changes to the library and recompiling | ||
46 | it. And you must show them these terms so they know their rights. | ||
47 | |||
48 | We protect your rights with a two-step method: (1) we copyright the | ||
49 | library, and (2) we offer you this license, which gives you legal | ||
50 | permission to copy, distribute and/or modify the library. | ||
51 | |||
52 | To protect each distributor, we want to make it very clear that | ||
53 | there is no warranty for the free library. Also, if the library is | ||
54 | modified by someone else and passed on, the recipients should know | ||
55 | that what they have is not the original version, so that the original | ||
56 | author's reputation will not be affected by problems that might be | ||
57 | introduced by others. | ||
58 | |||
59 | Finally, software patents pose a constant threat to the existence of | ||
60 | any free program. We wish to make sure that a company cannot | ||
61 | effectively restrict the users of a free program by obtaining a | ||
62 | restrictive license from a patent holder. Therefore, we insist that | ||
63 | any patent license obtained for a version of the library must be | ||
64 | consistent with the full freedom of use specified in this license. | ||
65 | |||
66 | Most GNU software, including some libraries, is covered by the | ||
67 | ordinary GNU General Public License. This license, the GNU Lesser | ||
68 | General Public License, applies to certain designated libraries, and | ||
69 | is quite different from the ordinary General Public License. We use | ||
70 | this license for certain libraries in order to permit linking those | ||
71 | libraries into non-free programs. | ||
72 | |||
73 | When a program is linked with a library, whether statically or using | ||
74 | a shared library, the combination of the two is legally speaking a | ||
75 | combined work, a derivative of the original library. The ordinary | ||
76 | General Public License therefore permits such linking only if the | ||
77 | entire combination fits its criteria of freedom. The Lesser General | ||
78 | Public License permits more lax criteria for linking other code with | ||
79 | the library. | ||
80 | |||
81 | We call this license the "Lesser" General Public License because it | ||
82 | does Less to protect the user's freedom than the ordinary General | ||
83 | Public License. It also provides other free software developers Less | ||
84 | of an advantage over competing non-free programs. These disadvantages | ||
85 | are the reason we use the ordinary General Public License for many | ||
86 | libraries. However, the Lesser license provides advantages in certain | ||
87 | special circumstances. | ||
88 | |||
89 | For example, on rare occasions, there may be a special need to | ||
90 | encourage the widest possible use of a certain library, so that it becomes | ||
91 | a de-facto standard. To achieve this, non-free programs must be | ||
92 | allowed to use the library. A more frequent case is that a free | ||
93 | library does the same job as widely used non-free libraries. In this | ||
94 | case, there is little to gain by limiting the free library to free | ||
95 | software only, so we use the Lesser General Public License. | ||
96 | |||
97 | In other cases, permission to use a particular library in non-free | ||
98 | programs enables a greater number of people to use a large body of | ||
99 | free software. For example, permission to use the GNU C Library in | ||
100 | non-free programs enables many more people to use the whole GNU | ||
101 | operating system, as well as its variant, the GNU/Linux operating | ||
102 | system. | ||
103 | |||
104 | Although the Lesser General Public License is Less protective of the | ||
105 | users' freedom, it does ensure that the user of a program that is | ||
106 | linked with the Library has the freedom and the wherewithal to run | ||
107 | that program using a modified version of the Library. | ||
108 | |||
109 | The precise terms and conditions for copying, distribution and | ||
110 | modification follow. Pay close attention to the difference between a | ||
111 | "work based on the library" and a "work that uses the library". The | ||
112 | former contains code derived from the library, whereas the latter must | ||
113 | be combined with the library in order to run. | ||
114 | |||
115 | GNU LESSER GENERAL PUBLIC LICENSE | ||
116 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
117 | |||
118 | 0. This License Agreement applies to any software library or other | ||
119 | program which contains a notice placed by the copyright holder or | ||
120 | other authorized party saying it may be distributed under the terms of | ||
121 | this Lesser General Public License (also called "this License"). | ||
122 | Each licensee is addressed as "you". | ||
123 | |||
124 | A "library" means a collection of software functions and/or data | ||
125 | prepared so as to be conveniently linked with application programs | ||
126 | (which use some of those functions and data) to form executables. | ||
127 | |||
128 | The "Library", below, refers to any such software library or work | ||
129 | which has been distributed under these terms. A "work based on the | ||
130 | Library" means either the Library or any derivative work under | ||
131 | copyright law: that is to say, a work containing the Library or a | ||
132 | portion of it, either verbatim or with modifications and/or translated | ||
133 | straightforwardly into another language. (Hereinafter, translation is | ||
134 | included without limitation in the term "modification".) | ||
135 | |||
136 | "Source code" for a work means the preferred form of the work for | ||
137 | making modifications to it. For a library, complete source code means | ||
138 | all the source code for all modules it contains, plus any associated | ||
139 | interface definition files, plus the scripts used to control compilation | ||
140 | and installation of the library. | ||
141 | |||
142 | Activities other than copying, distribution and modification are not | ||
143 | covered by this License; they are outside its scope. The act of | ||
144 | running a program using the Library is not restricted, and output from | ||
145 | such a program is covered only if its contents constitute a work based | ||
146 | on the Library (independent of the use of the Library in a tool for | ||
147 | writing it). Whether that is true depends on what the Library does | ||
148 | and what the program that uses the Library does. | ||
149 | |||
150 | 1. You may copy and distribute verbatim copies of the Library's | ||
151 | complete source code as you receive it, in any medium, provided that | ||
152 | you conspicuously and appropriately publish on each copy an | ||
153 | appropriate copyright notice and disclaimer of warranty; keep intact | ||
154 | all the notices that refer to this License and to the absence of any | ||
155 | warranty; and distribute a copy of this License along with the | ||
156 | Library. | ||
157 | |||
158 | You may charge a fee for the physical act of transferring a copy, | ||
159 | and you may at your option offer warranty protection in exchange for a | ||
160 | fee. | ||
161 | |||
162 | 2. You may modify your copy or copies of the Library or any portion | ||
163 | of it, thus forming a work based on the Library, and copy and | ||
164 | distribute such modifications or work under the terms of Section 1 | ||
165 | above, provided that you also meet all of these conditions: | ||
166 | |||
167 | a) The modified work must itself be a software library. | ||
168 | |||
169 | b) You must cause the files modified to carry prominent notices | ||
170 | stating that you changed the files and the date of any change. | ||
171 | |||
172 | c) You must cause the whole of the work to be licensed at no | ||
173 | charge to all third parties under the terms of this License. | ||
174 | |||
175 | d) If a facility in the modified Library refers to a function or a | ||
176 | table of data to be supplied by an application program that uses | ||
177 | the facility, other than as an argument passed when the facility | ||
178 | is invoked, then you must make a good faith effort to ensure that, | ||
179 | in the event an application does not supply such function or | ||
180 | table, the facility still operates, and performs whatever part of | ||
181 | its purpose remains meaningful. | ||
182 | |||
183 | (For example, a function in a library to compute square roots has | ||
184 | a purpose that is entirely well-defined independent of the | ||
185 | application. Therefore, Subsection 2d requires that any | ||
186 | application-supplied function or table used by this function must | ||
187 | be optional: if the application does not supply it, the square | ||
188 | root function must still compute square roots.) | ||
189 | |||
190 | These requirements apply to the modified work as a whole. If | ||
191 | identifiable sections of that work are not derived from the Library, | ||
192 | and can be reasonably considered independent and separate works in | ||
193 | themselves, then this License, and its terms, do not apply to those | ||
194 | sections when you distribute them as separate works. But when you | ||
195 | distribute the same sections as part of a whole which is a work based | ||
196 | on the Library, the distribution of the whole must be on the terms of | ||
197 | this License, whose permissions for other licensees extend to the | ||
198 | entire whole, and thus to each and every part regardless of who wrote | ||
199 | it. | ||
200 | |||
201 | Thus, it is not the intent of this section to claim rights or contest | ||
202 | your rights to work written entirely by you; rather, the intent is to | ||
203 | exercise the right to control the distribution of derivative or | ||
204 | collective works based on the Library. | ||
205 | |||
206 | In addition, mere aggregation of another work not based on the Library | ||
207 | with the Library (or with a work based on the Library) on a volume of | ||
208 | a storage or distribution medium does not bring the other work under | ||
209 | the scope of this License. | ||
210 | |||
211 | 3. You may opt to apply the terms of the ordinary GNU General Public | ||
212 | License instead of this License to a given copy of the Library. To do | ||
213 | this, you must alter all the notices that refer to this License, so | ||
214 | that they refer to the ordinary GNU General Public License, version 2, | ||
215 | instead of to this License. (If a newer version than version 2 of the | ||
216 | ordinary GNU General Public License has appeared, then you can specify | ||
217 | that version instead if you wish.) Do not make any other change in | ||
218 | these notices. | ||
219 | |||
220 | Once this change is made in a given copy, it is irreversible for | ||
221 | that copy, so the ordinary GNU General Public License applies to all | ||
222 | subsequent copies and derivative works made from that copy. | ||
223 | |||
224 | This option is useful when you wish to copy part of the code of | ||
225 | the Library into a program that is not a library. | ||
226 | |||
227 | 4. You may copy and distribute the Library (or a portion or | ||
228 | derivative of it, under Section 2) in object code or executable form | ||
229 | under the terms of Sections 1 and 2 above provided that you accompany | ||
230 | it with the complete corresponding machine-readable source code, which | ||
231 | must be distributed under the terms of Sections 1 and 2 above on a | ||
232 | medium customarily used for software interchange. | ||
233 | |||
234 | If distribution of object code is made by offering access to copy | ||
235 | from a designated place, then offering equivalent access to copy the | ||
236 | source code from the same place satisfies the requirement to | ||
237 | distribute the source code, even though third parties are not | ||
238 | compelled to copy the source along with the object code. | ||
239 | |||
240 | 5. A program that contains no derivative of any portion of the | ||
241 | Library, but is designed to work with the Library by being compiled or | ||
242 | linked with it, is called a "work that uses the Library". Such a | ||
243 | work, in isolation, is not a derivative work of the Library, and | ||
244 | therefore falls outside the scope of this License. | ||
245 | |||
246 | However, linking a "work that uses the Library" with the Library | ||
247 | creates an executable that is a derivative of the Library (because it | ||
248 | contains portions of the Library), rather than a "work that uses the | ||
249 | library". The executable is therefore covered by this License. | ||
250 | Section 6 states terms for distribution of such executables. | ||
251 | |||
252 | When a "work that uses the Library" uses material from a header file | ||
253 | that is part of the Library, the object code for the work may be a | ||
254 | derivative work of the Library even though the source code is not. | ||
255 | Whether this is true is especially significant if the work can be | ||
256 | linked without the Library, or if the work is itself a library. The | ||
257 | threshold for this to be true is not precisely defined by law. | ||
258 | |||
259 | If such an object file uses only numerical parameters, data | ||
260 | structure layouts and accessors, and small macros and small inline | ||
261 | functions (ten lines or less in length), then the use of the object | ||
262 | file is unrestricted, regardless of whether it is legally a derivative | ||
263 | work. (Executables containing this object code plus portions of the | ||
264 | Library will still fall under Section 6.) | ||
265 | |||
266 | Otherwise, if the work is a derivative of the Library, you may | ||
267 | distribute the object code for the work under the terms of Section 6. | ||
268 | Any executables containing that work also fall under Section 6, | ||
269 | whether or not they are linked directly with the Library itself. | ||
270 | |||
271 | 6. As an exception to the Sections above, you may also combine or | ||
272 | link a "work that uses the Library" with the Library to produce a | ||
273 | work containing portions of the Library, and distribute that work | ||
274 | under terms of your choice, provided that the terms permit | ||
275 | modification of the work for the customer's own use and reverse | ||
276 | engineering for debugging such modifications. | ||
277 | |||
278 | You must give prominent notice with each copy of the work that the | ||
279 | Library is used in it and that the Library and its use are covered by | ||
280 | this License. You must supply a copy of this License. If the work | ||
281 | during execution displays copyright notices, you must include the | ||
282 | copyright notice for the Library among them, as well as a reference | ||
283 | directing the user to the copy of this License. Also, you must do one | ||
284 | of these things: | ||
285 | |||
286 | a) Accompany the work with the complete corresponding | ||
287 | machine-readable source code for the Library including whatever | ||
288 | changes were used in the work (which must be distributed under | ||
289 | Sections 1 and 2 above); and, if the work is an executable linked | ||
290 | with the Library, with the complete machine-readable "work that | ||
291 | uses the Library", as object code and/or source code, so that the | ||
292 | user can modify the Library and then relink to produce a modified | ||
293 | executable containing the modified Library. (It is understood | ||
294 | that the user who changes the contents of definitions files in the | ||
295 | Library will not necessarily be able to recompile the application | ||
296 | to use the modified definitions.) | ||
297 | |||
298 | b) Use a suitable shared library mechanism for linking with the | ||
299 | Library. A suitable mechanism is one that (1) uses at run time a | ||
300 | copy of the library already present on the user's computer system, | ||
301 | rather than copying library functions into the executable, and (2) | ||
302 | will operate properly with a modified version of the library, if | ||
303 | the user installs one, as long as the modified version is | ||
304 | interface-compatible with the version that the work was made with. | ||
305 | |||
306 | c) Accompany the work with a written offer, valid for at | ||
307 | least three years, to give the same user the materials | ||
308 | specified in Subsection 6a, above, for a charge no more | ||
309 | than the cost of performing this distribution. | ||
310 | |||
311 | d) If distribution of the work is made by offering access to copy | ||
312 | from a designated place, offer equivalent access to copy the above | ||
313 | specified materials from the same place. | ||
314 | |||
315 | e) Verify that the user has already received a copy of these | ||
316 | materials or that you have already sent this user a copy. | ||
317 | |||
318 | For an executable, the required form of the "work that uses the | ||
319 | Library" must include any data and utility programs needed for | ||
320 | reproducing the executable from it. However, as a special exception, | ||
321 | the materials to be distributed need not include anything that is | ||
322 | normally distributed (in either source or binary form) with the major | ||
323 | components (compiler, kernel, and so on) of the operating system on | ||
324 | which the executable runs, unless that component itself accompanies | ||
325 | the executable. | ||
326 | |||
327 | It may happen that this requirement contradicts the license | ||
328 | restrictions of other proprietary libraries that do not normally | ||
329 | accompany the operating system. Such a contradiction means you cannot | ||
330 | use both them and the Library together in an executable that you | ||
331 | distribute. | ||
332 | |||
333 | 7. You may place library facilities that are a work based on the | ||
334 | Library side-by-side in a single library together with other library | ||
335 | facilities not covered by this License, and distribute such a combined | ||
336 | library, provided that the separate distribution of the work based on | ||
337 | the Library and of the other library facilities is otherwise | ||
338 | permitted, and provided that you do these two things: | ||
339 | |||
340 | a) Accompany the combined library with a copy of the same work | ||
341 | based on the Library, uncombined with any other library | ||
342 | facilities. This must be distributed under the terms of the | ||
343 | Sections above. | ||
344 | |||
345 | b) Give prominent notice with the combined library of the fact | ||
346 | that part of it is a work based on the Library, and explaining | ||
347 | where to find the accompanying uncombined form of the same work. | ||
348 | |||
349 | 8. You may not copy, modify, sublicense, link with, or distribute | ||
350 | the Library except as expressly provided under this License. Any | ||
351 | attempt otherwise to copy, modify, sublicense, link with, or | ||
352 | distribute the Library is void, and will automatically terminate your | ||
353 | rights under this License. However, parties who have received copies, | ||
354 | or rights, from you under this License will not have their licenses | ||
355 | terminated so long as such parties remain in full compliance. | ||
356 | |||
357 | 9. You are not required to accept this License, since you have not | ||
358 | signed it. However, nothing else grants you permission to modify or | ||
359 | distribute the Library or its derivative works. These actions are | ||
360 | prohibited by law if you do not accept this License. Therefore, by | ||
361 | modifying or distributing the Library (or any work based on the | ||
362 | Library), you indicate your acceptance of this License to do so, and | ||
363 | all its terms and conditions for copying, distributing or modifying | ||
364 | the Library or works based on it. | ||
365 | |||
366 | 10. Each time you redistribute the Library (or any work based on the | ||
367 | Library), the recipient automatically receives a license from the | ||
368 | original licensor to copy, distribute, link with or modify the Library | ||
369 | subject to these terms and conditions. You may not impose any further | ||
370 | restrictions on the recipients' exercise of the rights granted herein. | ||
371 | You are not responsible for enforcing compliance by third parties with | ||
372 | this License. | ||
373 | |||
374 | 11. If, as a consequence of a court judgment or allegation of patent | ||
375 | infringement or for any other reason (not limited to patent issues), | ||
376 | conditions are imposed on you (whether by court order, agreement or | ||
377 | otherwise) that contradict the conditions of this License, they do not | ||
378 | excuse you from the conditions of this License. If you cannot | ||
379 | distribute so as to satisfy simultaneously your obligations under this | ||
380 | License and any other pertinent obligations, then as a consequence you | ||
381 | may not distribute the Library at all. For example, if a patent | ||
382 | license would not permit royalty-free redistribution of the Library by | ||
383 | all those who receive copies directly or indirectly through you, then | ||
384 | the only way you could satisfy both it and this License would be to | ||
385 | refrain entirely from distribution of the Library. | ||
386 | |||
387 | If any portion of this section is held invalid or unenforceable under any | ||
388 | particular circumstance, the balance of the section is intended to apply, | ||
389 | and the section as a whole is intended to apply in other circumstances. | ||
390 | |||
391 | It is not the purpose of this section to induce you to infringe any | ||
392 | patents or other property right claims or to contest validity of any | ||
393 | such claims; this section has the sole purpose of protecting the | ||
394 | integrity of the free software distribution system which is | ||
395 | implemented by public license practices. Many people have made | ||
396 | generous contributions to the wide range of software distributed | ||
397 | through that system in reliance on consistent application of that | ||
398 | system; it is up to the author/donor to decide if he or she is willing | ||
399 | to distribute software through any other system and a licensee cannot | ||
400 | impose that choice. | ||
401 | |||
402 | This section is intended to make thoroughly clear what is believed to | ||
403 | be a consequence of the rest of this License. | ||
404 | |||
405 | 12. If the distribution and/or use of the Library is restricted in | ||
406 | certain countries either by patents or by copyrighted interfaces, the | ||
407 | original copyright holder who places the Library under this License may add | ||
408 | an explicit geographical distribution limitation excluding those countries, | ||
409 | so that distribution is permitted only in or among countries not thus | ||
410 | excluded. In such case, this License incorporates the limitation as if | ||
411 | written in the body of this License. | ||
412 | |||
413 | 13. The Free Software Foundation may publish revised and/or new | ||
414 | versions of the Lesser General Public License from time to time. | ||
415 | Such new versions will be similar in spirit to the present version, | ||
416 | but may differ in detail to address new problems or concerns. | ||
417 | |||
418 | Each version is given a distinguishing version number. If the Library | ||
419 | specifies a version number of this License which applies to it and | ||
420 | "any later version", you have the option of following the terms and | ||
421 | conditions either of that version or of any later version published by | ||
422 | the Free Software Foundation. If the Library does not specify a | ||
423 | license version number, you may choose any version ever published by | ||
424 | the Free Software Foundation. | ||
425 | |||
426 | 14. If you wish to incorporate parts of the Library into other free | ||
427 | programs whose distribution conditions are incompatible with these, | ||
428 | write to the author to ask for permission. For software which is | ||
429 | copyrighted by the Free Software Foundation, write to the Free | ||
430 | Software Foundation; we sometimes make exceptions for this. Our | ||
431 | decision will be guided by the two goals of preserving the free status | ||
432 | of all derivatives of our free software and of promoting the sharing | ||
433 | and reuse of software generally. | ||
434 | |||
435 | NO WARRANTY | ||
436 | |||
437 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO | ||
438 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. | ||
439 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR | ||
440 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY | ||
441 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE | ||
442 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
443 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE | ||
444 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME | ||
445 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. | ||
446 | |||
447 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN | ||
448 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY | ||
449 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU | ||
450 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR | ||
451 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE | ||
452 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING | ||
453 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A | ||
454 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF | ||
455 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH | ||
456 | DAMAGES. | ||
457 | |||
458 | END OF TERMS AND CONDITIONS | ||
459 | |||
460 | How to Apply These Terms to Your New Libraries | ||
461 | |||
462 | If you develop a new library, and you want it to be of the greatest | ||
463 | possible use to the public, we recommend making it free software that | ||
464 | everyone can redistribute and change. You can do so by permitting | ||
465 | redistribution under these terms (or, alternatively, under the terms of the | ||
466 | ordinary General Public License). | ||
467 | |||
468 | To apply these terms, attach the following notices to the library. It is | ||
469 | safest to attach them to the start of each source file to most effectively | ||
470 | convey the exclusion of warranty; and each file should have at least the | ||
471 | "copyright" line and a pointer to where the full notice is found. | ||
472 | |||
473 | <one line to give the library's name and a brief idea of what it does.> | ||
474 | Copyright (C) <year> <name of author> | ||
475 | |||
476 | This library is free software; you can redistribute it and/or | ||
477 | modify it under the terms of the GNU Lesser General Public | ||
478 | License as published by the Free Software Foundation; either | ||
479 | version 2.1 of the License, or (at your option) any later version. | ||
480 | |||
481 | This library is distributed in the hope that it will be useful, | ||
482 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
483 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
484 | Lesser General Public License for more details. | ||
485 | |||
486 | You should have received a copy of the GNU Lesser General Public | ||
487 | License along with this library; if not, write to the Free Software | ||
488 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
489 | |||
490 | Also add information on how to contact you by electronic and paper mail. | ||
491 | |||
492 | You should also get your employer (if you work as a programmer) or your | ||
493 | school, if any, to sign a "copyright disclaimer" for the library, if | ||
494 | necessary. Here is a sample; alter the names: | ||
495 | |||
496 | Yoyodyne, Inc., hereby disclaims all copyright interest in the | ||
497 | library `Frob' (a library for tweaking knobs) written by James Random Hacker. | ||
498 | |||
499 | <signature of Ty Coon>, 1 April 1990 | ||
500 | Ty Coon, President of Vice | ||
501 | |||
502 | That's all there is to it! | ||
503 | |||
504 | |||
505 | |||
506 | |||
diff --git a/COPYRIGHT b/COPYRIGHT deleted file mode 100644 index 1b60ef9e..00000000 --- a/COPYRIGHT +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | Copyright 2002, 2003 Luis Figueiredo. All rights reserved | ||
2 | |||
3 | See the LICENSE file | ||
4 | |||
5 | The origin of this software must not be misrepresented, either by | ||
6 | explicit claim or by omission. Since few users ever read sources, | ||
7 | credits must appear in the documentation. | ||
diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 54caf7c1..00000000 --- a/INSTALL +++ /dev/null | |||
@@ -1,229 +0,0 @@ | |||
1 | Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software | ||
2 | Foundation, Inc. | ||
3 | |||
4 | This file is free documentation; the Free Software Foundation gives | ||
5 | unlimited permission to copy, distribute and modify it. | ||
6 | |||
7 | Basic Installation | ||
8 | ================== | ||
9 | |||
10 | These are generic installation instructions. | ||
11 | |||
12 | The `configure' shell script attempts to guess correct values for | ||
13 | various system-dependent variables used during compilation. It uses | ||
14 | those values to create a `Makefile' in each directory of the package. | ||
15 | It may also create one or more `.h' files containing system-dependent | ||
16 | definitions. Finally, it creates a shell script `config.status' that | ||
17 | you can run in the future to recreate the current configuration, and a | ||
18 | file `config.log' containing compiler output (useful mainly for | ||
19 | debugging `configure'). | ||
20 | |||
21 | It can also use an optional file (typically called `config.cache' | ||
22 | and enabled with `--cache-file=config.cache' or simply `-C') that saves | ||
23 | the results of its tests to speed up reconfiguring. (Caching is | ||
24 | disabled by default to prevent problems with accidental use of stale | ||
25 | cache files.) | ||
26 | |||
27 | If you need to do unusual things to compile the package, please try | ||
28 | to figure out how `configure' could check whether to do them, and mail | ||
29 | diffs or instructions to the address given in the `README' so they can | ||
30 | be considered for the next release. If you are using the cache, and at | ||
31 | some point `config.cache' contains results you don't want to keep, you | ||
32 | may remove or edit it. | ||
33 | |||
34 | The file `configure.ac' (or `configure.in') is used to create | ||
35 | `configure' by a program called `autoconf'. You only need | ||
36 | `configure.ac' if you want to change it or regenerate `configure' using | ||
37 | a newer version of `autoconf'. | ||
38 | |||
39 | The simplest way to compile this package is: | ||
40 | |||
41 | 1. `cd' to the directory containing the package's source code and type | ||
42 | `./configure' to configure the package for your system. If you're | ||
43 | using `csh' on an old version of System V, you might need to type | ||
44 | `sh ./configure' instead to prevent `csh' from trying to execute | ||
45 | `configure' itself. | ||
46 | |||
47 | Running `configure' takes awhile. While running, it prints some | ||
48 | messages telling which features it is checking for. | ||
49 | |||
50 | 2. Type `make' to compile the package. | ||
51 | |||
52 | 3. Optionally, type `make check' to run any self-tests that come with | ||
53 | the package. | ||
54 | |||
55 | 4. Type `make install' to install the programs and any data files and | ||
56 | documentation. | ||
57 | |||
58 | 5. You can remove the program binaries and object files from the | ||
59 | source code directory by typing `make clean'. To also remove the | ||
60 | files that `configure' created (so you can compile the package for | ||
61 | a different kind of computer), type `make distclean'. There is | ||
62 | also a `make maintainer-clean' target, but that is intended mainly | ||
63 | for the package's developers. If you use it, you may have to get | ||
64 | all sorts of other programs in order to regenerate files that came | ||
65 | with the distribution. | ||
66 | |||
67 | Compilers and Options | ||
68 | ===================== | ||
69 | |||
70 | Some systems require unusual options for compilation or linking that | ||
71 | the `configure' script does not know about. Run `./configure --help' | ||
72 | for details on some of the pertinent environment variables. | ||
73 | |||
74 | You can give `configure' initial values for configuration parameters | ||
75 | by setting variables in the command line or in the environment. Here | ||
76 | is an example: | ||
77 | |||
78 | ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix | ||
79 | |||
80 | *Note Defining Variables::, for more details. | ||
81 | |||
82 | Compiling For Multiple Architectures | ||
83 | ==================================== | ||
84 | |||
85 | You can compile the package for more than one kind of computer at the | ||
86 | same time, by placing the object files for each architecture in their | ||
87 | own directory. To do this, you must use a version of `make' that | ||
88 | supports the `VPATH' variable, such as GNU `make'. `cd' to the | ||
89 | directory where you want the object files and executables to go and run | ||
90 | the `configure' script. `configure' automatically checks for the | ||
91 | source code in the directory that `configure' is in and in `..'. | ||
92 | |||
93 | If you have to use a `make' that does not support the `VPATH' | ||
94 | variable, you have to compile the package for one architecture at a | ||
95 | time in the source code directory. After you have installed the | ||
96 | package for one architecture, use `make distclean' before reconfiguring | ||
97 | for another architecture. | ||
98 | |||
99 | Installation Names | ||
100 | ================== | ||
101 | |||
102 | By default, `make install' will install the package's files in | ||
103 | `/usr/local/bin', `/usr/local/man', etc. You can specify an | ||
104 | installation prefix other than `/usr/local' by giving `configure' the | ||
105 | option `--prefix=PATH'. | ||
106 | |||
107 | You can specify separate installation prefixes for | ||
108 | architecture-specific files and architecture-independent files. If you | ||
109 | give `configure' the option `--exec-prefix=PATH', the package will use | ||
110 | PATH as the prefix for installing programs and libraries. | ||
111 | Documentation and other data files will still use the regular prefix. | ||
112 | |||
113 | In addition, if you use an unusual directory layout you can give | ||
114 | options like `--bindir=PATH' to specify different values for particular | ||
115 | kinds of files. Run `configure --help' for a list of the directories | ||
116 | you can set and what kinds of files go in them. | ||
117 | |||
118 | If the package supports it, you can cause programs to be installed | ||
119 | with an extra prefix or suffix on their names by giving `configure' the | ||
120 | option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. | ||
121 | |||
122 | Optional Features | ||
123 | ================= | ||
124 | |||
125 | Some packages pay attention to `--enable-FEATURE' options to | ||
126 | `configure', where FEATURE indicates an optional part of the package. | ||
127 | They may also pay attention to `--with-PACKAGE' options, where PACKAGE | ||
128 | is something like `gnu-as' or `x' (for the X Window System). The | ||
129 | `README' should mention any `--enable-' and `--with-' options that the | ||
130 | package recognizes. | ||
131 | |||
132 | For packages that use the X Window System, `configure' can usually | ||
133 | find the X include and library files automatically, but if it doesn't, | ||
134 | you can use the `configure' options `--x-includes=DIR' and | ||
135 | `--x-libraries=DIR' to specify their locations. | ||
136 | |||
137 | Specifying the System Type | ||
138 | ========================== | ||
139 | |||
140 | There may be some features `configure' cannot figure out | ||
141 | automatically, but needs to determine by the type of machine the package | ||
142 | will run on. Usually, assuming the package is built to be run on the | ||
143 | _same_ architectures, `configure' can figure that out, but if it prints | ||
144 | a message saying it cannot guess the machine type, give it the | ||
145 | `--build=TYPE' option. TYPE can either be a short name for the system | ||
146 | type, such as `sun4', or a canonical name which has the form: | ||
147 | |||
148 | CPU-COMPANY-SYSTEM | ||
149 | |||
150 | where SYSTEM can have one of these forms: | ||
151 | |||
152 | OS KERNEL-OS | ||
153 | |||
154 | See the file `config.sub' for the possible values of each field. If | ||
155 | `config.sub' isn't included in this package, then this package doesn't | ||
156 | need to know the machine type. | ||
157 | |||
158 | If you are _building_ compiler tools for cross-compiling, you should | ||
159 | use the `--target=TYPE' option to select the type of system they will | ||
160 | produce code for. | ||
161 | |||
162 | If you want to _use_ a cross compiler, that generates code for a | ||
163 | platform different from the build platform, you should specify the | ||
164 | "host" platform (i.e., that on which the generated programs will | ||
165 | eventually be run) with `--host=TYPE'. | ||
166 | |||
167 | Sharing Defaults | ||
168 | ================ | ||
169 | |||
170 | If you want to set default values for `configure' scripts to share, | ||
171 | you can create a site shell script called `config.site' that gives | ||
172 | default values for variables like `CC', `cache_file', and `prefix'. | ||
173 | `configure' looks for `PREFIX/share/config.site' if it exists, then | ||
174 | `PREFIX/etc/config.site' if it exists. Or, you can set the | ||
175 | `CONFIG_SITE' environment variable to the location of the site script. | ||
176 | A warning: not all `configure' scripts look for a site script. | ||
177 | |||
178 | Defining Variables | ||
179 | ================== | ||
180 | |||
181 | Variables not defined in a site shell script can be set in the | ||
182 | environment passed to `configure'. However, some packages may run | ||
183 | configure again during the build, and the customized values of these | ||
184 | variables may be lost. In order to avoid this problem, you should set | ||
185 | them in the `configure' command line, using `VAR=value'. For example: | ||
186 | |||
187 | ./configure CC=/usr/local2/bin/gcc | ||
188 | |||
189 | will cause the specified gcc to be used as the C compiler (unless it is | ||
190 | overridden in the site shell script). | ||
191 | |||
192 | `configure' Invocation | ||
193 | ====================== | ||
194 | |||
195 | `configure' recognizes the following options to control how it | ||
196 | operates. | ||
197 | |||
198 | `--help' | ||
199 | `-h' | ||
200 | Print a summary of the options to `configure', and exit. | ||
201 | |||
202 | `--version' | ||
203 | `-V' | ||
204 | Print the version of Autoconf used to generate the `configure' | ||
205 | script, and exit. | ||
206 | |||
207 | `--cache-file=FILE' | ||
208 | Enable the cache: use and save the results of the tests in FILE, | ||
209 | traditionally `config.cache'. FILE defaults to `/dev/null' to | ||
210 | disable caching. | ||
211 | |||
212 | `--config-cache' | ||
213 | `-C' | ||
214 | Alias for `--cache-file=config.cache'. | ||
215 | |||
216 | `--quiet' | ||
217 | `--silent' | ||
218 | `-q' | ||
219 | Do not print messages saying which checks are being made. To | ||
220 | suppress all normal output, redirect it to `/dev/null' (any error | ||
221 | messages will still be shown). | ||
222 | |||
223 | `--srcdir=DIR' | ||
224 | Look for the package's source code in directory DIR. Usually | ||
225 | `configure' can determine that directory automatically. | ||
226 | |||
227 | `configure' also accepts some other, not widely useful, options. Run | ||
228 | `configure --help' for more details. | ||
229 | |||
diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 3f11093b..00000000 --- a/Makefile.am +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | SUBDIRS = include src | ||
2 | |||
3 | |||
@@ -1 +0,0 @@ | |||
1 | See ChangeLog. | ||
diff --git a/README b/README deleted file mode 100644 index dda765bc..00000000 --- a/README +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | This is an adaptation of libwebserver for GNUnet. | ||
2 | |||
3 | Non-essential code from old libwebserver library | ||
4 | was moved to contrib/, documentation was moved | ||
5 | to doc/. | ||
6 | |||
7 | The build system was changed to use automake. | ||
@@ -1,51 +0,0 @@ | |||
1 | |||
2 | |||
3 | |||
4 | |||
5 | |||
6 | |||
7 | try to make just makefile for win instead of project file | ||
8 | |||
9 | check for integer overflow | ||
10 | do a webserver stresser | ||
11 | |||
12 | |||
13 | |||
14 | |||
15 | CORRECT: netbsd dont free's the memory (linux's free) // i don't know why! | ||
16 | |||
17 | |||
18 | DONE: WS_USECONF is completed just make test and turn it better | ||
19 | DONE: WS_DYNVAR ( for using web_client_setvar("color","#FFFFFF")), printf("<BODY bgcolor='$color;>"); ) usefull for web_client_addfile();) <- DONE | ||
20 | DONE: there is some mem buffer that is not freeing on logfile example something related to web_client_addfile (corrected) | ||
21 | DONE: upload is missing somethind debug ok, but release is crashing (was related to writetemp[WRITEMAX+1]) | ||
22 | DONE: faster way to upload and download! remove newdata ( is delaying operation) | ||
23 | DONE: content-range header (for resuming) | ||
24 | DONE: logging (put it on process_client) | ||
25 | DONE: Find a better way to manage "tmpfname" (using flocks) | ||
26 | DONE: make web_client_setcookie works called in whatever where in the handle function, (keep on an database maybe as varlist); | ||
27 | DONE: remove wrotesize and varsize from client to outstream | ||
28 | DONE: The war beguns, and i'm coding :o), reduce error mensaging to one file (reduce static mem space); | ||
29 | DONE: similar: maybe make the web_server_MIMEfile(server,"const char *");, to next do the web_server_adddir(server,"/home/users/www",WS_LISTING); | ||
30 | |||
31 | MAYBE DONE: Well something wrong about downloading several imgs, sometimes apears the 'X' image! figure why (requires intensive tests) | ||
32 | DONE: lib isn't close files well, probably is that becouse the Ximage | ||
33 | DONE: do the freebsd port by Hilobok Andrew (han@km.if.ua) | ||
34 | DONE: URGENT: Change names of internal functions, we don't want conflits with other ppl functions (such as already defined symbols) | ||
35 | |||
36 | |||
37 | TODO: The flag WS_USECGI, act as a cgi using env instead ClientInfo | ||
38 | TODO: better to do is web_server_addcgi("* /*",execfile.exe,0); | ||
39 | |||
40 | |||
41 | TODO: make the web_client_addurl function (web_client_addurl("http://127.0.0.1"); as web_client_addfile("path/to/file");) | ||
42 | TODO: WS_USEMOD (modulated system to use) /(maybe need WS_USECONF, for describe modules) | ||
43 | |||
44 | |||
45 | IMPROVE: Find a way to manage dll (stdout,stdin,etc) | ||
46 | IMPROVE: WS_DYNVAR | ||
47 | |||
48 | |||
49 | |||
50 | |||
51 | |||
diff --git a/bootstrap b/bootstrap deleted file mode 100755 index 6e2ca412..00000000 --- a/bootstrap +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | autoreconf -f -i \ No newline at end of file | ||
diff --git a/config.sub b/config.sub deleted file mode 100755 index 387c18d1..00000000 --- a/config.sub +++ /dev/null | |||
@@ -1,1608 +0,0 @@ | |||
1 | #! /bin/sh | ||
2 | # Configuration validation subroutine script. | ||
3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | ||
4 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, | ||
5 | # Inc. | ||
6 | |||
7 | timestamp='2006-07-02' | ||
8 | |||
9 | # This file is (in principle) common to ALL GNU software. | ||
10 | # The presence of a machine in this file suggests that SOME GNU software | ||
11 | # can handle that machine. It does not imply ALL GNU software can. | ||
12 | # | ||
13 | # This file is free software; you can redistribute it and/or modify | ||
14 | # it under the terms of the GNU General Public License as published by | ||
15 | # the Free Software Foundation; either version 2 of the License, or | ||
16 | # (at your option) any later version. | ||
17 | # | ||
18 | # This program is distributed in the hope that it will be useful, | ||
19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
21 | # GNU General Public License for more details. | ||
22 | # | ||
23 | # You should have received a copy of the GNU General Public License | ||
24 | # along with this program; if not, write to the Free Software | ||
25 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA | ||
26 | # 02110-1301, USA. | ||
27 | # | ||
28 | # As a special exception to the GNU General Public License, if you | ||
29 | # distribute this file as part of a program that contains a | ||
30 | # configuration script generated by Autoconf, you may include it under | ||
31 | # the same distribution terms that you use for the rest of that program. | ||
32 | |||
33 | |||
34 | # Please send patches to <config-patches@gnu.org>. Submit a context | ||
35 | # diff and a properly formatted ChangeLog entry. | ||
36 | # | ||
37 | # Configuration subroutine to validate and canonicalize a configuration type. | ||
38 | # Supply the specified configuration type as an argument. | ||
39 | # If it is invalid, we print an error message on stderr and exit with code 1. | ||
40 | # Otherwise, we print the canonical config type on stdout and succeed. | ||
41 | |||
42 | # This file is supposed to be the same for all GNU packages | ||
43 | # and recognize all the CPU types, system types and aliases | ||
44 | # that are meaningful with *any* GNU software. | ||
45 | # Each package is responsible for reporting which valid configurations | ||
46 | # it does not support. The user should be able to distinguish | ||
47 | # a failure to support a valid configuration from a meaningless | ||
48 | # configuration. | ||
49 | |||
50 | # The goal of this file is to map all the various variations of a given | ||
51 | # machine specification into a single specification in the form: | ||
52 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM | ||
53 | # or in some cases, the newer four-part form: | ||
54 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM | ||
55 | # It is wrong to echo any other type of specification. | ||
56 | |||
57 | me=`echo "$0" | sed -e 's,.*/,,'` | ||
58 | |||
59 | usage="\ | ||
60 | Usage: $0 [OPTION] CPU-MFR-OPSYS | ||
61 | $0 [OPTION] ALIAS | ||
62 | |||
63 | Canonicalize a configuration name. | ||
64 | |||
65 | Operation modes: | ||
66 | -h, --help print this help, then exit | ||
67 | -t, --time-stamp print date of last modification, then exit | ||
68 | -v, --version print version number, then exit | ||
69 | |||
70 | Report bugs and patches to <config-patches@gnu.org>." | ||
71 | |||
72 | version="\ | ||
73 | GNU config.sub ($timestamp) | ||
74 | |||
75 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 | ||
76 | Free Software Foundation, Inc. | ||
77 | |||
78 | This is free software; see the source for copying conditions. There is NO | ||
79 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | ||
80 | |||
81 | help=" | ||
82 | Try \`$me --help' for more information." | ||
83 | |||
84 | # Parse command line | ||
85 | while test $# -gt 0 ; do | ||
86 | case $1 in | ||
87 | --time-stamp | --time* | -t ) | ||
88 | echo "$timestamp" ; exit ;; | ||
89 | --version | -v ) | ||
90 | echo "$version" ; exit ;; | ||
91 | --help | --h* | -h ) | ||
92 | echo "$usage"; exit ;; | ||
93 | -- ) # Stop option processing | ||
94 | shift; break ;; | ||
95 | - ) # Use stdin as input. | ||
96 | break ;; | ||
97 | -* ) | ||
98 | echo "$me: invalid option $1$help" | ||
99 | exit 1 ;; | ||
100 | |||
101 | *local*) | ||
102 | # First pass through any local machine types. | ||
103 | echo $1 | ||
104 | exit ;; | ||
105 | |||
106 | * ) | ||
107 | break ;; | ||
108 | esac | ||
109 | done | ||
110 | |||
111 | case $# in | ||
112 | 0) echo "$me: missing argument$help" >&2 | ||
113 | exit 1;; | ||
114 | 1) ;; | ||
115 | *) echo "$me: too many arguments$help" >&2 | ||
116 | exit 1;; | ||
117 | esac | ||
118 | |||
119 | # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). | ||
120 | # Here we must recognize all the valid KERNEL-OS combinations. | ||
121 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | ||
122 | case $maybe_os in | ||
123 | nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ | ||
124 | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-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 | -sim | -cisco | -oki | -wec | -winbond) | ||
156 | os= | ||
157 | basic_machine=$1 | ||
158 | ;; | ||
159 | -scout) | ||
160 | ;; | ||
161 | -wrs) | ||
162 | os=-vxworks | ||
163 | basic_machine=$1 | ||
164 | ;; | ||
165 | -chorusos*) | ||
166 | os=-chorusos | ||
167 | basic_machine=$1 | ||
168 | ;; | ||
169 | -chorusrdb) | ||
170 | os=-chorusrdb | ||
171 | basic_machine=$1 | ||
172 | ;; | ||
173 | -hiux*) | ||
174 | os=-hiuxwe2 | ||
175 | ;; | ||
176 | -sco6) | ||
177 | os=-sco5v6 | ||
178 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
179 | ;; | ||
180 | -sco5) | ||
181 | os=-sco3.2v5 | ||
182 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
183 | ;; | ||
184 | -sco4) | ||
185 | os=-sco3.2v4 | ||
186 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
187 | ;; | ||
188 | -sco3.2.[4-9]*) | ||
189 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | ||
190 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
191 | ;; | ||
192 | -sco3.2v[4-9]*) | ||
193 | # Don't forget version if it is 3.2v4 or newer. | ||
194 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
195 | ;; | ||
196 | -sco5v6*) | ||
197 | # Don't forget version if it is 3.2v4 or newer. | ||
198 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
199 | ;; | ||
200 | -sco*) | ||
201 | os=-sco3.2v2 | ||
202 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
203 | ;; | ||
204 | -udk*) | ||
205 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
206 | ;; | ||
207 | -isc) | ||
208 | os=-isc2.2 | ||
209 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
210 | ;; | ||
211 | -clix*) | ||
212 | basic_machine=clipper-intergraph | ||
213 | ;; | ||
214 | -isc*) | ||
215 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
216 | ;; | ||
217 | -lynx*) | ||
218 | os=-lynxos | ||
219 | ;; | ||
220 | -ptx*) | ||
221 | basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` | ||
222 | ;; | ||
223 | -windowsnt*) | ||
224 | os=`echo $os | sed -e 's/windowsnt/winnt/'` | ||
225 | ;; | ||
226 | -psos*) | ||
227 | os=-psos | ||
228 | ;; | ||
229 | -mint | -mint[0-9]*) | ||
230 | basic_machine=m68k-atari | ||
231 | os=-mint | ||
232 | ;; | ||
233 | esac | ||
234 | |||
235 | # Decode aliases for certain CPU-COMPANY combinations. | ||
236 | case $basic_machine in | ||
237 | # Recognize the basic CPU types without company name. | ||
238 | # Some are omitted here because they have special meanings below. | ||
239 | 1750a | 580 \ | ||
240 | | a29k \ | ||
241 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | ||
242 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | ||
243 | | am33_2.0 \ | ||
244 | | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | ||
245 | | bfin \ | ||
246 | | c4x | clipper \ | ||
247 | | d10v | d30v | dlx | dsp16xx \ | ||
248 | | fr30 | frv \ | ||
249 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | ||
250 | | i370 | i860 | i960 | ia64 \ | ||
251 | | ip2k | iq2000 \ | ||
252 | | m32c | m32r | m32rle | m68000 | m68k | m88k \ | ||
253 | | maxq | mb | microblaze | mcore \ | ||
254 | | mips | mipsbe | mipseb | mipsel | mipsle \ | ||
255 | | mips16 \ | ||
256 | | mips64 | mips64el \ | ||
257 | | mips64vr | mips64vrel \ | ||
258 | | mips64orion | mips64orionel \ | ||
259 | | mips64vr4100 | mips64vr4100el \ | ||
260 | | mips64vr4300 | mips64vr4300el \ | ||
261 | | mips64vr5000 | mips64vr5000el \ | ||
262 | | mips64vr5900 | mips64vr5900el \ | ||
263 | | mipsisa32 | mipsisa32el \ | ||
264 | | mipsisa32r2 | mipsisa32r2el \ | ||
265 | | mipsisa64 | mipsisa64el \ | ||
266 | | mipsisa64r2 | mipsisa64r2el \ | ||
267 | | mipsisa64sb1 | mipsisa64sb1el \ | ||
268 | | mipsisa64sr71k | mipsisa64sr71kel \ | ||
269 | | mipstx39 | mipstx39el \ | ||
270 | | mn10200 | mn10300 \ | ||
271 | | mt \ | ||
272 | | msp430 \ | ||
273 | | nios | nios2 \ | ||
274 | | ns16k | ns32k \ | ||
275 | | or32 \ | ||
276 | | pdp10 | pdp11 | pj | pjl \ | ||
277 | | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | ||
278 | | pyramid \ | ||
279 | | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | ||
280 | | sh64 | sh64le \ | ||
281 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | ||
282 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | ||
283 | | spu | strongarm \ | ||
284 | | tahoe | thumb | tic4x | tic80 | tron \ | ||
285 | | v850 | v850e \ | ||
286 | | we32k \ | ||
287 | | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | ||
288 | | z8k) | ||
289 | basic_machine=$basic_machine-unknown | ||
290 | ;; | ||
291 | m6811 | m68hc11 | m6812 | m68hc12) | ||
292 | # Motorola 68HC11/12. | ||
293 | basic_machine=$basic_machine-unknown | ||
294 | os=-none | ||
295 | ;; | ||
296 | m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) | ||
297 | ;; | ||
298 | ms1) | ||
299 | basic_machine=mt-unknown | ||
300 | ;; | ||
301 | |||
302 | # We use `pc' rather than `unknown' | ||
303 | # because (1) that's what they normally are, and | ||
304 | # (2) the word "unknown" tends to confuse beginning users. | ||
305 | i*86 | x86_64) | ||
306 | basic_machine=$basic_machine-pc | ||
307 | ;; | ||
308 | # Object if more than one company name word. | ||
309 | *-*-*) | ||
310 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | ||
311 | exit 1 | ||
312 | ;; | ||
313 | # Recognize the basic CPU types with company name. | ||
314 | 580-* \ | ||
315 | | a29k-* \ | ||
316 | | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | ||
317 | | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | ||
318 | | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | ||
319 | | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | ||
320 | | avr-* | avr32-* \ | ||
321 | | bfin-* | bs2000-* \ | ||
322 | | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | ||
323 | | clipper-* | craynv-* | cydra-* \ | ||
324 | | d10v-* | d30v-* | dlx-* \ | ||
325 | | elxsi-* \ | ||
326 | | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | ||
327 | | h8300-* | h8500-* \ | ||
328 | | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | ||
329 | | i*86-* | i860-* | i960-* | ia64-* \ | ||
330 | | ip2k-* | iq2000-* \ | ||
331 | | m32c-* | m32r-* | m32rle-* \ | ||
332 | | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | ||
333 | | m88110-* | m88k-* | maxq-* | mcore-* \ | ||
334 | | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | ||
335 | | mips16-* \ | ||
336 | | mips64-* | mips64el-* \ | ||
337 | | mips64vr-* | mips64vrel-* \ | ||
338 | | mips64orion-* | mips64orionel-* \ | ||
339 | | mips64vr4100-* | mips64vr4100el-* \ | ||
340 | | mips64vr4300-* | mips64vr4300el-* \ | ||
341 | | mips64vr5000-* | mips64vr5000el-* \ | ||
342 | | mips64vr5900-* | mips64vr5900el-* \ | ||
343 | | mipsisa32-* | mipsisa32el-* \ | ||
344 | | mipsisa32r2-* | mipsisa32r2el-* \ | ||
345 | | mipsisa64-* | mipsisa64el-* \ | ||
346 | | mipsisa64r2-* | mipsisa64r2el-* \ | ||
347 | | mipsisa64sb1-* | mipsisa64sb1el-* \ | ||
348 | | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | ||
349 | | mipstx39-* | mipstx39el-* \ | ||
350 | | mmix-* \ | ||
351 | | mt-* \ | ||
352 | | msp430-* \ | ||
353 | | nios-* | nios2-* \ | ||
354 | | none-* | np1-* | ns16k-* | ns32k-* \ | ||
355 | | orion-* \ | ||
356 | | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | ||
357 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | ||
358 | | pyramid-* \ | ||
359 | | romp-* | rs6000-* \ | ||
360 | | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | ||
361 | | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | ||
362 | | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | ||
363 | | sparclite-* \ | ||
364 | | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | ||
365 | | tahoe-* | thumb-* \ | ||
366 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | ||
367 | | tron-* \ | ||
368 | | v850-* | v850e-* | vax-* \ | ||
369 | | we32k-* \ | ||
370 | | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | ||
371 | | xstormy16-* | xtensa-* \ | ||
372 | | ymp-* \ | ||
373 | | z8k-*) | ||
374 | ;; | ||
375 | # Recognize the various machine names and aliases which stand | ||
376 | # for a CPU type and a company and sometimes even an OS. | ||
377 | 386bsd) | ||
378 | basic_machine=i386-unknown | ||
379 | os=-bsd | ||
380 | ;; | ||
381 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) | ||
382 | basic_machine=m68000-att | ||
383 | ;; | ||
384 | 3b*) | ||
385 | basic_machine=we32k-att | ||
386 | ;; | ||
387 | a29khif) | ||
388 | basic_machine=a29k-amd | ||
389 | os=-udi | ||
390 | ;; | ||
391 | abacus) | ||
392 | basic_machine=abacus-unknown | ||
393 | ;; | ||
394 | adobe68k) | ||
395 | basic_machine=m68010-adobe | ||
396 | os=-scout | ||
397 | ;; | ||
398 | alliant | fx80) | ||
399 | basic_machine=fx80-alliant | ||
400 | ;; | ||
401 | altos | altos3068) | ||
402 | basic_machine=m68k-altos | ||
403 | ;; | ||
404 | am29k) | ||
405 | basic_machine=a29k-none | ||
406 | os=-bsd | ||
407 | ;; | ||
408 | amd64) | ||
409 | basic_machine=x86_64-pc | ||
410 | ;; | ||
411 | amd64-*) | ||
412 | basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
413 | ;; | ||
414 | amdahl) | ||
415 | basic_machine=580-amdahl | ||
416 | os=-sysv | ||
417 | ;; | ||
418 | amiga | amiga-*) | ||
419 | basic_machine=m68k-unknown | ||
420 | ;; | ||
421 | amigaos | amigados) | ||
422 | basic_machine=m68k-unknown | ||
423 | os=-amigaos | ||
424 | ;; | ||
425 | amigaunix | amix) | ||
426 | basic_machine=m68k-unknown | ||
427 | os=-sysv4 | ||
428 | ;; | ||
429 | apollo68) | ||
430 | basic_machine=m68k-apollo | ||
431 | os=-sysv | ||
432 | ;; | ||
433 | apollo68bsd) | ||
434 | basic_machine=m68k-apollo | ||
435 | os=-bsd | ||
436 | ;; | ||
437 | aux) | ||
438 | basic_machine=m68k-apple | ||
439 | os=-aux | ||
440 | ;; | ||
441 | balance) | ||
442 | basic_machine=ns32k-sequent | ||
443 | os=-dynix | ||
444 | ;; | ||
445 | c90) | ||
446 | basic_machine=c90-cray | ||
447 | os=-unicos | ||
448 | ;; | ||
449 | convex-c1) | ||
450 | basic_machine=c1-convex | ||
451 | os=-bsd | ||
452 | ;; | ||
453 | convex-c2) | ||
454 | basic_machine=c2-convex | ||
455 | os=-bsd | ||
456 | ;; | ||
457 | convex-c32) | ||
458 | basic_machine=c32-convex | ||
459 | os=-bsd | ||
460 | ;; | ||
461 | convex-c34) | ||
462 | basic_machine=c34-convex | ||
463 | os=-bsd | ||
464 | ;; | ||
465 | convex-c38) | ||
466 | basic_machine=c38-convex | ||
467 | os=-bsd | ||
468 | ;; | ||
469 | cray | j90) | ||
470 | basic_machine=j90-cray | ||
471 | os=-unicos | ||
472 | ;; | ||
473 | craynv) | ||
474 | basic_machine=craynv-cray | ||
475 | os=-unicosmp | ||
476 | ;; | ||
477 | cr16c) | ||
478 | basic_machine=cr16c-unknown | ||
479 | os=-elf | ||
480 | ;; | ||
481 | crds | unos) | ||
482 | basic_machine=m68k-crds | ||
483 | ;; | ||
484 | crisv32 | crisv32-* | etraxfs*) | ||
485 | basic_machine=crisv32-axis | ||
486 | ;; | ||
487 | cris | cris-* | etrax*) | ||
488 | basic_machine=cris-axis | ||
489 | ;; | ||
490 | crx) | ||
491 | basic_machine=crx-unknown | ||
492 | os=-elf | ||
493 | ;; | ||
494 | da30 | da30-*) | ||
495 | basic_machine=m68k-da30 | ||
496 | ;; | ||
497 | decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) | ||
498 | basic_machine=mips-dec | ||
499 | ;; | ||
500 | decsystem10* | dec10*) | ||
501 | basic_machine=pdp10-dec | ||
502 | os=-tops10 | ||
503 | ;; | ||
504 | decsystem20* | dec20*) | ||
505 | basic_machine=pdp10-dec | ||
506 | os=-tops20 | ||
507 | ;; | ||
508 | delta | 3300 | motorola-3300 | motorola-delta \ | ||
509 | | 3300-motorola | delta-motorola) | ||
510 | basic_machine=m68k-motorola | ||
511 | ;; | ||
512 | delta88) | ||
513 | basic_machine=m88k-motorola | ||
514 | os=-sysv3 | ||
515 | ;; | ||
516 | djgpp) | ||
517 | basic_machine=i586-pc | ||
518 | os=-msdosdjgpp | ||
519 | ;; | ||
520 | dpx20 | dpx20-*) | ||
521 | basic_machine=rs6000-bull | ||
522 | os=-bosx | ||
523 | ;; | ||
524 | dpx2* | dpx2*-bull) | ||
525 | basic_machine=m68k-bull | ||
526 | os=-sysv3 | ||
527 | ;; | ||
528 | ebmon29k) | ||
529 | basic_machine=a29k-amd | ||
530 | os=-ebmon | ||
531 | ;; | ||
532 | elxsi) | ||
533 | basic_machine=elxsi-elxsi | ||
534 | os=-bsd | ||
535 | ;; | ||
536 | encore | umax | mmax) | ||
537 | basic_machine=ns32k-encore | ||
538 | ;; | ||
539 | es1800 | OSE68k | ose68k | ose | OSE) | ||
540 | basic_machine=m68k-ericsson | ||
541 | os=-ose | ||
542 | ;; | ||
543 | fx2800) | ||
544 | basic_machine=i860-alliant | ||
545 | ;; | ||
546 | genix) | ||
547 | basic_machine=ns32k-ns | ||
548 | ;; | ||
549 | gmicro) | ||
550 | basic_machine=tron-gmicro | ||
551 | os=-sysv | ||
552 | ;; | ||
553 | go32) | ||
554 | basic_machine=i386-pc | ||
555 | os=-go32 | ||
556 | ;; | ||
557 | h3050r* | hiux*) | ||
558 | basic_machine=hppa1.1-hitachi | ||
559 | os=-hiuxwe2 | ||
560 | ;; | ||
561 | h8300hms) | ||
562 | basic_machine=h8300-hitachi | ||
563 | os=-hms | ||
564 | ;; | ||
565 | h8300xray) | ||
566 | basic_machine=h8300-hitachi | ||
567 | os=-xray | ||
568 | ;; | ||
569 | h8500hms) | ||
570 | basic_machine=h8500-hitachi | ||
571 | os=-hms | ||
572 | ;; | ||
573 | harris) | ||
574 | basic_machine=m88k-harris | ||
575 | os=-sysv3 | ||
576 | ;; | ||
577 | hp300-*) | ||
578 | basic_machine=m68k-hp | ||
579 | ;; | ||
580 | hp300bsd) | ||
581 | basic_machine=m68k-hp | ||
582 | os=-bsd | ||
583 | ;; | ||
584 | hp300hpux) | ||
585 | basic_machine=m68k-hp | ||
586 | os=-hpux | ||
587 | ;; | ||
588 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) | ||
589 | basic_machine=hppa1.0-hp | ||
590 | ;; | ||
591 | hp9k2[0-9][0-9] | hp9k31[0-9]) | ||
592 | basic_machine=m68000-hp | ||
593 | ;; | ||
594 | hp9k3[2-9][0-9]) | ||
595 | basic_machine=m68k-hp | ||
596 | ;; | ||
597 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) | ||
598 | basic_machine=hppa1.0-hp | ||
599 | ;; | ||
600 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) | ||
601 | basic_machine=hppa1.1-hp | ||
602 | ;; | ||
603 | hp9k78[0-9] | hp78[0-9]) | ||
604 | # FIXME: really hppa2.0-hp | ||
605 | basic_machine=hppa1.1-hp | ||
606 | ;; | ||
607 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) | ||
608 | # FIXME: really hppa2.0-hp | ||
609 | basic_machine=hppa1.1-hp | ||
610 | ;; | ||
611 | hp9k8[0-9][13679] | hp8[0-9][13679]) | ||
612 | basic_machine=hppa1.1-hp | ||
613 | ;; | ||
614 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) | ||
615 | basic_machine=hppa1.0-hp | ||
616 | ;; | ||
617 | hppa-next) | ||
618 | os=-nextstep3 | ||
619 | ;; | ||
620 | hppaosf) | ||
621 | basic_machine=hppa1.1-hp | ||
622 | os=-osf | ||
623 | ;; | ||
624 | hppro) | ||
625 | basic_machine=hppa1.1-hp | ||
626 | os=-proelf | ||
627 | ;; | ||
628 | i370-ibm* | ibm*) | ||
629 | basic_machine=i370-ibm | ||
630 | ;; | ||
631 | # I'm not sure what "Sysv32" means. Should this be sysv3.2? | ||
632 | i*86v32) | ||
633 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | ||
634 | os=-sysv32 | ||
635 | ;; | ||
636 | i*86v4*) | ||
637 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | ||
638 | os=-sysv4 | ||
639 | ;; | ||
640 | i*86v) | ||
641 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | ||
642 | os=-sysv | ||
643 | ;; | ||
644 | i*86sol2) | ||
645 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | ||
646 | os=-solaris2 | ||
647 | ;; | ||
648 | i386mach) | ||
649 | basic_machine=i386-mach | ||
650 | os=-mach | ||
651 | ;; | ||
652 | i386-vsta | vsta) | ||
653 | basic_machine=i386-unknown | ||
654 | os=-vsta | ||
655 | ;; | ||
656 | iris | iris4d) | ||
657 | basic_machine=mips-sgi | ||
658 | case $os in | ||
659 | -irix*) | ||
660 | ;; | ||
661 | *) | ||
662 | os=-irix4 | ||
663 | ;; | ||
664 | esac | ||
665 | ;; | ||
666 | isi68 | isi) | ||
667 | basic_machine=m68k-isi | ||
668 | os=-sysv | ||
669 | ;; | ||
670 | m88k-omron*) | ||
671 | basic_machine=m88k-omron | ||
672 | ;; | ||
673 | magnum | m3230) | ||
674 | basic_machine=mips-mips | ||
675 | os=-sysv | ||
676 | ;; | ||
677 | merlin) | ||
678 | basic_machine=ns32k-utek | ||
679 | os=-sysv | ||
680 | ;; | ||
681 | mingw32) | ||
682 | basic_machine=i386-pc | ||
683 | os=-mingw32 | ||
684 | ;; | ||
685 | miniframe) | ||
686 | basic_machine=m68000-convergent | ||
687 | ;; | ||
688 | *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) | ||
689 | basic_machine=m68k-atari | ||
690 | os=-mint | ||
691 | ;; | ||
692 | mips3*-*) | ||
693 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` | ||
694 | ;; | ||
695 | mips3*) | ||
696 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown | ||
697 | ;; | ||
698 | monitor) | ||
699 | basic_machine=m68k-rom68k | ||
700 | os=-coff | ||
701 | ;; | ||
702 | morphos) | ||
703 | basic_machine=powerpc-unknown | ||
704 | os=-morphos | ||
705 | ;; | ||
706 | msdos) | ||
707 | basic_machine=i386-pc | ||
708 | os=-msdos | ||
709 | ;; | ||
710 | ms1-*) | ||
711 | basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` | ||
712 | ;; | ||
713 | mvs) | ||
714 | basic_machine=i370-ibm | ||
715 | os=-mvs | ||
716 | ;; | ||
717 | ncr3000) | ||
718 | basic_machine=i486-ncr | ||
719 | os=-sysv4 | ||
720 | ;; | ||
721 | netbsd386) | ||
722 | basic_machine=i386-unknown | ||
723 | os=-netbsd | ||
724 | ;; | ||
725 | netwinder) | ||
726 | basic_machine=armv4l-rebel | ||
727 | os=-linux | ||
728 | ;; | ||
729 | news | news700 | news800 | news900) | ||
730 | basic_machine=m68k-sony | ||
731 | os=-newsos | ||
732 | ;; | ||
733 | news1000) | ||
734 | basic_machine=m68030-sony | ||
735 | os=-newsos | ||
736 | ;; | ||
737 | news-3600 | risc-news) | ||
738 | basic_machine=mips-sony | ||
739 | os=-newsos | ||
740 | ;; | ||
741 | necv70) | ||
742 | basic_machine=v70-nec | ||
743 | os=-sysv | ||
744 | ;; | ||
745 | next | m*-next ) | ||
746 | basic_machine=m68k-next | ||
747 | case $os in | ||
748 | -nextstep* ) | ||
749 | ;; | ||
750 | -ns2*) | ||
751 | os=-nextstep2 | ||
752 | ;; | ||
753 | *) | ||
754 | os=-nextstep3 | ||
755 | ;; | ||
756 | esac | ||
757 | ;; | ||
758 | nh3000) | ||
759 | basic_machine=m68k-harris | ||
760 | os=-cxux | ||
761 | ;; | ||
762 | nh[45]000) | ||
763 | basic_machine=m88k-harris | ||
764 | os=-cxux | ||
765 | ;; | ||
766 | nindy960) | ||
767 | basic_machine=i960-intel | ||
768 | os=-nindy | ||
769 | ;; | ||
770 | mon960) | ||
771 | basic_machine=i960-intel | ||
772 | os=-mon960 | ||
773 | ;; | ||
774 | nonstopux) | ||
775 | basic_machine=mips-compaq | ||
776 | os=-nonstopux | ||
777 | ;; | ||
778 | np1) | ||
779 | basic_machine=np1-gould | ||
780 | ;; | ||
781 | nsr-tandem) | ||
782 | basic_machine=nsr-tandem | ||
783 | ;; | ||
784 | op50n-* | op60c-*) | ||
785 | basic_machine=hppa1.1-oki | ||
786 | os=-proelf | ||
787 | ;; | ||
788 | openrisc | openrisc-*) | ||
789 | basic_machine=or32-unknown | ||
790 | ;; | ||
791 | os400) | ||
792 | basic_machine=powerpc-ibm | ||
793 | os=-os400 | ||
794 | ;; | ||
795 | OSE68000 | ose68000) | ||
796 | basic_machine=m68000-ericsson | ||
797 | os=-ose | ||
798 | ;; | ||
799 | os68k) | ||
800 | basic_machine=m68k-none | ||
801 | os=-os68k | ||
802 | ;; | ||
803 | pa-hitachi) | ||
804 | basic_machine=hppa1.1-hitachi | ||
805 | os=-hiuxwe2 | ||
806 | ;; | ||
807 | paragon) | ||
808 | basic_machine=i860-intel | ||
809 | os=-osf | ||
810 | ;; | ||
811 | pbd) | ||
812 | basic_machine=sparc-tti | ||
813 | ;; | ||
814 | pbb) | ||
815 | basic_machine=m68k-tti | ||
816 | ;; | ||
817 | pc532 | pc532-*) | ||
818 | basic_machine=ns32k-pc532 | ||
819 | ;; | ||
820 | pc98) | ||
821 | basic_machine=i386-pc | ||
822 | ;; | ||
823 | pc98-*) | ||
824 | basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
825 | ;; | ||
826 | pentium | p5 | k5 | k6 | nexgen | viac3) | ||
827 | basic_machine=i586-pc | ||
828 | ;; | ||
829 | pentiumpro | p6 | 6x86 | athlon | athlon_*) | ||
830 | basic_machine=i686-pc | ||
831 | ;; | ||
832 | pentiumii | pentium2 | pentiumiii | pentium3) | ||
833 | basic_machine=i686-pc | ||
834 | ;; | ||
835 | pentium4) | ||
836 | basic_machine=i786-pc | ||
837 | ;; | ||
838 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | ||
839 | basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
840 | ;; | ||
841 | pentiumpro-* | p6-* | 6x86-* | athlon-*) | ||
842 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
843 | ;; | ||
844 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | ||
845 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
846 | ;; | ||
847 | pentium4-*) | ||
848 | basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
849 | ;; | ||
850 | pn) | ||
851 | basic_machine=pn-gould | ||
852 | ;; | ||
853 | power) basic_machine=power-ibm | ||
854 | ;; | ||
855 | ppc) basic_machine=powerpc-unknown | ||
856 | ;; | ||
857 | ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
858 | ;; | ||
859 | ppcle | powerpclittle | ppc-le | powerpc-little) | ||
860 | basic_machine=powerpcle-unknown | ||
861 | ;; | ||
862 | ppcle-* | powerpclittle-*) | ||
863 | basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
864 | ;; | ||
865 | ppc64) basic_machine=powerpc64-unknown | ||
866 | ;; | ||
867 | ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
868 | ;; | ||
869 | ppc64le | powerpc64little | ppc64-le | powerpc64-little) | ||
870 | basic_machine=powerpc64le-unknown | ||
871 | ;; | ||
872 | ppc64le-* | powerpc64little-*) | ||
873 | basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
874 | ;; | ||
875 | ps2) | ||
876 | basic_machine=i386-ibm | ||
877 | ;; | ||
878 | pw32) | ||
879 | basic_machine=i586-unknown | ||
880 | os=-pw32 | ||
881 | ;; | ||
882 | rdos) | ||
883 | basic_machine=i386-pc | ||
884 | os=-rdos | ||
885 | ;; | ||
886 | rom68k) | ||
887 | basic_machine=m68k-rom68k | ||
888 | os=-coff | ||
889 | ;; | ||
890 | rm[46]00) | ||
891 | basic_machine=mips-siemens | ||
892 | ;; | ||
893 | rtpc | rtpc-*) | ||
894 | basic_machine=romp-ibm | ||
895 | ;; | ||
896 | s390 | s390-*) | ||
897 | basic_machine=s390-ibm | ||
898 | ;; | ||
899 | s390x | s390x-*) | ||
900 | basic_machine=s390x-ibm | ||
901 | ;; | ||
902 | sa29200) | ||
903 | basic_machine=a29k-amd | ||
904 | os=-udi | ||
905 | ;; | ||
906 | sb1) | ||
907 | basic_machine=mipsisa64sb1-unknown | ||
908 | ;; | ||
909 | sb1el) | ||
910 | basic_machine=mipsisa64sb1el-unknown | ||
911 | ;; | ||
912 | sei) | ||
913 | basic_machine=mips-sei | ||
914 | os=-seiux | ||
915 | ;; | ||
916 | sequent) | ||
917 | basic_machine=i386-sequent | ||
918 | ;; | ||
919 | sh) | ||
920 | basic_machine=sh-hitachi | ||
921 | os=-hms | ||
922 | ;; | ||
923 | sh64) | ||
924 | basic_machine=sh64-unknown | ||
925 | ;; | ||
926 | sparclite-wrs | simso-wrs) | ||
927 | basic_machine=sparclite-wrs | ||
928 | os=-vxworks | ||
929 | ;; | ||
930 | sps7) | ||
931 | basic_machine=m68k-bull | ||
932 | os=-sysv2 | ||
933 | ;; | ||
934 | spur) | ||
935 | basic_machine=spur-unknown | ||
936 | ;; | ||
937 | st2000) | ||
938 | basic_machine=m68k-tandem | ||
939 | ;; | ||
940 | stratus) | ||
941 | basic_machine=i860-stratus | ||
942 | os=-sysv4 | ||
943 | ;; | ||
944 | sun2) | ||
945 | basic_machine=m68000-sun | ||
946 | ;; | ||
947 | sun2os3) | ||
948 | basic_machine=m68000-sun | ||
949 | os=-sunos3 | ||
950 | ;; | ||
951 | sun2os4) | ||
952 | basic_machine=m68000-sun | ||
953 | os=-sunos4 | ||
954 | ;; | ||
955 | sun3os3) | ||
956 | basic_machine=m68k-sun | ||
957 | os=-sunos3 | ||
958 | ;; | ||
959 | sun3os4) | ||
960 | basic_machine=m68k-sun | ||
961 | os=-sunos4 | ||
962 | ;; | ||
963 | sun4os3) | ||
964 | basic_machine=sparc-sun | ||
965 | os=-sunos3 | ||
966 | ;; | ||
967 | sun4os4) | ||
968 | basic_machine=sparc-sun | ||
969 | os=-sunos4 | ||
970 | ;; | ||
971 | sun4sol2) | ||
972 | basic_machine=sparc-sun | ||
973 | os=-solaris2 | ||
974 | ;; | ||
975 | sun3 | sun3-*) | ||
976 | basic_machine=m68k-sun | ||
977 | ;; | ||
978 | sun4) | ||
979 | basic_machine=sparc-sun | ||
980 | ;; | ||
981 | sun386 | sun386i | roadrunner) | ||
982 | basic_machine=i386-sun | ||
983 | ;; | ||
984 | sv1) | ||
985 | basic_machine=sv1-cray | ||
986 | os=-unicos | ||
987 | ;; | ||
988 | symmetry) | ||
989 | basic_machine=i386-sequent | ||
990 | os=-dynix | ||
991 | ;; | ||
992 | t3e) | ||
993 | basic_machine=alphaev5-cray | ||
994 | os=-unicos | ||
995 | ;; | ||
996 | t90) | ||
997 | basic_machine=t90-cray | ||
998 | os=-unicos | ||
999 | ;; | ||
1000 | tic54x | c54x*) | ||
1001 | basic_machine=tic54x-unknown | ||
1002 | os=-coff | ||
1003 | ;; | ||
1004 | tic55x | c55x*) | ||
1005 | basic_machine=tic55x-unknown | ||
1006 | os=-coff | ||
1007 | ;; | ||
1008 | tic6x | c6x*) | ||
1009 | basic_machine=tic6x-unknown | ||
1010 | os=-coff | ||
1011 | ;; | ||
1012 | tx39) | ||
1013 | basic_machine=mipstx39-unknown | ||
1014 | ;; | ||
1015 | tx39el) | ||
1016 | basic_machine=mipstx39el-unknown | ||
1017 | ;; | ||
1018 | toad1) | ||
1019 | basic_machine=pdp10-xkl | ||
1020 | os=-tops20 | ||
1021 | ;; | ||
1022 | tower | tower-32) | ||
1023 | basic_machine=m68k-ncr | ||
1024 | ;; | ||
1025 | tpf) | ||
1026 | basic_machine=s390x-ibm | ||
1027 | os=-tpf | ||
1028 | ;; | ||
1029 | udi29k) | ||
1030 | basic_machine=a29k-amd | ||
1031 | os=-udi | ||
1032 | ;; | ||
1033 | ultra3) | ||
1034 | basic_machine=a29k-nyu | ||
1035 | os=-sym1 | ||
1036 | ;; | ||
1037 | v810 | necv810) | ||
1038 | basic_machine=v810-nec | ||
1039 | os=-none | ||
1040 | ;; | ||
1041 | vaxv) | ||
1042 | basic_machine=vax-dec | ||
1043 | os=-sysv | ||
1044 | ;; | ||
1045 | vms) | ||
1046 | basic_machine=vax-dec | ||
1047 | os=-vms | ||
1048 | ;; | ||
1049 | vpp*|vx|vx-*) | ||
1050 | basic_machine=f301-fujitsu | ||
1051 | ;; | ||
1052 | vxworks960) | ||
1053 | basic_machine=i960-wrs | ||
1054 | os=-vxworks | ||
1055 | ;; | ||
1056 | vxworks68) | ||
1057 | basic_machine=m68k-wrs | ||
1058 | os=-vxworks | ||
1059 | ;; | ||
1060 | vxworks29k) | ||
1061 | basic_machine=a29k-wrs | ||
1062 | os=-vxworks | ||
1063 | ;; | ||
1064 | w65*) | ||
1065 | basic_machine=w65-wdc | ||
1066 | os=-none | ||
1067 | ;; | ||
1068 | w89k-*) | ||
1069 | basic_machine=hppa1.1-winbond | ||
1070 | os=-proelf | ||
1071 | ;; | ||
1072 | xbox) | ||
1073 | basic_machine=i686-pc | ||
1074 | os=-mingw32 | ||
1075 | ;; | ||
1076 | xps | xps100) | ||
1077 | basic_machine=xps100-honeywell | ||
1078 | ;; | ||
1079 | ymp) | ||
1080 | basic_machine=ymp-cray | ||
1081 | os=-unicos | ||
1082 | ;; | ||
1083 | z8k-*-coff) | ||
1084 | basic_machine=z8k-unknown | ||
1085 | os=-sim | ||
1086 | ;; | ||
1087 | none) | ||
1088 | basic_machine=none-none | ||
1089 | os=-none | ||
1090 | ;; | ||
1091 | |||
1092 | # Here we handle the default manufacturer of certain CPU types. It is in | ||
1093 | # some cases the only manufacturer, in others, it is the most popular. | ||
1094 | w89k) | ||
1095 | basic_machine=hppa1.1-winbond | ||
1096 | ;; | ||
1097 | op50n) | ||
1098 | basic_machine=hppa1.1-oki | ||
1099 | ;; | ||
1100 | op60c) | ||
1101 | basic_machine=hppa1.1-oki | ||
1102 | ;; | ||
1103 | romp) | ||
1104 | basic_machine=romp-ibm | ||
1105 | ;; | ||
1106 | mmix) | ||
1107 | basic_machine=mmix-knuth | ||
1108 | ;; | ||
1109 | rs6000) | ||
1110 | basic_machine=rs6000-ibm | ||
1111 | ;; | ||
1112 | vax) | ||
1113 | basic_machine=vax-dec | ||
1114 | ;; | ||
1115 | pdp10) | ||
1116 | # there are many clones, so DEC is not a safe bet | ||
1117 | basic_machine=pdp10-unknown | ||
1118 | ;; | ||
1119 | pdp11) | ||
1120 | basic_machine=pdp11-dec | ||
1121 | ;; | ||
1122 | we32k) | ||
1123 | basic_machine=we32k-att | ||
1124 | ;; | ||
1125 | sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) | ||
1126 | basic_machine=sh-unknown | ||
1127 | ;; | ||
1128 | sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) | ||
1129 | basic_machine=sparc-sun | ||
1130 | ;; | ||
1131 | cydra) | ||
1132 | basic_machine=cydra-cydrome | ||
1133 | ;; | ||
1134 | orion) | ||
1135 | basic_machine=orion-highlevel | ||
1136 | ;; | ||
1137 | orion105) | ||
1138 | basic_machine=clipper-highlevel | ||
1139 | ;; | ||
1140 | mac | mpw | mac-mpw) | ||
1141 | basic_machine=m68k-apple | ||
1142 | ;; | ||
1143 | pmac | pmac-mpw) | ||
1144 | basic_machine=powerpc-apple | ||
1145 | ;; | ||
1146 | *-unknown) | ||
1147 | # Make sure to match an already-canonicalized machine name. | ||
1148 | ;; | ||
1149 | *) | ||
1150 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | ||
1151 | exit 1 | ||
1152 | ;; | ||
1153 | esac | ||
1154 | |||
1155 | # Here we canonicalize certain aliases for manufacturers. | ||
1156 | case $basic_machine in | ||
1157 | *-digital*) | ||
1158 | basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` | ||
1159 | ;; | ||
1160 | *-commodore*) | ||
1161 | basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` | ||
1162 | ;; | ||
1163 | *) | ||
1164 | ;; | ||
1165 | esac | ||
1166 | |||
1167 | # Decode manufacturer-specific aliases for certain operating systems. | ||
1168 | |||
1169 | if [ x"$os" != x"" ] | ||
1170 | then | ||
1171 | case $os in | ||
1172 | # First match some system type aliases | ||
1173 | # that might get confused with valid system types. | ||
1174 | # -solaris* is a basic system type, with this one exception. | ||
1175 | -solaris1 | -solaris1.*) | ||
1176 | os=`echo $os | sed -e 's|solaris1|sunos4|'` | ||
1177 | ;; | ||
1178 | -solaris) | ||
1179 | os=-solaris2 | ||
1180 | ;; | ||
1181 | -svr4*) | ||
1182 | os=-sysv4 | ||
1183 | ;; | ||
1184 | -unixware*) | ||
1185 | os=-sysv4.2uw | ||
1186 | ;; | ||
1187 | -gnu/linux*) | ||
1188 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` | ||
1189 | ;; | ||
1190 | # First accept the basic system types. | ||
1191 | # The portable systems comes first. | ||
1192 | # Each alternative MUST END IN A *, to match a version number. | ||
1193 | # -sysv* is not here because it comes later, after sysvr4. | ||
1194 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | ||
1195 | | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | ||
1196 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | ||
1197 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | ||
1198 | | -aos* \ | ||
1199 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | ||
1200 | | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | ||
1201 | | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | ||
1202 | | -openbsd* | -solidbsd* \ | ||
1203 | | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | ||
1204 | | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | ||
1205 | | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | ||
1206 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | ||
1207 | | -chorusos* | -chorusrdb* \ | ||
1208 | | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | ||
1209 | | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | ||
1210 | | -uxpv* | -beos* | -mpeix* | -udk* \ | ||
1211 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | ||
1212 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | ||
1213 | | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | ||
1214 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | ||
1215 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | ||
1216 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | ||
1217 | | -skyos* | -haiku* | -rdos* | -toppers*) | ||
1218 | # Remember, each alternative MUST END IN *, to match a version number. | ||
1219 | ;; | ||
1220 | -qnx*) | ||
1221 | case $basic_machine in | ||
1222 | x86-* | i*86-*) | ||
1223 | ;; | ||
1224 | *) | ||
1225 | os=-nto$os | ||
1226 | ;; | ||
1227 | esac | ||
1228 | ;; | ||
1229 | -nto-qnx*) | ||
1230 | ;; | ||
1231 | -nto*) | ||
1232 | os=`echo $os | sed -e 's|nto|nto-qnx|'` | ||
1233 | ;; | ||
1234 | -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | ||
1235 | | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | ||
1236 | | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) | ||
1237 | ;; | ||
1238 | -mac*) | ||
1239 | os=`echo $os | sed -e 's|mac|macos|'` | ||
1240 | ;; | ||
1241 | -linux-dietlibc) | ||
1242 | os=-linux-dietlibc | ||
1243 | ;; | ||
1244 | -linux*) | ||
1245 | os=`echo $os | sed -e 's|linux|linux-gnu|'` | ||
1246 | ;; | ||
1247 | -sunos5*) | ||
1248 | os=`echo $os | sed -e 's|sunos5|solaris2|'` | ||
1249 | ;; | ||
1250 | -sunos6*) | ||
1251 | os=`echo $os | sed -e 's|sunos6|solaris3|'` | ||
1252 | ;; | ||
1253 | -opened*) | ||
1254 | os=-openedition | ||
1255 | ;; | ||
1256 | -os400*) | ||
1257 | os=-os400 | ||
1258 | ;; | ||
1259 | -wince*) | ||
1260 | os=-wince | ||
1261 | ;; | ||
1262 | -osfrose*) | ||
1263 | os=-osfrose | ||
1264 | ;; | ||
1265 | -osf*) | ||
1266 | os=-osf | ||
1267 | ;; | ||
1268 | -utek*) | ||
1269 | os=-bsd | ||
1270 | ;; | ||
1271 | -dynix*) | ||
1272 | os=-bsd | ||
1273 | ;; | ||
1274 | -acis*) | ||
1275 | os=-aos | ||
1276 | ;; | ||
1277 | -atheos*) | ||
1278 | os=-atheos | ||
1279 | ;; | ||
1280 | -syllable*) | ||
1281 | os=-syllable | ||
1282 | ;; | ||
1283 | -386bsd) | ||
1284 | os=-bsd | ||
1285 | ;; | ||
1286 | -ctix* | -uts*) | ||
1287 | os=-sysv | ||
1288 | ;; | ||
1289 | -nova*) | ||
1290 | os=-rtmk-nova | ||
1291 | ;; | ||
1292 | -ns2 ) | ||
1293 | os=-nextstep2 | ||
1294 | ;; | ||
1295 | -nsk*) | ||
1296 | os=-nsk | ||
1297 | ;; | ||
1298 | # Preserve the version number of sinix5. | ||
1299 | -sinix5.*) | ||
1300 | os=`echo $os | sed -e 's|sinix|sysv|'` | ||
1301 | ;; | ||
1302 | -sinix*) | ||
1303 | os=-sysv4 | ||
1304 | ;; | ||
1305 | -tpf*) | ||
1306 | os=-tpf | ||
1307 | ;; | ||
1308 | -triton*) | ||
1309 | os=-sysv3 | ||
1310 | ;; | ||
1311 | -oss*) | ||
1312 | os=-sysv3 | ||
1313 | ;; | ||
1314 | -svr4) | ||
1315 | os=-sysv4 | ||
1316 | ;; | ||
1317 | -svr3) | ||
1318 | os=-sysv3 | ||
1319 | ;; | ||
1320 | -sysvr4) | ||
1321 | os=-sysv4 | ||
1322 | ;; | ||
1323 | # This must come after -sysvr4. | ||
1324 | -sysv*) | ||
1325 | ;; | ||
1326 | -ose*) | ||
1327 | os=-ose | ||
1328 | ;; | ||
1329 | -es1800*) | ||
1330 | os=-ose | ||
1331 | ;; | ||
1332 | -xenix) | ||
1333 | os=-xenix | ||
1334 | ;; | ||
1335 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | ||
1336 | os=-mint | ||
1337 | ;; | ||
1338 | -aros*) | ||
1339 | os=-aros | ||
1340 | ;; | ||
1341 | -kaos*) | ||
1342 | os=-kaos | ||
1343 | ;; | ||
1344 | -zvmoe) | ||
1345 | os=-zvmoe | ||
1346 | ;; | ||
1347 | -none) | ||
1348 | ;; | ||
1349 | *) | ||
1350 | # Get rid of the `-' at the beginning of $os. | ||
1351 | os=`echo $os | sed 's/[^-]*-//'` | ||
1352 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 | ||
1353 | exit 1 | ||
1354 | ;; | ||
1355 | esac | ||
1356 | else | ||
1357 | |||
1358 | # Here we handle the default operating systems that come with various machines. | ||
1359 | # The value should be what the vendor currently ships out the door with their | ||
1360 | # machine or put another way, the most popular os provided with the machine. | ||
1361 | |||
1362 | # Note that if you're going to try to match "-MANUFACTURER" here (say, | ||
1363 | # "-sun"), then you have to tell the case statement up towards the top | ||
1364 | # that MANUFACTURER isn't an operating system. Otherwise, code above | ||
1365 | # will signal an error saying that MANUFACTURER isn't an operating | ||
1366 | # system, and we'll never get to this point. | ||
1367 | |||
1368 | case $basic_machine in | ||
1369 | spu-*) | ||
1370 | os=-elf | ||
1371 | ;; | ||
1372 | *-acorn) | ||
1373 | os=-riscix1.2 | ||
1374 | ;; | ||
1375 | arm*-rebel) | ||
1376 | os=-linux | ||
1377 | ;; | ||
1378 | arm*-semi) | ||
1379 | os=-aout | ||
1380 | ;; | ||
1381 | c4x-* | tic4x-*) | ||
1382 | os=-coff | ||
1383 | ;; | ||
1384 | # This must come before the *-dec entry. | ||
1385 | pdp10-*) | ||
1386 | os=-tops20 | ||
1387 | ;; | ||
1388 | pdp11-*) | ||
1389 | os=-none | ||
1390 | ;; | ||
1391 | *-dec | vax-*) | ||
1392 | os=-ultrix4.2 | ||
1393 | ;; | ||
1394 | m68*-apollo) | ||
1395 | os=-domain | ||
1396 | ;; | ||
1397 | i386-sun) | ||
1398 | os=-sunos4.0.2 | ||
1399 | ;; | ||
1400 | m68000-sun) | ||
1401 | os=-sunos3 | ||
1402 | # This also exists in the configure program, but was not the | ||
1403 | # default. | ||
1404 | # os=-sunos4 | ||
1405 | ;; | ||
1406 | m68*-cisco) | ||
1407 | os=-aout | ||
1408 | ;; | ||
1409 | mips*-cisco) | ||
1410 | os=-elf | ||
1411 | ;; | ||
1412 | mips*-*) | ||
1413 | os=-elf | ||
1414 | ;; | ||
1415 | or32-*) | ||
1416 | os=-coff | ||
1417 | ;; | ||
1418 | *-tti) # must be before sparc entry or we get the wrong os. | ||
1419 | os=-sysv3 | ||
1420 | ;; | ||
1421 | sparc-* | *-sun) | ||
1422 | os=-sunos4.1.1 | ||
1423 | ;; | ||
1424 | *-be) | ||
1425 | os=-beos | ||
1426 | ;; | ||
1427 | *-haiku) | ||
1428 | os=-haiku | ||
1429 | ;; | ||
1430 | *-ibm) | ||
1431 | os=-aix | ||
1432 | ;; | ||
1433 | *-knuth) | ||
1434 | os=-mmixware | ||
1435 | ;; | ||
1436 | *-wec) | ||
1437 | os=-proelf | ||
1438 | ;; | ||
1439 | *-winbond) | ||
1440 | os=-proelf | ||
1441 | ;; | ||
1442 | *-oki) | ||
1443 | os=-proelf | ||
1444 | ;; | ||
1445 | *-hp) | ||
1446 | os=-hpux | ||
1447 | ;; | ||
1448 | *-hitachi) | ||
1449 | os=-hiux | ||
1450 | ;; | ||
1451 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) | ||
1452 | os=-sysv | ||
1453 | ;; | ||
1454 | *-cbm) | ||
1455 | os=-amigaos | ||
1456 | ;; | ||
1457 | *-dg) | ||
1458 | os=-dgux | ||
1459 | ;; | ||
1460 | *-dolphin) | ||
1461 | os=-sysv3 | ||
1462 | ;; | ||
1463 | m68k-ccur) | ||
1464 | os=-rtu | ||
1465 | ;; | ||
1466 | m88k-omron*) | ||
1467 | os=-luna | ||
1468 | ;; | ||
1469 | *-next ) | ||
1470 | os=-nextstep | ||
1471 | ;; | ||
1472 | *-sequent) | ||
1473 | os=-ptx | ||
1474 | ;; | ||
1475 | *-crds) | ||
1476 | os=-unos | ||
1477 | ;; | ||
1478 | *-ns) | ||
1479 | os=-genix | ||
1480 | ;; | ||
1481 | i370-*) | ||
1482 | os=-mvs | ||
1483 | ;; | ||
1484 | *-next) | ||
1485 | os=-nextstep3 | ||
1486 | ;; | ||
1487 | *-gould) | ||
1488 | os=-sysv | ||
1489 | ;; | ||
1490 | *-highlevel) | ||
1491 | os=-bsd | ||
1492 | ;; | ||
1493 | *-encore) | ||
1494 | os=-bsd | ||
1495 | ;; | ||
1496 | *-sgi) | ||
1497 | os=-irix | ||
1498 | ;; | ||
1499 | *-siemens) | ||
1500 | os=-sysv4 | ||
1501 | ;; | ||
1502 | *-masscomp) | ||
1503 | os=-rtu | ||
1504 | ;; | ||
1505 | f30[01]-fujitsu | f700-fujitsu) | ||
1506 | os=-uxpv | ||
1507 | ;; | ||
1508 | *-rom68k) | ||
1509 | os=-coff | ||
1510 | ;; | ||
1511 | *-*bug) | ||
1512 | os=-coff | ||
1513 | ;; | ||
1514 | *-apple) | ||
1515 | os=-macos | ||
1516 | ;; | ||
1517 | *-atari*) | ||
1518 | os=-mint | ||
1519 | ;; | ||
1520 | *) | ||
1521 | os=-none | ||
1522 | ;; | ||
1523 | esac | ||
1524 | fi | ||
1525 | |||
1526 | # Here we handle the case where we know the os, and the CPU type, but not the | ||
1527 | # manufacturer. We pick the logical manufacturer. | ||
1528 | vendor=unknown | ||
1529 | case $basic_machine in | ||
1530 | *-unknown) | ||
1531 | case $os in | ||
1532 | -riscix*) | ||
1533 | vendor=acorn | ||
1534 | ;; | ||
1535 | -sunos*) | ||
1536 | vendor=sun | ||
1537 | ;; | ||
1538 | -aix*) | ||
1539 | vendor=ibm | ||
1540 | ;; | ||
1541 | -beos*) | ||
1542 | vendor=be | ||
1543 | ;; | ||
1544 | -hpux*) | ||
1545 | vendor=hp | ||
1546 | ;; | ||
1547 | -mpeix*) | ||
1548 | vendor=hp | ||
1549 | ;; | ||
1550 | -hiux*) | ||
1551 | vendor=hitachi | ||
1552 | ;; | ||
1553 | -unos*) | ||
1554 | vendor=crds | ||
1555 | ;; | ||
1556 | -dgux*) | ||
1557 | vendor=dg | ||
1558 | ;; | ||
1559 | -luna*) | ||
1560 | vendor=omron | ||
1561 | ;; | ||
1562 | -genix*) | ||
1563 | vendor=ns | ||
1564 | ;; | ||
1565 | -mvs* | -opened*) | ||
1566 | vendor=ibm | ||
1567 | ;; | ||
1568 | -os400*) | ||
1569 | vendor=ibm | ||
1570 | ;; | ||
1571 | -ptx*) | ||
1572 | vendor=sequent | ||
1573 | ;; | ||
1574 | -tpf*) | ||
1575 | vendor=ibm | ||
1576 | ;; | ||
1577 | -vxsim* | -vxworks* | -windiss*) | ||
1578 | vendor=wrs | ||
1579 | ;; | ||
1580 | -aux*) | ||
1581 | vendor=apple | ||
1582 | ;; | ||
1583 | -hms*) | ||
1584 | vendor=hitachi | ||
1585 | ;; | ||
1586 | -mpw* | -macos*) | ||
1587 | vendor=apple | ||
1588 | ;; | ||
1589 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | ||
1590 | vendor=atari | ||
1591 | ;; | ||
1592 | -vos*) | ||
1593 | vendor=stratus | ||
1594 | ;; | ||
1595 | esac | ||
1596 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | ||
1597 | ;; | ||
1598 | esac | ||
1599 | |||
1600 | echo $basic_machine$os | ||
1601 | exit | ||
1602 | |||
1603 | # Local variables: | ||
1604 | # eval: (add-hook 'write-file-hooks 'time-stamp) | ||
1605 | # time-stamp-start: "timestamp='" | ||
1606 | # time-stamp-format: "%:y-%02m-%02d" | ||
1607 | # time-stamp-end: "'" | ||
1608 | # End: | ||
diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 39fed6af..00000000 --- a/configure.ac +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | dnl Process this file with autoconf to produce a configure script. | ||
2 | AC_INIT([libwebserver],[0.5.3-GNUnet],[bug-gnunet@gnu.org]) | ||
3 | AM_INIT_AUTOMAKE([libwebserver], [0.5.3-GNUnet]) | ||
4 | AC_CONFIG_HEADER([config.h]) | ||
5 | |||
6 | AC_PROG_CC | ||
7 | AC_PROG_MAKE_SET | ||
8 | AC_PROG_INSTALL | ||
9 | AC_DISABLE_STATIC | ||
10 | AC_PROG_LIBTOOL | ||
11 | |||
12 | AC_HEADER_STDC | ||
13 | AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netinet/in.h stddef.h stdlib.h string.h sys/socket.h sys/time.h unistd.h]) | ||
14 | |||
15 | # Checks for typedefs, structures, and compiler characteristics. | ||
16 | AC_C_CONST | ||
17 | AC_TYPE_SIZE_T | ||
18 | AC_HEADER_TIME | ||
19 | AC_STRUCT_TM | ||
20 | |||
21 | # Checks for library functions. | ||
22 | AC_FUNC_MEMCMP | ||
23 | AC_TYPE_SIGNAL | ||
24 | AC_FUNC_STRFTIME | ||
25 | AC_FUNC_VPRINTF | ||
26 | AC_CHECK_FUNCS([inet_ntoa memset select socket strchr strerror strncasecmp strstr strtol]) | ||
27 | |||
28 | AC_SUBST(INCLUDE) | ||
29 | AC_SUBST(LIBDIR) | ||
30 | AC_SUBST(LIBS) | ||
31 | |||
32 | AC_CONFIG_FILES([Makefile | ||
33 | src/Makefile | ||
34 | include/Makefile | ||
35 | ]) | ||
36 | AC_OUTPUT | ||
diff --git a/ltmain.sh b/ltmain.sh deleted file mode 100755 index c715b594..00000000 --- a/ltmain.sh +++ /dev/null | |||
@@ -1,6871 +0,0 @@ | |||
1 | # ltmain.sh - Provide generalized library-building support services. | ||
2 | # NOTE: Changing this file will not affect anything until you rerun configure. | ||
3 | # | ||
4 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 | ||
5 | # Free Software Foundation, Inc. | ||
6 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | ||
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 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 02110-1301, USA. | ||
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 | basename="s,^.*/,,g" | ||
28 | |||
29 | # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh | ||
30 | # is ksh but when the shell is invoked as "sh" and the current value of | ||
31 | # the _XPG environment variable is not equal to 1 (one), the special | ||
32 | # positional parameter $0, within a function call, is the name of the | ||
33 | # function. | ||
34 | progpath="$0" | ||
35 | |||
36 | # The name of this program: | ||
37 | progname=`echo "$progpath" | $SED $basename` | ||
38 | modename="$progname" | ||
39 | |||
40 | # Global variables: | ||
41 | EXIT_SUCCESS=0 | ||
42 | EXIT_FAILURE=1 | ||
43 | |||
44 | PROGRAM=ltmain.sh | ||
45 | PACKAGE=libtool | ||
46 | VERSION="1.5.22 Debian 1.5.22-4" | ||
47 | TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" | ||
48 | |||
49 | # See if we are running on zsh, and set the options which allow our | ||
50 | # commands through without removal of \ escapes. | ||
51 | if test -n "${ZSH_VERSION+set}" ; then | ||
52 | setopt NO_GLOB_SUBST | ||
53 | fi | ||
54 | |||
55 | # Check that we have a working $echo. | ||
56 | if test "X$1" = X--no-reexec; then | ||
57 | # Discard the --no-reexec flag, and continue. | ||
58 | shift | ||
59 | elif test "X$1" = X--fallback-echo; then | ||
60 | # Avoid inline document here, it may be left over | ||
61 | : | ||
62 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then | ||
63 | # Yippee, $echo works! | ||
64 | : | ||
65 | else | ||
66 | # Restart under the correct shell, and then maybe $echo will work. | ||
67 | exec $SHELL "$progpath" --no-reexec ${1+"$@"} | ||
68 | fi | ||
69 | |||
70 | if test "X$1" = X--fallback-echo; then | ||
71 | # used as fallback echo | ||
72 | shift | ||
73 | cat <<EOF | ||
74 | $* | ||
75 | EOF | ||
76 | exit $EXIT_SUCCESS | ||
77 | fi | ||
78 | |||
79 | default_mode= | ||
80 | help="Try \`$progname --help' for more information." | ||
81 | magic="%%%MAGIC variable%%%" | ||
82 | mkdir="mkdir" | ||
83 | mv="mv -f" | ||
84 | rm="rm -f" | ||
85 | |||
86 | # Sed substitution that helps us do robust quoting. It backslashifies | ||
87 | # metacharacters that are still active within double-quoted strings. | ||
88 | Xsed="${SED}"' -e 1s/^X//' | ||
89 | sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' | ||
90 | # test EBCDIC or ASCII | ||
91 | case `echo X|tr X '\101'` in | ||
92 | A) # ASCII based system | ||
93 | # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr | ||
94 | SP2NL='tr \040 \012' | ||
95 | NL2SP='tr \015\012 \040\040' | ||
96 | ;; | ||
97 | *) # EBCDIC based system | ||
98 | SP2NL='tr \100 \n' | ||
99 | NL2SP='tr \r\n \100\100' | ||
100 | ;; | ||
101 | esac | ||
102 | |||
103 | # NLS nuisances. | ||
104 | # Only set LANG and LC_ALL to C if already set. | ||
105 | # These must not be set unconditionally because not all systems understand | ||
106 | # e.g. LANG=C (notably SCO). | ||
107 | # We save the old values to restore during execute mode. | ||
108 | if test "${LC_ALL+set}" = set; then | ||
109 | save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL | ||
110 | fi | ||
111 | if test "${LANG+set}" = set; then | ||
112 | save_LANG="$LANG"; LANG=C; export LANG | ||
113 | fi | ||
114 | |||
115 | # Make sure IFS has a sensible default | ||
116 | lt_nl=' | ||
117 | ' | ||
118 | IFS=" $lt_nl" | ||
119 | |||
120 | if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then | ||
121 | $echo "$modename: not configured to build any kind of library" 1>&2 | ||
122 | $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 | ||
123 | exit $EXIT_FAILURE | ||
124 | fi | ||
125 | |||
126 | # Global variables. | ||
127 | mode=$default_mode | ||
128 | nonopt= | ||
129 | prev= | ||
130 | prevopt= | ||
131 | run= | ||
132 | show="$echo" | ||
133 | show_help= | ||
134 | execute_dlfiles= | ||
135 | duplicate_deps=no | ||
136 | preserve_args= | ||
137 | lo2o="s/\\.lo\$/.${objext}/" | ||
138 | o2lo="s/\\.${objext}\$/.lo/" | ||
139 | |||
140 | ##################################### | ||
141 | # Shell function definitions: | ||
142 | # This seems to be the best place for them | ||
143 | |||
144 | # func_mktempdir [string] | ||
145 | # Make a temporary directory that won't clash with other running | ||
146 | # libtool processes, and avoids race conditions if possible. If | ||
147 | # given, STRING is the basename for that directory. | ||
148 | func_mktempdir () | ||
149 | { | ||
150 | my_template="${TMPDIR-/tmp}/${1-$progname}" | ||
151 | |||
152 | if test "$run" = ":"; then | ||
153 | # Return a directory name, but don't create it in dry-run mode | ||
154 | my_tmpdir="${my_template}-$$" | ||
155 | else | ||
156 | |||
157 | # If mktemp works, use that first and foremost | ||
158 | my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` | ||
159 | |||
160 | if test ! -d "$my_tmpdir"; then | ||
161 | # Failing that, at least try and use $RANDOM to avoid a race | ||
162 | my_tmpdir="${my_template}-${RANDOM-0}$$" | ||
163 | |||
164 | save_mktempdir_umask=`umask` | ||
165 | umask 0077 | ||
166 | $mkdir "$my_tmpdir" | ||
167 | umask $save_mktempdir_umask | ||
168 | fi | ||
169 | |||
170 | # If we're not in dry-run mode, bomb out on failure | ||
171 | test -d "$my_tmpdir" || { | ||
172 | $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 | ||
173 | exit $EXIT_FAILURE | ||
174 | } | ||
175 | fi | ||
176 | |||
177 | $echo "X$my_tmpdir" | $Xsed | ||
178 | } | ||
179 | |||
180 | |||
181 | # func_win32_libid arg | ||
182 | # return the library type of file 'arg' | ||
183 | # | ||
184 | # Need a lot of goo to handle *both* DLLs and import libs | ||
185 | # Has to be a shell function in order to 'eat' the argument | ||
186 | # that is supplied when $file_magic_command is called. | ||
187 | func_win32_libid () | ||
188 | { | ||
189 | win32_libid_type="unknown" | ||
190 | win32_fileres=`file -L $1 2>/dev/null` | ||
191 | case $win32_fileres in | ||
192 | *ar\ archive\ import\ library*) # definitely import | ||
193 | win32_libid_type="x86 archive import" | ||
194 | ;; | ||
195 | *ar\ archive*) # could be an import, or static | ||
196 | if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ | ||
197 | $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then | ||
198 | win32_nmres=`eval $NM -f posix -A $1 | \ | ||
199 | $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` | ||
200 | case $win32_nmres in | ||
201 | import*) win32_libid_type="x86 archive import";; | ||
202 | *) win32_libid_type="x86 archive static";; | ||
203 | esac | ||
204 | fi | ||
205 | ;; | ||
206 | *DLL*) | ||
207 | win32_libid_type="x86 DLL" | ||
208 | ;; | ||
209 | *executable*) # but shell scripts are "executable" too... | ||
210 | case $win32_fileres in | ||
211 | *MS\ Windows\ PE\ Intel*) | ||
212 | win32_libid_type="x86 DLL" | ||
213 | ;; | ||
214 | esac | ||
215 | ;; | ||
216 | esac | ||
217 | $echo $win32_libid_type | ||
218 | } | ||
219 | |||
220 | |||
221 | # func_infer_tag arg | ||
222 | # Infer tagged configuration to use if any are available and | ||
223 | # if one wasn't chosen via the "--tag" command line option. | ||
224 | # Only attempt this if the compiler in the base compile | ||
225 | # command doesn't match the default compiler. | ||
226 | # arg is usually of the form 'gcc ...' | ||
227 | func_infer_tag () | ||
228 | { | ||
229 | if test -n "$available_tags" && test -z "$tagname"; then | ||
230 | CC_quoted= | ||
231 | for arg in $CC; do | ||
232 | case $arg in | ||
233 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
234 | arg="\"$arg\"" | ||
235 | ;; | ||
236 | esac | ||
237 | CC_quoted="$CC_quoted $arg" | ||
238 | done | ||
239 | case $@ in | ||
240 | # Blanks in the command may have been stripped by the calling shell, | ||
241 | # but not from the CC environment variable when configure was run. | ||
242 | " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; | ||
243 | # Blanks at the start of $base_compile will cause this to fail | ||
244 | # if we don't check for them as well. | ||
245 | *) | ||
246 | for z in $available_tags; do | ||
247 | if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then | ||
248 | # Evaluate the configuration. | ||
249 | eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" | ||
250 | CC_quoted= | ||
251 | for arg in $CC; do | ||
252 | # Double-quote args containing other shell metacharacters. | ||
253 | case $arg in | ||
254 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
255 | arg="\"$arg\"" | ||
256 | ;; | ||
257 | esac | ||
258 | CC_quoted="$CC_quoted $arg" | ||
259 | done | ||
260 | case "$@ " in | ||
261 | " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) | ||
262 | # The compiler in the base compile command matches | ||
263 | # the one in the tagged configuration. | ||
264 | # Assume this is the tagged configuration we want. | ||
265 | tagname=$z | ||
266 | break | ||
267 | ;; | ||
268 | esac | ||
269 | fi | ||
270 | done | ||
271 | # If $tagname still isn't set, then no tagged configuration | ||
272 | # was found and let the user know that the "--tag" command | ||
273 | # line option must be used. | ||
274 | if test -z "$tagname"; then | ||
275 | $echo "$modename: unable to infer tagged configuration" | ||
276 | $echo "$modename: specify a tag with \`--tag'" 1>&2 | ||
277 | exit $EXIT_FAILURE | ||
278 | # else | ||
279 | # $echo "$modename: using $tagname tagged configuration" | ||
280 | fi | ||
281 | ;; | ||
282 | esac | ||
283 | fi | ||
284 | } | ||
285 | |||
286 | |||
287 | # func_extract_an_archive dir oldlib | ||
288 | func_extract_an_archive () | ||
289 | { | ||
290 | f_ex_an_ar_dir="$1"; shift | ||
291 | f_ex_an_ar_oldlib="$1" | ||
292 | |||
293 | $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" | ||
294 | $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? | ||
295 | if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then | ||
296 | : | ||
297 | else | ||
298 | $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 | ||
299 | exit $EXIT_FAILURE | ||
300 | fi | ||
301 | } | ||
302 | |||
303 | # func_extract_archives gentop oldlib ... | ||
304 | func_extract_archives () | ||
305 | { | ||
306 | my_gentop="$1"; shift | ||
307 | my_oldlibs=${1+"$@"} | ||
308 | my_oldobjs="" | ||
309 | my_xlib="" | ||
310 | my_xabs="" | ||
311 | my_xdir="" | ||
312 | my_status="" | ||
313 | |||
314 | $show "${rm}r $my_gentop" | ||
315 | $run ${rm}r "$my_gentop" | ||
316 | $show "$mkdir $my_gentop" | ||
317 | $run $mkdir "$my_gentop" | ||
318 | my_status=$? | ||
319 | if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then | ||
320 | exit $my_status | ||
321 | fi | ||
322 | |||
323 | for my_xlib in $my_oldlibs; do | ||
324 | # Extract the objects. | ||
325 | case $my_xlib in | ||
326 | [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; | ||
327 | *) my_xabs=`pwd`"/$my_xlib" ;; | ||
328 | esac | ||
329 | my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` | ||
330 | my_xdir="$my_gentop/$my_xlib" | ||
331 | |||
332 | $show "${rm}r $my_xdir" | ||
333 | $run ${rm}r "$my_xdir" | ||
334 | $show "$mkdir $my_xdir" | ||
335 | $run $mkdir "$my_xdir" | ||
336 | exit_status=$? | ||
337 | if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then | ||
338 | exit $exit_status | ||
339 | fi | ||
340 | case $host in | ||
341 | *-darwin*) | ||
342 | $show "Extracting $my_xabs" | ||
343 | # Do not bother doing anything if just a dry run | ||
344 | if test -z "$run"; then | ||
345 | darwin_orig_dir=`pwd` | ||
346 | cd $my_xdir || exit $? | ||
347 | darwin_archive=$my_xabs | ||
348 | darwin_curdir=`pwd` | ||
349 | darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` | ||
350 | darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` | ||
351 | if test -n "$darwin_arches"; then | ||
352 | darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` | ||
353 | darwin_arch= | ||
354 | $show "$darwin_base_archive has multiple architectures $darwin_arches" | ||
355 | for darwin_arch in $darwin_arches ; do | ||
356 | mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" | ||
357 | lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" | ||
358 | cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" | ||
359 | func_extract_an_archive "`pwd`" "${darwin_base_archive}" | ||
360 | cd "$darwin_curdir" | ||
361 | $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" | ||
362 | done # $darwin_arches | ||
363 | ## Okay now we have a bunch of thin objects, gotta fatten them up :) | ||
364 | darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` | ||
365 | darwin_file= | ||
366 | darwin_files= | ||
367 | for darwin_file in $darwin_filelist; do | ||
368 | darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` | ||
369 | lipo -create -output "$darwin_file" $darwin_files | ||
370 | done # $darwin_filelist | ||
371 | ${rm}r unfat-$$ | ||
372 | cd "$darwin_orig_dir" | ||
373 | else | ||
374 | cd "$darwin_orig_dir" | ||
375 | func_extract_an_archive "$my_xdir" "$my_xabs" | ||
376 | fi # $darwin_arches | ||
377 | fi # $run | ||
378 | ;; | ||
379 | *) | ||
380 | func_extract_an_archive "$my_xdir" "$my_xabs" | ||
381 | ;; | ||
382 | esac | ||
383 | my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` | ||
384 | done | ||
385 | func_extract_archives_result="$my_oldobjs" | ||
386 | } | ||
387 | # End of Shell function definitions | ||
388 | ##################################### | ||
389 | |||
390 | # Darwin sucks | ||
391 | eval std_shrext=\"$shrext_cmds\" | ||
392 | |||
393 | disable_libs=no | ||
394 | |||
395 | # Parse our command line options once, thoroughly. | ||
396 | while test "$#" -gt 0 | ||
397 | do | ||
398 | arg="$1" | ||
399 | shift | ||
400 | |||
401 | case $arg in | ||
402 | -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; | ||
403 | *) optarg= ;; | ||
404 | esac | ||
405 | |||
406 | # If the previous option needs an argument, assign it. | ||
407 | if test -n "$prev"; then | ||
408 | case $prev in | ||
409 | execute_dlfiles) | ||
410 | execute_dlfiles="$execute_dlfiles $arg" | ||
411 | ;; | ||
412 | tag) | ||
413 | tagname="$arg" | ||
414 | preserve_args="${preserve_args}=$arg" | ||
415 | |||
416 | # Check whether tagname contains only valid characters | ||
417 | case $tagname in | ||
418 | *[!-_A-Za-z0-9,/]*) | ||
419 | $echo "$progname: invalid tag name: $tagname" 1>&2 | ||
420 | exit $EXIT_FAILURE | ||
421 | ;; | ||
422 | esac | ||
423 | |||
424 | case $tagname in | ||
425 | CC) | ||
426 | # Don't test for the "default" C tag, as we know, it's there, but | ||
427 | # not specially marked. | ||
428 | ;; | ||
429 | *) | ||
430 | if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then | ||
431 | taglist="$taglist $tagname" | ||
432 | # Evaluate the configuration. | ||
433 | eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" | ||
434 | else | ||
435 | $echo "$progname: ignoring unknown tag $tagname" 1>&2 | ||
436 | fi | ||
437 | ;; | ||
438 | esac | ||
439 | ;; | ||
440 | *) | ||
441 | eval "$prev=\$arg" | ||
442 | ;; | ||
443 | esac | ||
444 | |||
445 | prev= | ||
446 | prevopt= | ||
447 | continue | ||
448 | fi | ||
449 | |||
450 | # Have we seen a non-optional argument yet? | ||
451 | case $arg in | ||
452 | --help) | ||
453 | show_help=yes | ||
454 | ;; | ||
455 | |||
456 | --version) | ||
457 | $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" | ||
458 | $echo | ||
459 | $echo "Copyright (C) 2005 Free Software Foundation, Inc." | ||
460 | $echo "This is free software; see the source for copying conditions. There is NO" | ||
461 | $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | ||
462 | exit $? | ||
463 | ;; | ||
464 | |||
465 | --config) | ||
466 | ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath | ||
467 | # Now print the configurations for the tags. | ||
468 | for tagname in $taglist; do | ||
469 | ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" | ||
470 | done | ||
471 | exit $? | ||
472 | ;; | ||
473 | |||
474 | --debug) | ||
475 | $echo "$progname: enabling shell trace mode" | ||
476 | set -x | ||
477 | preserve_args="$preserve_args $arg" | ||
478 | ;; | ||
479 | |||
480 | --dry-run | -n) | ||
481 | run=: | ||
482 | ;; | ||
483 | |||
484 | --features) | ||
485 | $echo "host: $host" | ||
486 | if test "$build_libtool_libs" = yes; then | ||
487 | $echo "enable shared libraries" | ||
488 | else | ||
489 | $echo "disable shared libraries" | ||
490 | fi | ||
491 | if test "$build_old_libs" = yes; then | ||
492 | $echo "enable static libraries" | ||
493 | else | ||
494 | $echo "disable static libraries" | ||
495 | fi | ||
496 | exit $? | ||
497 | ;; | ||
498 | |||
499 | --finish) mode="finish" ;; | ||
500 | |||
501 | --mode) prevopt="--mode" prev=mode ;; | ||
502 | --mode=*) mode="$optarg" ;; | ||
503 | |||
504 | --preserve-dup-deps) duplicate_deps="yes" ;; | ||
505 | |||
506 | --quiet | --silent) | ||
507 | show=: | ||
508 | preserve_args="$preserve_args $arg" | ||
509 | ;; | ||
510 | |||
511 | --tag) | ||
512 | prevopt="--tag" | ||
513 | prev=tag | ||
514 | preserve_args="$preserve_args --tag" | ||
515 | ;; | ||
516 | --tag=*) | ||
517 | set tag "$optarg" ${1+"$@"} | ||
518 | shift | ||
519 | prev=tag | ||
520 | preserve_args="$preserve_args --tag" | ||
521 | ;; | ||
522 | |||
523 | -dlopen) | ||
524 | prevopt="-dlopen" | ||
525 | prev=execute_dlfiles | ||
526 | ;; | ||
527 | |||
528 | -*) | ||
529 | $echo "$modename: unrecognized option \`$arg'" 1>&2 | ||
530 | $echo "$help" 1>&2 | ||
531 | exit $EXIT_FAILURE | ||
532 | ;; | ||
533 | |||
534 | *) | ||
535 | nonopt="$arg" | ||
536 | break | ||
537 | ;; | ||
538 | esac | ||
539 | done | ||
540 | |||
541 | if test -n "$prevopt"; then | ||
542 | $echo "$modename: option \`$prevopt' requires an argument" 1>&2 | ||
543 | $echo "$help" 1>&2 | ||
544 | exit $EXIT_FAILURE | ||
545 | fi | ||
546 | |||
547 | case $disable_libs in | ||
548 | no) | ||
549 | ;; | ||
550 | shared) | ||
551 | build_libtool_libs=no | ||
552 | build_old_libs=yes | ||
553 | ;; | ||
554 | static) | ||
555 | build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` | ||
556 | ;; | ||
557 | esac | ||
558 | |||
559 | # If this variable is set in any of the actions, the command in it | ||
560 | # will be execed at the end. This prevents here-documents from being | ||
561 | # left over by shells. | ||
562 | exec_cmd= | ||
563 | |||
564 | if test -z "$show_help"; then | ||
565 | |||
566 | # Infer the operation mode. | ||
567 | if test -z "$mode"; then | ||
568 | $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 | ||
569 | $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 | ||
570 | case $nonopt in | ||
571 | *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) | ||
572 | mode=link | ||
573 | for arg | ||
574 | do | ||
575 | case $arg in | ||
576 | -c) | ||
577 | mode=compile | ||
578 | break | ||
579 | ;; | ||
580 | esac | ||
581 | done | ||
582 | ;; | ||
583 | *db | *dbx | *strace | *truss) | ||
584 | mode=execute | ||
585 | ;; | ||
586 | *install*|cp|mv) | ||
587 | mode=install | ||
588 | ;; | ||
589 | *rm) | ||
590 | mode=uninstall | ||
591 | ;; | ||
592 | *) | ||
593 | # If we have no mode, but dlfiles were specified, then do execute mode. | ||
594 | test -n "$execute_dlfiles" && mode=execute | ||
595 | |||
596 | # Just use the default operation mode. | ||
597 | if test -z "$mode"; then | ||
598 | if test -n "$nonopt"; then | ||
599 | $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 | ||
600 | else | ||
601 | $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 | ||
602 | fi | ||
603 | fi | ||
604 | ;; | ||
605 | esac | ||
606 | fi | ||
607 | |||
608 | # Only execute mode is allowed to have -dlopen flags. | ||
609 | if test -n "$execute_dlfiles" && test "$mode" != execute; then | ||
610 | $echo "$modename: unrecognized option \`-dlopen'" 1>&2 | ||
611 | $echo "$help" 1>&2 | ||
612 | exit $EXIT_FAILURE | ||
613 | fi | ||
614 | |||
615 | # Change the help message to a mode-specific one. | ||
616 | generic_help="$help" | ||
617 | help="Try \`$modename --help --mode=$mode' for more information." | ||
618 | |||
619 | # These modes are in order of execution frequency so that they run quickly. | ||
620 | case $mode in | ||
621 | # libtool compile mode | ||
622 | compile) | ||
623 | modename="$modename: compile" | ||
624 | # Get the compilation command and the source file. | ||
625 | base_compile= | ||
626 | srcfile="$nonopt" # always keep a non-empty value in "srcfile" | ||
627 | suppress_opt=yes | ||
628 | suppress_output= | ||
629 | arg_mode=normal | ||
630 | libobj= | ||
631 | later= | ||
632 | |||
633 | for arg | ||
634 | do | ||
635 | case $arg_mode in | ||
636 | arg ) | ||
637 | # do not "continue". Instead, add this to base_compile | ||
638 | lastarg="$arg" | ||
639 | arg_mode=normal | ||
640 | ;; | ||
641 | |||
642 | target ) | ||
643 | libobj="$arg" | ||
644 | arg_mode=normal | ||
645 | continue | ||
646 | ;; | ||
647 | |||
648 | normal ) | ||
649 | # Accept any command-line options. | ||
650 | case $arg in | ||
651 | -o) | ||
652 | if test -n "$libobj" ; then | ||
653 | $echo "$modename: you cannot specify \`-o' more than once" 1>&2 | ||
654 | exit $EXIT_FAILURE | ||
655 | fi | ||
656 | arg_mode=target | ||
657 | continue | ||
658 | ;; | ||
659 | |||
660 | -static | -prefer-pic | -prefer-non-pic) | ||
661 | later="$later $arg" | ||
662 | continue | ||
663 | ;; | ||
664 | |||
665 | -no-suppress) | ||
666 | suppress_opt=no | ||
667 | continue | ||
668 | ;; | ||
669 | |||
670 | -Xcompiler) | ||
671 | arg_mode=arg # the next one goes into the "base_compile" arg list | ||
672 | continue # The current "srcfile" will either be retained or | ||
673 | ;; # replaced later. I would guess that would be a bug. | ||
674 | |||
675 | -Wc,*) | ||
676 | args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` | ||
677 | lastarg= | ||
678 | save_ifs="$IFS"; IFS=',' | ||
679 | for arg in $args; do | ||
680 | IFS="$save_ifs" | ||
681 | |||
682 | # Double-quote args containing other shell metacharacters. | ||
683 | # Many Bourne shells cannot handle close brackets correctly | ||
684 | # in scan sets, so we specify it separately. | ||
685 | case $arg in | ||
686 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
687 | arg="\"$arg\"" | ||
688 | ;; | ||
689 | esac | ||
690 | lastarg="$lastarg $arg" | ||
691 | done | ||
692 | IFS="$save_ifs" | ||
693 | lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` | ||
694 | |||
695 | # Add the arguments to base_compile. | ||
696 | base_compile="$base_compile $lastarg" | ||
697 | continue | ||
698 | ;; | ||
699 | |||
700 | * ) | ||
701 | # Accept the current argument as the source file. | ||
702 | # The previous "srcfile" becomes the current argument. | ||
703 | # | ||
704 | lastarg="$srcfile" | ||
705 | srcfile="$arg" | ||
706 | ;; | ||
707 | esac # case $arg | ||
708 | ;; | ||
709 | esac # case $arg_mode | ||
710 | |||
711 | # Aesthetically quote the previous argument. | ||
712 | lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` | ||
713 | |||
714 | case $lastarg in | ||
715 | # Double-quote args containing other shell metacharacters. | ||
716 | # Many Bourne shells cannot handle close brackets correctly | ||
717 | # in scan sets, and some SunOS ksh mistreat backslash-escaping | ||
718 | # in scan sets (worked around with variable expansion), | ||
719 | # and furthermore cannot handle '|' '&' '(' ')' in scan sets | ||
720 | # at all, so we specify them separately. | ||
721 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
722 | lastarg="\"$lastarg\"" | ||
723 | ;; | ||
724 | esac | ||
725 | |||
726 | base_compile="$base_compile $lastarg" | ||
727 | done # for arg | ||
728 | |||
729 | case $arg_mode in | ||
730 | arg) | ||
731 | $echo "$modename: you must specify an argument for -Xcompile" | ||
732 | exit $EXIT_FAILURE | ||
733 | ;; | ||
734 | target) | ||
735 | $echo "$modename: you must specify a target with \`-o'" 1>&2 | ||
736 | exit $EXIT_FAILURE | ||
737 | ;; | ||
738 | *) | ||
739 | # Get the name of the library object. | ||
740 | [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` | ||
741 | ;; | ||
742 | esac | ||
743 | |||
744 | # Recognize several different file suffixes. | ||
745 | # If the user specifies -o file.o, it is replaced with file.lo | ||
746 | xform='[cCFSifmso]' | ||
747 | case $libobj in | ||
748 | *.ada) xform=ada ;; | ||
749 | *.adb) xform=adb ;; | ||
750 | *.ads) xform=ads ;; | ||
751 | *.asm) xform=asm ;; | ||
752 | *.c++) xform=c++ ;; | ||
753 | *.cc) xform=cc ;; | ||
754 | *.ii) xform=ii ;; | ||
755 | *.class) xform=class ;; | ||
756 | *.cpp) xform=cpp ;; | ||
757 | *.cxx) xform=cxx ;; | ||
758 | *.f90) xform=f90 ;; | ||
759 | *.for) xform=for ;; | ||
760 | *.java) xform=java ;; | ||
761 | esac | ||
762 | |||
763 | libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` | ||
764 | |||
765 | case $libobj in | ||
766 | *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; | ||
767 | *) | ||
768 | $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 | ||
769 | exit $EXIT_FAILURE | ||
770 | ;; | ||
771 | esac | ||
772 | |||
773 | func_infer_tag $base_compile | ||
774 | |||
775 | for arg in $later; do | ||
776 | case $arg in | ||
777 | -static) | ||
778 | build_old_libs=yes | ||
779 | continue | ||
780 | ;; | ||
781 | |||
782 | -prefer-pic) | ||
783 | pic_mode=yes | ||
784 | continue | ||
785 | ;; | ||
786 | |||
787 | -prefer-non-pic) | ||
788 | pic_mode=no | ||
789 | continue | ||
790 | ;; | ||
791 | esac | ||
792 | done | ||
793 | |||
794 | qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` | ||
795 | case $qlibobj in | ||
796 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
797 | qlibobj="\"$qlibobj\"" ;; | ||
798 | esac | ||
799 | test "X$libobj" != "X$qlibobj" \ | ||
800 | && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ | ||
801 | && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." | ||
802 | objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` | ||
803 | xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` | ||
804 | if test "X$xdir" = "X$obj"; then | ||
805 | xdir= | ||
806 | else | ||
807 | xdir=$xdir/ | ||
808 | fi | ||
809 | lobj=${xdir}$objdir/$objname | ||
810 | |||
811 | if test -z "$base_compile"; then | ||
812 | $echo "$modename: you must specify a compilation command" 1>&2 | ||
813 | $echo "$help" 1>&2 | ||
814 | exit $EXIT_FAILURE | ||
815 | fi | ||
816 | |||
817 | # Delete any leftover library objects. | ||
818 | if test "$build_old_libs" = yes; then | ||
819 | removelist="$obj $lobj $libobj ${libobj}T" | ||
820 | else | ||
821 | removelist="$lobj $libobj ${libobj}T" | ||
822 | fi | ||
823 | |||
824 | $run $rm $removelist | ||
825 | trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 | ||
826 | |||
827 | # On Cygwin there's no "real" PIC flag so we must build both object types | ||
828 | case $host_os in | ||
829 | cygwin* | mingw* | pw32* | os2*) | ||
830 | pic_mode=default | ||
831 | ;; | ||
832 | esac | ||
833 | if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then | ||
834 | # non-PIC code in shared libraries is not supported | ||
835 | pic_mode=default | ||
836 | fi | ||
837 | |||
838 | # Calculate the filename of the output object if compiler does | ||
839 | # not support -o with -c | ||
840 | if test "$compiler_c_o" = no; then | ||
841 | output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} | ||
842 | lockfile="$output_obj.lock" | ||
843 | removelist="$removelist $output_obj $lockfile" | ||
844 | trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 | ||
845 | else | ||
846 | output_obj= | ||
847 | need_locks=no | ||
848 | lockfile= | ||
849 | fi | ||
850 | |||
851 | # Lock this critical section if it is needed | ||
852 | # We use this script file to make the link, it avoids creating a new file | ||
853 | if test "$need_locks" = yes; then | ||
854 | until $run ln "$progpath" "$lockfile" 2>/dev/null; do | ||
855 | $show "Waiting for $lockfile to be removed" | ||
856 | sleep 2 | ||
857 | done | ||
858 | elif test "$need_locks" = warn; then | ||
859 | if test -f "$lockfile"; then | ||
860 | $echo "\ | ||
861 | *** ERROR, $lockfile exists and contains: | ||
862 | `cat $lockfile 2>/dev/null` | ||
863 | |||
864 | This indicates that another process is trying to use the same | ||
865 | temporary object file, and libtool could not work around it because | ||
866 | your compiler does not support \`-c' and \`-o' together. If you | ||
867 | repeat this compilation, it may succeed, by chance, but you had better | ||
868 | avoid parallel builds (make -j) in this platform, or get a better | ||
869 | compiler." | ||
870 | |||
871 | $run $rm $removelist | ||
872 | exit $EXIT_FAILURE | ||
873 | fi | ||
874 | $echo "$srcfile" > "$lockfile" | ||
875 | fi | ||
876 | |||
877 | if test -n "$fix_srcfile_path"; then | ||
878 | eval srcfile=\"$fix_srcfile_path\" | ||
879 | fi | ||
880 | qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` | ||
881 | case $qsrcfile in | ||
882 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
883 | qsrcfile="\"$qsrcfile\"" ;; | ||
884 | esac | ||
885 | |||
886 | $run $rm "$libobj" "${libobj}T" | ||
887 | |||
888 | # Create a libtool object file (analogous to a ".la" file), | ||
889 | # but don't create it if we're doing a dry run. | ||
890 | test -z "$run" && cat > ${libobj}T <<EOF | ||
891 | # $libobj - a libtool object file | ||
892 | # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP | ||
893 | # | ||
894 | # Please DO NOT delete this file! | ||
895 | # It is necessary for linking the library. | ||
896 | |||
897 | # Name of the PIC object. | ||
898 | EOF | ||
899 | |||
900 | # Only build a PIC object if we are building libtool libraries. | ||
901 | if test "$build_libtool_libs" = yes; then | ||
902 | # Without this assignment, base_compile gets emptied. | ||
903 | fbsd_hideous_sh_bug=$base_compile | ||
904 | |||
905 | if test "$pic_mode" != no; then | ||
906 | command="$base_compile $qsrcfile $pic_flag" | ||
907 | else | ||
908 | # Don't build PIC code | ||
909 | command="$base_compile $qsrcfile" | ||
910 | fi | ||
911 | |||
912 | if test ! -d "${xdir}$objdir"; then | ||
913 | $show "$mkdir ${xdir}$objdir" | ||
914 | $run $mkdir ${xdir}$objdir | ||
915 | exit_status=$? | ||
916 | if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then | ||
917 | exit $exit_status | ||
918 | fi | ||
919 | fi | ||
920 | |||
921 | if test -z "$output_obj"; then | ||
922 | # Place PIC objects in $objdir | ||
923 | command="$command -o $lobj" | ||
924 | fi | ||
925 | |||
926 | $run $rm "$lobj" "$output_obj" | ||
927 | |||
928 | $show "$command" | ||
929 | if $run eval "$command"; then : | ||
930 | else | ||
931 | test -n "$output_obj" && $run $rm $removelist | ||
932 | exit $EXIT_FAILURE | ||
933 | fi | ||
934 | |||
935 | if test "$need_locks" = warn && | ||
936 | test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then | ||
937 | $echo "\ | ||
938 | *** ERROR, $lockfile contains: | ||
939 | `cat $lockfile 2>/dev/null` | ||
940 | |||
941 | but it should contain: | ||
942 | $srcfile | ||
943 | |||
944 | This indicates that another process is trying to use the same | ||
945 | temporary object file, and libtool could not work around it because | ||
946 | your compiler does not support \`-c' and \`-o' together. If you | ||
947 | repeat this compilation, it may succeed, by chance, but you had better | ||
948 | avoid parallel builds (make -j) in this platform, or get a better | ||
949 | compiler." | ||
950 | |||
951 | $run $rm $removelist | ||
952 | exit $EXIT_FAILURE | ||
953 | fi | ||
954 | |||
955 | # Just move the object if needed, then go on to compile the next one | ||
956 | if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then | ||
957 | $show "$mv $output_obj $lobj" | ||
958 | if $run $mv $output_obj $lobj; then : | ||
959 | else | ||
960 | error=$? | ||
961 | $run $rm $removelist | ||
962 | exit $error | ||
963 | fi | ||
964 | fi | ||
965 | |||
966 | # Append the name of the PIC object to the libtool object file. | ||
967 | test -z "$run" && cat >> ${libobj}T <<EOF | ||
968 | pic_object='$objdir/$objname' | ||
969 | |||
970 | EOF | ||
971 | |||
972 | # Allow error messages only from the first compilation. | ||
973 | if test "$suppress_opt" = yes; then | ||
974 | suppress_output=' >/dev/null 2>&1' | ||
975 | fi | ||
976 | else | ||
977 | # No PIC object so indicate it doesn't exist in the libtool | ||
978 | # object file. | ||
979 | test -z "$run" && cat >> ${libobj}T <<EOF | ||
980 | pic_object=none | ||
981 | |||
982 | EOF | ||
983 | fi | ||
984 | |||
985 | # Only build a position-dependent object if we build old libraries. | ||
986 | if test "$build_old_libs" = yes; then | ||
987 | if test "$pic_mode" != yes; then | ||
988 | # Don't build PIC code | ||
989 | command="$base_compile $qsrcfile" | ||
990 | else | ||
991 | command="$base_compile $qsrcfile $pic_flag" | ||
992 | fi | ||
993 | if test "$compiler_c_o" = yes; then | ||
994 | command="$command -o $obj" | ||
995 | fi | ||
996 | |||
997 | # Suppress compiler output if we already did a PIC compilation. | ||
998 | command="$command$suppress_output" | ||
999 | $run $rm "$obj" "$output_obj" | ||
1000 | $show "$command" | ||
1001 | if $run eval "$command"; then : | ||
1002 | else | ||
1003 | $run $rm $removelist | ||
1004 | exit $EXIT_FAILURE | ||
1005 | fi | ||
1006 | |||
1007 | if test "$need_locks" = warn && | ||
1008 | test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then | ||
1009 | $echo "\ | ||
1010 | *** ERROR, $lockfile contains: | ||
1011 | `cat $lockfile 2>/dev/null` | ||
1012 | |||
1013 | but it should contain: | ||
1014 | $srcfile | ||
1015 | |||
1016 | This indicates that another process is trying to use the same | ||
1017 | temporary object file, and libtool could not work around it because | ||
1018 | your compiler does not support \`-c' and \`-o' together. If you | ||
1019 | repeat this compilation, it may succeed, by chance, but you had better | ||
1020 | avoid parallel builds (make -j) in this platform, or get a better | ||
1021 | compiler." | ||
1022 | |||
1023 | $run $rm $removelist | ||
1024 | exit $EXIT_FAILURE | ||
1025 | fi | ||
1026 | |||
1027 | # Just move the object if needed | ||
1028 | if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then | ||
1029 | $show "$mv $output_obj $obj" | ||
1030 | if $run $mv $output_obj $obj; then : | ||
1031 | else | ||
1032 | error=$? | ||
1033 | $run $rm $removelist | ||
1034 | exit $error | ||
1035 | fi | ||
1036 | fi | ||
1037 | |||
1038 | # Append the name of the non-PIC object the libtool object file. | ||
1039 | # Only append if the libtool object file exists. | ||
1040 | test -z "$run" && cat >> ${libobj}T <<EOF | ||
1041 | # Name of the non-PIC object. | ||
1042 | non_pic_object='$objname' | ||
1043 | |||
1044 | EOF | ||
1045 | else | ||
1046 | # Append the name of the non-PIC object the libtool object file. | ||
1047 | # Only append if the libtool object file exists. | ||
1048 | test -z "$run" && cat >> ${libobj}T <<EOF | ||
1049 | # Name of the non-PIC object. | ||
1050 | non_pic_object=none | ||
1051 | |||
1052 | EOF | ||
1053 | fi | ||
1054 | |||
1055 | $run $mv "${libobj}T" "${libobj}" | ||
1056 | |||
1057 | # Unlock the critical section if it was locked | ||
1058 | if test "$need_locks" != no; then | ||
1059 | $run $rm "$lockfile" | ||
1060 | fi | ||
1061 | |||
1062 | exit $EXIT_SUCCESS | ||
1063 | ;; | ||
1064 | |||
1065 | # libtool link mode | ||
1066 | link | relink) | ||
1067 | modename="$modename: link" | ||
1068 | case $host in | ||
1069 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) | ||
1070 | # It is impossible to link a dll without this setting, and | ||
1071 | # we shouldn't force the makefile maintainer to figure out | ||
1072 | # which system we are compiling for in order to pass an extra | ||
1073 | # flag for every libtool invocation. | ||
1074 | # allow_undefined=no | ||
1075 | |||
1076 | # FIXME: Unfortunately, there are problems with the above when trying | ||
1077 | # to make a dll which has undefined symbols, in which case not | ||
1078 | # even a static library is built. For now, we need to specify | ||
1079 | # -no-undefined on the libtool link line when we can be certain | ||
1080 | # that all symbols are satisfied, otherwise we get a static library. | ||
1081 | allow_undefined=yes | ||
1082 | ;; | ||
1083 | *) | ||
1084 | allow_undefined=yes | ||
1085 | ;; | ||
1086 | esac | ||
1087 | libtool_args="$nonopt" | ||
1088 | base_compile="$nonopt $@" | ||
1089 | compile_command="$nonopt" | ||
1090 | finalize_command="$nonopt" | ||
1091 | |||
1092 | compile_rpath= | ||
1093 | finalize_rpath= | ||
1094 | compile_shlibpath= | ||
1095 | finalize_shlibpath= | ||
1096 | convenience= | ||
1097 | old_convenience= | ||
1098 | deplibs= | ||
1099 | old_deplibs= | ||
1100 | compiler_flags= | ||
1101 | linker_flags= | ||
1102 | dllsearchpath= | ||
1103 | lib_search_path=`pwd` | ||
1104 | inst_prefix_dir= | ||
1105 | |||
1106 | avoid_version=no | ||
1107 | dlfiles= | ||
1108 | dlprefiles= | ||
1109 | dlself=no | ||
1110 | export_dynamic=no | ||
1111 | export_symbols= | ||
1112 | export_symbols_regex= | ||
1113 | generated= | ||
1114 | libobjs= | ||
1115 | ltlibs= | ||
1116 | module=no | ||
1117 | no_install=no | ||
1118 | objs= | ||
1119 | non_pic_objects= | ||
1120 | notinst_path= # paths that contain not-installed libtool libraries | ||
1121 | precious_files_regex= | ||
1122 | prefer_static_libs=no | ||
1123 | preload=no | ||
1124 | prev= | ||
1125 | prevarg= | ||
1126 | release= | ||
1127 | rpath= | ||
1128 | xrpath= | ||
1129 | perm_rpath= | ||
1130 | temp_rpath= | ||
1131 | thread_safe=no | ||
1132 | vinfo= | ||
1133 | vinfo_number=no | ||
1134 | |||
1135 | func_infer_tag $base_compile | ||
1136 | |||
1137 | # We need to know -static, to get the right output filenames. | ||
1138 | for arg | ||
1139 | do | ||
1140 | case $arg in | ||
1141 | -all-static | -static) | ||
1142 | if test "X$arg" = "X-all-static"; then | ||
1143 | if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then | ||
1144 | $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 | ||
1145 | fi | ||
1146 | if test -n "$link_static_flag"; then | ||
1147 | dlopen_self=$dlopen_self_static | ||
1148 | fi | ||
1149 | prefer_static_libs=yes | ||
1150 | else | ||
1151 | if test -z "$pic_flag" && test -n "$link_static_flag"; then | ||
1152 | dlopen_self=$dlopen_self_static | ||
1153 | fi | ||
1154 | prefer_static_libs=built | ||
1155 | fi | ||
1156 | build_libtool_libs=no | ||
1157 | build_old_libs=yes | ||
1158 | break | ||
1159 | ;; | ||
1160 | esac | ||
1161 | done | ||
1162 | |||
1163 | # See if our shared archives depend on static archives. | ||
1164 | test -n "$old_archive_from_new_cmds" && build_old_libs=yes | ||
1165 | |||
1166 | # Go through the arguments, transforming them on the way. | ||
1167 | while test "$#" -gt 0; do | ||
1168 | arg="$1" | ||
1169 | shift | ||
1170 | case $arg in | ||
1171 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
1172 | qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test | ||
1173 | ;; | ||
1174 | *) qarg=$arg ;; | ||
1175 | esac | ||
1176 | libtool_args="$libtool_args $qarg" | ||
1177 | |||
1178 | # If the previous option needs an argument, assign it. | ||
1179 | if test -n "$prev"; then | ||
1180 | case $prev in | ||
1181 | output) | ||
1182 | compile_command="$compile_command @OUTPUT@" | ||
1183 | finalize_command="$finalize_command @OUTPUT@" | ||
1184 | ;; | ||
1185 | esac | ||
1186 | |||
1187 | case $prev in | ||
1188 | dlfiles|dlprefiles) | ||
1189 | if test "$preload" = no; then | ||
1190 | # Add the symbol object into the linking commands. | ||
1191 | compile_command="$compile_command @SYMFILE@" | ||
1192 | finalize_command="$finalize_command @SYMFILE@" | ||
1193 | preload=yes | ||
1194 | fi | ||
1195 | case $arg in | ||
1196 | *.la | *.lo) ;; # We handle these cases below. | ||
1197 | force) | ||
1198 | if test "$dlself" = no; then | ||
1199 | dlself=needless | ||
1200 | export_dynamic=yes | ||
1201 | fi | ||
1202 | prev= | ||
1203 | continue | ||
1204 | ;; | ||
1205 | self) | ||
1206 | if test "$prev" = dlprefiles; then | ||
1207 | dlself=yes | ||
1208 | elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then | ||
1209 | dlself=yes | ||
1210 | else | ||
1211 | dlself=needless | ||
1212 | export_dynamic=yes | ||
1213 | fi | ||
1214 | prev= | ||
1215 | continue | ||
1216 | ;; | ||
1217 | *) | ||
1218 | if test "$prev" = dlfiles; then | ||
1219 | dlfiles="$dlfiles $arg" | ||
1220 | else | ||
1221 | dlprefiles="$dlprefiles $arg" | ||
1222 | fi | ||
1223 | prev= | ||
1224 | continue | ||
1225 | ;; | ||
1226 | esac | ||
1227 | ;; | ||
1228 | expsyms) | ||
1229 | export_symbols="$arg" | ||
1230 | if test ! -f "$arg"; then | ||
1231 | $echo "$modename: symbol file \`$arg' does not exist" | ||
1232 | exit $EXIT_FAILURE | ||
1233 | fi | ||
1234 | prev= | ||
1235 | continue | ||
1236 | ;; | ||
1237 | expsyms_regex) | ||
1238 | export_symbols_regex="$arg" | ||
1239 | prev= | ||
1240 | continue | ||
1241 | ;; | ||
1242 | inst_prefix) | ||
1243 | inst_prefix_dir="$arg" | ||
1244 | prev= | ||
1245 | continue | ||
1246 | ;; | ||
1247 | precious_regex) | ||
1248 | precious_files_regex="$arg" | ||
1249 | prev= | ||
1250 | continue | ||
1251 | ;; | ||
1252 | release) | ||
1253 | release="-$arg" | ||
1254 | prev= | ||
1255 | continue | ||
1256 | ;; | ||
1257 | objectlist) | ||
1258 | if test -f "$arg"; then | ||
1259 | save_arg=$arg | ||
1260 | moreargs= | ||
1261 | for fil in `cat $save_arg` | ||
1262 | do | ||
1263 | # moreargs="$moreargs $fil" | ||
1264 | arg=$fil | ||
1265 | # A libtool-controlled object. | ||
1266 | |||
1267 | # Check to see that this really is a libtool object. | ||
1268 | if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | ||
1269 | pic_object= | ||
1270 | non_pic_object= | ||
1271 | |||
1272 | # Read the .lo file | ||
1273 | # If there is no directory component, then add one. | ||
1274 | case $arg in | ||
1275 | */* | *\\*) . $arg ;; | ||
1276 | *) . ./$arg ;; | ||
1277 | esac | ||
1278 | |||
1279 | if test -z "$pic_object" || \ | ||
1280 | test -z "$non_pic_object" || | ||
1281 | test "$pic_object" = none && \ | ||
1282 | test "$non_pic_object" = none; then | ||
1283 | $echo "$modename: cannot find name of object for \`$arg'" 1>&2 | ||
1284 | exit $EXIT_FAILURE | ||
1285 | fi | ||
1286 | |||
1287 | # Extract subdirectory from the argument. | ||
1288 | xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` | ||
1289 | if test "X$xdir" = "X$arg"; then | ||
1290 | xdir= | ||
1291 | else | ||
1292 | xdir="$xdir/" | ||
1293 | fi | ||
1294 | |||
1295 | if test "$pic_object" != none; then | ||
1296 | # Prepend the subdirectory the object is found in. | ||
1297 | pic_object="$xdir$pic_object" | ||
1298 | |||
1299 | if test "$prev" = dlfiles; then | ||
1300 | if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then | ||
1301 | dlfiles="$dlfiles $pic_object" | ||
1302 | prev= | ||
1303 | continue | ||
1304 | else | ||
1305 | # If libtool objects are unsupported, then we need to preload. | ||
1306 | prev=dlprefiles | ||
1307 | fi | ||
1308 | fi | ||
1309 | |||
1310 | # CHECK ME: I think I busted this. -Ossama | ||
1311 | if test "$prev" = dlprefiles; then | ||
1312 | # Preload the old-style object. | ||
1313 | dlprefiles="$dlprefiles $pic_object" | ||
1314 | prev= | ||
1315 | fi | ||
1316 | |||
1317 | # A PIC object. | ||
1318 | libobjs="$libobjs $pic_object" | ||
1319 | arg="$pic_object" | ||
1320 | fi | ||
1321 | |||
1322 | # Non-PIC object. | ||
1323 | if test "$non_pic_object" != none; then | ||
1324 | # Prepend the subdirectory the object is found in. | ||
1325 | non_pic_object="$xdir$non_pic_object" | ||
1326 | |||
1327 | # A standard non-PIC object | ||
1328 | non_pic_objects="$non_pic_objects $non_pic_object" | ||
1329 | if test -z "$pic_object" || test "$pic_object" = none ; then | ||
1330 | arg="$non_pic_object" | ||
1331 | fi | ||
1332 | else | ||
1333 | # If the PIC object exists, use it instead. | ||
1334 | # $xdir was prepended to $pic_object above. | ||
1335 | non_pic_object="$pic_object" | ||
1336 | non_pic_objects="$non_pic_objects $non_pic_object" | ||
1337 | fi | ||
1338 | else | ||
1339 | # Only an error if not doing a dry-run. | ||
1340 | if test -z "$run"; then | ||
1341 | $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 | ||
1342 | exit $EXIT_FAILURE | ||
1343 | else | ||
1344 | # Dry-run case. | ||
1345 | |||
1346 | # Extract subdirectory from the argument. | ||
1347 | xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` | ||
1348 | if test "X$xdir" = "X$arg"; then | ||
1349 | xdir= | ||
1350 | else | ||
1351 | xdir="$xdir/" | ||
1352 | fi | ||
1353 | |||
1354 | pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` | ||
1355 | non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` | ||
1356 | libobjs="$libobjs $pic_object" | ||
1357 | non_pic_objects="$non_pic_objects $non_pic_object" | ||
1358 | fi | ||
1359 | fi | ||
1360 | done | ||
1361 | else | ||
1362 | $echo "$modename: link input file \`$save_arg' does not exist" | ||
1363 | exit $EXIT_FAILURE | ||
1364 | fi | ||
1365 | arg=$save_arg | ||
1366 | prev= | ||
1367 | continue | ||
1368 | ;; | ||
1369 | rpath | xrpath) | ||
1370 | # We need an absolute path. | ||
1371 | case $arg in | ||
1372 | [\\/]* | [A-Za-z]:[\\/]*) ;; | ||
1373 | *) | ||
1374 | $echo "$modename: only absolute run-paths are allowed" 1>&2 | ||
1375 | exit $EXIT_FAILURE | ||
1376 | ;; | ||
1377 | esac | ||
1378 | if test "$prev" = rpath; then | ||
1379 | case "$rpath " in | ||
1380 | *" $arg "*) ;; | ||
1381 | *) rpath="$rpath $arg" ;; | ||
1382 | esac | ||
1383 | else | ||
1384 | case "$xrpath " in | ||
1385 | *" $arg "*) ;; | ||
1386 | *) xrpath="$xrpath $arg" ;; | ||
1387 | esac | ||
1388 | fi | ||
1389 | prev= | ||
1390 | continue | ||
1391 | ;; | ||
1392 | xcompiler) | ||
1393 | compiler_flags="$compiler_flags $qarg" | ||
1394 | prev= | ||
1395 | compile_command="$compile_command $qarg" | ||
1396 | finalize_command="$finalize_command $qarg" | ||
1397 | continue | ||
1398 | ;; | ||
1399 | xlinker) | ||
1400 | linker_flags="$linker_flags $qarg" | ||
1401 | compiler_flags="$compiler_flags $wl$qarg" | ||
1402 | prev= | ||
1403 | compile_command="$compile_command $wl$qarg" | ||
1404 | finalize_command="$finalize_command $wl$qarg" | ||
1405 | continue | ||
1406 | ;; | ||
1407 | xcclinker) | ||
1408 | linker_flags="$linker_flags $qarg" | ||
1409 | compiler_flags="$compiler_flags $qarg" | ||
1410 | prev= | ||
1411 | compile_command="$compile_command $qarg" | ||
1412 | finalize_command="$finalize_command $qarg" | ||
1413 | continue | ||
1414 | ;; | ||
1415 | shrext) | ||
1416 | shrext_cmds="$arg" | ||
1417 | prev= | ||
1418 | continue | ||
1419 | ;; | ||
1420 | darwin_framework|darwin_framework_skip) | ||
1421 | test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" | ||
1422 | compile_command="$compile_command $arg" | ||
1423 | finalize_command="$finalize_command $arg" | ||
1424 | prev= | ||
1425 | continue | ||
1426 | ;; | ||
1427 | *) | ||
1428 | eval "$prev=\"\$arg\"" | ||
1429 | prev= | ||
1430 | continue | ||
1431 | ;; | ||
1432 | esac | ||
1433 | fi # test -n "$prev" | ||
1434 | |||
1435 | prevarg="$arg" | ||
1436 | |||
1437 | case $arg in | ||
1438 | -all-static) | ||
1439 | if test -n "$link_static_flag"; then | ||
1440 | compile_command="$compile_command $link_static_flag" | ||
1441 | finalize_command="$finalize_command $link_static_flag" | ||
1442 | fi | ||
1443 | continue | ||
1444 | ;; | ||
1445 | |||
1446 | -allow-undefined) | ||
1447 | # FIXME: remove this flag sometime in the future. | ||
1448 | $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 | ||
1449 | continue | ||
1450 | ;; | ||
1451 | |||
1452 | -avoid-version) | ||
1453 | avoid_version=yes | ||
1454 | continue | ||
1455 | ;; | ||
1456 | |||
1457 | -dlopen) | ||
1458 | prev=dlfiles | ||
1459 | continue | ||
1460 | ;; | ||
1461 | |||
1462 | -dlpreopen) | ||
1463 | prev=dlprefiles | ||
1464 | continue | ||
1465 | ;; | ||
1466 | |||
1467 | -export-dynamic) | ||
1468 | export_dynamic=yes | ||
1469 | continue | ||
1470 | ;; | ||
1471 | |||
1472 | -export-symbols | -export-symbols-regex) | ||
1473 | if test -n "$export_symbols" || test -n "$export_symbols_regex"; then | ||
1474 | $echo "$modename: more than one -exported-symbols argument is not allowed" | ||
1475 | exit $EXIT_FAILURE | ||
1476 | fi | ||
1477 | if test "X$arg" = "X-export-symbols"; then | ||
1478 | prev=expsyms | ||
1479 | else | ||
1480 | prev=expsyms_regex | ||
1481 | fi | ||
1482 | continue | ||
1483 | ;; | ||
1484 | |||
1485 | -framework|-arch|-isysroot) | ||
1486 | case " $CC " in | ||
1487 | *" ${arg} ${1} "* | *" ${arg} ${1} "*) | ||
1488 | prev=darwin_framework_skip ;; | ||
1489 | *) compiler_flags="$compiler_flags $arg" | ||
1490 | prev=darwin_framework ;; | ||
1491 | esac | ||
1492 | compile_command="$compile_command $arg" | ||
1493 | finalize_command="$finalize_command $arg" | ||
1494 | continue | ||
1495 | ;; | ||
1496 | |||
1497 | -inst-prefix-dir) | ||
1498 | prev=inst_prefix | ||
1499 | continue | ||
1500 | ;; | ||
1501 | |||
1502 | # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* | ||
1503 | # so, if we see these flags be careful not to treat them like -L | ||
1504 | -L[A-Z][A-Z]*:*) | ||
1505 | case $with_gcc/$host in | ||
1506 | no/*-*-irix* | /*-*-irix*) | ||
1507 | compile_command="$compile_command $arg" | ||
1508 | finalize_command="$finalize_command $arg" | ||
1509 | ;; | ||
1510 | esac | ||
1511 | continue | ||
1512 | ;; | ||
1513 | |||
1514 | -L*) | ||
1515 | dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` | ||
1516 | # We need an absolute path. | ||
1517 | case $dir in | ||
1518 | [\\/]* | [A-Za-z]:[\\/]*) ;; | ||
1519 | *) | ||
1520 | absdir=`cd "$dir" && pwd` | ||
1521 | if test -z "$absdir"; then | ||
1522 | $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 | ||
1523 | absdir="$dir" | ||
1524 | notinst_path="$notinst_path $dir" | ||
1525 | fi | ||
1526 | dir="$absdir" | ||
1527 | ;; | ||
1528 | esac | ||
1529 | case "$deplibs " in | ||
1530 | *" -L$dir "*) ;; | ||
1531 | *) | ||
1532 | deplibs="$deplibs -L$dir" | ||
1533 | lib_search_path="$lib_search_path $dir" | ||
1534 | ;; | ||
1535 | esac | ||
1536 | case $host in | ||
1537 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) | ||
1538 | testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` | ||
1539 | case :$dllsearchpath: in | ||
1540 | *":$dir:"*) ;; | ||
1541 | *) dllsearchpath="$dllsearchpath:$dir";; | ||
1542 | esac | ||
1543 | case :$dllsearchpath: in | ||
1544 | *":$testbindir:"*) ;; | ||
1545 | *) dllsearchpath="$dllsearchpath:$testbindir";; | ||
1546 | esac | ||
1547 | ;; | ||
1548 | esac | ||
1549 | continue | ||
1550 | ;; | ||
1551 | |||
1552 | -l*) | ||
1553 | if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then | ||
1554 | case $host in | ||
1555 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) | ||
1556 | # These systems don't actually have a C or math library (as such) | ||
1557 | continue | ||
1558 | ;; | ||
1559 | *-*-os2*) | ||
1560 | # These systems don't actually have a C library (as such) | ||
1561 | test "X$arg" = "X-lc" && continue | ||
1562 | ;; | ||
1563 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) | ||
1564 | # Do not include libc due to us having libc/libc_r. | ||
1565 | test "X$arg" = "X-lc" && continue | ||
1566 | ;; | ||
1567 | *-*-rhapsody* | *-*-darwin1.[012]) | ||
1568 | # Rhapsody C and math libraries are in the System framework | ||
1569 | deplibs="$deplibs -framework System" | ||
1570 | continue | ||
1571 | ;; | ||
1572 | *-*-sco3.2v5* | *-*-sco5v6*) | ||
1573 | # Causes problems with __ctype | ||
1574 | test "X$arg" = "X-lc" && continue | ||
1575 | ;; | ||
1576 | *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) | ||
1577 | # Compiler inserts libc in the correct place for threads to work | ||
1578 | test "X$arg" = "X-lc" && continue | ||
1579 | ;; | ||
1580 | esac | ||
1581 | elif test "X$arg" = "X-lc_r"; then | ||
1582 | case $host in | ||
1583 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) | ||
1584 | # Do not include libc_r directly, use -pthread flag. | ||
1585 | continue | ||
1586 | ;; | ||
1587 | esac | ||
1588 | fi | ||
1589 | deplibs="$deplibs $arg" | ||
1590 | continue | ||
1591 | ;; | ||
1592 | |||
1593 | # Tru64 UNIX uses -model [arg] to determine the layout of C++ | ||
1594 | # classes, name mangling, and exception handling. | ||
1595 | -model) | ||
1596 | compile_command="$compile_command $arg" | ||
1597 | compiler_flags="$compiler_flags $arg" | ||
1598 | finalize_command="$finalize_command $arg" | ||
1599 | prev=xcompiler | ||
1600 | continue | ||
1601 | ;; | ||
1602 | |||
1603 | -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) | ||
1604 | compiler_flags="$compiler_flags $arg" | ||
1605 | compile_command="$compile_command $arg" | ||
1606 | finalize_command="$finalize_command $arg" | ||
1607 | continue | ||
1608 | ;; | ||
1609 | |||
1610 | -module) | ||
1611 | module=yes | ||
1612 | continue | ||
1613 | ;; | ||
1614 | |||
1615 | # -64, -mips[0-9] enable 64-bit mode on the SGI compiler | ||
1616 | # -r[0-9][0-9]* specifies the processor on the SGI compiler | ||
1617 | # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler | ||
1618 | # +DA*, +DD* enable 64-bit mode on the HP compiler | ||
1619 | # -q* pass through compiler args for the IBM compiler | ||
1620 | # -m* pass through architecture-specific compiler args for GCC | ||
1621 | # -m*, -t[45]*, -txscale* pass through architecture-specific | ||
1622 | # compiler args for GCC | ||
1623 | # -pg pass through profiling flag for GCC | ||
1624 | # @file GCC response files | ||
1625 | -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ | ||
1626 | -t[45]*|-txscale*|@*) | ||
1627 | |||
1628 | # Unknown arguments in both finalize_command and compile_command need | ||
1629 | # to be aesthetically quoted because they are evaled later. | ||
1630 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | ||
1631 | case $arg in | ||
1632 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
1633 | arg="\"$arg\"" | ||
1634 | ;; | ||
1635 | esac | ||
1636 | compile_command="$compile_command $arg" | ||
1637 | finalize_command="$finalize_command $arg" | ||
1638 | compiler_flags="$compiler_flags $arg" | ||
1639 | continue | ||
1640 | ;; | ||
1641 | |||
1642 | -shrext) | ||
1643 | prev=shrext | ||
1644 | continue | ||
1645 | ;; | ||
1646 | |||
1647 | -no-fast-install) | ||
1648 | fast_install=no | ||
1649 | continue | ||
1650 | ;; | ||
1651 | |||
1652 | -no-install) | ||
1653 | case $host in | ||
1654 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) | ||
1655 | # The PATH hackery in wrapper scripts is required on Windows | ||
1656 | # in order for the loader to find any dlls it needs. | ||
1657 | $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 | ||
1658 | $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 | ||
1659 | fast_install=no | ||
1660 | ;; | ||
1661 | *) no_install=yes ;; | ||
1662 | esac | ||
1663 | continue | ||
1664 | ;; | ||
1665 | |||
1666 | -no-undefined) | ||
1667 | allow_undefined=no | ||
1668 | continue | ||
1669 | ;; | ||
1670 | |||
1671 | -objectlist) | ||
1672 | prev=objectlist | ||
1673 | continue | ||
1674 | ;; | ||
1675 | |||
1676 | -o) prev=output ;; | ||
1677 | |||
1678 | -precious-files-regex) | ||
1679 | prev=precious_regex | ||
1680 | continue | ||
1681 | ;; | ||
1682 | |||
1683 | -release) | ||
1684 | prev=release | ||
1685 | continue | ||
1686 | ;; | ||
1687 | |||
1688 | -rpath) | ||
1689 | prev=rpath | ||
1690 | continue | ||
1691 | ;; | ||
1692 | |||
1693 | -R) | ||
1694 | prev=xrpath | ||
1695 | continue | ||
1696 | ;; | ||
1697 | |||
1698 | -R*) | ||
1699 | dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` | ||
1700 | # We need an absolute path. | ||
1701 | case $dir in | ||
1702 | [\\/]* | [A-Za-z]:[\\/]*) ;; | ||
1703 | *) | ||
1704 | $echo "$modename: only absolute run-paths are allowed" 1>&2 | ||
1705 | exit $EXIT_FAILURE | ||
1706 | ;; | ||
1707 | esac | ||
1708 | case "$xrpath " in | ||
1709 | *" $dir "*) ;; | ||
1710 | *) xrpath="$xrpath $dir" ;; | ||
1711 | esac | ||
1712 | continue | ||
1713 | ;; | ||
1714 | |||
1715 | -static) | ||
1716 | # The effects of -static are defined in a previous loop. | ||
1717 | # We used to do the same as -all-static on platforms that | ||
1718 | # didn't have a PIC flag, but the assumption that the effects | ||
1719 | # would be equivalent was wrong. It would break on at least | ||
1720 | # Digital Unix and AIX. | ||
1721 | continue | ||
1722 | ;; | ||
1723 | |||
1724 | -thread-safe) | ||
1725 | thread_safe=yes | ||
1726 | continue | ||
1727 | ;; | ||
1728 | |||
1729 | -version-info) | ||
1730 | prev=vinfo | ||
1731 | continue | ||
1732 | ;; | ||
1733 | -version-number) | ||
1734 | prev=vinfo | ||
1735 | vinfo_number=yes | ||
1736 | continue | ||
1737 | ;; | ||
1738 | |||
1739 | -Wc,*) | ||
1740 | args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` | ||
1741 | arg= | ||
1742 | save_ifs="$IFS"; IFS=',' | ||
1743 | for flag in $args; do | ||
1744 | IFS="$save_ifs" | ||
1745 | case $flag in | ||
1746 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
1747 | flag="\"$flag\"" | ||
1748 | ;; | ||
1749 | esac | ||
1750 | arg="$arg $wl$flag" | ||
1751 | compiler_flags="$compiler_flags $flag" | ||
1752 | done | ||
1753 | IFS="$save_ifs" | ||
1754 | arg=`$echo "X$arg" | $Xsed -e "s/^ //"` | ||
1755 | ;; | ||
1756 | |||
1757 | -Wl,*) | ||
1758 | args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` | ||
1759 | arg= | ||
1760 | save_ifs="$IFS"; IFS=',' | ||
1761 | for flag in $args; do | ||
1762 | IFS="$save_ifs" | ||
1763 | case $flag in | ||
1764 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
1765 | flag="\"$flag\"" | ||
1766 | ;; | ||
1767 | esac | ||
1768 | arg="$arg $wl$flag" | ||
1769 | compiler_flags="$compiler_flags $wl$flag" | ||
1770 | linker_flags="$linker_flags $flag" | ||
1771 | done | ||
1772 | IFS="$save_ifs" | ||
1773 | arg=`$echo "X$arg" | $Xsed -e "s/^ //"` | ||
1774 | ;; | ||
1775 | |||
1776 | -Xcompiler) | ||
1777 | prev=xcompiler | ||
1778 | continue | ||
1779 | ;; | ||
1780 | |||
1781 | -Xlinker) | ||
1782 | prev=xlinker | ||
1783 | continue | ||
1784 | ;; | ||
1785 | |||
1786 | -XCClinker) | ||
1787 | prev=xcclinker | ||
1788 | continue | ||
1789 | ;; | ||
1790 | |||
1791 | # Some other compiler flag. | ||
1792 | -* | +*) | ||
1793 | # Unknown arguments in both finalize_command and compile_command need | ||
1794 | # to be aesthetically quoted because they are evaled later. | ||
1795 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | ||
1796 | case $arg in | ||
1797 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
1798 | arg="\"$arg\"" | ||
1799 | ;; | ||
1800 | esac | ||
1801 | ;; | ||
1802 | |||
1803 | *.$objext) | ||
1804 | # A standard object. | ||
1805 | objs="$objs $arg" | ||
1806 | ;; | ||
1807 | |||
1808 | *.lo) | ||
1809 | # A libtool-controlled object. | ||
1810 | |||
1811 | # Check to see that this really is a libtool object. | ||
1812 | if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | ||
1813 | pic_object= | ||
1814 | non_pic_object= | ||
1815 | |||
1816 | # Read the .lo file | ||
1817 | # If there is no directory component, then add one. | ||
1818 | case $arg in | ||
1819 | */* | *\\*) . $arg ;; | ||
1820 | *) . ./$arg ;; | ||
1821 | esac | ||
1822 | |||
1823 | if test -z "$pic_object" || \ | ||
1824 | test -z "$non_pic_object" || | ||
1825 | test "$pic_object" = none && \ | ||
1826 | test "$non_pic_object" = none; then | ||
1827 | $echo "$modename: cannot find name of object for \`$arg'" 1>&2 | ||
1828 | exit $EXIT_FAILURE | ||
1829 | fi | ||
1830 | |||
1831 | # Extract subdirectory from the argument. | ||
1832 | xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` | ||
1833 | if test "X$xdir" = "X$arg"; then | ||
1834 | xdir= | ||
1835 | else | ||
1836 | xdir="$xdir/" | ||
1837 | fi | ||
1838 | |||
1839 | if test "$pic_object" != none; then | ||
1840 | # Prepend the subdirectory the object is found in. | ||
1841 | pic_object="$xdir$pic_object" | ||
1842 | |||
1843 | if test "$prev" = dlfiles; then | ||
1844 | if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then | ||
1845 | dlfiles="$dlfiles $pic_object" | ||
1846 | prev= | ||
1847 | continue | ||
1848 | else | ||
1849 | # If libtool objects are unsupported, then we need to preload. | ||
1850 | prev=dlprefiles | ||
1851 | fi | ||
1852 | fi | ||
1853 | |||
1854 | # CHECK ME: I think I busted this. -Ossama | ||
1855 | if test "$prev" = dlprefiles; then | ||
1856 | # Preload the old-style object. | ||
1857 | dlprefiles="$dlprefiles $pic_object" | ||
1858 | prev= | ||
1859 | fi | ||
1860 | |||
1861 | # A PIC object. | ||
1862 | libobjs="$libobjs $pic_object" | ||
1863 | arg="$pic_object" | ||
1864 | fi | ||
1865 | |||
1866 | # Non-PIC object. | ||
1867 | if test "$non_pic_object" != none; then | ||
1868 | # Prepend the subdirectory the object is found in. | ||
1869 | non_pic_object="$xdir$non_pic_object" | ||
1870 | |||
1871 | # A standard non-PIC object | ||
1872 | non_pic_objects="$non_pic_objects $non_pic_object" | ||
1873 | if test -z "$pic_object" || test "$pic_object" = none ; then | ||
1874 | arg="$non_pic_object" | ||