diff options
author | Christian Grothoff <christian@grothoff.org> | 2006-08-18 21:41:52 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2006-08-18 21:41:52 +0000 |
commit | b82c4802264edfd48c0d562e440fe4edbfb60f5d (patch) | |
tree | d27af4b6401663cd2fe097f56427b0fbb56ad3a9 | |
download | libmicrohttpd-b82c4802264edfd48c0d562e440fe4edbfb60f5d.tar.gz libmicrohttpd-b82c4802264edfd48c0d562e440fe4edbfb60f5d.zip |
lws
91 files changed, 24439 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..4546b619 --- /dev/null +++ b/AUTHORS | |||
@@ -0,0 +1,27 @@ | |||
1 | Luis Figueiredo (stdio@netc.pt) | ||
2 | Main Programmer, designer | ||
3 | |||
4 | Christian Grothoff (christian@grothoff.org) | ||
5 | Adaptation for GNUnet (work in progress) | ||
6 | |||
7 | People who contributed: | ||
8 | Joćo Luis Marques (lamego@ptlink.net) | ||
9 | minor bug reported (redirectors, stdout) | ||
10 | 'oddsock' (oddsock@oddsock.org) | ||
11 | Licensing tip, and minor bug reported (segv in querystring) | ||
12 | Rocco Carbone (rocco@tecsiel.it) | ||
13 | Return code for web_server_run tip | ||
14 | Johannes E. Schindelin (Johannes.Schindelin@gmx.de) | ||
15 | Spell checking, Makefile portability, and security 'How do I create my own certificate?' | ||
16 | bugfixes, examples hello world! | ||
17 | Richard Offer (offer@sgi.com) | ||
18 | checkboxes, (multiple variables) tip | ||
19 | Sven Anders (anders@anduras.de) | ||
20 | new web_client_setcookie() | ||
21 | Hilobok Andrew (han@km.if.ua) | ||
22 | FreeBSD portability | ||
23 | |||
24 | #linuxhelp @ ptnet.org | ||
25 | |||
26 | Rui - to let me know the existence of strftime (yeah i didn't knew) | ||
27 | Joćo Luis Marques Pinto - a problem with redirection (stdout & exit()); | ||
diff --git a/COPYING b/COPYING new file mode 100644 index 00000000..807db791 --- /dev/null +++ b/COPYING | |||
@@ -0,0 +1,506 @@ | |||
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 new file mode 100644 index 00000000..1b60ef9e --- /dev/null +++ b/COPYRIGHT | |||
@@ -0,0 +1,7 @@ | |||
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/ChangeLog b/ChangeLog new file mode 100644 index 00000000..f0661cd6 --- /dev/null +++ b/ChangeLog | |||
@@ -0,0 +1,245 @@ | |||
1 | Fri Aug 18 15:21:30 PDT 2006 | ||
2 | Starting to adopt the code to the GNUnet build system. | ||
3 | Applied patch to allow for shutdown. | ||
4 | |||
5 | 0.5.3 | ||
6 | Wen Apr 28 14:52:43 GMT 2004 | ||
7 | Luis Figueiredo -- Long time no see, i've decided to check one mail dated from released version 0.5.2, was about cookies | ||
8 | it seems that was no problem to me, but i made a minor changes anyway | ||
9 | void web_client_setcookie(char *name, char *value, char *timeoutf, char *path, char *domain, int secure) | ||
10 | path and domain, can be called as "" for disable, instead of previous only, NULL that disables the domain and path | ||
11 | Tue Jan 13 18:43:11 GMT 2004 | ||
12 | Luis Figueiredo -- I've put a prefix in each internal function "__ILWS_" | ||
13 | |||
14 | Wen Oct 22 18:38:52 GMT 2003 | ||
15 | Luis Figueiredo -- Applied some changes reported by (freebsd port): Hilobok Andrew (han@km.if.ua), added Last-Modified on lws_list(); improved file handling | ||
16 | |||
17 | Thu Sep 25 13:11:21 GMT 2003 | ||
18 | Luis Figueiredo -- Minor change the ClientInfo->request also gives the '/' (for lws_list) | ||
19 | |||
20 | Wen Sep 24 23:02:51 GMT 2003 | ||
21 | Luis Figueiredo -- Corrected some code (for portability) reported by Hilobok Andrew (han@km.if.ua) | ||
22 | 0.5.2 | ||
23 | Thu Sep 18 21:33:05 GMT 2003 | ||
24 | Luis Figueiredo -- Changed function set_EGApalette to web_client_gifsetpalette("filename.act oe "EGA");, and web_client_outputgif to web_client_gifoutput | ||
25 | (sorry for usual users of web_client_gif* :P) | ||
26 | |||
27 | Sun Sep 14 22:29:02 GMT 2003 | ||
28 | Luis Figueiredo -- new functions added (web_server_aliasdir, web_server_useMIMEfile, web_client_contenttype); | ||
29 | |||
30 | 0.5.1 | ||
31 | Wen Sep 10 17:56:14 GMT 2003 | ||
32 | Luis Figueiredo -- Code clean up, new error system! | ||
33 | |||
34 | Sex Sep 05 19:12:14 GMT 2003 | ||
35 | Luis Figueiredo -- improved the function tmpfname, added documentation to section security | ||
36 | |||
37 | Sex Sep 05 06:16:01 GMT 2003 | ||
38 | Luis Figueiredo -- i have lie down late, lately :o), well add_oustream prototipe changed to handle flock (filelock) | ||
39 | to avoid race condition on temorary files, added the util funtion for winnt flock | ||
40 | |||
41 | -- changed way to log "stetic?" | ||
42 | |||
43 | -- calculate and outputs Content-rage and Content-length if the get handler has the WS_USELEN turned on | ||
44 | |||
45 | Wen Sep 03 05:57:11 GMT 2003 | ||
46 | Luis Figueiredo -- one day after (almost literaly), corrected something in ClientInfo->Cookie(), | ||
47 | And an new feature to web_client_setcookie, this function can now be called after end of headers. | ||
48 | |||
49 | Tue Sep 02 05:28:11 GMT 2003 | ||
50 | Luis Figueiredo -- oh my!, nice hour for coding, finished 206 (partial content) resuming (Content-range:) | ||
51 | |||
52 | Mon Sep 01 19:35:32 GMT 2003 | ||
53 | Luis Figueiredo -- now output header : "Content-length:" | ||
54 | |||
55 | Mon Sep 01 06:22:21 GMT 2003 | ||
56 | Luis Figueiredo -- read_client optimized for speed (select removed, non_block sockets only) | ||
57 | |||
58 | Sex Aug 29 16:07:15 GMT 2003 | ||
59 | Luis Figueiredo -- Corrected a bug on output_client() (writetemp) if the lib doesn't output (EAGAIN) the function | ||
60 | was returning, and retry using local variable writetemp (reading new data), now fseeks to last data written | ||
61 | |||
62 | Fri Aug 22 15:20:31 GMT 2003 | ||
63 | Luis Figueiredo -- removed engine.h from help server (read the source if you want to know how it works), some changes in web_server_getconf! | ||
64 | |||
65 | Thu Aug 15 16:59:04 GMT 2003 | ||
66 | Luis Figueiredo -- New functions and flag, flag is WS_DYNVAR (handler), to use dynamic variables on data ouput | ||
67 | web_client_setvar, web_client_delvar , web_client_getvar, exchanges "$variable;" into 'variable' value | ||
68 | previous defined with web_client_setvar("variable","something"); | ||
69 | |||
70 | 0.5.0 | ||
71 | |||
72 | Wen Jul 30 03:45:28 GMT 2003 | ||
73 | Luis Figueiredo -- IE 5.0 was confusing me with no \r\n\r\n after post data, i solved the problem using content-length value | ||
74 | changed errno (on output_client) to WSAGetLastError() on windows (#ifdef WIN32) | ||
75 | |||
76 | Fri Jul 25 06:10:03 GMT 2003 | ||
77 | Luis Figueiredo -- Work around outgif.c, to support transparency | ||
78 | |||
79 | Wen Jul 21 20:13:12 GMT 2003 | ||
80 | Luis Figueiredo -- Added set_gifEGApalette(), and global var GLOBALGIFPAL for web_client_outputgif(); | ||
81 | |||
82 | Tue Jul 15 15:31:10 GMT 2003 | ||
83 | Luis Figueiredo -- Start develop the config file, added some new elements to struct server, Added a ClientInfo->Conf( to get entries from config file ) | ||
84 | |||
85 | Thu Apr 10 14:11:31 GMT 2003 | ||
86 | Luis Figueiredo -- Some changes on web_client_setcookie() made by Sven Anders <anders@anduras.de> applied | ||
87 | |||
88 | Thu Apr 10 14:11:34 GMT 2003 | ||
89 | Luis Figueiredo -- Some bugfixes reported by (http://www.stanford.edu/~engler) Ken Ashcraft <kash@stanford.edu> | ||
90 | |||
91 | 0.4.1 | ||
92 | |||
93 | Thu Mar 20 14:35:23 GMT 2003 | ||
94 | Luis Figueiredo -- Fuck war! :o), minor Changes in help server | ||
95 | |||
96 | Wen Mar 19 21:46:32 GMT 2003 | ||
97 | Luis Figueiredo -- new features for checkbox (or multiple variables) ClientInfo->Query("#xpto") returns the number of references to xpto | ||
98 | ClientInfo->Query("xpto") gives one value and fetches to another; if "#xpto" is bigger than one, "xpto" called twice will be diferent | ||
99 | |||
100 | Fri Mar 07 11:29:12 GMT 2003 | ||
101 | Luis Figueiredo -- Added the extern "C" {} to web_server.h | ||
102 | |||
103 | 0.4.0 // new features and fixes (new version) | ||
104 | |||
105 | Wen Feb 12 16:23:13 GMT 2003 | ||
106 | Luis Figueiredo -- Added Cookie example, and Johannes E. Schindelin entered on project (officialy) | ||
107 | |||
108 | Mon Feb 09 17:24:45 GMT 2003 | ||
109 | Luis Figueiredo -- web_client_setcookie(); done, Changed ClientInfo->Header(),Post(),Query(); when is called with | ||
110 | NULL argument, this function returns whole client header; | ||
111 | Added ClientInfo->Cookie(); | ||
112 | |||
113 | Wen Feb 05 22:12:03 GMT 2003 | ||
114 | Luis Figueiredo -- Start to develop web_client_setcookie(); | ||
115 | |||
116 | Fri Jan 31 05:24:31 GMT 2003 | ||
117 | Johannes E. Schindelin (patch) -- More spell checking (even in the code, heh!) client.h, client.c, examples.html functions.html info.html security.html | ||
118 | He also added an example (hello_world) | ||
119 | bugfix on clientinfo.c: post data and query data! | ||
120 | Sun Jan 26 21:22:34 GMT 2003 | ||
121 | Luis Figueiredo -- Change the order of ChangeLog (this file) (was last version on Bottom) | ||
122 | |||
123 | Thu Jan 23 17:10:11 GMT 2003 | ||
124 | Luis Figueiredo -- Patch from Johannes E. Schindelin, spell checking and make file portabilitie | ||
125 | |||
126 | 0.3.5 | ||
127 | |||
128 | Mon Jan 20 01:43:45 GMT 2003 | ||
129 | Luis Figueiredo -- Changed the return codes from web_server_run() (Rocco Carbone [rocco@tecsiel.it] ideia), and some minor fix's on socket.c | ||
130 | |||
131 | Sat Jan 18 18:31:23 GMT 2003 | ||
132 | Luis Figueiredo -- Corrected a querystring parser error(thanks 'oddsock') | ||
133 | |||
134 | 0.3.4 | ||
135 | |||
136 | Fri Dec 27 20:01:04 GMT 2002 | ||
137 | Luis Figueiredo -- using closesocket (when deleting client) on WIN32, when client lost the connection the stat is (5) (5 delete client) | ||
138 | |||
139 | Thu Dec 26 23:16:21 GMT 2002 | ||
140 | Luis Figueiredo -- (outstream.[ch]) Added an argument to add_outstream (char *fname); since the lib have a problem with atributing to stdout (*stdout=*nfile), | ||
141 | changed the tmpfile(), to 'tmpnam' (tmpfname) and use freopen; (unlinking fname when deleting outstreams) | ||
142 | 0.3.3 | ||
143 | |||
144 | Wen Nov 27 18:16:34 GMT 2002 | ||
145 | Luis Figueiredo -- Produces output files to projectroot/bin | ||
146 | |||
147 | Wen Nov 27 00:24:31 GMT 2002 | ||
148 | Luis Figueiredo -- Built strncasecmp function (Win32 doesn't have) for using in strcasestr (MultiPart in clientinfo) | ||
149 | |||
150 | Mon Nov 25 16:16:23 GMT 2002 | ||
151 | Luis Figueiredo -- Help html's converted into header files, help server, doesn't need external files now, help.html directory moved to project root | ||
152 | |||
153 | Fri Nov 22 17:45:34 GMT 2002 | ||
154 | Luis Figueiredo -- Win32 project files and help server updated | ||
155 | |||
156 | Sat Nov 16 21:22:13 GMT 2002 | ||
157 | Luis Figueiredo -- Example SoundRecorder w/ new features | ||
158 | |||
159 | Fri Nov 15 20:38:48 GMT 2002 | ||
160 | Luis Figueiredo -- Mem checker added (case of low mem) | ||
161 | |||
162 | 0.3.2 | ||
163 | |||
164 | Fri Nov 15 11:11:50 GMT 2002 | ||
165 | Luis Figueiredo -- Added a new example (SoundRecorder) | ||
166 | |||
167 | Fri Nov 15 00:37:44 GMT 2002 | ||
168 | Luis Figueiredo -- Created make install | ||
169 | |||
170 | Thu Nov 14 19:45:47 GMT 2002 | ||
171 | Luis Figueiredo -- Changed client.c (now outputs 400 invalid request) | ||
172 | |||
173 | Wed Nov 13 23:39:46 GMT 2002 | ||
174 | Luis Figueiredo -- added a feature, (web_client_outputgif) using xvgifwr.c (from xv 3.10a) | ||
175 | module is callod outgif.c | ||
176 | |||
177 | Wed Nov 13 04:27:12 GMT 2002 | ||
178 | Luis Figueiredo -- Added a debug program (.pl) http butcher | ||
179 | |||
180 | Wed Nov 13 04:06:48 GMT 2002 | ||
181 | Luis Figueiredo -- Fixed up a minor bug on client read data, make rule dist (to create package on makefile), removed Hdrdate to new mydate (using strftime) | ||
182 | discard hextoi to using strtol(str,NULL,16) | ||
183 | 0.3.1 | ||
184 | |||
185 | Sun Nov 10 21:05:40 GMT 2002 | ||
186 | Luis Figueiredo -- Code cleanup, removed useless functions, developing documentation | ||
187 | |||
188 | Sun Nov 10 12:08:02 GMT 2002 | ||
189 | Luis Figueiredo -- Changed regex to fnmatch once again (regex was giving problems w/ portability, and fnmatch is easier to use for | ||
190 | newbies) | ||
191 | |||
192 | |||
193 | Thu Nov 7 20:05:48 GMT 2002 | ||
194 | Luis Figueiredo -- create module (utils.c) for base64decode, hextoi, strcasestr, Add documentation to example | ||
195 | |||
196 | |||
197 | Wed Nov 6 16:12:22 GMT 2002 | ||
198 | Luis Figueiredo -- Changed again way of determine that the client sent all data, it checks about 5 times if doesn't have new data, | ||
199 | then marks all data readed, ClientInfo upload files (MultiPart) done, wow, new logo, | ||
200 | supports (enctype='Multipart/form-data') (tested in lynx and netscape and IE) | ||
201 | |||
202 | Thu Oct 31 18:11:28 GMT 2002 | ||
203 | Luis Figueiredo -- Optimized functions Post,Header,Query // now holds the already queryied into a list, when it requests again | ||
204 | lib doesn't process request gives the saved data: ex: | ||
205 | if(ClientInfo->Query("queryval")) { // query val doesn't exists in list add | ||
206 | blah=atoi(ClientInfo->Query("queryval")); // return previous saved val that's on the list | ||
207 | }; | ||
208 | better for memory and speed optimizations | ||
209 | |||
210 | 0.3.0 and previous | ||
211 | |||
212 | Wed Oct 30 22:54:37 GMT 2002 | ||
213 | Luis Figueiredo -- Changed way of determine that the client sent all data | ||
214 | before: | ||
215 | if there is no more data then search \r\n\r\n in the hole data readed // wrong, multipart/form-data was not doing right now | ||
216 | now: | ||
217 | if there is no more data then if the last two bytes is \r\n then mark all readed and process // i think that need improvments | ||
218 | |||
219 | Mon Oct 14 20:20:05 GMT 2002 | ||
220 | Luis Figueiredo -- An example of a cgi handler was made, added the Date: header to server header | ||
221 | |||
222 | Mon Oct 7 16:56:15 GMT 2002 | ||
223 | Luis Figueiredo -- Repaired some safe bugs, Added vars to stats proposes, inserted an liblogo, added debug instructions | ||
224 | |||
225 | Wed Apr 10 20:02:55 GMT 2002 | ||
226 | Luis Figueiredo -- Make use of autoconf , removed open_memstream (doesn't work well w/ stdout structure on netbsd portability) | ||
227 | linux slack 7.1 uses "extern FILE *stdout", netbsd uses "extern FILE __sF[]" so i cannot make use of pointers | ||
228 | |||
229 | Mon Apr 8 15:04:31 GMT 2002 | ||
230 | Luis Figueiredo -- Oh my.. kurt cobain is dead :o), restructured the code, separated into various files | ||
231 | |||
232 | Wed Mar 27 18:59:10 GMT 2002 | ||
233 | Luis Figueiredo -- using regex instead of fnmatch(fnmatch only appears becouse of apache, i didn't knew it) | ||
234 | |||
235 | Mon Mar 25 14:46:13 GMT 2002 | ||
236 | Luis Figueiredo -- wow, one month later..., discard web_server_addstr, and now process the stdout to server | ||
237 | using a tmpfile for streaming (not so good, but :o)) | ||
238 | |||
239 | Mon Feb 25 06:27:58 GMT 2002 | ||
240 | Luis Figueiredo -- Many corrections and new functions were added, until today | ||
241 | |||
242 | Fri Dec 28 12:51:11 GMT 2001 | ||
243 | Luis Figueiredo -- I Corrected the input to handle only data when \n\r(twice) is arrived | ||
244 | |||
245 | |||
diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..54caf7c1 --- /dev/null +++ b/INSTALL | |||
@@ -0,0 +1,229 @@ | |||
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 new file mode 100644 index 00000000..3f11093b --- /dev/null +++ b/Makefile.am | |||
@@ -0,0 +1,3 @@ | |||
1 | SUBDIRS = include src | ||
2 | |||
3 | |||
@@ -0,0 +1 @@ | |||
See ChangeLog. | |||
@@ -0,0 +1,7 @@ | |||
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. | ||
@@ -0,0 +1,51 @@ | |||
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/config.guess b/config.guess new file mode 100755 index 00000000..396482d6 --- /dev/null +++ b/config.guess | |||
@@ -0,0 +1,1500 @@ | |||
1 | #! /bin/sh | ||
2 | # Attempt to guess a canonical system name. | ||
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 free software; you can redistribute it and/or modify it | ||
10 | # under the terms of the GNU General Public License as published by | ||
11 | # the Free Software Foundation; either version 2 of the License, or | ||
12 | # (at your option) any later version. | ||
13 | # | ||
14 | # This program is distributed in the hope that it will be useful, but | ||
15 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | # General Public License for more details. | ||
18 | # | ||
19 | # You should have received a copy of the GNU General Public License | ||
20 | # along with this program; if not, write to the Free Software | ||
21 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA | ||
22 | # 02110-1301, USA. | ||
23 | # | ||
24 | # As a special exception to the GNU General Public License, if you | ||
25 | # distribute this file as part of a program that contains a | ||
26 | # configuration script generated by Autoconf, you may include it under | ||
27 | # the same distribution terms that you use for the rest of that program. | ||
28 | |||
29 | |||
30 | # Originally written by Per Bothner <per@bothner.com>. | ||
31 | # Please send patches to <config-patches@gnu.org>. Submit a context | ||
32 | # diff and a properly formatted ChangeLog entry. | ||
33 | # | ||
34 | # This script attempts to guess a canonical system name similar to | ||
35 | # config.sub. If it succeeds, it prints the system name on stdout, and | ||
36 | # exits with 0. Otherwise, it exits with 1. | ||
37 | # | ||
38 | # The plan is that this can be called by configure scripts if you | ||
39 | # don't specify an explicit build system type. | ||
40 | |||
41 | me=`echo "$0" | sed -e 's,.*/,,'` | ||
42 | |||
43 | usage="\ | ||
44 | Usage: $0 [OPTION] | ||
45 | |||
46 | Output the configuration name of the system \`$me' is run on. | ||
47 | |||
48 | Operation modes: | ||
49 | -h, --help print this help, then exit | ||
50 | -t, --time-stamp print date of last modification, then exit | ||
51 | -v, --version print version number, then exit | ||
52 | |||
53 | Report bugs and patches to <config-patches@gnu.org>." | ||
54 | |||
55 | version="\ | ||
56 | GNU config.guess ($timestamp) | ||
57 | |||
58 | Originally written by Per Bothner. | ||
59 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 | ||
60 | Free Software Foundation, Inc. | ||
61 | |||
62 | This is free software; see the source for copying conditions. There is NO | ||
63 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | ||
64 | |||
65 | help=" | ||
66 | Try \`$me --help' for more information." | ||
67 | |||
68 | # Parse command line | ||
69 | while test $# -gt 0 ; do | ||
70 | case $1 in | ||
71 | --time-stamp | --time* | -t ) | ||
72 | echo "$timestamp" ; exit ;; | ||
73 | --version | -v ) | ||
74 | echo "$version" ; exit ;; | ||
75 | --help | --h* | -h ) | ||
76 | echo "$usage"; exit ;; | ||
77 | -- ) # Stop option processing | ||
78 | shift; break ;; | ||
79 | - ) # Use stdin as input. | ||
80 | break ;; | ||
81 | -* ) | ||
82 | echo "$me: invalid option $1$help" >&2 | ||
83 | exit 1 ;; | ||
84 | * ) | ||
85 | break ;; | ||
86 | esac | ||
87 | done | ||
88 | |||
89 | if test $# != 0; then | ||
90 | echo "$me: too many arguments$help" >&2 | ||
91 | exit 1 | ||
92 | fi | ||
93 | |||
94 | trap 'exit 1' 1 2 15 | ||
95 | |||
96 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a | ||
97 | # compiler to aid in system detection is discouraged as it requires | ||
98 | # temporary files to be created and, as you can see below, it is a | ||
99 | # headache to deal with in a portable fashion. | ||
100 | |||
101 | # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still | ||
102 | # use `HOST_CC' if defined, but it is deprecated. | ||
103 | |||
104 | # Portable tmp directory creation inspired by the Autoconf team. | ||
105 | |||
106 | set_cc_for_build=' | ||
107 | trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; | ||
108 | trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; | ||
109 | : ${TMPDIR=/tmp} ; | ||
110 | { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || | ||
111 | { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || | ||
112 | { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || | ||
113 | { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; | ||
114 | dummy=$tmp/dummy ; | ||
115 | tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; | ||
116 | case $CC_FOR_BUILD,$HOST_CC,$CC in | ||
117 | ,,) echo "int x;" > $dummy.c ; | ||
118 | for c in cc gcc c89 c99 ; do | ||
119 | if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then | ||
120 | CC_FOR_BUILD="$c"; break ; | ||
121 | fi ; | ||
122 | done ; | ||
123 | if test x"$CC_FOR_BUILD" = x ; then | ||
124 | CC_FOR_BUILD=no_compiler_found ; | ||
125 | fi | ||
126 | ;; | ||
127 | ,,*) CC_FOR_BUILD=$CC ;; | ||
128 | ,*,*) CC_FOR_BUILD=$HOST_CC ;; | ||
129 | esac ; set_cc_for_build= ;' | ||
130 | |||
131 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. | ||
132 | # (ghazi@noc.rutgers.edu 1994-08-24) | ||
133 | if (test -f /.attbin/uname) >/dev/null 2>&1 ; then | ||
134 | PATH=$PATH:/.attbin ; export PATH | ||
135 | fi | ||
136 | |||
137 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown | ||
138 | UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown | ||
139 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | ||
140 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown | ||
141 | |||
142 | # Note: order is significant - the case branches are not exclusive. | ||
143 | |||
144 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | ||
145 | *:NetBSD:*:*) | ||
146 | # NetBSD (nbsd) targets should (where applicable) match one or | ||
147 | # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, | ||
148 | # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently | ||
149 | # switched to ELF, *-*-netbsd* would select the old | ||
150 | # object file format. This provides both forward | ||
151 | # compatibility and a consistent mechanism for selecting the | ||
152 | # object file format. | ||
153 | # | ||
154 | # Note: NetBSD doesn't particularly care about the vendor | ||
155 | # portion of the name. We always set it to "unknown". | ||
156 | sysctl="sysctl -n hw.machine_arch" | ||
157 | UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ | ||
158 | /usr/sbin/$sysctl 2>/dev/null || echo unknown)` | ||
159 | case "${UNAME_MACHINE_ARCH}" in | ||
160 | armeb) machine=armeb-unknown ;; | ||
161 | arm*) machine=arm-unknown ;; | ||
162 | sh3el) machine=shl-unknown ;; | ||
163 | sh3eb) machine=sh-unknown ;; | ||
164 | *) machine=${UNAME_MACHINE_ARCH}-unknown ;; | ||
165 | esac | ||
166 | # The Operating System including object format, if it has switched | ||
167 | # to ELF recently, or will in the future. | ||
168 | case "${UNAME_MACHINE_ARCH}" in | ||
169 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) | ||
170 | eval $set_cc_for_build | ||
171 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | ||
172 | | grep __ELF__ >/dev/null | ||
173 | then | ||
174 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). | ||
175 | # Return netbsd for either. FIX? | ||
176 | os=netbsd | ||
177 | else | ||
178 | os=netbsdelf | ||
179 | fi | ||
180 | ;; | ||
181 | *) | ||
182 | os=netbsd | ||
183 | ;; | ||
184 | esac | ||
185 | # The OS release | ||
186 | # Debian GNU/NetBSD machines have a different userland, and | ||
187 | # thus, need a distinct triplet. However, they do not need | ||
188 | # kernel version information, so it can be replaced with a | ||
189 | # suitable tag, in the style of linux-gnu. | ||
190 | case "${UNAME_VERSION}" in | ||
191 | Debian*) | ||
192 | release='-gnu' | ||
193 | ;; | ||
194 | *) | ||
195 | release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | ||
196 | ;; | ||
197 | esac | ||
198 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: | ||
199 | # contains redundant information, the shorter form: | ||
200 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. | ||
201 | echo "${machine}-${os}${release}" | ||
202 | exit ;; | ||
203 | *:OpenBSD:*:*) | ||
204 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` | ||
205 | echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} | ||
206 | exit ;; | ||
207 | *:ekkoBSD:*:*) | ||
208 | echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} | ||
209 | exit ;; | ||
210 | *:SolidBSD:*:*) | ||
211 | echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} | ||
212 | exit ;; | ||
213 | macppc:MirBSD:*:*) | ||
214 | echo powerpc-unknown-mirbsd${UNAME_RELEASE} | ||
215 | exit ;; | ||
216 | *:MirBSD:*:*) | ||
217 | echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} | ||
218 | exit ;; | ||
219 | alpha:OSF1:*:*) | ||
220 | case $UNAME_RELEASE in | ||
221 | *4.0) | ||
222 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` | ||
223 | ;; | ||
224 | *5.*) | ||
225 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` | ||
226 | ;; | ||
227 | esac | ||
228 | # According to Compaq, /usr/sbin/psrinfo has been available on | ||
229 | # OSF/1 and Tru64 systems produced since 1995. I hope that | ||
230 | # covers most systems running today. This code pipes the CPU | ||
231 | # types through head -n 1, so we only detect the type of CPU 0. | ||
232 | ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` | ||
233 | case "$ALPHA_CPU_TYPE" in | ||
234 | "EV4 (21064)") | ||
235 | UNAME_MACHINE="alpha" ;; | ||
236 | "EV4.5 (21064)") | ||
237 | UNAME_MACHINE="alpha" ;; | ||
238 | "LCA4 (21066/21068)") | ||
239 | UNAME_MACHINE="alpha" ;; | ||
240 | "EV5 (21164)") | ||
241 | UNAME_MACHINE="alphaev5" ;; | ||
242 | "EV5.6 (21164A)") | ||
243 | UNAME_MACHINE="alphaev56" ;; | ||
244 | "EV5.6 (21164PC)") | ||
245 | UNAME_MACHINE="alphapca56" ;; | ||
246 | "EV5.7 (21164PC)") | ||
247 | UNAME_MACHINE="alphapca57" ;; | ||
248 | "EV6 (21264)") | ||
249 | UNAME_MACHINE="alphaev6" ;; | ||
250 | "EV6.7 (21264A)") | ||
251 | UNAME_MACHINE="alphaev67" ;; | ||
252 | "EV6.8CB (21264C)") | ||
253 | UNAME_MACHINE="alphaev68" ;; | ||
254 | "EV6.8AL (21264B)") | ||
255 | UNAME_MACHINE="alphaev68" ;; | ||
256 | "EV6.8CX (21264D)") | ||
257 | UNAME_MACHINE="alphaev68" ;; | ||
258 | "EV6.9A (21264/EV69A)") | ||
259 | UNAME_MACHINE="alphaev69" ;; | ||
260 | "EV7 (21364)") | ||
261 | UNAME_MACHINE="alphaev7" ;; | ||
262 | "EV7.9 (21364A)") | ||
263 | UNAME_MACHINE="alphaev79" ;; | ||
264 | esac | ||
265 | # A Pn.n version is a patched version. | ||
266 | # A Vn.n version is a released version. | ||
267 | # A Tn.n version is a released field test version. | ||
268 | # A Xn.n version is an unreleased experimental baselevel. | ||
269 | # 1.2 uses "1.2" for uname -r. | ||
270 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | ||
271 | exit ;; | ||
272 | Alpha\ *:Windows_NT*:*) | ||
273 | # How do we know it's Interix rather than the generic POSIX subsystem? | ||
274 | # Should we change UNAME_MACHINE based on the output of uname instead | ||
275 | # of the specific Alpha model? | ||
276 | echo alpha-pc-interix | ||
277 | exit ;; | ||
278 | 21064:Windows_NT:50:3) | ||
279 | echo alpha-dec-winnt3.5 | ||
280 | exit ;; | ||
281 | Amiga*:UNIX_System_V:4.0:*) | ||
282 | echo m68k-unknown-sysv4 | ||
283 | exit ;; | ||
284 | *:[Aa]miga[Oo][Ss]:*:*) | ||
285 | echo ${UNAME_MACHINE}-unknown-amigaos | ||
286 | exit ;; | ||
287 | *:[Mm]orph[Oo][Ss]:*:*) | ||
288 | echo ${UNAME_MACHINE}-unknown-morphos | ||
289 | exit ;; | ||
290 | *:OS/390:*:*) | ||
291 | echo i370-ibm-openedition | ||
292 | exit ;; | ||
293 | *:z/VM:*:*) | ||
294 | echo s390-ibm-zvmoe | ||
295 | exit ;; | ||
296 | *:OS400:*:*) | ||
297 | echo powerpc-ibm-os400 | ||
298 | exit ;; | ||
299 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) | ||
300 | echo arm-acorn-riscix${UNAME_RELEASE} | ||
301 | exit ;; | ||
302 | arm:riscos:*:*|arm:RISCOS:*:*) | ||
303 | echo arm-unknown-riscos | ||
304 | exit ;; | ||
305 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) | ||
306 | echo hppa1.1-hitachi-hiuxmpp | ||
307 | exit ;; | ||
308 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) | ||
309 | # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. | ||
310 | if test "`(/bin/universe) 2>/dev/null`" = att ; then | ||
311 | echo pyramid-pyramid-sysv3 | ||
312 | else | ||
313 | echo pyramid-pyramid-bsd | ||
314 | fi | ||
315 | exit ;; | ||
316 | NILE*:*:*:dcosx) | ||
317 | echo pyramid-pyramid-svr4 | ||
318 | exit ;; | ||
319 | DRS?6000:unix:4.0:6*) | ||
320 | echo sparc-icl-nx6 | ||
321 | exit ;; | ||
322 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) | ||
323 | case `/usr/bin/uname -p` in | ||
324 | sparc) echo sparc-icl-nx7; exit ;; | ||
325 | esac ;; | ||
326 | sun4H:SunOS:5.*:*) | ||
327 | echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
328 | exit ;; | ||
329 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) | ||
330 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
331 | exit ;; | ||
332 | i86pc:SunOS:5.*:*) | ||
333 | echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
334 | exit ;; | ||
335 | sun4*:SunOS:6*:*) | ||
336 | # According to config.sub, this is the proper way to canonicalize | ||
337 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but | ||
338 | # it's likely to be more like Solaris than SunOS4. | ||
339 | echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
340 | exit ;; | ||
341 | sun4*:SunOS:*:*) | ||
342 | case "`/usr/bin/arch -k`" in | ||
343 | Series*|S4*) | ||
344 | UNAME_RELEASE=`uname -v` | ||
345 | ;; | ||
346 | esac | ||
347 | # Japanese Language versions have a version number like `4.1.3-JL'. | ||
348 | echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` | ||
349 | exit ;; | ||
350 | sun3*:SunOS:*:*) | ||
351 | echo m68k-sun-sunos${UNAME_RELEASE} | ||
352 | exit ;; | ||
353 | sun*:*:4.2BSD:*) | ||
354 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` | ||
355 | test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 | ||
356 | case "`/bin/arch`" in | ||
357 | sun3) | ||
358 | echo m68k-sun-sunos${UNAME_RELEASE} | ||
359 | ;; | ||
360 | sun4) | ||
361 | echo sparc-sun-sunos${UNAME_RELEASE} | ||
362 | ;; | ||
363 | esac | ||
364 | exit ;; | ||
365 | aushp:SunOS:*:*) | ||
366 | echo sparc-auspex-sunos${UNAME_RELEASE} | ||
367 | exit ;; | ||
368 | # The situation for MiNT is a little confusing. The machine name | ||
369 | # can be virtually everything (everything which is not | ||
370 | # "atarist" or "atariste" at least should have a processor | ||
371 | # > m68000). The system name ranges from "MiNT" over "FreeMiNT" | ||
372 | # to the lowercase version "mint" (or "freemint"). Finally | ||
373 | # the system name "TOS" denotes a system which is actually not | ||
374 | # MiNT. But MiNT is downward compatible to TOS, so this should | ||
375 | # be no problem. | ||
376 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) | ||
377 | echo m68k-atari-mint${UNAME_RELEASE} | ||
378 | exit ;; | ||
379 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) | ||
380 | echo m68k-atari-mint${UNAME_RELEASE} | ||
381 | exit ;; | ||
382 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) | ||
383 | echo m68k-atari-mint${UNAME_RELEASE} | ||
384 | exit ;; | ||
385 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) | ||
386 | echo m68k-milan-mint${UNAME_RELEASE} | ||
387 | exit ;; | ||
388 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) | ||
389 | echo m68k-hades-mint${UNAME_RELEASE} | ||
390 | exit ;; | ||
391 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) | ||
392 | echo m68k-unknown-mint${UNAME_RELEASE} | ||
393 | exit ;; | ||
394 | m68k:machten:*:*) | ||
395 | echo m68k-apple-machten${UNAME_RELEASE} | ||
396 | exit ;; | ||
397 | powerpc:machten:*:*) | ||
398 | echo powerpc-apple-machten${UNAME_RELEASE} | ||
399 | exit ;; | ||
400 | RISC*:Mach:*:*) | ||
401 | echo mips-dec-mach_bsd4.3 | ||
402 | exit ;; | ||
403 | RISC*:ULTRIX:*:*) | ||
404 | echo mips-dec-ultrix${UNAME_RELEASE} | ||
405 | exit ;; | ||
406 | VAX*:ULTRIX*:*:*) | ||
407 | echo vax-dec-ultrix${UNAME_RELEASE} | ||
408 | exit ;; | ||
409 | 2020:CLIX:*:* | 2430:CLIX:*:*) | ||
410 | echo clipper-intergraph-clix${UNAME_RELEASE} | ||
411 | exit ;; | ||
412 | mips:*:*:UMIPS | mips:*:*:RISCos) | ||
413 | eval $set_cc_for_build | ||
414 | sed 's/^ //' << EOF >$dummy.c | ||
415 | #ifdef __cplusplus | ||
416 | #include <stdio.h> /* for printf() prototype */ | ||
417 | int main (int argc, char *argv[]) { | ||
418 | #else | ||
419 | int main (argc, argv) int argc; char *argv[]; { | ||
420 | #endif | ||
421 | #if defined (host_mips) && defined (MIPSEB) | ||
422 | #if defined (SYSTYPE_SYSV) | ||
423 | printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); | ||
424 | #endif | ||
425 | #if defined (SYSTYPE_SVR4) | ||
426 | printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); | ||
427 | #endif | ||
428 | #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) | ||
429 | printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); | ||
430 | #endif | ||
431 | #endif | ||
432 | exit (-1); | ||
433 | } | ||
434 | EOF | ||
435 | $CC_FOR_BUILD -o $dummy $dummy.c && | ||
436 | dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && | ||
437 | SYSTEM_NAME=`$dummy $dummyarg` && | ||
438 | { echo "$SYSTEM_NAME"; exit; } | ||
439 | echo mips-mips-riscos${UNAME_RELEASE} | ||
440 | exit ;; | ||
441 | Motorola:PowerMAX_OS:*:*) | ||
442 | echo powerpc-motorola-powermax | ||
443 | exit ;; | ||
444 | Motorola:*:4.3:PL8-*) | ||
445 | echo powerpc-harris-powermax | ||
446 | exit ;; | ||
447 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) | ||
448 | echo powerpc-harris-powermax | ||
449 | exit ;; | ||
450 | Night_Hawk:Power_UNIX:*:*) | ||
451 | echo powerpc-harris-powerunix | ||
452 | exit ;; | ||
453 | m88k:CX/UX:7*:*) | ||
454 | echo m88k-harris-cxux7 | ||
455 | exit ;; | ||
456 | m88k:*:4*:R4*) | ||
457 | echo m88k-motorola-sysv4 | ||
458 | exit ;; | ||
459 | m88k:*:3*:R3*) | ||
460 | echo m88k-motorola-sysv3 | ||
461 | exit ;; | ||
462 | AViiON:dgux:*:*) | ||
463 | # DG/UX returns AViiON for all architectures | ||
464 | UNAME_PROCESSOR=`/usr/bin/uname -p` | ||
465 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] | ||
466 | then | ||
467 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ | ||
468 | [ ${TARGET_BINARY_INTERFACE}x = x ] | ||
469 | then | ||
470 | echo m88k-dg-dgux${UNAME_RELEASE} | ||
471 | else | ||
472 | echo m88k-dg-dguxbcs${UNAME_RELEASE} | ||
473 | fi | ||
474 | else | ||
475 | echo i586-dg-dgux${UNAME_RELEASE} | ||
476 | fi | ||
477 | exit ;; | ||
478 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) | ||
479 | echo m88k-dolphin-sysv3 | ||
480 | exit ;; | ||
481 | M88*:*:R3*:*) | ||
482 | # Delta 88k system running SVR3 | ||
483 | echo m88k-motorola-sysv3 | ||
484 | exit ;; | ||
485 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) | ||
486 | echo m88k-tektronix-sysv3 | ||
487 | exit ;; | ||
488 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) | ||
489 | echo m68k-tektronix-bsd | ||
490 | exit ;; | ||
491 | *:IRIX*:*:*) | ||
492 | echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` | ||
493 | exit ;; | ||
494 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. | ||
495 | echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id | ||
496 | exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' | ||
497 | i*86:AIX:*:*) | ||
498 | echo i386-ibm-aix | ||
499 | exit ;; | ||
500 | ia64:AIX:*:*) | ||
501 | if [ -x /usr/bin/oslevel ] ; then | ||
502 | IBM_REV=`/usr/bin/oslevel` | ||
503 | else | ||
504 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | ||
505 | fi | ||
506 | echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} | ||
507 | exit ;; | ||
508 | *:AIX:2:3) | ||
509 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then | ||
510 | eval $set_cc_for_build | ||
511 | sed 's/^ //' << EOF >$dummy.c | ||
512 | #include <sys/systemcfg.h> | ||
513 | |||
514 | main() | ||
515 | { | ||
516 | if (!__power_pc()) | ||
517 | exit(1); | ||
518 | puts("powerpc-ibm-aix3.2.5"); | ||
519 | exit(0); | ||
520 | } | ||
521 | EOF | ||
522 | if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` | ||
523 | then | ||
524 | echo "$SYSTEM_NAME" | ||
525 | else | ||
526 | echo rs6000-ibm-aix3.2.5 | ||
527 | fi | ||
528 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then | ||
529 | echo rs6000-ibm-aix3.2.4 | ||
530 | else | ||
531 | echo rs6000-ibm-aix3.2 | ||
532 | fi | ||
533 | exit ;; | ||
534 | *:AIX:*:[45]) | ||
535 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` | ||
536 | if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then | ||
537 | IBM_ARCH=rs6000 | ||
538 | else | ||
539 | IBM_ARCH=powerpc | ||
540 | fi | ||
541 | if [ -x /usr/bin/oslevel ] ; then | ||
542 | IBM_REV=`/usr/bin/oslevel` | ||
543 | else | ||
544 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | ||
545 | fi | ||
546 | echo ${IBM_ARCH}-ibm-aix${IBM_REV} | ||
547 | exit ;; | ||
548 | *:AIX:*:*) | ||
549 | echo rs6000-ibm-aix | ||
550 | exit ;; | ||
551 | ibmrt:4.4BSD:*|romp-ibm:BSD:*) | ||
552 | echo romp-ibm-bsd4.4 | ||
553 | exit ;; | ||
554 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and | ||
555 | echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to | ||
556 | exit ;; # report: romp-ibm BSD 4.3 | ||
557 | *:BOSX:*:*) | ||
558 | echo rs6000-bull-bosx | ||
559 | exit ;; | ||
560 | DPX/2?00:B.O.S.:*:*) | ||
561 | echo m68k-bull-sysv3 | ||
562 | exit ;; | ||
563 | 9000/[34]??:4.3bsd:1.*:*) | ||
564 | echo m68k-hp-bsd | ||
565 | exit ;; | ||
566 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) | ||
567 | echo m68k-hp-bsd4.4 | ||
568 | exit ;; | ||
569 | 9000/[34678]??:HP-UX:*:*) | ||
570 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | ||
571 | case "${UNAME_MACHINE}" in | ||
572 | 9000/31? ) HP_ARCH=m68000 ;; | ||
573 | 9000/[34]?? ) HP_ARCH=m68k ;; | ||
574 | 9000/[678][0-9][0-9]) | ||
575 | if [ -x /usr/bin/getconf ]; then | ||
576 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` | ||
577 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` | ||
578 | case "${sc_cpu_version}" in | ||
579 | 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 | ||
580 | 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 | ||
581 | 532) # CPU_PA_RISC2_0 | ||
582 | case "${sc_kernel_bits}" in | ||
583 | 32) HP_ARCH="hppa2.0n" ;; | ||
584 | 64) HP_ARCH="hppa2.0w" ;; | ||
585 | '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 | ||
586 | esac ;; | ||
587 | esac | ||
588 | fi | ||
589 | if [ "${HP_ARCH}" = "" ]; then | ||
590 | eval $set_cc_for_build | ||
591 | sed 's/^ //' << EOF >$dummy.c | ||
592 | |||
593 | #define _HPUX_SOURCE | ||
594 | #include <stdlib.h> | ||
595 | #include <unistd.h> | ||
596 | |||
597 | int main () | ||
598 | { | ||
599 | #if defined(_SC_KERNEL_BITS) | ||
600 | long bits = sysconf(_SC_KERNEL_BITS); | ||
601 | #endif | ||
602 | long cpu = sysconf (_SC_CPU_VERSION); | ||
603 | |||
604 | switch (cpu) | ||
605 | { | ||
606 | case CPU_PA_RISC1_0: puts ("hppa1.0"); break; | ||
607 | case CPU_PA_RISC1_1: puts ("hppa1.1"); break; | ||
608 | case CPU_PA_RISC2_0: | ||
609 | #if defined(_SC_KERNEL_BITS) | ||
610 | switch (bits) | ||
611 | { | ||
612 | case 64: puts ("hppa2.0w"); break; | ||
613 | case 32: puts ("hppa2.0n"); break; | ||
614 | default: puts ("hppa2.0"); break; | ||
615 | } break; | ||
616 | #else /* !defined(_SC_KERNEL_BITS) */ | ||
617 | puts ("hppa2.0"); break; | ||
618 | #endif | ||
619 | default: puts ("hppa1.0"); break; | ||
620 | } | ||
621 | exit (0); | ||
622 | } | ||
623 | EOF | ||
624 | (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` | ||
625 | test -z "$HP_ARCH" && HP_ARCH=hppa | ||
626 | fi ;; | ||
627 | esac | ||
628 | if [ ${HP_ARCH} = "hppa2.0w" ] | ||
629 | then | ||
630 | eval $set_cc_for_build | ||
631 | |||
632 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating | ||
633 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler | ||
634 | # generating 64-bit code. GNU and HP use different nomenclature: | ||
635 | # | ||
636 | # $ CC_FOR_BUILD=cc ./config.guess | ||
637 | # => hppa2.0w-hp-hpux11.23 | ||
638 | # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess | ||
639 | # => hppa64-hp-hpux11.23 | ||
640 | |||
641 | if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | | ||
642 | grep __LP64__ >/dev/null | ||
643 | then | ||
644 | HP_ARCH="hppa2.0w" | ||
645 | else | ||
646 | HP_ARCH="hppa64" | ||
647 | fi | ||
648 | fi | ||
649 | echo ${HP_ARCH}-hp-hpux${HPUX_REV} | ||
650 | exit ;; | ||
651 | ia64:HP-UX:*:*) | ||
652 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | ||
653 | echo ia64-hp-hpux${HPUX_REV} | ||
654 | exit ;; | ||
655 | 3050*:HI-UX:*:*) | ||
656 | eval $set_cc_for_build | ||
657 | sed 's/^ //' << EOF >$dummy.c | ||
658 | #include <unistd.h> | ||
659 | int | ||
660 | main () | ||
661 | { | ||
662 | long cpu = sysconf (_SC_CPU_VERSION); | ||
663 | /* The order matters, because CPU_IS_HP_MC68K erroneously returns | ||
664 | true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct | ||
665 | results, however. */ | ||
666 | if (CPU_IS_PA_RISC (cpu)) | ||
667 | { | ||
668 | switch (cpu) | ||
669 | { | ||
670 | case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; | ||
671 | case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; | ||
672 | case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; | ||
673 | default: puts ("hppa-hitachi-hiuxwe2"); break; | ||
674 | } | ||
675 | } | ||
676 | else if (CPU_IS_HP_MC68K (cpu)) | ||
677 | puts ("m68k-hitachi-hiuxwe2"); | ||
678 | else puts ("unknown-hitachi-hiuxwe2"); | ||
679 | exit (0); | ||
680 | } | ||
681 | EOF | ||
682 | $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && | ||
683 | { echo "$SYSTEM_NAME"; exit; } | ||
684 | echo unknown-hitachi-hiuxwe2 | ||
685 | exit ;; | ||
686 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) | ||
687 | echo hppa1.1-hp-bsd | ||
688 | exit ;; | ||
689 | 9000/8??:4.3bsd:*:*) | ||
690 | echo hppa1.0-hp-bsd | ||
691 | exit ;; | ||
692 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) | ||
693 | echo hppa1.0-hp-mpeix | ||
694 | exit ;; | ||
695 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) | ||
696 | echo hppa1.1-hp-osf | ||
697 | exit ;; | ||
698 | hp8??:OSF1:*:*) | ||
699 | echo hppa1.0-hp-osf | ||
700 | exit ;; | ||
701 | i*86:OSF1:*:*) | ||
702 | if [ -x /usr/sbin/sysversion ] ; then | ||
703 | echo ${UNAME_MACHINE}-unknown-osf1mk | ||
704 | else | ||
705 | echo ${UNAME_MACHINE}-unknown-osf1 | ||
706 | fi | ||
707 | exit ;; | ||
708 | parisc*:Lites*:*:*) | ||
709 | echo hppa1.1-hp-lites | ||
710 | exit ;; | ||
711 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) | ||
712 | echo c1-convex-bsd | ||
713 | exit ;; | ||
714 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) | ||
715 | if getsysinfo -f scalar_acc | ||
716 | then echo c32-convex-bsd | ||
717 | else echo c2-convex-bsd | ||
718 | fi | ||
719 | exit ;; | ||
720 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) | ||
721 | echo c34-convex-bsd | ||
722 | exit ;; | ||
723 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) | ||
724 | echo c38-convex-bsd | ||
725 | exit ;; | ||
726 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) | ||
727 | echo c4-convex-bsd | ||
728 | exit ;; | ||
729 | CRAY*Y-MP:*:*:*) | ||
730 | echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | ||
731 | exit ;; | ||
732 | CRAY*[A-Z]90:*:*:*) | ||
733 | echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | ||
734 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ | ||
735 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ | ||
736 | -e 's/\.[^.]*$/.X/' | ||
737 | exit ;; | ||
738 | CRAY*TS:*:*:*) | ||
739 | echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | ||
740 | exit ;; | ||
741 | CRAY*T3E:*:*:*) | ||
742 | echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | ||
743 | exit ;; | ||
744 | CRAY*SV1:*:*:*) | ||
745 | echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | ||
746 | exit ;; | ||
747 | *:UNICOS/mp:*:*) | ||
748 | echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | ||
749 | exit ;; | ||
750 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) | ||
751 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | ||
752 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | ||
753 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | ||
754 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | ||
755 | exit ;; | ||
756 | 5000:UNIX_System_V:4.*:*) | ||
757 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | ||
758 | FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` | ||
759 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | ||
760 | exit ;; | ||
761 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) | ||
762 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | ||
763 | exit ;; | ||
764 | sparc*:BSD/OS:*:*) | ||
765 | echo sparc-unknown-bsdi${UNAME_RELEASE} | ||
766 | exit ;; | ||
767 | *:BSD/OS:*:*) | ||
768 | echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} | ||
769 | exit ;; | ||
770 | *:FreeBSD:*:*) | ||
771 | case ${UNAME_MACHINE} in | ||
772 | pc98) | ||
773 | echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | ||
774 | amd64) | ||
775 | echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | ||
776 | *) | ||
777 | echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | ||
778 | esac | ||
779 | exit ;; | ||
780 | i*:CYGWIN*:*) | ||
781 | echo ${UNAME_MACHINE}-pc-cygwin | ||
782 | exit ;; | ||
783 | i*:MINGW*:*) | ||
784 | echo ${UNAME_MACHINE}-pc-mingw32 | ||
785 | exit ;; | ||
786 | i*:windows32*:*) | ||
787 | # uname -m includes "-pc" on this system. | ||
788 | echo ${UNAME_MACHINE}-mingw32 | ||
789 | exit ;; | ||
790 | i*:PW*:*) | ||
791 | echo ${UNAME_MACHINE}-pc-pw32 | ||
792 | exit ;; | ||
793 | x86:Interix*:[3456]*) | ||
794 | echo i586-pc-interix${UNAME_RELEASE} | ||
795 | exit ;; | ||
796 | EM64T:Interix*:[3456]*) | ||
797 | echo x86_64-unknown-interix${UNAME_RELEASE} | ||
798 | exit ;; | ||
799 | [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) | ||
800 | echo i${UNAME_MACHINE}-pc-mks | ||
801 | exit ;; | ||
802 | i*:Windows_NT*:* | Pentium*:Windows_NT*:*) | ||
803 | # How do we know it's Interix rather than the generic POSIX subsystem? | ||
804 | # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we | ||
805 | # UNAME_MACHINE based on the output of uname instead of i386? | ||
806 | echo i586-pc-interix | ||
807 | exit ;; | ||
808 | i*:UWIN*:*) | ||
809 | echo ${UNAME_MACHINE}-pc-uwin | ||
810 | exit ;; | ||
811 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) | ||
812 | echo x86_64-unknown-cygwin | ||
813 | exit ;; | ||
814 | p*:CYGWIN*:*) | ||
815 | echo powerpcle-unknown-cygwin | ||
816 | exit ;; | ||
817 | prep*:SunOS:5.*:*) | ||
818 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
819 | exit ;; | ||
820 | *:GNU:*:*) | ||
821 | # the GNU system | ||
822 | echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` | ||
823 | exit ;; | ||
824 | *:GNU/*:*:*) | ||
825 | # other systems with GNU libc and userland | ||
826 | echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu | ||
827 | exit ;; | ||
828 | i*86:Minix:*:*) | ||
829 | echo ${UNAME_MACHINE}-pc-minix | ||
830 | exit ;; | ||
831 | arm*:Linux:*:*) | ||
832 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
833 | exit ;; | ||
834 | avr32*:Linux:*:*) | ||
835 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
836 | exit ;; | ||
837 | cris:Linux:*:*) | ||
838 | echo cris-axis-linux-gnu | ||
839 | exit ;; | ||
840 | crisv32:Linux:*:*) | ||
841 | echo crisv32-axis-linux-gnu | ||
842 | exit ;; | ||
843 | frv:Linux:*:*) | ||
844 | echo frv-unknown-linux-gnu | ||
845 | exit ;; | ||
846 | ia64:Linux:*:*) | ||
847 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
848 | exit ;; | ||
849 | m32r*:Linux:*:*) | ||
850 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
851 | exit ;; | ||
852 | m68*:Linux:*:*) | ||
853 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
854 | exit ;; | ||
855 | mips:Linux:*:*) | ||
856 | eval $set_cc_for_build | ||
857 | sed 's/^ //' << EOF >$dummy.c | ||
858 | #undef CPU | ||
859 | #undef mips | ||
860 | #undef mipsel | ||
861 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | ||
862 | CPU=mipsel | ||
863 | #else | ||
864 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | ||
865 | CPU=mips | ||
866 | #else | ||
867 | CPU= | ||
868 | #endif | ||
869 | #endif | ||
870 | EOF | ||
871 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' | ||
872 | /^CPU/{ | ||
873 | s: ::g | ||
874 | p | ||
875 | }'`" | ||
876 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } | ||
877 | ;; | ||
878 | mips64:Linux:*:*) | ||
879 | eval $set_cc_for_build | ||
880 | sed 's/^ //' << EOF >$dummy.c | ||
881 | #undef CPU | ||
882 | #undef mips64 | ||
883 | #undef mips64el | ||
884 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | ||
885 | CPU=mips64el | ||
886 | #else | ||
887 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | ||
888 | CPU=mips64 | ||
889 | #else | ||
890 | CPU= | ||
891 | #endif | ||
892 | #endif | ||
893 | EOF | ||
894 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' | ||
895 | /^CPU/{ | ||
896 | s: ::g | ||
897 | p | ||
898 | }'`" | ||
899 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } | ||
900 | ;; | ||
901 | or32:Linux:*:*) | ||
902 | echo or32-unknown-linux-gnu | ||
903 | exit ;; | ||
904 | ppc:Linux:*:*) | ||
905 | echo powerpc-unknown-linux-gnu | ||
906 | exit ;; | ||
907 | ppc64:Linux:*:*) | ||
908 | echo powerpc64-unknown-linux-gnu | ||
909 | exit ;; | ||
910 | alpha:Linux:*:*) | ||
911 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | ||
912 | EV5) UNAME_MACHINE=alphaev5 ;; | ||
913 | EV56) UNAME_MACHINE=alphaev56 ;; | ||
914 | PCA56) UNAME_MACHINE=alphapca56 ;; | ||
915 | PCA57) UNAME_MACHINE=alphapca56 ;; | ||
916 | EV6) UNAME_MACHINE=alphaev6 ;; | ||
917 | EV67) UNAME_MACHINE=alphaev67 ;; | ||
918 | EV68*) UNAME_MACHINE=alphaev68 ;; | ||
919 | esac | ||
920 | objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null | ||
921 | if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi | ||
922 | echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} | ||
923 | exit ;; | ||
924 | parisc:Linux:*:* | hppa:Linux:*:*) | ||
925 | # Look for CPU level | ||
926 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in | ||
927 | PA7*) echo hppa1.1-unknown-linux-gnu ;; | ||
928 | PA8*) echo hppa2.0-unknown-linux-gnu ;; | ||
929 | *) echo hppa-unknown-linux-gnu ;; | ||
930 | esac | ||
931 | exit ;; | ||
932 | parisc64:Linux:*:* | hppa64:Linux:*:*) | ||
933 | echo hppa64-unknown-linux-gnu | ||
934 | exit ;; | ||
935 | s390:Linux:*:* | s390x:Linux:*:*) | ||
936 | echo ${UNAME_MACHINE}-ibm-linux | ||
937 | exit ;; | ||
938 | sh64*:Linux:*:*) | ||
939 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
940 | exit ;; | ||
941 | sh*:Linux:*:*) | ||
942 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
943 | exit ;; | ||
944 | sparc:Linux:*:* | sparc64:Linux:*:*) | ||
945 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
946 | exit ;; | ||
947 | vax:Linux:*:*) | ||
948 | echo ${UNAME_MACHINE}-dec-linux-gnu | ||
949 | exit ;; | ||
950 | x86_64:Linux:*:*) | ||
951 | echo x86_64-unknown-linux-gnu | ||
952 | exit ;; | ||
953 | i*86:Linux:*:*) | ||
954 | # The BFD linker knows what the default object file format is, so | ||
955 | # first see if it will tell us. cd to the root directory to prevent | ||
956 | # problems with other programs or directories called `ld' in the path. | ||
957 | # Set LC_ALL=C to ensure ld outputs messages in English. | ||
958 | ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | ||
959 | | sed -ne '/supported targets:/!d | ||
960 | s/[ ][ ]*/ /g | ||
961 | s/.*supported targets: *// | ||
962 | s/ .*// | ||
963 | p'` | ||
964 | case "$ld_supported_targets" in | ||
965 | elf32-i386) | ||
966 | TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" | ||
967 | ;; | ||
968 | a.out-i386-linux) | ||
969 | echo "${UNAME_MACHINE}-pc-linux-gnuaout" | ||
970 | exit ;; | ||
971 | coff-i386) | ||
972 | echo "${UNAME_MACHINE}-pc-linux-gnucoff" | ||
973 | exit ;; | ||
974 | "") | ||
975 | # Either a pre-BFD a.out linker (linux-gnuoldld) or | ||
976 | # one that does not give us useful --help. | ||
977 | echo "${UNAME_MACHINE}-pc-linux-gnuoldld" | ||
978 | exit ;; | ||
979 | esac | ||
980 | # Determine whether the default compiler is a.out or elf | ||
981 | eval $set_cc_for_build | ||
982 | sed 's/^ //' << EOF >$dummy.c | ||
983 | #include <features.h> | ||
984 | #ifdef __ELF__ | ||
985 | # ifdef __GLIBC__ | ||
986 | # if __GLIBC__ >= 2 | ||
987 | LIBC=gnu | ||
988 | # else | ||
989 | LIBC=gnulibc1 | ||
990 | # endif | ||
991 | # else | ||
992 | LIBC=gnulibc1 | ||
993 | # endif | ||
994 | #else | ||
995 | #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) | ||
996 | LIBC=gnu | ||
997 | #else | ||
998 | LIBC=gnuaout | ||
999 | #endif | ||
1000 | #endif | ||
1001 | #ifdef __dietlibc__ | ||
1002 | LIBC=dietlibc | ||
1003 | #endif | ||
1004 | EOF | ||
1005 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' | ||
1006 | /^LIBC/{ | ||
1007 | s: ::g | ||
1008 | p | ||
1009 | }'`" | ||
1010 | test x"${LIBC}" != x && { | ||
1011 | echo "${UNAME_MACHINE}-pc-linux-${LIBC}" | ||
1012 | exit | ||
1013 | } | ||
1014 | test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } | ||
1015 | ;; | ||
1016 | i*86:DYNIX/ptx:4*:*) | ||
1017 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. | ||
1018 | # earlier versions are messed up and put the nodename in both | ||
1019 | # sysname and nodename. | ||
1020 | echo i386-sequent-sysv4 | ||
1021 | exit ;; | ||
1022 | i*86:UNIX_SV:4.2MP:2.*) | ||
1023 | # Unixware is an offshoot of SVR4, but it has its own version | ||
1024 | # number series starting with 2... | ||
1025 | # I am not positive that other SVR4 systems won't match this, | ||
1026 | # I just have to hope. -- rms. | ||
1027 | # Use sysv4.2uw... so that sysv4* matches it. | ||
1028 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} | ||
1029 | exit ;; | ||
1030 | i*86:OS/2:*:*) | ||
1031 | # If we were able to find `uname', then EMX Unix compatibility | ||
1032 | # is probably installed. | ||
1033 | echo ${UNAME_MACHINE}-pc-os2-emx | ||
1034 | exit ;; | ||
1035 | i*86:XTS-300:*:STOP) | ||
1036 | echo ${UNAME_MACHINE}-unknown-stop | ||
1037 | exit ;; | ||
1038 | i*86:atheos:*:*) | ||
1039 | echo ${UNAME_MACHINE}-unknown-atheos | ||
1040 | exit ;; | ||
1041 | i*86:syllable:*:*) | ||
1042 | echo ${UNAME_MACHINE}-pc-syllable | ||
1043 | exit ;; | ||
1044 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) | ||
1045 | echo i386-unknown-lynxos${UNAME_RELEASE} | ||
1046 | exit ;; | ||
1047 | i*86:*DOS:*:*) | ||
1048 | echo ${UNAME_MACHINE}-pc-msdosdjgpp | ||
1049 | exit ;; | ||
1050 | i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) | ||
1051 | UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` | ||
1052 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then | ||
1053 | echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} | ||
1054 | else | ||
1055 | echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} | ||
1056 | fi | ||
1057 | exit ;; | ||
1058 | i*86:*:5:[678]*) | ||
1059 | # UnixWare 7.x, OpenUNIX and OpenServer 6. | ||
1060 | case `/bin/uname -X | grep "^Machine"` in | ||
1061 | *486*) UNAME_MACHINE=i486 ;; | ||
1062 | *Pentium) UNAME_MACHINE=i586 ;; | ||
1063 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; | ||
1064 | esac | ||
1065 | echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} | ||
1066 | exit ;; | ||
1067 | i*86:*:3.2:*) | ||
1068 | if test -f /usr/options/cb.name; then | ||
1069 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` | ||
1070 | echo ${UNAME_MACHINE}-pc-isc$UNAME_REL | ||
1071 | elif /bin/uname -X 2>/dev/null >/dev/null ; then | ||
1072 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` | ||
1073 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 | ||
1074 | (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ | ||
1075 | && UNAME_MACHINE=i586 | ||
1076 | (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ | ||
1077 | && UNAME_MACHINE=i686 | ||
1078 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ | ||
1079 | && UNAME_MACHINE=i686 | ||
1080 | echo ${UNAME_MACHINE}-pc-sco$UNAME_REL | ||
1081 | else | ||
1082 | echo ${UNAME_MACHINE}-pc-sysv32 | ||
1083 | fi | ||
1084 | exit ;; | ||
1085 | pc:*:*:*) | ||
1086 | # Left here for compatibility: | ||
1087 | # uname -m prints for DJGPP always 'pc', but it prints nothing about | ||
1088 | # the processor, so we play safe by assuming i386. | ||
1089 | echo i386-pc-msdosdjgpp | ||
1090 | exit ;; | ||
1091 | Intel:Mach:3*:*) | ||
1092 | echo i386-pc-mach3 | ||
1093 | exit ;; | ||
1094 | paragon:*:*:*) | ||
1095 | echo i860-intel-osf1 | ||
1096 | exit ;; | ||
1097 | i860:*:4.*:*) # i860-SVR4 | ||
1098 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then | ||
1099 | echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 | ||
1100 | else # Add other i860-SVR4 vendors below as they are discovered. | ||
1101 | echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 | ||
1102 | fi | ||
1103 | exit ;; | ||
1104 | mini*:CTIX:SYS*5:*) | ||
1105 | # "miniframe" | ||
1106 | echo m68010-convergent-sysv | ||
1107 | exit ;; | ||
1108 | mc68k:UNIX:SYSTEM5:3.51m) | ||
1109 | echo m68k-convergent-sysv | ||
1110 | exit ;; | ||
1111 | M680?0:D-NIX:5.3:*) | ||
1112 | echo m68k-diab-dnix | ||
1113 | exit ;; | ||
1114 | M68*:*:R3V[5678]*:*) | ||
1115 | test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; | ||
1116 | 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) | ||
1117 | OS_REL='' | ||
1118 | test -r /etc/.relid \ | ||
1119 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | ||
1120 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | ||
1121 | && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | ||
1122 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | ||
1123 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | ||
1124 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) | ||
1125 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | ||
1126 | && { echo i486-ncr-sysv4; exit; } ;; | ||
1127 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) | ||
1128 | echo m68k-unknown-lynxos${UNAME_RELEASE} | ||
1129 | exit ;; | ||
1130 | mc68030:UNIX_System_V:4.*:*) | ||
1131 | echo m68k-atari-sysv4 | ||
1132 | exit ;; | ||
1133 | TSUNAMI:LynxOS:2.*:*) | ||
1134 | echo sparc-unknown-lynxos${UNAME_RELEASE} | ||
1135 | exit ;; | ||
1136 | rs6000:LynxOS:2.*:*) | ||
1137 | echo rs6000-unknown-lynxos${UNAME_RELEASE} | ||
1138 | exit ;; | ||
1139 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) | ||
1140 | echo powerpc-unknown-lynxos${UNAME_RELEASE} | ||
1141 | exit ;; | ||
1142 | SM[BE]S:UNIX_SV:*:*) | ||
1143 | echo mips-dde-sysv${UNAME_RELEASE} | ||
1144 | exit ;; | ||
1145 | RM*:ReliantUNIX-*:*:*) | ||
1146 | echo mips-sni-sysv4 | ||
1147 | exit ;; | ||
1148 | RM*:SINIX-*:*:*) | ||
1149 | echo mips-sni-sysv4 | ||
1150 | exit ;; | ||
1151 | *:SINIX-*:*:*) | ||
1152 | if uname -p 2>/dev/null >/dev/null ; then | ||
1153 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | ||
1154 | echo ${UNAME_MACHINE}-sni-sysv4 | ||
1155 | else | ||
1156 | echo ns32k-sni-sysv | ||
1157 | fi | ||
1158 | exit ;; | ||
1159 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | ||
1160 | # says <Richard.M.Bartel@ccMail.Census.GOV> | ||
1161 | echo i586-unisys-sysv4 | ||
1162 | exit ;; | ||
1163 | *:UNIX_System_V:4*:FTX*) | ||
1164 | # From Gerald Hewes <hewes@openmarket.com>. | ||
1165 | # How about differentiating between stratus architectures? -djm | ||
1166 | echo hppa1.1-stratus-sysv4 | ||
1167 | exit ;; | ||
1168 | *:*:*:FTX*) | ||
1169 | # From seanf@swdc.stratus.com. | ||
1170 | echo i860-stratus-sysv4 | ||
1171 | exit ;; | ||
1172 | i*86:VOS:*:*) | ||
1173 | # From Paul.Green@stratus.com. | ||
1174 | echo ${UNAME_MACHINE}-stratus-vos | ||
1175 | exit ;; | ||
1176 | *:VOS:*:*) | ||
1177 | # From Paul.Green@stratus.com. | ||
1178 | echo hppa1.1-stratus-vos | ||
1179 | exit ;; | ||
1180 | mc68*:A/UX:*:*) | ||
1181 | echo m68k-apple-aux${UNAME_RELEASE} | ||
1182 | exit ;; | ||
1183 | news*:NEWS-OS:6*:*) | ||
1184 | echo mips-sony-newsos6 | ||
1185 | exit ;; | ||
1186 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) | ||
1187 | if [ -d /usr/nec ]; then | ||
1188 | echo mips-nec-sysv${UNAME_RELEASE} | ||
1189 | else | ||
1190 | echo mips-unknown-sysv${UNAME_RELEASE} | ||
1191 | fi | ||
1192 | exit ;; | ||
1193 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. | ||
1194 | echo powerpc-be-beos | ||
1195 | exit ;; | ||
1196 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. | ||
1197 | echo powerpc-apple-beos | ||
1198 | exit ;; | ||
1199 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. | ||
1200 | echo i586-pc-beos | ||
1201 | exit ;; | ||
1202 | SX-4:SUPER-UX:*:*) | ||
1203 | echo sx4-nec-superux${UNAME_RELEASE} | ||
1204 | exit ;; | ||
1205 | SX-5:SUPER-UX:*:*) | ||
1206 | echo sx5-nec-superux${UNAME_RELEASE} | ||
1207 | exit ;; | ||
1208 | SX-6:SUPER-UX:*:*) | ||
1209 | echo sx6-nec-superux${UNAME_RELEASE} | ||
1210 | exit ;; | ||
1211 | Power*:Rhapsody:*:*) | ||
1212 | echo powerpc-apple-rhapsody${UNAME_RELEASE} | ||
1213 | exit ;; | ||
1214 | *:Rhapsody:*:*) | ||
1215 | echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} | ||
1216 | exit ;; | ||
1217 | *:Darwin:*:*) | ||
1218 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown | ||
1219 | case $UNAME_PROCESSOR in | ||
1220 | unknown) UNAME_PROCESSOR=powerpc ;; | ||
1221 | esac | ||
1222 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} | ||
1223 | exit ;; | ||
1224 | *:procnto*:*:* | *:QNX:[0123456789]*:*) | ||
1225 | UNAME_PROCESSOR=`uname -p` | ||
1226 | if test "$UNAME_PROCESSOR" = "x86"; then | ||
1227 | UNAME_PROCESSOR=i386 | ||
1228 | UNAME_MACHINE=pc | ||
1229 | fi | ||
1230 | echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} | ||
1231 | exit ;; | ||
1232 | *:QNX:*:4*) | ||
1233 | echo i386-pc-qnx | ||
1234 | exit ;; | ||
1235 | NSE-?:NONSTOP_KERNEL:*:*) | ||
1236 | echo nse-tandem-nsk${UNAME_RELEASE} | ||
1237 | exit ;; | ||
1238 | NSR-?:NONSTOP_KERNEL:*:*) | ||
1239 | echo nsr-tandem-nsk${UNAME_RELEASE} | ||
1240 | exit ;; | ||
1241 | *:NonStop-UX:*:*) | ||
1242 | echo mips-compaq-nonstopux | ||
1243 | exit ;; | ||
1244 | BS2000:POSIX*:*:*) | ||
1245 | echo bs2000-siemens-sysv | ||
1246 | exit ;; | ||
1247 | DS/*:UNIX_System_V:*:*) | ||
1248 | echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} | ||
1249 | exit ;; | ||
1250 | *:Plan9:*:*) | ||
1251 | # "uname -m" is not consistent, so use $cputype instead. 386 | ||
1252 | # is converted to i386 for consistency with other x86 | ||
1253 | # operating systems. | ||
1254 | if test "$cputype" = "386"; then | ||
1255 | UNAME_MACHINE=i386 | ||
1256 | else | ||
1257 | UNAME_MACHINE="$cputype" | ||
1258 | fi | ||
1259 | echo ${UNAME_MACHINE}-unknown-plan9 | ||
1260 | exit ;; | ||
1261 | *:TOPS-10:*:*) | ||
1262 | echo pdp10-unknown-tops10 | ||
1263 | exit ;; | ||
1264 | *:TENEX:*:*) | ||
1265 | echo pdp10-unknown-tenex | ||
1266 | exit ;; | ||
1267 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) | ||
1268 | echo pdp10-dec-tops20 | ||
1269 | exit ;; | ||
1270 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) | ||
1271 | echo pdp10-xkl-tops20 | ||
1272 | exit ;; | ||
1273 | *:TOPS-20:*:*) | ||
1274 | echo pdp10-unknown-tops20 | ||
1275 | exit ;; | ||
1276 | *:ITS:*:*) | ||
1277 | echo pdp10-unknown-its | ||
1278 | exit ;; | ||
1279 | SEI:*:*:SEIUX) | ||
1280 | echo mips-sei-seiux${UNAME_RELEASE} | ||
1281 | exit ;; | ||
1282 | *:DragonFly:*:*) | ||
1283 | echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | ||
1284 | exit ;; | ||
1285 | *:*VMS:*:*) | ||
1286 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | ||
1287 | case "${UNAME_MACHINE}" in | ||
1288 | A*) echo alpha-dec-vms ; exit ;; | ||
1289 | I*) echo ia64-dec-vms ; exit ;; | ||
1290 | V*) echo vax-dec-vms ; exit ;; | ||
1291 | esac ;; | ||
1292 | *:XENIX:*:SysV) | ||
1293 | echo i386-pc-xenix | ||
1294 | exit ;; | ||
1295 | i*86:skyos:*:*) | ||
1296 | echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' | ||
1297 | exit ;; | ||
1298 | i*86:rdos:*:*) | ||
1299 | echo ${UNAME_MACHINE}-pc-rdos | ||
1300 | exit ;; | ||
1301 | esac | ||
1302 | |||
1303 | #echo '(No uname command or uname output not recognized.)' 1>&2 | ||
1304 | #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 | ||
1305 | |||
1306 | eval $set_cc_for_build | ||
1307 | cat >$dummy.c <<EOF | ||
1308 | #ifdef _SEQUENT_ | ||
1309 | # include <sys/types.h> | ||
1310 | # include <sys/utsname.h> | ||
1311 | #endif | ||
1312 | main () | ||
1313 | { | ||
1314 | #if defined (sony) | ||
1315 | #if defined (MIPSEB) | ||
1316 | /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, | ||
1317 | I don't know.... */ | ||
1318 | printf ("mips-sony-bsd\n"); exit (0); | ||
1319 | #else | ||
1320 | #include <sys/param.h> | ||
1321 | printf ("m68k-sony-newsos%s\n", | ||
1322 | #ifdef NEWSOS4 | ||
1323 | "4" | ||
1324 | #else | ||
1325 | "" | ||
1326 | #endif | ||
1327 | ); exit (0); | ||
1328 | #endif | ||
1329 | #endif | ||
1330 | |||
1331 | #if defined (__arm) && defined (__acorn) && defined (__unix) | ||
1332 | printf ("arm-acorn-riscix\n"); exit (0); | ||
1333 | #endif | ||
1334 | |||
1335 | #if defined (hp300) && !defined (hpux) | ||
1336 | printf ("m68k-hp-bsd\n"); exit (0); | ||
1337 | #endif | ||
1338 | |||
1339 | #if defined (NeXT) | ||
1340 | #if !defined (__ARCHITECTURE__) | ||
1341 | #define __ARCHITECTURE__ "m68k" | ||
1342 | #endif | ||
1343 | int version; | ||
1344 | version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; | ||
1345 | if (version < 4) | ||
1346 | printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); | ||
1347 | else | ||
1348 | printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); | ||
1349 | exit (0); | ||
1350 | #endif | ||
1351 | |||
1352 | #if defined (MULTIMAX) || defined (n16) | ||
1353 | #if defined (UMAXV) | ||
1354 | printf ("ns32k-encore-sysv\n"); exit (0); | ||
1355 | #else | ||
1356 | #if defined (CMU) | ||
1357 | printf ("ns32k-encore-mach\n"); exit (0); | ||
1358 | #else | ||
1359 | printf ("ns32k-encore-bsd\n"); exit (0); | ||
1360 | #endif | ||
1361 | #endif | ||
1362 | #endif | ||
1363 | |||
1364 | #if defined (__386BSD__) | ||
1365 | printf ("i386-pc-bsd\n"); exit (0); | ||
1366 | #endif | ||
1367 | |||
1368 | #if defined (sequent) | ||
1369 | #if defined (i386) | ||
1370 | printf ("i386-sequent-dynix\n"); exit (0); | ||
1371 | #endif | ||
1372 | #if defined (ns32000) | ||
1373 | printf ("ns32k-sequent-dynix\n"); exit (0); | ||
1374 | #endif | ||
1375 | #endif | ||
1376 | |||
1377 | #if defined (_SEQUENT_) | ||
1378 | struct utsname un; | ||
1379 | |||
1380 | uname(&un); | ||
1381 | |||
1382 | if (strncmp(un.version, "V2", 2) == 0) { | ||
1383 | printf ("i386-sequent-ptx2\n"); exit (0); | ||
1384 | } | ||
1385 | if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ | ||
1386 | printf ("i386-sequent-ptx1\n"); exit (0); | ||
1387 | } | ||
1388 | printf ("i386-sequent-ptx\n"); exit (0); | ||
1389 | |||
1390 | #endif | ||
1391 | |||
1392 | #if defined (vax) | ||
1393 | # if !defined (ultrix) | ||
1394 | # include <sys/param.h> | ||
1395 | # if defined (BSD) | ||
1396 | # if BSD == 43 | ||
1397 | printf ("vax-dec-bsd4.3\n"); exit (0); | ||
1398 | # else | ||
1399 | # if BSD == 199006 | ||
1400 | printf ("vax-dec-bsd4.3reno\n"); exit (0); | ||
1401 | # else | ||
1402 | printf ("vax-dec-bsd\n"); exit (0); | ||
1403 | # endif | ||
1404 | # endif | ||
1405 | # else | ||
1406 | printf ("vax-dec-bsd\n"); exit (0); | ||
1407 | # endif | ||
1408 | # else | ||
1409 | printf ("vax-dec-ultrix\n"); exit (0); | ||
1410 | # endif | ||
1411 | #endif | ||
1412 | |||
1413 | #if defined (alliant) && defined (i860) | ||
1414 | printf ("i860-alliant-bsd\n"); exit (0); | ||
1415 | #endif | ||
1416 | |||
1417 | exit (1); | ||
1418 | } | ||
1419 | EOF | ||
1420 | |||
1421 | $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && | ||
1422 | { echo "$SYSTEM_NAME"; exit; } | ||
1423 | |||
1424 | # Apollos put the system type in the environment. | ||
1425 | |||
1426 | test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } | ||
1427 | |||
1428 | # Convex versions that predate uname can use getsysinfo(1) | ||
1429 | |||
1430 | if [ -x /usr/convex/getsysinfo ] | ||
1431 | then | ||
1432 | case `getsysinfo -f cpu_type` in | ||
1433 | c1*) | ||
1434 | echo c1-convex-bsd | ||
1435 | exit ;; | ||
1436 | c2*) | ||
1437 | if getsysinfo -f scalar_acc | ||
1438 | then echo c32-convex-bsd | ||
1439 | else echo c2-convex-bsd | ||
1440 | fi | ||
1441 | exit ;; | ||
1442 | c34*) | ||
1443 | echo c34-convex-bsd | ||
1444 | exit ;; | ||
1445 | c38*) | ||
1446 | echo c38-convex-bsd | ||
1447 | exit ;; | ||
1448 | c4*) | ||
1449 | echo c4-convex-bsd | ||
1450 | exit ;; | ||
1451 | esac | ||
1452 | fi | ||
1453 | |||
1454 | cat >&2 <<EOF | ||
1455 | $0: unable to guess system type | ||
1456 | |||
1457 | This script, last modified $timestamp, has failed to recognize | ||
1458 | the operating system you are using. It is advised that you | ||
1459 | download the most up to date version of the config scripts from | ||
1460 | |||
1461 | http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess | ||
1462 | and | ||
1463 | http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub | ||
1464 | |||
1465 | If the version you run ($0) is already up to date, please | ||
1466 | send the following data and any information you think might be | ||
1467 | pertinent to <config-patches@gnu.org> in order to provide the needed | ||
1468 | information to handle your system. | ||
1469 | |||
1470 | config.guess timestamp = $timestamp | ||
1471 | |||
1472 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | ||
1473 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | ||
1474 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | ||
1475 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | ||
1476 | |||
1477 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` | ||
1478 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null` | ||
1479 | |||
1480 | hostinfo = `(hostinfo) 2>/dev/null` | ||
1481 | /bin/universe = `(/bin/universe) 2>/dev/null` | ||
1482 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` | ||
1483 | /bin/arch = `(/bin/arch) 2>/dev/null` | ||
1484 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` | ||
1485 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` | ||
1486 | |||
1487 | UNAME_MACHINE = ${UNAME_MACHINE} | ||
1488 | UNAME_RELEASE = ${UNAME_RELEASE} | ||
1489 | UNAME_SYSTEM = ${UNAME_SYSTEM} | ||
1490 | UNAME_VERSION = ${UNAME_VERSION} | ||
1491 | EOF | ||
1492 | |||
1493 | exit 1 | ||
1494 | |||
1495 | # Local variables: | ||
1496 | # eval: (add-hook 'write-file-hooks 'time-stamp) | ||
1497 | # time-stamp-start: "timestamp='" | ||
1498 | # time-stamp-format: "%:y-%02m-%02d" | ||
1499 | # time-stamp-end: "'" | ||
1500 | # End: | ||
diff --git a/config.sub b/config.sub new file mode 100755 index 00000000..387c18d1 --- /dev/null +++ b/config.sub | |||
@@ -0,0 +1,1608 @@ | |||
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 | ||