Import Upstream version 1.5.1
Markus Koschany
3 years ago
0 | Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
1 | Mats Erik Andersson <meand@users.sourceforge.net> |
0 | -- $Id: BUGS file for netToe version 1.4.2 -- | |
1 | --------------------------------------------- | |
2 | ||
3 | Please report any bugs, or comments to: | |
4 | Mats Erik Andersson <meand@users.sourceforge.net> | |
5 | Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
6 | ||
7 | Do not forget to visit htt://nettoe.sourceforge.net for more information | |
8 | on the netToe project. | |
9 | ||
10 | ||
11 | List of known bugs, or their solutions: | |
12 | ||
13 | nettoe-1.3.2 (17 March 2010): | |
14 | - Inability of eglibc 2.10 to listen on IPv6 has been resolved. | |
15 | ||
16 | nettoe-1.3.0 (24 February 2010): | |
17 | - The previous problems with premature socket closedown are solved. | |
18 | - All uses of scanf() for strings are now using a length limit. | |
19 | ||
20 | nettoe-1.2.1 (3 January 2010): | |
21 | nettoe-1.2.0 (30 December 2009): | |
22 | - No new bugs known at this time. The code has been tested with | |
23 | Debian GNU/Linux, OpenBSD, and FreeBSD. | |
24 | - The effect of premature socket closedown from the client has | |
25 | not been addressed in this release, so the defect will persist. | |
26 | - The networking protocol code has been revised for reliability. | |
27 | Some defects were located and the high load should not occur | |
28 | anymore, since the sockets transfer well defined content. | |
29 | ||
30 | M E Andersson | |
31 | <meand@users.sourceforge.net> | |
32 | ||
33 | nettoe-1.1.0 (22 July 2001): | |
34 | - Bugs from version 1.0.6 are still present :-) | |
35 | - Discovered a bug in the network game that cause the CPU | |
36 | load of the PC of the player who is waiting for the other | |
37 | player move, to grow till 70% 80%. That's bad. | |
38 | ||
39 | nettoe-1.0.6 (1 July 2001): | |
40 | - The player is not warned if the connection is lost during | |
41 | the network game. | |
42 | So if a player lost his connection, the other player doesn't | |
43 | know about that. | |
44 | ||
45 | nettoe-1.0.5 (6 June 2000): | |
46 | - The player is not warned if the connection is lost during | |
47 | the network game. | |
48 | So if a player lost his connection, the other player doesn't | |
49 | know about that. | |
50 | ||
51 | - The program exit after the infos screen is displayed | |
52 | ||
53 | ||
54 | ||
55 | ||
56 | -- old bugs are no more listed -- | |
57 | ||
58 | ||
59 | -- Gabriele Giorgetti | |
60 | <ggdev@users.sourceforge.net> |
0 | GNU GENERAL PUBLIC LICENSE | |
1 | Version 2, June 1991 | |
2 | ||
3 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. | |
4 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
5 | Everyone is permitted to copy and distribute verbatim copies | |
6 | of this license document, but changing it is not allowed. | |
7 | ||
8 | Preamble | |
9 | ||
10 | The licenses for most software are designed to take away your | |
11 | freedom to share and change it. By contrast, the GNU General Public | |
12 | License is intended to guarantee your freedom to share and change free | |
13 | software--to make sure the software is free for all its users. This | |
14 | General Public License applies to most of the Free Software | |
15 | Foundation's software and to any other program whose authors commit to | |
16 | using it. (Some other Free Software Foundation software is covered by | |
17 | the GNU Library General Public License instead.) You can apply it to | |
18 | your programs, too. | |
19 | ||
20 | When we speak of free software, we are referring to freedom, not | |
21 | price. Our General Public Licenses are designed to make sure that you | |
22 | have the freedom to distribute copies of free software (and charge for | |
23 | this service if you wish), that you receive source code or can get it | |
24 | if you want it, that you can change the software or use pieces of it | |
25 | in new free programs; and that you know you can do these things. | |
26 | ||
27 | To protect your rights, we need to make restrictions that forbid | |
28 | anyone to deny you these rights or to ask you to surrender the rights. | |
29 | These restrictions translate to certain responsibilities for you if you | |
30 | distribute copies of the software, or if you modify it. | |
31 | ||
32 | For example, if you distribute copies of such a program, whether | |
33 | gratis or for a fee, you must give the recipients all the rights that | |
34 | you have. You must make sure that they, too, receive or can get the | |
35 | source code. And you must show them these terms so they know their | |
36 | rights. | |
37 | ||
38 | We protect your rights with two steps: (1) copyright the software, and | |
39 | (2) offer you this license which gives you legal permission to copy, | |
40 | distribute and/or modify the software. | |
41 | ||
42 | Also, for each author's protection and ours, we want to make certain | |
43 | that everyone understands that there is no warranty for this free | |
44 | software. If the software is modified by someone else and passed on, we | |
45 | want its recipients to know that what they have is not the original, so | |
46 | that any problems introduced by others will not reflect on the original | |
47 | authors' reputations. | |
48 | ||
49 | Finally, any free program is threatened constantly by software | |
50 | patents. We wish to avoid the danger that redistributors of a free | |
51 | program will individually obtain patent licenses, in effect making the | |
52 | program proprietary. To prevent this, we have made it clear that any | |
53 | patent must be licensed for everyone's free use or not licensed at all. | |
54 | ||
55 | The precise terms and conditions for copying, distribution and | |
56 | modification follow. | |
57 | ||
58 | GNU GENERAL PUBLIC LICENSE | |
59 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |
60 | ||
61 | 0. This License applies to any program or other work which contains | |
62 | a notice placed by the copyright holder saying it may be distributed | |
63 | under the terms of this General Public License. The "Program", below, | |
64 | refers to any such program or work, and a "work based on the Program" | |
65 | means either the Program or any derivative work under copyright law: | |
66 | that is to say, a work containing the Program or a portion of it, | |
67 | either verbatim or with modifications and/or translated into another | |
68 | language. (Hereinafter, translation is included without limitation in | |
69 | the term "modification".) Each licensee is addressed as "you". | |
70 | ||
71 | Activities other than copying, distribution and modification are not | |
72 | covered by this License; they are outside its scope. The act of | |
73 | running the Program is not restricted, and the output from the Program | |
74 | is covered only if its contents constitute a work based on the | |
75 | Program (independent of having been made by running the Program). | |
76 | Whether that is true depends on what the Program does. | |
77 | ||
78 | 1. You may copy and distribute verbatim copies of the Program's | |
79 | source code as you receive it, in any medium, provided that you | |
80 | conspicuously and appropriately publish on each copy an appropriate | |
81 | copyright notice and disclaimer of warranty; keep intact all the | |
82 | notices that refer to this License and to the absence of any warranty; | |
83 | and give any other recipients of the Program a copy of this License | |
84 | along with the Program. | |
85 | ||
86 | You may charge a fee for the physical act of transferring a copy, and | |
87 | you may at your option offer warranty protection in exchange for a fee. | |
88 | ||
89 | 2. You may modify your copy or copies of the Program or any portion | |
90 | of it, thus forming a work based on the Program, and copy and | |
91 | distribute such modifications or work under the terms of Section 1 | |
92 | above, provided that you also meet all of these conditions: | |
93 | ||
94 | a) You must cause the modified files to carry prominent notices | |
95 | stating that you changed the files and the date of any change. | |
96 | ||
97 | b) You must cause any work that you distribute or publish, that in | |
98 | whole or in part contains or is derived from the Program or any | |
99 | part thereof, to be licensed as a whole at no charge to all third | |
100 | parties under the terms of this License. | |
101 | ||
102 | c) If the modified program normally reads commands interactively | |
103 | when run, you must cause it, when started running for such | |
104 | interactive use in the most ordinary way, to print or display an | |
105 | announcement including an appropriate copyright notice and a | |
106 | notice that there is no warranty (or else, saying that you provide | |
107 | a warranty) and that users may redistribute the program under | |
108 | these conditions, and telling the user how to view a copy of this | |
109 | License. (Exception: if the Program itself is interactive but | |
110 | does not normally print such an announcement, your work based on | |
111 | the Program is not required to print an announcement.) | |
112 | ||
113 | These requirements apply to the modified work as a whole. If | |
114 | identifiable sections of that work are not derived from the Program, | |
115 | and can be reasonably considered independent and separate works in | |
116 | themselves, then this License, and its terms, do not apply to those | |
117 | sections when you distribute them as separate works. But when you | |
118 | distribute the same sections as part of a whole which is a work based | |
119 | on the Program, the distribution of the whole must be on the terms of | |
120 | this License, whose permissions for other licensees extend to the | |
121 | entire whole, and thus to each and every part regardless of who wrote it. | |
122 | ||
123 | Thus, it is not the intent of this section to claim rights or contest | |
124 | your rights to work written entirely by you; rather, the intent is to | |
125 | exercise the right to control the distribution of derivative or | |
126 | collective works based on the Program. | |
127 | ||
128 | In addition, mere aggregation of another work not based on the Program | |
129 | with the Program (or with a work based on the Program) on a volume of | |
130 | a storage or distribution medium does not bring the other work under | |
131 | the scope of this License. | |
132 | ||
133 | 3. You may copy and distribute the Program (or a work based on it, | |
134 | under Section 2) in object code or executable form under the terms of | |
135 | Sections 1 and 2 above provided that you also do one of the following: | |
136 | ||
137 | a) Accompany it with the complete corresponding machine-readable | |
138 | source code, which must be distributed under the terms of Sections | |
139 | 1 and 2 above on a medium customarily used for software interchange; or, | |
140 | ||
141 | b) Accompany it with a written offer, valid for at least three | |
142 | years, to give any third party, for a charge no more than your | |
143 | cost of physically performing source distribution, a complete | |
144 | machine-readable copy of the corresponding source code, to be | |
145 | distributed under the terms of Sections 1 and 2 above on a medium | |
146 | customarily used for software interchange; or, | |
147 | ||
148 | c) Accompany it with the information you received as to the offer | |
149 | to distribute corresponding source code. (This alternative is | |
150 | allowed only for noncommercial distribution and only if you | |
151 | received the program in object code or executable form with such | |
152 | an offer, in accord with Subsection b above.) | |
153 | ||
154 | The source code for a work means the preferred form of the work for | |
155 | making modifications to it. For an executable work, complete source | |
156 | code means all the source code for all modules it contains, plus any | |
157 | associated interface definition files, plus the scripts used to | |
158 | control compilation and installation of the executable. However, as a | |
159 | special exception, the source code distributed need not include | |
160 | anything that is normally distributed (in either source or binary | |
161 | form) with the major components (compiler, kernel, and so on) of the | |
162 | operating system on which the executable runs, unless that component | |
163 | itself accompanies the executable. | |
164 | ||
165 | If distribution of executable or object code is made by offering | |
166 | access to copy from a designated place, then offering equivalent | |
167 | access to copy the source code from the same place counts as | |
168 | distribution of the source code, even though third parties are not | |
169 | compelled to copy the source along with the object code. | |
170 | ||
171 | 4. You may not copy, modify, sublicense, or distribute the Program | |
172 | except as expressly provided under this License. Any attempt | |
173 | otherwise to copy, modify, sublicense or distribute the Program is | |
174 | void, and will automatically terminate your rights under this License. | |
175 | However, parties who have received copies, or rights, from you under | |
176 | this License will not have their licenses terminated so long as such | |
177 | parties remain in full compliance. | |
178 | ||
179 | 5. You are not required to accept this License, since you have not | |
180 | signed it. However, nothing else grants you permission to modify or | |
181 | distribute the Program or its derivative works. These actions are | |
182 | prohibited by law if you do not accept this License. Therefore, by | |
183 | modifying or distributing the Program (or any work based on the | |
184 | Program), you indicate your acceptance of this License to do so, and | |
185 | all its terms and conditions for copying, distributing or modifying | |
186 | the Program or works based on it. | |
187 | ||
188 | 6. Each time you redistribute the Program (or any work based on the | |
189 | Program), the recipient automatically receives a license from the | |
190 | original licensor to copy, distribute or modify the Program subject to | |
191 | these terms and conditions. You may not impose any further | |
192 | restrictions on the recipients' exercise of the rights granted herein. | |
193 | You are not responsible for enforcing compliance by third parties to | |
194 | this License. | |
195 | ||
196 | 7. If, as a consequence of a court judgment or allegation of patent | |
197 | infringement or for any other reason (not limited to patent issues), | |
198 | conditions are imposed on you (whether by court order, agreement or | |
199 | otherwise) that contradict the conditions of this License, they do not | |
200 | excuse you from the conditions of this License. If you cannot | |
201 | distribute so as to satisfy simultaneously your obligations under this | |
202 | License and any other pertinent obligations, then as a consequence you | |
203 | may not distribute the Program at all. For example, if a patent | |
204 | license would not permit royalty-free redistribution of the Program by | |
205 | all those who receive copies directly or indirectly through you, then | |
206 | the only way you could satisfy both it and this License would be to | |
207 | refrain entirely from distribution of the Program. | |
208 | ||
209 | If any portion of this section is held invalid or unenforceable under | |
210 | any particular circumstance, the balance of the section is intended to | |
211 | apply and the section as a whole is intended to apply in other | |
212 | circumstances. | |
213 | ||
214 | It is not the purpose of this section to induce you to infringe any | |
215 | patents or other property right claims or to contest validity of any | |
216 | such claims; this section has the sole purpose of protecting the | |
217 | integrity of the free software distribution system, which is | |
218 | implemented by public license practices. Many people have made | |
219 | generous contributions to the wide range of software distributed | |
220 | through that system in reliance on consistent application of that | |
221 | system; it is up to the author/donor to decide if he or she is willing | |
222 | to distribute software through any other system and a licensee cannot | |
223 | impose that choice. | |
224 | ||
225 | This section is intended to make thoroughly clear what is believed to | |
226 | be a consequence of the rest of this License. | |
227 | ||
228 | 8. If the distribution and/or use of the Program is restricted in | |
229 | certain countries either by patents or by copyrighted interfaces, the | |
230 | original copyright holder who places the Program under this License | |
231 | may add an explicit geographical distribution limitation excluding | |
232 | those countries, so that distribution is permitted only in or among | |
233 | countries not thus excluded. In such case, this License incorporates | |
234 | the limitation as if written in the body of this License. | |
235 | ||
236 | 9. The Free Software Foundation may publish revised and/or new versions | |
237 | of the General Public License from time to time. Such new versions will | |
238 | be similar in spirit to the present version, but may differ in detail to | |
239 | address new problems or concerns. | |
240 | ||
241 | Each version is given a distinguishing version number. If the Program | |
242 | specifies a version number of this License which applies to it and "any | |
243 | later version", you have the option of following the terms and conditions | |
244 | either of that version or of any later version published by the Free | |
245 | Software Foundation. If the Program does not specify a version number of | |
246 | this License, you may choose any version ever published by the Free Software | |
247 | Foundation. | |
248 | ||
249 | 10. If you wish to incorporate parts of the Program into other free | |
250 | programs whose distribution conditions are different, write to the author | |
251 | to ask for permission. For software which is copyrighted by the Free | |
252 | Software Foundation, write to the Free Software Foundation; we sometimes | |
253 | make exceptions for this. Our decision will be guided by the two goals | |
254 | of preserving the free status of all derivatives of our free software and | |
255 | of promoting the sharing and reuse of software generally. | |
256 | ||
257 | NO WARRANTY | |
258 | ||
259 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | |
260 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | |
261 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES | |
262 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED | |
263 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
264 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS | |
265 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE | |
266 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, | |
267 | REPAIR OR CORRECTION. | |
268 | ||
269 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | |
270 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR | |
271 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | |
272 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING | |
273 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED | |
274 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY | |
275 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER | |
276 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE | |
277 | POSSIBILITY OF SUCH DAMAGES. | |
278 | ||
279 | END OF TERMS AND CONDITIONS | |
280 | ||
281 | How to Apply These Terms to Your New Programs | |
282 | ||
283 | If you develop a new program, and you want it to be of the greatest | |
284 | possible use to the public, the best way to achieve this is to make it | |
285 | free software which everyone can redistribute and change under these terms. | |
286 | ||
287 | To do so, attach the following notices to the program. It is safest | |
288 | to attach them to the start of each source file to most effectively | |
289 | convey the exclusion of warranty; and each file should have at least | |
290 | the "copyright" line and a pointer to where the full notice is found. | |
291 | ||
292 | <one line to give the program's name and a brief idea of what it does.> | |
293 | Copyright (C) 19yy <name of author> | |
294 | ||
295 | This program is free software; you can redistribute it and/or modify | |
296 | it under the terms of the GNU General Public License as published by | |
297 | the Free Software Foundation; either version 2 of the License, or | |
298 | (at your option) any later version. | |
299 | ||
300 | This program is distributed in the hope that it will be useful, | |
301 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
302 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
303 | GNU General Public License for more details. | |
304 | ||
305 | You should have received a copy of the GNU General Public License | |
306 | along with this program; if not, write to the Free Software | |
307 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
308 | ||
309 | ||
310 | Also add information on how to contact you by electronic and paper mail. | |
311 | ||
312 | If the program is interactive, make it output a short notice like this | |
313 | when it starts in an interactive mode: | |
314 | ||
315 | Gnomovision version 69, Copyright (C) 19yy name of author | |
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. | |
317 | This is free software, and you are welcome to redistribute it | |
318 | under certain conditions; type `show c' for details. | |
319 | ||
320 | The hypothetical commands `show w' and `show c' should show the appropriate | |
321 | parts of the General Public License. Of course, the commands you use may | |
322 | be called something other than `show w' and `show c'; they could even be | |
323 | mouse-clicks or menu items--whatever suits your program. | |
324 | ||
325 | You should also get your employer (if you work as a programmer) or your | |
326 | school, if any, to sign a "copyright disclaimer" for the program, if | |
327 | necessary. Here is a sample; alter the names: | |
328 | ||
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program | |
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. | |
331 | ||
332 | <signature of Ty Coon>, 1 April 1989 | |
333 | Ty Coon, President of Vice | |
334 | ||
335 | This General Public License does not permit incorporating your program into | |
336 | proprietary programs. If your program is a subroutine library, you may | |
337 | consider it more useful to permit linking proprietary applications with the | |
338 | library. If this is what you want to do, use the GNU Library General | |
339 | Public License instead of this License. |
0 | -- $Id: ChangeLog for netToe version 1.5.1 -- | |
1 | --------------------------------------------- | |
2 | 21 March 2014: | |
3 | - Export NETTOE_LDADD to subdirectories. | |
4 | It contains linking needed for terminfo/curses. | |
5 | - Have the test program always return success, | |
6 | even when TERM is not set. In the latter case, | |
7 | use 'dumb' as terminal type. | |
8 | ||
9 | 18 November 2013: | |
10 | - Optionally install a file for Debian's menu system. | |
11 | - Make 'applicationsdir', 'iconsdir', 'menudir', and | |
12 | 'pixmapsdir' into precious configuration variables. | |
13 | Simplify their use in templates. | |
14 | - Check return status of fgets(), scanf(), and system() | |
15 | for better diagnostics. | |
16 | ||
17 | 1 August 2013: | |
18 | - Let the configure script mention location of icons. | |
19 | - Add a section about AI in the manual. | |
20 | ||
21 | 31 July 2013: | |
22 | - New files "src/ai.c", "src/board.c", "src/board.h", | |
23 | containing refactored portions of code, and created | |
24 | for easier expansion and analysis. | |
25 | - Let the AI code in middle level of difficulty be more | |
26 | aggressive in the sense of attempting winning moves first, | |
27 | then blocking moves. One rule replaced in order to have | |
28 | attacks at every field of the board. | |
29 | ||
30 | 30 July 2013: | |
31 | - More refactoring. | |
32 | - Use isatty() to abort non-interactive uses. | |
33 | ||
34 | 29 July 2013: | |
35 | - Much refactoring and simplification of code. | |
36 | - Visual improvements and uniform messages. | |
37 | - Allow 'q' to end all menus, all allow letter. | |
38 | ||
39 | 26 July 2013: | |
40 | - Fair randomization, removing some bugs. | |
41 | - Better optical consistency. New messages. | |
42 | ||
43 | 25 July 2013: | |
44 | - Desktop adaption: optioinal icons and description. | |
45 | - Fall back to menu, instead of aborting program. | |
46 | This improves the usability for desktop users. | |
47 | ||
48 | 14 May 2013: | |
49 | - Prefer ncurses on OpenSolaris. Detect it correctly. | |
50 | - Support autoconf-2.69 and automake-1.13.1. | |
51 | - Make TCP port configurable at build time. | |
52 | ||
53 | 7 May 2013: | |
54 | - Improve configure.in and some macro usage. | |
55 | ||
56 | 4 May 2013: | |
57 | - Revise the manual page. | |
58 | ||
59 | 25 April 2013: | |
60 | - Support clang on FreeBSD. | |
61 | - Curses support by default. | |
62 | ||
63 | 30 December 2011: | |
64 | - Full support for terminfo and termcap. | |
65 | - Main menu allows answering with a character a alternative | |
66 | to digits. The character is indicated in colour. | |
67 | - Give away SUID and GUID for safety. | |
68 | ||
69 | 17 March 2010: | |
70 | - A compatibility alteration for the listen socket in the network | |
71 | server code. Now glibc version 2.3, 2.7, and 2.10 behave identically | |
72 | as to their ability to build a passive IPv6 socket. Contempory | |
73 | libraries like glibc 2.10 use another response order in the resolver. | |
74 | ||
75 | 26 February 2010: | |
76 | -Trivial misprint in user interaction. | |
77 | ||
78 | 24 February 2010: | |
79 | - IPv6-able network code. | |
80 | - Dual stacked IPv4/IPv6 listening socket for Linux and FreeBSD. | |
81 | OpenBSD users must relax 'net.inet6.ip6.v6only=0' to use both | |
82 | address families. | |
83 | - Using a single socket pair in network mode. | |
84 | - The only fixed tcp port in use is server-side 7501. | |
85 | - Both network sides are able to capture an interrupted | |
86 | network connection. They now exit gracefully. | |
87 | - Input sanitation to avoid threats for buffer overruns. | |
88 | - The name of a player can now contain spaces. Any input | |
89 | white space is collaps and normalized. Custom string parsing. | |
90 | ||
91 | 3 January 2010: | |
92 | - Fixed Makefile.am in order to avoid duplicate traversal of './docs/'. | |
93 | - Rebuild the autotool files and declare this as release 1.2.1. | |
94 | ||
95 | 30 December 2009: | |
96 | - Mats Erik Andersson has joined the project. | |
97 | - Background colour and default text colour now follows whatever | |
98 | choice the terminal is configured for. | |
99 | - A board randomization is used in AI-mode. This enhances the | |
100 | subjective impression of play variations. | |
101 | - A harder AI-mode has been implemented. It detects all winning moves | |
102 | for the computer, and also detects every immediate threat the | |
103 | user is able to pose. | |
104 | - The network protocol has been implemented anew, which fixes | |
105 | some dubious or incorrect code passages in the previous releases. | |
106 | - Use socket option SO_REUSEADDR to quickly reenable network play. | |
107 | ||
108 | -- Mats Erik Andersson <meand@users.sourceforge.net> | |
109 | ||
110 | 22 July 2001: | |
111 | - Completed the code section regarding colors. | |
112 | - netToe now uses colors ! | |
113 | ||
114 | 21 July 2001: | |
115 | - Modified the parse_cmd_args(...) function to accept more than one | |
116 | argument at time, option --no-colors added. (ref: misc.c) | |
117 | - Added modules terminal.c and terminal.h Those file include the new | |
118 | code to handle colors in nettoe. | |
119 | - Added modules matrices.c and matrices.h Those files include the new | |
120 | code to handle the nettoe board matrix. | |
121 | - Removed netmisc.c and netmisc.h modules and included the code in the | |
122 | network.c and network.h modules. | |
123 | ||
124 | 01 July 2001: | |
125 | - Written a short HOW TO PLAY guide in the README file. | |
126 | - Written and included int the package a man page for nettoe. | |
127 | ||
128 | 30 June 2001: | |
129 | - Added the -Wall option check in configure.in (if the compiler is gcc) | |
130 | - Fixed ALL the compilation warnings produced by gcc with -Wall | |
131 | That was a huge list of warnings :-) | |
132 | - Added checking for many includes in configure.in | |
133 | ||
134 | 29 June 2001: | |
135 | - Added command line argument parsing to netToe. (ref: misc.c) | |
136 | --no-beep option added. | |
137 | - Added a beep function to beep the user everytime he has | |
138 | to make a move or take a decision. (ref: misc.c) | |
139 | ||
140 | 28 June 2001: | |
141 | - Added support for autotools (autoconf,automake etc..) | |
142 | - Fixed bug that caused nettoe to exit when the infos | |
143 | screen was displayed. (ref: misc.c, print_infos_screen() ) | |
144 | ||
145 | 24 June 2001: | |
146 | - nettoe 1.0.5 is in Debian unstable, thanks to Andras Bali. | |
147 | ||
148 | ||
149 | - old changes no more listed -- | |
150 | ||
151 | -- Gabriele Giorgetti <ggdev@users.sourceforge.net> |
0 | -- $Id: INSTALL file for netToe version 1.5.1 -- | |
1 | ------------------------------------------------ | |
2 | ||
3 | ||
4 | tar -zxvf nettoe-1.5.1.tar.gz | |
5 | cd nettoe-1.5.1 | |
6 | ||
7 | ./configure | |
8 | make | |
9 | make install | |
10 | ||
11 | ||
12 | By default nettoe gets installed into the /usr/local prefix. | |
13 | ||
14 | You can change this with the --prefix option in the configure | |
15 | script. | |
16 | ||
17 | ./configure --prefix=/usr | |
18 | ||
19 | The binary itself gets installed into the bin directory under | |
20 | the given prefix, thus below "/usr/local/bin/" with default setting. | |
21 | ||
22 | There are three configuration switches available: | |
23 | ||
24 | ./configure --without-terminfo --with-port=7654 | |
25 | ||
26 | which will disable the use of terminal capability librarie, and thus | |
27 | will fall back to ANSI/ECMA-48 character sequences. Overriding the | |
28 | default TCP port 7501 is also possible. | |
29 | ||
30 | ./configure --enable-desktop | |
31 | ||
32 | This will install a desktop description file, a single pixel map, | |
33 | and two icons, for use on graphical terminals. These go into four | |
34 | different directories, but these can be overridden using | |
35 | ||
36 | make applicationsdir=/usr/share/applications \ | |
37 | pixmapsdir=/usr/share/pixmaps \ | |
38 | iconsdir=/usr/share/icons \ | |
39 | install | |
40 | ||
41 | Additionally, | |
42 | ||
43 | ./configure --enable-desktop --enable-menu | |
44 | ||
45 | will install a description file for Debian's menu system. It can be | |
46 | positioned using | |
47 | ||
48 | make menudir=/etc/menu install | |
49 | ||
50 | For information on how to play netToe read the README file included | |
51 | in the source package. | |
52 | ||
53 | Enjoy. | |
54 | ||
55 | ||
56 | -- Mats Erik Andersson | |
57 | <meand@users.sourceforge.net> | |
58 |
0 | # Makefile.am file for nettoe | |
1 | # Edited by Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
2 | # Continued by Mats Erik Andersson <meand@users.sourceforge.net> | |
3 | ||
4 | # This file is processed by automake | |
5 | ||
6 | ## Any directories that are built and installed should go here. | |
7 | SUBDIRS = src docs test desktop | |
8 | ||
9 | ## Any directories to be a part of the distribution should be listed | |
10 | ## here, as well as have a Makefile generated at the end of configure.in | |
11 | DIST_SUBDIRS = $(SUBDIRS) | |
12 | ||
13 | # All the rest of the distributed files | |
14 | EXTRA_DIST = \ | |
15 | AUTHORS \ | |
16 | BUGS \ | |
17 | COPYING \ | |
18 | INSTALL \ | |
19 | README \ | |
20 | TO-DO \ | |
21 | autogen.sh \ | |
22 | ChangeLog \ | |
23 | protocol.txt |
0 | # Makefile.in generated by automake 1.11.6 from Makefile.am. | |
1 | # @configure_input@ | |
2 | ||
3 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | |
4 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software | |
5 | # Foundation, Inc. | |
6 | # This Makefile.in is free software; the Free Software Foundation | |
7 | # gives unlimited permission to copy and/or distribute it, | |
8 | # with or without modifications, as long as this notice is preserved. | |
9 | ||
10 | # This program is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
13 | # PARTICULAR PURPOSE. | |
14 | ||
15 | @SET_MAKE@ | |
16 | ||
17 | # Makefile.am file for nettoe | |
18 | # Edited by Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
19 | # Continued by Mats Erik Andersson <meand@users.sourceforge.net> | |
20 | ||
21 | # This file is processed by automake | |
22 | VPATH = @srcdir@ | |
23 | am__make_dryrun = \ | |
24 | { \ | |
25 | am__dry=no; \ | |
26 | case $$MAKEFLAGS in \ | |
27 | *\\[\ \ ]*) \ | |
28 | echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | |
29 | | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ | |
30 | *) \ | |
31 | for am__flg in $$MAKEFLAGS; do \ | |
32 | case $$am__flg in \ | |
33 | *=*|--*) ;; \ | |
34 | *n*) am__dry=yes; break;; \ | |
35 | esac; \ | |
36 | done;; \ | |
37 | esac; \ | |
38 | test $$am__dry = yes; \ | |
39 | } | |
40 | pkgdatadir = $(datadir)/@PACKAGE@ | |
41 | pkgincludedir = $(includedir)/@PACKAGE@ | |
42 | pkglibdir = $(libdir)/@PACKAGE@ | |
43 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | |
44 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | |
45 | install_sh_DATA = $(install_sh) -c -m 644 | |
46 | install_sh_PROGRAM = $(install_sh) -c | |
47 | install_sh_SCRIPT = $(install_sh) -c | |
48 | INSTALL_HEADER = $(INSTALL_DATA) | |
49 | transform = $(program_transform_name) | |
50 | NORMAL_INSTALL = : | |
51 | PRE_INSTALL = : | |
52 | POST_INSTALL = : | |
53 | NORMAL_UNINSTALL = : | |
54 | PRE_UNINSTALL = : | |
55 | POST_UNINSTALL = : | |
56 | build_triplet = @build@ | |
57 | host_triplet = @host@ | |
58 | subdir = . | |
59 | DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ | |
60 | $(srcdir)/Makefile.in $(srcdir)/config.h.in \ | |
61 | $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ | |
62 | build-aux/config.guess build-aux/config.sub build-aux/depcomp \ | |
63 | build-aux/install-sh build-aux/missing | |
64 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
65 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac | |
66 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | |
67 | $(ACLOCAL_M4) | |
68 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ | |
69 | configure.lineno config.status.lineno | |
70 | mkinstalldirs = $(install_sh) -d | |
71 | CONFIG_HEADER = config.h | |
72 | CONFIG_CLEAN_FILES = | |
73 | CONFIG_CLEAN_VPATH_FILES = | |
74 | SOURCES = | |
75 | DIST_SOURCES = | |
76 | RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ | |
77 | html-recursive info-recursive install-data-recursive \ | |
78 | install-dvi-recursive install-exec-recursive \ | |
79 | install-html-recursive install-info-recursive \ | |
80 | install-pdf-recursive install-ps-recursive install-recursive \ | |
81 | installcheck-recursive installdirs-recursive pdf-recursive \ | |
82 | ps-recursive uninstall-recursive | |
83 | am__can_run_installinfo = \ | |
84 | case $$AM_UPDATE_INFO_DIR in \ | |
85 | n|no|NO) false;; \ | |
86 | *) (install-info --version) >/dev/null 2>&1;; \ | |
87 | esac | |
88 | RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ | |
89 | distclean-recursive maintainer-clean-recursive | |
90 | AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ | |
91 | $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ | |
92 | distdir dist dist-all distcheck | |
93 | ETAGS = etags | |
94 | CTAGS = ctags | |
95 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | |
96 | distdir = $(PACKAGE)-$(VERSION) | |
97 | top_distdir = $(distdir) | |
98 | am__remove_distdir = \ | |
99 | if test -d "$(distdir)"; then \ | |
100 | find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ | |
101 | && rm -rf "$(distdir)" \ | |
102 | || { sleep 5 && rm -rf "$(distdir)"; }; \ | |
103 | else :; fi | |
104 | am__relativize = \ | |
105 | dir0=`pwd`; \ | |
106 | sed_first='s,^\([^/]*\)/.*$$,\1,'; \ | |
107 | sed_rest='s,^[^/]*/*,,'; \ | |
108 | sed_last='s,^.*/\([^/]*\)$$,\1,'; \ | |
109 | sed_butlast='s,/*[^/]*$$,,'; \ | |
110 | while test -n "$$dir1"; do \ | |
111 | first=`echo "$$dir1" | sed -e "$$sed_first"`; \ | |
112 | if test "$$first" != "."; then \ | |
113 | if test "$$first" = ".."; then \ | |
114 | dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ | |
115 | dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ | |
116 | else \ | |
117 | first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ | |
118 | if test "$$first2" = "$$first"; then \ | |
119 | dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ | |
120 | else \ | |
121 | dir2="../$$dir2"; \ | |
122 | fi; \ | |
123 | dir0="$$dir0"/"$$first"; \ | |
124 | fi; \ | |
125 | fi; \ | |
126 | dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ | |
127 | done; \ | |
128 | reldir="$$dir2" | |
129 | DIST_ARCHIVES = $(distdir).tar.gz | |
130 | GZIP_ENV = --best | |
131 | distuninstallcheck_listfiles = find . -type f -print | |
132 | am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | |
133 | | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' | |
134 | distcleancheck_listfiles = find . -type f -print | |
135 | ACLOCAL = @ACLOCAL@ | |
136 | AMTAR = @AMTAR@ | |
137 | AUTOCONF = @AUTOCONF@ | |
138 | AUTOHEADER = @AUTOHEADER@ | |
139 | AUTOMAKE = @AUTOMAKE@ | |
140 | AWK = @AWK@ | |
141 | CC = @CC@ | |
142 | CCDEPMODE = @CCDEPMODE@ | |
143 | CFLAGS = @CFLAGS@ | |
144 | CPP = @CPP@ | |
145 | CPPFLAGS = @CPPFLAGS@ | |
146 | CYGPATH_W = @CYGPATH_W@ | |
147 | DEFS = @DEFS@ | |
148 | DEPDIR = @DEPDIR@ | |
149 | ECHO_C = @ECHO_C@ | |
150 | ECHO_N = @ECHO_N@ | |
151 | ECHO_T = @ECHO_T@ | |
152 | EGREP = @EGREP@ | |
153 | EXEEXT = @EXEEXT@ | |
154 | GREP = @GREP@ | |
155 | INSTALL = @INSTALL@ | |
156 | INSTALL_DATA = @INSTALL_DATA@ | |
157 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
158 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | |
159 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | |
160 | LDFLAGS = @LDFLAGS@ | |
161 | LIBCURSES = @LIBCURSES@ | |
162 | LIBNCURSES = @LIBNCURSES@ | |
163 | LIBOBJS = @LIBOBJS@ | |
164 | LIBS = @LIBS@ | |
165 | LIBTERMCAP = @LIBTERMCAP@ | |
166 | LIBTINFO = @LIBTINFO@ | |
167 | LTLIBOBJS = @LTLIBOBJS@ | |
168 | MAKEINFO = @MAKEINFO@ | |
169 | MKDIR_P = @MKDIR_P@ | |
170 | NETTOE_LDADD = @NETTOE_LDADD@ | |
171 | NETTOE_PORT = @NETTOE_PORT@ | |
172 | OBJEXT = @OBJEXT@ | |
173 | PACKAGE = @PACKAGE@ | |
174 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | |
175 | PACKAGE_NAME = @PACKAGE_NAME@ | |
176 | PACKAGE_STRING = @PACKAGE_STRING@ | |
177 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | |
178 | PACKAGE_URL = @PACKAGE_URL@ | |
179 | PACKAGE_VERSION = @PACKAGE_VERSION@ | |
180 | PATH_SEPARATOR = @PATH_SEPARATOR@ | |
181 | SED = @SED@ | |
182 | SET_MAKE = @SET_MAKE@ | |
183 | SHELL = @SHELL@ | |
184 | STRIP = @STRIP@ | |
185 | VERSION = @VERSION@ | |
186 | abs_builddir = @abs_builddir@ | |
187 | abs_srcdir = @abs_srcdir@ | |
188 | abs_top_builddir = @abs_top_builddir@ | |
189 | abs_top_srcdir = @abs_top_srcdir@ | |
190 | ac_ct_CC = @ac_ct_CC@ | |
191 | am__include = @am__include@ | |
192 | am__leading_dot = @am__leading_dot@ | |
193 | am__quote = @am__quote@ | |
194 | am__tar = @am__tar@ | |
195 | am__untar = @am__untar@ | |
196 | applicationsdir = @applicationsdir@ | |
197 | bindir = @bindir@ | |
198 | build = @build@ | |
199 | build_alias = @build_alias@ | |
200 | build_cpu = @build_cpu@ | |
201 | build_os = @build_os@ | |
202 | build_vendor = @build_vendor@ | |
203 | builddir = @builddir@ | |
204 | datadir = @datadir@ | |
205 | datarootdir = @datarootdir@ | |
206 | docdir = @docdir@ | |
207 | dvidir = @dvidir@ | |
208 | exec_prefix = @exec_prefix@ | |
209 | host = @host@ | |
210 | host_alias = @host_alias@ | |
211 | host_cpu = @host_cpu@ | |
212 | host_os = @host_os@ | |
213 | host_vendor = @host_vendor@ | |
214 | htmldir = @htmldir@ | |
215 | iconsdir = @iconsdir@ | |
216 | includedir = @includedir@ | |
217 | infodir = @infodir@ | |
218 | install_sh = @install_sh@ | |
219 | libdir = @libdir@ | |
220 | libexecdir = @libexecdir@ | |
221 | localedir = @localedir@ | |
222 | localstatedir = @localstatedir@ | |
223 | mandir = @mandir@ | |
224 | menudir = @menudir@ | |
225 | mkdir_p = @mkdir_p@ | |
226 | oldincludedir = @oldincludedir@ | |
227 | pdfdir = @pdfdir@ | |
228 | pixmapsdir = @pixmapsdir@ | |
229 | prefix = @prefix@ | |
230 | program_transform_name = @program_transform_name@ | |
231 | psdir = @psdir@ | |
232 | sbindir = @sbindir@ | |
233 | sharedstatedir = @sharedstatedir@ | |
234 | srcdir = @srcdir@ | |
235 | sysconfdir = @sysconfdir@ | |
236 | target_alias = @target_alias@ | |
237 | top_build_prefix = @top_build_prefix@ | |
238 | top_builddir = @top_builddir@ | |
239 | top_srcdir = @top_srcdir@ | |
240 | SUBDIRS = src docs test desktop | |
241 | DIST_SUBDIRS = $(SUBDIRS) | |
242 | ||
243 | # All the rest of the distributed files | |
244 | EXTRA_DIST = \ | |
245 | AUTHORS \ | |
246 | BUGS \ | |
247 | COPYING \ | |
248 | INSTALL \ | |
249 | README \ | |
250 | TO-DO \ | |
251 | autogen.sh \ | |
252 | ChangeLog \ | |
253 | protocol.txt | |
254 | ||
255 | all: config.h | |
256 | $(MAKE) $(AM_MAKEFLAGS) all-recursive | |
257 | ||
258 | .SUFFIXES: | |
259 | am--refresh: Makefile | |
260 | @: | |
261 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | |
262 | @for dep in $?; do \ | |
263 | case '$(am__configure_deps)' in \ | |
264 | *$$dep*) \ | |
265 | echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ | |
266 | $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ | |
267 | && exit 0; \ | |
268 | exit 1;; \ | |
269 | esac; \ | |
270 | done; \ | |
271 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ | |
272 | $(am__cd) $(top_srcdir) && \ | |
273 | $(AUTOMAKE) --gnu Makefile | |
274 | .PRECIOUS: Makefile | |
275 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |
276 | @case '$?' in \ | |
277 | *config.status*) \ | |
278 | echo ' $(SHELL) ./config.status'; \ | |
279 | $(SHELL) ./config.status;; \ | |
280 | *) \ | |
281 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ | |
282 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ | |
283 | esac; | |
284 | ||
285 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | |
286 | $(SHELL) ./config.status --recheck | |
287 | ||
288 | $(top_srcdir)/configure: $(am__configure_deps) | |
289 | $(am__cd) $(srcdir) && $(AUTOCONF) | |
290 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | |
291 | $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) | |
292 | $(am__aclocal_m4_deps): | |
293 | ||
294 | config.h: stamp-h1 | |
295 | @if test ! -f $@; then rm -f stamp-h1; else :; fi | |
296 | @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi | |
297 | ||
298 | stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status | |
299 | @rm -f stamp-h1 | |
300 | cd $(top_builddir) && $(SHELL) ./config.status config.h | |
301 | $(srcdir)/config.h.in: $(am__configure_deps) | |
302 | ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) | |
303 | rm -f stamp-h1 | |
304 | touch $@ | |
305 | ||
306 | distclean-hdr: | |
307 | -rm -f config.h stamp-h1 | |
308 | ||
309 | # This directory's subdirectories are mostly independent; you can cd | |
310 | # into them and run `make' without going through this Makefile. | |
311 | # To change the values of `make' variables: instead of editing Makefiles, | |
312 | # (1) if the variable is set in `config.status', edit `config.status' | |
313 | # (which will cause the Makefiles to be regenerated when you run `make'); | |
314 | # (2) otherwise, pass the desired values on the `make' command line. | |
315 | $(RECURSIVE_TARGETS): | |
316 | @fail= failcom='exit 1'; \ | |
317 | for f in x $$MAKEFLAGS; do \ | |
318 | case $$f in \ | |
319 | *=* | --[!k]*);; \ | |
320 | *k*) failcom='fail=yes';; \ | |
321 | esac; \ | |
322 | done; \ | |
323 | dot_seen=no; \ | |
324 | target=`echo $@ | sed s/-recursive//`; \ | |
325 | list='$(SUBDIRS)'; for subdir in $$list; do \ | |
326 | echo "Making $$target in $$subdir"; \ | |
327 | if test "$$subdir" = "."; then \ | |
328 | dot_seen=yes; \ | |
329 | local_target="$$target-am"; \ | |
330 | else \ | |
331 | local_target="$$target"; \ | |
332 | fi; \ | |
333 | ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ | |
334 | || eval $$failcom; \ | |
335 | done; \ | |
336 | if test "$$dot_seen" = "no"; then \ | |
337 | $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ | |
338 | fi; test -z "$$fail" | |
339 | ||
340 | $(RECURSIVE_CLEAN_TARGETS): | |
341 | @fail= failcom='exit 1'; \ | |
342 | for f in x $$MAKEFLAGS; do \ | |
343 | case $$f in \ | |
344 | *=* | --[!k]*);; \ | |
345 | *k*) failcom='fail=yes';; \ | |
346 | esac; \ | |
347 | done; \ | |
348 | dot_seen=no; \ | |
349 | case "$@" in \ | |
350 | distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ | |
351 | *) list='$(SUBDIRS)' ;; \ | |
352 | esac; \ | |
353 | rev=''; for subdir in $$list; do \ | |
354 | if test "$$subdir" = "."; then :; else \ | |
355 | rev="$$subdir $$rev"; \ | |
356 | fi; \ | |
357 | done; \ | |
358 | rev="$$rev ."; \ | |
359 | target=`echo $@ | sed s/-recursive//`; \ | |
360 | for subdir in $$rev; do \ | |
361 | echo "Making $$target in $$subdir"; \ | |
362 | if test "$$subdir" = "."; then \ | |
363 | local_target="$$target-am"; \ | |
364 | else \ | |
365 | local_target="$$target"; \ | |
366 | fi; \ | |
367 | ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ | |
368 | || eval $$failcom; \ | |
369 | done && test -z "$$fail" | |
370 | tags-recursive: | |
371 | list='$(SUBDIRS)'; for subdir in $$list; do \ | |
372 | test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ | |
373 | done | |
374 | ctags-recursive: | |
375 | list='$(SUBDIRS)'; for subdir in $$list; do \ | |
376 | test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ | |
377 | done | |
378 | ||
379 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | |
380 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | |
381 | unique=`for i in $$list; do \ | |
382 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | |
383 | done | \ | |
384 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | |
385 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | |
386 | mkid -fID $$unique | |
387 | tags: TAGS | |
388 | ||
389 | TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ | |
390 | $(TAGS_FILES) $(LISP) | |
391 | set x; \ | |
392 | here=`pwd`; \ | |
393 | if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ | |
394 | include_option=--etags-include; \ | |
395 | empty_fix=.; \ | |
396 | else \ | |
397 | include_option=--include; \ | |
398 | empty_fix=; \ | |
399 | fi; \ | |
400 | list='$(SUBDIRS)'; for subdir in $$list; do \ | |
401 | if test "$$subdir" = .; then :; else \ | |
402 | test ! -f $$subdir/TAGS || \ | |
403 | set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ | |
404 | fi; \ | |
405 | done; \ | |
406 | list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ | |
407 | unique=`for i in $$list; do \ | |
408 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | |
409 | done | \ | |
410 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | |
411 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | |
412 | shift; \ | |
413 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | |
414 | test -n "$$unique" || unique=$$empty_fix; \ | |
415 | if test $$# -gt 0; then \ | |
416 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | |
417 | "$$@" $$unique; \ | |
418 | else \ | |
419 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | |
420 | $$unique; \ | |
421 | fi; \ | |
422 | fi | |
423 | ctags: CTAGS | |
424 | CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ | |
425 | $(TAGS_FILES) $(LISP) | |
426 | list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ | |
427 | unique=`for i in $$list; do \ | |
428 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | |
429 | done | \ | |
430 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | |
431 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | |
432 | test -z "$(CTAGS_ARGS)$$unique" \ | |
433 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | |
434 | $$unique | |
435 | ||
436 | GTAGS: | |
437 | here=`$(am__cd) $(top_builddir) && pwd` \ | |
438 | && $(am__cd) $(top_srcdir) \ | |
439 | && gtags -i $(GTAGS_ARGS) "$$here" | |
440 | ||
441 | distclean-tags: | |
442 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | |
443 | ||
444 | distdir: $(DISTFILES) | |
445 | $(am__remove_distdir) | |
446 | test -d "$(distdir)" || mkdir "$(distdir)" | |
447 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
448 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
449 | list='$(DISTFILES)'; \ | |
450 | dist_files=`for file in $$list; do echo $$file; done | \ | |
451 | sed -e "s|^$$srcdirstrip/||;t" \ | |
452 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | |
453 | case $$dist_files in \ | |
454 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | |
455 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | |
456 | sort -u` ;; \ | |
457 | esac; \ | |
458 | for file in $$dist_files; do \ | |
459 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | |
460 | if test -d $$d/$$file; then \ | |
461 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | |
462 | if test -d "$(distdir)/$$file"; then \ | |
463 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
464 | fi; \ | |
465 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | |
466 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | |
467 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
468 | fi; \ | |
469 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | |
470 | else \ | |
471 | test -f "$(distdir)/$$file" \ | |
472 | || cp -p $$d/$$file "$(distdir)/$$file" \ | |
473 | || exit 1; \ | |
474 | fi; \ | |
475 | done | |
476 | @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ | |
477 | if test "$$subdir" = .; then :; else \ | |
478 | $(am__make_dryrun) \ | |
479 | || test -d "$(distdir)/$$subdir" \ | |
480 | || $(MKDIR_P) "$(distdir)/$$subdir" \ | |
481 | || exit 1; \ | |
482 | dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ | |
483 | $(am__relativize); \ | |
484 | new_distdir=$$reldir; \ | |
485 | dir1=$$subdir; dir2="$(top_distdir)"; \ | |
486 | $(am__relativize); \ | |
487 | new_top_distdir=$$reldir; \ | |
488 | echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ | |
489 | echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ | |
490 | ($(am__cd) $$subdir && \ | |
491 | $(MAKE) $(AM_MAKEFLAGS) \ | |
492 | top_distdir="$$new_top_distdir" \ | |
493 | distdir="$$new_distdir" \ | |
494 | am__remove_distdir=: \ | |
495 | am__skip_length_check=: \ | |
496 | am__skip_mode_fix=: \ | |
497 | distdir) \ | |
498 | || exit 1; \ | |
499 | fi; \ | |
500 | done | |
501 | -test -n "$(am__skip_mode_fix)" \ | |
502 | || find "$(distdir)" -type d ! -perm -755 \ | |
503 | -exec chmod u+rwx,go+rx {} \; -o \ | |
504 | ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ | |
505 | ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ | |
506 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ | |
507 | || chmod -R a+r "$(distdir)" | |
508 | dist-gzip: distdir | |
509 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz | |
510 | $(am__remove_distdir) | |
511 | ||
512 | dist-bzip2: distdir | |
513 | tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 | |
514 | $(am__remove_distdir) | |
515 | ||
516 | dist-lzip: distdir | |
517 | tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz | |
518 | $(am__remove_distdir) | |
519 | ||
520 | dist-lzma: distdir | |
521 | tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma | |
522 | $(am__remove_distdir) | |
523 | ||
524 | dist-xz: distdir | |
525 | tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz | |
526 | $(am__remove_distdir) | |
527 | ||
528 | dist-tarZ: distdir | |
529 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z | |
530 | $(am__remove_distdir) | |
531 | ||
532 | dist-shar: distdir | |
533 | shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz | |
534 | $(am__remove_distdir) | |
535 | ||
536 | dist-zip: distdir | |
537 | -rm -f $(distdir).zip | |
538 | zip -rq $(distdir).zip $(distdir) | |
539 | $(am__remove_distdir) | |
540 | ||
541 | dist dist-all: distdir | |
542 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz | |
543 | $(am__remove_distdir) | |
544 | ||
545 | # This target untars the dist file and tries a VPATH configuration. Then | |
546 | # it guarantees that the distribution is self-contained by making another | |
547 | # tarfile. | |
548 | distcheck: dist | |
549 | case '$(DIST_ARCHIVES)' in \ | |
550 | *.tar.gz*) \ | |
551 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ | |
552 | *.tar.bz2*) \ | |
553 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ | |
554 | *.tar.lzma*) \ | |
555 | lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ | |
556 | *.tar.lz*) \ | |
557 | lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ | |
558 | *.tar.xz*) \ | |
559 | xz -dc $(distdir).tar.xz | $(am__untar) ;;\ | |
560 | *.tar.Z*) \ | |
561 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ | |
562 | *.shar.gz*) \ | |
563 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ | |
564 | *.zip*) \ | |
565 | unzip $(distdir).zip ;;\ | |
566 | esac | |
567 | chmod -R a-w $(distdir); chmod u+w $(distdir) | |
568 | mkdir $(distdir)/_build | |
569 | mkdir $(distdir)/_inst | |
570 | chmod a-w $(distdir) | |
571 | test -d $(distdir)/_build || exit 0; \ | |
572 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ | |
573 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ | |
574 | && am__cwd=`pwd` \ | |
575 | && $(am__cd) $(distdir)/_build \ | |
576 | && ../configure --srcdir=.. --prefix="$$dc_install_base" \ | |
577 | $(AM_DISTCHECK_CONFIGURE_FLAGS) \ | |
578 | $(DISTCHECK_CONFIGURE_FLAGS) \ | |
579 | && $(MAKE) $(AM_MAKEFLAGS) \ | |
580 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ | |
581 | && $(MAKE) $(AM_MAKEFLAGS) check \ | |
582 | && $(MAKE) $(AM_MAKEFLAGS) install \ | |
583 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ | |
584 | && $(MAKE) $(AM_MAKEFLAGS) uninstall \ | |
585 | && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ | |
586 | distuninstallcheck \ | |
587 | && chmod -R a-w "$$dc_install_base" \ | |
588 | && ({ \ | |
589 | (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ | |
590 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ | |
591 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ | |
592 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ | |
593 | distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ | |
594 | } || { rm -rf "$$dc_destdir"; exit 1; }) \ | |
595 | && rm -rf "$$dc_destdir" \ | |
596 | && $(MAKE) $(AM_MAKEFLAGS) dist \ | |
597 | && rm -rf $(DIST_ARCHIVES) \ | |
598 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ | |
599 | && cd "$$am__cwd" \ | |
600 | || exit 1 | |
601 | $(am__remove_distdir) | |
602 | @(echo "$(distdir) archives ready for distribution: "; \ | |
603 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ | |
604 | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' | |
605 | distuninstallcheck: | |
606 | @test -n '$(distuninstallcheck_dir)' || { \ | |
607 | echo 'ERROR: trying to run $@ with an empty' \ | |
608 | '$$(distuninstallcheck_dir)' >&2; \ | |
609 | exit 1; \ | |
610 | }; \ | |
611 | $(am__cd) '$(distuninstallcheck_dir)' || { \ | |
612 | echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ | |
613 | exit 1; \ | |
614 | }; \ | |
615 | test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ | |
616 | || { echo "ERROR: files left after uninstall:" ; \ | |
617 | if test -n "$(DESTDIR)"; then \ | |
618 | echo " (check DESTDIR support)"; \ | |
619 | fi ; \ | |
620 | $(distuninstallcheck_listfiles) ; \ | |
621 | exit 1; } >&2 | |
622 | distcleancheck: distclean | |
623 | @if test '$(srcdir)' = . ; then \ | |
624 | echo "ERROR: distcleancheck can only run from a VPATH build" ; \ | |
625 | exit 1 ; \ | |
626 | fi | |
627 | @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ | |
628 | || { echo "ERROR: files left in build directory after distclean:" ; \ | |
629 | $(distcleancheck_listfiles) ; \ | |
630 | exit 1; } >&2 | |
631 | check-am: all-am | |
632 | check: check-recursive | |
633 | all-am: Makefile config.h | |
634 | installdirs: installdirs-recursive | |
635 | installdirs-am: | |
636 | install: install-recursive | |
637 | install-exec: install-exec-recursive | |
638 | install-data: install-data-recursive | |
639 | uninstall: uninstall-recursive | |
640 | ||
641 | install-am: all-am | |
642 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | |
643 | ||
644 | installcheck: installcheck-recursive | |
645 | install-strip: | |
646 | if test -z '$(STRIP)'; then \ | |
647 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
648 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
649 | install; \ | |
650 | else \ | |
651 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
652 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
653 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ | |
654 | fi | |
655 | mostlyclean-generic: | |
656 | ||
657 | clean-generic: | |
658 | ||
659 | distclean-generic: | |
660 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | |
661 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | |
662 | ||
663 | maintainer-clean-generic: | |
664 | @echo "This command is intended for maintainers to use" | |
665 | @echo "it deletes files that may require special tools to rebuild." | |
666 | clean: clean-recursive | |
667 | ||
668 | clean-am: clean-generic mostlyclean-am | |
669 | ||
670 | distclean: distclean-recursive | |
671 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) | |
672 | -rm -f Makefile | |
673 | distclean-am: clean-am distclean-generic distclean-hdr distclean-tags | |
674 | ||
675 | dvi: dvi-recursive | |
676 | ||
677 | dvi-am: | |
678 | ||
679 | html: html-recursive | |
680 | ||
681 | html-am: | |
682 | ||
683 | info: info-recursive | |
684 | ||
685 | info-am: | |
686 | ||
687 | install-data-am: | |
688 | ||
689 | install-dvi: install-dvi-recursive | |
690 | ||
691 | install-dvi-am: | |
692 | ||
693 | install-exec-am: | |
694 | ||
695 | install-html: install-html-recursive | |
696 | ||
697 | install-html-am: | |
698 | ||
699 | install-info: install-info-recursive | |
700 | ||
701 | install-info-am: | |
702 | ||
703 | install-man: | |
704 | ||
705 | install-pdf: install-pdf-recursive | |
706 | ||
707 | install-pdf-am: | |
708 | ||
709 | install-ps: install-ps-recursive | |
710 | ||
711 | install-ps-am: | |
712 | ||
713 | installcheck-am: | |
714 | ||
715 | maintainer-clean: maintainer-clean-recursive | |
716 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) | |
717 | -rm -rf $(top_srcdir)/autom4te.cache | |
718 | -rm -f Makefile | |
719 | maintainer-clean-am: distclean-am maintainer-clean-generic | |
720 | ||
721 | mostlyclean: mostlyclean-recursive | |
722 | ||
723 | mostlyclean-am: mostlyclean-generic | |
724 | ||
725 | pdf: pdf-recursive | |
726 | ||
727 | pdf-am: | |
728 | ||
729 | ps: ps-recursive | |
730 | ||
731 | ps-am: | |
732 | ||
733 | uninstall-am: | |
734 | ||
735 | .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ | |
736 | ctags-recursive install-am install-strip tags-recursive | |
737 | ||
738 | .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ | |
739 | all all-am am--refresh check check-am clean clean-generic \ | |
740 | ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ | |
741 | dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ | |
742 | distcheck distclean distclean-generic distclean-hdr \ | |
743 | distclean-tags distcleancheck distdir distuninstallcheck dvi \ | |
744 | dvi-am html html-am info info-am install install-am \ | |
745 | install-data install-data-am install-dvi install-dvi-am \ | |
746 | install-exec install-exec-am install-html install-html-am \ | |
747 | install-info install-info-am install-man install-pdf \ | |
748 | install-pdf-am install-ps install-ps-am install-strip \ | |
749 | installcheck installcheck-am installdirs installdirs-am \ | |
750 | maintainer-clean maintainer-clean-generic mostlyclean \ | |
751 | mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ | |
752 | uninstall uninstall-am | |
753 | ||
754 | ||
755 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | |
756 | # Otherwise a system limit (for SysV at least) may be exceeded. | |
757 | .NOEXPORT: |
0 | -- $Id: NEWS file for netToe version 1.5.1 -- | |
1 | --------------------------------------------- | |
2 | ||
3 | The most important changes and NEWS are in this file. | |
4 | A more detailed list of changes can be found in the ChangeLog file. | |
5 | ||
6 | nettoe-1.5.1 (21 March 2014) | |
7 | * Improve the propagation of linker flags. | |
8 | This is needed together with terminfo/curses. | |
9 | ||
10 | nettoe-1.5 (22 November 2013) | |
11 | * Include some icons. | |
12 | * Optional configuration to install desktop related files. | |
13 | * Better adaption to desktop users. | |
14 | * Avoid some annoying waste of screen area. | |
15 | * Middle AI level prefers winning moves. | |
16 | * Extensive refactoring uncovered some corner cases where | |
17 | previous version would react contrary to expectations. | |
18 | All logic and interoperability with those versions should | |
19 | be intact, though. | |
20 | ||
21 | nettoe-1.4.2 (23 May 2013) | |
22 | * Support newer automake. | |
23 | * TCP port is configurable at build time. | |
24 | ||
25 | nettoe-1.4.1 (7 May 2013) | |
26 | * Fixes to manual page. | |
27 | * Improved autoconf template. | |
28 | ||
29 | nettoe-1.4.0 (25 April 2013) | |
30 | * Portability fixes to NetBSD, GNU/OpenSolaris, and OpenIndiana. | |
31 | * Support for terminfo/termcap control of terminal output. | |
32 | * Curses is used by default. | |
33 | * Network code allows restriction to IPv4 or to IPv6. | |
34 | ||
35 | nettoe-1.3.2 (17 March 2010): | |
36 | * Dual stacked behaviour restored for eglibc 2.10. | |
37 | ||
38 | nettoe-1.3.0 (25 February 2010): | |
39 | * Network game uses IPv4 as well as IPv6. | |
40 | * The network code is incompatible with nettoe-1.2.* and earlier. | |
41 | Only the server port 7501 is fixed. | |
42 | * The name of a player can be a full name with separating spaces. | |
43 | ||
44 | nettoe-1.2.1 (3 January 2010): | |
45 | * Small fix to autotools configuration file ./Makefile.am. | |
46 | ||
47 | nettoe-1.2.0 (30 December 2009): | |
48 | * Randomized board view in AI-mode. | |
49 | * A new AI-mode: "harder". This detects all threats and winning moves. | |
50 | * Colouring is made suitable for virtual consoles, as well as for | |
51 | terminal emulators. | |
52 | * Networking code has been revised for predictability. Bugs removed! | |
53 | ||
54 | nettoe-1.1.0 (22 July 2001): | |
55 | * netToe new uses Colors ! | |
56 | - Modified the parse_cmd_args(...) function to accept more than one | |
57 | argument at time, option --no-colors added. (ref: misc.c) | |
58 | - Added modules terminal.c and terminal.h Those file include the new | |
59 | code to handle colors in nettoe. | |
60 | - Added modules matrices.c and matrices.h Those files include the new | |
61 | code to handle the nettoe board matrix. | |
62 | - Removed netmisc.c and netmisc.h modules and included the code in the | |
63 | network.c and network.h modules. | |
64 | ||
65 | nettoe-1.0.6 (1 July 2001): | |
66 | * A lot of time passed since the last release :-( | |
67 | - Added pc-speaker beeps. (everytime player has to make a move or... take | |
68 | a decision in the game. | |
69 | - Added a man page for nettoe ( man nettoe ) | |
70 | - Command line options added. (--no-beep, --help, --version) | |
71 | - Added support for autotools (automake,autoconf...) | |
72 | - Fixed all compilation warnings produced by gcc with the -Wall option | |
73 | (a lot of potential bugs....) | |
74 | - See ChangeLog for a detailed list of changes. | |
75 | ||
76 | 24 June 2001: | |
77 | * nettoe 1.0.5 is in Debian unstable, thanks to Andras Bali. | |
78 | ||
79 | nettoe-1.0.5 (6 June 2000): | |
80 | - Why 1.0.0 to 1.0.5 ? Ehm, hmmm.... because ..... ( who cares ? ). | |
81 | * Now nettoe uses ports 7501, 7502 for the network game. | |
82 | - Fixed the stupid AI ;-). | |
83 | - Added "Hard" (not so hard) AI, removed the old Easy AI level. | |
84 | ||
85 | nettoe-1.0.0 (31 January 2000): | |
86 | - FIXED a BUG in version 0.9b that caused the game to exit improperly. | |
87 | - Added error debugging in the network game: now user it's adviced | |
88 | on connection errors etc... | |
89 | ||
90 | nettoe-0.9b: | |
91 | - Fixed bugs in the network game. | |
92 | - Improved AI. (it still need to be improved). | |
93 | ||
94 | ||
95 | -- Gabriele Giorgetti | |
96 | <g.gabriele@europe.com> | |
97 | ||
98 | ||
99 | ||
100 | ||
101 | ||
102 |
0 | -- $Id: README file for netToe version 1.5.1 - released 21 March 2014 | |
1 | ------------------------------------------------------------------------ | |
2 | ||
3 | t h e n e t T o e p r o j e c t | |
4 | http://nettoe.sourceforge.net | |
5 | ||
6 | ||
7 | netToe it is a text based Tic Tac Toe game playable over the Internet. | |
8 | ||
9 | You can play it against computer AI, a player on the same machine or | |
10 | against another player over the network. (Internet, LAN etc.). | |
11 | ||
12 | I think it's best to play it against a friend over Internet while you're | |
13 | chatting with him in IRC or ICQ or something like that. | |
14 | ||
15 | Yet nettoe is just a classic Tic Tac Toe game (well yes, it is playable | |
16 | over the network ) this is not so good I know. But what I didn't tell you | |
17 | is that netToe is going to be enahnced a lot with cool features... | |
18 | ||
19 | ( A GUI version of netToe is also in development ). | |
20 | ||
21 | If you dislike such games but you are interested in C programming, | |
22 | or in Socket programming, then you can take a look at the source code. | |
23 | ||
24 | Well OK let's stop that. | |
25 | ||
26 | For information on how to build or install netToe please read the | |
27 | INSTALL file include with the source package. | |
28 | ||
29 | ||
30 | ||
31 | -----== [ HOW TO PLAY ]==----- | |
32 | ||
33 | ||
34 | I think you don't need any information on how to play a Tic Tac Toe game. | |
35 | That's why I'm only going to explain how to play nettoe with another | |
36 | player over the Internet or a LAN. | |
37 | ||
38 | - First decide who will host the game. (you or your friend/opponent) | |
39 | ||
40 | - Now the one who is going to host the game must (do the following): | |
41 | ||
42 | 1. run nettoe (Doh) | |
43 | 2. choose the option 3 (Two players over network) from the Main Menu | |
44 | 3. choose the option 1 (Host the Game) from the Network Game Menu | |
45 | 4. type in his name or nickname (NO BLANK SPACES ALLOWED). | |
46 | 5. comunicate the IP address to the other player. | |
47 | ( hostname also works... if resolved, of course) | |
48 | ( I hope you know how to get your IP address...) | |
49 | 6. Just wait for the other player to connect to your host. | |
50 | ||
51 | - Now for the other player (the one who is going to connect to the hosted | |
52 | game ): | |
53 | ||
54 | 1. run nettoe (really ?, Yaeh relly.) | |
55 | 2. choose the option 3 (Two players over network) from the Main Menu | |
56 | 3. choose the option 2 (Connect to a host) from the Network Game Menu | |
57 | 4. type your name or nickname (NO BLANK SPACES ALLOWED). | |
58 | 5. type in the IP address of the host or the hostname. | |
59 | IP address example: 192.168.0.5, ::1 | |
60 | Hostname example : myfriend.hostname.com (must be a valid hostname) | |
61 | 6. Just wait for the game to start . | |
62 | ||
63 | ||
64 | Enjoy. And if you have any problem just let me know. | |
65 | ||
66 | ||
67 | If you have comments or suggestions, you are welcome to mail me, and | |
68 | please report any bugs: Gabriele Giorgetti <ggdev@users.sourceforge.net>, | |
69 | or better, Mats Erik Andersson <meand@users.sourceforge.net> | |
70 | ||
71 | ||
72 | -- Gabriele Giorgetti Mats Erik Andersson | |
73 | <ggdev@users.sourceforge.net> <meand@users.sourceforge.net> | |
74 |
0 | -- $Id: TO-DO file for netToe version 1.3.2 - released on 18 March 2010 | |
1 | -------------------------------------------------------------------------- | |
2 | ||
3 | Intended goals for the next round in netToe development: | |
4 | ||
5 | - Write netToe clients, thus providing a testing ground | |
6 | for supporting ncurses and X11. | |
7 | ||
8 | - Simplify the networking code beyond the recently made | |
9 | modifications. | |
10 | ||
11 | - Improve the computer AI to provide a learning mode. | |
12 | ||
13 | Mats Erik Andersson | |
14 | <meand@users.sourceforge.net> | |
15 |
0 | # generated automatically by aclocal 1.11.6 -*- Autoconf -*- | |
1 | ||
2 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | |
3 | # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, | |
4 | # Inc. | |
5 | # This file is free software; the Free Software Foundation | |
6 | # gives unlimited permission to copy and/or distribute it, | |
7 | # with or without modifications, as long as this notice is preserved. | |
8 | ||
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
12 | # PARTICULAR PURPOSE. | |
13 | ||
14 | m4_ifndef([AC_AUTOCONF_VERSION], | |
15 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | |
16 | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, | |
17 | [m4_warning([this file was generated for autoconf 2.69. | |
18 | You have another version of autoconf. It may work, but is not guaranteed to. | |
19 | If you have problems, you may need to regenerate the build system entirely. | |
20 | To do so, use the procedure documented by the package, typically `autoreconf'.])]) | |
21 | ||
22 | # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software | |
23 | # Foundation, Inc. | |
24 | # | |
25 | # This file is free software; the Free Software Foundation | |
26 | # gives unlimited permission to copy and/or distribute it, | |
27 | # with or without modifications, as long as this notice is preserved. | |
28 | ||
29 | # serial 1 | |
30 | ||
31 | # AM_AUTOMAKE_VERSION(VERSION) | |
32 | # ---------------------------- | |
33 | # Automake X.Y traces this macro to ensure aclocal.m4 has been | |
34 | # generated from the m4 files accompanying Automake X.Y. | |
35 | # (This private macro should not be called outside this file.) | |
36 | AC_DEFUN([AM_AUTOMAKE_VERSION], | |
37 | [am__api_version='1.11' | |
38 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to | |
39 | dnl require some minimum version. Point them to the right macro. | |
40 | m4_if([$1], [1.11.6], [], | |
41 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl | |
42 | ]) | |
43 | ||
44 | # _AM_AUTOCONF_VERSION(VERSION) | |
45 | # ----------------------------- | |
46 | # aclocal traces this macro to find the Autoconf version. | |
47 | # This is a private macro too. Using m4_define simplifies | |
48 | # the logic in aclocal, which can simply ignore this definition. | |
49 | m4_define([_AM_AUTOCONF_VERSION], []) | |
50 | ||
51 | # AM_SET_CURRENT_AUTOMAKE_VERSION | |
52 | # ------------------------------- | |
53 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. | |
54 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. | |
55 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], | |
56 | [AM_AUTOMAKE_VERSION([1.11.6])dnl | |
57 | m4_ifndef([AC_AUTOCONF_VERSION], | |
58 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | |
59 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) | |
60 | ||
61 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- | |
62 | ||
63 | # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. | |
64 | # | |
65 | # This file is free software; the Free Software Foundation | |
66 | # gives unlimited permission to copy and/or distribute it, | |
67 | # with or without modifications, as long as this notice is preserved. | |
68 | ||
69 | # serial 1 | |
70 | ||
71 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets | |
72 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to | |
73 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'. | |
74 | # | |
75 | # Of course, Automake must honor this variable whenever it calls a | |
76 | # tool from the auxiliary directory. The problem is that $srcdir (and | |
77 | # therefore $ac_aux_dir as well) can be either absolute or relative, | |
78 | # depending on how configure is run. This is pretty annoying, since | |
79 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top | |
80 | # source directory, any form will work fine, but in subdirectories a | |
81 | # relative path needs to be adjusted first. | |
82 | # | |
83 | # $ac_aux_dir/missing | |
84 | # fails when called from a subdirectory if $ac_aux_dir is relative | |
85 | # $top_srcdir/$ac_aux_dir/missing | |
86 | # fails if $ac_aux_dir is absolute, | |
87 | # fails when called from a subdirectory in a VPATH build with | |
88 | # a relative $ac_aux_dir | |
89 | # | |
90 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir | |
91 | # are both prefixed by $srcdir. In an in-source build this is usually | |
92 | # harmless because $srcdir is `.', but things will broke when you | |
93 | # start a VPATH build or use an absolute $srcdir. | |
94 | # | |
95 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, | |
96 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: | |
97 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` | |
98 | # and then we would define $MISSING as | |
99 | # MISSING="\${SHELL} $am_aux_dir/missing" | |
100 | # This will work as long as MISSING is not called from configure, because | |
101 | # unfortunately $(top_srcdir) has no meaning in configure. | |
102 | # However there are other variables, like CC, which are often used in | |
103 | # configure, and could therefore not use this "fixed" $ac_aux_dir. | |
104 | # | |
105 | # Another solution, used here, is to always expand $ac_aux_dir to an | |
106 | # absolute PATH. The drawback is that using absolute paths prevent a | |
107 | # configured tree to be moved without reconfiguration. | |
108 | ||
109 | AC_DEFUN([AM_AUX_DIR_EXPAND], | |
110 | [dnl Rely on autoconf to set up CDPATH properly. | |
111 | AC_PREREQ([2.50])dnl | |
112 | # expand $ac_aux_dir to an absolute path | |
113 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
114 | ]) | |
115 | ||
116 | # AM_CONDITIONAL -*- Autoconf -*- | |
117 | ||
118 | # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 | |
119 | # Free Software Foundation, Inc. | |
120 | # | |
121 | # This file is free software; the Free Software Foundation | |
122 | # gives unlimited permission to copy and/or distribute it, | |
123 | # with or without modifications, as long as this notice is preserved. | |
124 | ||
125 | # serial 9 | |
126 | ||
127 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) | |
128 | # ------------------------------------- | |
129 | # Define a conditional. | |
130 | AC_DEFUN([AM_CONDITIONAL], | |
131 | [AC_PREREQ(2.52)dnl | |
132 | ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], | |
133 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl | |
134 | AC_SUBST([$1_TRUE])dnl | |
135 | AC_SUBST([$1_FALSE])dnl | |
136 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl | |
137 | _AM_SUBST_NOTMAKE([$1_FALSE])dnl | |
138 | m4_define([_AM_COND_VALUE_$1], [$2])dnl | |
139 | if $2; then | |
140 | $1_TRUE= | |
141 | $1_FALSE='#' | |
142 | else | |
143 | $1_TRUE='#' | |
144 | $1_FALSE= | |
145 | fi | |
146 | AC_CONFIG_COMMANDS_PRE( | |
147 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then | |
148 | AC_MSG_ERROR([[conditional "$1" was never defined. | |
149 | Usually this means the macro was only invoked conditionally.]]) | |
150 | fi])]) | |
151 | ||
152 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, | |
153 | # 2010, 2011 Free Software Foundation, Inc. | |
154 | # | |
155 | # This file is free software; the Free Software Foundation | |
156 | # gives unlimited permission to copy and/or distribute it, | |
157 | # with or without modifications, as long as this notice is preserved. | |
158 | ||
159 | # serial 12 | |
160 | ||
161 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be | |
162 | # written in clear, in which case automake, when reading aclocal.m4, | |
163 | # will think it sees a *use*, and therefore will trigger all it's | |
164 | # C support machinery. Also note that it means that autoscan, seeing | |
165 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... | |
166 | ||
167 | ||
168 | # _AM_DEPENDENCIES(NAME) | |
169 | # ---------------------- | |
170 | # See how the compiler implements dependency checking. | |
171 | # NAME is "CC", "CXX", "GCJ", or "OBJC". | |
172 | # We try a few techniques and use that to set a single cache variable. | |
173 | # | |
174 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was | |
175 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular | |
176 | # dependency, and given that the user is not expected to run this macro, | |
177 | # just rely on AC_PROG_CC. | |
178 | AC_DEFUN([_AM_DEPENDENCIES], | |
179 | [AC_REQUIRE([AM_SET_DEPDIR])dnl | |
180 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl | |
181 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl | |
182 | AC_REQUIRE([AM_DEP_TRACK])dnl | |
183 | ||
184 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=], | |
185 | [$1], CXX, [depcc="$CXX" am_compiler_list=], | |
186 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], | |
187 | [$1], UPC, [depcc="$UPC" am_compiler_list=], | |
188 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], | |
189 | [depcc="$$1" am_compiler_list=]) | |
190 | ||
191 | AC_CACHE_CHECK([dependency style of $depcc], | |
192 | [am_cv_$1_dependencies_compiler_type], | |
193 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
194 | # We make a subdir and do the tests there. Otherwise we can end up | |
195 | # making bogus files that we don't know about and never remove. For | |
196 | # instance it was reported that on HP-UX the gcc test will end up | |
197 | # making a dummy file named `D' -- because `-MD' means `put the output | |
198 | # in D'. | |
199 | rm -rf conftest.dir | |
200 | mkdir conftest.dir | |
201 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
202 | # using a relative directory. | |
203 | cp "$am_depcomp" conftest.dir | |
204 | cd conftest.dir | |
205 | # We will build objects and dependencies in a subdirectory because | |
206 | # it helps to detect inapplicable dependency modes. For instance | |
207 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
208 | # side effect of compilation, but ICC will put the dependencies in | |
209 | # the current directory while Tru64 will put them in the object | |
210 | # directory. | |
211 | mkdir sub | |
212 | ||
213 | am_cv_$1_dependencies_compiler_type=none | |
214 | if test "$am_compiler_list" = ""; then | |
215 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` | |
216 | fi | |
217 | am__universal=false | |
218 | m4_case([$1], [CC], | |
219 | [case " $depcc " in #( | |
220 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
221 | esac], | |
222 | [CXX], | |
223 | [case " $depcc " in #( | |
224 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
225 | esac]) | |
226 | ||
227 | for depmode in $am_compiler_list; do | |
228 | # Setup a source with many dependencies, because some compilers | |
229 | # like to wrap large dependency lists on column 80 (with \), and | |
230 | # we should not choose a depcomp mode which is confused by this. | |
231 | # | |
232 | # We need to recreate these files for each test, as the compiler may | |
233 | # overwrite some of them when testing with obscure command lines. | |
234 | # This happens at least with the AIX C compiler. | |
235 | : > sub/conftest.c | |
236 | for i in 1 2 3 4 5 6; do | |
237 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
238 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
239 | # Solaris 8's {/usr,}/bin/sh. | |
240 | touch sub/conftst$i.h | |
241 | done | |
242 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
243 | ||
244 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
245 | # mode. It turns out that the SunPro C++ compiler does not properly | |
246 | # handle `-M -o', and we need to detect this. Also, some Intel | |
247 | # versions had trouble with output in subdirs | |
248 | am__obj=sub/conftest.${OBJEXT-o} | |
249 | am__minus_obj="-o $am__obj" | |
250 | case $depmode in | |
251 | gcc) | |
252 | # This depmode causes a compiler race in universal mode. | |
253 | test "$am__universal" = false || continue | |
254 | ;; | |
255 | nosideeffect) | |
256 | # after this tag, mechanisms are not by side-effect, so they'll | |
257 | # only be used when explicitly requested | |
258 | if test "x$enable_dependency_tracking" = xyes; then | |
259 | continue | |
260 | else | |
261 | break | |
262 | fi | |
263 | ;; | |
264 | msvc7 | msvc7msys | msvisualcpp | msvcmsys) | |
265 | # This compiler won't grok `-c -o', but also, the minuso test has | |
266 | # not run yet. These depmodes are late enough in the game, and | |
267 | # so weak that their functioning should not be impacted. | |
268 | am__obj=conftest.${OBJEXT-o} | |
269 | am__minus_obj= | |
270 | ;; | |
271 | none) break ;; | |
272 | esac | |
273 | if depmode=$depmode \ | |
274 | source=sub/conftest.c object=$am__obj \ | |
275 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
276 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
277 | >/dev/null 2>conftest.err && | |
278 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
279 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
280 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
281 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
282 | # icc doesn't choke on unknown options, it will just issue warnings | |
283 | # or remarks (even with -Werror). So we grep stderr for any message | |
284 | # that says an option was ignored or not supported. | |
285 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
286 | # icc: Command line warning: ignoring option '-M'; no argument required | |
287 | # The diagnosis changed in icc 8.0: | |
288 | # icc: Command line remark: option '-MP' not supported | |
289 | if (grep 'ignoring option' conftest.err || | |
290 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
291 | am_cv_$1_dependencies_compiler_type=$depmode | |
292 | break | |
293 | fi | |
294 | fi | |
295 | done | |
296 | ||
297 | cd .. | |
298 | rm -rf conftest.dir | |
299 | else | |
300 | am_cv_$1_dependencies_compiler_type=none | |
301 | fi | |
302 | ]) | |
303 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) | |
304 | AM_CONDITIONAL([am__fastdep$1], [ | |
305 | test "x$enable_dependency_tracking" != xno \ | |
306 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) | |
307 | ]) | |
308 | ||
309 | ||
310 | # AM_SET_DEPDIR | |
311 | # ------------- | |
312 | # Choose a directory name for dependency files. | |
313 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES | |
314 | AC_DEFUN([AM_SET_DEPDIR], | |
315 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl | |
316 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl | |
317 | ]) | |
318 | ||
319 | ||
320 | # AM_DEP_TRACK | |
321 | # ------------ | |
322 | AC_DEFUN([AM_DEP_TRACK], | |
323 | [AC_ARG_ENABLE(dependency-tracking, | |
324 | [ --disable-dependency-tracking speeds up one-time build | |
325 | --enable-dependency-tracking do not reject slow dependency extractors]) | |
326 | if test "x$enable_dependency_tracking" != xno; then | |
327 | am_depcomp="$ac_aux_dir/depcomp" | |
328 | AMDEPBACKSLASH='\' | |
329 | am__nodep='_no' | |
330 | fi | |
331 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) | |
332 | AC_SUBST([AMDEPBACKSLASH])dnl | |
333 | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl | |
334 | AC_SUBST([am__nodep])dnl | |
335 | _AM_SUBST_NOTMAKE([am__nodep])dnl | |
336 | ]) | |
337 | ||
338 | # Generate code to set up dependency tracking. -*- Autoconf -*- | |
339 | ||
340 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 | |
341 | # Free Software Foundation, Inc. | |
342 | # | |
343 | # This file is free software; the Free Software Foundation | |
344 | # gives unlimited permission to copy and/or distribute it, | |
345 | # with or without modifications, as long as this notice is preserved. | |
346 | ||
347 | #serial 5 | |
348 | ||
349 | # _AM_OUTPUT_DEPENDENCY_COMMANDS | |
350 | # ------------------------------ | |
351 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | |
352 | [{ | |
353 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
354 | # are listed without --file. Let's play safe and only enable the eval | |
355 | # if we detect the quoting. | |
356 | case $CONFIG_FILES in | |
357 | *\'*) eval set x "$CONFIG_FILES" ;; | |
358 | *) set x $CONFIG_FILES ;; | |
359 | esac | |
360 | shift | |
361 | for mf | |
362 | do | |
363 | # Strip MF so we end up with the name of the file. | |
364 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
365 | # Check whether this is an Automake generated Makefile or not. | |
366 | # We used to match only the files named `Makefile.in', but | |
367 | # some people rename them; so instead we look at the file content. | |
368 | # Grep'ing the first line is not enough: some people post-process | |
369 | # each Makefile.in and add a new line on top of each file to say so. | |
370 | # Grep'ing the whole file is not good either: AIX grep has a line | |
371 | # limit of 2048, but all sed's we know have understand at least 4000. | |
372 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
373 | dirpart=`AS_DIRNAME("$mf")` | |
374 | else | |
375 | continue | |
376 | fi | |
377 | # Extract the definition of DEPDIR, am__include, and am__quote | |
378 | # from the Makefile without running `make'. | |
379 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
380 | test -z "$DEPDIR" && continue | |
381 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
382 | test -z "am__include" && continue | |
383 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
384 | # When using ansi2knr, U may be empty or an underscore; expand it | |
385 | U=`sed -n 's/^U = //p' < "$mf"` | |
386 | # Find all dependency output files, they are included files with | |
387 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
388 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
389 | # expansion. | |
390 | for file in `sed -n " | |
391 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
392 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
393 | # Make sure the directory exists. | |
394 | test -f "$dirpart/$file" && continue | |
395 | fdir=`AS_DIRNAME(["$file"])` | |
396 | AS_MKDIR_P([$dirpart/$fdir]) | |
397 | # echo "creating $dirpart/$file" | |
398 | echo '# dummy' > "$dirpart/$file" | |
399 | done | |
400 | done | |
401 | } | |
402 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS | |
403 | ||
404 | ||
405 | # AM_OUTPUT_DEPENDENCY_COMMANDS | |
406 | # ----------------------------- | |
407 | # This macro should only be invoked once -- use via AC_REQUIRE. | |
408 | # | |
409 | # This code is only required when automatic dependency tracking | |
410 | # is enabled. FIXME. This creates each `.P' file that we will | |
411 | # need in order to bootstrap the dependency handling code. | |
412 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], | |
413 | [AC_CONFIG_COMMANDS([depfiles], | |
414 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], | |
415 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) | |
416 | ]) | |
417 | ||
418 | # Do all the work for Automake. -*- Autoconf -*- | |
419 | ||
420 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | |
421 | # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. | |
422 | # | |
423 | # This file is free software; the Free Software Foundation | |
424 | # gives unlimited permission to copy and/or distribute it, | |
425 | # with or without modifications, as long as this notice is preserved. | |
426 | ||
427 | # serial 16 | |
428 | ||
429 | # This macro actually does too much. Some checks are only needed if | |
430 | # your package does certain things. But this isn't really a big deal. | |
431 | ||
432 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) | |
433 | # AM_INIT_AUTOMAKE([OPTIONS]) | |
434 | # ----------------------------------------------- | |
435 | # The call with PACKAGE and VERSION arguments is the old style | |
436 | # call (pre autoconf-2.50), which is being phased out. PACKAGE | |
437 | # and VERSION should now be passed to AC_INIT and removed from | |
438 | # the call to AM_INIT_AUTOMAKE. | |
439 | # We support both call styles for the transition. After | |
440 | # the next Automake release, Autoconf can make the AC_INIT | |
441 | # arguments mandatory, and then we can depend on a new Autoconf | |
442 | # release and drop the old call support. | |
443 | AC_DEFUN([AM_INIT_AUTOMAKE], | |
444 | [AC_PREREQ([2.62])dnl | |
445 | dnl Autoconf wants to disallow AM_ names. We explicitly allow | |
446 | dnl the ones we care about. | |
447 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl | |
448 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl | |
449 | AC_REQUIRE([AC_PROG_INSTALL])dnl | |
450 | if test "`cd $srcdir && pwd`" != "`pwd`"; then | |
451 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
452 | # is not polluted with repeated "-I." | |
453 | AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl | |
454 | # test to see if srcdir already configured | |
455 | if test -f $srcdir/config.status; then | |
456 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) | |
457 | fi | |
458 | fi | |
459 | ||
460 | # test whether we have cygpath | |
461 | if test -z "$CYGPATH_W"; then | |
462 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
463 | CYGPATH_W='cygpath -w' | |
464 | else | |
465 | CYGPATH_W=echo | |
466 | fi | |
467 | fi | |
468 | AC_SUBST([CYGPATH_W]) | |
469 | ||
470 | # Define the identity of the package. | |
471 | dnl Distinguish between old-style and new-style calls. | |
472 | m4_ifval([$2], | |
473 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl | |
474 | AC_SUBST([PACKAGE], [$1])dnl | |
475 | AC_SUBST([VERSION], [$2])], | |
476 | [_AM_SET_OPTIONS([$1])dnl | |
477 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. | |
478 | m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, | |
479 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl | |
480 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl | |
481 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl | |
482 | ||
483 | _AM_IF_OPTION([no-define],, | |
484 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) | |
485 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl | |
486 | ||
487 | # Some tools Automake needs. | |
488 | AC_REQUIRE([AM_SANITY_CHECK])dnl | |
489 | AC_REQUIRE([AC_ARG_PROGRAM])dnl | |
490 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) | |
491 | AM_MISSING_PROG(AUTOCONF, autoconf) | |
492 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) | |
493 | AM_MISSING_PROG(AUTOHEADER, autoheader) | |
494 | AM_MISSING_PROG(MAKEINFO, makeinfo) | |
495 | AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | |
496 | AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl | |
497 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl | |
498 | # We need awk for the "check" target. The system "awk" is bad on | |
499 | # some platforms. | |
500 | AC_REQUIRE([AC_PROG_AWK])dnl | |
501 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl | |
502 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl | |
503 | _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], | |
504 | [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], | |
505 | [_AM_PROG_TAR([v7])])]) | |
506 | _AM_IF_OPTION([no-dependencies],, | |
507 | [AC_PROVIDE_IFELSE([AC_PROG_CC], | |
508 | [_AM_DEPENDENCIES(CC)], | |
509 | [define([AC_PROG_CC], | |
510 | defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl | |
511 | AC_PROVIDE_IFELSE([AC_PROG_CXX], | |
512 | [_AM_DEPENDENCIES(CXX)], | |
513 | [define([AC_PROG_CXX], | |
514 | defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl | |
515 | AC_PROVIDE_IFELSE([AC_PROG_OBJC], | |
516 | [_AM_DEPENDENCIES(OBJC)], | |
517 | [define([AC_PROG_OBJC], | |
518 | defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl | |
519 | ]) | |
520 | _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl | |
521 | dnl The `parallel-tests' driver may need to know about EXEEXT, so add the | |
522 | dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro | |
523 | dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. | |
524 | AC_CONFIG_COMMANDS_PRE(dnl | |
525 | [m4_provide_if([_AM_COMPILER_EXEEXT], | |
526 | [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl | |
527 | ]) | |
528 | ||
529 | dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not | |
530 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further | |
531 | dnl mangled by Autoconf and run in a shell conditional statement. | |
532 | m4_define([_AC_COMPILER_EXEEXT], | |
533 | m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) | |
534 | ||
535 | ||
536 | # When config.status generates a header, we must update the stamp-h file. | |
537 | # This file resides in the same directory as the config header | |
538 | # that is generated. The stamp files are numbered to have different names. | |
539 | ||
540 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the | |
541 | # loop where config.status creates the headers, so we can generate | |
542 | # our stamp files there. | |
543 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], | |
544 | [# Compute $1's index in $config_headers. | |
545 | _am_arg=$1 | |
546 | _am_stamp_count=1 | |
547 | for _am_header in $config_headers :; do | |
548 | case $_am_header in | |
549 | $_am_arg | $_am_arg:* ) | |
550 | break ;; | |
551 | * ) | |
552 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
553 | esac | |
554 | done | |
555 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) | |
556 | ||
557 | # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, | |
558 | # Inc. | |
559 | # | |
560 | # This file is free software; the Free Software Foundation | |
561 | # gives unlimited permission to copy and/or distribute it, | |
562 | # with or without modifications, as long as this notice is preserved. | |
563 | ||
564 | # serial 1 | |
565 | ||
566 | # AM_PROG_INSTALL_SH | |
567 | # ------------------ | |
568 | # Define $install_sh. | |
569 | AC_DEFUN([AM_PROG_INSTALL_SH], | |
570 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
571 | if test x"${install_sh}" != xset; then | |
572 | case $am_aux_dir in | |
573 | *\ * | *\ *) | |
574 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
575 | *) | |
576 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
577 | esac | |
578 | fi | |
579 | AC_SUBST(install_sh)]) | |
580 | ||
581 | # Copyright (C) 2003, 2005 Free Software Foundation, Inc. | |
582 | # | |
583 | # This file is free software; the Free Software Foundation | |
584 | # gives unlimited permission to copy and/or distribute it, | |
585 | # with or without modifications, as long as this notice is preserved. | |
586 | ||
587 | # serial 2 | |
588 | ||
589 | # Check whether the underlying file-system supports filenames | |
590 | # with a leading dot. For instance MS-DOS doesn't. | |
591 | AC_DEFUN([AM_SET_LEADING_DOT], | |
592 | [rm -rf .tst 2>/dev/null | |
593 | mkdir .tst 2>/dev/null | |
594 | if test -d .tst; then | |
595 | am__leading_dot=. | |
596 | else | |
597 | am__leading_dot=_ | |
598 | fi | |
599 | rmdir .tst 2>/dev/null | |
600 | AC_SUBST([am__leading_dot])]) | |
601 | ||
602 | # Check to see how 'make' treats includes. -*- Autoconf -*- | |
603 | ||
604 | # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. | |
605 | # | |
606 | # This file is free software; the Free Software Foundation | |
607 | # gives unlimited permission to copy and/or distribute it, | |
608 | # with or without modifications, as long as this notice is preserved. | |
609 | ||
610 | # serial 4 | |
611 | ||
612 | # AM_MAKE_INCLUDE() | |
613 | # ----------------- | |
614 | # Check to see how make treats includes. | |
615 | AC_DEFUN([AM_MAKE_INCLUDE], | |
616 | [am_make=${MAKE-make} | |
617 | cat > confinc << 'END' | |
618 | am__doit: | |
619 | @echo this is the am__doit target | |
620 | .PHONY: am__doit | |
621 | END | |
622 | # If we don't find an include directive, just comment out the code. | |
623 | AC_MSG_CHECKING([for style of include used by $am_make]) | |
624 | am__include="#" | |
625 | am__quote= | |
626 | _am_result=none | |
627 | # First try GNU make style include. | |
628 | echo "include confinc" > confmf | |
629 | # Ignore all kinds of additional output from `make'. | |
630 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
631 | *the\ am__doit\ target*) | |
632 | am__include=include | |
633 | am__quote= | |
634 | _am_result=GNU | |
635 | ;; | |
636 | esac | |
637 | # Now try BSD make style include. | |
638 | if test "$am__include" = "#"; then | |
639 | echo '.include "confinc"' > confmf | |
640 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
641 | *the\ am__doit\ target*) | |
642 | am__include=.include | |
643 | am__quote="\"" | |
644 | _am_result=BSD | |
645 | ;; | |
646 | esac | |
647 | fi | |
648 | AC_SUBST([am__include]) | |
649 | AC_SUBST([am__quote]) | |
650 | AC_MSG_RESULT([$_am_result]) | |
651 | rm -f confinc confmf | |
652 | ]) | |
653 | ||
654 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- | |
655 | ||
656 | # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 | |
657 | # Free Software Foundation, Inc. | |
658 | # | |
659 | # This file is free software; the Free Software Foundation | |
660 | # gives unlimited permission to copy and/or distribute it, | |
661 | # with or without modifications, as long as this notice is preserved. | |
662 | ||
663 | # serial 6 | |
664 | ||
665 | # AM_MISSING_PROG(NAME, PROGRAM) | |
666 | # ------------------------------ | |
667 | AC_DEFUN([AM_MISSING_PROG], | |
668 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) | |
669 | $1=${$1-"${am_missing_run}$2"} | |
670 | AC_SUBST($1)]) | |
671 | ||
672 | ||
673 | # AM_MISSING_HAS_RUN | |
674 | # ------------------ | |
675 | # Define MISSING if not defined so far and test if it supports --run. | |
676 | # If it does, set am_missing_run to use it, otherwise, to nothing. | |
677 | AC_DEFUN([AM_MISSING_HAS_RUN], | |
678 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
679 | AC_REQUIRE_AUX_FILE([missing])dnl | |
680 | if test x"${MISSING+set}" != xset; then | |
681 | case $am_aux_dir in | |
682 | *\ * | *\ *) | |
683 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
684 | *) | |
685 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
686 | esac | |
687 | fi | |
688 | # Use eval to expand $SHELL | |
689 | if eval "$MISSING --run true"; then | |
690 | am_missing_run="$MISSING --run " | |
691 | else | |
692 | am_missing_run= | |
693 | AC_MSG_WARN([`missing' script is too old or missing]) | |
694 | fi | |
695 | ]) | |
696 | ||
697 | # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, | |
698 | # Inc. | |
699 | # | |
700 | # This file is free software; the Free Software Foundation | |
701 | # gives unlimited permission to copy and/or distribute it, | |
702 | # with or without modifications, as long as this notice is preserved. | |
703 | ||
704 | # serial 1 | |
705 | ||
706 | # AM_PROG_MKDIR_P | |
707 | # --------------- | |
708 | # Check for `mkdir -p'. | |
709 | AC_DEFUN([AM_PROG_MKDIR_P], | |
710 | [AC_PREREQ([2.60])dnl | |
711 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl | |
712 | dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, | |
713 | dnl while keeping a definition of mkdir_p for backward compatibility. | |
714 | dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. | |
715 | dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of | |
716 | dnl Makefile.ins that do not define MKDIR_P, so we do our own | |
717 | dnl adjustment using top_builddir (which is defined more often than | |
718 | dnl MKDIR_P). | |
719 | AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl | |
720 | case $mkdir_p in | |
721 | [[\\/$]]* | ?:[[\\/]]*) ;; | |
722 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
723 | esac | |
724 | ]) | |
725 | ||
726 | # Helper functions for option handling. -*- Autoconf -*- | |
727 | ||
728 | # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software | |
729 | # Foundation, Inc. | |
730 | # | |
731 | # This file is free software; the Free Software Foundation | |
732 | # gives unlimited permission to copy and/or distribute it, | |
733 | # with or without modifications, as long as this notice is preserved. | |
734 | ||
735 | # serial 5 | |
736 | ||
737 | # _AM_MANGLE_OPTION(NAME) | |
738 | # ----------------------- | |
739 | AC_DEFUN([_AM_MANGLE_OPTION], | |
740 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) | |
741 | ||
742 | # _AM_SET_OPTION(NAME) | |
743 | # -------------------- | |
744 | # Set option NAME. Presently that only means defining a flag for this option. | |
745 | AC_DEFUN([_AM_SET_OPTION], | |
746 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) | |
747 | ||
748 | # _AM_SET_OPTIONS(OPTIONS) | |
749 | # ------------------------ | |
750 | # OPTIONS is a space-separated list of Automake options. | |
751 | AC_DEFUN([_AM_SET_OPTIONS], | |
752 | [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) | |
753 | ||
754 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) | |
755 | # ------------------------------------------- | |
756 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. | |
757 | AC_DEFUN([_AM_IF_OPTION], | |
758 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) | |
759 | ||
760 | # Check to make sure that the build environment is sane. -*- Autoconf -*- | |
761 | ||
762 | # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 | |
763 | # Free Software Foundation, Inc. | |
764 | # | |
765 | # This file is free software; the Free Software Foundation | |
766 | # gives unlimited permission to copy and/or distribute it, | |
767 | # with or without modifications, as long as this notice is preserved. | |
768 | ||
769 | # serial 5 | |
770 | ||
771 | # AM_SANITY_CHECK | |
772 | # --------------- | |
773 | AC_DEFUN([AM_SANITY_CHECK], | |
774 | [AC_MSG_CHECKING([whether build environment is sane]) | |
775 | # Just in case | |
776 | sleep 1 | |
777 | echo timestamp > conftest.file | |
778 | # Reject unsafe characters in $srcdir or the absolute working directory | |
779 | # name. Accept space and tab only in the latter. | |
780 | am_lf=' | |
781 | ' | |
782 | case `pwd` in | |
783 | *[[\\\"\#\$\&\'\`$am_lf]]*) | |
784 | AC_MSG_ERROR([unsafe absolute working directory name]);; | |
785 | esac | |
786 | case $srcdir in | |
787 | *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) | |
788 | AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; | |
789 | esac | |
790 | ||
791 | # Do `set' in a subshell so we don't clobber the current shell's | |
792 | # arguments. Must try -L first in case configure is actually a | |
793 | # symlink; some systems play weird games with the mod time of symlinks | |
794 | # (eg FreeBSD returns the mod time of the symlink's containing | |
795 | # directory). | |
796 | if ( | |
797 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
798 | if test "$[*]" = "X"; then | |
799 | # -L didn't work. | |
800 | set X `ls -t "$srcdir/configure" conftest.file` | |
801 | fi | |
802 | rm -f conftest.file | |
803 | if test "$[*]" != "X $srcdir/configure conftest.file" \ | |
804 | && test "$[*]" != "X conftest.file $srcdir/configure"; then | |
805 | ||
806 | # If neither matched, then we have a broken ls. This can happen | |
807 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
808 | # broken ls alias from the environment. This has actually | |
809 | # happened. Such a system could not be considered "sane". | |
810 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken | |
811 | alias in your environment]) | |
812 | fi | |
813 | ||
814 | test "$[2]" = conftest.file | |
815 | ) | |
816 | then | |
817 | # Ok. | |
818 | : | |
819 | else | |
820 | AC_MSG_ERROR([newly created file is older than distributed files! | |
821 | Check your system clock]) | |
822 | fi | |
823 | AC_MSG_RESULT(yes)]) | |
824 | ||
825 | # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. | |
826 | # | |
827 | # This file is free software; the Free Software Foundation | |
828 | # gives unlimited permission to copy and/or distribute it, | |
829 | # with or without modifications, as long as this notice is preserved. | |
830 | ||
831 | # serial 1 | |
832 | ||
833 | # AM_PROG_INSTALL_STRIP | |
834 | # --------------------- | |
835 | # One issue with vendor `install' (even GNU) is that you can't | |
836 | # specify the program used to strip binaries. This is especially | |
837 | # annoying in cross-compiling environments, where the build's strip | |
838 | # is unlikely to handle the host's binaries. | |
839 | # Fortunately install-sh will honor a STRIPPROG variable, so we | |
840 | # always use install-sh in `make install-strip', and initialize | |
841 | # STRIPPROG with the value of the STRIP variable (set by the user). | |
842 | AC_DEFUN([AM_PROG_INSTALL_STRIP], | |
843 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | |
844 | # Installed binaries are usually stripped using `strip' when the user | |
845 | # run `make install-strip'. However `strip' might not be the right | |
846 | # tool to use in cross-compilation environments, therefore Automake | |
847 | # will honor the `STRIP' environment variable to overrule this program. | |
848 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'. | |
849 | if test "$cross_compiling" != no; then | |
850 | AC_CHECK_TOOL([STRIP], [strip], :) | |
851 | fi | |
852 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
853 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) | |
854 | ||
855 | # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. | |
856 | # | |
857 | # This file is free software; the Free Software Foundation | |
858 | # gives unlimited permission to copy and/or distribute it, | |
859 | # with or without modifications, as long as this notice is preserved. | |
860 | ||
861 | # serial 3 | |
862 | ||
863 | # _AM_SUBST_NOTMAKE(VARIABLE) | |
864 | # --------------------------- | |
865 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. | |
866 | # This macro is traced by Automake. | |
867 | AC_DEFUN([_AM_SUBST_NOTMAKE]) | |
868 | ||
869 | # AM_SUBST_NOTMAKE(VARIABLE) | |
870 | # -------------------------- | |
871 | # Public sister of _AM_SUBST_NOTMAKE. | |
872 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) | |
873 | ||
874 | # Check how to create a tarball. -*- Autoconf -*- | |
875 | ||
876 | # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. | |
877 | # | |
878 | # This file is free software; the Free Software Foundation | |
879 | # gives unlimited permission to copy and/or distribute it, | |
880 | # with or without modifications, as long as this notice is preserved. | |
881 | ||
882 | # serial 2 | |
883 | ||
884 | # _AM_PROG_TAR(FORMAT) | |
885 | # -------------------- | |
886 | # Check how to create a tarball in format FORMAT. | |
887 | # FORMAT should be one of `v7', `ustar', or `pax'. | |
888 | # | |
889 | # Substitute a variable $(am__tar) that is a command | |
890 | # writing to stdout a FORMAT-tarball containing the directory | |
891 | # $tardir. | |
892 | # tardir=directory && $(am__tar) > result.tar | |
893 | # | |
894 | # Substitute a variable $(am__untar) that extract such | |
895 | # a tarball read from stdin. | |
896 | # $(am__untar) < result.tar | |
897 | AC_DEFUN([_AM_PROG_TAR], | |
898 | [# Always define AMTAR for backward compatibility. Yes, it's still used | |
899 | # in the wild :-( We should find a proper way to deprecate it ... | |
900 | AC_SUBST([AMTAR], ['$${TAR-tar}']) | |
901 | m4_if([$1], [v7], | |
902 | [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], | |
903 | [m4_case([$1], [ustar],, [pax],, | |
904 | [m4_fatal([Unknown tar format])]) | |
905 | AC_MSG_CHECKING([how to create a $1 tar archive]) | |
906 | # Loop over all known methods to create a tar archive until one works. | |
907 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' | |
908 | _am_tools=${am_cv_prog_tar_$1-$_am_tools} | |
909 | # Do not fold the above two line into one, because Tru64 sh and | |
910 | # Solaris sh will not grok spaces in the rhs of `-'. | |
911 | for _am_tool in $_am_tools | |
912 | do | |
913 | case $_am_tool in | |
914 | gnutar) | |
915 | for _am_tar in tar gnutar gtar; | |
916 | do | |
917 | AM_RUN_LOG([$_am_tar --version]) && break | |
918 | done | |
919 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' | |
920 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' | |
921 | am__untar="$_am_tar -xf -" | |
922 | ;; | |
923 | plaintar) | |
924 | # Must skip GNU tar: if it does not support --format= it doesn't create | |
925 | # ustar tarball either. | |
926 | (tar --version) >/dev/null 2>&1 && continue | |
927 | am__tar='tar chf - "$$tardir"' | |
928 | am__tar_='tar chf - "$tardir"' | |
929 | am__untar='tar xf -' | |
930 | ;; | |
931 | pax) | |
932 | am__tar='pax -L -x $1 -w "$$tardir"' | |
933 | am__tar_='pax -L -x $1 -w "$tardir"' | |
934 | am__untar='pax -r' | |
935 | ;; | |
936 | cpio) | |
937 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L' | |
938 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L' | |
939 | am__untar='cpio -i -H $1 -d' | |
940 | ;; | |
941 | none) | |
942 | am__tar=false | |
943 | am__tar_=false | |
944 | am__untar=false | |
945 | ;; | |
946 | esac | |
947 | ||
948 | # If the value was cached, stop now. We just wanted to have am__tar | |
949 | # and am__untar set. | |
950 | test -n "${am_cv_prog_tar_$1}" && break | |
951 | ||
952 | # tar/untar a dummy directory, and stop if the command works | |
953 | rm -rf conftest.dir | |
954 | mkdir conftest.dir | |
955 | echo GrepMe > conftest.dir/file | |
956 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) | |
957 | rm -rf conftest.dir | |
958 | if test -s conftest.tar; then | |
959 | AM_RUN_LOG([$am__untar <conftest.tar]) | |
960 | grep GrepMe conftest.dir/file >/dev/null 2>&1 && break | |
961 | fi | |
962 | done | |
963 | rm -rf conftest.dir | |
964 | ||
965 | AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) | |
966 | AC_MSG_RESULT([$am_cv_prog_tar_$1])]) | |
967 | AC_SUBST([am__tar]) | |
968 | AC_SUBST([am__untar]) | |
969 | ]) # _AM_PROG_TAR | |
970 |
0 | #!/bin/sh | |
1 | # autogen.sh script for nettoe | |
2 | # Edited by Gabriele Giorgetti <g.gabriele@europe.com> | |
3 | # | |
4 | # For nettoe-1.2.0: use '--ignore-deps' with automake. | |
5 | ||
6 | DIE=0 | |
7 | ||
8 | (autoconf --version) < /dev/null > /dev/null 2>&1 || { | |
9 | echo | |
10 | echo "**Error**: You must have \`autoconf' installed to." | |
11 | echo "Download the appropriate package for your distribution," | |
12 | echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" | |
13 | DIE=1 | |
14 | } | |
15 | ||
16 | (automake --version) < /dev/null > /dev/null 2>&1 || { | |
17 | echo | |
18 | echo "**Error**: You must have \`automake' installed." | |
19 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" | |
20 | echo "(or a newer version if it is available)" | |
21 | DIE=1 | |
22 | NO_AUTOMAKE=yes | |
23 | } | |
24 | ||
25 | ||
26 | # if no automake, don't bother testing for aclocal | |
27 | test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { | |
28 | echo | |
29 | echo "**Error**: Missing \`aclocal'. The version of \`automake'" | |
30 | echo "installed doesn't appear recent enough." | |
31 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" | |
32 | echo "(or a newer version if it is available)" | |
33 | DIE=1 | |
34 | } | |
35 | ||
36 | if test "$DIE" -eq 1; then | |
37 | exit 1 | |
38 | fi | |
39 | ||
40 | echo "Running aclocal ..." \ | |
41 | && aclocal --force \ | |
42 | && echo "Running autoheader ..." \ | |
43 | && autoheader --force \ | |
44 | && echo "Running automake ..." \ | |
45 | && automake --gnu --add-missing --ignore-deps --copy \ | |
46 | && echo "Running autoconf ..." \ | |
47 | && autoconf --force | |
48 |
0 | #! /bin/sh | |
1 | # Attempt to guess a canonical system name. | |
2 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | |
3 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, | |
4 | # 2011, 2012 Free Software Foundation, Inc. | |
5 | ||
6 | timestamp='2012-02-10' | |
7 | ||
8 | # This file is free software; you can redistribute it and/or modify it | |
9 | # under the terms of the GNU General Public License as published by | |
10 | # the Free Software Foundation; either version 2 of the License, or | |
11 | # (at your option) any later version. | |
12 | # | |
13 | # This program is distributed in the hope that it will be useful, but | |
14 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 | # General Public License for more details. | |
17 | # | |
18 | # You should have received a copy of the GNU General Public License | |
19 | # along with this program; if not, see <http://www.gnu.org/licenses/>. | |
20 | # | |
21 | # As a special exception to the GNU General Public License, if you | |
22 | # distribute this file as part of a program that contains a | |
23 | # configuration script generated by Autoconf, you may include it under | |
24 | # the same distribution terms that you use for the rest of that program. | |
25 | ||
26 | ||
27 | # Originally written by Per Bothner. Please send patches (context | |
28 | # diff format) to <config-patches@gnu.org> and include a ChangeLog | |
29 | # entry. | |
30 | # | |
31 | # This script attempts to guess a canonical system name similar to | |
32 | # config.sub. If it succeeds, it prints the system name on stdout, and | |
33 | # exits with 0. Otherwise, it exits with 1. | |
34 | # | |
35 | # You can get the latest version of this script from: | |
36 | # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD | |
37 | ||
38 | me=`echo "$0" | sed -e 's,.*/,,'` | |
39 | ||
40 | usage="\ | |
41 | Usage: $0 [OPTION] | |
42 | ||
43 | Output the configuration name of the system \`$me' is run on. | |
44 | ||
45 | Operation modes: | |
46 | -h, --help print this help, then exit | |
47 | -t, --time-stamp print date of last modification, then exit | |
48 | -v, --version print version number, then exit | |
49 | ||
50 | Report bugs and patches to <config-patches@gnu.org>." | |
51 | ||
52 | version="\ | |
53 | GNU config.guess ($timestamp) | |
54 | ||
55 | Originally written by Per Bothner. | |
56 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, | |
57 | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 | |
58 | Free Software Foundation, Inc. | |
59 | ||
60 | This is free software; see the source for copying conditions. There is NO | |
61 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | |
62 | ||
63 | help=" | |
64 | Try \`$me --help' for more information." | |
65 | ||
66 | # Parse command line | |
67 | while test $# -gt 0 ; do | |
68 | case $1 in | |
69 | --time-stamp | --time* | -t ) | |
70 | echo "$timestamp" ; exit ;; | |
71 | --version | -v ) | |
72 | echo "$version" ; exit ;; | |
73 | --help | --h* | -h ) | |
74 | echo "$usage"; exit ;; | |
75 | -- ) # Stop option processing | |
76 | shift; break ;; | |
77 | - ) # Use stdin as input. | |
78 | break ;; | |
79 | -* ) | |
80 | echo "$me: invalid option $1$help" >&2 | |
81 | exit 1 ;; | |
82 | * ) | |
83 | break ;; | |
84 | esac | |
85 | done | |
86 | ||
87 | if test $# != 0; then | |
88 | echo "$me: too many arguments$help" >&2 | |
89 | exit 1 | |
90 | fi | |
91 | ||
92 | trap 'exit 1' 1 2 15 | |
93 | ||
94 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a | |
95 | # compiler to aid in system detection is discouraged as it requires | |
96 | # temporary files to be created and, as you can see below, it is a | |
97 | # headache to deal with in a portable fashion. | |
98 | ||
99 | # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still | |
100 | # use `HOST_CC' if defined, but it is deprecated. | |
101 | ||
102 | # Portable tmp directory creation inspired by the Autoconf team. | |
103 | ||
104 | set_cc_for_build=' | |
105 | trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; | |
106 | trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; | |
107 | : ${TMPDIR=/tmp} ; | |
108 | { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || | |
109 | { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || | |
110 | { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || | |
111 | { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; | |
112 | dummy=$tmp/dummy ; | |
113 | tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; | |
114 | case $CC_FOR_BUILD,$HOST_CC,$CC in | |
115 | ,,) echo "int x;" > $dummy.c ; | |
116 | for c in cc gcc c89 c99 ; do | |
117 | if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then | |
118 | CC_FOR_BUILD="$c"; break ; | |
119 | fi ; | |
120 | done ; | |
121 | if test x"$CC_FOR_BUILD" = x ; then | |
122 | CC_FOR_BUILD=no_compiler_found ; | |
123 | fi | |
124 | ;; | |
125 | ,,*) CC_FOR_BUILD=$CC ;; | |
126 | ,*,*) CC_FOR_BUILD=$HOST_CC ;; | |
127 | esac ; set_cc_for_build= ;' | |
128 | ||
129 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. | |
130 | # (ghazi@noc.rutgers.edu 1994-08-24) | |
131 | if (test -f /.attbin/uname) >/dev/null 2>&1 ; then | |
132 | PATH=$PATH:/.attbin ; export PATH | |
133 | fi | |
134 | ||
135 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown | |
136 | UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown | |
137 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | |
138 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown | |
139 | ||
140 | # Note: order is significant - the case branches are not exclusive. | |
141 | ||
142 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |
143 | *:NetBSD:*:*) | |
144 | # NetBSD (nbsd) targets should (where applicable) match one or | |
145 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, | |
146 | # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently | |
147 | # switched to ELF, *-*-netbsd* would select the old | |
148 | # object file format. This provides both forward | |
149 | # compatibility and a consistent mechanism for selecting the | |
150 | # object file format. | |
151 | # | |
152 | # Note: NetBSD doesn't particularly care about the vendor | |
153 | # portion of the name. We always set it to "unknown". | |
154 | sysctl="sysctl -n hw.machine_arch" | |
155 | UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ | |
156 | /usr/sbin/$sysctl 2>/dev/null || echo unknown)` | |
157 | case "${UNAME_MACHINE_ARCH}" in | |
158 | armeb) machine=armeb-unknown ;; | |
159 | arm*) machine=arm-unknown ;; | |
160 | sh3el) machine=shl-unknown ;; | |
161 | sh3eb) machine=sh-unknown ;; | |
162 | sh5el) machine=sh5le-unknown ;; | |
163 | *) machine=${UNAME_MACHINE_ARCH}-unknown ;; | |
164 | esac | |
165 | # The Operating System including object format, if it has switched | |
166 | # to ELF recently, or will in the future. | |
167 | case "${UNAME_MACHINE_ARCH}" in | |
168 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) | |
169 | eval $set_cc_for_build | |
170 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | |
171 | | grep -q __ELF__ | |
172 | then | |
173 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). | |
174 | # Return netbsd for either. FIX? | |
175 | os=netbsd | |
176 | else | |
177 | os=netbsdelf | |
178 | fi | |
179 | ;; | |
180 | *) | |
181 | os=netbsd | |
182 | ;; | |
183 | esac | |
184 | # The OS release | |
185 | # Debian GNU/NetBSD machines have a different userland, and | |
186 | # thus, need a distinct triplet. However, they do not need | |
187 | # kernel version information, so it can be replaced with a | |
188 | # suitable tag, in the style of linux-gnu. | |
189 | case "${UNAME_VERSION}" in | |
190 | Debian*) | |
191 | release='-gnu' | |
192 | ;; | |
193 | *) | |
194 | release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | |
195 | ;; | |
196 | esac | |
197 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: | |
198 | # contains redundant information, the shorter form: | |
199 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. | |
200 | echo "${machine}-${os}${release}" | |
201 | exit ;; | |
202 | *:OpenBSD:*:*) | |
203 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` | |
204 | echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} | |
205 | exit ;; | |
206 | *:ekkoBSD:*:*) | |
207 | echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} | |
208 | exit ;; | |
209 | *:SolidBSD:*:*) | |
210 | echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} | |
211 | exit ;; | |
212 | macppc:MirBSD:*:*) | |
213 | echo powerpc-unknown-mirbsd${UNAME_RELEASE} | |
214 | exit ;; | |
215 | *:MirBSD:*:*) | |
216 | echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} | |
217 | exit ;; | |
218 | alpha:OSF1:*:*) | |
219 | case $UNAME_RELEASE in | |
220 | *4.0) | |
221 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` | |
222 | ;; | |
223 | *5.*) | |
224 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` | |
225 | ;; | |
226 | esac | |
227 | # According to Compaq, /usr/sbin/psrinfo has been available on | |
228 | # OSF/1 and Tru64 systems produced since 1995. I hope that | |
229 | # covers most systems running today. This code pipes the CPU | |
230 | # types through head -n 1, so we only detect the type of CPU 0. | |
231 | ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` | |
232 | case "$ALPHA_CPU_TYPE" in | |
233 | "EV4 (21064)") | |
234 | UNAME_MACHINE="alpha" ;; | |
235 | "EV4.5 (21064)") | |
236 | UNAME_MACHINE="alpha" ;; | |
237 | "LCA4 (21066/21068)") | |
238 | UNAME_MACHINE="alpha" ;; | |
239 | "EV5 (21164)") | |
240 | UNAME_MACHINE="alphaev5" ;; | |
241 | "EV5.6 (21164A)") | |
242 | UNAME_MACHINE="alphaev56" ;; | |
243 | "EV5.6 (21164PC)") | |
244 | UNAME_MACHINE="alphapca56" ;; | |
245 | "EV5.7 (21164PC)") | |
246 | UNAME_MACHINE="alphapca57" ;; | |
247 | "EV6 (21264)") | |
248 | UNAME_MACHINE="alphaev6" ;; | |
249 | "EV6.7 (21264A)") | |
250 | UNAME_MACHINE="alphaev67" ;; | |
251 | "EV6.8CB (21264C)") | |
252 | UNAME_MACHINE="alphaev68" ;; | |
253 | "EV6.8AL (21264B)") | |
254 | UNAME_MACHINE="alphaev68" ;; | |
255 | "EV6.8CX (21264D)") | |
256 | UNAME_MACHINE="alphaev68" ;; | |
257 | "EV6.9A (21264/EV69A)") | |
258 | UNAME_MACHINE="alphaev69" ;; | |
259 | "EV7 (21364)") | |
260 | UNAME_MACHINE="alphaev7" ;; | |
261 | "EV7.9 (21364A)") | |
262 | UNAME_MACHINE="alphaev79" ;; | |
263 | esac | |
264 | # A Pn.n version is a patched version. | |
265 | # A Vn.n version is a released version. | |
266 | # A Tn.n version is a released field test version. | |
267 | # A Xn.n version is an unreleased experimental baselevel. | |
268 | # 1.2 uses "1.2" for uname -r. | |
269 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | |
270 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | |
271 | exitcode=$? | |
272 | trap '' 0 | |
273 | exit $exitcode ;; | |
274 | Alpha\ *:Windows_NT*:*) | |
275 | # How do we know it's Interix rather than the generic POSIX subsystem? | |
276 | # Should we change UNAME_MACHINE based on the output of uname instead | |
277 | # of the specific Alpha model? | |
278 | echo alpha-pc-interix | |
279 | exit ;; | |
280 | 21064:Windows_NT:50:3) | |
281 | echo alpha-dec-winnt3.5 | |
282 | exit ;; | |
283 | Amiga*:UNIX_System_V:4.0:*) | |
284 | echo m68k-unknown-sysv4 | |
285 | exit ;; | |
286 | *:[Aa]miga[Oo][Ss]:*:*) | |
287 | echo ${UNAME_MACHINE}-unknown-amigaos | |
288 | exit ;; | |
289 | *:[Mm]orph[Oo][Ss]:*:*) | |
290 | echo ${UNAME_MACHINE}-unknown-morphos | |
291 | exit ;; | |
292 | *:OS/390:*:*) | |
293 | echo i370-ibm-openedition | |
294 | exit ;; | |
295 | *:z/VM:*:*) | |
296 | echo s390-ibm-zvmoe | |
297 | exit ;; | |
298 | *:OS400:*:*) | |
299 | echo powerpc-ibm-os400 | |
300 | exit ;; | |
301 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) | |
302 | echo arm-acorn-riscix${UNAME_RELEASE} | |
303 | exit ;; | |
304 | arm:riscos:*:*|arm:RISCOS:*:*) | |
305 | echo arm-unknown-riscos | |
306 | exit ;; | |
307 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) | |
308 | echo hppa1.1-hitachi-hiuxmpp | |
309 | exit ;; | |
310 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) | |
311 | # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. | |
312 | if test "`(/bin/universe) 2>/dev/null`" = att ; then | |
313 | echo pyramid-pyramid-sysv3 | |
314 | else | |
315 | echo pyramid-pyramid-bsd | |
316 | fi | |
317 | exit ;; | |
318 | NILE*:*:*:dcosx) | |
319 | echo pyramid-pyramid-svr4 | |
320 | exit ;; | |
321 | DRS?6000:unix:4.0:6*) | |
322 | echo sparc-icl-nx6 | |
323 | exit ;; | |
324 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) | |
325 | case `/usr/bin/uname -p` in | |
326 | sparc) echo sparc-icl-nx7; exit ;; | |
327 | esac ;; | |
328 | s390x:SunOS:*:*) | |
329 | echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
330 | exit ;; | |
331 | sun4H:SunOS:5.*:*) | |
332 | echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
333 | exit ;; | |
334 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) | |
335 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
336 | exit ;; | |
337 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) | |
338 | echo i386-pc-auroraux${UNAME_RELEASE} | |
339 | exit ;; | |
340 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) | |
341 | eval $set_cc_for_build | |
342 | SUN_ARCH="i386" | |
343 | # If there is a compiler, see if it is configured for 64-bit objects. | |
344 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. | |
345 | # This test works for both compilers. | |
346 | if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | |
347 | if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
348 | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
349 | grep IS_64BIT_ARCH >/dev/null | |
350 | then | |
351 | SUN_ARCH="x86_64" | |
352 | fi | |
353 | fi | |
354 | echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
355 | exit ;; | |
356 | sun4*:SunOS:6*:*) | |
357 | # According to config.sub, this is the proper way to canonicalize | |
358 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but | |
359 | # it's likely to be more like Solaris than SunOS4. | |
360 | echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
361 | exit ;; | |
362 | sun4*:SunOS:*:*) | |
363 | case "`/usr/bin/arch -k`" in | |
364 | Series*|S4*) | |
365 | UNAME_RELEASE=`uname -v` | |
366 | ;; | |
367 | esac | |
368 | # Japanese Language versions have a version number like `4.1.3-JL'. | |
369 | echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` | |
370 | exit ;; | |
371 | sun3*:SunOS:*:*) | |
372 | echo m68k-sun-sunos${UNAME_RELEASE} | |
373 | exit ;; | |
374 | sun*:*:4.2BSD:*) | |
375 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` | |
376 | test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 | |
377 | case "`/bin/arch`" in | |
378 | sun3) | |
379 | echo m68k-sun-sunos${UNAME_RELEASE} | |
380 | ;; | |
381 | sun4) | |
382 | echo sparc-sun-sunos${UNAME_RELEASE} | |
383 | ;; | |
384 | esac | |
385 | exit ;; | |
386 | aushp:SunOS:*:*) | |
387 | echo sparc-auspex-sunos${UNAME_RELEASE} | |
388 | exit ;; | |
389 | # The situation for MiNT is a little confusing. The machine name | |
390 | # can be virtually everything (everything which is not | |
391 | # "atarist" or "atariste" at least should have a processor | |
392 | # > m68000). The system name ranges from "MiNT" over "FreeMiNT" | |
393 | # to the lowercase version "mint" (or "freemint"). Finally | |
394 | # the system name "TOS" denotes a system which is actually not | |
395 | # MiNT. But MiNT is downward compatible to TOS, so this should | |
396 | # be no problem. | |
397 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) | |
398 | echo m68k-atari-mint${UNAME_RELEASE} | |
399 | exit ;; | |
400 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) | |
401 | echo m68k-atari-mint${UNAME_RELEASE} | |
402 | exit ;; | |
403 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) | |
404 | echo m68k-atari-mint${UNAME_RELEASE} | |
405 | exit ;; | |
406 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) | |
407 | echo m68k-milan-mint${UNAME_RELEASE} | |
408 | exit ;; | |
409 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) | |
410 | echo m68k-hades-mint${UNAME_RELEASE} | |
411 | exit ;; | |
412 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) | |
413 | echo m68k-unknown-mint${UNAME_RELEASE} | |
414 | exit ;; | |
415 | m68k:machten:*:*) | |
416 | echo m68k-apple-machten${UNAME_RELEASE} | |
417 | exit ;; | |
418 | powerpc:machten:*:*) | |
419 | echo powerpc-apple-machten${UNAME_RELEASE} | |
420 | exit ;; | |
421 | RISC*:Mach:*:*) | |
422 | echo mips-dec-mach_bsd4.3 | |
423 | exit ;; | |
424 | RISC*:ULTRIX:*:*) | |
425 | echo mips-dec-ultrix${UNAME_RELEASE} | |
426 | exit ;; | |
427 | VAX*:ULTRIX*:*:*) | |
428 | echo vax-dec-ultrix${UNAME_RELEASE} | |
429 | exit ;; | |
430 | 2020:CLIX:*:* | 2430:CLIX:*:*) | |
431 | echo clipper-intergraph-clix${UNAME_RELEASE} | |
432 | exit ;; | |
433 | mips:*:*:UMIPS | mips:*:*:RISCos) | |
434 | eval $set_cc_for_build | |
435 | sed 's/^ //' << EOF >$dummy.c | |
436 | #ifdef __cplusplus | |
437 | #include <stdio.h> /* for printf() prototype */ | |
438 | int main (int argc, char *argv[]) { | |
439 | #else | |
440 | int main (argc, argv) int argc; char *argv[]; { | |
441 | #endif | |
442 | #if defined (host_mips) && defined (MIPSEB) | |
443 | #if defined (SYSTYPE_SYSV) | |
444 | printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); | |
445 | #endif | |
446 | #if defined (SYSTYPE_SVR4) | |
447 | printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); | |
448 | #endif | |
449 | #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) | |
450 | printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); | |
451 | #endif | |
452 | #endif | |
453 | exit (-1); | |
454 | } | |
455 | EOF | |
456 | $CC_FOR_BUILD -o $dummy $dummy.c && | |
457 | dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && | |
458 | SYSTEM_NAME=`$dummy $dummyarg` && | |
459 | { echo "$SYSTEM_NAME"; exit; } | |
460 | echo mips-mips-riscos${UNAME_RELEASE} | |
461 | exit ;; | |
462 | Motorola:PowerMAX_OS:*:*) | |
463 | echo powerpc-motorola-powermax | |
464 | exit ;; | |
465 | Motorola:*:4.3:PL8-*) | |
466 | echo powerpc-harris-powermax | |
467 | exit ;; | |
468 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) | |
469 | echo powerpc-harris-powermax | |
470 | exit ;; | |
471 | Night_Hawk:Power_UNIX:*:*) | |
472 | echo powerpc-harris-powerunix | |
473 | exit ;; | |
474 | m88k:CX/UX:7*:*) | |
475 | echo m88k-harris-cxux7 | |
476 | exit ;; | |
477 | m88k:*:4*:R4*) | |
478 | echo m88k-motorola-sysv4 | |
479 | exit ;; | |
480 | m88k:*:3*:R3*) | |
481 | echo m88k-motorola-sysv3 | |
482 | exit ;; | |
483 | AViiON:dgux:*:*) | |
484 | # DG/UX returns AViiON for all architectures | |
485 | UNAME_PROCESSOR=`/usr/bin/uname -p` | |
486 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] | |
487 | then | |
488 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ | |
489 | [ ${TARGET_BINARY_INTERFACE}x = x ] | |
490 | then | |
491 | echo m88k-dg-dgux${UNAME_RELEASE} | |
492 | else | |
493 | echo m88k-dg-dguxbcs${UNAME_RELEASE} | |
494 | fi | |
495 | else | |
496 | echo i586-dg-dgux${UNAME_RELEASE} | |
497 | fi | |
498 | exit ;; | |
499 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) | |
500 | echo m88k-dolphin-sysv3 | |
501 | exit ;; | |
502 | M88*:*:R3*:*) | |
503 | # Delta 88k system running SVR3 | |
504 | echo m88k-motorola-sysv3 | |
505 | exit ;; | |
506 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) | |
507 | echo m88k-tektronix-sysv3 | |
508 | exit ;; | |
509 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) | |
510 | echo m68k-tektronix-bsd | |
511 | exit ;; | |
512 | *:IRIX*:*:*) | |
513 | echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` | |
514 | exit ;; | |
515 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. | |
516 | echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id | |
517 | exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' | |
518 | i*86:AIX:*:*) | |
519 | echo i386-ibm-aix | |
520 | exit ;; | |
521 | ia64:AIX:*:*) | |
522 | if [ -x /usr/bin/oslevel ] ; then | |
523 | IBM_REV=`/usr/bin/oslevel` | |
524 | else | |
525 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | |
526 | fi | |
527 | echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} | |
528 | exit ;; | |
529 | *:AIX:2:3) | |
530 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then | |
531 | eval $set_cc_for_build | |
532 | sed 's/^ //' << EOF >$dummy.c | |
533 | #include <sys/systemcfg.h> | |
534 | ||
535 | main() | |
536 | { | |
537 | if (!__power_pc()) | |
538 | exit(1); | |
539 | puts("powerpc-ibm-aix3.2.5"); | |
540 | exit(0); | |
541 | } | |
542 | EOF | |
543 | if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` | |
544 | then | |
545 | echo "$SYSTEM_NAME" | |
546 | else | |
547 | echo rs6000-ibm-aix3.2.5 | |
548 | fi | |
549 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then | |
550 | echo rs6000-ibm-aix3.2.4 | |
551 | else | |
552 | echo rs6000-ibm-aix3.2 | |
553 | fi | |
554 | exit ;; | |
555 | *:AIX:*:[4567]) | |
556 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` | |
557 | if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then | |
558 | IBM_ARCH=rs6000 | |
559 | else | |
560 | IBM_ARCH=powerpc | |
561 | fi | |
562 | if [ -x /usr/bin/oslevel ] ; then | |
563 | IBM_REV=`/usr/bin/oslevel` | |
564 | else | |
565 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | |
566 | fi | |
567 | echo ${IBM_ARCH}-ibm-aix${IBM_REV} | |
568 | exit ;; | |
569 | *:AIX:*:*) | |
570 | echo rs6000-ibm-aix | |
571 | exit ;; | |
572 | ibmrt:4.4BSD:*|romp-ibm:BSD:*) | |
573 | echo romp-ibm-bsd4.4 | |
574 | exit ;; | |
575 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and | |
576 | echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to | |
577 | exit ;; # report: romp-ibm BSD 4.3 | |
578 | *:BOSX:*:*) | |
579 | echo rs6000-bull-bosx | |
580 | exit ;; | |
581 | DPX/2?00:B.O.S.:*:*) | |
582 | echo m68k-bull-sysv3 | |
583 | exit ;; | |
584 | 9000/[34]??:4.3bsd:1.*:*) | |
585 | echo m68k-hp-bsd | |
586 | exit ;; | |
587 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) | |
588 | echo m68k-hp-bsd4.4 | |
589 | exit ;; | |
590 | 9000/[34678]??:HP-UX:*:*) | |
591 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | |
592 | case "${UNAME_MACHINE}" in | |
593 | 9000/31? ) HP_ARCH=m68000 ;; | |
594 | 9000/[34]?? ) HP_ARCH=m68k ;; | |
595 | 9000/[678][0-9][0-9]) | |
596 | if [ -x /usr/bin/getconf ]; then | |
597 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` | |
598 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` | |
599 | case "${sc_cpu_version}" in | |
600 | 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 | |
601 | 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 | |
602 | 532) # CPU_PA_RISC2_0 | |
603 | case "${sc_kernel_bits}" in | |
604 | 32) HP_ARCH="hppa2.0n" ;; | |
605 | 64) HP_ARCH="hppa2.0w" ;; | |
606 | '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 | |
607 | esac ;; | |
608 | esac | |
609 | fi | |
610 | if [ "${HP_ARCH}" = "" ]; then | |
611 | eval $set_cc_for_build | |
612 | sed 's/^ //' << EOF >$dummy.c | |
613 | ||
614 | #define _HPUX_SOURCE | |
615 | #include <stdlib.h> | |
616 | #include <unistd.h> | |
617 | ||
618 | int main () | |
619 | { | |
620 | #if defined(_SC_KERNEL_BITS) | |
621 | long bits = sysconf(_SC_KERNEL_BITS); | |
622 | #endif | |
623 | long cpu = sysconf (_SC_CPU_VERSION); | |
624 | ||
625 | switch (cpu) | |
626 | { | |
627 | case CPU_PA_RISC1_0: puts ("hppa1.0"); break; | |
628 | case CPU_PA_RISC1_1: puts ("hppa1.1"); break; | |
629 | case CPU_PA_RISC2_0: | |
630 | #if defined(_SC_KERNEL_BITS) | |
631 | switch (bits) | |
632 | { | |
633 | case 64: puts ("hppa2.0w"); break; | |
634 | case 32: puts ("hppa2.0n"); break; | |
635 | default: puts ("hppa2.0"); break; | |
636 | } break; | |
637 | #else /* !defined(_SC_KERNEL_BITS) */ | |
638 | puts ("hppa2.0"); break; | |
639 | #endif | |
640 | default: puts ("hppa1.0"); break; | |
641 | } | |
642 | exit (0); | |
643 | } | |
644 | EOF | |
645 | (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` | |
646 | test -z "$HP_ARCH" && HP_ARCH=hppa | |
647 | fi ;; | |
648 | esac | |
649 | if [ ${HP_ARCH} = "hppa2.0w" ] | |
650 | then | |
651 | eval $set_cc_for_build | |
652 | ||
653 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating | |
654 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler | |
655 | # generating 64-bit code. GNU and HP use different nomenclature: | |
656 | # | |
657 | # $ CC_FOR_BUILD=cc ./config.guess | |
658 | # => hppa2.0w-hp-hpux11.23 | |
659 | # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess | |
660 | # => hppa64-hp-hpux11.23 | |
661 | ||
662 | if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | | |
663 | grep -q __LP64__ | |
664 | then | |
665 | HP_ARCH="hppa2.0w" | |
666 | else | |
667 | HP_ARCH="hppa64" | |
668 | fi | |
669 | fi | |
670 | echo ${HP_ARCH}-hp-hpux${HPUX_REV} | |
671 | exit ;; | |
672 | ia64:HP-UX:*:*) | |
673 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | |
674 | echo ia64-hp-hpux${HPUX_REV} | |
675 | exit ;; | |
676 | 3050*:HI-UX:*:*) | |
677 | eval $set_cc_for_build | |
678 | sed 's/^ //' << EOF >$dummy.c | |
679 | #include <unistd.h> | |
680 | int | |
681 | main () | |
682 | { | |
683 | long cpu = sysconf (_SC_CPU_VERSION); | |
684 | /* The order matters, because CPU_IS_HP_MC68K erroneously returns | |
685 | true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct | |
686 | results, however. */ | |
687 | if (CPU_IS_PA_RISC (cpu)) | |
688 | { | |
689 | switch (cpu) | |
690 | { | |
691 | case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; | |
692 | case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; | |
693 | case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; | |
694 | default: puts ("hppa-hitachi-hiuxwe2"); break; | |
695 | } | |
696 | } | |
697 | else if (CPU_IS_HP_MC68K (cpu)) | |
698 | puts ("m68k-hitachi-hiuxwe2"); | |
699 | else puts ("unknown-hitachi-hiuxwe2"); | |
700 | exit (0); | |
701 | } | |
702 | EOF | |
703 | $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && | |
704 | { echo "$SYSTEM_NAME"; exit; } | |
705 | echo unknown-hitachi-hiuxwe2 | |
706 | exit ;; | |
707 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) | |
708 | echo hppa1.1-hp-bsd | |
709 | exit ;; | |
710 | 9000/8??:4.3bsd:*:*) | |
711 | echo hppa1.0-hp-bsd | |
712 | exit ;; | |
713 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) | |
714 | echo hppa1.0-hp-mpeix | |
715 | exit ;; | |
716 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) | |
717 | echo hppa1.1-hp-osf | |
718 | exit ;; | |
719 | hp8??:OSF1:*:*) | |
720 | echo hppa1.0-hp-osf | |
721 | exit ;; | |
722 | i*86:OSF1:*:*) | |
723 | if [ -x /usr/sbin/sysversion ] ; then | |
724 | echo ${UNAME_MACHINE}-unknown-osf1mk | |
725 | else | |
726 | echo ${UNAME_MACHINE}-unknown-osf1 | |
727 | fi | |
728 | exit ;; | |
729 | parisc*:Lites*:*:*) | |
730 | echo hppa1.1-hp-lites | |
731 | exit ;; | |
732 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) | |
733 | echo c1-convex-bsd | |
734 | exit ;; | |
735 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) | |
736 | if getsysinfo -f scalar_acc | |
737 | then echo c32-convex-bsd | |
738 | else echo c2-convex-bsd | |
739 | fi | |
740 | exit ;; | |
741 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) | |
742 | echo c34-convex-bsd | |
743 | exit ;; | |
744 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) | |
745 | echo c38-convex-bsd | |
746 | exit ;; | |
747 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) | |
748 | echo c4-convex-bsd | |
749 | exit ;; | |
750 | CRAY*Y-MP:*:*:*) | |
751 | echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
752 | exit ;; | |
753 | CRAY*[A-Z]90:*:*:*) | |
754 | echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | |
755 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ | |
756 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ | |
757 | -e 's/\.[^.]*$/.X/' | |
758 | exit ;; | |
759 | CRAY*TS:*:*:*) | |
760 | echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
761 | exit ;; | |
762 | CRAY*T3E:*:*:*) | |
763 | echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
764 | exit ;; | |
765 | CRAY*SV1:*:*:*) | |
766 | echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
767 | exit ;; | |
768 | *:UNICOS/mp:*:*) | |
769 | echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
770 | exit ;; | |
771 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) | |
772 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | |
773 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | |
774 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | |
775 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
776 | exit ;; | |
777 | 5000:UNIX_System_V:4.*:*) | |
778 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | |
779 | FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` | |
780 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
781 | exit ;; | |
782 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) | |
783 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | |
784 | exit ;; | |
785 | sparc*:BSD/OS:*:*) | |
786 | echo sparc-unknown-bsdi${UNAME_RELEASE} | |
787 | exit ;; | |
788 | *:BSD/OS:*:*) | |
789 | echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} | |
790 | exit ;; | |
791 | *:FreeBSD:*:*) | |
792 | UNAME_PROCESSOR=`/usr/bin/uname -p` | |
793 | case ${UNAME_PROCESSOR} in | |
794 | amd64) | |
795 | echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | |
796 | *) | |
797 | echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | |
798 | esac | |
799 | exit ;; | |
800 | i*:CYGWIN*:*) | |
801 | echo ${UNAME_MACHINE}-pc-cygwin | |
802 | exit ;; | |
803 | *:MINGW*:*) | |
804 | echo ${UNAME_MACHINE}-pc-mingw32 | |
805 | exit ;; | |
806 | i*:MSYS*:*) | |
807 | echo ${UNAME_MACHINE}-pc-msys | |
808 | exit ;; | |
809 | i*:windows32*:*) | |
810 | # uname -m includes "-pc" on this system. | |
811 | echo ${UNAME_MACHINE}-mingw32 | |
812 | exit ;; | |
813 | i*:PW*:*) | |
814 | echo ${UNAME_MACHINE}-pc-pw32 | |
815 | exit ;; | |
816 | *:Interix*:*) | |
817 | case ${UNAME_MACHINE} in | |
818 | x86) | |
819 | echo i586-pc-interix${UNAME_RELEASE} | |
820 | exit ;; | |
821 | authenticamd | genuineintel | EM64T) | |
822 | echo x86_64-unknown-interix${UNAME_RELEASE} | |
823 | exit ;; | |
824 | IA64) | |
825 | echo ia64-unknown-interix${UNAME_RELEASE} | |
826 | exit ;; | |
827 | esac ;; | |
828 | [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) | |
829 | echo i${UNAME_MACHINE}-pc-mks | |
830 | exit ;; | |
831 | 8664:Windows_NT:*) | |
832 | echo x86_64-pc-mks | |
833 | exit ;; | |
834 | i*:Windows_NT*:* | Pentium*:Windows_NT*:*) | |
835 | # How do we know it's Interix rather than the generic POSIX subsystem? | |
836 | # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we | |
837 | # UNAME_MACHINE based on the output of uname instead of i386? | |
838 | echo i586-pc-interix | |
839 | exit ;; | |
840 | i*:UWIN*:*) | |
841 | echo ${UNAME_MACHINE}-pc-uwin | |
842 | exit ;; | |
843 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) | |
844 | echo x86_64-unknown-cygwin | |
845 | exit ;; | |
846 | p*:CYGWIN*:*) | |
847 | echo powerpcle-unknown-cygwin | |
848 | exit ;; | |
849 | prep*:SunOS:5.*:*) | |
850 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
851 | exit ;; | |
852 | *:GNU:*:*) | |
853 | # the GNU system | |
854 | echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` | |
855 | exit ;; | |
856 | *:GNU/*:*:*) | |
857 | # other systems with GNU libc and userland | |
858 | echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu | |
859 | exit ;; | |
860 | i*86:Minix:*:*) | |
861 | echo ${UNAME_MACHINE}-pc-minix | |
862 | exit ;; | |
863 | aarch64:Linux:*:*) | |
864 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
865 | exit ;; | |
866 | aarch64_be:Linux:*:*) | |
867 | UNAME_MACHINE=aarch64_be | |
868 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
869 | exit ;; | |
870 | alpha:Linux:*:*) | |
871 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | |
872 | EV5) UNAME_MACHINE=alphaev5 ;; | |
873 | EV56) UNAME_MACHINE=alphaev56 ;; | |
874 | PCA56) UNAME_MACHINE=alphapca56 ;; | |
875 | PCA57) UNAME_MACHINE=alphapca56 ;; | |
876 | EV6) UNAME_MACHINE=alphaev6 ;; | |
877 | EV67) UNAME_MACHINE=alphaev67 ;; | |
878 | EV68*) UNAME_MACHINE=alphaev68 ;; | |
879 | esac | |
880 | objdump --private-headers /bin/sh | grep -q ld.so.1 | |
881 | if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi | |
882 | echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} | |
883 | exit ;; | |
884 | arm*:Linux:*:*) | |
885 | eval $set_cc_for_build | |
886 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | |
887 | | grep -q __ARM_EABI__ | |
888 | then | |
889 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
890 | else | |
891 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | |
892 | | grep -q __ARM_PCS_VFP | |
893 | then | |
894 | echo ${UNAME_MACHINE}-unknown-linux-gnueabi | |
895 | else | |
896 | echo ${UNAME_MACHINE}-unknown-linux-gnueabihf | |
897 | fi | |
898 | fi | |
899 | exit ;; | |
900 | avr32*:Linux:*:*) | |
901 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
902 | exit ;; | |
903 | cris:Linux:*:*) | |
904 | echo ${UNAME_MACHINE}-axis-linux-gnu | |
905 | exit ;; | |
906 | crisv32:Linux:*:*) | |
907 | echo ${UNAME_MACHINE}-axis-linux-gnu | |
908 | exit ;; | |
909 | frv:Linux:*:*) | |
910 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
911 | exit ;; | |
912 | hexagon:Linux:*:*) | |
913 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
914 | exit ;; | |
915 | i*86:Linux:*:*) | |
916 | LIBC=gnu | |
917 | eval $set_cc_for_build | |
918 | sed 's/^ //' << EOF >$dummy.c | |
919 | #ifdef __dietlibc__ | |
920 | LIBC=dietlibc | |
921 | #endif | |
922 | EOF | |
923 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` | |
924 | echo "${UNAME_MACHINE}-pc-linux-${LIBC}" | |
925 | exit ;; | |
926 | ia64:Linux:*:*) | |
927 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
928 | exit ;; | |
929 | m32r*:Linux:*:*) | |
930 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
931 | exit ;; | |
932 | m68*:Linux:*:*) | |
933 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
934 | exit ;; | |
935 | mips:Linux:*:* | mips64:Linux:*:*) | |
936 | eval $set_cc_for_build | |
937 | sed 's/^ //' << EOF >$dummy.c | |
938 | #undef CPU | |
939 | #undef ${UNAME_MACHINE} | |
940 | #undef ${UNAME_MACHINE}el | |
941 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | |
942 | CPU=${UNAME_MACHINE}el | |
943 | #else | |
944 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | |
945 | CPU=${UNAME_MACHINE} | |
946 | #else | |
947 | CPU= | |
948 | #endif | |
949 | #endif | |
950 | EOF | |
951 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` | |
952 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } | |
953 | ;; | |
954 | or32:Linux:*:*) | |
955 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
956 | exit ;; | |
957 | padre:Linux:*:*) | |
958 | echo sparc-unknown-linux-gnu | |
959 | exit ;; | |
960 | parisc64:Linux:*:* | hppa64:Linux:*:*) | |
961 | echo hppa64-unknown-linux-gnu | |
962 | exit ;; | |
963 | parisc:Linux:*:* | hppa:Linux:*:*) | |
964 | # Look for CPU level | |
965 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in | |
966 | PA7*) echo hppa1.1-unknown-linux-gnu ;; | |
967 | PA8*) echo hppa2.0-unknown-linux-gnu ;; | |
968 | *) echo hppa-unknown-linux-gnu ;; | |
969 | esac | |
970 | exit ;; | |
971 | ppc64:Linux:*:*) | |
972 | echo powerpc64-unknown-linux-gnu | |
973 | exit ;; | |
974 | ppc:Linux:*:*) | |
975 | echo powerpc-unknown-linux-gnu | |
976 | exit ;; | |
977 | s390:Linux:*:* | s390x:Linux:*:*) | |
978 | echo ${UNAME_MACHINE}-ibm-linux | |
979 | exit ;; | |
980 | sh64*:Linux:*:*) | |
981 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
982 | exit ;; | |
983 | sh*:Linux:*:*) | |
984 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
985 | exit ;; | |
986 | sparc:Linux:*:* | sparc64:Linux:*:*) | |
987 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
988 | exit ;; | |
989 | tile*:Linux:*:*) | |
990 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
991 | exit ;; | |
992 | vax:Linux:*:*) | |
993 | echo ${UNAME_MACHINE}-dec-linux-gnu | |
994 | exit ;; | |
995 | x86_64:Linux:*:*) | |
996 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
997 | exit ;; | |
998 | xtensa*:Linux:*:*) | |
999 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
1000 | exit ;; | |
1001 | i*86:DYNIX/ptx:4*:*) | |
1002 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. | |
1003 | # earlier versions are messed up and put the nodename in both | |
1004 | # sysname and nodename. | |
1005 | echo i386-sequent-sysv4 | |
1006 | exit ;; | |
1007 | i*86:UNIX_SV:4.2MP:2.*) | |
1008 | # Unixware is an offshoot of SVR4, but it has its own version | |
1009 | # number series starting with 2... | |
1010 | # I am not positive that other SVR4 systems won't match this, | |
1011 | # I just have to hope. -- rms. | |
1012 | # Use sysv4.2uw... so that sysv4* matches it. | |
1013 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} | |
1014 | exit ;; | |
1015 | i*86:OS/2:*:*) | |
1016 | # If we were able to find `uname', then EMX Unix compatibility | |
1017 | # is probably installed. | |
1018 | echo ${UNAME_MACHINE}-pc-os2-emx | |
1019 | exit ;; | |
1020 | i*86:XTS-300:*:STOP) | |
1021 | echo ${UNAME_MACHINE}-unknown-stop | |
1022 | exit ;; | |
1023 | i*86:atheos:*:*) | |
1024 | echo ${UNAME_MACHINE}-unknown-atheos | |
1025 | exit ;; | |
1026 | i*86:syllable:*:*) | |
1027 | echo ${UNAME_MACHINE}-pc-syllable | |
1028 | exit ;; | |
1029 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) | |
1030 | echo i386-unknown-lynxos${UNAME_RELEASE} | |
1031 | exit ;; | |
1032 | i*86:*DOS:*:*) | |
1033 | echo ${UNAME_MACHINE}-pc-msdosdjgpp | |
1034 | exit ;; | |
1035 | i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) | |
1036 | UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` | |
1037 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then | |
1038 | echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} | |
1039 | else | |
1040 | echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} | |
1041 | fi | |
1042 | exit ;; | |
1043 | i*86:*:5:[678]*) | |
1044 | # UnixWare 7.x, OpenUNIX and OpenServer 6. | |
1045 | case `/bin/uname -X | grep "^Machine"` in | |
1046 | *486*) UNAME_MACHINE=i486 ;; | |
1047 | *Pentium) UNAME_MACHINE=i586 ;; | |
1048 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; | |
1049 | esac | |
1050 | echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} | |
1051 | exit ;; | |
1052 | i*86:*:3.2:*) | |
1053 | if test -f /usr/options/cb.name; then | |
1054 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` | |
1055 | echo ${UNAME_MACHINE}-pc-isc$UNAME_REL | |
1056 | elif /bin/uname -X 2>/dev/null >/dev/null ; then | |
1057 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` | |
1058 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 | |
1059 | (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ | |
1060 | && UNAME_MACHINE=i586 | |
1061 | (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ | |
1062 | && UNAME_MACHINE=i686 | |
1063 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ | |
1064 | && UNAME_MACHINE=i686 | |
1065 | echo ${UNAME_MACHINE}-pc-sco$UNAME_REL | |
1066 | else | |
1067 | echo ${UNAME_MACHINE}-pc-sysv32 | |
1068 | fi | |
1069 | exit ;; | |
1070 | pc:*:*:*) | |
1071 | # Left here for compatibility: | |
1072 | # uname -m prints for DJGPP always 'pc', but it prints nothing about | |
1073 | # the processor, so we play safe by assuming i586. | |
1074 | # Note: whatever this is, it MUST be the same as what config.sub | |
1075 | # prints for the "djgpp" host, or else GDB configury will decide that | |
1076 | # this is a cross-build. | |
1077 | echo i586-pc-msdosdjgpp | |
1078 | exit ;; | |
1079 | Intel:Mach:3*:*) | |
1080 | echo i386-pc-mach3 | |
1081 | exit ;; | |
1082 | paragon:*:*:*) | |
1083 | echo i860-intel-osf1 | |
1084 | exit ;; | |
1085 | i860:*:4.*:*) # i860-SVR4 | |
1086 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then | |
1087 | echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 | |
1088 | else # Add other i860-SVR4 vendors below as they are discovered. | |
1089 | echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 | |
1090 | fi | |
1091 | exit ;; | |
1092 | mini*:CTIX:SYS*5:*) | |
1093 | # "miniframe" | |
1094 | echo m68010-convergent-sysv | |
1095 | exit ;; | |
1096 | mc68k:UNIX:SYSTEM5:3.51m) | |
1097 | echo m68k-convergent-sysv | |
1098 | exit ;; | |
1099 | M680?0:D-NIX:5.3:*) | |
1100 | echo m68k-diab-dnix | |
1101 | exit ;; | |
1102 | M68*:*:R3V[5678]*:*) | |
1103 | test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; | |
1104 | 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) | |
1105 | OS_REL='' | |
1106 | test -r /etc/.relid \ | |
1107 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | |
1108 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
1109 | && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | |
1110 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | |
1111 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | |
1112 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) | |
1113 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
1114 | && { echo i486-ncr-sysv4; exit; } ;; | |
1115 | NCR*:*:4.2:* | MPRAS*:*:4.2:*) | |
1116 | OS_REL='.3' | |
1117 | test -r /etc/.relid \ | |
1118 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | |
1119 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
1120 | && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | |
1121 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | |
1122 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } | |
1123 | /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ | |
1124 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | |
1125 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) | |
1126 | echo m68k-unknown-lynxos${UNAME_RELEASE} | |
1127 | exit ;; | |
1128 | mc68030:UNIX_System_V:4.*:*) | |
1129 | echo m68k-atari-sysv4 | |
1130 | exit ;; | |
1131 | TSUNAMI:LynxOS:2.*:*) | |
1132 | echo sparc-unknown-lynxos${UNAME_RELEASE} | |
1133 | exit ;; | |
1134 | rs6000:LynxOS:2.*:*) | |
1135 | echo rs6000-unknown-lynxos${UNAME_RELEASE} | |
1136 | exit ;; | |
1137 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) | |
1138 | echo powerpc-unknown-lynxos${UNAME_RELEASE} | |
1139 | exit ;; | |
1140 | SM[BE]S:UNIX_SV:*:*) | |
1141 | echo mips-dde-sysv${UNAME_RELEASE} | |
1142 | exit ;; | |
1143 | RM*:ReliantUNIX-*:*:*) | |
1144 | echo mips-sni-sysv4 | |
1145 | exit ;; | |
1146 | RM*:SINIX-*:*:*) | |
1147 | echo mips-sni-sysv4 | |
1148 | exit ;; | |
1149 | *:SINIX-*:*:*) | |
1150 | if uname -p 2>/dev/null >/dev/null ; then | |
1151 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | |
1152 | echo ${UNAME_MACHINE}-sni-sysv4 | |
1153 | else | |
1154 | echo ns32k-sni-sysv | |
1155 | fi | |
1156 | exit ;; | |
1157 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | |
1158 | # says <Richard.M.Bartel@ccMail.Census.GOV> | |
1159 | echo i586-unisys-sysv4 | |
1160 | exit ;; | |
1161 | *:UNIX_System_V:4*:FTX*) | |
1162 | # From Gerald Hewes <hewes@openmarket.com>. | |
1163 | # How about differentiating between stratus architectures? -djm | |
1164 | echo hppa1.1-stratus-sysv4 | |
1165 | exit ;; | |
1166 | *:*:*:FTX*) | |
1167 | # From seanf@swdc.stratus.com. | |
1168 | echo i860-stratus-sysv4 | |
1169 | exit ;; | |
1170 | i*86:VOS:*:*) | |
1171 | # From Paul.Green@stratus.com. | |
1172 | echo ${UNAME_MACHINE}-stratus-vos | |
1173 | exit ;; | |
1174 | *:VOS:*:*) | |
1175 | # From Paul.Green@stratus.com. | |
1176 | echo hppa1.1-stratus-vos | |
1177 | exit ;; | |
1178 | mc68*:A/UX:*:*) | |
1179 | echo m68k-apple-aux${UNAME_RELEASE} | |
1180 | exit ;; | |
1181 | news*:NEWS-OS:6*:*) | |
1182 | echo mips-sony-newsos6 | |
1183 | exit ;; | |
1184 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) | |
1185 | if [ -d /usr/nec ]; then | |
1186 | echo mips-nec-sysv${UNAME_RELEASE} | |
1187 | else | |
1188 | echo mips-unknown-sysv${UNAME_RELEASE} | |
1189 | fi | |
1190 | exit ;; | |
1191 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. | |
1192 | echo powerpc-be-beos | |
1193 | exit ;; | |
1194 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. | |
1195 | echo powerpc-apple-beos | |
1196 | exit ;; | |
1197 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. | |
1198 | echo i586-pc-beos | |
1199 | exit ;; | |
1200 | BePC:Haiku:*:*) # Haiku running on Intel PC compatible. | |
1201 | echo i586-pc-haiku | |
1202 | exit ;; | |
1203 | SX-4:SUPER-UX:*:*) | |
1204 | echo sx4-nec-superux${UNAME_RELEASE} | |
1205 | exit ;; | |
1206 | SX-5:SUPER-UX:*:*) | |
1207 | echo sx5-nec-superux${UNAME_RELEASE} | |
1208 | exit ;; | |
1209 | SX-6:SUPER-UX:*:*) | |
1210 | echo sx6-nec-superux${UNAME_RELEASE} | |
1211 | exit ;; | |
1212 | SX-7:SUPER-UX:*:*) | |
1213 | echo sx7-nec-superux${UNAME_RELEASE} | |
1214 | exit ;; | |
1215 | SX-8:SUPER-UX:*:*) | |
1216 | echo sx8-nec-superux${UNAME_RELEASE} | |
1217 | exit ;; | |
1218 | SX-8R:SUPER-UX:*:*) | |
1219 | echo sx8r-nec-superux${UNAME_RELEASE} | |
1220 | exit ;; | |
1221 | Power*:Rhapsody:*:*) | |
1222 | echo powerpc-apple-rhapsody${UNAME_RELEASE} | |
1223 | exit ;; | |
1224 | *:Rhapsody:*:*) | |
1225 | echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} | |
1226 | exit ;; | |
1227 | *:Darwin:*:*) | |
1228 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown | |
1229 | case $UNAME_PROCESSOR in | |
1230 | i386) | |
1231 | eval $set_cc_for_build | |
1232 | if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | |
1233 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
1234 | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1235 | grep IS_64BIT_ARCH >/dev/null | |
1236 | then | |
1237 | UNAME_PROCESSOR="x86_64" | |
1238 | fi | |
1239 | fi ;; | |
1240 | unknown) UNAME_PROCESSOR=powerpc ;; | |
1241 | esac | |
1242 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} | |
1243 | exit ;; | |
1244 | *:procnto*:*:* | *:QNX:[0123456789]*:*) | |
1245 | UNAME_PROCESSOR=`uname -p` | |
1246 | if test "$UNAME_PROCESSOR" = "x86"; then | |
1247 | UNAME_PROCESSOR=i386 | |
1248 | UNAME_MACHINE=pc | |
1249 | fi | |
1250 | echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} | |
1251 | exit ;; | |
1252 | *:QNX:*:4*) | |
1253 | echo i386-pc-qnx | |
1254 | exit ;; | |
1255 | NEO-?:NONSTOP_KERNEL:*:*) | |
1256 | echo neo-tandem-nsk${UNAME_RELEASE} | |
1257 | exit ;; | |
1258 | NSE-?:NONSTOP_KERNEL:*:*) | |
1259 | echo nse-tandem-nsk${UNAME_RELEASE} | |
1260 | exit ;; | |
1261 | NSR-?:NONSTOP_KERNEL:*:*) | |
1262 | echo nsr-tandem-nsk${UNAME_RELEASE} | |
1263 | exit ;; | |
1264 | *:NonStop-UX:*:*) | |
1265 | echo mips-compaq-nonstopux | |
1266 | exit ;; | |
1267 | BS2000:POSIX*:*:*) | |
1268 | echo bs2000-siemens-sysv | |
1269 | exit ;; | |
1270 | DS/*:UNIX_System_V:*:*) | |
1271 | echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} | |
1272 | exit ;; | |
1273 | *:Plan9:*:*) | |
1274 | # "uname -m" is not consistent, so use $cputype instead. 386 | |
1275 | # is converted to i386 for consistency with other x86 | |
1276 | # operating systems. | |
1277 | if test "$cputype" = "386"; then | |
1278 | UNAME_MACHINE=i386 | |
1279 | else | |
1280 | UNAME_MACHINE="$cputype" | |
1281 | fi | |
1282 | echo ${UNAME_MACHINE}-unknown-plan9 | |
1283 | exit ;; | |
1284 | *:TOPS-10:*:*) | |
1285 | echo pdp10-unknown-tops10 | |
1286 | exit ;; | |
1287 | *:TENEX:*:*) | |
1288 | echo pdp10-unknown-tenex | |
1289 | exit ;; | |
1290 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) | |
1291 | echo pdp10-dec-tops20 | |
1292 | exit ;; | |
1293 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) | |
1294 | echo pdp10-xkl-tops20 | |
1295 | exit ;; | |
1296 | *:TOPS-20:*:*) | |
1297 | echo pdp10-unknown-tops20 | |
1298 | exit ;; | |
1299 | *:ITS:*:*) | |
1300 | echo pdp10-unknown-its | |
1301 | exit ;; | |
1302 | SEI:*:*:SEIUX) | |
1303 | echo mips-sei-seiux${UNAME_RELEASE} | |
1304 | exit ;; | |
1305 | *:DragonFly:*:*) | |
1306 | echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | |
1307 | exit ;; | |
1308 | *:*VMS:*:*) | |
1309 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | |
1310 | case "${UNAME_MACHINE}" in | |
1311 | A*) echo alpha-dec-vms ; exit ;; | |
1312 | I*) echo ia64-dec-vms ; exit ;; | |
1313 | V*) echo vax-dec-vms ; exit ;; | |
1314 | esac ;; | |
1315 | *:XENIX:*:SysV) | |
1316 | echo i386-pc-xenix | |
1317 | exit ;; | |
1318 | i*86:skyos:*:*) | |
1319 | echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' | |
1320 | exit ;; | |
1321 | i*86:rdos:*:*) | |
1322 | echo ${UNAME_MACHINE}-pc-rdos | |
1323 | exit ;; | |
1324 | i*86:AROS:*:*) | |
1325 | echo ${UNAME_MACHINE}-pc-aros | |
1326 | exit ;; | |
1327 | x86_64:VMkernel:*:*) | |
1328 | echo ${UNAME_MACHINE}-unknown-esx | |
1329 | exit ;; | |
1330 | esac | |
1331 | ||
1332 | #echo '(No uname command or uname output not recognized.)' 1>&2 | |
1333 | #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 | |
1334 | ||
1335 | eval $set_cc_for_build | |
1336 | cat >$dummy.c <<EOF | |
1337 | #ifdef _SEQUENT_ | |
1338 | # include <sys/types.h> | |
1339 | # include <sys/utsname.h> | |
1340 | #endif | |
1341 | main () | |
1342 | { | |
1343 | #if defined (sony) | |
1344 | #if defined (MIPSEB) | |
1345 | /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, | |
1346 | I don't know.... */ | |
1347 | printf ("mips-sony-bsd\n"); exit (0); | |
1348 | #else | |
1349 | #include <sys/param.h> | |
1350 | printf ("m68k-sony-newsos%s\n", | |
1351 | #ifdef NEWSOS4 | |
1352 | "4" | |
1353 | #else | |
1354 | "" | |
1355 | #endif | |
1356 | ); exit (0); | |
1357 | #endif | |
1358 | #endif | |
1359 | ||
1360 | #if defined (__arm) && defined (__acorn) && defined (__unix) | |
1361 | printf ("arm-acorn-riscix\n"); exit (0); | |
1362 | #endif | |
1363 | ||
1364 | #if defined (hp300) && !defined (hpux) | |
1365 | printf ("m68k-hp-bsd\n"); exit (0); | |
1366 | #endif | |
1367 | ||
1368 | #if defined (NeXT) | |
1369 | #if !defined (__ARCHITECTURE__) | |
1370 | #define __ARCHITECTURE__ "m68k" | |
1371 | #endif | |
1372 | int version; | |
1373 | version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; | |
1374 | if (version < 4) | |
1375 | printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); | |
1376 | else | |
1377 | printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); | |
1378 | exit (0); | |
1379 | #endif | |
1380 | ||
1381 | #if defined (MULTIMAX) || defined (n16) | |
1382 | #if defined (UMAXV) | |
1383 | printf ("ns32k-encore-sysv\n"); exit (0); | |
1384 | #else | |
1385 | #if defined (CMU) | |
1386 | printf ("ns32k-encore-mach\n"); exit (0); | |
1387 | #else | |
1388 | printf ("ns32k-encore-bsd\n"); exit (0); | |
1389 | #endif | |
1390 | #endif | |
1391 | #endif | |
1392 | ||
1393 | #if defined (__386BSD__) | |
1394 | printf ("i386-pc-bsd\n"); exit (0); | |
1395 | #endif | |
1396 | ||
1397 | #if defined (sequent) | |
1398 | #if defined (i386) | |
1399 | printf ("i386-sequent-dynix\n"); exit (0); | |
1400 | #endif | |
1401 | #if defined (ns32000) | |
1402 | printf ("ns32k-sequent-dynix\n"); exit (0); | |
1403 | #endif | |
1404 | #endif | |
1405 | ||
1406 | #if defined (_SEQUENT_) | |
1407 | struct utsname un; | |
1408 | ||
1409 | uname(&un); | |
1410 | ||
1411 | if (strncmp(un.version, "V2", 2) == 0) { | |
1412 | printf ("i386-sequent-ptx2\n"); exit (0); | |
1413 | } | |
1414 | if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ | |
1415 | printf ("i386-sequent-ptx1\n"); exit (0); | |
1416 | } | |
1417 | printf ("i386-sequent-ptx\n"); exit (0); | |
1418 | ||
1419 | #endif | |
1420 | ||
1421 | #if defined (vax) | |
1422 | # if !defined (ultrix) | |
1423 | # include <sys/param.h> | |
1424 | # if defined (BSD) | |
1425 | # if BSD == 43 | |
1426 | printf ("vax-dec-bsd4.3\n"); exit (0); | |
1427 | # else | |
1428 | # if BSD == 199006 | |
1429 | printf ("vax-dec-bsd4.3reno\n"); exit (0); | |
1430 | # else | |
1431 | printf ("vax-dec-bsd\n"); exit (0); | |
1432 | # endif | |
1433 | # endif | |
1434 | # else | |
1435 | printf ("vax-dec-bsd\n"); exit (0); | |
1436 | # endif | |
1437 | # else | |
1438 | printf ("vax-dec-ultrix\n"); exit (0); | |
1439 | # endif | |
1440 | #endif | |
1441 | ||
1442 | #if defined (alliant) && defined (i860) | |
1443 | printf ("i860-alliant-bsd\n"); exit (0); | |
1444 | #endif | |
1445 | ||
1446 | exit (1); | |
1447 | } | |
1448 | EOF | |
1449 | ||
1450 | $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && | |
1451 | { echo "$SYSTEM_NAME"; exit; } | |
1452 | ||
1453 | # Apollos put the system type in the environment. | |
1454 | ||
1455 | test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } | |
1456 | ||
1457 | # Convex versions that predate uname can use getsysinfo(1) | |
1458 | ||
1459 | if [ -x /usr/convex/getsysinfo ] | |
1460 | then | |
1461 | case `getsysinfo -f cpu_type` in | |
1462 | c1*) | |
1463 | echo c1-convex-bsd | |
1464 | exit ;; | |
1465 | c2*) | |
1466 | if getsysinfo -f scalar_acc | |
1467 | then echo c32-convex-bsd | |
1468 | else echo c2-convex-bsd | |
1469 | fi | |
1470 | exit ;; | |
1471 | c34*) | |
1472 | echo c34-convex-bsd | |
1473 | exit ;; | |
1474 | c38*) | |
1475 | echo c38-convex-bsd | |
1476 | exit ;; | |
1477 | c4*) | |
1478 | echo c4-convex-bsd | |
1479 | exit ;; | |
1480 | esac | |
1481 | fi | |
1482 | ||
1483 | cat >&2 <<EOF | |
1484 | $0: unable to guess system type | |
1485 | ||
1486 | This script, last modified $timestamp, has failed to recognize | |
1487 | the operating system you are using. It is advised that you | |
1488 | download the most up to date version of the config scripts from | |
1489 | ||
1490 | http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD | |
1491 | and | |
1492 | http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD | |
1493 | ||
1494 | If the version you run ($0) is already up to date, please | |
1495 | send the following data and any information you think might be | |
1496 | pertinent to <config-patches@gnu.org> in order to provide the needed | |
1497 | information to handle your system. | |
1498 | ||
1499 | config.guess timestamp = $timestamp | |
1500 | ||
1501 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1502 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1503 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1504 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1505 | ||
1506 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` | |
1507 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null` | |
1508 | ||
1509 | hostinfo = `(hostinfo) 2>/dev/null` | |
1510 | /bin/universe = `(/bin/universe) 2>/dev/null` | |
1511 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` | |
1512 | /bin/arch = `(/bin/arch) 2>/dev/null` | |
1513 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` | |
1514 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` | |
1515 | ||
1516 | UNAME_MACHINE = ${UNAME_MACHINE} | |
1517 | UNAME_RELEASE = ${UNAME_RELEASE} | |
1518 | UNAME_SYSTEM = ${UNAME_SYSTEM} | |
1519 | UNAME_VERSION = ${UNAME_VERSION} | |
1520 | EOF | |
1521 | ||
1522 | exit 1 | |
1523 | ||
1524 | # Local variables: | |
1525 | # eval: (add-hook 'write-file-hooks 'time-stamp) | |
1526 | # time-stamp-start: "timestamp='" | |
1527 | # time-stamp-format: "%:y-%02m-%02d" | |
1528 | # time-stamp-end: "'" | |
1529 | # End: |
0 | #! /bin/sh | |
1 | # Configuration validation subroutine script. | |
2 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | |
3 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, | |
4 | # 2011, 2012 Free Software Foundation, Inc. | |
5 | ||
6 | timestamp='2012-04-18' | |
7 | ||
8 | # This file is (in principle) common to ALL GNU software. | |
9 | # The presence of a machine in this file suggests that SOME GNU software | |
10 | # can handle that machine. It does not imply ALL GNU software can. | |
11 | # | |
12 | # This file is free software; you can redistribute it and/or modify | |
13 | # it under the terms of the GNU General Public License as published by | |
14 | # the Free Software Foundation; either version 2 of the License, or | |
15 | # (at your option) any later version. | |
16 | # | |
17 | # This program is distributed in the hope that it will be useful, | |
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | # GNU General Public License for more details. | |
21 | # | |
22 | # You should have received a copy of the GNU General Public License | |
23 | # along with this program; if not, see <http://www.gnu.org/licenses/>. | |
24 | # | |
25 | # As a special exception to the GNU General Public License, if you | |
26 | # distribute this file as part of a program that contains a | |
27 | # configuration script generated by Autoconf, you may include it under | |
28 | # the same distribution terms that you use for the rest of that program. | |
29 | ||
30 | ||
31 | # Please send patches to <config-patches@gnu.org>. Submit a context | |
32 | # diff and a properly formatted GNU ChangeLog entry. | |
33 | # | |
34 | # Configuration subroutine to validate and canonicalize a configuration type. | |
35 | # Supply the specified configuration type as an argument. | |
36 | # If it is invalid, we print an error message on stderr and exit with code 1. | |
37 | # Otherwise, we print the canonical config type on stdout and succeed. | |
38 | ||
39 | # You can get the latest version of this script from: | |
40 | # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD | |
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, | |
76 | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 | |
77 | Free Software Foundation, Inc. | |
78 | ||
79 | This is free software; see the source for copying conditions. There is NO | |
80 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | |
81 | ||
82 | help=" | |
83 | Try \`$me --help' for more information." | |
84 | ||
85 | # Parse command line | |
86 | while test $# -gt 0 ; do | |
87 | case $1 in | |
88 | --time-stamp | --time* | -t ) | |
89 | echo "$timestamp" ; exit ;; | |
90 | --version | -v ) | |
91 | echo "$version" ; exit ;; | |
92 | --help | --h* | -h ) | |
93 | echo "$usage"; exit ;; | |
94 | -- ) # Stop option processing | |
95 | shift; break ;; | |
96 | - ) # Use stdin as input. | |
97 | break ;; | |
98 | -* ) | |
99 | echo "$me: invalid option $1$help" | |
100 | exit 1 ;; | |
101 | ||
102 | *local*) | |
103 | # First pass through any local machine types. | |
104 | echo $1 | |
105 | exit ;; | |
106 | ||
107 | * ) | |
108 | break ;; | |
109 | esac | |
110 | done | |
111 | ||
112 | case $# in | |
113 | 0) echo "$me: missing argument$help" >&2 | |
114 | exit 1;; | |
115 | 1) ;; | |
116 | *) echo "$me: too many arguments$help" >&2 | |
117 | exit 1;; | |
118 | esac | |
119 | ||
120 | # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). | |
121 | # Here we must recognize all the valid KERNEL-OS combinations. | |
122 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | |
123 | case $maybe_os in | |
124 | nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ | |
125 | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ | |
126 | knetbsd*-gnu* | netbsd*-gnu* | \ | |
127 | kopensolaris*-gnu* | \ | |
128 | storm-chaos* | os2-emx* | rtmk-nova*) | |
129 | os=-$maybe_os | |
130 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | |
131 | ;; | |
132 | android-linux) | |
133 | os=-linux-android | |
134 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown | |
135 | ;; | |
136 | *) | |
137 | basic_machine=`echo $1 | sed 's/-[^-]*$//'` | |
138 | if [ $basic_machine != $1 ] | |
139 | then os=`echo $1 | sed 's/.*-/-/'` | |
140 | else os=; fi | |
141 | ;; | |
142 | esac | |
143 | ||
144 | ### Let's recognize common machines as not being operating systems so | |
145 | ### that things like config.sub decstation-3100 work. We also | |
146 | ### recognize some manufacturers as not being operating systems, so we | |
147 | ### can provide default operating systems below. | |
148 | case $os in | |
149 | -sun*os*) | |
150 | # Prevent following clause from handling this invalid input. | |
151 | ;; | |
152 | -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ | |
153 | -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ | |
154 | -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ | |
155 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ | |
156 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | |
157 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ | |
158 | -apple | -axis | -knuth | -cray | -microblaze) | |
159 | os= | |
160 | basic_machine=$1 | |
161 | ;; | |
162 | -bluegene*) | |
163 | os=-cnk | |
164 | ;; | |
165 | -sim | -cisco | -oki | -wec | -winbond) | |
166 | os= | |
167 | basic_machine=$1 | |
168 | ;; | |
169 | -scout) | |
170 | ;; | |
171 | -wrs) | |
172 | os=-vxworks | |
173 | basic_machine=$1 | |
174 | ;; | |
175 | -chorusos*) | |
176 | os=-chorusos | |
177 | basic_machine=$1 | |
178 | ;; | |
179 | -chorusrdb) | |
180 | os=-chorusrdb | |
181 | basic_machine=$1 | |
182 | ;; | |
183 | -hiux*) | |
184 | os=-hiuxwe2 | |
185 | ;; | |
186 | -sco6) | |
187 | os=-sco5v6 | |
188 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
189 | ;; | |
190 | -sco5) | |
191 | os=-sco3.2v5 | |
192 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
193 | ;; | |
194 | -sco4) | |
195 | os=-sco3.2v4 | |
196 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
197 | ;; | |
198 | -sco3.2.[4-9]*) | |
199 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
200 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
201 | ;; | |
202 | -sco3.2v[4-9]*) | |
203 | # Don't forget version if it is 3.2v4 or newer. | |
204 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
205 | ;; | |
206 | -sco5v6*) | |
207 | # Don't forget version if it is 3.2v4 or newer. | |
208 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
209 | ;; | |
210 | -sco*) | |
211 | os=-sco3.2v2 | |
212 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
213 | ;; | |
214 | -udk*) | |
215 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
216 | ;; | |
217 | -isc) | |
218 | os=-isc2.2 | |
219 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
220 | ;; | |
221 | -clix*) | |
222 | basic_machine=clipper-intergraph | |
223 | ;; | |
224 | -isc*) | |
225 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
226 | ;; | |
227 | -lynx*178) | |
228 | os=-lynxos178 | |
229 | ;; | |
230 | -lynx*5) | |
231 | os=-lynxos5 | |
232 | ;; | |
233 | -lynx*) | |
234 | os=-lynxos | |
235 | ;; | |
236 | -ptx*) | |
237 | basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` | |
238 | ;; | |
239 | -windowsnt*) | |
240 | os=`echo $os | sed -e 's/windowsnt/winnt/'` | |
241 | ;; | |
242 | -psos*) | |
243 | os=-psos | |
244 | ;; | |
245 | -mint | -mint[0-9]*) | |
246 | basic_machine=m68k-atari | |
247 | os=-mint | |
248 | ;; | |
249 | esac | |
250 | ||
251 | # Decode aliases for certain CPU-COMPANY combinations. | |
252 | case $basic_machine in | |
253 | # Recognize the basic CPU types without company name. | |
254 | # Some are omitted here because they have special meanings below. | |
255 | 1750a | 580 \ | |
256 | | a29k \ | |
257 | | aarch64 | aarch64_be \ | |
258 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | |
259 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | |
260 | | am33_2.0 \ | |
261 | | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | |
262 | | be32 | be64 \ | |
263 | | bfin \ | |
264 | | c4x | clipper \ | |
265 | | d10v | d30v | dlx | dsp16xx \ | |
266 | | epiphany \ | |
267 | | fido | fr30 | frv \ | |
268 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
269 | | hexagon \ | |
270 | | i370 | i860 | i960 | ia64 \ | |
271 | | ip2k | iq2000 \ | |
272 | | le32 | le64 \ | |
273 | | lm32 \ | |
274 | | m32c | m32r | m32rle | m68000 | m68k | m88k \ | |
275 | | maxq | mb | microblaze | mcore | mep | metag \ | |
276 | | mips | mipsbe | mipseb | mipsel | mipsle \ | |
277 | | mips16 \ | |
278 | | mips64 | mips64el \ | |
279 | | mips64octeon | mips64octeonel \ | |
280 | | mips64orion | mips64orionel \ | |
281 | | mips64r5900 | mips64r5900el \ | |
282 | | mips64vr | mips64vrel \ | |
283 | | mips64vr4100 | mips64vr4100el \ | |
284 | | mips64vr4300 | mips64vr4300el \ | |
285 | | mips64vr5000 | mips64vr5000el \ | |
286 | | mips64vr5900 | mips64vr5900el \ | |
287 | | mipsisa32 | mipsisa32el \ | |
288 | | mipsisa32r2 | mipsisa32r2el \ | |
289 | | mipsisa64 | mipsisa64el \ | |
290 | | mipsisa64r2 | mipsisa64r2el \ | |
291 | | mipsisa64sb1 | mipsisa64sb1el \ | |
292 | | mipsisa64sr71k | mipsisa64sr71kel \ | |
293 | | mipstx39 | mipstx39el \ | |
294 | | mn10200 | mn10300 \ | |
295 | | moxie \ | |
296 | | mt \ | |
297 | | msp430 \ | |
298 | | nds32 | nds32le | nds32be \ | |
299 | | nios | nios2 \ | |
300 | | ns16k | ns32k \ | |
301 | | open8 \ | |
302 | | or32 \ | |
303 | | pdp10 | pdp11 | pj | pjl \ | |
304 | | powerpc | powerpc64 | powerpc64le | powerpcle \ | |
305 | | pyramid \ | |
306 | | rl78 | rx \ | |
307 | | score \ | |
308 | | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | |
309 | | sh64 | sh64le \ | |
310 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | |
311 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | |
312 | | spu \ | |
313 | | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | |
314 | | ubicom32 \ | |
315 | | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | |
316 | | we32k \ | |
317 | | x86 | xc16x | xstormy16 | xtensa \ | |
318 | | z8k | z80) | |
319 | basic_machine=$basic_machine-unknown | |
320 | ;; | |
321 | c54x) | |
322 | basic_machine=tic54x-unknown | |
323 | ;; | |
324 | c55x) | |
325 | basic_machine=tic55x-unknown | |
326 | ;; | |
327 | c6x) | |
328 | basic_machine=tic6x-unknown | |
329 | ;; | |
330 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) | |
331 | basic_machine=$basic_machine-unknown | |
332 | os=-none | |
333 | ;; | |
334 | m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) | |
335 | ;; | |
336 | ms1) | |
337 | basic_machine=mt-unknown | |
338 | ;; | |
339 | ||
340 | strongarm | thumb | xscale) | |
341 | basic_machine=arm-unknown | |
342 | ;; | |
343 | xgate) | |
344 | basic_machine=$basic_machine-unknown | |
345 | os=-none | |
346 | ;; | |
347 | xscaleeb) | |
348 | basic_machine=armeb-unknown | |
349 | ;; | |
350 | ||
351 | xscaleel) | |
352 | basic_machine=armel-unknown | |
353 | ;; | |
354 | ||
355 | # We use `pc' rather than `unknown' | |
356 | # because (1) that's what they normally are, and | |
357 | # (2) the word "unknown" tends to confuse beginning users. | |
358 | i*86 | x86_64) | |
359 | basic_machine=$basic_machine-pc | |
360 | ;; | |
361 | # Object if more than one company name word. | |
362 | *-*-*) | |
363 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
364 | exit 1 | |
365 | ;; | |
366 | # Recognize the basic CPU types with company name. | |
367 | 580-* \ | |
368 | | a29k-* \ | |
369 | | aarch64-* | aarch64_be-* \ | |
370 | | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | |
371 | | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | |
372 | | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | |
373 | | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | |
374 | | avr-* | avr32-* \ | |
375 | | be32-* | be64-* \ | |
376 | | bfin-* | bs2000-* \ | |
377 | | c[123]* | c30-* | [cjt]90-* | c4x-* \ | |
378 | | clipper-* | craynv-* | cydra-* \ | |
379 | | d10v-* | d30v-* | dlx-* \ | |
380 | | elxsi-* \ | |
381 | | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | |
382 | | h8300-* | h8500-* \ | |
383 | | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | |
384 | | hexagon-* \ | |
385 | | i*86-* | i860-* | i960-* | ia64-* \ | |
386 | | ip2k-* | iq2000-* \ | |
387 | | le32-* | le64-* \ | |
388 | | lm32-* \ | |
389 | | m32c-* | m32r-* | m32rle-* \ | |
390 | | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | |
391 | | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | |
392 | | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | |
393 | | mips16-* \ | |
394 | | mips64-* | mips64el-* \ | |
395 | | mips64octeon-* | mips64octeonel-* \ | |
396 | | mips64orion-* | mips64orionel-* \ | |
397 | | mips64r5900-* | mips64r5900el-* \ | |
398 | | mips64vr-* | mips64vrel-* \ | |
399 | | mips64vr4100-* | mips64vr4100el-* \ | |
400 | | mips64vr4300-* | mips64vr4300el-* \ | |
401 | | mips64vr5000-* | mips64vr5000el-* \ | |
402 | | mips64vr5900-* | mips64vr5900el-* \ | |
403 | | mipsisa32-* | mipsisa32el-* \ | |
404 | | mipsisa32r2-* | mipsisa32r2el-* \ | |
405 | | mipsisa64-* | mipsisa64el-* \ | |
406 | | mipsisa64r2-* | mipsisa64r2el-* \ | |
407 | | mipsisa64sb1-* | mipsisa64sb1el-* \ | |
408 | | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | |
409 | | mipstx39-* | mipstx39el-* \ | |
410 | | mmix-* \ | |
411 | | mt-* \ | |
412 | | msp430-* \ | |
413 | | nds32-* | nds32le-* | nds32be-* \ | |
414 | | nios-* | nios2-* \ | |
415 | | none-* | np1-* | ns16k-* | ns32k-* \ | |
416 | | open8-* \ | |
417 | | orion-* \ | |
418 | | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | |
419 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | |
420 | | pyramid-* \ | |
421 | | rl78-* | romp-* | rs6000-* | rx-* \ | |
422 | | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | |
423 | | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | |
424 | | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | |
425 | | sparclite-* \ | |
426 | | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | |
427 | | tahoe-* \ | |
428 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | |
429 | | tile*-* \ | |
430 | | tron-* \ | |
431 | | ubicom32-* \ | |
432 | | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | |
433 | | vax-* \ | |
434 | | we32k-* \ | |
435 | | x86-* | x86_64-* | xc16x-* | xps100-* \ | |
436 | | xstormy16-* | xtensa*-* \ | |
437 | | ymp-* \ | |
438 | | z8k-* | z80-*) | |
439 | ;; | |
440 | # Recognize the basic CPU types without company name, with glob match. | |
441 | xtensa*) | |
442 | basic_machine=$basic_machine-unknown | |
443 | ;; | |
444 | # Recognize the various machine names and aliases which stand | |
445 | # for a CPU type and a company and sometimes even an OS. | |
446 | 386bsd) | |
447 | basic_machine=i386-unknown | |
448 | os=-bsd | |
449 | ;; | |
450 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) | |
451 | basic_machine=m68000-att | |
452 | ;; | |
453 | 3b*) | |
454 | basic_machine=we32k-att | |
455 | ;; | |
456 | a29khif) | |
457 | basic_machine=a29k-amd | |
458 | os=-udi | |
459 | ;; | |
460 | abacus) | |
461 | basic_machine=abacus-unknown | |
462 | ;; | |
463 | adobe68k) | |
464 | basic_machine=m68010-adobe | |
465 | os=-scout | |
466 | ;; | |
467 | alliant | fx80) | |
468 | basic_machine=fx80-alliant | |
469 | ;; | |
470 | altos | altos3068) | |
471 | basic_machine=m68k-altos | |
472 | ;; | |
473 | am29k) | |
474 | basic_machine=a29k-none | |
475 | os=-bsd | |
476 | ;; | |
477 | amd64) | |
478 | basic_machine=x86_64-pc | |
479 | ;; | |
480 | amd64-*) | |
481 | basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` | |
482 | ;; | |
483 | amdahl) | |
484 | basic_machine=580-amdahl | |
485 | os=-sysv | |
486 | ;; | |
487 | amiga | amiga-*) | |
488 | basic_machine=m68k-unknown | |
489 | ;; | |
490 | amigaos | amigados) | |
491 | basic_machine=m68k-unknown | |
492 | os=-amigaos | |
493 | ;; | |
494 | amigaunix | amix) | |
495 | basic_machine=m68k-unknown | |
496 | os=-sysv4 | |
497 | ;; | |
498 | apollo68) | |
499 | basic_machine=m68k-apollo | |
500 | os=-sysv | |
501 | ;; | |
502 | apollo68bsd) | |
503 | basic_machine=m68k-apollo | |
504 | os=-bsd | |
505 | ;; | |
506 | aros) | |
507 | basic_machine=i386-pc | |
508 | os=-aros | |
509 | ;; | |
510 | aux) | |
511 | basic_machine=m68k-apple | |
512 | os=-aux | |
513 | ;; | |
514 | balance) | |
515 | basic_machine=ns32k-sequent | |
516 | os=-dynix | |
517 | ;; | |
518 | blackfin) | |
519 | basic_machine=bfin-unknown | |
520 | os=-linux | |
521 | ;; | |
522 | blackfin-*) | |
523 | basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` | |
524 | os=-linux | |
525 | ;; | |
526 | bluegene*) | |
527 | basic_machine=powerpc-ibm | |
528 | os=-cnk | |
529 | ;; | |
530 | c54x-*) | |
531 | basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
532 | ;; | |
533 | c55x-*) | |
534 | basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
535 | ;; | |
536 | c6x-*) | |
537 | basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
538 | ;; | |
539 | c90) | |
540 | basic_machine=c90-cray | |
541 | os=-unicos | |
542 | ;; | |
543 | cegcc) | |
544 | basic_machine=arm-unknown | |
545 | os=-cegcc | |
546 | ;; | |
547 | convex-c1) | |
548 | basic_machine=c1-convex | |
549 | os=-bsd | |
550 | ;; | |
551 | convex-c2) | |
552 | basic_machine=c2-convex | |
553 | os=-bsd | |
554 | ;; | |
555 | convex-c32) | |
556 | basic_machine=c32-convex | |
557 | os=-bsd | |
558 | ;; | |
559 | convex-c34) | |
560 | basic_machine=c34-convex | |
561 | os=-bsd | |
562 | ;; | |
563 | convex-c38) | |
564 | basic_machine=c38-convex | |
565 | os=-bsd | |
566 | ;; | |
567 | cray | j90) | |
568 | basic_machine=j90-cray | |
569 | os=-unicos | |
570 | ;; | |
571 | craynv) | |
572 | basic_machine=craynv-cray | |
573 | os=-unicosmp | |
574 | ;; | |
575 | cr16 | cr16-*) | |
576 | basic_machine=cr16-unknown | |
577 | os=-elf | |
578 | ;; | |
579 | crds | unos) | |
580 | basic_machine=m68k-crds | |
581 | ;; | |
582 | crisv32 | crisv32-* | etraxfs*) | |
583 | basic_machine=crisv32-axis | |
584 | ;; | |
585 | cris | cris-* | etrax*) | |
586 | basic_machine=cris-axis | |
587 | ;; | |
588 | crx) | |
589 | basic_machine=crx-unknown | |
590 | os=-elf | |
591 | ;; | |
592 | da30 | da30-*) | |
593 | basic_machine=m68k-da30 | |
594 | ;; | |
595 | decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) | |
596 | basic_machine=mips-dec | |
597 | ;; | |
598 | decsystem10* | dec10*) | |
599 | basic_machine=pdp10-dec | |
600 | os=-tops10 | |
601 | ;; | |
602 | decsystem20* | dec20*) | |
603 | basic_machine=pdp10-dec | |
604 | os=-tops20 | |
605 | ;; | |
606 | delta | 3300 | motorola-3300 | motorola-delta \ | |
607 | | 3300-motorola | delta-motorola) | |
608 | basic_machine=m68k-motorola | |
609 | ;; | |
610 | delta88) | |
611 | basic_machine=m88k-motorola | |
612 | os=-sysv3 | |
613 | ;; | |
614 | dicos) | |
615 | basic_machine=i686-pc | |
616 | os=-dicos | |
617 | ;; | |
618 | djgpp) | |
619 | basic_machine=i586-pc | |
620 | os=-msdosdjgpp | |
621 | ;; | |
622 | dpx20 | dpx20-*) | |
623 | basic_machine=rs6000-bull | |
624 | os=-bosx | |
625 | ;; | |
626 | dpx2* | dpx2*-bull) | |
627 | basic_machine=m68k-bull | |
628 | os=-sysv3 | |
629 | ;; | |
630 | ebmon29k) | |
631 | basic_machine=a29k-amd | |
632 | os=-ebmon | |
633 | ;; | |
634 | elxsi) | |
635 | basic_machine=elxsi-elxsi | |
636 | os=-bsd | |
637 | ;; | |
638 | encore | umax | mmax) | |
639 | basic_machine=ns32k-encore | |
640 | ;; | |
641 | es1800 | OSE68k | ose68k | ose | OSE) | |
642 | basic_machine=m68k-ericsson | |
643 | os=-ose | |
644 | ;; | |
645 | fx2800) | |
646 | basic_machine=i860-alliant | |
647 | ;; | |
648 | genix) | |
649 | basic_machine=ns32k-ns | |
650 | ;; | |
651 | gmicro) | |
652 | basic_machine=tron-gmicro | |
653 | os=-sysv | |
654 | ;; | |
655 | go32) | |
656 | basic_machine=i386-pc | |
657 | os=-go32 | |
658 | ;; | |
659 | h3050r* | hiux*) | |
660 | basic_machine=hppa1.1-hitachi | |
661 | os=-hiuxwe2 | |
662 | ;; | |
663 | h8300hms) | |
664 | basic_machine=h8300-hitachi | |
665 | os=-hms | |
666 | ;; | |
667 | h8300xray) | |
668 | basic_machine=h8300-hitachi | |
669 | os=-xray | |
670 | ;; | |
671 | h8500hms) | |
672 | basic_machine=h8500-hitachi | |
673 | os=-hms | |
674 | ;; | |
675 | harris) | |
676 | basic_machine=m88k-harris | |
677 | os=-sysv3 | |
678 | ;; | |
679 | hp300-*) | |
680 | basic_machine=m68k-hp | |
681 | ;; | |
682 | hp300bsd) | |
683 | basic_machine=m68k-hp | |
684 | os=-bsd | |
685 | ;; | |
686 | hp300hpux) | |
687 | basic_machine=m68k-hp | |
688 | os=-hpux | |
689 | ;; | |
690 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) | |
691 | basic_machine=hppa1.0-hp | |
692 | ;; | |
693 | hp9k2[0-9][0-9] | hp9k31[0-9]) | |
694 | basic_machine=m68000-hp | |
695 | ;; | |
696 | hp9k3[2-9][0-9]) | |
697 | basic_machine=m68k-hp | |
698 | ;; | |
699 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) | |
700 | basic_machine=hppa1.0-hp | |
701 | ;; | |
702 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) | |
703 | basic_machine=hppa1.1-hp | |
704 | ;; | |
705 | hp9k78[0-9] | hp78[0-9]) | |
706 | # FIXME: really hppa2.0-hp | |
707 | basic_machine=hppa1.1-hp | |
708 | ;; | |
709 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) | |
710 | # FIXME: really hppa2.0-hp | |
711 | basic_machine=hppa1.1-hp | |
712 | ;; | |
713 | hp9k8[0-9][13679] | hp8[0-9][13679]) | |
714 | basic_machine=hppa1.1-hp | |
715 | ;; | |
716 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) | |
717 | basic_machine=hppa1.0-hp | |
718 | ;; | |
719 | hppa-next) | |
720 | os=-nextstep3 | |
721 | ;; | |
722 | hppaosf) | |
723 | basic_machine=hppa1.1-hp | |
724 | os=-osf | |
725 | ;; | |
726 | hppro) | |
727 | basic_machine=hppa1.1-hp | |
728 | os=-proelf | |
729 | ;; | |
730 | i370-ibm* | ibm*) | |
731 | basic_machine=i370-ibm | |
732 | ;; | |
733 | i*86v32) | |
734 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
735 | os=-sysv32 | |
736 | ;; | |
737 | i*86v4*) | |
738 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
739 | os=-sysv4 | |
740 | ;; | |
741 | i*86v) | |
742 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
743 | os=-sysv | |
744 | ;; | |
745 | i*86sol2) | |
746 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
747 | os=-solaris2 | |
748 | ;; | |
749 | i386mach) | |
750 | basic_machine=i386-mach | |
751 | os=-mach | |
752 | ;; | |
753 | i386-vsta | vsta) | |
754 | basic_machine=i386-unknown | |
755 | os=-vsta | |
756 | ;; | |
757 | iris | iris4d) | |
758 | basic_machine=mips-sgi | |
759 | case $os in | |
760 | -irix*) | |
761 | ;; | |
762 | *) | |
763 | os=-irix4 | |
764 | ;; | |
765 | esac | |
766 | ;; | |
767 | isi68 | isi) | |
768 | basic_machine=m68k-isi | |
769 | os=-sysv | |
770 | ;; | |
771 | m68knommu) | |
772 | basic_machine=m68k-unknown | |
773 | os=-linux | |
774 | ;; | |
775 | m68knommu-*) | |
776 | basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` | |
777 | os=-linux | |
778 | ;; | |
779 | m88k-omron*) | |
780 | basic_machine=m88k-omron | |
781 | ;; | |
782 | magnum | m3230) | |
783 | basic_machine=mips-mips | |
784 | os=-sysv | |
785 | ;; | |
786 | merlin) | |
787 | basic_machine=ns32k-utek | |
788 | os=-sysv | |
789 | ;; | |
790 | microblaze) | |
791 | basic_machine=microblaze-xilinx | |
792 | ;; | |
793 | mingw32) | |
794 | basic_machine=i386-pc | |
795 | os=-mingw32 | |
796 | ;; | |
797 | mingw32ce) | |
798 | basic_machine=arm-unknown | |
799 | os=-mingw32ce | |
800 | ;; | |
801 | miniframe) | |
802 | basic_machine=m68000-convergent | |
803 | ;; | |
804 | *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) | |
805 | basic_machine=m68k-atari | |
806 | os=-mint | |
807 | ;; | |
808 | mips3*-*) | |
809 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` | |
810 | ;; | |
811 | mips3*) | |
812 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown | |
813 | ;; | |
814 | monitor) | |
815 | basic_machine=m68k-rom68k | |
816 | os=-coff | |
817 | ;; | |
818 | morphos) | |
819 | basic_machine=powerpc-unknown | |
820 | os=-morphos | |
821 | ;; | |
822 | msdos) | |
823 | basic_machine=i386-pc | |
824 | os=-msdos | |
825 | ;; | |
826 | ms1-*) | |
827 | basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` | |
828 | ;; | |
829 | msys) | |
830 | basic_machine=i386-pc | |
831 | os=-msys | |
832 | ;; | |
833 | mvs) | |
834 | basic_machine=i370-ibm | |
835 | os=-mvs | |
836 | ;; | |
837 | nacl) | |
838 | basic_machine=le32-unknown | |
839 | os=-nacl | |
840 | ;; | |
841 | ncr3000) | |
842 | basic_machine=i486-ncr | |
843 | os=-sysv4 | |
844 | ;; | |
845 | netbsd386) | |
846 | basic_machine=i386-unknown | |
847 | os=-netbsd | |
848 | ;; | |
849 | netwinder) | |
850 | basic_machine=armv4l-rebel | |
851 | os=-linux | |
852 | ;; | |
853 | news | news700 | news800 | news900) | |
854 | basic_machine=m68k-sony | |
855 | os=-newsos | |
856 | ;; | |
857 | news1000) | |
858 | basic_machine=m68030-sony | |
859 | os=-newsos | |
860 | ;; | |
861 | news-3600 | risc-news) | |
862 | basic_machine=mips-sony | |
863 | os=-newsos | |
864 | ;; | |
865 | necv70) | |
866 | basic_machine=v70-nec | |
867 | os=-sysv | |
868 | ;; | |
869 | next | m*-next ) | |
870 | basic_machine=m68k-next | |
871 | case $os in | |
872 | -nextstep* ) | |
873 | ;; | |
874 | -ns2*) | |
875 | os=-nextstep2 | |
876 | ;; | |
877 | *) | |
878 | os=-nextstep3 | |
879 | ;; | |
880 | esac | |
881 | ;; | |
882 | nh3000) | |
883 | basic_machine=m68k-harris | |
884 | os=-cxux | |
885 | ;; | |
886 | nh[45]000) | |
887 | basic_machine=m88k-harris | |
888 | os=-cxux | |
889 | ;; | |
890 | nindy960) | |
891 | basic_machine=i960-intel | |
892 | os=-nindy | |
893 | ;; | |
894 | mon960) | |
895 | basic_machine=i960-intel | |
896 | os=-mon960 | |
897 | ;; | |
898 | nonstopux) | |
899 | basic_machine=mips-compaq | |
900 | os=-nonstopux | |
901 | ;; | |
902 | np1) | |
903 | basic_machine=np1-gould | |
904 | ;; | |
905 | neo-tandem) | |
906 | basic_machine=neo-tandem | |
907 | ;; | |
908 | nse-tandem) | |
909 | basic_machine=nse-tandem | |
910 | ;; | |
911 | nsr-tandem) | |
912 | basic_machine=nsr-tandem | |
913 | ;; | |
914 | op50n-* | op60c-*) | |
915 | basic_machine=hppa1.1-oki | |
916 | os=-proelf | |
917 | ;; | |
918 | openrisc | openrisc-*) | |
919 | basic_machine=or32-unknown | |
920 | ;; | |
921 | os400) | |
922 | basic_machine=powerpc-ibm | |
923 | os=-os400 | |
924 | ;; | |
925 | OSE68000 | ose68000) | |
926 | basic_machine=m68000-ericsson | |
927 | os=-ose | |
928 | ;; | |
929 | os68k) | |
930 | basic_machine=m68k-none | |
931 | os=-os68k | |
932 | ;; | |
933 | pa-hitachi) | |
934 | basic_machine=hppa1.1-hitachi | |
935 | os=-hiuxwe2 | |
936 | ;; | |
937 | paragon) | |
938 | basic_machine=i860-intel | |
939 | os=-osf | |
940 | ;; | |
941 | parisc) | |
942 | basic_machine=hppa-unknown | |
943 | os=-linux | |
944 | ;; | |
945 | parisc-*) | |
946 | basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` | |
947 | os=-linux | |
948 | ;; | |
949 | pbd) | |
950 | basic_machine=sparc-tti | |
951 | ;; | |
952 | pbb) | |
953 | basic_machine=m68k-tti | |
954 | ;; | |
955 | pc532 | pc532-*) | |
956 | basic_machine=ns32k-pc532 | |
957 | ;; | |
958 | pc98) | |
959 | basic_machine=i386-pc | |
960 | ;; | |
961 | pc98-*) | |
962 | basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` | |
963 | ;; | |
964 | pentium | p5 | k5 | k6 | nexgen | viac3) | |
965 | basic_machine=i586-pc | |
966 | ;; | |
967 | pentiumpro | p6 | 6x86 | athlon | athlon_*) | |
968 | basic_machine=i686-pc | |
969 | ;; | |
970 | pentiumii | pentium2 | pentiumiii | pentium3) | |
971 | basic_machine=i686-pc | |
972 | ;; | |
973 | pentium4) | |
974 | basic_machine=i786-pc | |
975 | ;; | |
976 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | |
977 | basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` | |
978 | ;; | |
979 | pentiumpro-* | p6-* | 6x86-* | athlon-*) | |
980 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | |
981 | ;; | |
982 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | |
983 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | |
984 | ;; | |
985 | pentium4-*) | |
986 | basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` | |
987 | ;; | |
988 | pn) | |
989 | basic_machine=pn-gould | |
990 | ;; | |
991 | power) basic_machine=power-ibm | |
992 | ;; | |
993 | ppc | ppcbe) basic_machine=powerpc-unknown | |
994 | ;; | |
995 | ppc-* | ppcbe-*) | |
996 | basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` | |
997 | ;; | |
998 | ppcle | powerpclittle | ppc-le | powerpc-little) | |
999 | basic_machine=powerpcle-unknown | |
1000 | ;; | |
1001 | ppcle-* | powerpclittle-*) | |
1002 | basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1003 | ;; | |
1004 | ppc64) basic_machine=powerpc64-unknown | |
1005 | ;; | |
1006 | ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1007 | ;; | |
1008 | ppc64le | powerpc64little | ppc64-le | powerpc64-little) | |
1009 | basic_machine=powerpc64le-unknown | |
1010 | ;; | |
1011 | ppc64le-* | powerpc64little-*) | |
1012 | basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1013 | ;; | |
1014 | ps2) | |
1015 | basic_machine=i386-ibm | |
1016 | ;; | |
1017 | pw32) | |
1018 | basic_machine=i586-unknown | |
1019 | os=-pw32 | |
1020 | ;; | |
1021 | rdos) | |
1022 | basic_machine=i386-pc | |
1023 | os=-rdos | |
1024 | ;; | |
1025 | rom68k) | |
1026 | basic_machine=m68k-rom68k | |
1027 | os=-coff | |
1028 | ;; | |
1029 | rm[46]00) | |
1030 | basic_machine=mips-siemens | |
1031 | ;; | |
1032 | rtpc | rtpc-*) | |
1033 | basic_machine=romp-ibm | |
1034 | ;; | |
1035 | s390 | s390-*) | |
1036 | basic_machine=s390-ibm | |
1037 | ;; | |
1038 | s390x | s390x-*) | |
1039 | basic_machine=s390x-ibm | |
1040 | ;; | |
1041 | sa29200) | |
1042 | basic_machine=a29k-amd | |
1043 | os=-udi | |
1044 | ;; | |
1045 | sb1) | |
1046 | basic_machine=mipsisa64sb1-unknown | |
1047 | ;; | |
1048 | sb1el) | |
1049 | basic_machine=mipsisa64sb1el-unknown | |
1050 | ;; | |
1051 | sde) | |
1052 | basic_machine=mipsisa32-sde | |
1053 | os=-elf | |
1054 | ;; | |
1055 | sei) | |
1056 | basic_machine=mips-sei | |
1057 | os=-seiux | |
1058 | ;; | |
1059 | sequent) | |
1060 | basic_machine=i386-sequent | |
1061 | ;; | |
1062 | sh) | |
1063 | basic_machine=sh-hitachi | |
1064 | os=-hms | |
1065 | ;; | |
1066 | sh5el) | |
1067 | basic_machine=sh5le-unknown | |
1068 | ;; | |
1069 | sh64) | |
1070 | basic_machine=sh64-unknown | |
1071 | ;; | |
1072 | sparclite-wrs | simso-wrs) | |
1073 | basic_machine=sparclite-wrs | |
1074 | os=-vxworks | |
1075 | ;; | |
1076 | sps7) | |
1077 | basic_machine=m68k-bull | |
1078 | os=-sysv2 | |
1079 | ;; | |
1080 | spur) | |
1081 | basic_machine=spur-unknown | |
1082 | ;; | |
1083 | st2000) | |
1084 | basic_machine=m68k-tandem | |
1085 | ;; | |
1086 | stratus) | |
1087 | basic_machine=i860-stratus | |
1088 | os=-sysv4 | |
1089 | ;; | |
1090 | strongarm-* | thumb-*) | |
1091 | basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1092 | ;; | |
1093 | sun2) | |
1094 | basic_machine=m68000-sun | |
1095 | ;; | |
1096 | sun2os3) | |
1097 | basic_machine=m68000-sun | |
1098 | os=-sunos3 | |
1099 | ;; | |
1100 | sun2os4) | |
1101 | basic_machine=m68000-sun | |
1102 | os=-sunos4 | |
1103 | ;; | |
1104 | sun3os3) | |
1105 | basic_machine=m68k-sun | |
1106 | os=-sunos3 | |
1107 | ;; | |
1108 | sun3os4) | |
1109 | basic_machine=m68k-sun | |
1110 | os=-sunos4 | |
1111 | ;; | |
1112 | sun4os3) | |
1113 | basic_machine=sparc-sun | |
1114 | os=-sunos3 | |
1115 | ;; | |
1116 | sun4os4) | |
1117 | basic_machine=sparc-sun | |
1118 | os=-sunos4 | |
1119 | ;; | |
1120 | sun4sol2) | |
1121 | basic_machine=sparc-sun | |
1122 | os=-solaris2 | |
1123 | ;; | |
1124 | sun3 | sun3-*) | |
1125 | basic_machine=m68k-sun | |
1126 | ;; | |
1127 | sun4) | |
1128 | basic_machine=sparc-sun | |
1129 | ;; | |
1130 | sun386 | sun386i | roadrunner) | |
1131 | basic_machine=i386-sun | |
1132 | ;; | |
1133 | sv1) | |
1134 | basic_machine=sv1-cray | |
1135 | os=-unicos | |
1136 | ;; | |
1137 | symmetry) | |
1138 | basic_machine=i386-sequent | |
1139 | os=-dynix | |
1140 | ;; | |
1141 | t3e) | |
1142 | basic_machine=alphaev5-cray | |
1143 | os=-unicos | |
1144 | ;; | |
1145 | t90) | |
1146 | basic_machine=t90-cray | |
1147 | os=-unicos | |
1148 | ;; | |
1149 | tile*) | |
1150 | basic_machine=$basic_machine-unknown | |
1151 | os=-linux-gnu | |
1152 | ;; | |
1153 | tx39) | |
1154 | basic_machine=mipstx39-unknown | |
1155 | ;; | |
1156 | tx39el) | |
1157 | basic_machine=mipstx39el-unknown | |
1158 | ;; | |
1159 | toad1) | |
1160 | basic_machine=pdp10-xkl | |
1161 | os=-tops20 | |
1162 | ;; | |
1163 | tower | tower-32) | |
1164 | basic_machine=m68k-ncr | |
1165 | ;; | |
1166 | tpf) | |
1167 | basic_machine=s390x-ibm | |
1168 | os=-tpf | |
1169 | ;; | |
1170 | udi29k) | |
1171 | basic_machine=a29k-amd | |
1172 | os=-udi | |
1173 | ;; | |
1174 | ultra3) | |
1175 | basic_machine=a29k-nyu | |
1176 | os=-sym1 | |
1177 | ;; | |
1178 | v810 | necv810) | |
1179 | basic_machine=v810-nec | |
1180 | os=-none | |
1181 | ;; | |
1182 | vaxv) | |
1183 | basic_machine=vax-dec | |
1184 | os=-sysv | |
1185 | ;; | |
1186 | vms) | |
1187 | basic_machine=vax-dec | |
1188 | os=-vms | |
1189 | ;; | |
1190 | vpp*|vx|vx-*) | |
1191 | basic_machine=f301-fujitsu | |
1192 | ;; | |
1193 | vxworks960) | |
1194 | basic_machine=i960-wrs | |
1195 | os=-vxworks | |
1196 | ;; | |
1197 | vxworks68) | |
1198 | basic_machine=m68k-wrs | |
1199 | os=-vxworks | |
1200 | ;; | |
1201 | vxworks29k) | |
1202 | basic_machine=a29k-wrs | |
1203 | os=-vxworks | |
1204 | ;; | |
1205 | w65*) | |
1206 | basic_machine=w65-wdc | |
1207 | os=-none | |
1208 | ;; | |
1209 | w89k-*) | |
1210 | basic_machine=hppa1.1-winbond | |
1211 | os=-proelf | |
1212 | ;; | |
1213 | xbox) | |
1214 | basic_machine=i686-pc | |
1215 | os=-mingw32 | |
1216 | ;; | |
1217 | xps | xps100) | |
1218 | basic_machine=xps100-honeywell | |
1219 | ;; | |
1220 | xscale-* | xscalee[bl]-*) | |
1221 | basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` | |
1222 | ;; | |
1223 | ymp) | |
1224 | basic_machine=ymp-cray | |
1225 | os=-unicos | |
1226 | ;; | |
1227 | z8k-*-coff) | |
1228 | basic_machine=z8k-unknown | |
1229 | os=-sim | |
1230 | ;; | |
1231 | z80-*-coff) | |
1232 | basic_machine=z80-unknown | |
1233 | os=-sim | |
1234 | ;; | |
1235 | none) | |
1236 | basic_machine=none-none | |
1237 | os=-none | |
1238 | ;; | |
1239 | ||
1240 | # Here we handle the default manufacturer of certain CPU types. It is in | |
1241 | # some cases the only manufacturer, in others, it is the most popular. | |
1242 | w89k) | |
1243 | basic_machine=hppa1.1-winbond | |
1244 | ;; | |
1245 | op50n) | |
1246 | basic_machine=hppa1.1-oki | |
1247 | ;; | |
1248 | op60c) | |
1249 | basic_machine=hppa1.1-oki | |
1250 | ;; | |
1251 | romp) | |
1252 | basic_machine=romp-ibm | |
1253 | ;; | |
1254 | mmix) | |
1255 | basic_machine=mmix-knuth | |
1256 | ;; | |
1257 | rs6000) | |
1258 | basic_machine=rs6000-ibm | |
1259 | ;; | |
1260 | vax) | |
1261 | basic_machine=vax-dec | |
1262 | ;; | |
1263 | pdp10) | |
1264 | # there are many clones, so DEC is not a safe bet | |
1265 | basic_machine=pdp10-unknown | |
1266 | ;; | |
1267 | pdp11) | |
1268 | basic_machine=pdp11-dec | |
1269 | ;; | |
1270 | we32k) | |
1271 | basic_machine=we32k-att | |
1272 | ;; | |
1273 | sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) | |
1274 | basic_machine=sh-unknown | |
1275 | ;; | |
1276 | sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) | |
1277 | basic_machine=sparc-sun | |
1278 | ;; | |
1279 | cydra) | |
1280 | basic_machine=cydra-cydrome | |
1281 | ;; | |
1282 | orion) | |
1283 | basic_machine=orion-highlevel | |
1284 | ;; | |
1285 | orion105) | |
1286 | basic_machine=clipper-highlevel | |
1287 | ;; | |
1288 | mac | mpw | mac-mpw) | |
1289 | basic_machine=m68k-apple | |
1290 | ;; | |
1291 | pmac | pmac-mpw) | |
1292 | basic_machine=powerpc-apple | |
1293 | ;; | |
1294 | *-unknown) | |
1295 | # Make sure to match an already-canonicalized machine name. | |
1296 | ;; | |
1297 | *) | |
1298 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
1299 | exit 1 | |
1300 | ;; | |
1301 | esac | |
1302 | ||
1303 | # Here we canonicalize certain aliases for manufacturers. | |
1304 | case $basic_machine in | |
1305 | *-digital*) | |
1306 | basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` | |
1307 | ;; | |
1308 | *-commodore*) | |
1309 | basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` | |
1310 | ;; | |
1311 | *) | |
1312 | ;; | |
1313 | esac | |
1314 | ||
1315 | # Decode manufacturer-specific aliases for certain operating systems. | |
1316 | ||
1317 | if [ x"$os" != x"" ] | |
1318 | then | |
1319 | case $os in | |
1320 | # First match some system type aliases | |
1321 | # that might get confused with valid system types. | |
1322 | # -solaris* is a basic system type, with this one exception. | |
1323 | -auroraux) | |
1324 | os=-auroraux | |
1325 | ;; | |
1326 | -solaris1 | -solaris1.*) | |
1327 | os=`echo $os | sed -e 's|solaris1|sunos4|'` | |
1328 | ;; | |
1329 | -solaris) | |
1330 | os=-solaris2 | |
1331 | ;; | |
1332 | -svr4*) | |
1333 | os=-sysv4 | |
1334 | ;; | |
1335 | -unixware*) | |
1336 | os=-sysv4.2uw | |
1337 | ;; | |
1338 | -gnu/linux*) | |
1339 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` | |
1340 | ;; | |
1341 | # First accept the basic system types. | |
1342 | # The portable systems comes first. | |
1343 | # Each alternative MUST END IN A *, to match a version number. | |
1344 | # -sysv* is not here because it comes later, after sysvr4. | |
1345 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | |
1346 | | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | |
1347 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | |
1348 | | -sym* | -kopensolaris* \ | |
1349 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | |
1350 | | -aos* | -aros* \ | |
1351 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | |
1352 | | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | |
1353 | | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | |
1354 | | -openbsd* | -solidbsd* \ | |
1355 | | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | |
1356 | | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | |
1357 | | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | |
1358 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | |
1359 | | -chorusos* | -chorusrdb* | -cegcc* \ | |
1360 | | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | |
1361 | | -mingw32* | -linux-gnu* | -linux-android* \ | |
1362 | | -linux-newlib* | -linux-uclibc* \ | |
1363 | | -uxpv* | -beos* | -mpeix* | -udk* \ | |
1364 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | |
1365 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | |
1366 | | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | |
1367 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | |
1368 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | |
1369 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | |
1370 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) | |
1371 | # Remember, each alternative MUST END IN *, to match a version number. | |
1372 | ;; | |
1373 | -qnx*) | |
1374 | case $basic_machine in | |
1375 | x86-* | i*86-*) | |
1376 | ;; | |
1377 | *) | |
1378 | os=-nto$os | |
1379 | ;; | |
1380 | esac | |
1381 | ;; | |
1382 | -nto-qnx*) | |
1383 | ;; | |
1384 | -nto*) | |
1385 | os=`echo $os | sed -e 's|nto|nto-qnx|'` | |
1386 | ;; | |
1387 | -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | |
1388 | | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | |
1389 | | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) | |
1390 | ;; | |
1391 | -mac*) | |
1392 | os=`echo $os | sed -e 's|mac|macos|'` | |
1393 | ;; | |
1394 | -linux-dietlibc) | |
1395 | os=-linux-dietlibc | |
1396 | ;; | |
1397 | -linux*) | |
1398 | os=`echo $os | sed -e 's|linux|linux-gnu|'` | |
1399 | ;; | |
1400 | -sunos5*) | |
1401 | os=`echo $os | sed -e 's|sunos5|solaris2|'` | |
1402 | ;; | |
1403 | -sunos6*) | |
1404 | os=`echo $os | sed -e 's|sunos6|solaris3|'` | |
1405 | ;; | |
1406 | -opened*) | |
1407 | os=-openedition | |
1408 | ;; | |
1409 | -os400*) | |
1410 | os=-os400 | |
1411 | ;; | |
1412 | -wince*) | |
1413 | os=-wince | |
1414 | ;; | |
1415 | -osfrose*) | |
1416 | os=-osfrose | |
1417 | ;; | |
1418 | -osf*) | |
1419 | os=-osf | |
1420 | ;; | |
1421 | -utek*) | |
1422 | os=-bsd | |
1423 | ;; | |
1424 | -dynix*) | |
1425 | os=-bsd | |
1426 | ;; | |
1427 | -acis*) | |
1428 | os=-aos | |
1429 | ;; | |
1430 | -atheos*) | |
1431 | os=-atheos | |
1432 | ;; | |
1433 | -syllable*) | |
1434 | os=-syllable | |
1435 | ;; | |
1436 | -386bsd) | |
1437 | os=-bsd | |
1438 | ;; | |
1439 | -ctix* | -uts*) | |
1440 | os=-sysv | |
1441 | ;; | |
1442 | -nova*) | |
1443 | os=-rtmk-nova | |
1444 | ;; | |
1445 | -ns2 ) | |
1446 | os=-nextstep2 | |
1447 | ;; | |
1448 | -nsk*) | |
1449 | os=-nsk | |
1450 | ;; | |
1451 | # Preserve the version number of sinix5. | |
1452 | -sinix5.*) | |
1453 | os=`echo $os | sed -e 's|sinix|sysv|'` | |
1454 | ;; | |
1455 | -sinix*) | |
1456 | os=-sysv4 | |
1457 | ;; | |
1458 | -tpf*) | |
1459 | os=-tpf | |
1460 | ;; | |
1461 | -triton*) | |
1462 | os=-sysv3 | |
1463 | ;; | |
1464 | -oss*) | |
1465 | os=-sysv3 | |
1466 | ;; | |
1467 | -svr4) | |
1468 | os=-sysv4 | |
1469 | ;; | |
1470 | -svr3) | |
1471 | os=-sysv3 | |
1472 | ;; | |
1473 | -sysvr4) | |
1474 | os=-sysv4 | |
1475 | ;; | |
1476 | # This must come after -sysvr4. | |
1477 | -sysv*) | |
1478 | ;; | |
1479 | -ose*) | |
1480 | os=-ose | |
1481 | ;; | |
1482 | -es1800*) | |
1483 | os=-ose | |
1484 | ;; | |
1485 | -xenix) | |
1486 | os=-xenix | |
1487 | ;; | |
1488 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
1489 | os=-mint | |
1490 | ;; | |
1491 | -aros*) | |
1492 | os=-aros | |
1493 | ;; | |
1494 | -kaos*) | |
1495 | os=-kaos | |
1496 | ;; | |
1497 | -zvmoe) | |
1498 | os=-zvmoe | |
1499 | ;; | |
1500 | -dicos*) | |
1501 | os=-dicos | |
1502 | ;; | |
1503 | -nacl*) | |
1504 | ;; | |
1505 | -none) | |
1506 | ;; | |
1507 | *) | |
1508 | # Get rid of the `-' at the beginning of $os. | |
1509 | os=`echo $os | sed 's/[^-]*-//'` | |
1510 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 | |
1511 | exit 1 | |
1512 | ;; | |
1513 | esac | |
1514 | else | |
1515 | ||
1516 | # Here we handle the default operating systems that come with various machines. | |
1517 | # The value should be what the vendor currently ships out the door with their | |
1518 | # machine or put another way, the most popular os provided with the machine. | |
1519 | ||
1520 | # Note that if you're going to try to match "-MANUFACTURER" here (say, | |
1521 | # "-sun"), then you have to tell the case statement up towards the top | |
1522 | # that MANUFACTURER isn't an operating system. Otherwise, code above | |
1523 | # will signal an error saying that MANUFACTURER isn't an operating | |
1524 | # system, and we'll never get to this point. | |
1525 | ||
1526 | case $basic_machine in | |
1527 | score-*) | |
1528 | os=-elf | |
1529 | ;; | |
1530 | spu-*) | |
1531 | os=-elf | |
1532 | ;; | |
1533 | *-acorn) | |
1534 | os=-riscix1.2 | |
1535 | ;; | |
1536 | arm*-rebel) | |
1537 | os=-linux | |
1538 | ;; | |
1539 | arm*-semi) | |
1540 | os=-aout | |
1541 | ;; | |
1542 | c4x-* | tic4x-*) | |
1543 | os=-coff | |
1544 | ;; | |
1545 | hexagon-*) | |
1546 | os=-elf | |
1547 | ;; | |
1548 | tic54x-*) | |
1549 | os=-coff | |
1550 | ;; | |
1551 | tic55x-*) | |
1552 | os=-coff | |
1553 | ;; | |
1554 | tic6x-*) | |
1555 | os=-coff | |
1556 | ;; | |
1557 | # This must come before the *-dec entry. | |
1558 | pdp10-*) | |
1559 | os=-tops20 | |
1560 | ;; | |
1561 | pdp11-*) | |
1562 | os=-none | |
1563 | ;; | |
1564 | *-dec | vax-*) | |
1565 | os=-ultrix4.2 | |
1566 | ;; | |
1567 | m68*-apollo) | |
1568 | os=-domain | |
1569 | ;; | |
1570 | i386-sun) | |
1571 | os=-sunos4.0.2 | |
1572 | ;; | |
1573 | m68000-sun) | |
1574 | os=-sunos3 | |
1575 | ;; | |
1576 | m68*-cisco) | |
1577 | os=-aout | |
1578 | ;; | |
1579 | mep-*) | |
1580 | os=-elf | |
1581 | ;; | |
1582 | mips*-cisco) | |
1583 | os=-elf | |
1584 | ;; | |
1585 | mips*-*) | |
1586 | os=-elf | |
1587 | ;; | |
1588 | or32-*) | |
1589 | os=-coff | |
1590 | ;; | |
1591 | *-tti) # must be before sparc entry or we get the wrong os. | |
1592 | os=-sysv3 | |
1593 | ;; | |
1594 | sparc-* | *-sun) | |
1595 | os=-sunos4.1.1 | |
1596 | ;; | |
1597 | *-be) | |
1598 | os=-beos | |
1599 | ;; | |
1600 | *-haiku) | |
1601 | os=-haiku | |
1602 | ;; | |
1603 | *-ibm) | |
1604 | os=-aix | |
1605 | ;; | |
1606 | *-knuth) | |
1607 | os=-mmixware | |
1608 | ;; | |
1609 | *-wec) | |
1610 | os=-proelf | |
1611 | ;; | |
1612 | *-winbond) | |
1613 | os=-proelf | |
1614 | ;; | |
1615 | *-oki) | |
1616 | os=-proelf | |
1617 | ;; | |
1618 | *-hp) | |
1619 | os=-hpux | |
1620 | ;; | |
1621 | *-hitachi) | |
1622 | os=-hiux | |
1623 | ;; | |
1624 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) | |
1625 | os=-sysv | |
1626 | ;; | |
1627 | *-cbm) | |
1628 | os=-amigaos | |
1629 | ;; | |
1630 | *-dg) | |
1631 | os=-dgux | |
1632 | ;; | |
1633 | *-dolphin) | |
1634 | os=-sysv3 | |
1635 | ;; | |
1636 | m68k-ccur) | |
1637 | os=-rtu | |
1638 | ;; | |
1639 | m88k-omron*) | |
1640 | os=-luna | |
1641 | ;; | |
1642 | *-next ) | |
1643 | os=-nextstep | |
1644 | ;; | |
1645 | *-sequent) | |
1646 | os=-ptx | |
1647 | ;; | |
1648 | *-crds) | |
1649 | os=-unos | |
1650 | ;; | |
1651 | *-ns) | |
1652 | os=-genix | |
1653 | ;; | |
1654 | i370-*) | |
1655 | os=-mvs | |
1656 | ;; | |
1657 | *-next) | |
1658 | os=-nextstep3 | |
1659 | ;; | |
1660 | *-gould) | |
1661 | os=-sysv | |
1662 | ;; | |
1663 | *-highlevel) | |
1664 | os=-bsd | |
1665 | ;; | |
1666 | *-encore) | |
1667 | os=-bsd | |
1668 | ;; | |
1669 | *-sgi) | |
1670 | os=-irix | |
1671 | ;; | |
1672 | *-siemens) | |
1673 | os=-sysv4 | |
1674 | ;; | |
1675 | *-masscomp) | |
1676 | os=-rtu | |
1677 | ;; | |
1678 | f30[01]-fujitsu | f700-fujitsu) | |
1679 | os=-uxpv | |
1680 | ;; | |
1681 | *-rom68k) | |
1682 | os=-coff | |
1683 | ;; | |
1684 | *-*bug) | |
1685 | os=-coff | |
1686 | ;; | |
1687 | *-apple) | |
1688 | os=-macos | |
1689 | ;; | |
1690 | *-atari*) | |
1691 | os=-mint | |
1692 | ;; | |
1693 | *) | |
1694 | os=-none | |
1695 | ;; | |
1696 | esac | |
1697 | fi | |
1698 | ||
1699 | # Here we handle the case where we know the os, and the CPU type, but not the | |
1700 | # manufacturer. We pick the logical manufacturer. | |
1701 | vendor=unknown | |
1702 | case $basic_machine in | |
1703 | *-unknown) | |
1704 | case $os in | |
1705 | -riscix*) | |
1706 | vendor=acorn | |
1707 | ;; | |
1708 | -sunos*) | |
1709 | vendor=sun | |
1710 | ;; | |
1711 | -cnk*|-aix*) | |
1712 | vendor=ibm | |
1713 | ;; | |
1714 | -beos*) | |
1715 | vendor=be | |
1716 | ;; | |
1717 | -hpux*) | |
1718 | vendor=hp | |
1719 | ;; | |
1720 | -mpeix*) | |
1721 | vendor=hp | |
1722 | ;; | |
1723 | -hiux*) | |
1724 | vendor=hitachi | |
1725 | ;; | |
1726 | -unos*) | |
1727 | vendor=crds | |
1728 | ;; | |
1729 | -dgux*) | |
1730 | vendor=dg | |
1731 | ;; | |
1732 | -luna*) | |
1733 | vendor=omron | |
1734 | ;; | |
1735 | -genix*) | |
1736 | vendor=ns | |
1737 | ;; | |
1738 | -mvs* | -opened*) | |
1739 | vendor=ibm | |
1740 | ;; | |
1741 | -os400*) | |
1742 | vendor=ibm | |
1743 | ;; | |
1744 | -ptx*) | |
1745 | vendor=sequent | |
1746 | ;; | |
1747 | -tpf*) | |
1748 | vendor=ibm | |
1749 | ;; | |
1750 | -vxsim* | -vxworks* | -windiss*) | |
1751 | vendor=wrs | |
1752 | ;; | |
1753 | -aux*) | |
1754 | vendor=apple | |
1755 | ;; | |
1756 | -hms*) | |
1757 | vendor=hitachi | |
1758 | ;; | |
1759 | -mpw* | -macos*) | |
1760 | vendor=apple | |
1761 | ;; | |
1762 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
1763 | vendor=atari | |
1764 | ;; | |
1765 | -vos*) | |
1766 | vendor=stratus | |
1767 | ;; | |
1768 | esac | |
1769 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | |
1770 | ;; | |
1771 | esac | |
1772 | ||
1773 | echo $basic_machine$os | |
1774 | exit | |
1775 | ||
1776 | # Local variables: | |
1777 | # eval: (add-hook 'write-file-hooks 'time-stamp) | |
1778 | # time-stamp-start: "timestamp='" | |
1779 | # time-stamp-format: "%:y-%02m-%02d" | |
1780 | # time-stamp-end: "'" | |
1781 | # End: |
0 | #! /bin/sh | |
1 | # depcomp - compile a program generating dependencies as side-effects | |
2 | ||
3 | scriptversion=2012-03-27.16; # UTC | |
4 | ||
5 | # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, | |
6 | # 2011, 2012 Free Software Foundation, Inc. | |
7 | ||
8 | # This program is free software; you can redistribute it and/or modify | |
9 | # it under the terms of the GNU General Public License as published by | |
10 | # the Free Software Foundation; either version 2, or (at your option) | |
11 | # any later version. | |
12 | ||
13 | # This program is distributed in the hope that it will be useful, | |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | # GNU General Public License for more details. | |
17 | ||
18 | # You should have received a copy of the GNU General Public License | |
19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 | ||
21 | # As a special exception to the GNU General Public License, if you | |
22 | # distribute this file as part of a program that contains a | |
23 | # configuration script generated by Autoconf, you may include it under | |
24 | # the same distribution terms that you use for the rest of that program. | |
25 | ||
26 | # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. | |
27 | ||
28 | case $1 in | |
29 | '') | |
30 | echo "$0: No command. Try '$0 --help' for more information." 1>&2 | |
31 | exit 1; | |
32 | ;; | |
33 | -h | --h*) | |
34 | cat <<\EOF | |
35 | Usage: depcomp [--help] [--version] PROGRAM [ARGS] | |
36 | ||
37 | Run PROGRAMS ARGS to compile a file, generating dependencies | |
38 | as side-effects. | |
39 | ||
40 | Environment variables: | |
41 | depmode Dependency tracking mode. | |
42 | source Source file read by 'PROGRAMS ARGS'. | |
43 | object Object file output by 'PROGRAMS ARGS'. | |
44 | DEPDIR directory where to store dependencies. | |
45 | depfile Dependency file to output. | |
46 | tmpdepfile Temporary file to use when outputting dependencies. | |
47 | libtool Whether libtool is used (yes/no). | |
48 | ||
49 | Report bugs to <bug-automake@gnu.org>. | |
50 | EOF | |
51 | exit $? | |
52 | ;; | |
53 | -v | --v*) | |
54 | echo "depcomp $scriptversion" | |
55 | exit $? | |
56 | ;; | |
57 | esac | |
58 | ||
59 | # A tabulation character. | |
60 | tab=' ' | |
61 | # A newline character. | |
62 | nl=' | |
63 | ' | |
64 | ||
65 | if test -z "$depmode" || test -z "$source" || test -z "$object"; then | |
66 | echo "depcomp: Variables source, object and depmode must be set" 1>&2 | |
67 | exit 1 | |
68 | fi | |
69 | ||
70 | # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. | |
71 | depfile=${depfile-`echo "$object" | | |
72 | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} | |
73 | tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} | |
74 | ||
75 | rm -f "$tmpdepfile" | |
76 | ||
77 | # Some modes work just like other modes, but use different flags. We | |
78 | # parameterize here, but still list the modes in the big case below, | |
79 | # to make depend.m4 easier to write. Note that we *cannot* use a case | |
80 | # here, because this file can only contain one case statement. | |
81 | if test "$depmode" = hp; then | |
82 | # HP compiler uses -M and no extra arg. | |
83 | gccflag=-M | |
84 | depmode=gcc | |
85 | fi | |
86 | ||
87 | if test "$depmode" = dashXmstdout; then | |
88 | # This is just like dashmstdout with a different argument. | |
89 | dashmflag=-xM | |
90 | depmode=dashmstdout | |
91 | fi | |
92 | ||
93 | cygpath_u="cygpath -u -f -" | |
94 | if test "$depmode" = msvcmsys; then | |
95 | # This is just like msvisualcpp but w/o cygpath translation. | |
96 | # Just convert the backslash-escaped backslashes to single forward | |
97 | # slashes to satisfy depend.m4 | |
98 | cygpath_u='sed s,\\\\,/,g' | |
99 | depmode=msvisualcpp | |
100 | fi | |
101 | ||
102 | if test "$depmode" = msvc7msys; then | |
103 | # This is just like msvc7 but w/o cygpath translation. | |
104 | # Just convert the backslash-escaped backslashes to single forward | |
105 | # slashes to satisfy depend.m4 | |
106 | cygpath_u='sed s,\\\\,/,g' | |
107 | depmode=msvc7 | |
108 | fi | |
109 | ||
110 | if test "$depmode" = xlc; then | |
111 | # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. | |
112 | gccflag=-qmakedep=gcc,-MF | |
113 | depmode=gcc | |
114 | fi | |
115 | ||
116 | case "$depmode" in | |
117 | gcc3) | |
118 | ## gcc 3 implements dependency tracking that does exactly what | |
119 | ## we want. Yay! Note: for some reason libtool 1.4 doesn't like | |
120 | ## it if -MD -MP comes after the -MF stuff. Hmm. | |
121 | ## Unfortunately, FreeBSD c89 acceptance of flags depends upon | |
122 | ## the command line argument order; so add the flags where they | |
123 | ## appear in depend2.am. Note that the slowdown incurred here | |
124 | ## affects only configure: in makefiles, %FASTDEP% shortcuts this. | |
125 | for arg | |
126 | do | |
127 | case $arg in | |
128 | -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; | |
129 | *) set fnord "$@" "$arg" ;; | |
130 | esac | |
131 | shift # fnord | |
132 | shift # $arg | |
133 | done | |
134 | "$@" | |
135 | stat=$? | |
136 | if test $stat -eq 0; then : | |
137 | else | |
138 | rm -f "$tmpdepfile" | |
139 | exit $stat | |
140 | fi | |
141 | mv "$tmpdepfile" "$depfile" | |
142 | ;; | |
143 | ||
144 | gcc) | |
145 | ## There are various ways to get dependency output from gcc. Here's | |
146 | ## why we pick this rather obscure method: | |
147 | ## - Don't want to use -MD because we'd like the dependencies to end | |
148 | ## up in a subdir. Having to rename by hand is ugly. | |
149 | ## (We might end up doing this anyway to support other compilers.) | |
150 | ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like | |
151 | ## -MM, not -M (despite what the docs say). | |
152 | ## - Using -M directly means running the compiler twice (even worse | |
153 | ## than renaming). | |
154 | if test -z "$gccflag"; then | |
155 | gccflag=-MD, | |
156 | fi | |
157 | "$@" -Wp,"$gccflag$tmpdepfile" | |
158 | stat=$? | |
159 | if test $stat -eq 0; then : | |
160 | else | |
161 | rm -f "$tmpdepfile" | |
162 | exit $stat | |
163 | fi | |
164 | rm -f "$depfile" | |
165 | echo "$object : \\" > "$depfile" | |
166 | alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz | |
167 | ## The second -e expression handles DOS-style file names with drive letters. | |
168 | sed -e 's/^[^:]*: / /' \ | |
169 | -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" | |
170 | ## This next piece of magic avoids the "deleted header file" problem. | |
171 | ## The problem is that when a header file which appears in a .P file | |
172 | ## is deleted, the dependency causes make to die (because there is | |
173 | ## typically no way to rebuild the header). We avoid this by adding | |
174 | ## dummy dependencies for each header file. Too bad gcc doesn't do | |
175 | ## this for us directly. | |
176 | tr ' ' "$nl" < "$tmpdepfile" | | |
177 | ## Some versions of gcc put a space before the ':'. On the theory | |
178 | ## that the space means something, we add a space to the output as | |
179 | ## well. hp depmode also adds that space, but also prefixes the VPATH | |
180 | ## to the object. Take care to not repeat it in the output. | |
181 | ## Some versions of the HPUX 10.20 sed can't process this invocation | |
182 | ## correctly. Breaking it into two sed invocations is a workaround. | |
183 | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | |
184 | | sed -e 's/$/ :/' >> "$depfile" | |
185 | rm -f "$tmpdepfile" | |
186 | ;; | |
187 | ||
188 | hp) | |
189 | # This case exists only to let depend.m4 do its work. It works by | |
190 | # looking at the text of this script. This case will never be run, | |
191 | # since it is checked for above. | |
192 | exit 1 | |
193 | ;; | |
194 | ||
195 | sgi) | |
196 | if test "$libtool" = yes; then | |
197 | "$@" "-Wp,-MDupdate,$tmpdepfile" | |
198 | else | |
199 | "$@" -MDupdate "$tmpdepfile" | |
200 | fi | |
201 | stat=$? | |
202 | if test $stat -eq 0; then : | |
203 | else | |
204 | rm -f "$tmpdepfile" | |
205 | exit $stat | |
206 | fi | |
207 | rm -f "$depfile" | |
208 | ||
209 | if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files | |
210 | echo "$object : \\" > "$depfile" | |
211 | ||
212 | # Clip off the initial element (the dependent). Don't try to be | |
213 | # clever and replace this with sed code, as IRIX sed won't handle | |
214 | # lines with more than a fixed number of characters (4096 in | |
215 | # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; | |
216 | # the IRIX cc adds comments like '#:fec' to the end of the | |
217 | # dependency line. | |
218 | tr ' ' "$nl" < "$tmpdepfile" \ | |
219 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ | |
220 | tr "$nl" ' ' >> "$depfile" | |
221 | echo >> "$depfile" | |
222 | ||
223 | # The second pass generates a dummy entry for each header file. | |
224 | tr ' ' "$nl" < "$tmpdepfile" \ | |
225 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ | |
226 | >> "$depfile" | |
227 | else | |
228 | # The sourcefile does not contain any dependencies, so just | |
229 | # store a dummy comment line, to avoid errors with the Makefile | |
230 | # "include basename.Plo" scheme. | |
231 | echo "#dummy" > "$depfile" | |
232 | fi | |
233 | rm -f "$tmpdepfile" | |
234 | ;; | |
235 | ||
236 | xlc) | |
237 | # This case exists only to let depend.m4 do its work. It works by | |
238 | # looking at the text of this script. This case will never be run, | |
239 | # since it is checked for above. | |
240 | exit 1 | |
241 | ;; | |
242 | ||
243 | aix) | |
244 | # The C for AIX Compiler uses -M and outputs the dependencies | |
245 | # in a .u file. In older versions, this file always lives in the | |
246 | # current directory. Also, the AIX compiler puts '$object:' at the | |
247 | # start of each line; $object doesn't have directory information. | |
248 | # Version 6 uses the directory in both cases. | |
249 | dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` | |
250 | test "x$dir" = "x$object" && dir= | |
251 | base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` | |
252 | if test "$libtool" = yes; then | |
253 | tmpdepfile1=$dir$base.u | |
254 | tmpdepfile2=$base.u | |
255 | tmpdepfile3=$dir.libs/$base.u | |
256 | "$@" -Wc,-M | |
257 | else | |
258 | tmpdepfile1=$dir$base.u | |
259 | tmpdepfile2=$dir$base.u | |
260 | tmpdepfile3=$dir$base.u | |
261 | "$@" -M | |
262 | fi | |
263 | stat=$? | |
264 | ||
265 | if test $stat -eq 0; then : | |
266 | else | |
267 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" | |
268 | exit $stat | |
269 | fi | |
270 | ||
271 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" | |
272 | do | |
273 | test -f "$tmpdepfile" && break | |
274 | done | |
275 | if test -f "$tmpdepfile"; then | |
276 | # Each line is of the form 'foo.o: dependent.h'. | |
277 | # Do two passes, one to just change these to | |
278 | # '$object: dependent.h' and one to simply 'dependent.h:'. | |
279 | sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" | |
280 | sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" | |
281 | else | |
282 | # The sourcefile does not contain any dependencies, so just | |
283 | # store a dummy comment line, to avoid errors with the Makefile | |
284 | # "include basename.Plo" scheme. | |
285 | echo "#dummy" > "$depfile" | |
286 | fi | |
287 | rm -f "$tmpdepfile" | |
288 | ;; | |
289 | ||
290 | icc) | |
291 | # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. | |
292 | # However on | |
293 | # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c | |
294 | # ICC 7.0 will fill foo.d with something like | |
295 | # foo.o: sub/foo.c | |
296 | # foo.o: sub/foo.h | |
297 | # which is wrong. We want | |
298 | # sub/foo.o: sub/foo.c | |
299 | # sub/foo.o: sub/foo.h | |
300 | # sub/foo.c: | |
301 | # sub/foo.h: | |
302 | # ICC 7.1 will output | |
303 | # foo.o: sub/foo.c sub/foo.h | |
304 | # and will wrap long lines using '\': | |
305 | # foo.o: sub/foo.c ... \ | |
306 | # sub/foo.h ... \ | |
307 | # ... | |
308 | # tcc 0.9.26 (FIXME still under development at the moment of writing) | |
309 | # will emit a similar output, but also prepend the continuation lines | |
310 | # with horizontal tabulation characters. | |
311 | "$@" -MD -MF "$tmpdepfile" | |
312 | stat=$? | |
313 | if test $stat -eq 0; then : | |
314 | else | |
315 | rm -f "$tmpdepfile" | |
316 | exit $stat | |
317 | fi | |
318 | rm -f "$depfile" | |
319 | # Each line is of the form 'foo.o: dependent.h', | |
320 | # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. | |
321 | # Do two passes, one to just change these to | |
322 | # '$object: dependent.h' and one to simply 'dependent.h:'. | |
323 | sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ | |
324 | < "$tmpdepfile" > "$depfile" | |
325 | sed ' | |
326 | s/[ '"$tab"'][ '"$tab"']*/ /g | |
327 | s/^ *// | |
328 | s/ *\\*$// | |
329 | s/^[^:]*: *// | |
330 | /^$/d | |
331 | /:$/d | |
332 | s/$/ :/ | |
333 | ' < "$tmpdepfile" >> "$depfile" | |
334 | rm -f "$tmpdepfile" | |
335 | ;; | |
336 | ||
337 | hp2) | |
338 | # The "hp" stanza above does not work with aCC (C++) and HP's ia64 | |
339 | # compilers, which have integrated preprocessors. The correct option | |
340 | # to use with these is +Maked; it writes dependencies to a file named | |
341 | # 'foo.d', which lands next to the object file, wherever that | |
342 | # happens to be. | |
343 | # Much of this is similar to the tru64 case; see comments there. | |
344 | dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` | |
345 | test "x$dir" = "x$object" && dir= | |
346 | base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` | |
347 | if test "$libtool" = yes; then | |
348 | tmpdepfile1=$dir$base.d | |
349 | tmpdepfile2=$dir.libs/$base.d | |
350 | "$@" -Wc,+Maked | |
351 | else | |
352 | tmpdepfile1=$dir$base.d | |
353 | tmpdepfile2=$dir$base.d | |
354 | "$@" +Maked | |
355 | fi | |
356 | stat=$? | |
357 | if test $stat -eq 0; then : | |
358 | else | |
359 | rm -f "$tmpdepfile1" "$tmpdepfile2" | |
360 | exit $stat | |
361 | fi | |
362 | ||
363 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" | |
364 | do | |
365 | test -f "$tmpdepfile" && break | |
366 | done | |
367 | if test -f "$tmpdepfile"; then | |
368 | sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" | |
369 | # Add 'dependent.h:' lines. | |
370 | sed -ne '2,${ | |
371 | s/^ *// | |
372 | s/ \\*$// | |
373 | s/$/:/ | |
374 | p | |
375 | }' "$tmpdepfile" >> "$depfile" | |
376 | else | |
377 | echo "#dummy" > "$depfile" | |
378 | fi | |
379 | rm -f "$tmpdepfile" "$tmpdepfile2" | |
380 | ;; | |
381 | ||
382 | tru64) | |
383 | # The Tru64 compiler uses -MD to generate dependencies as a side | |
384 | # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. | |
385 | # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put | |
386 | # dependencies in 'foo.d' instead, so we check for that too. | |
387 | # Subdirectories are respected. | |
388 | dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` | |
389 | test "x$dir" = "x$object" && dir= | |
390 | base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` | |
391 | ||
392 | if test "$libtool" = yes; then | |
393 | # With Tru64 cc, shared objects can also be used to make a | |
394 | # static library. This mechanism is used in libtool 1.4 series to | |
395 | # handle both shared and static libraries in a single compilation. | |
396 | # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. | |
397 | # | |
398 | # With libtool 1.5 this exception was removed, and libtool now | |
399 | # generates 2 separate objects for the 2 libraries. These two | |
400 | # compilations output dependencies in $dir.libs/$base.o.d and | |
401 | # in $dir$base.o.d. We have to check for both files, because | |
402 | # one of the two compilations can be disabled. We should prefer | |
403 | # $dir$base.o.d over $dir.libs/$base.o.d because the latter is | |
404 | # automatically cleaned when .libs/ is deleted, while ignoring | |
405 | # the former would cause a distcleancheck panic. | |
406 | tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 | |
407 | tmpdepfile2=$dir$base.o.d # libtool 1.5 | |
408 | tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 | |
409 | tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 | |
410 | "$@" -Wc,-MD | |
411 | else | |
412 | tmpdepfile1=$dir$base.o.d | |
413 | tmpdepfile2=$dir$base.d | |
414 | tmpdepfile3=$dir$base.d | |
415 | tmpdepfile4=$dir$base.d | |
416 | "$@" -MD | |
417 | fi | |
418 | ||
419 | stat=$? | |
420 | if test $stat -eq 0; then : | |
421 | else | |
422 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" | |
423 | exit $stat | |
424 | fi | |
425 | ||
426 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" | |
427 | do | |
428 | test -f "$tmpdepfile" && break | |
429 | done | |
430 | if test -f "$tmpdepfile"; then | |
431 | sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" | |
432 | sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" | |
433 | else | |
434 | echo "#dummy" > "$depfile" | |
435 | fi | |
436 | rm -f "$tmpdepfile" | |
437 | ;; | |
438 | ||
439 | msvc7) | |
440 | if test "$libtool" = yes; then | |
441 | showIncludes=-Wc,-showIncludes | |
442 | else | |
443 | showIncludes=-showIncludes | |
444 | fi | |
445 | "$@" $showIncludes > "$tmpdepfile" | |
446 | stat=$? | |
447 | grep -v '^Note: including file: ' "$tmpdepfile" | |
448 | if test "$stat" = 0; then : | |
449 | else | |
450 | rm -f "$tmpdepfile" | |
451 | exit $stat | |
452 | fi | |
453 | rm -f "$depfile" | |
454 | echo "$object : \\" > "$depfile" | |
455 | # The first sed program below extracts the file names and escapes | |
456 | # backslashes for cygpath. The second sed program outputs the file | |
457 | # name when reading, but also accumulates all include files in the | |
458 | # hold buffer in order to output them again at the end. This only | |
459 | # works with sed implementations that can handle large buffers. | |
460 | sed < "$tmpdepfile" -n ' | |
461 | /^Note: including file: *\(.*\)/ { | |
462 | s//\1/ | |
463 | s/\\/\\\\/g | |
464 | p | |
465 | }' | $cygpath_u | sort -u | sed -n ' | |
466 | s/ /\\ /g | |
467 | s/\(.*\)/'"$tab"'\1 \\/p | |
468 | s/.\(.*\) \\/\1:/ | |
469 | H | |
470 | $ { | |
471 | s/.*/'"$tab"'/ | |
472 | G | |
473 | p | |
474 | }' >> "$depfile" | |
475 | rm -f "$tmpdepfile" | |
476 | ;; | |
477 | ||
478 | msvc7msys) | |
479 | # This case exists only to let depend.m4 do its work. It works by | |
480 | # looking at the text of this script. This case will never be run, | |
481 | # since it is checked for above. | |
482 | exit 1 | |
483 | ;; | |
484 | ||
485 | #nosideeffect) | |
486 | # This comment above is used by automake to tell side-effect | |
487 | # dependency tracking mechanisms from slower ones. | |
488 | ||
489 | dashmstdout) | |
490 | # Important note: in order to support this mode, a compiler *must* | |
491 | # always write the preprocessed file to stdout, regardless of -o. | |
492 | "$@" || exit $? | |
493 | ||
494 | # Remove the call to Libtool. | |
495 | if test "$libtool" = yes; then | |
496 | while test "X$1" != 'X--mode=compile'; do | |
497 | shift | |
498 | done | |
499 | shift | |
500 | fi | |
501 | ||
502 | # Remove '-o $object'. | |
503 | IFS=" " | |
504 | for arg | |
505 | do | |
506 | case $arg in | |
507 | -o) | |
508 | shift | |
509 | ;; | |
510 | $object) | |
511 | shift | |
512 | ;; | |
513 | *) | |
514 | set fnord "$@" "$arg" | |
515 | shift # fnord | |
516 | shift # $arg | |
517 | ;; | |
518 | esac | |
519 | done | |
520 | ||
521 | test -z "$dashmflag" && dashmflag=-M | |
522 | # Require at least two characters before searching for ':' | |
523 | # in the target name. This is to cope with DOS-style filenames: | |
524 | # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. | |
525 | "$@" $dashmflag | | |
526 | sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" | |
527 | rm -f "$depfile" | |
528 | cat < "$tmpdepfile" > "$depfile" | |
529 | tr ' ' "$nl" < "$tmpdepfile" | \ | |
530 | ## Some versions of the HPUX 10.20 sed can't process this invocation | |
531 | ## correctly. Breaking it into two sed invocations is a workaround. | |
532 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" | |
533 | rm -f "$tmpdepfile" | |
534 | ;; | |
535 | ||
536 | dashXmstdout) | |
537 | # This case only exists to satisfy depend.m4. It is never actually | |
538 | # run, as this mode is specially recognized in the preamble. | |
539 | exit 1 | |
540 | ;; | |
541 | ||
542 | makedepend) | |
543 | "$@" || exit $? | |
544 | # Remove any Libtool call | |
545 | if test "$libtool" = yes; then | |
546 | while test "X$1" != 'X--mode=compile'; do | |
547 | shift | |
548 | done | |
549 | shift | |
550 | fi | |
551 | # X makedepend | |
552 | shift | |
553 | cleared=no eat=no | |
554 | for arg | |
555 | do | |
556 | case $cleared in | |
557 | no) | |
558 | set ""; shift | |
559 | cleared=yes ;; | |
560 | esac | |
561 | if test $eat = yes; then | |
562 | eat=no | |
563 | continue | |
564 | fi | |
565 | case "$arg" in | |
566 | -D*|-I*) | |
567 | set fnord "$@" "$arg"; shift ;; | |
568 | # Strip any option that makedepend may not understand. Remove | |
569 | # the object too, otherwise makedepend will parse it as a source file. | |
570 | -arch) | |
571 | eat=yes ;; | |
572 | -*|$object) | |
573 | ;; | |
574 | *) | |
575 | set fnord "$@" "$arg"; shift ;; | |
576 | esac | |
577 | done | |
578 | obj_suffix=`echo "$object" | sed 's/^.*\././'` | |
579 | touch "$tmpdepfile" | |
580 | ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" | |
581 | rm -f "$depfile" | |
582 | # makedepend may prepend the VPATH from the source file name to the object. | |
583 | # No need to regex-escape $object, excess matching of '.' is harmless. | |
584 | sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" | |
585 | sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ | |
586 | ## Some versions of the HPUX 10.20 sed can't process this invocation | |
587 | ## correctly. Breaking it into two sed invocations is a workaround. | |
588 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" | |
589 | rm -f "$tmpdepfile" "$tmpdepfile".bak | |
590 | ;; | |
591 | ||
592 | cpp) | |
593 | # Important note: in order to support this mode, a compiler *must* | |
594 | # always write the preprocessed file to stdout. | |
595 | "$@" || exit $? | |
596 | ||
597 | # Remove the call to Libtool. | |
598 | if test "$libtool" = yes; then | |
599 | while test "X$1" != 'X--mode=compile'; do | |
600 | shift | |
601 | done | |
602 | shift | |
603 | fi | |
604 | ||
605 | # Remove '-o $object'. | |
606 | IFS=" " | |
607 | for arg | |
608 | do | |
609 | case $arg in | |
610 | -o) | |
611 | shift | |
612 | ;; | |
613 | $object) | |
614 | shift | |
615 | ;; | |
616 | *) | |
617 | set fnord "$@" "$arg" | |
618 | shift # fnord | |
619 | shift # $arg | |
620 | ;; | |
621 | esac | |
622 | done | |
623 | ||
624 | "$@" -E | | |
625 | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | |
626 | -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | | |
627 | sed '$ s: \\$::' > "$tmpdepfile" | |
628 | rm -f "$depfile" | |
629 | echo "$object : \\" > "$depfile" | |
630 | cat < "$tmpdepfile" >> "$depfile" | |
631 | sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" | |
632 | rm -f "$tmpdepfile" | |
633 | ;; | |
634 | ||
635 | msvisualcpp) | |
636 | # Important note: in order to support this mode, a compiler *must* | |
637 | # always write the preprocessed file to stdout. | |
638 | "$@" || exit $? | |
639 | ||
640 | # Remove the call to Libtool. | |
641 | if test "$libtool" = yes; then | |
642 | while test "X$1" != 'X--mode=compile'; do | |
643 | shift | |
644 | done | |
645 | shift | |
646 | fi | |
647 | ||
648 | IFS=" " | |
649 | for arg | |
650 | do | |
651 | case "$arg" in | |
652 | -o) | |
653 | shift | |
654 | ;; | |
655 | $object) | |
656 | shift | |
657 | ;; | |
658 | "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") | |
659 | set fnord "$@" | |
660 | shift | |
661 | shift | |
662 | ;; | |
663 | *) | |
664 | set fnord "$@" "$arg" | |
665 | shift | |
666 | shift | |
667 | ;; | |
668 | esac | |
669 | done | |
670 | "$@" -E 2>/dev/null | | |
671 | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" | |
672 | rm -f "$depfile" | |
673 | echo "$object : \\" > "$depfile" | |
674 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" | |
675 | echo "$tab" >> "$depfile" | |
676 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" | |
677 | rm -f "$tmpdepfile" | |
678 | ;; | |
679 | ||
680 | msvcmsys) | |
681 | # This case exists only to let depend.m4 do its work. It works by | |
682 | # looking at the text of this script. This case will never be run, | |
683 | # since it is checked for above. | |
684 | exit 1 | |
685 | ;; | |
686 | ||
687 | none) | |
688 | exec "$@" | |
689 | ;; | |
690 | ||
691 | *) | |
692 | echo "Unknown depmode $depmode" 1>&2 | |
693 | exit 1 | |
694 | ;; | |
695 | esac | |
696 | ||
697 | exit 0 | |
698 | ||
699 | # Local Variables: | |
700 | # mode: shell-script | |
701 | # sh-indentation: 2 | |
702 | # eval: (add-hook 'write-file-hooks 'time-stamp) | |
703 | # time-stamp-start: "scriptversion=" | |
704 | # time-stamp-format: "%:y-%02m-%02d.%02H" | |
705 | # time-stamp-time-zone: "UTC" | |
706 | # time-stamp-end: "; # UTC" | |
707 | # End: |
0 | #!/bin/sh | |
1 | # install - install a program, script, or datafile | |
2 | ||
3 | scriptversion=2011-01-19.21; # UTC | |
4 | ||
5 | # This originates from X11R5 (mit/util/scripts/install.sh), which was | |
6 | # later released in X11R6 (xc/config/util/install.sh) with the | |
7 | # following copyright and license. | |
8 | # | |
9 | # Copyright (C) 1994 X Consortium | |
10 | # | |
11 | # Permission is hereby granted, free of charge, to any person obtaining a copy | |
12 | # of this software and associated documentation files (the "Software"), to | |
13 | # deal in the Software without restriction, including without limitation the | |
14 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
15 | # sell copies of the Software, and to permit persons to whom the Software is | |
16 | # furnished to do so, subject to the following conditions: | |
17 | # | |
18 | # The above copyright notice and this permission notice shall be included in | |
19 | # all copies or substantial portions of the Software. | |
20 | # | |
21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
22 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
23 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
24 | # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |
25 | # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- | |
26 | # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
27 | # | |
28 | # Except as contained in this notice, the name of the X Consortium shall not | |
29 | # be used in advertising or otherwise to promote the sale, use or other deal- | |
30 | # ings in this Software without prior written authorization from the X Consor- | |
31 | # tium. | |
32 | # | |
33 | # | |
34 | # FSF changes to this file are in the public domain. | |
35 | # | |
36 | # Calling this script install-sh is preferred over install.sh, to prevent | |
37 | # `make' implicit rules from creating a file called install from it | |
38 | # when there is no Makefile. | |
39 | # | |
40 | # This script is compatible with the BSD install script, but was written | |
41 | # from scratch. | |
42 | ||
43 | nl=' | |
44 | ' | |
45 | IFS=" "" $nl" | |
46 | ||
47 | # set DOITPROG to echo to test this script | |
48 | ||
49 | # Don't use :- since 4.3BSD and earlier shells don't like it. | |
50 | doit=${DOITPROG-} | |
51 | if test -z "$doit"; then | |
52 | doit_exec=exec | |
53 | else | |
54 | doit_exec=$doit | |
55 | fi | |
56 | ||
57 | # Put in absolute file names if you don't have them in your path; | |
58 | # or use environment vars. | |
59 | ||
60 | chgrpprog=${CHGRPPROG-chgrp} | |
61 | chmodprog=${CHMODPROG-chmod} | |
62 | chownprog=${CHOWNPROG-chown} | |
63 | cmpprog=${CMPPROG-cmp} | |
64 | cpprog=${CPPROG-cp} | |
65 | mkdirprog=${MKDIRPROG-mkdir} | |
66 | mvprog=${MVPROG-mv} | |
67 | rmprog=${RMPROG-rm} | |
68 | stripprog=${STRIPPROG-strip} | |
69 | ||
70 | posix_glob='?' | |
71 | initialize_posix_glob=' | |
72 | test "$posix_glob" != "?" || { | |
73 | if (set -f) 2>/dev/null; then | |
74 | posix_glob= | |
75 | else | |
76 | posix_glob=: | |
77 | fi | |
78 | } | |
79 | ' | |
80 | ||
81 | posix_mkdir= | |
82 | ||
83 | # Desired mode of installed file. | |
84 | mode=0755 | |
85 | ||
86 | chgrpcmd= | |
87 | chmodcmd=$chmodprog | |
88 | chowncmd= | |
89 | mvcmd=$mvprog | |
90 | rmcmd="$rmprog -f" | |
91 | stripcmd= | |
92 | ||
93 | src= | |
94 | dst= | |
95 | dir_arg= | |
96 | dst_arg= | |
97 | ||
98 | copy_on_change=false | |
99 | no_target_directory= | |
100 | ||
101 | usage="\ | |
102 | Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE | |
103 | or: $0 [OPTION]... SRCFILES... DIRECTORY | |
104 | or: $0 [OPTION]... -t DIRECTORY SRCFILES... | |
105 | or: $0 [OPTION]... -d DIRECTORIES... | |
106 | ||
107 | In the 1st form, copy SRCFILE to DSTFILE. | |
108 | In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. | |
109 | In the 4th, create DIRECTORIES. | |
110 | ||
111 | Options: | |
112 | --help display this help and exit. | |
113 | --version display version info and exit. | |
114 | ||
115 | -c (ignored) | |
116 | -C install only if different (preserve the last data modification time) | |
117 | -d create directories instead of installing files. | |
118 | -g GROUP $chgrpprog installed files to GROUP. | |
119 | -m MODE $chmodprog installed files to MODE. | |
120 | -o USER $chownprog installed files to USER. | |
121 | -s $stripprog installed files. | |
122 | -t DIRECTORY install into DIRECTORY. | |
123 | -T report an error if DSTFILE is a directory. | |
124 | ||
125 | Environment variables override the default commands: | |
126 | CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG | |
127 | RMPROG STRIPPROG | |
128 | " | |
129 | ||
130 | while test $# -ne 0; do | |
131 | case $1 in | |
132 | -c) ;; | |
133 | ||
134 | -C) copy_on_change=true;; | |
135 | ||
136 | -d) dir_arg=true;; | |
137 | ||
138 | -g) chgrpcmd="$chgrpprog $2" | |
139 | shift;; | |
140 | ||
141 | --help) echo "$usage"; exit $?;; | |
142 | ||
143 | -m) mode=$2 | |
144 | case $mode in | |
145 | *' '* | *' '* | *' | |
146 | '* | *'*'* | *'?'* | *'['*) | |
147 | echo "$0: invalid mode: $mode" >&2 | |
148 | exit 1;; | |
149 | esac | |
150 | shift;; | |
151 | ||
152 | -o) chowncmd="$chownprog $2" | |
153 | shift;; | |
154 | ||
155 | -s) stripcmd=$stripprog;; | |
156 | ||
157 | -t) dst_arg=$2 | |
158 | # Protect names problematic for `test' and other utilities. | |
159 | case $dst_arg in | |
160 | -* | [=\(\)!]) dst_arg=./$dst_arg;; | |
161 | esac | |
162 | shift;; | |
163 | ||
164 | -T) no_target_directory=true;; | |
165 | ||
166 | --version) echo "$0 $scriptversion"; exit $?;; | |
167 | ||
168 | --) shift | |
169 | break;; | |
170 | ||
171 | -*) echo "$0: invalid option: $1" >&2 | |
172 | exit 1;; | |
173 | ||
174 | *) break;; | |
175 | esac | |
176 | shift | |
177 | done | |
178 | ||
179 | if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then | |
180 | # When -d is used, all remaining arguments are directories to create. | |
181 | # When -t is used, the destination is already specified. | |
182 | # Otherwise, the last argument is the destination. Remove it from $@. | |
183 | for arg | |
184 | do | |
185 | if test -n "$dst_arg"; then | |
186 | # $@ is not empty: it contains at least $arg. | |
187 | set fnord "$@" "$dst_arg" | |
188 | shift # fnord | |
189 | fi | |
190 | shift # arg | |
191 | dst_arg=$arg | |
192 | # Protect names problematic for `test' and other utilities. | |
193 | case $dst_arg in | |
194 | -* | [=\(\)!]) dst_arg=./$dst_arg;; | |
195 | esac | |
196 | done | |
197 | fi | |
198 | ||
199 | if test $# -eq 0; then | |
200 | if test -z "$dir_arg"; then | |
201 | echo "$0: no input file specified." >&2 | |
202 | exit 1 | |
203 | fi | |
204 | # It's OK to call `install-sh -d' without argument. | |
205 | # This can happen when creating conditional directories. | |
206 | exit 0 | |
207 | fi | |
208 | ||
209 | if test -z "$dir_arg"; then | |
210 | do_exit='(exit $ret); exit $ret' | |
211 | trap "ret=129; $do_exit" 1 | |
212 | trap "ret=130; $do_exit" 2 | |
213 | trap "ret=141; $do_exit" 13 | |
214 | trap "ret=143; $do_exit" 15 | |
215 | ||
216 | # Set umask so as not to create temps with too-generous modes. | |
217 | # However, 'strip' requires both read and write access to temps. | |
218 | case $mode in | |
219 | # Optimize common cases. | |
220 | *644) cp_umask=133;; | |
221 | *755) cp_umask=22;; | |
222 | ||
223 | *[0-7]) | |
224 | if test -z "$stripcmd"; then | |
225 | u_plus_rw= | |
226 | else | |
227 | u_plus_rw='% 200' | |
228 | fi | |
229 | cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; | |
230 | *) | |
231 | if test -z "$stripcmd"; then | |
232 | u_plus_rw= | |
233 | else | |
234 | u_plus_rw=,u+rw | |
235 | fi | |
236 | cp_umask=$mode$u_plus_rw;; | |
237 | esac | |
238 | fi | |
239 | ||
240 | for src | |
241 | do | |
242 | # Protect names problematic for `test' and other utilities. | |
243 | case $src in | |
244 | -* | [=\(\)!]) src=./$src;; | |
245 | esac | |
246 | ||
247 | if test -n "$dir_arg"; then | |
248 | dst=$src | |
249 | dstdir=$dst | |
250 | test -d "$dstdir" | |
251 | dstdir_status=$? | |
252 | else | |
253 | ||
254 | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command | |
255 | # might cause directories to be created, which would be especially bad | |
256 | # if $src (and thus $dsttmp) contains '*'. | |
257 | if test ! -f "$src" && test ! -d "$src"; then | |
258 | echo "$0: $src does not exist." >&2 | |
259 | exit 1 | |
260 | fi | |
261 | ||
262 | if test -z "$dst_arg"; then | |
263 | echo "$0: no destination specified." >&2 | |
264 | exit 1 | |
265 | fi | |
266 | dst=$dst_arg | |
267 | ||
268 | # If destination is a directory, append the input filename; won't work | |
269 | # if double slashes aren't ignored. | |
270 | if test -d "$dst"; then | |
271 | if test -n "$no_target_directory"; then | |
272 | echo "$0: $dst_arg: Is a directory" >&2 | |
273 | exit 1 | |
274 | fi | |
275 | dstdir=$dst | |
276 | dst=$dstdir/`basename "$src"` | |
277 | dstdir_status=0 | |
278 | else | |
279 | # Prefer dirname, but fall back on a substitute if dirname fails. | |
280 | dstdir=` | |
281 | (dirname "$dst") 2>/dev/null || | |
282 | expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
283 | X"$dst" : 'X\(//\)[^/]' \| \ | |
284 | X"$dst" : 'X\(//\)$' \| \ | |
285 | X"$dst" : 'X\(/\)' \| . 2>/dev/null || | |
286 | echo X"$dst" | | |
287 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
288 | s//\1/ | |
289 | q | |
290 | } | |
291 | /^X\(\/\/\)[^/].*/{ | |
292 | s//\1/ | |
293 | q | |
294 | } | |
295 | /^X\(\/\/\)$/{ | |
296 | s//\1/ | |
297 | q | |
298 | } | |
299 | /^X\(\/\).*/{ | |
300 | s//\1/ | |
301 | q | |
302 | } | |
303 | s/.*/./; q' | |
304 | ` | |
305 | ||
306 | test -d "$dstdir" | |
307 | dstdir_status=$? | |
308 | fi | |
309 | fi | |
310 | ||
311 | obsolete_mkdir_used=false | |
312 | ||
313 | if test $dstdir_status != 0; then | |
314 | case $posix_mkdir in | |
315 | '') | |
316 | # Create intermediate dirs using mode 755 as modified by the umask. | |
317 | # This is like FreeBSD 'install' as of 1997-10-28. | |
318 | umask=`umask` | |
319 | case $stripcmd.$umask in | |
320 | # Optimize common cases. | |
321 | *[2367][2367]) mkdir_umask=$umask;; | |
322 | .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; | |
323 | ||
324 | *[0-7]) | |
325 | mkdir_umask=`expr $umask + 22 \ | |
326 | - $umask % 100 % 40 + $umask % 20 \ | |
327 | - $umask % 10 % 4 + $umask % 2 | |
328 | `;; | |
329 | *) mkdir_umask=$umask,go-w;; | |
330 | esac | |
331 | ||
332 | # With -d, create the new directory with the user-specified mode. | |
333 | # Otherwise, rely on $mkdir_umask. | |
334 | if test -n "$dir_arg"; then | |
335 | mkdir_mode=-m$mode | |
336 | else | |
337 | mkdir_mode= | |
338 | fi | |
339 | ||
340 | posix_mkdir=false | |
341 | case $umask in | |
342 | *[123567][0-7][0-7]) | |
343 | # POSIX mkdir -p sets u+wx bits regardless of umask, which | |
344 | # is incompatible with FreeBSD 'install' when (umask & 300) != 0. | |
345 | ;; | |
346 | *) | |
347 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ | |
348 | trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 | |
349 | ||
350 | if (umask $mkdir_umask && | |
351 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 | |
352 | then | |
353 | if test -z "$dir_arg" || { | |
354 | # Check for POSIX incompatibilities with -m. | |
355 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or | |
356 | # other-writeable bit of parent directory when it shouldn't. | |
357 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. | |
358 | ls_ld_tmpdir=`ls -ld "$tmpdir"` | |
359 | case $ls_ld_tmpdir in | |
360 | d????-?r-*) different_mode=700;; | |
361 | d????-?--*) different_mode=755;; | |
362 | *) false;; | |
363 | esac && | |
364 | $mkdirprog -m$different_mode -p -- "$tmpdir" && { | |
365 | ls_ld_tmpdir_1=`ls -ld "$tmpdir"` | |
366 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" | |
367 | } | |
368 | } | |
369 | then posix_mkdir=: | |
370 | fi | |
371 | rmdir "$tmpdir/d" "$tmpdir" | |
372 | else | |
373 | # Remove any dirs left behind by ancient mkdir implementations. | |
374 | rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null | |
375 | fi | |
376 | trap '' 0;; | |
377 | esac;; | |
378 | esac | |
379 | ||
380 | if | |
381 | $posix_mkdir && ( | |
382 | umask $mkdir_umask && | |
383 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" | |
384 | ) | |
385 | then : | |
386 | else | |
387 | ||
388 | # The umask is ridiculous, or mkdir does not conform to POSIX, | |
389 | # or it failed possibly due to a race condition. Create the | |
390 | # directory the slow way, step by step, checking for races as we go. | |
391 | ||
392 | case $dstdir in | |
393 | /*) prefix='/';; | |
394 | [-=\(\)!]*) prefix='./';; | |
395 | *) prefix='';; | |
396 | esac | |
397 | ||
398 | eval "$initialize_posix_glob" | |
399 | ||
400 | oIFS=$IFS | |
401 | IFS=/ | |
402 | $posix_glob set -f | |
403 | set fnord $dstdir | |
404 | shift | |
405 | $posix_glob set +f | |
406 | IFS=$oIFS | |
407 | ||
408 | prefixes= | |
409 | ||
410 | for d | |
411 | do | |
412 | test X"$d" = X && continue | |
413 | ||
414 | prefix=$prefix$d | |
415 | if test -d "$prefix"; then | |
416 | prefixes= | |
417 | else | |
418 | if $posix_mkdir; then | |
419 | (umask=$mkdir_umask && | |
420 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break | |
421 | # Don't fail if two instances are running concurrently. | |
422 | test -d "$prefix" || exit 1 | |
423 | else | |
424 | case $prefix in | |
425 | *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; | |
426 | *) qprefix=$prefix;; | |
427 | esac | |
428 | prefixes="$prefixes '$qprefix'" | |
429 | fi | |
430 | fi | |
431 | prefix=$prefix/ | |
432 | done | |
433 | ||
434 | if test -n "$prefixes"; then | |
435 | # Don't fail if two instances are running concurrently. | |
436 | (umask $mkdir_umask && | |
437 | eval "\$doit_exec \$mkdirprog $prefixes") || | |
438 | test -d "$dstdir" || exit 1 | |
439 | obsolete_mkdir_used=true | |
440 | fi | |
441 | fi | |
442 | fi | |
443 | ||
444 | if test -n "$dir_arg"; then | |
445 | { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && | |
446 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && | |
447 | { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || | |
448 | test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 | |
449 | else | |
450 | ||
451 | # Make a couple of temp file names in the proper directory. | |
452 | dsttmp=$dstdir/_inst.$$_ | |
453 | rmtmp=$dstdir/_rm.$$_ | |
454 | ||
455 | # Trap to clean up those temp files at exit. | |
456 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 | |
457 | ||
458 | # Copy the file name to the temp name. | |
459 | (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && | |
460 | ||
461 | # and set any options; do chmod last to preserve setuid bits. | |
462 | # | |
463 | # If any of these fail, we abort the whole thing. If we want to | |
464 | # ignore errors from any of these, just make sure not to ignore | |
465 | # errors from the above "$doit $cpprog $src $dsttmp" command. | |
466 | # | |
467 | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && | |
468 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && | |
469 | { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && | |
470 | { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && | |
471 | ||
472 | # If -C, don't bother to copy if it wouldn't change the file. | |
473 | if $copy_on_change && | |
474 | old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && | |
475 | new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && | |
476 | ||
477 | eval "$initialize_posix_glob" && | |
478 | $posix_glob set -f && | |
479 | set X $old && old=:$2:$4:$5:$6 && | |
480 | set X $new && new=:$2:$4:$5:$6 && | |
481 | $posix_glob set +f && | |
482 | ||
483 | test "$old" = "$new" && | |
484 | $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 | |
485 | then | |
486 | rm -f "$dsttmp" | |
487 | else | |
488 | # Rename the file to the real destination. | |
489 | $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || | |
490 | ||
491 | # The rename failed, perhaps because mv can't rename something else | |
492 | # to itself, or perhaps because mv is so ancient that it does not | |
493 | # support -f. | |
494 | { | |
495 | # Now remove or move aside any old file at destination location. | |
496 | # We try this two ways since rm can't unlink itself on some | |
497 | # systems and the destination file might be busy for other | |
498 | # reasons. In this case, the final cleanup might fail but the new | |
499 | # file should still install successfully. | |
500 | { | |
501 | test ! -f "$dst" || | |
502 | $doit $rmcmd -f "$dst" 2>/dev/null || | |
503 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && | |
504 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } | |
505 | } || | |
506 | { echo "$0: cannot unlink or rename $dst" >&2 | |
507 | (exit 1); exit 1 | |
508 | } | |
509 | } && | |
510 | ||
511 | # Now rename the file to the real destination. | |
512 | $doit $mvcmd "$dsttmp" "$dst" | |
513 | } | |
514 | fi || exit 1 | |
515 | ||
516 | trap '' 0 | |
517 | fi | |
518 | done | |
519 | ||
520 | # Local variables: | |
521 | # eval: (add-hook 'write-file-hooks 'time-stamp) | |
522 | # time-stamp-start: "scriptversion=" | |
523 | # time-stamp-format: "%:y-%02m-%02d.%02H" | |
524 | # time-stamp-time-zone: "UTC" | |
525 | # time-stamp-end: "; # UTC" | |
526 | # End: |
0 | #! /bin/sh | |
1 | # Common stub for a few missing GNU programs while installing. | |
2 | ||
3 | scriptversion=2012-01-06.13; # UTC | |
4 | ||
5 | # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, | |
6 | # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. | |
7 | # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. | |
8 | ||
9 | # This program is free software; you can redistribute it and/or modify | |
10 | # it under the terms of the GNU General Public License as published by | |
11 | # the Free Software Foundation; either version 2, or (at your option) | |
12 | # any later version. | |
13 | ||
14 | # This program is distributed in the hope that it will be useful, | |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | # GNU General Public License for more details. | |
18 | ||
19 | # You should have received a copy of the GNU General Public License | |
20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
21 | ||
22 | # As a special exception to the GNU General Public License, if you | |
23 | # distribute this file as part of a program that contains a | |
24 | # configuration script generated by Autoconf, you may include it under | |
25 | # the same distribution terms that you use for the rest of that program. | |
26 | ||
27 | if test $# -eq 0; then | |
28 | echo 1>&2 "Try \`$0 --help' for more information" | |
29 | exit 1 | |
30 | fi | |
31 | ||
32 | run=: | |
33 | sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' | |
34 | sed_minuso='s/.* -o \([^ ]*\).*/\1/p' | |
35 | ||
36 | # In the cases where this matters, `missing' is being run in the | |
37 | # srcdir already. | |
38 | if test -f configure.ac; then | |
39 | configure_ac=configure.ac | |
40 | else | |
41 | configure_ac=configure.in | |
42 | fi | |
43 | ||
44 | msg="missing on your system" | |
45 | ||
46 | case $1 in | |
47 | --run) | |
48 | # Try to run requested program, and just exit if it succeeds. | |
49 | run= | |
50 | shift | |
51 | "$@" && exit 0 | |
52 | # Exit code 63 means version mismatch. This often happens | |
53 | # when the user try to use an ancient version of a tool on | |
54 | # a file that requires a minimum version. In this case we | |
55 | # we should proceed has if the program had been absent, or | |
56 | # if --run hadn't been passed. | |
57 | if test $? = 63; then | |
58 | run=: | |
59 | msg="probably too old" | |
60 | fi | |
61 | ;; | |
62 | ||
63 | -h|--h|--he|--hel|--help) | |
64 | echo "\ | |
65 | $0 [OPTION]... PROGRAM [ARGUMENT]... | |
66 | ||
67 | Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an | |
68 | error status if there is no known handling for PROGRAM. | |
69 | ||
70 | Options: | |
71 | -h, --help display this help and exit | |
72 | -v, --version output version information and exit | |
73 | --run try to run the given command, and emulate it if it fails | |
74 | ||
75 | Supported PROGRAM values: | |
76 | aclocal touch file \`aclocal.m4' | |
77 | autoconf touch file \`configure' | |
78 | autoheader touch file \`config.h.in' | |
79 | autom4te touch the output file, or create a stub one | |
80 | automake touch all \`Makefile.in' files | |
81 | bison create \`y.tab.[ch]', if possible, from existing .[ch] | |
82 | flex create \`lex.yy.c', if possible, from existing .c | |
83 | help2man touch the output file | |
84 | lex create \`lex.yy.c', if possible, from existing .c | |
85 | makeinfo touch the output file | |
86 | yacc create \`y.tab.[ch]', if possible, from existing .[ch] | |
87 | ||
88 | Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and | |
89 | \`g' are ignored when checking the name. | |
90 | ||
91 | Send bug reports to <bug-automake@gnu.org>." | |
92 | exit $? | |
93 | ;; | |
94 | ||
95 | -v|--v|--ve|--ver|--vers|--versi|--versio|--version) | |
96 | echo "missing $scriptversion (GNU Automake)" | |
97 | exit $? | |
98 | ;; | |
99 | ||
100 | -*) | |
101 | echo 1>&2 "$0: Unknown \`$1' option" | |
102 | echo 1>&2 "Try \`$0 --help' for more information" | |
103 | exit 1 | |
104 | ;; | |
105 | ||
106 | esac | |
107 | ||
108 | # normalize program name to check for. | |
109 | program=`echo "$1" | sed ' | |
110 | s/^gnu-//; t | |
111 | s/^gnu//; t | |
112 | s/^g//; t'` | |
113 | ||
114 | # Now exit if we have it, but it failed. Also exit now if we | |
115 | # don't have it and --version was passed (most likely to detect | |
116 | # the program). This is about non-GNU programs, so use $1 not | |
117 | # $program. | |
118 | case $1 in | |
119 | lex*|yacc*) | |
120 | # Not GNU programs, they don't have --version. | |
121 | ;; | |
122 | ||
123 | *) | |
124 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | |
125 | # We have it, but it failed. | |
126 | exit 1 | |
127 | elif test "x$2" = "x--version" || test "x$2" = "x--help"; then | |
128 | # Could not run --version or --help. This is probably someone | |
129 | # running `$TOOL --version' or `$TOOL --help' to check whether | |
130 | # $TOOL exists and not knowing $TOOL uses missing. | |
131 | exit 1 | |
132 | fi | |
133 | ;; | |
134 | esac | |
135 | ||
136 | # If it does not exist, or fails to run (possibly an outdated version), | |
137 | # try to emulate it. | |
138 | case $program in | |
139 | aclocal*) | |
140 | echo 1>&2 "\ | |
141 | WARNING: \`$1' is $msg. You should only need it if | |
142 | you modified \`acinclude.m4' or \`${configure_ac}'. You might want | |
143 | to install the \`Automake' and \`Perl' packages. Grab them from | |
144 | any GNU archive site." | |
145 | touch aclocal.m4 | |
146 | ;; | |
147 | ||
148 | autoconf*) | |
149 | echo 1>&2 "\ | |
150 | WARNING: \`$1' is $msg. You should only need it if | |
151 | you modified \`${configure_ac}'. You might want to install the | |
152 | \`Autoconf' and \`GNU m4' packages. Grab them from any GNU | |
153 | archive site." | |
154 | touch configure | |
155 | ;; | |
156 | ||
157 | autoheader*) | |
158 | echo 1>&2 "\ | |
159 | WARNING: \`$1' is $msg. You should only need it if | |
160 | you modified \`acconfig.h' or \`${configure_ac}'. You might want | |
161 | to install the \`Autoconf' and \`GNU m4' packages. Grab them | |
162 | from any GNU archive site." | |
163 | files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` | |
164 | test -z "$files" && files="config.h" | |
165 | touch_files= | |
166 | for f in $files; do | |
167 | case $f in | |
168 | *:*) touch_files="$touch_files "`echo "$f" | | |
169 | sed -e 's/^[^:]*://' -e 's/:.*//'`;; | |
170 | *) touch_files="$touch_files $f.in";; | |
171 | esac | |
172 | done | |
173 | touch $touch_files | |
174 | ;; | |
175 | ||
176 | automake*) | |
177 | echo 1>&2 "\ | |
178 | WARNING: \`$1' is $msg. You should only need it if | |
179 | you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. | |
180 | You might want to install the \`Automake' and \`Perl' packages. | |
181 | Grab them from any GNU archive site." | |
182 | find . -type f -name Makefile.am -print | | |
183 | sed 's/\.am$/.in/' | | |
184 | while read f; do touch "$f"; done | |
185 | ;; | |
186 | ||
187 | autom4te*) | |
188 | echo 1>&2 "\ | |
189 | WARNING: \`$1' is needed, but is $msg. | |
190 | You might have modified some files without having the | |
191 | proper tools for further handling them. | |
192 | You can get \`$1' as part of \`Autoconf' from any GNU | |
193 | archive site." | |
194 | ||
195 | file=`echo "$*" | sed -n "$sed_output"` | |
196 | test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` | |
197 | if test -f "$file"; then | |
198 | touch $file | |
199 | else | |
200 | test -z "$file" || exec >$file | |
201 | echo "#! /bin/sh" | |
202 | echo "# Created by GNU Automake missing as a replacement of" | |
203 | echo "# $ $@" | |
204 | echo "exit 0" | |
205 | chmod +x $file | |
206 | exit 1 | |
207 | fi | |
208 | ;; | |
209 | ||
210 | bison*|yacc*) | |
211 | echo 1>&2 "\ | |
212 | WARNING: \`$1' $msg. You should only need it if | |
213 | you modified a \`.y' file. You may need the \`Bison' package | |
214 | in order for those modifications to take effect. You can get | |
215 | \`Bison' from any GNU archive site." | |
216 | rm -f y.tab.c y.tab.h | |
217 | if test $# -ne 1; then | |
218 | eval LASTARG=\${$#} | |
219 | case $LASTARG in | |
220 | *.y) | |
221 | SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` | |
222 | if test -f "$SRCFILE"; then | |
223 | cp "$SRCFILE" y.tab.c | |
224 | fi | |
225 | SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` | |
226 | if test -f "$SRCFILE"; then | |
227 | cp "$SRCFILE" y.tab.h | |
228 | fi | |
229 | ;; | |
230 | esac | |
231 | fi | |
232 | if test ! -f y.tab.h; then | |
233 | echo >y.tab.h | |
234 | fi | |
235 | if test ! -f y.tab.c; then | |
236 | echo 'main() { return 0; }' >y.tab.c | |
237 | fi | |
238 | ;; | |
239 | ||
240 | lex*|flex*) | |
241 | echo 1>&2 "\ | |
242 | WARNING: \`$1' is $msg. You should only need it if | |
243 | you modified a \`.l' file. You may need the \`Flex' package | |
244 | in order for those modifications to take effect. You can get | |
245 | \`Flex' from any GNU archive site." | |
246 | rm -f lex.yy.c | |
247 | if test $# -ne 1; then | |
248 | eval LASTARG=\${$#} | |
249 | case $LASTARG in | |
250 | *.l) | |
251 | SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` | |
252 | if test -f "$SRCFILE"; then | |
253 | cp "$SRCFILE" lex.yy.c | |
254 | fi | |
255 | ;; | |
256 | esac | |
257 | fi | |
258 | if test ! -f lex.yy.c; then | |
259 | echo 'main() { return 0; }' >lex.yy.c | |
260 | fi | |
261 | ;; | |
262 | ||
263 | help2man*) | |
264 | echo 1>&2 "\ | |
265 | WARNING: \`$1' is $msg. You should only need it if | |
266 | you modified a dependency of a manual page. You may need the | |
267 | \`Help2man' package in order for those modifications to take | |
268 | effect. You can get \`Help2man' from any GNU archive site." | |
269 | ||
270 | file=`echo "$*" | sed -n "$sed_output"` | |
271 | test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` | |
272 | if test -f "$file"; then | |
273 | touch $file | |
274 | else | |
275 | test -z "$file" || exec >$file | |
276 | echo ".ab help2man is required to generate this page" | |
277 | exit $? | |
278 | fi | |
279 | ;; | |
280 | ||
281 | makeinfo*) | |
282 | echo 1>&2 "\ | |
283 | WARNING: \`$1' is $msg. You should only need it if | |
284 | you modified a \`.texi' or \`.texinfo' file, or any other file | |
285 | indirectly affecting the aspect of the manual. The spurious | |
286 | call might also be the consequence of using a buggy \`make' (AIX, | |
287 | DU, IRIX). You might want to install the \`Texinfo' package or | |
288 | the \`GNU make' package. Grab either from any GNU archive site." | |
289 | # The file to touch is that specified with -o ... | |
290 | file=`echo "$*" | sed -n "$sed_output"` | |
291 | test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` | |
292 | if test -z "$file"; then | |
293 | # ... or it is the one specified with @setfilename ... | |
294 | infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` | |
295 | file=`sed -n ' | |
296 | /^@setfilename/{ | |
297 | s/.* \([^ ]*\) *$/\1/ | |
298 | p | |
299 | q | |
300 | }' $infile` | |
301 | # ... or it is derived from the source name (dir/f.texi becomes f.info) | |
302 | test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info | |
303 | fi | |
304 | # If the file does not exist, the user really needs makeinfo; | |
305 | # let's fail without touching anything. | |
306 | test -f $file || exit 1 | |
307 | touch $file | |
308 | ;; | |
309 | ||
310 | *) | |
311 | echo 1>&2 "\ | |
312 | WARNING: \`$1' is needed, and is $msg. | |
313 | You might have modified some files without having the | |
314 | proper tools for further handling them. Check the \`README' file, | |
315 | it often tells you about the needed prerequisites for installing | |
316 | this package. You may also peek at any GNU archive site, in case | |
317 | some other package would contain this missing \`$1' program." | |
318 | exit 1 | |
319 | ;; | |
320 | esac | |
321 | ||
322 | exit 0 | |
323 | ||
324 | # Local variables: | |
325 | # eval: (add-hook 'write-file-hooks 'time-stamp) | |
326 | # time-stamp-start: "scriptversion=" | |
327 | # time-stamp-format: "%:y-%02m-%02d.%02H" | |
328 | # time-stamp-time-zone: "UTC" | |
329 | # time-stamp-end: "; # UTC" | |
330 | # End: |
0 | /* config.h.in. Generated from configure.ac by autoheader. */ | |
1 | ||
2 | /* Define to 1 if you have the <arpa/inet.h> header file. */ | |
3 | #undef HAVE_ARPA_INET_H | |
4 | ||
5 | /* Define to 1 if you have the <curses.h> header file. */ | |
6 | #undef HAVE_CURSES_H | |
7 | ||
8 | /* Define to 1 if you have the <errno.h> header file. */ | |
9 | #undef HAVE_ERRNO_H | |
10 | ||
11 | /* Define to 1 if you have the <inttypes.h> header file. */ | |
12 | #undef HAVE_INTTYPES_H | |
13 | ||
14 | /* Define to 1 if you have the <memory.h> header file. */ | |
15 | #undef HAVE_MEMORY_H | |
16 | ||
17 | /* Define to 1 if you have the <ncurses.h> header file. */ | |
18 | #undef HAVE_NCURSES_H | |
19 | ||
20 | /* Define to 1 if you have the <ncurses/ncurses.h> header file. */ | |
21 | #undef HAVE_NCURSES_NCURSES_H | |
22 | ||
23 | /* Define to 1 if you have the <ncurses/term.h> header file. */ | |
24 | #undef HAVE_NCURSES_TERM_H | |
25 | ||
26 | /* Define to 1 if you have the <netdb.h> header file. */ | |
27 | #undef HAVE_NETDB_H | |
28 | ||
29 | /* Define to 1 if you have the <netinet/in.h> header file. */ | |
30 | #undef HAVE_NETINET_IN_H | |
31 | ||
32 | /* Use setupterm() for terminal setup */ | |
33 | #undef HAVE_SETUPTERM | |
34 | ||
35 | /* Define to 1 if you have the <signal.h> header file. */ | |
36 | #undef HAVE_SIGNAL_H | |
37 | ||
38 | /* Define to 1 if you have the <stdint.h> header file. */ | |
39 | #undef HAVE_STDINT_H | |
40 | ||
41 | /* Define to 1 if you have the <stdlib.h> header file. */ | |
42 | #undef HAVE_STDLIB_H | |
43 | ||
44 | /* Define to 1 if you have the `strcat' function. */ | |
45 | #undef HAVE_STRCAT | |
46 | ||
47 | /* Define to 1 if you have the `strcmp' function. */ | |
48 | #undef HAVE_STRCMP | |
49 | ||
50 | /* Define to 1 if you have the `strcpy' function. */ | |
51 | #undef HAVE_STRCPY | |
52 | ||
53 | /* Define to 1 if you have the <strings.h> header file. */ | |
54 | #undef HAVE_STRINGS_H | |
55 | ||
56 | /* Define to 1 if you have the <string.h> header file. */ | |
57 | #undef HAVE_STRING_H | |
58 | ||
59 | /* Define to 1 if you have the `strncasecmp' function. */ | |
60 | #undef HAVE_STRNCASECMP | |
61 | ||
62 | /* Define to 1 if you have the <sys/socket.h> header file. */ | |
63 | #undef HAVE_SYS_SOCKET_H | |
64 | ||
65 | /* Define to 1 if you have the <sys/stat.h> header file. */ | |
66 | #undef HAVE_SYS_STAT_H | |
67 | ||
68 | /* Define to 1 if you have the <sys/types.h> header file. */ | |
69 | #undef HAVE_SYS_TYPES_H | |
70 | ||
71 | /* Define to 1 if you have the <sys/wait.h> header file. */ | |
72 | #undef HAVE_SYS_WAIT_H | |
73 | ||
74 | /* Define to 1 if you have the <termcap.h> header file. */ | |
75 | #undef HAVE_TERMCAP_H | |
76 | ||
77 | /* Define to 1 if you have <term.h> */ | |
78 | #undef HAVE_TERM_H | |
79 | ||
80 | /* Use tgetent() for terminal setup */ | |
81 | #undef HAVE_TGETENT | |
82 | ||
83 | /* Define to 1 if you have the <unistd.h> header file. */ | |
84 | #undef HAVE_UNISTD_H | |
85 | ||
86 | /* Define to the address where bug reports for this package should be sent. */ | |
87 | #undef PACKAGE_BUGREPORT | |
88 | ||
89 | /* Define to the full name of this package. */ | |
90 | #undef PACKAGE_NAME | |
91 | ||
92 | /* Date of source release. */ | |
93 | #undef PACKAGE_RELEASE_DATE | |
94 | ||
95 | /* Define to the full name and version of this package. */ | |
96 | #undef PACKAGE_STRING | |
97 | ||
98 | /* Define to the one symbol short name of this package. */ | |
99 | #undef PACKAGE_TARNAME | |
100 | ||
101 | /* Define to the home page for this package. */ | |
102 | #undef PACKAGE_URL | |
103 | ||
104 | /* Define to the version of this package. */ | |
105 | #undef PACKAGE_VERSION | |
106 | ||
107 | /* Define to 1 if you have the ANSI C header files. */ | |
108 | #undef STDC_HEADERS | |
109 | ||
110 | /* Use curses for terminal capabilities */ | |
111 | #undef USE_CURSES | |
112 | ||
113 | /* Use ncurses for terminal capabilities */ | |
114 | #undef USE_NCURSES | |
115 | ||
116 | /* Use termcap for terminal capabilities */ | |
117 | #undef USE_TERMCAP | |
118 | ||
119 | /* Use terminfo for terminal capabilities */ | |
120 | #undef USE_TERMINFO |
0 | #! /bin/sh | |
1 | # From configure.ac in CVS, Revision: 1.15 . | |
2 | # Guess values for system-dependent variables and create Makefiles. | |
3 | # Generated by GNU Autoconf 2.69 for nettoe 1.5.1. | |
4 | # | |
5 | # Report bugs to <meand@users.sourceforge.net>. | |
6 | # | |
7 | # | |
8 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. | |
9 | # | |
10 | # | |
11 | # This configure script is free software; the Free Software Foundation | |
12 | # gives unlimited permission to copy, distribute and modify it. | |
13 | ## -------------------- ## | |
14 | ## M4sh Initialization. ## | |
15 | ## -------------------- ## | |
16 | ||
17 | # Be more Bourne compatible | |
18 | DUALCASE=1; export DUALCASE # for MKS sh | |
19 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
20 | emulate sh | |
21 | NULLCMD=: | |
22 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
23 | # is contrary to our usage. Disable this feature. | |
24 | alias -g '${1+"$@"}'='"$@"' | |
25 | setopt NO_GLOB_SUBST | |
26 | else | |
27 | case `(set -o) 2>/dev/null` in #( | |
28 | *posix*) : | |
29 | set -o posix ;; #( | |
30 | *) : | |
31 | ;; | |
32 | esac | |
33 | fi | |
34 | ||
35 | ||
36 | as_nl=' | |
37 | ' | |
38 | export as_nl | |
39 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
40 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
41 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
42 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
43 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
44 | # but without wasting forks for bash or zsh. | |
45 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
46 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
47 | as_echo='print -r --' | |
48 | as_echo_n='print -rn --' | |
49 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
50 | as_echo='printf %s\n' | |
51 | as_echo_n='printf %s' | |
52 | else | |
53 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
54 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
55 | as_echo_n='/usr/ucb/echo -n' | |
56 | else | |
57 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
58 | as_echo_n_body='eval | |
59 | arg=$1; | |
60 | case $arg in #( | |
61 | *"$as_nl"*) | |
62 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
63 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
64 | esac; | |
65 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
66 | ' | |
67 | export as_echo_n_body | |
68 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
69 | fi | |
70 | export as_echo_body | |
71 | as_echo='sh -c $as_echo_body as_echo' | |
72 | fi | |
73 | ||
74 | # The user is always right. | |
75 | if test "${PATH_SEPARATOR+set}" != set; then | |
76 | PATH_SEPARATOR=: | |
77 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
78 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
79 | PATH_SEPARATOR=';' | |
80 | } | |
81 | fi | |
82 | ||
83 | ||
84 | # IFS | |
85 | # We need space, tab and new line, in precisely that order. Quoting is | |
86 | # there to prevent editors from complaining about space-tab. | |
87 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
88 | # splitting by setting IFS to empty value.) | |
89 | IFS=" "" $as_nl" | |
90 | ||
91 | # Find who we are. Look in the path if we contain no directory separator. | |
92 | as_myself= | |
93 | case $0 in #(( | |
94 | *[\\/]* ) as_myself=$0 ;; | |
95 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
96 | for as_dir in $PATH | |
97 | do | |
98 | IFS=$as_save_IFS | |
99 | test -z "$as_dir" && as_dir=. | |
100 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
101 | done | |
102 | IFS=$as_save_IFS | |
103 | ||
104 | ;; | |
105 | esac | |
106 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
107 | # in which case we are not to be found in the path. | |
108 | if test "x$as_myself" = x; then | |
109 | as_myself=$0 | |
110 | fi | |
111 | if test ! -f "$as_myself"; then | |
112 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
113 | exit 1 | |
114 | fi | |
115 | ||
116 | # Unset variables that we do not need and which cause bugs (e.g. in | |
117 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
118 | # suppresses any "Segmentation fault" message there. '((' could | |
119 | # trigger a bug in pdksh 5.2.14. | |
120 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
121 | do eval test x\${$as_var+set} = xset \ | |
122 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
123 | done | |
124 | PS1='$ ' | |
125 | PS2='> ' | |
126 | PS4='+ ' | |
127 | ||
128 | # NLS nuisances. | |
129 | LC_ALL=C | |
130 | export LC_ALL | |
131 | LANGUAGE=C | |
132 | export LANGUAGE | |
133 | ||
134 | # CDPATH. | |
135 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
136 | ||
137 | # Use a proper internal environment variable to ensure we don't fall | |
138 | # into an infinite loop, continuously re-executing ourselves. | |
139 | if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then | |
140 | _as_can_reexec=no; export _as_can_reexec; | |
141 | # We cannot yet assume a decent shell, so we have to provide a | |
142 | # neutralization value for shells without unset; and this also | |
143 | # works around shells that cannot unset nonexistent variables. | |
144 | # Preserve -v and -x to the replacement shell. | |
145 | BASH_ENV=/dev/null | |
146 | ENV=/dev/null | |
147 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
148 | case $- in # (((( | |
149 | *v*x* | *x*v* ) as_opts=-vx ;; | |
150 | *v* ) as_opts=-v ;; | |
151 | *x* ) as_opts=-x ;; | |
152 | * ) as_opts= ;; | |
153 | esac | |
154 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
155 | # Admittedly, this is quite paranoid, since all the known shells bail | |
156 | # out after a failed `exec'. | |
157 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
158 | as_fn_exit 255 | |
159 | fi | |
160 | # We don't want this to propagate to other subprocesses. | |
161 | { _as_can_reexec=; unset _as_can_reexec;} | |
162 | if test "x$CONFIG_SHELL" = x; then | |
163 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
164 | emulate sh | |
165 | NULLCMD=: | |
166 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
167 | # is contrary to our usage. Disable this feature. | |
168 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
169 | setopt NO_GLOB_SUBST | |
170 | else | |
171 | case \`(set -o) 2>/dev/null\` in #( | |
172 | *posix*) : | |
173 | set -o posix ;; #( | |
174 | *) : | |
175 | ;; | |
176 | esac | |
177 | fi | |
178 | " | |
179 | as_required="as_fn_return () { (exit \$1); } | |
180 | as_fn_success () { as_fn_return 0; } | |
181 | as_fn_failure () { as_fn_return 1; } | |
182 | as_fn_ret_success () { return 0; } | |
183 | as_fn_ret_failure () { return 1; } | |
184 | ||
185 | exitcode=0 | |
186 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
187 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
188 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
189 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
190 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
191 | ||
192 | else | |
193 | exitcode=1; echo positional parameters were not saved. | |
194 | fi | |
195 | test x\$exitcode = x0 || exit 1 | |
196 | test -x / || exit 1" | |
197 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
198 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
199 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
200 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
201 | test \$(( 1 + 1 )) = 2 || exit 1" | |
202 | if (eval "$as_required") 2>/dev/null; then : | |
203 | as_have_required=yes | |
204 | else | |
205 | as_have_required=no | |
206 | fi | |
207 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
208 | ||
209 | else | |
210 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
211 | as_found=false | |
212 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
213 | do | |
214 | IFS=$as_save_IFS | |
215 | test -z "$as_dir" && as_dir=. | |
216 | as_found=: | |
217 | case $as_dir in #( | |
218 | /*) | |
219 | for as_base in sh bash ksh sh5; do | |
220 | # Try only shells that exist, to save several forks. | |
221 | as_shell=$as_dir/$as_base | |
222 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
223 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
224 | CONFIG_SHELL=$as_shell as_have_required=yes | |
225 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
226 | break 2 | |
227 | fi | |
228 | fi | |
229 | done;; | |
230 | esac | |
231 | as_found=false | |
232 | done | |
233 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
234 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
235 | CONFIG_SHELL=$SHELL as_have_required=yes | |
236 | fi; } | |
237 | IFS=$as_save_IFS | |
238 | ||
239 | ||
240 | if test "x$CONFIG_SHELL" != x; then : | |
241 | export CONFIG_SHELL | |
242 | # We cannot yet assume a decent shell, so we have to provide a | |
243 | # neutralization value for shells without unset; and this also | |
244 | # works around shells that cannot unset nonexistent variables. | |
245 | # Preserve -v and -x to the replacement shell. | |
246 | BASH_ENV=/dev/null | |
247 | ENV=/dev/null | |
248 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
249 | case $- in # (((( | |
250 | *v*x* | *x*v* ) as_opts=-vx ;; | |
251 | *v* ) as_opts=-v ;; | |
252 | *x* ) as_opts=-x ;; | |
253 | * ) as_opts= ;; | |
254 | esac | |
255 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
256 | # Admittedly, this is quite paranoid, since all the known shells bail | |
257 | # out after a failed `exec'. | |
258 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
259 | exit 255 | |
260 | fi | |
261 | ||
262 | if test x$as_have_required = xno; then : | |
263 | $as_echo "$0: This script requires a shell more modern than all" | |
264 | $as_echo "$0: the shells that I found on your system." | |
265 | if test x${ZSH_VERSION+set} = xset ; then | |
266 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
267 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
268 | else | |
269 | $as_echo "$0: Please tell bug-autoconf@gnu.org and | |
270 | $0: meand@users.sourceforge.net about your system, | |
271 | $0: including any error possibly output before this | |
272 | $0: message. Then install a modern shell, or manually run | |
273 | $0: the script under such a shell if you do have one." | |
274 | fi | |
275 | exit 1 | |
276 | fi | |
277 | fi | |
278 | fi | |
279 | SHELL=${CONFIG_SHELL-/bin/sh} | |
280 | export SHELL | |
281 | # Unset more variables known to interfere with behavior of common tools. | |
282 | CLICOLOR_FORCE= GREP_OPTIONS= | |
283 | unset CLICOLOR_FORCE GREP_OPTIONS | |
284 | ||
285 | ## --------------------- ## | |
286 | ## M4sh Shell Functions. ## | |
287 | ## --------------------- ## | |
288 | # as_fn_unset VAR | |
289 | # --------------- | |
290 | # Portably unset VAR. | |
291 | as_fn_unset () | |
292 | { | |
293 | { eval $1=; unset $1;} | |
294 | } | |
295 | as_unset=as_fn_unset | |
296 | ||
297 | # as_fn_set_status STATUS | |
298 | # ----------------------- | |
299 | # Set $? to STATUS, without forking. | |
300 | as_fn_set_status () | |
301 | { | |
302 | return $1 | |
303 | } # as_fn_set_status | |
304 | ||
305 | # as_fn_exit STATUS | |
306 | # ----------------- | |
307 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
308 | as_fn_exit () | |
309 | { | |
310 | set +e | |
311 | as_fn_set_status $1 | |
312 | exit $1 | |
313 | } # as_fn_exit | |
314 | ||
315 | # as_fn_mkdir_p | |
316 | # ------------- | |
317 | # Create "$as_dir" as a directory, including parents if necessary. | |
318 | as_fn_mkdir_p () | |
319 | { | |
320 | ||
321 | case $as_dir in #( | |
322 | -*) as_dir=./$as_dir;; | |
323 | esac | |
324 | test -d "$as_dir" || eval $as_mkdir_p || { | |
325 | as_dirs= | |
326 | while :; do | |
327 | case $as_dir in #( | |
328 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
329 | *) as_qdir=$as_dir;; | |
330 | esac | |
331 | as_dirs="'$as_qdir' $as_dirs" | |
332 | as_dir=`$as_dirname -- "$as_dir" || | |
333 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
334 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
335 | X"$as_dir" : 'X\(//\)$' \| \ | |
336 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
337 | $as_echo X"$as_dir" | | |
338 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
339 | s//\1/ | |
340 | q | |
341 | } | |
342 | /^X\(\/\/\)[^/].*/{ | |
343 | s//\1/ | |
344 | q | |
345 | } | |
346 | /^X\(\/\/\)$/{ | |
347 | s//\1/ | |
348 | q | |
349 | } | |
350 | /^X\(\/\).*/{ | |
351 | s//\1/ | |
352 | q | |
353 | } | |
354 | s/.*/./; q'` | |
355 | test -d "$as_dir" && break | |
356 | done | |
357 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
358 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" | |
359 | ||
360 | ||
361 | } # as_fn_mkdir_p | |
362 | ||
363 | # as_fn_executable_p FILE | |
364 | # ----------------------- | |
365 | # Test if FILE is an executable regular file. | |
366 | as_fn_executable_p () | |
367 | { | |
368 | test -f "$1" && test -x "$1" | |
369 | } # as_fn_executable_p | |
370 | # as_fn_append VAR VALUE | |
371 | # ---------------------- | |
372 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
373 | # advantage of any shell optimizations that allow amortized linear growth over | |
374 | # repeated appends, instead of the typical quadratic growth present in naive | |
375 | # implementations. | |
376 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
377 | eval 'as_fn_append () | |
378 | { | |
379 | eval $1+=\$2 | |
380 | }' | |
381 | else | |
382 | as_fn_append () | |
383 | { | |
384 | eval $1=\$$1\$2 | |
385 | } | |
386 | fi # as_fn_append | |
387 | ||
388 | # as_fn_arith ARG... | |
389 | # ------------------ | |
390 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
391 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
392 | # must be portable across $(()) and expr. | |
393 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
394 | eval 'as_fn_arith () | |
395 | { | |
396 | as_val=$(( $* )) | |
397 | }' | |
398 | else | |
399 | as_fn_arith () | |
400 | { | |
401 | as_val=`expr "$@" || test $? -eq 1` | |
402 | } | |
403 | fi # as_fn_arith | |
404 | ||
405 | ||
406 | # as_fn_error STATUS ERROR [LINENO LOG_FD] | |
407 | # ---------------------------------------- | |
408 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
409 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
410 | # script with STATUS, using 1 if that was 0. | |
411 | as_fn_error () | |
412 | { | |
413 | as_status=$1; test $as_status -eq 0 && as_status=1 | |
414 | if test "$4"; then | |
415 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
416 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
417 | fi | |
418 | $as_echo "$as_me: error: $2" >&2 | |
419 | as_fn_exit $as_status | |
420 | } # as_fn_error | |
421 | ||
422 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
423 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
424 | as_expr=expr | |
425 | else | |
426 | as_expr=false | |
427 | fi | |
428 | ||
429 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
430 | as_basename=basename | |
431 | else | |
432 | as_basename=false | |
433 | fi | |
434 | ||
435 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
436 | as_dirname=dirname | |
437 | else | |
438 | as_dirname=false | |
439 | fi | |
440 | ||
441 | as_me=`$as_basename -- "$0" || | |
442 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
443 | X"$0" : 'X\(//\)$' \| \ | |
444 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
445 | $as_echo X/"$0" | | |
446 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
447 | s//\1/ | |
448 | q | |
449 | } | |
450 | /^X\/\(\/\/\)$/{ | |
451 | s//\1/ | |
452 | q | |
453 | } | |
454 | /^X\/\(\/\).*/{ | |
455 | s//\1/ | |
456 | q | |
457 | } | |
458 | s/.*/./; q'` | |
459 | ||
460 | # Avoid depending upon Character Ranges. | |
461 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
462 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
463 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
464 | as_cr_digits='0123456789' | |
465 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
466 | ||
467 | ||
468 | as_lineno_1=$LINENO as_lineno_1a=$LINENO | |
469 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
470 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
471 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
472 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
473 | sed -n ' | |
474 | p | |
475 | /[$]LINENO/= | |
476 | ' <$as_myself | | |
477 | sed ' | |
478 | s/[$]LINENO.*/&-/ | |
479 | t lineno | |
480 | b | |
481 | :lineno | |
482 | N | |
483 | :loop | |
484 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
485 | t loop | |
486 | s/-\n.*// | |
487 | ' >$as_me.lineno && | |
488 | chmod +x "$as_me.lineno" || | |
489 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
490 | ||
491 | # If we had to re-execute with $CONFIG_SHELL, we're ensured to have | |
492 | # already done that, so ensure we don't try to do so again and fall | |
493 | # in an infinite loop. This has already happened in practice. | |
494 | _as_can_reexec=no; export _as_can_reexec | |
495 | # Don't try to exec as it changes $[0], causing all sort of problems | |
496 | # (the dirname of $[0] is not the place where we might find the | |
497 | # original and so on. Autoconf is especially sensitive to this). | |
498 | . "./$as_me.lineno" | |
499 | # Exit status is that of the last command. | |
500 | exit | |
501 | } | |
502 | ||
503 | ECHO_C= ECHO_N= ECHO_T= | |
504 | case `echo -n x` in #((((( | |
505 | -n*) | |
506 | case `echo 'xy\c'` in | |
507 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
508 | xy) ECHO_C='\c';; | |
509 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
510 | ECHO_T=' ';; | |
511 | esac;; | |
512 | *) | |
513 | ECHO_N='-n';; | |
514 | esac | |
515 | ||
516 | rm -f conf$$ conf$$.exe conf$$.file | |
517 | if test -d conf$$.dir; then | |
518 | rm -f conf$$.dir/conf$$.file | |
519 | else | |
520 | rm -f conf$$.dir | |
521 | mkdir conf$$.dir 2>/dev/null | |
522 | fi | |
523 | if (echo >conf$$.file) 2>/dev/null; then | |
524 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
525 | as_ln_s='ln -s' | |
526 | # ... but there are two gotchas: | |
527 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
528 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
529 | # In both cases, we have to default to `cp -pR'. | |
530 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
531 | as_ln_s='cp -pR' | |
532 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
533 | as_ln_s=ln | |
534 | else | |
535 | as_ln_s='cp -pR' | |
536 | fi | |
537 | else | |
538 | as_ln_s='cp -pR' | |
539 | fi | |
540 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
541 | rmdir conf$$.dir 2>/dev/null | |
542 | ||
543 | if mkdir -p . 2>/dev/null; then | |
544 | as_mkdir_p='mkdir -p "$as_dir"' | |
545 | else | |
546 | test -d ./-p && rmdir ./-p | |
547 | as_mkdir_p=false | |
548 | fi | |
549 | ||
550 | as_test_x='test -x' | |
551 | as_executable_p=as_fn_executable_p | |
552 | ||
553 | # Sed expression to map a string onto a valid CPP name. | |
554 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
555 | ||
556 | # Sed expression to map a string onto a valid variable name. | |
557 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
558 | ||
559 | ||
560 | test -n "$DJDIR" || exec 7<&0 </dev/null | |
561 | exec 6>&1 | |
562 | ||
563 | # Name of the host. | |
564 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, | |
565 | # so uname gets run too. | |
566 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
567 | ||
568 | # | |
569 | # Initializations. | |
570 | # | |
571 | ac_default_prefix=/usr/local | |
572 | ac_clean_files= | |
573 | ac_config_libobj_dir=. | |
574 | LIBOBJS= | |
575 | cross_compiling=no | |
576 | subdirs= | |
577 | MFLAGS= | |
578 | MAKEFLAGS= | |
579 | ||
580 | # Identity of this package. | |
581 | PACKAGE_NAME='nettoe' | |
582 | PACKAGE_TARNAME='nettoe' | |
583 | PACKAGE_VERSION='1.5.1' | |
584 | PACKAGE_STRING='nettoe 1.5.1' | |
585 | PACKAGE_BUGREPORT='meand@users.sourceforge.net' | |
586 | PACKAGE_URL='' | |
587 | ||
588 | ac_unique_file="src/nettoe.c" | |
589 | # Factoring default headers for most tests. | |
590 | ac_includes_default="\ | |
591 | #include <stdio.h> | |
592 | #ifdef HAVE_SYS_TYPES_H | |
593 | # include <sys/types.h> | |
594 | #endif | |
595 | #ifdef HAVE_SYS_STAT_H | |
596 | # include <sys/stat.h> | |
597 | #endif | |
598 | #ifdef STDC_HEADERS | |
599 | # include <stdlib.h> | |
600 | # include <stddef.h> | |
601 | #else | |
602 | # ifdef HAVE_STDLIB_H | |
603 | # include <stdlib.h> | |
604 | # endif | |
605 | #endif | |
606 | #ifdef HAVE_STRING_H | |
607 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
608 | # include <memory.h> | |
609 | # endif | |
610 | # include <string.h> | |
611 | #endif | |
612 | #ifdef HAVE_STRINGS_H | |
613 | # include <strings.h> | |
614 | #endif | |
615 | #ifdef HAVE_INTTYPES_H | |
616 | # include <inttypes.h> | |
617 | #endif | |
618 | #ifdef HAVE_STDINT_H | |
619 | # include <stdint.h> | |
620 | #endif | |
621 | #ifdef HAVE_UNISTD_H | |
622 | # include <unistd.h> | |
623 | #endif" | |
624 | ||
625 | ac_subst_vars='am__EXEEXT_FALSE | |
626 | am__EXEEXT_TRUE | |
627 | LTLIBOBJS | |
628 | LIBOBJS | |
629 | pixmapsdir | |
630 | menudir | |
631 | iconsdir | |
632 | applicationsdir | |
633 | NETTOE_PORT | |
634 | NETTOE_LDADD | |
635 | LIBTERMCAP | |
636 | LIBCURSES | |
637 | LIBNCURSES | |
638 | LIBTINFO | |
639 | EGREP | |
640 | GREP | |
641 | CPP | |
642 | SED | |
643 | am__fastdepCC_FALSE | |
644 | am__fastdepCC_TRUE | |
645 | CCDEPMODE | |
646 | am__nodep | |
647 | AMDEPBACKSLASH | |
648 | AMDEP_FALSE | |
649 | AMDEP_TRUE | |
650 | am__quote | |
651 | am__include | |
652 | DEPDIR | |
653 | OBJEXT | |
654 | EXEEXT | |
655 | ac_ct_CC | |
656 | CPPFLAGS | |
657 | LDFLAGS | |
658 | CFLAGS | |
659 | CC | |
660 | ENABLE_MENU_FALSE | |
661 | ENABLE_MENU_TRUE | |
662 | ENABLE_DESKTOP_FALSE | |
663 | ENABLE_DESKTOP_TRUE | |
664 | am__untar | |
665 | am__tar | |
666 | AMTAR | |
667 | am__leading_dot | |
668 | SET_MAKE | |
669 | AWK | |
670 | mkdir_p | |
671 | MKDIR_P | |
672 | INSTALL_STRIP_PROGRAM | |
673 | STRIP | |
674 | install_sh | |
675 | MAKEINFO | |
676 | AUTOHEADER | |
677 | AUTOMAKE | |
678 | AUTOCONF | |
679 | ACLOCAL | |
680 | VERSION | |
681 | PACKAGE | |
682 | CYGPATH_W | |
683 | am__isrc | |
684 | INSTALL_DATA | |
685 | INSTALL_SCRIPT | |
686 | INSTALL_PROGRAM | |
687 | host_os | |
688 | host_vendor | |
689 | host_cpu | |
690 | host | |
691 | build_os | |
692 | build_vendor | |
693 | build_cpu | |
694 | build | |
695 | target_alias | |
696 | host_alias | |
697 | build_alias | |
698 | LIBS | |
699 | ECHO_T | |
700 | ECHO_N | |
701 | ECHO_C | |
702 | DEFS | |
703 | mandir | |
704 | localedir | |
705 | libdir | |
706 | psdir | |
707 | pdfdir | |
708 | dvidir | |
709 | htmldir | |
710 | infodir | |
711 | docdir | |
712 | oldincludedir | |
713 | includedir | |
714 | localstatedir | |
715 | sharedstatedir | |
716 | sysconfdir | |
717 | datadir | |
718 | datarootdir | |
719 | libexecdir | |
720 | sbindir | |
721 | bindir | |
722 | program_transform_name | |
723 | prefix | |
724 | exec_prefix | |
725 | PACKAGE_URL | |
726 | PACKAGE_BUGREPORT | |
727 | PACKAGE_STRING | |
728 | PACKAGE_VERSION | |
729 | PACKAGE_TARNAME | |
730 | PACKAGE_NAME | |
731 | PATH_SEPARATOR | |
732 | SHELL' | |
733 | ac_subst_files='' | |
734 | ac_user_opts=' | |
735 | enable_option_checking | |
736 | with_terminfo | |
737 | with_port | |
738 | enable_desktop | |
739 | enable_menu | |
740 | enable_dependency_tracking | |
741 | ' | |
742 | ac_precious_vars='build_alias | |
743 | host_alias | |
744 | target_alias | |
745 | CC | |
746 | CFLAGS | |
747 | LDFLAGS | |
748 | LIBS | |
749 | CPPFLAGS | |
750 | CPP | |
751 | NETTOE_PORT | |
752 | applicationsdir | |
753 | iconsdir | |
754 | menudir | |
755 | pixmapsdir' | |
756 | ||
757 | ||
758 | # Initialize some variables set by options. | |
759 | ac_init_help= | |
760 | ac_init_version=false | |
761 | ac_unrecognized_opts= | |
762 | ac_unrecognized_sep= | |
763 | # The variables have the same names as the options, with | |
764 | # dashes changed to underlines. | |
765 | cache_file=/dev/null | |
766 | exec_prefix=NONE | |
767 | no_create= | |
768 | no_recursion= | |
769 | prefix=NONE | |
770 | program_prefix=NONE | |
771 | program_suffix=NONE | |
772 | program_transform_name=s,x,x, | |
773 | silent= | |
774 | site= | |
775 | srcdir= | |
776 | verbose= | |
777 | x_includes=NONE | |
778 | x_libraries=NONE | |
779 | ||
780 | # Installation directory options. | |
781 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
782 | # and all the variables that are supposed to be based on exec_prefix | |
783 | # by default will actually change. | |
784 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
785 | # (The list follows the same order as the GNU Coding Standards.) | |
786 | bindir='${exec_prefix}/bin' | |
787 | sbindir='${exec_prefix}/sbin' | |
788 | libexecdir='${exec_prefix}/libexec' | |
789 | datarootdir='${prefix}/share' | |
790 | datadir='${datarootdir}' | |
791 | sysconfdir='${prefix}/etc' | |
792 | sharedstatedir='${prefix}/com' | |
793 | localstatedir='${prefix}/var' | |
794 | includedir='${prefix}/include' | |
795 | oldincludedir='/usr/include' | |
796 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | |
797 | infodir='${datarootdir}/info' | |
798 | htmldir='${docdir}' | |
799 | dvidir='${docdir}' | |
800 | pdfdir='${docdir}' | |
801 | psdir='${docdir}' | |
802 | libdir='${exec_prefix}/lib' | |
803 | localedir='${datarootdir}/locale' | |
804 | mandir='${datarootdir}/man' | |
805 | ||
806 | ac_prev= | |
807 | ac_dashdash= | |
808 | for ac_option | |
809 | do | |
810 | # If the previous option needs an argument, assign it. | |
811 | if test -n "$ac_prev"; then | |
812 | eval $ac_prev=\$ac_option | |
813 | ac_prev= | |
814 | continue | |
815 | fi | |
816 | ||
817 | case $ac_option in | |
818 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
819 | *=) ac_optarg= ;; | |
820 | *) ac_optarg=yes ;; | |
821 | esac | |
822 | ||
823 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
824 | ||
825 | case $ac_dashdash$ac_option in | |
826 | --) | |
827 | ac_dashdash=yes ;; | |
828 | ||
829 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
830 | ac_prev=bindir ;; | |
831 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
832 | bindir=$ac_optarg ;; | |
833 | ||
834 | -build | --build | --buil | --bui | --bu) | |
835 | ac_prev=build_alias ;; | |
836 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
837 | build_alias=$ac_optarg ;; | |
838 | ||
839 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
840 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
841 | ac_prev=cache_file ;; | |
842 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
843 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
844 | cache_file=$ac_optarg ;; | |
845 | ||
846 | --config-cache | -C) | |
847 | cache_file=config.cache ;; | |
848 | ||
849 | -datadir | --datadir | --datadi | --datad) | |
850 | ac_prev=datadir ;; | |
851 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
852 | datadir=$ac_optarg ;; | |
853 | ||
854 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | |
855 | | --dataroo | --dataro | --datar) | |
856 | ac_prev=datarootdir ;; | |
857 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
858 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
859 | datarootdir=$ac_optarg ;; | |
860 | ||
861 | -disable-* | --disable-*) | |
862 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
863 | # Reject names that are not valid shell variable names. | |
864 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
865 | as_fn_error $? "invalid feature name: $ac_useropt" | |
866 | ac_useropt_orig=$ac_useropt | |
867 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
868 | case $ac_user_opts in | |
869 | *" | |
870 | "enable_$ac_useropt" | |
871 | "*) ;; | |
872 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
873 | ac_unrecognized_sep=', ';; | |
874 | esac | |
875 | eval enable_$ac_useropt=no ;; | |
876 | ||
877 | -docdir | --docdir | --docdi | --doc | --do) | |
878 | ac_prev=docdir ;; | |
879 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
880 | docdir=$ac_optarg ;; | |
881 | ||
882 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
883 | ac_prev=dvidir ;; | |
884 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
885 | dvidir=$ac_optarg ;; | |
886 | ||
887 | -enable-* | --enable-*) | |
888 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
889 | # Reject names that are not valid shell variable names. | |
890 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
891 | as_fn_error $? "invalid feature name: $ac_useropt" | |
892 | ac_useropt_orig=$ac_useropt | |
893 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
894 | case $ac_user_opts in | |
895 | *" | |
896 | "enable_$ac_useropt" | |
897 | "*) ;; | |
898 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
899 | ac_unrecognized_sep=', ';; | |
900 | esac | |
901 | eval enable_$ac_useropt=\$ac_optarg ;; | |
902 | ||
903 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
904 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
905 | | --exec | --exe | --ex) | |
906 | ac_prev=exec_prefix ;; | |
907 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
908 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
909 | | --exec=* | --exe=* | --ex=*) | |
910 | exec_prefix=$ac_optarg ;; | |
911 | ||
912 | -gas | --gas | --ga | --g) | |
913 | # Obsolete; use --with-gas. | |
914 | with_gas=yes ;; | |
915 | ||
916 | -help | --help | --hel | --he | -h) | |
917 | ac_init_help=long ;; | |
918 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
919 | ac_init_help=recursive ;; | |
920 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
921 | ac_init_help=short ;; | |
922 | ||
923 | -host | --host | --hos | --ho) | |
924 | ac_prev=host_alias ;; | |
925 | -host=* | --host=* | --hos=* | --ho=*) | |
926 | host_alias=$ac_optarg ;; | |
927 | ||
928 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) | |
929 | ac_prev=htmldir ;; | |
930 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
931 | | --ht=*) | |
932 | htmldir=$ac_optarg ;; | |
933 | ||
934 | -includedir | --includedir | --includedi | --included | --include \ | |
935 | | --includ | --inclu | --incl | --inc) | |
936 | ac_prev=includedir ;; | |
937 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
938 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
939 | includedir=$ac_optarg ;; | |
940 | ||
941 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
942 | ac_prev=infodir ;; | |
943 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
944 | infodir=$ac_optarg ;; | |
945 | ||
946 | -libdir | --libdir | --libdi | --libd) | |
947 | ac_prev=libdir ;; | |
948 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
949 | libdir=$ac_optarg ;; | |
950 | ||
951 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
952 | | --libexe | --libex | --libe) | |
953 | ac_prev=libexecdir ;; | |
954 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
955 | | --libexe=* | --libex=* | --libe=*) | |
956 | libexecdir=$ac_optarg ;; | |
957 | ||
958 | -localedir | --localedir | --localedi | --localed | --locale) | |
959 | ac_prev=localedir ;; | |
960 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
961 | localedir=$ac_optarg ;; | |
962 | ||
963 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
964 | | --localstate | --localstat | --localsta | --localst | --locals) | |
965 | ac_prev=localstatedir ;; | |
966 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
967 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
968 | localstatedir=$ac_optarg ;; | |
969 | ||
970 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
971 | ac_prev=mandir ;; | |
972 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
973 | mandir=$ac_optarg ;; | |
974 | ||
975 | -nfp | --nfp | --nf) | |
976 | # Obsolete; use --without-fp. | |
977 | with_fp=no ;; | |
978 | ||
979 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
980 | | --no-cr | --no-c | -n) | |
981 | no_create=yes ;; | |
982 | ||
983 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
984 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
985 | no_recursion=yes ;; | |
986 | ||
987 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
988 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
989 | | --oldin | --oldi | --old | --ol | --o) | |
990 | ac_prev=oldincludedir ;; | |
991 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
992 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
993 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
994 | oldincludedir=$ac_optarg ;; | |
995 | ||
996 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
997 | ac_prev=prefix ;; | |
998 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
999 | prefix=$ac_optarg ;; | |
1000 | ||
1001 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1002 | | --program-pre | --program-pr | --program-p) | |
1003 | ac_prev=program_prefix ;; | |
1004 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1005 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
1006 | program_prefix=$ac_optarg ;; | |
1007 | ||
1008 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1009 | | --program-suf | --program-su | --program-s) | |
1010 | ac_prev=program_suffix ;; | |
1011 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1012 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
1013 | program_suffix=$ac_optarg ;; | |
1014 | ||
1015 | -program-transform-name | --program-transform-name \ | |
1016 | | --program-transform-nam | --program-transform-na \ | |
1017 | | --program-transform-n | --program-transform- \ | |
1018 | | --program-transform | --program-transfor \ | |
1019 | | --program-transfo | --program-transf \ | |
1020 | | --program-trans | --program-tran \ | |
1021 | | --progr-tra | --program-tr | --program-t) | |
1022 | ac_prev=program_transform_name ;; | |
1023 | -program-transform-name=* | --program-transform-name=* \ | |
1024 | | --program-transform-nam=* | --program-transform-na=* \ | |
1025 | | --program-transform-n=* | --program-transform-=* \ | |
1026 | | --program-transform=* | --program-transfor=* \ | |
1027 | | --program-transfo=* | --program-transf=* \ | |
1028 | | --program-trans=* | --program-tran=* \ | |
1029 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
1030 | program_transform_name=$ac_optarg ;; | |
1031 | ||
1032 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) | |
1033 | ac_prev=pdfdir ;; | |
1034 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1035 | pdfdir=$ac_optarg ;; | |
1036 | ||
1037 | -psdir | --psdir | --psdi | --psd | --ps) | |
1038 | ac_prev=psdir ;; | |
1039 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1040 | psdir=$ac_optarg ;; | |
1041 | ||
1042 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1043 | | -silent | --silent | --silen | --sile | --sil) | |
1044 | silent=yes ;; | |
1045 | ||
1046 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1047 | ac_prev=sbindir ;; | |
1048 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1049 | | --sbi=* | --sb=*) | |
1050 | sbindir=$ac_optarg ;; | |
1051 | ||
1052 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1053 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1054 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1055 | | --sha | --sh) | |
1056 | ac_prev=sharedstatedir ;; | |
1057 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1058 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1059 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1060 | | --sha=* | --sh=*) | |
1061 | sharedstatedir=$ac_optarg ;; | |
1062 | ||
1063 | -site | --site | --sit) | |
1064 | ac_prev=site ;; | |
1065 | -site=* | --site=* | --sit=*) | |
1066 | site=$ac_optarg ;; | |
1067 | ||
1068 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1069 | ac_prev=srcdir ;; | |
1070 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
1071 | srcdir=$ac_optarg ;; | |
1072 | ||
1073 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1074 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1075 | ac_prev=sysconfdir ;; | |
1076 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1077 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
1078 | sysconfdir=$ac_optarg ;; | |
1079 | ||
1080 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
1081 | ac_prev=target_alias ;; | |
1082 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
1083 | target_alias=$ac_optarg ;; | |
1084 | ||
1085 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1086 | verbose=yes ;; | |
1087 | ||
1088 | -version | --version | --versio | --versi | --vers | -V) | |
1089 | ac_init_version=: ;; | |
1090 | ||
1091 | -with-* | --with-*) | |
1092 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
1093 | # Reject names that are not valid shell variable names. | |
1094 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
1095 | as_fn_error $? "invalid package name: $ac_useropt" | |
1096 | ac_useropt_orig=$ac_useropt | |
1097 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1098 | case $ac_user_opts in | |
1099 | *" | |
1100 | "with_$ac_useropt" | |
1101 | "*) ;; | |
1102 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1103 | ac_unrecognized_sep=', ';; | |
1104 | esac | |
1105 | eval with_$ac_useropt=\$ac_optarg ;; | |
1106 | ||
1107 | -without-* | --without-*) | |
1108 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
1109 | # Reject names that are not valid shell variable names. | |
1110 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
1111 | as_fn_error $? "invalid package name: $ac_useropt" | |
1112 | ac_useropt_orig=$ac_useropt | |
1113 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1114 | case $ac_user_opts in | |
1115 | *" | |
1116 | "with_$ac_useropt" | |
1117 | "*) ;; | |
1118 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1119 | ac_unrecognized_sep=', ';; | |
1120 | esac | |
1121 | eval with_$ac_useropt=no ;; | |
1122 | ||
1123 | --x) | |
1124 | # Obsolete; use --with-x. | |
1125 | with_x=yes ;; | |
1126 | ||
1127 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1128 | | --x-incl | --x-inc | --x-in | --x-i) | |
1129 | ac_prev=x_includes ;; | |
1130 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1131 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
1132 | x_includes=$ac_optarg ;; | |
1133 | ||
1134 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1135 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1136 | ac_prev=x_libraries ;; | |
1137 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1138 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
1139 | x_libraries=$ac_optarg ;; | |
1140 | ||
1141 | -*) as_fn_error $? "unrecognized option: \`$ac_option' | |
1142 | Try \`$0 --help' for more information" | |
1143 | ;; | |
1144 | ||
1145 | *=*) | |
1146 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1147 | # Reject names that are not valid shell variable names. | |
1148 | case $ac_envvar in #( | |
1149 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1150 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; | |
1151 | esac | |
1152 | eval $ac_envvar=\$ac_optarg | |
1153 | export $ac_envvar ;; | |
1154 | ||
1155 | *) | |
1156 | # FIXME: should be removed in autoconf 3.0. | |
1157 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
1158 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
1159 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
1160 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" | |
1161 | ;; | |
1162 | ||
1163 | esac | |
1164 | done | |
1165 | ||
1166 | if test -n "$ac_prev"; then | |
1167 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
1168 | as_fn_error $? "missing argument to $ac_option" | |
1169 | fi | |
1170 | ||
1171 | if test -n "$ac_unrecognized_opts"; then | |
1172 | case $enable_option_checking in | |
1173 | no) ;; | |
1174 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; | |
1175 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
1176 | esac | |
1177 | fi | |
1178 | ||
1179 | # Check all directory arguments for consistency. | |
1180 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1181 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1182 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1183 | libdir localedir mandir | |
1184 | do | |
1185 | eval ac_val=\$$ac_var | |
1186 | # Remove trailing slashes. | |
1187 | case $ac_val in | |
1188 | */ ) | |
1189 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1190 | eval $ac_var=\$ac_val;; | |
1191 | esac | |
1192 | # Be sure to have absolute directory names. | |
1193 | case $ac_val in | |
1194 | [\\/$]* | ?:[\\/]* ) continue;; | |
1195 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
1196 | esac | |
1197 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" | |
1198 | done | |
1199 | ||
1200 | # There might be people who depend on the old broken behavior: `$host' | |
1201 | # used to hold the argument of --host etc. | |
1202 | # FIXME: To remove some day. | |
1203 | build=$build_alias | |
1204 | host=$host_alias | |
1205 | target=$target_alias | |
1206 | ||
1207 | # FIXME: To remove some day. | |
1208 | if test "x$host_alias" != x; then | |
1209 | if test "x$build_alias" = x; then | |
1210 | cross_compiling=maybe | |
1211 | elif test "x$build_alias" != "x$host_alias"; then | |
1212 | cross_compiling=yes | |
1213 | fi | |
1214 | fi | |
1215 | ||
1216 | ac_tool_prefix= | |
1217 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1218 | ||
1219 | test "$silent" = yes && exec 6>/dev/null | |
1220 | ||
1221 | ||
1222 | ac_pwd=`pwd` && test -n "$ac_pwd" && | |
1223 | ac_ls_di=`ls -di .` && | |
1224 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1225 | as_fn_error $? "working directory cannot be determined" | |
1226 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1227 | as_fn_error $? "pwd does not report name of working directory" | |
1228 | ||
1229 | ||
1230 | # Find the source files, if location was not specified. | |
1231 | if test -z "$srcdir"; then | |
1232 | ac_srcdir_defaulted=yes | |
1233 | # Try the directory containing this script, then the parent directory. | |
1234 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1235 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1236 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1237 | X"$as_myself" : 'X\(//\)$' \| \ | |
1238 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1239 | $as_echo X"$as_myself" | | |
1240 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1241 | s//\1/ | |
1242 | q | |
1243 | } | |
1244 | /^X\(\/\/\)[^/].*/{ | |
1245 | s//\1/ | |
1246 | q | |
1247 | } | |
1248 | /^X\(\/\/\)$/{ | |
1249 | s//\1/ | |
1250 | q | |
1251 | } | |
1252 | /^X\(\/\).*/{ | |
1253 | s//\1/ | |
1254 | q | |
1255 | } | |
1256 | s/.*/./; q'` | |
1257 | srcdir=$ac_confdir | |
1258 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1259 | srcdir=.. | |
1260 | fi | |
1261 | else | |
1262 | ac_srcdir_defaulted=no | |
1263 | fi | |
1264 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1265 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1266 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" | |
1267 | fi | |
1268 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1269 | ac_abs_confdir=`( | |
1270 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" | |
1271 | pwd)` | |
1272 | # When building in place, set srcdir=. | |
1273 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1274 | srcdir=. | |
1275 | fi | |
1276 | # Remove unnecessary trailing slashes from srcdir. | |
1277 | # Double slashes in file names in object file debugging info | |
1278 | # mess up M-x gdb in Emacs. | |
1279 | case $srcdir in | |
1280 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1281 | esac | |
1282 | for ac_var in $ac_precious_vars; do | |
1283 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1284 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1285 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1286 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1287 | done | |
1288 | ||
1289 | # | |
1290 | # Report the --help message. | |
1291 | # | |
1292 | if test "$ac_init_help" = "long"; then | |
1293 | # Omit some internal or obsolete options to make the list less imposing. | |
1294 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1295 | cat <<_ACEOF | |
1296 | \`configure' configures nettoe 1.5.1 to adapt to many kinds of systems. | |
1297 | ||
1298 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1299 | ||
1300 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1301 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1302 | ||
1303 | Defaults for the options are specified in brackets. | |
1304 | ||
1305 | Configuration: | |
1306 | -h, --help display this help and exit | |
1307 | --help=short display options specific to this package | |
1308 | --help=recursive display the short help of all the included packages | |
1309 | -V, --version display version information and exit | |
1310 | -q, --quiet, --silent do not print \`checking ...' messages | |
1311 | --cache-file=FILE cache test results in FILE [disabled] | |
1312 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1313 | -n, --no-create do not create output files | |
1314 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1315 | ||
1316 | Installation directories: | |
1317 | --prefix=PREFIX install architecture-independent files in PREFIX | |
1318 | [$ac_default_prefix] | |
1319 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
1320 | [PREFIX] | |
1321 | ||
1322 | By default, \`make install' will install all the files in | |
1323 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1324 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1325 | for instance \`--prefix=\$HOME'. | |
1326 | ||
1327 | For better control, use the options below. | |
1328 | ||
1329 | Fine tuning of the installation directories: | |
1330 | --bindir=DIR user executables [EPREFIX/bin] | |
1331 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1332 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1333 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1334 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1335 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1336 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1337 | --includedir=DIR C header files [PREFIX/include] | |
1338 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1339 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1340 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1341 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1342 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1343 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1344 | --docdir=DIR documentation root [DATAROOTDIR/doc/nettoe] | |
1345 | --htmldir=DIR html documentation [DOCDIR] | |
1346 | --dvidir=DIR dvi documentation [DOCDIR] | |
1347 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1348 | --psdir=DIR ps documentation [DOCDIR] | |
1349 | _ACEOF | |
1350 | ||
1351 | cat <<\_ACEOF | |
1352 | ||
1353 | Program names: | |
1354 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1355 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1356 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1357 | ||
1358 | System types: | |
1359 | --build=BUILD configure for building on BUILD [guessed] | |
1360 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1361 | _ACEOF | |
1362 | fi | |
1363 | ||
1364 | if test -n "$ac_init_help"; then | |
1365 | case $ac_init_help in | |
1366 | short | recursive ) echo "Configuration of nettoe 1.5.1:";; | |
1367 | esac | |
1368 | cat <<\_ACEOF | |
1369 | ||
1370 | Optional Features: | |
1371 | --disable-option-checking ignore unrecognized --enable/--with options | |
1372 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1373 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
1374 | --enable-desktop install icons and desktop description | |
1375 | --enable-menu install menu file on desktop systems | |
1376 | --disable-dependency-tracking speeds up one-time build | |
1377 | --enable-dependency-tracking do not reject slow dependency extractors | |
1378 | ||
1379 | Optional Packages: | |
1380 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1381 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1382 | --without-terminfo do not use terminfo/termcap | |
1383 | --with-port=NUM numeric TCP port of server (defaults to 7501) | |
1384 | ||
1385 | Some influential environment variables: | |
1386 | CC C compiler command | |
1387 | CFLAGS C compiler flags | |
1388 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1389 | nonstandard directory <lib dir> | |
1390 | LIBS libraries to pass to the linker, e.g. -l<library> | |
1391 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if | |
1392 | you have headers in a nonstandard directory <include dir> | |
1393 | CPP C preprocessor | |
1394 | NETTOE_PORT numeric TCP port of server | |
1395 | applicationsdir | |
1396 | program descriptions [$(datadir)/applications] | |
1397 | iconsdir base directory for icons [$(datadir)/icons] | |
1398 | menudir location of menu descriptions [$(datadir)/menu] | |
1399 | pixmapsdir location of pixmaps [$(datadir)/pixmaps] | |
1400 | ||
1401 | Use these variables to override the choices made by `configure' or to help | |
1402 | it to find libraries and programs with nonstandard names/locations. | |
1403 | ||
1404 | Report bugs to <meand@users.sourceforge.net>. | |
1405 | _ACEOF | |
1406 | ac_status=$? | |
1407 | fi | |
1408 | ||
1409 | if test "$ac_init_help" = "recursive"; then | |
1410 | # If there are subdirs, report their specific --help. | |
1411 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
1412 | test -d "$ac_dir" || | |
1413 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1414 | continue | |
1415 | ac_builddir=. | |
1416 | ||
1417 | case "$ac_dir" in | |
1418 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1419 | *) | |
1420 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1421 | # A ".." for each directory in $ac_dir_suffix. | |
1422 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1423 | case $ac_top_builddir_sub in | |
1424 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1425 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1426 | esac ;; | |
1427 | esac | |
1428 | ac_abs_top_builddir=$ac_pwd | |
1429 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1430 | # for backward compatibility: | |
1431 | ac_top_builddir=$ac_top_build_prefix | |
1432 | ||
1433 | case $srcdir in | |
1434 | .) # We are building in place. | |
1435 | ac_srcdir=. | |
1436 | ac_top_srcdir=$ac_top_builddir_sub | |
1437 | ac_abs_top_srcdir=$ac_pwd ;; | |
1438 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
1439 | ac_srcdir=$srcdir$ac_dir_suffix; | |
1440 | ac_top_srcdir=$srcdir | |
1441 | ac_abs_top_srcdir=$srcdir ;; | |
1442 | *) # Relative name. | |
1443 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1444 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1445 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
1446 | esac | |
1447 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
1448 | ||
1449 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1450 | # Check for guested configure. | |
1451 | if test -f "$ac_srcdir/configure.gnu"; then | |
1452 | echo && | |
1453 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1454 | elif test -f "$ac_srcdir/configure"; then | |
1455 | echo && | |
1456 | $SHELL "$ac_srcdir/configure" --help=recursive | |
1457 | else | |
1458 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1459 | fi || ac_status=$? | |
1460 | cd "$ac_pwd" || { ac_status=$?; break; } | |
1461 | done | |
1462 | fi | |
1463 | ||
1464 | test -n "$ac_init_help" && exit $ac_status | |
1465 | if $ac_init_version; then | |
1466 | cat <<\_ACEOF | |
1467 | nettoe configure 1.5.1 | |
1468 | generated by GNU Autoconf 2.69 | |
1469 | ||
1470 | Copyright (C) 2012 Free Software Foundation, Inc. | |
1471 | This configure script is free software; the Free Software Foundation | |
1472 | gives unlimited permission to copy, distribute and modify it. | |
1473 | _ACEOF | |
1474 | exit | |
1475 | fi | |
1476 | ||
1477 | ## ------------------------ ## | |
1478 | ## Autoconf initialization. ## | |
1479 | ## ------------------------ ## | |
1480 | ||
1481 | # ac_fn_c_try_compile LINENO | |
1482 | # -------------------------- | |
1483 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1484 | ac_fn_c_try_compile () | |
1485 | { | |
1486 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1487 | rm -f conftest.$ac_objext | |
1488 | if { { ac_try="$ac_compile" | |
1489 | case "(($ac_try" in | |
1490 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1491 | *) ac_try_echo=$ac_try;; | |
1492 | esac | |
1493 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1494 | $as_echo "$ac_try_echo"; } >&5 | |
1495 | (eval "$ac_compile") 2>conftest.err | |
1496 | ac_status=$? | |
1497 | if test -s conftest.err; then | |
1498 | grep -v '^ *+' conftest.err >conftest.er1 | |
1499 | cat conftest.er1 >&5 | |
1500 | mv -f conftest.er1 conftest.err | |
1501 | fi | |
1502 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1503 | test $ac_status = 0; } && { | |
1504 | test -z "$ac_c_werror_flag" || | |
1505 | test ! -s conftest.err | |
1506 | } && test -s conftest.$ac_objext; then : | |
1507 | ac_retval=0 | |
1508 | else | |
1509 | $as_echo "$as_me: failed program was:" >&5 | |
1510 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1511 | ||
1512 | ac_retval=1 | |
1513 | fi | |
1514 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1515 | as_fn_set_status $ac_retval | |
1516 | ||
1517 | } # ac_fn_c_try_compile | |
1518 | ||
1519 | # ac_fn_c_try_cpp LINENO | |
1520 | # ---------------------- | |
1521 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1522 | ac_fn_c_try_cpp () | |
1523 | { | |
1524 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1525 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1526 | case "(($ac_try" in | |
1527 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1528 | *) ac_try_echo=$ac_try;; | |
1529 | esac | |
1530 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1531 | $as_echo "$ac_try_echo"; } >&5 | |
1532 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1533 | ac_status=$? | |
1534 | if test -s conftest.err; then | |
1535 | grep -v '^ *+' conftest.err >conftest.er1 | |
1536 | cat conftest.er1 >&5 | |
1537 | mv -f conftest.er1 conftest.err | |
1538 | fi | |
1539 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1540 | test $ac_status = 0; } > conftest.i && { | |
1541 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1542 | test ! -s conftest.err | |
1543 | }; then : | |
1544 | ac_retval=0 | |
1545 | else | |
1546 | $as_echo "$as_me: failed program was:" >&5 | |
1547 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1548 | ||
1549 | ac_retval=1 | |
1550 | fi | |
1551 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1552 | as_fn_set_status $ac_retval | |
1553 | ||
1554 | } # ac_fn_c_try_cpp | |
1555 | ||
1556 | # ac_fn_c_try_run LINENO | |
1557 | # ---------------------- | |
1558 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1559 | # that executables *can* be run. | |
1560 | ac_fn_c_try_run () | |
1561 | { | |
1562 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1563 | if { { ac_try="$ac_link" | |
1564 | case "(($ac_try" in | |
1565 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1566 | *) ac_try_echo=$ac_try;; | |
1567 | esac | |
1568 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1569 | $as_echo "$ac_try_echo"; } >&5 | |
1570 | (eval "$ac_link") 2>&5 | |
1571 | ac_status=$? | |
1572 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1573 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1574 | { { case "(($ac_try" in | |
1575 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1576 | *) ac_try_echo=$ac_try;; | |
1577 | esac | |
1578 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1579 | $as_echo "$ac_try_echo"; } >&5 | |
1580 | (eval "$ac_try") 2>&5 | |
1581 | ac_status=$? | |
1582 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1583 | test $ac_status = 0; }; }; then : | |
1584 | ac_retval=0 | |
1585 | else | |
1586 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1587 | $as_echo "$as_me: failed program was:" >&5 | |
1588 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1589 | ||
1590 | ac_retval=$ac_status | |
1591 | fi | |
1592 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1593 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1594 | as_fn_set_status $ac_retval | |
1595 | ||
1596 | } # ac_fn_c_try_run | |
1597 | ||
1598 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
1599 | # ------------------------------------------------------- | |
1600 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1601 | # the include files in INCLUDES and setting the cache variable VAR | |
1602 | # accordingly. | |
1603 | ac_fn_c_check_header_mongrel () | |
1604 | { | |
1605 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1606 | if eval \${$3+:} false; then : | |
1607 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1608 | $as_echo_n "checking for $2... " >&6; } | |
1609 | if eval \${$3+:} false; then : | |
1610 | $as_echo_n "(cached) " >&6 | |
1611 | fi | |
1612 | eval ac_res=\$$3 | |
1613 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1614 | $as_echo "$ac_res" >&6; } | |
1615 | else | |
1616 | # Is the header compilable? | |
1617 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1618 | $as_echo_n "checking $2 usability... " >&6; } | |
1619 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1620 | /* end confdefs.h. */ | |
1621 | $4 | |
1622 | #include <$2> | |
1623 | _ACEOF | |
1624 | if ac_fn_c_try_compile "$LINENO"; then : | |
1625 | ac_header_compiler=yes | |
1626 | else | |
1627 | ac_header_compiler=no | |
1628 | fi | |
1629 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1630 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1631 | $as_echo "$ac_header_compiler" >&6; } | |
1632 | ||
1633 | # Is the header present? | |
1634 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1635 | $as_echo_n "checking $2 presence... " >&6; } | |
1636 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1637 | /* end confdefs.h. */ | |
1638 | #include <$2> | |
1639 | _ACEOF | |
1640 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1641 | ac_header_preproc=yes | |
1642 | else | |
1643 | ac_header_preproc=no | |
1644 | fi | |
1645 | rm -f conftest.err conftest.i conftest.$ac_ext | |
1646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1647 | $as_echo "$ac_header_preproc" >&6; } | |
1648 | ||
1649 | # So? What about this header? | |
1650 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1651 | yes:no: ) | |
1652 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1653 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1654 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1655 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1656 | ;; | |
1657 | no:yes:* ) | |
1658 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1659 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1660 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1661 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1662 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1663 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1664 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1665 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1666 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1667 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1668 | ( $as_echo "## ------------------------------------------ ## | |
1669 | ## Report this to meand@users.sourceforge.net ## | |
1670 | ## ------------------------------------------ ##" | |
1671 | ) | sed "s/^/$as_me: WARNING: /" >&2 | |
1672 | ;; | |
1673 | esac | |
1674 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1675 | $as_echo_n "checking for $2... " >&6; } | |
1676 | if eval \${$3+:} false; then : | |
1677 | $as_echo_n "(cached) " >&6 | |
1678 | else | |
1679 | eval "$3=\$ac_header_compiler" | |
1680 | fi | |
1681 | eval ac_res=\$$3 | |
1682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1683 | $as_echo "$ac_res" >&6; } | |
1684 | fi | |
1685 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1686 | ||
1687 | } # ac_fn_c_check_header_mongrel | |
1688 | ||
1689 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
1690 | # ------------------------------------------------------- | |
1691 | # Tests whether HEADER exists and can be compiled using the include files in | |
1692 | # INCLUDES, setting the cache variable VAR accordingly. | |
1693 | ac_fn_c_check_header_compile () | |
1694 | { | |
1695 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1697 | $as_echo_n "checking for $2... " >&6; } | |
1698 | if eval \${$3+:} false; then : | |
1699 | $as_echo_n "(cached) " >&6 | |
1700 | else | |
1701 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1702 | /* end confdefs.h. */ | |
1703 | $4 | |
1704 | #include <$2> | |
1705 | _ACEOF | |
1706 | if ac_fn_c_try_compile "$LINENO"; then : | |
1707 | eval "$3=yes" | |
1708 | else | |
1709 | eval "$3=no" | |
1710 | fi | |
1711 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1712 | fi | |
1713 | eval ac_res=\$$3 | |
1714 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1715 | $as_echo "$ac_res" >&6; } | |
1716 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1717 | ||
1718 | } # ac_fn_c_check_header_compile | |
1719 | ||
1720 | # ac_fn_c_try_link LINENO | |
1721 | # ----------------------- | |
1722 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1723 | ac_fn_c_try_link () | |
1724 | { | |
1725 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1726 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1727 | if { { ac_try="$ac_link" | |
1728 | case "(($ac_try" in | |
1729 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1730 | *) ac_try_echo=$ac_try;; | |
1731 | esac | |
1732 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1733 | $as_echo "$ac_try_echo"; } >&5 | |
1734 | (eval "$ac_link") 2>conftest.err | |
1735 | ac_status=$? | |
1736 | if test -s conftest.err; then | |
1737 | grep -v '^ *+' conftest.err >conftest.er1 | |
1738 | cat conftest.er1 >&5 | |
1739 | mv -f conftest.er1 conftest.err | |
1740 | fi | |
1741 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1742 | test $ac_status = 0; } && { | |
1743 | test -z "$ac_c_werror_flag" || | |
1744 | test ! -s conftest.err | |
1745 | } && test -s conftest$ac_exeext && { | |
1746 | test "$cross_compiling" = yes || | |
1747 | test -x conftest$ac_exeext | |
1748 | }; then : | |
1749 | ac_retval=0 | |
1750 | else | |
1751 | $as_echo "$as_me: failed program was:" >&5 | |
1752 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1753 | ||
1754 | ac_retval=1 | |
1755 | fi | |
1756 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
1757 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1758 | # interfere with the next link command; also delete a directory that is | |
1759 | # left behind by Apple's compiler. We do this before executing the actions. | |
1760 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1761 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1762 | as_fn_set_status $ac_retval | |
1763 | ||
1764 | } # ac_fn_c_try_link | |
1765 | ||
1766 | # ac_fn_c_check_func LINENO FUNC VAR | |
1767 | # ---------------------------------- | |
1768 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
1769 | ac_fn_c_check_func () | |
1770 | { | |
1771 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1772 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1773 | $as_echo_n "checking for $2... " >&6; } | |
1774 | if eval \${$3+:} false; then : | |
1775 | $as_echo_n "(cached) " >&6 | |
1776 | else | |
1777 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1778 | /* end confdefs.h. */ | |
1779 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
1780 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
1781 | #define $2 innocuous_$2 | |
1782 | ||
1783 | /* System header to define __stub macros and hopefully few prototypes, | |
1784 | which can conflict with char $2 (); below. | |
1785 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
1786 | <limits.h> exists even on freestanding compilers. */ | |
1787 | ||
1788 | #ifdef __STDC__ | |
1789 | # include <limits.h> | |
1790 | #else | |
1791 | # include <assert.h> | |
1792 | #endif | |
1793 | ||
1794 | #undef $2 | |
1795 | ||
1796 | /* Override any GCC internal prototype to avoid an error. | |
1797 | Use char because int might match the return type of a GCC | |
1798 | builtin and then its argument prototype would still apply. */ | |
1799 | #ifdef __cplusplus | |
1800 | extern "C" | |
1801 | #endif | |
1802 | char $2 (); | |
1803 | /* The GNU C library defines this for functions which it implements | |
1804 | to always fail with ENOSYS. Some functions are actually named | |
1805 | something starting with __ and the normal name is an alias. */ | |
1806 | #if defined __stub_$2 || defined __stub___$2 | |
1807 | choke me | |
1808 | #endif | |
1809 | ||
1810 | int | |
1811 | main () | |
1812 | { | |
1813 | return $2 (); | |
1814 | ; | |
1815 | return 0; | |
1816 | } | |
1817 | _ACEOF | |
1818 | if ac_fn_c_try_link "$LINENO"; then : | |
1819 | eval "$3=yes" | |
1820 | else | |
1821 | eval "$3=no" | |
1822 | fi | |
1823 | rm -f core conftest.err conftest.$ac_objext \ | |
1824 | conftest$ac_exeext conftest.$ac_ext | |
1825 | fi | |
1826 | eval ac_res=\$$3 | |
1827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1828 | $as_echo "$ac_res" >&6; } | |
1829 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1830 | ||
1831 | } # ac_fn_c_check_func | |
1832 | cat >config.log <<_ACEOF | |
1833 | This file contains any messages produced by compilers while | |
1834 | running configure, to aid debugging if configure makes a mistake. | |
1835 | ||
1836 | It was created by nettoe $as_me 1.5.1, which was | |
1837 | generated by GNU Autoconf 2.69. Invocation command line was | |
1838 | ||
1839 | $ $0 $@ | |
1840 | ||
1841 | _ACEOF | |
1842 | exec 5>>config.log | |
1843 | { | |
1844 | cat <<_ASUNAME | |
1845 | ## --------- ## | |
1846 | ## Platform. ## | |
1847 | ## --------- ## | |
1848 | ||
1849 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1850 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1851 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1852 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1853 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1854 | ||
1855 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1856 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1857 | ||
1858 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1859 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1860 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
1861 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
1862 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
1863 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1864 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1865 | ||
1866 | _ASUNAME | |
1867 | ||
1868 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1869 | for as_dir in $PATH | |
1870 | do | |
1871 | IFS=$as_save_IFS | |
1872 | test -z "$as_dir" && as_dir=. | |
1873 | $as_echo "PATH: $as_dir" | |
1874 | done | |
1875 | IFS=$as_save_IFS | |
1876 | ||
1877 | } >&5 | |
1878 | ||
1879 | cat >&5 <<_ACEOF | |
1880 | ||
1881 | ||
1882 | ## ----------- ## | |
1883 | ## Core tests. ## | |
1884 | ## ----------- ## | |
1885 | ||
1886 | _ACEOF | |
1887 | ||
1888 | ||
1889 | # Keep a trace of the command line. | |
1890 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1891 | # Strip out --silent because we don't want to record it for future runs. | |
1892 | # Also quote any args containing shell meta-characters. | |
1893 | # Make two passes to allow for proper duplicate-argument suppression. | |
1894 | ac_configure_args= | |
1895 | ac_configure_args0= | |
1896 | ac_configure_args1= | |
1897 | ac_must_keep_next=false | |
1898 | for ac_pass in 1 2 | |
1899 | do | |
1900 | for ac_arg | |
1901 | do | |
1902 | case $ac_arg in | |
1903 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1904 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1905 | | -silent | --silent | --silen | --sile | --sil) | |
1906 | continue ;; | |
1907 | *\'*) | |
1908 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1909 | esac | |
1910 | case $ac_pass in | |
1911 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
1912 | 2) | |
1913 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
1914 | if test $ac_must_keep_next = true; then | |
1915 | ac_must_keep_next=false # Got value, back to normal. | |
1916 | else | |
1917 | case $ac_arg in | |
1918 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1919 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1920 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1921 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1922 | case "$ac_configure_args0 " in | |
1923 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1924 | esac | |
1925 | ;; | |
1926 | -* ) ac_must_keep_next=true ;; | |
1927 | esac | |
1928 | fi | |
1929 | as_fn_append ac_configure_args " '$ac_arg'" | |
1930 | ;; | |
1931 | esac | |
1932 | done | |
1933 | done | |
1934 | { ac_configure_args0=; unset ac_configure_args0;} | |
1935 | { ac_configure_args1=; unset ac_configure_args1;} | |
1936 | ||
1937 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1938 | # config.log. We remove comments because anyway the quotes in there | |
1939 | # would cause problems or look ugly. | |
1940 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
1941 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
1942 | trap 'exit_status=$? | |
1943 | # Save into config.log some information that might help in debugging. | |
1944 | { | |
1945 | echo | |
1946 | ||
1947 | $as_echo "## ---------------- ## | |
1948 | ## Cache variables. ## | |
1949 | ## ---------------- ##" | |
1950 | echo | |
1951 | # The following way of writing the cache mishandles newlines in values, | |
1952 | ( | |
1953 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
1954 | eval ac_val=\$$ac_var | |
1955 | case $ac_val in #( | |
1956 | *${as_nl}*) | |
1957 | case $ac_var in #( | |
1958 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
1959 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
1960 | esac | |
1961 | case $ac_var in #( | |
1962 | _ | IFS | as_nl) ;; #( | |
1963 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
1964 | *) { eval $ac_var=; unset $ac_var;} ;; | |
1965 | esac ;; | |
1966 | esac | |
1967 | done | |
1968 | (set) 2>&1 | | |
1969 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
1970 | *${as_nl}ac_space=\ *) | |
1971 | sed -n \ | |
1972 | "s/'\''/'\''\\\\'\'''\''/g; | |
1973 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
1974 | ;; #( | |
1975 | *) | |
1976 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
1977 | ;; | |
1978 | esac | | |
1979 | sort | |
1980 | ) | |
1981 | echo | |
1982 | ||
1983 | $as_echo "## ----------------- ## | |
1984 | ## Output variables. ## | |
1985 | ## ----------------- ##" | |
1986 | echo | |
1987 | for ac_var in $ac_subst_vars | |
1988 | do | |
1989 | eval ac_val=\$$ac_var | |
1990 | case $ac_val in | |
1991 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
1992 | esac | |
1993 | $as_echo "$ac_var='\''$ac_val'\''" | |
1994 | done | sort | |
1995 | echo | |
1996 | ||
1997 | if test -n "$ac_subst_files"; then | |
1998 | $as_echo "## ------------------- ## | |
1999 | ## File substitutions. ## | |
2000 | ## ------------------- ##" | |
2001 | echo | |
2002 | for ac_var in $ac_subst_files | |
2003 | do | |
2004 | eval ac_val=\$$ac_var | |
2005 | case $ac_val in | |
2006 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2007 | esac | |
2008 | $as_echo "$ac_var='\''$ac_val'\''" | |
2009 | done | sort | |
2010 | echo | |
2011 | fi | |
2012 | ||
2013 | if test -s confdefs.h; then | |
2014 | $as_echo "## ----------- ## | |
2015 | ## confdefs.h. ## | |
2016 | ## ----------- ##" | |
2017 | echo | |
2018 | cat confdefs.h | |
2019 | echo | |
2020 | fi | |
2021 | test "$ac_signal" != 0 && | |
2022 | $as_echo "$as_me: caught signal $ac_signal" | |
2023 | $as_echo "$as_me: exit $exit_status" | |
2024 | } >&5 | |
2025 | rm -f core *.core core.conftest.* && | |
2026 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2027 | exit $exit_status | |
2028 | ' 0 | |
2029 | for ac_signal in 1 2 13 15; do | |
2030 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2031 | done | |
2032 | ac_signal=0 | |
2033 | ||
2034 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2035 | rm -f -r conftest* confdefs.h | |
2036 | ||
2037 | $as_echo "/* confdefs.h */" > confdefs.h | |
2038 | ||
2039 | # Predefined preprocessor variables. | |
2040 | ||
2041 | cat >>confdefs.h <<_ACEOF | |
2042 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2043 | _ACEOF | |
2044 | ||
2045 | cat >>confdefs.h <<_ACEOF | |
2046 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2047 | _ACEOF | |
2048 | ||
2049 | cat >>confdefs.h <<_ACEOF | |
2050 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2051 | _ACEOF | |
2052 | ||
2053 | cat >>confdefs.h <<_ACEOF | |
2054 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2055 | _ACEOF | |
2056 | ||
2057 | cat >>confdefs.h <<_ACEOF | |
2058 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2059 | _ACEOF | |
2060 | ||
2061 | cat >>confdefs.h <<_ACEOF | |
2062 | #define PACKAGE_URL "$PACKAGE_URL" | |
2063 | _ACEOF | |
2064 | ||
2065 | ||
2066 | # Let the site file select an alternate cache file if it wants to. | |
2067 | # Prefer an explicitly selected file to automatically selected ones. | |
2068 | ac_site_file1=NONE | |
2069 | ac_site_file2=NONE | |
2070 | if test -n "$CONFIG_SITE"; then | |
2071 | # We do not want a PATH search for config.site. | |
2072 | case $CONFIG_SITE in #(( | |
2073 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2074 | */*) ac_site_file1=$CONFIG_SITE;; | |
2075 | *) ac_site_file1=./$CONFIG_SITE;; | |
2076 | esac | |
2077 | elif test "x$prefix" != xNONE; then | |
2078 | ac_site_file1=$prefix/share/config.site | |
2079 | ac_site_file2=$prefix/etc/config.site | |
2080 | else | |
2081 | ac_site_file1=$ac_default_prefix/share/config.site | |
2082 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2083 | fi | |
2084 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2085 | do | |
2086 | test "x$ac_site_file" = xNONE && continue | |
2087 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then | |
2088 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2089 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2090 | sed 's/^/| /' "$ac_site_file" >&5 | |
2091 | . "$ac_site_file" \ | |
2092 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2093 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2094 | as_fn_error $? "failed to load site script $ac_site_file | |
2095 | See \`config.log' for more details" "$LINENO" 5; } | |
2096 | fi | |
2097 | done | |
2098 | ||
2099 | if test -r "$cache_file"; then | |
2100 | # Some versions of bash will fail to source /dev/null (special files | |
2101 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2102 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
2103 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2104 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2105 | case $cache_file in | |
2106 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2107 | *) . "./$cache_file";; | |
2108 | esac | |
2109 | fi | |
2110 | else | |
2111 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2112 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2113 | >$cache_file | |
2114 | fi | |
2115 | ||
2116 | # Check that the precious variables saved in the cache have kept the same | |
2117 | # value. | |
2118 | ac_cache_corrupted=false | |
2119 | for ac_var in $ac_precious_vars; do | |
2120 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2121 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2122 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2123 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2124 | case $ac_old_set,$ac_new_set in | |
2125 | set,) | |
2126 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2127 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2128 | ac_cache_corrupted=: ;; | |
2129 | ,set) | |
2130 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2131 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2132 | ac_cache_corrupted=: ;; | |
2133 | ,);; | |
2134 | *) | |
2135 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2136 | # differences in whitespace do not lead to failure. | |
2137 | ac_old_val_w=`echo x $ac_old_val` | |
2138 | ac_new_val_w=`echo x $ac_new_val` | |
2139 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2140 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2141 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2142 | ac_cache_corrupted=: | |
2143 | else | |
2144 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2145 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2146 | eval $ac_var=\$ac_old_val | |
2147 | fi | |
2148 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2149 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2150 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2151 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2152 | fi;; | |
2153 | esac | |
2154 | # Pass precious variables to config.status. | |
2155 | if test "$ac_new_set" = set; then | |
2156 | case $ac_new_val in | |
2157 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2158 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2159 | esac | |
2160 | case " $ac_configure_args " in | |
2161 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2162 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2163 | esac | |
2164 | fi | |
2165 | done | |
2166 | if $ac_cache_corrupted; then | |
2167 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2168 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2169 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2170 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2171 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2172 | fi | |
2173 | ## -------------------- ## | |
2174 | ## Main body of script. ## | |
2175 | ## -------------------- ## | |
2176 | ||
2177 | ac_ext=c | |
2178 | ac_cpp='$CPP $CPPFLAGS' | |
2179 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2180 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2181 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2182 | ||
2183 | ||
2184 | ||
2185 | ||
2186 | ||
2187 | ||
2188 | ac_aux_dir= | |
2189 | for ac_dir in build-aux "$srcdir"/build-aux; do | |
2190 | if test -f "$ac_dir/install-sh"; then | |
2191 | ac_aux_dir=$ac_dir | |
2192 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
2193 | break | |
2194 | elif test -f "$ac_dir/install.sh"; then | |
2195 | ac_aux_dir=$ac_dir | |
2196 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
2197 | break | |
2198 | elif test -f "$ac_dir/shtool"; then | |
2199 | ac_aux_dir=$ac_dir | |
2200 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
2201 | break | |
2202 | fi | |
2203 | done | |
2204 | if test -z "$ac_aux_dir"; then | |
2205 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 | |
2206 | fi | |
2207 | ||
2208 | # These three variables are undocumented and unsupported, | |
2209 | # and are intended to be withdrawn in a future Autoconf release. | |
2210 | # They can cause serious problems if a builder's source tree is in a directory | |
2211 | # whose full name contains unusual characters. | |
2212 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
2213 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
2214 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
2215 | ||
2216 | ||
2217 | ac_config_headers="$ac_config_headers config.h" | |
2218 | ||
2219 | # Make sure we can run config.sub. | |
2220 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
2221 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
2222 | ||
2223 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
2224 | $as_echo_n "checking build system type... " >&6; } | |
2225 | if ${ac_cv_build+:} false; then : | |
2226 | $as_echo_n "(cached) " >&6 | |
2227 | else | |
2228 | ac_build_alias=$build_alias | |
2229 | test "x$ac_build_alias" = x && | |
2230 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
2231 | test "x$ac_build_alias" = x && | |
2232 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 | |
2233 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
2234 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
2235 | ||
2236 | fi | |
2237 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
2238 | $as_echo "$ac_cv_build" >&6; } | |
2239 | case $ac_cv_build in | |
2240 | *-*-*) ;; | |
2241 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; | |
2242 | esac | |
2243 | build=$ac_cv_build | |
2244 | ac_save_IFS=$IFS; IFS='-' | |
2245 | set x $ac_cv_build | |
2246 | shift | |
2247 | build_cpu=$1 | |
2248 | build_vendor=$2 | |
2249 | shift; shift | |
2250 | # Remember, the first character of IFS is used to create $*, | |
2251 | # except with old shells: | |
2252 | build_os=$* | |
2253 | IFS=$ac_save_IFS | |
2254 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
2255 | ||
2256 | ||
2257 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
2258 | $as_echo_n "checking host system type... " >&6; } | |
2259 | if ${ac_cv_host+:} false; then : | |
2260 | $as_echo_n "(cached) " >&6 | |
2261 | else | |
2262 | if test "x$host_alias" = x; then | |
2263 | ac_cv_host=$ac_cv_build | |
2264 | else | |
2265 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
2266 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
2267 | fi | |
2268 | ||
2269 | fi | |
2270 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
2271 | $as_echo "$ac_cv_host" >&6; } | |
2272 | case $ac_cv_host in | |
2273 | *-*-*) ;; | |
2274 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; | |
2275 | esac | |
2276 | host=$ac_cv_host | |
2277 | ac_save_IFS=$IFS; IFS='-' | |
2278 | set x $ac_cv_host | |
2279 | shift | |
2280 | host_cpu=$1 | |
2281 | host_vendor=$2 | |
2282 | shift; shift | |
2283 | # Remember, the first character of IFS is used to create $*, | |
2284 | # except with old shells: | |
2285 | host_os=$* | |
2286 | IFS=$ac_save_IFS | |
2287 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
2288 | ||
2289 | ||
2290 | ||
2291 | am__api_version='1.11' | |
2292 | ||
2293 | # Find a good install program. We prefer a C program (faster), | |
2294 | # so one script is as good as another. But avoid the broken or | |
2295 | # incompatible versions: | |
2296 | # SysV /etc/install, /usr/sbin/install | |
2297 | # SunOS /usr/etc/install | |
2298 | # IRIX /sbin/install | |
2299 | # AIX /bin/install | |
2300 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
2301 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
2302 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2303 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2304 | # OS/2's system install, which has a completely different semantic | |
2305 | # ./install, which can be erroneously created by make from ./install.sh. | |
2306 | # Reject install programs that cannot install multiple files. | |
2307 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
2308 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
2309 | if test -z "$INSTALL"; then | |
2310 | if ${ac_cv_path_install+:} false; then : | |
2311 | $as_echo_n "(cached) " >&6 | |
2312 | else | |
2313 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2314 | for as_dir in $PATH | |
2315 | do | |
2316 | IFS=$as_save_IFS | |
2317 | test -z "$as_dir" && as_dir=. | |
2318 | # Account for people who put trailing slashes in PATH elements. | |
2319 | case $as_dir/ in #(( | |
2320 | ./ | .// | /[cC]/* | \ | |
2321 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
2322 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
2323 | /usr/ucb/* ) ;; | |
2324 | *) | |
2325 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2326 | # Don't use installbsd from OSF since it installs stuff as root | |
2327 | # by default. | |
2328 | for ac_prog in ginstall scoinst install; do | |
2329 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2330 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then | |
2331 | if test $ac_prog = install && | |
2332 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
2333 | # AIX install. It has an incompatible calling convention. | |
2334 | : | |
2335 | elif test $ac_prog = install && | |
2336 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
2337 | # program-specific install script used by HP pwplus--don't use. | |
2338 | : | |
2339 | else | |
2340 | rm -rf conftest.one conftest.two conftest.dir | |
2341 | echo one > conftest.one | |
2342 | echo two > conftest.two | |
2343 | mkdir conftest.dir | |
2344 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
2345 | test -s conftest.one && test -s conftest.two && | |
2346 | test -s conftest.dir/conftest.one && | |
2347 | test -s conftest.dir/conftest.two | |
2348 | then | |
2349 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
2350 | break 3 | |
2351 | fi | |
2352 | fi | |
2353 | fi | |
2354 | done | |
2355 | done | |
2356 | ;; | |
2357 | esac | |
2358 | ||
2359 | done | |
2360 | IFS=$as_save_IFS | |
2361 | ||
2362 | rm -rf conftest.one conftest.two conftest.dir | |
2363 | ||
2364 | fi | |
2365 | if test "${ac_cv_path_install+set}" = set; then | |
2366 | INSTALL=$ac_cv_path_install | |
2367 | else | |
2368 | # As a last resort, use the slow shell script. Don't cache a | |
2369 | # value for INSTALL within a source directory, because that will | |
2370 | # break other packages using the cache if that directory is | |
2371 | # removed, or if the value is a relative name. | |
2372 | INSTALL=$ac_install_sh | |
2373 | fi | |
2374 | fi | |
2375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
2376 | $as_echo "$INSTALL" >&6; } | |
2377 | ||
2378 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2379 | # It thinks the first close brace ends the variable substitution. | |
2380 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2381 | ||
2382 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
2383 | ||
2384 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2385 | ||
2386 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 | |
2387 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
2388 | # Just in case | |
2389 | sleep 1 | |
2390 | echo timestamp > conftest.file | |
2391 | # Reject unsafe characters in $srcdir or the absolute working directory | |
2392 | # name. Accept space and tab only in the latter. | |
2393 | am_lf=' | |
2394 | ' | |
2395 | case `pwd` in | |
2396 | *[\\\"\#\$\&\'\`$am_lf]*) | |
2397 | as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; | |
2398 | esac | |
2399 | case $srcdir in | |
2400 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
2401 | as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; | |
2402 | esac | |
2403 | ||
2404 | # Do `set' in a subshell so we don't clobber the current shell's | |
2405 | # arguments. Must try -L first in case configure is actually a | |
2406 | # symlink; some systems play weird games with the mod time of symlinks | |
2407 | # (eg FreeBSD returns the mod time of the symlink's containing | |
2408 | # directory). | |
2409 | if ( | |
2410 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
2411 | if test "$*" = "X"; then | |
2412 | # -L didn't work. | |
2413 | set X `ls -t "$srcdir/configure" conftest.file` | |
2414 | fi | |
2415 | rm -f conftest.file | |
2416 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
2417 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
2418 | ||
2419 | # If neither matched, then we have a broken ls. This can happen | |
2420 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
2421 | # broken ls alias from the environment. This has actually | |
2422 | # happened. Such a system could not be considered "sane". | |
2423 | as_fn_error $? "ls -t appears to fail. Make sure there is not a broken | |
2424 | alias in your environment" "$LINENO" 5 | |
2425 | fi | |
2426 | ||
2427 | test "$2" = conftest.file | |
2428 | ) | |
2429 | then | |
2430 | # Ok. | |
2431 | : | |
2432 | else | |
2433 | as_fn_error $? "newly created file is older than distributed files! | |
2434 | Check your system clock" "$LINENO" 5 | |
2435 | fi | |
2436 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
2437 | $as_echo "yes" >&6; } | |
2438 | test "$program_prefix" != NONE && | |
2439 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
2440 | # Use a double $ so make ignores it. | |
2441 | test "$program_suffix" != NONE && | |
2442 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
2443 | # Double any \ or $. | |
2444 | # By default was `s,x,x', remove it if useless. | |
2445 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
2446 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
2447 | ||
2448 | # expand $ac_aux_dir to an absolute path | |
2449 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
2450 | ||
2451 | if test x"${MISSING+set}" != xset; then | |
2452 | case $am_aux_dir in | |
2453 | *\ * | *\ *) | |
2454 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
2455 | *) | |
2456 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
2457 | esac | |
2458 | fi | |
2459 | # Use eval to expand $SHELL | |
2460 | if eval "$MISSING --run true"; then | |
2461 | am_missing_run="$MISSING --run " | |
2462 | else | |
2463 | am_missing_run= | |
2464 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 | |
2465 | $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
2466 | fi | |
2467 | ||
2468 | if test x"${install_sh}" != xset; then | |
2469 | case $am_aux_dir in | |
2470 | *\ * | *\ *) | |
2471 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
2472 | *) | |
2473 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
2474 | esac | |
2475 | fi | |
2476 | ||
2477 | # Installed binaries are usually stripped using `strip' when the user | |
2478 | # run `make install-strip'. However `strip' might not be the right | |
2479 | # tool to use in cross-compilation environments, therefore Automake | |
2480 | # will honor the `STRIP' environment variable to overrule this program. | |
2481 | if test "$cross_compiling" != no; then | |
2482 | if test -n "$ac_tool_prefix"; then | |
2483 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
2484 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
2485 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2486 | $as_echo_n "checking for $ac_word... " >&6; } | |
2487 | if ${ac_cv_prog_STRIP+:} false; then : | |
2488 | $as_echo_n "(cached) " >&6 | |
2489 | else | |
2490 | if test -n "$STRIP"; then | |
2491 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
2492 | else | |
2493 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2494 | for as_dir in $PATH | |
2495 | do | |
2496 | IFS=$as_save_IFS | |
2497 | test -z "$as_dir" && as_dir=. | |
2498 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2499 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2500 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
2501 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2502 | break 2 | |
2503 | fi | |
2504 | done | |
2505 | done | |
2506 | IFS=$as_save_IFS | |
2507 | ||
2508 | fi | |
2509 | fi | |
2510 | STRIP=$ac_cv_prog_STRIP | |
2511 | if test -n "$STRIP"; then | |
2512 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
2513 | $as_echo "$STRIP" >&6; } | |
2514 | else | |
2515 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2516 | $as_echo "no" >&6; } | |
2517 | fi | |
2518 | ||
2519 | ||
2520 | fi | |
2521 | if test -z "$ac_cv_prog_STRIP"; then | |
2522 | ac_ct_STRIP=$STRIP | |
2523 | # Extract the first word of "strip", so it can be a program name with args. | |
2524 | set dummy strip; ac_word=$2 | |
2525 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2526 | $as_echo_n "checking for $ac_word... " >&6; } | |
2527 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : | |
2528 | $as_echo_n "(cached) " >&6 | |
2529 | else | |
2530 | if test -n "$ac_ct_STRIP"; then | |
2531 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
2532 | else | |
2533 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2534 | for as_dir in $PATH | |
2535 | do | |
2536 | IFS=$as_save_IFS | |
2537 | test -z "$as_dir" && as_dir=. | |
2538 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2539 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2540 | ac_cv_prog_ac_ct_STRIP="strip" | |
2541 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2542 | break 2 | |
2543 | fi | |
2544 | done | |
2545 | done | |
2546 | IFS=$as_save_IFS | |
2547 | ||
2548 | fi | |
2549 | fi | |
2550 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
2551 | if test -n "$ac_ct_STRIP"; then | |
2552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
2553 | $as_echo "$ac_ct_STRIP" >&6; } | |
2554 | else | |
2555 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2556 | $as_echo "no" >&6; } | |
2557 | fi | |
2558 | ||
2559 | if test "x$ac_ct_STRIP" = x; then | |
2560 | STRIP=":" | |
2561 | else | |
2562 | case $cross_compiling:$ac_tool_warned in | |
2563 | yes:) | |
2564 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2565 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2566 | ac_tool_warned=yes ;; | |
2567 | esac | |
2568 | STRIP=$ac_ct_STRIP | |
2569 | fi | |
2570 | else | |
2571 | STRIP="$ac_cv_prog_STRIP" | |
2572 | fi | |
2573 | ||
2574 | fi | |
2575 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
2576 | ||
2577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
2578 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
2579 | if test -z "$MKDIR_P"; then | |
2580 | if ${ac_cv_path_mkdir+:} false; then : | |
2581 | $as_echo_n "(cached) " >&6 | |
2582 | else | |
2583 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2584 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
2585 | do | |
2586 | IFS=$as_save_IFS | |
2587 | test -z "$as_dir" && as_dir=. | |
2588 | for ac_prog in mkdir gmkdir; do | |
2589 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2590 | as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue | |
2591 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
2592 | 'mkdir (GNU coreutils) '* | \ | |
2593 | 'mkdir (coreutils) '* | \ | |
2594 | 'mkdir (fileutils) '4.1*) | |
2595 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
2596 | break 3;; | |
2597 | esac | |
2598 | done | |
2599 | done | |
2600 | done | |
2601 | IFS=$as_save_IFS | |
2602 | ||
2603 | fi | |
2604 | ||
2605 | test -d ./--version && rmdir ./--version | |
2606 | if test "${ac_cv_path_mkdir+set}" = set; then | |
2607 | MKDIR_P="$ac_cv_path_mkdir -p" | |
2608 | else | |
2609 | # As a last resort, use the slow shell script. Don't cache a | |
2610 | # value for MKDIR_P within a source directory, because that will | |
2611 | # break other packages using the cache if that directory is | |
2612 | # removed, or if the value is a relative name. | |
2613 | MKDIR_P="$ac_install_sh -d" | |
2614 | fi | |
2615 | fi | |
2616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 | |
2617 | $as_echo "$MKDIR_P" >&6; } | |
2618 | ||
2619 | mkdir_p="$MKDIR_P" | |
2620 | case $mkdir_p in | |
2621 | [\\/$]* | ?:[\\/]*) ;; | |
2622 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
2623 | esac | |
2624 | ||
2625 | for ac_prog in gawk mawk nawk awk | |
2626 | do | |
2627 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2628 | set dummy $ac_prog; ac_word=$2 | |
2629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2630 | $as_echo_n "checking for $ac_word... " >&6; } | |
2631 | if ${ac_cv_prog_AWK+:} false; then : | |
2632 | $as_echo_n "(cached) " >&6 | |
2633 | else | |
2634 | if test -n "$AWK"; then | |
2635 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2636 | else | |
2637 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2638 | for as_dir in $PATH | |
2639 | do | |
2640 | IFS=$as_save_IFS | |
2641 | test -z "$as_dir" && as_dir=. | |
2642 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2643 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2644 | ac_cv_prog_AWK="$ac_prog" | |
2645 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2646 | break 2 | |
2647 | fi | |
2648 | done | |
2649 | done | |
2650 | IFS=$as_save_IFS | |
2651 | ||
2652 | fi | |
2653 | fi | |
2654 | AWK=$ac_cv_prog_AWK | |
2655 | if test -n "$AWK"; then | |
2656 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | |
2657 | $as_echo "$AWK" >&6; } | |
2658 | else | |
2659 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2660 | $as_echo "no" >&6; } | |
2661 | fi | |
2662 | ||
2663 | ||
2664 | test -n "$AWK" && break | |
2665 | done | |
2666 | ||
2667 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
2668 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
2669 | set x ${MAKE-make} | |
2670 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
2671 | if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : | |
2672 | $as_echo_n "(cached) " >&6 | |
2673 | else | |
2674 | cat >conftest.make <<\_ACEOF | |
2675 | SHELL = /bin/sh | |
2676 | all: | |
2677 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
2678 | _ACEOF | |
2679 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. | |
2680 | case `${MAKE-make} -f conftest.make 2>/dev/null` in | |
2681 | *@@@%%%=?*=@@@%%%*) | |
2682 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
2683 | *) | |
2684 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
2685 | esac | |
2686 | rm -f conftest.make | |
2687 | fi | |
2688 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
2689 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
2690 | $as_echo "yes" >&6; } | |
2691 | SET_MAKE= | |
2692 | else | |
2693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2694 | $as_echo "no" >&6; } | |
2695 | SET_MAKE="MAKE=${MAKE-make}" | |
2696 | fi | |
2697 | ||
2698 | rm -rf .tst 2>/dev/null | |
2699 | mkdir .tst 2>/dev/null | |
2700 | if test -d .tst; then | |
2701 | am__leading_dot=. | |
2702 | else | |
2703 | am__leading_dot=_ | |
2704 | fi | |
2705 | rmdir .tst 2>/dev/null | |
2706 | ||
2707 | if test "`cd $srcdir && pwd`" != "`pwd`"; then | |
2708 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
2709 | # is not polluted with repeated "-I." | |
2710 | am__isrc=' -I$(srcdir)' | |
2711 | # test to see if srcdir already configured | |
2712 | if test -f $srcdir/config.status; then | |
2713 | as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 | |
2714 | fi | |
2715 | fi | |
2716 | ||
2717 | # test whether we have cygpath | |
2718 | if test -z "$CYGPATH_W"; then | |
2719 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
2720 | CYGPATH_W='cygpath -w' | |
2721 | else | |
2722 | CYGPATH_W=echo | |
2723 | fi | |
2724 | fi | |
2725 | ||
2726 | ||
2727 | # Define the identity of the package. | |
2728 | PACKAGE='nettoe' | |
2729 | VERSION='1.5.1' | |
2730 | ||
2731 | ||
2732 | # Some tools Automake needs. | |
2733 | ||
2734 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
2735 | ||
2736 | ||
2737 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
2738 | ||
2739 | ||
2740 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
2741 | ||
2742 | ||
2743 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
2744 | ||
2745 | ||
2746 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
2747 | ||
2748 | # We need awk for the "check" target. The system "awk" is bad on | |
2749 | # some platforms. | |
2750 | # Always define AMTAR for backward compatibility. Yes, it's still used | |
2751 | # in the wild :-( We should find a proper way to deprecate it ... | |
2752 | AMTAR='$${TAR-tar}' | |
2753 | ||
2754 | am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' | |
2755 | ||
2756 | ||
2757 | ||
2758 | ||
2759 | ||
2760 | ||
2761 | ||
2762 | $as_echo "#define PACKAGE_RELEASE_DATE \"March 21th, 2014\"" >>confdefs.h | |
2763 | ||
2764 | ||
2765 | ||
2766 | # Check whether --with-terminfo was given. | |
2767 | if test "${with_terminfo+set}" = set; then : | |
2768 | withval=$with_terminfo; | |
2769 | fi | |
2770 | ||
2771 | ||
2772 | ||
2773 | # Check whether --with-port was given. | |
2774 | if test "${with_port+set}" = set; then : | |
2775 | withval=$with_port; | |
2776 | else | |
2777 | with_port=7501 | |
2778 | fi | |
2779 | ||
2780 | ||
2781 | # Check whether --enable-desktop was given. | |
2782 | if test "${enable_desktop+set}" = set; then : | |
2783 | enableval=$enable_desktop; | |
2784 | fi | |
2785 | ||
2786 | # Check whether --enable-menu was given. | |
2787 | if test "${enable_menu+set}" = set; then : | |
2788 | enableval=$enable_menu; | |
2789 | fi | |
2790 | ||
2791 | ||
2792 | if test "$enable_desktop" = yes; then | |
2793 | ENABLE_DESKTOP_TRUE= | |
2794 | ENABLE_DESKTOP_FALSE='#' | |
2795 | else | |
2796 | ENABLE_DESKTOP_TRUE='#' | |
2797 | ENABLE_DESKTOP_FALSE= | |
2798 | fi | |
2799 | ||
2800 | if test "$enable_menu" = yes; then | |
2801 | ENABLE_MENU_TRUE= | |
2802 | ENABLE_MENU_FALSE='#' | |
2803 | else | |
2804 | ENABLE_MENU_TRUE='#' | |
2805 | ENABLE_MENU_FALSE= | |
2806 | fi | |
2807 | ||
2808 | ||
2809 | ac_ext=c | |
2810 | ac_cpp='$CPP $CPPFLAGS' | |
2811 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2812 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2813 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2814 | if test -n "$ac_tool_prefix"; then | |
2815 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2816 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2817 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2818 | $as_echo_n "checking for $ac_word... " >&6; } | |
2819 | if ${ac_cv_prog_CC+:} false; then : | |
2820 | $as_echo_n "(cached) " >&6 | |
2821 | else | |
2822 | if test -n "$CC"; then | |
2823 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2824 | else | |
2825 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2826 | for as_dir in $PATH | |
2827 | do | |
2828 | IFS=$as_save_IFS | |
2829 | test -z "$as_dir" && as_dir=. | |
2830 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2831 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2832 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2833 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2834 | break 2 | |
2835 | fi | |
2836 | done | |
2837 | done | |
2838 | IFS=$as_save_IFS | |
2839 | ||
2840 | fi | |
2841 | fi | |
2842 | CC=$ac_cv_prog_CC | |
2843 | if test -n "$CC"; then | |
2844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2845 | $as_echo "$CC" >&6; } | |
2846 | else | |
2847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2848 | $as_echo "no" >&6; } | |
2849 | fi | |
2850 | ||
2851 | ||
2852 | fi | |
2853 | if test -z "$ac_cv_prog_CC"; then | |
2854 | ac_ct_CC=$CC | |
2855 | # Extract the first word of "gcc", so it can be a program name with args. | |
2856 | set dummy gcc; ac_word=$2 | |
2857 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2858 | $as_echo_n "checking for $ac_word... " >&6; } | |
2859 | if ${ac_cv_prog_ac_ct_CC+:} false; then : | |
2860 | $as_echo_n "(cached) " >&6 | |
2861 | else | |
2862 | if test -n "$ac_ct_CC"; then | |
2863 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2864 | else | |
2865 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2866 | for as_dir in $PATH | |
2867 | do | |
2868 | IFS=$as_save_IFS | |
2869 | test -z "$as_dir" && as_dir=. | |
2870 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2871 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2872 | ac_cv_prog_ac_ct_CC="gcc" | |
2873 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2874 | break 2 | |
2875 | fi | |
2876 | done | |
2877 | done | |
2878 | IFS=$as_save_IFS | |
2879 | ||
2880 | fi | |
2881 | fi | |
2882 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2883 | if test -n "$ac_ct_CC"; then | |
2884 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
2885 | $as_echo "$ac_ct_CC" >&6; } | |
2886 | else | |
2887 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2888 | $as_echo "no" >&6; } | |
2889 | fi | |
2890 | ||
2891 | if test "x$ac_ct_CC" = x; then | |
2892 | CC="" | |
2893 | else | |
2894 | case $cross_compiling:$ac_tool_warned in | |
2895 | yes:) | |
2896 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2897 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2898 | ac_tool_warned=yes ;; | |
2899 | esac | |
2900 | CC=$ac_ct_CC | |
2901 | fi | |
2902 | else | |
2903 | CC="$ac_cv_prog_CC" | |
2904 | fi | |
2905 | ||
2906 | if test -z "$CC"; then | |
2907 | if test -n "$ac_tool_prefix"; then | |
2908 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2909 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2910 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2911 | $as_echo_n "checking for $ac_word... " >&6; } | |
2912 | if ${ac_cv_prog_CC+:} false; then : | |
2913 | $as_echo_n "(cached) " >&6 | |
2914 | else | |
2915 | if test -n "$CC"; then | |
2916 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2917 | else | |
2918 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2919 | for as_dir in $PATH | |
2920 | do | |
2921 | IFS=$as_save_IFS | |
2922 | test -z "$as_dir" && as_dir=. | |
2923 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2924 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2925 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2926 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2927 | break 2 | |
2928 | fi | |
2929 | done | |
2930 | done | |
2931 | IFS=$as_save_IFS | |
2932 | ||
2933 | fi | |
2934 | fi | |
2935 | CC=$ac_cv_prog_CC | |
2936 | if test -n "$CC"; then | |
2937 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2938 | $as_echo "$CC" >&6; } | |
2939 | else | |
2940 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2941 | $as_echo "no" >&6; } | |
2942 | fi | |
2943 | ||
2944 | ||
2945 | fi | |
2946 | fi | |
2947 | if test -z "$CC"; then | |
2948 | # Extract the first word of "cc", so it can be a program name with args. | |
2949 | set dummy cc; ac_word=$2 | |
2950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2951 | $as_echo_n "checking for $ac_word... " >&6; } | |
2952 | if ${ac_cv_prog_CC+:} false; then : | |
2953 | $as_echo_n "(cached) " >&6 | |
2954 | else | |
2955 | if test -n "$CC"; then | |
2956 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2957 | else | |
2958 | ac_prog_rejected=no | |
2959 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2960 | for as_dir in $PATH | |
2961 | do | |
2962 | IFS=$as_save_IFS | |
2963 | test -z "$as_dir" && as_dir=. | |
2964 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2965 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2966 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2967 | ac_prog_rejected=yes | |
2968 | continue | |
2969 | fi | |
2970 | ac_cv_prog_CC="cc" | |
2971 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2972 | break 2 | |
2973 | fi | |
2974 | done | |
2975 | done | |
2976 | IFS=$as_save_IFS | |
2977 | ||
2978 | if test $ac_prog_rejected = yes; then | |
2979 | # We found a bogon in the path, so make sure we never use it. | |
2980 | set dummy $ac_cv_prog_CC | |
2981 | shift | |
2982 | if test $# != 0; then | |
2983 | # We chose a different compiler from the bogus one. | |
2984 | # However, it has the same basename, so the bogon will be chosen | |
2985 | # first if we set CC to just the basename; use the full file name. | |
2986 | shift | |
2987 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
2988 | fi | |
2989 | fi | |
2990 | fi | |
2991 | fi | |
2992 | CC=$ac_cv_prog_CC | |
2993 | if test -n "$CC"; then | |
2994 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2995 | $as_echo "$CC" >&6; } | |
2996 | else | |
2997 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2998 | $as_echo "no" >&6; } | |
2999 | fi | |
3000 | ||
3001 | ||
3002 | fi | |
3003 | if test -z "$CC"; then | |
3004 | if test -n "$ac_tool_prefix"; then | |
3005 | for ac_prog in cl.exe | |
3006 | do | |
3007 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3008 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3009 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3010 | $as_echo_n "checking for $ac_word... " >&6; } | |
3011 | if ${ac_cv_prog_CC+:} false; then : | |
3012 | $as_echo_n "(cached) " >&6 | |
3013 | else | |
3014 | if test -n "$CC"; then | |
3015 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3016 | else | |
3017 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3018 | for as_dir in $PATH | |
3019 | do | |
3020 | IFS=$as_save_IFS | |
3021 | test -z "$as_dir" && as_dir=. | |
3022 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3023 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3024 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
3025 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3026 | break 2 | |
3027 | fi | |
3028 | done | |
3029 | done | |
3030 | IFS=$as_save_IFS | |
3031 | ||
3032 | fi | |
3033 | fi | |
3034 | CC=$ac_cv_prog_CC | |
3035 | if test -n "$CC"; then | |
3036 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3037 | $as_echo "$CC" >&6; } | |
3038 | else | |
3039 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3040 | $as_echo "no" >&6; } | |
3041 | fi | |
3042 | ||
3043 | ||
3044 | test -n "$CC" && break | |
3045 | done | |
3046 | fi | |
3047 | if test -z "$CC"; then | |
3048 | ac_ct_CC=$CC | |
3049 | for ac_prog in cl.exe | |
3050 | do | |
3051 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3052 | set dummy $ac_prog; ac_word=$2 | |
3053 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3054 | $as_echo_n "checking for $ac_word... " >&6; } | |
3055 | if ${ac_cv_prog_ac_ct_CC+:} false; then : | |
3056 | $as_echo_n "(cached) " >&6 | |
3057 | else | |
3058 | if test -n "$ac_ct_CC"; then | |
3059 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3060 | else | |
3061 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3062 | for as_dir in $PATH | |
3063 | do | |
3064 | IFS=$as_save_IFS | |
3065 | test -z "$as_dir" && as_dir=. | |
3066 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3067 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3068 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
3069 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3070 | break 2 | |
3071 | fi | |
3072 | done | |
3073 | done | |
3074 | IFS=$as_save_IFS | |
3075 | ||
3076 | fi | |
3077 | fi | |
3078 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3079 | if test -n "$ac_ct_CC"; then | |
3080 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3081 | $as_echo "$ac_ct_CC" >&6; } | |
3082 | else | |
3083 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3084 | $as_echo "no" >&6; } | |
3085 | fi | |
3086 | ||
3087 | ||
3088 | test -n "$ac_ct_CC" && break | |
3089 | done | |
3090 | ||
3091 | if test "x$ac_ct_CC" = x; then | |
3092 | CC="" | |
3093 | else | |
3094 | case $cross_compiling:$ac_tool_warned in | |
3095 | yes:) | |
3096 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3097 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3098 | ac_tool_warned=yes ;; | |
3099 | esac | |
3100 | CC=$ac_ct_CC | |
3101 | fi | |
3102 | fi | |
3103 | ||
3104 | fi | |
3105 | ||
3106 | ||
3107 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3108 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3109 | as_fn_error $? "no acceptable C compiler found in \$PATH | |
3110 | See \`config.log' for more details" "$LINENO" 5; } | |
3111 | ||
3112 | # Provide some information about the compiler. | |
3113 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
3114 | set X $ac_compile | |
3115 | ac_compiler=$2 | |
3116 | for ac_option in --version -v -V -qversion; do | |
3117 | { { ac_try="$ac_compiler $ac_option >&5" | |
3118 | case "(($ac_try" in | |
3119 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3120 | *) ac_try_echo=$ac_try;; | |
3121 | esac | |
3122 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3123 | $as_echo "$ac_try_echo"; } >&5 | |
3124 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3125 | ac_status=$? | |
3126 | if test -s conftest.err; then | |
3127 | sed '10a\ | |
3128 | ... rest of stderr output deleted ... | |
3129 | 10q' conftest.err >conftest.er1 | |
3130 | cat conftest.er1 >&5 | |
3131 | fi | |
3132 | rm -f conftest.er1 conftest.err | |
3133 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3134 | test $ac_status = 0; } | |
3135 | done | |
3136 | ||
3137 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3138 | /* end confdefs.h. */ | |
3139 | ||
3140 | int | |
3141 | main () | |
3142 | { | |
3143 | ||
3144 | ; | |
3145 | return 0; | |
3146 | } | |
3147 | _ACEOF | |
3148 | ac_clean_files_save=$ac_clean_files | |
3149 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" | |
3150 | # Try to create an executable without -o first, disregard a.out. | |
3151 | # It will help us diagnose broken compilers, and finding out an intuition | |
3152 | # of exeext. | |
3153 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
3154 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
3155 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3156 | ||
3157 | # The possible output files: | |
3158 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3159 | ||
3160 | ac_rmfiles= | |
3161 | for ac_file in $ac_files | |
3162 | do | |
3163 | case $ac_file in | |
3164 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3165 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3166 | esac | |
3167 | done | |
3168 | rm -f $ac_rmfiles | |
3169 | ||
3170 | if { { ac_try="$ac_link_default" | |
3171 | case "(($ac_try" in | |
3172 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3173 | *) ac_try_echo=$ac_try;; | |
3174 | esac | |
3175 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3176 | $as_echo "$ac_try_echo"; } >&5 | |
3177 | (eval "$ac_link_default") 2>&5 | |
3178 | ac_status=$? | |
3179 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3180 | test $ac_status = 0; }; then : | |
3181 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3182 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3183 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3184 | # so that the user can short-circuit this test for compilers unknown to | |
3185 | # Autoconf. | |
3186 | for ac_file in $ac_files '' | |
3187 | do | |
3188 | test -f "$ac_file" || continue | |
3189 | case $ac_file in | |
3190 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
3191 | ;; | |
3192 | [ab].out ) | |
3193 | # We found the default executable, but exeext='' is most | |
3194 | # certainly right. | |
3195 | break;; | |
3196 | *.* ) | |
3197 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
3198 | then :; else | |
3199 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3200 | fi | |
3201 | # We set ac_cv_exeext here because the later test for it is not | |
3202 | # safe: cross compilers may not add the suffix if given an `-o' | |
3203 | # argument, so we may need to know it at that point already. | |
3204 | # Even if this section looks crufty: it has the advantage of | |
3205 | # actually working. | |
3206 | break;; | |
3207 | * ) | |
3208 | break;; | |
3209 | esac | |
3210 | done | |
3211 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
3212 | ||
3213 | else | |
3214 | ac_file='' | |
3215 | fi | |
3216 | if test -z "$ac_file"; then : | |
3217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3218 | $as_echo "no" >&6; } | |
3219 | $as_echo "$as_me: failed program was:" >&5 | |
3220 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3221 | ||
3222 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3223 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3224 | as_fn_error 77 "C compiler cannot create executables | |
3225 | See \`config.log' for more details" "$LINENO" 5; } | |
3226 | else | |
3227 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3228 | $as_echo "yes" >&6; } | |
3229 | fi | |
3230 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
3231 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3233 | $as_echo "$ac_file" >&6; } | |
3234 | ac_exeext=$ac_cv_exeext | |
3235 | ||
3236 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out | |
3237 | ac_clean_files=$ac_clean_files_save | |
3238 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3239 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3240 | if { { ac_try="$ac_link" | |
3241 | case "(($ac_try" in | |
3242 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3243 | *) ac_try_echo=$ac_try;; | |
3244 | esac | |
3245 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3246 | $as_echo "$ac_try_echo"; } >&5 | |
3247 | (eval "$ac_link") 2>&5 | |
3248 | ac_status=$? | |
3249 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3250 | test $ac_status = 0; }; then : | |
3251 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
3252 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3253 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3254 | # `rm'. | |
3255 | for ac_file in conftest.exe conftest conftest.*; do | |
3256 | test -f "$ac_file" || continue | |
3257 | case $ac_file in | |
3258 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3259 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3260 | break;; | |
3261 | * ) break;; | |
3262 | esac | |
3263 | done | |
3264 | else | |
3265 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3266 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3267 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link | |
3268 | See \`config.log' for more details" "$LINENO" 5; } | |
3269 | fi | |
3270 | rm -f conftest conftest$ac_cv_exeext | |
3271 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
3272 | $as_echo "$ac_cv_exeext" >&6; } | |
3273 | ||
3274 | rm -f conftest.$ac_ext | |
3275 | EXEEXT=$ac_cv_exeext | |
3276 | ac_exeext=$EXEEXT | |
3277 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3278 | /* end confdefs.h. */ | |
3279 | #include <stdio.h> | |
3280 | int | |
3281 | main () | |
3282 | { | |
3283 | FILE *f = fopen ("conftest.out", "w"); | |
3284 | return ferror (f) || fclose (f) != 0; | |
3285 | ||
3286 | ; | |
3287 | return 0; | |
3288 | } | |
3289 | _ACEOF | |
3290 | ac_clean_files="$ac_clean_files conftest.out" | |
3291 | # Check that the compiler produces executables we can run. If not, either | |
3292 | # the compiler is broken, or we cross compile. | |
3293 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3294 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3295 | if test "$cross_compiling" != yes; then | |
3296 | { { ac_try="$ac_link" | |
3297 | case "(($ac_try" in | |
3298 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3299 | *) ac_try_echo=$ac_try;; | |
3300 | esac | |
3301 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3302 | $as_echo "$ac_try_echo"; } >&5 | |
3303 | (eval "$ac_link") 2>&5 | |
3304 | ac_status=$? | |
3305 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3306 | test $ac_status = 0; } | |
3307 | if { ac_try='./conftest$ac_cv_exeext' | |
3308 | { { case "(($ac_try" in | |
3309 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3310 | *) ac_try_echo=$ac_try;; | |
3311 | esac | |
3312 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3313 | $as_echo "$ac_try_echo"; } >&5 | |
3314 | (eval "$ac_try") 2>&5 | |
3315 | ac_status=$? | |
3316 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3317 | test $ac_status = 0; }; }; then | |
3318 | cross_compiling=no | |
3319 | else | |
3320 | if test "$cross_compiling" = maybe; then | |
3321 | cross_compiling=yes | |
3322 | else | |
3323 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3324 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3325 | as_fn_error $? "cannot run C compiled programs. | |
3326 | If you meant to cross compile, use \`--host'. | |
3327 | See \`config.log' for more details" "$LINENO" 5; } | |
3328 | fi | |
3329 | fi | |
3330 | fi | |
3331 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3332 | $as_echo "$cross_compiling" >&6; } | |
3333 | ||
3334 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
3335 | ac_clean_files=$ac_clean_files_save | |
3336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
3337 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3338 | if ${ac_cv_objext+:} false; then : | |
3339 | $as_echo_n "(cached) " >&6 | |
3340 | else | |
3341 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3342 | /* end confdefs.h. */ | |
3343 | ||
3344 | int | |
3345 | main () | |
3346 | { | |
3347 | ||
3348 | ; | |
3349 | return 0; | |
3350 | } | |
3351 | _ACEOF | |
3352 | rm -f conftest.o conftest.obj | |
3353 | if { { ac_try="$ac_compile" | |
3354 | case "(($ac_try" in | |
3355 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3356 | *) ac_try_echo=$ac_try;; | |
3357 | esac | |
3358 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3359 | $as_echo "$ac_try_echo"; } >&5 | |
3360 | (eval "$ac_compile") 2>&5 | |
3361 | ac_status=$? | |
3362 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3363 | test $ac_status = 0; }; then : | |
3364 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3365 | test -f "$ac_file" || continue; | |
3366 | case $ac_file in | |
3367 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
3368 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
3369 | break;; | |
3370 | esac | |
3371 | done | |
3372 | else | |
3373 | $as_echo "$as_me: failed program was:" >&5 | |
3374 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3375 | ||
3376 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3377 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3378 | as_fn_error $? "cannot compute suffix of object files: cannot compile | |
3379 | See \`config.log' for more details" "$LINENO" 5; } | |
3380 | fi | |
3381 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
3382 | fi | |
3383 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 | |
3384 | $as_echo "$ac_cv_objext" >&6; } | |
3385 | OBJEXT=$ac_cv_objext | |
3386 | ac_objext=$OBJEXT | |
3387 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
3388 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3389 | if ${ac_cv_c_compiler_gnu+:} false; then : | |
3390 | $as_echo_n "(cached) " >&6 | |
3391 | else | |
3392 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3393 | /* end confdefs.h. */ | |
3394 | ||
3395 | int | |
3396 | main () | |
3397 | { | |
3398 | #ifndef __GNUC__ | |
3399 | choke me | |
3400 | #endif | |
3401 | ||
3402 | ; | |
3403 | return 0; | |
3404 | } | |
3405 | _ACEOF | |
3406 | if ac_fn_c_try_compile "$LINENO"; then : | |
3407 | ac_compiler_gnu=yes | |
3408 | else | |
3409 | ac_compiler_gnu=no | |
3410 | fi | |
3411 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3412 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
3413 | ||
3414 | fi | |
3415 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
3416 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3417 | if test $ac_compiler_gnu = yes; then | |
3418 | GCC=yes | |
3419 | else | |
3420 | GCC= | |
3421 | fi | |
3422 | ac_test_CFLAGS=${CFLAGS+set} | |
3423 | ac_save_CFLAGS=$CFLAGS | |
3424 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
3425 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3426 | if ${ac_cv_prog_cc_g+:} false; then : | |
3427 | $as_echo_n "(cached) " >&6 | |
3428 | else | |
3429 | ac_save_c_werror_flag=$ac_c_werror_flag | |
3430 | ac_c_werror_flag=yes | |
3431 | ac_cv_prog_cc_g=no | |
3432 | CFLAGS="-g" | |
3433 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3434 | /* end confdefs.h. */ | |
3435 | ||
3436 | int | |
3437 | main () | |
3438 | { | |
3439 | ||
3440 | ; | |
3441 | return 0; | |
3442 | } | |
3443 | _ACEOF | |
3444 | if ac_fn_c_try_compile "$LINENO"; then : | |
3445 | ac_cv_prog_cc_g=yes | |
3446 | else | |
3447 | CFLAGS="" | |
3448 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3449 | /* end confdefs.h. */ | |
3450 | ||
3451 | int | |
3452 | main () | |
3453 | { | |
3454 | ||
3455 | ; | |
3456 | return 0; | |
3457 | } | |
3458 | _ACEOF | |
3459 | if ac_fn_c_try_compile "$LINENO"; then : | |
3460 | ||
3461 | else | |
3462 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3463 | CFLAGS="-g" | |
3464 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3465 | /* end confdefs.h. */ | |
3466 | ||
3467 | int | |
3468 | main () | |
3469 | { | |
3470 | ||
3471 | ; | |
3472 | return 0; | |
3473 | } | |
3474 | _ACEOF | |
3475 | if ac_fn_c_try_compile "$LINENO"; then : | |
3476 | ac_cv_prog_cc_g=yes | |
3477 | fi | |
3478 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3479 | fi | |
3480 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3481 | fi | |
3482 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3483 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3484 | fi | |
3485 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
3486 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
3487 | if test "$ac_test_CFLAGS" = set; then | |
3488 | CFLAGS=$ac_save_CFLAGS | |
3489 | elif test $ac_cv_prog_cc_g = yes; then | |
3490 | if test "$GCC" = yes; then | |
3491 | CFLAGS="-g -O2" | |
3492 | else | |
3493 | CFLAGS="-g" | |
3494 | fi | |
3495 | else | |
3496 | if test "$GCC" = yes; then | |
3497 | CFLAGS="-O2" | |
3498 | else | |
3499 | CFLAGS= | |
3500 | fi | |
3501 | fi | |
3502 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
3503 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3504 | if ${ac_cv_prog_cc_c89+:} false; then : | |
3505 | $as_echo_n "(cached) " >&6 | |
3506 | else | |
3507 | ac_cv_prog_cc_c89=no | |
3508 | ac_save_CC=$CC | |
3509 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3510 | /* end confdefs.h. */ | |
3511 | #include <stdarg.h> | |
3512 | #include <stdio.h> | |
3513 | struct stat; | |
3514 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3515 | struct buf { int x; }; | |
3516 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3517 | static char *e (p, i) | |
3518 | char **p; | |
3519 | int i; | |
3520 | { | |
3521 | return p[i]; | |
3522 | } | |
3523 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3524 | { | |
3525 | char *s; | |
3526 | va_list v; | |
3527 | va_start (v,p); | |
3528 | s = g (p, va_arg (v,int)); | |
3529 | va_end (v); | |
3530 | return s; | |
3531 | } | |
3532 | ||
3533 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3534 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3535 | These don't provoke an error unfortunately, instead are silently treated | |
3536 | as 'x'. The following induces an error, until -std is added to get | |
3537 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
3538 | array size at least. It's necessary to write '\x00'==0 to get something | |
3539 | that's true only with -std. */ | |
3540 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
3541 | ||
3542 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
3543 | inside strings and character constants. */ | |
3544 | #define FOO(x) 'x' | |
3545 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3546 | ||
3547 | int test (int i, double x); | |
3548 | struct s1 {int (*f) (int a);}; | |
3549 | struct s2 {int (*f) (double a);}; | |
3550 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3551 | int argc; | |
3552 | char **argv; | |
3553 | int | |
3554 | main () | |
3555 | { | |
3556 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
3557 | ; | |
3558 | return 0; | |
3559 | } | |
3560 | _ACEOF | |
3561 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
3562 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
3563 | do | |
3564 | CC="$ac_save_CC $ac_arg" | |
3565 | if ac_fn_c_try_compile "$LINENO"; then : | |
3566 | ac_cv_prog_cc_c89=$ac_arg | |
3567 | fi | |
3568 | rm -f core conftest.err conftest.$ac_objext | |
3569 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
3570 | done | |
3571 | rm -f conftest.$ac_ext | |
3572 | CC=$ac_save_CC | |
3573 | ||
3574 | fi | |
3575 | # AC_CACHE_VAL | |
3576 | case "x$ac_cv_prog_cc_c89" in | |
3577 | x) | |
3578 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3579 | $as_echo "none needed" >&6; } ;; | |
3580 | xno) | |
3581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3582 | $as_echo "unsupported" >&6; } ;; | |
3583 | *) | |
3584 | CC="$CC $ac_cv_prog_cc_c89" | |
3585 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3586 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
3587 | esac | |
3588 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
3589 | ||
3590 | fi | |
3591 | ||
3592 | ac_ext=c | |
3593 | ac_cpp='$CPP $CPPFLAGS' | |
3594 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3595 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3596 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3597 | DEPDIR="${am__leading_dot}deps" | |
3598 | ||
3599 | ac_config_commands="$ac_config_commands depfiles" | |
3600 | ||
3601 | ||
3602 | am_make=${MAKE-make} | |
3603 | cat > confinc << 'END' | |
3604 | am__doit: | |
3605 | @echo this is the am__doit target | |
3606 | .PHONY: am__doit | |
3607 | END | |
3608 | # If we don't find an include directive, just comment out the code. | |
3609 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 | |
3610 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
3611 | am__include="#" | |
3612 | am__quote= | |
3613 | _am_result=none | |
3614 | # First try GNU make style include. | |
3615 | echo "include confinc" > confmf | |
3616 | # Ignore all kinds of additional output from `make'. | |
3617 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
3618 | *the\ am__doit\ target*) | |
3619 | am__include=include | |
3620 | am__quote= | |
3621 | _am_result=GNU | |
3622 | ;; | |
3623 | esac | |
3624 | # Now try BSD make style include. | |
3625 | if test "$am__include" = "#"; then | |
3626 | echo '.include "confinc"' > confmf | |
3627 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
3628 | *the\ am__doit\ target*) | |
3629 | am__include=.include | |
3630 | am__quote="\"" | |
3631 | _am_result=BSD | |
3632 | ;; | |
3633 | esac | |
3634 | fi | |
3635 | ||
3636 | ||
3637 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 | |
3638 | $as_echo "$_am_result" >&6; } | |
3639 | rm -f confinc confmf | |
3640 | ||
3641 | # Check whether --enable-dependency-tracking was given. | |
3642 | if test "${enable_dependency_tracking+set}" = set; then : | |
3643 | enableval=$enable_dependency_tracking; | |
3644 | fi | |
3645 | ||
3646 | if test "x$enable_dependency_tracking" != xno; then | |
3647 | am_depcomp="$ac_aux_dir/depcomp" | |
3648 | AMDEPBACKSLASH='\' | |
3649 | am__nodep='_no' | |
3650 | fi | |
3651 | if test "x$enable_dependency_tracking" != xno; then | |
3652 | AMDEP_TRUE= | |
3653 | AMDEP_FALSE='#' | |
3654 | else | |
3655 | AMDEP_TRUE='#' | |
3656 | AMDEP_FALSE= | |
3657 | fi | |
3658 | ||
3659 | ||
3660 | ||
3661 | depcc="$CC" am_compiler_list= | |
3662 | ||
3663 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
3664 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
3665 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : | |
3666 | $as_echo_n "(cached) " >&6 | |
3667 | else | |
3668 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
3669 | # We make a subdir and do the tests there. Otherwise we can end up | |
3670 | # making bogus files that we don't know about and never remove. For | |
3671 | # instance it was reported that on HP-UX the gcc test will end up | |
3672 | # making a dummy file named `D' -- because `-MD' means `put the output | |
3673 | # in D'. | |
3674 | rm -rf conftest.dir | |
3675 | mkdir conftest.dir | |
3676 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
3677 | # using a relative directory. | |
3678 | cp "$am_depcomp" conftest.dir | |
3679 | cd conftest.dir | |
3680 | # We will build objects and dependencies in a subdirectory because | |
3681 | # it helps to detect inapplicable dependency modes. For instance | |
3682 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
3683 | # side effect of compilation, but ICC will put the dependencies in | |
3684 | # the current directory while Tru64 will put them in the object | |
3685 | # directory. | |
3686 | mkdir sub | |
3687 | ||
3688 | am_cv_CC_dependencies_compiler_type=none | |
3689 | if test "$am_compiler_list" = ""; then | |
3690 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
3691 | fi | |
3692 | am__universal=false | |
3693 | case " $depcc " in #( | |
3694 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
3695 | esac | |
3696 | ||
3697 | for depmode in $am_compiler_list; do | |
3698 | # Setup a source with many dependencies, because some compilers | |
3699 | # like to wrap large dependency lists on column 80 (with \), and | |
3700 | # we should not choose a depcomp mode which is confused by this. | |
3701 | # | |
3702 | # We need to recreate these files for each test, as the compiler may | |
3703 | # overwrite some of them when testing with obscure command lines. | |
3704 | # This happens at least with the AIX C compiler. | |
3705 | : > sub/conftest.c | |
3706 | for i in 1 2 3 4 5 6; do | |
3707 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
3708 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
3709 | # Solaris 8's {/usr,}/bin/sh. | |
3710 | touch sub/conftst$i.h | |
3711 | done | |
3712 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
3713 | ||
3714 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
3715 | # mode. It turns out that the SunPro C++ compiler does not properly | |
3716 | # handle `-M -o', and we need to detect this. Also, some Intel | |
3717 | # versions had trouble with output in subdirs | |
3718 | am__obj=sub/conftest.${OBJEXT-o} | |
3719 | am__minus_obj="-o $am__obj" | |
3720 | case $depmode in | |
3721 | gcc) | |
3722 | # This depmode causes a compiler race in universal mode. | |
3723 | test "$am__universal" = false || continue | |
3724 | ;; | |
3725 | nosideeffect) | |
3726 | # after this tag, mechanisms are not by side-effect, so they'll | |
3727 | # only be used when explicitly requested | |
3728 | if test "x$enable_dependency_tracking" = xyes; then | |
3729 | continue | |
3730 | else | |
3731 | break | |
3732 | fi | |
3733 | ;; | |
3734 | msvc7 | msvc7msys | msvisualcpp | msvcmsys) | |
3735 | # This compiler won't grok `-c -o', but also, the minuso test has | |
3736 | # not run yet. These depmodes are late enough in the game, and | |
3737 | # so weak that their functioning should not be impacted. | |
3738 | am__obj=conftest.${OBJEXT-o} | |
3739 | am__minus_obj= | |
3740 | ;; | |
3741 | none) break ;; | |
3742 | esac | |
3743 | if depmode=$depmode \ | |
3744 | source=sub/conftest.c object=$am__obj \ | |
3745 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
3746 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
3747 | >/dev/null 2>conftest.err && | |
3748 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
3749 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
3750 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
3751 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
3752 | # icc doesn't choke on unknown options, it will just issue warnings | |
3753 | # or remarks (even with -Werror). So we grep stderr for any message | |
3754 | # that says an option was ignored or not supported. | |
3755 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
3756 | # icc: Command line warning: ignoring option '-M'; no argument required | |
3757 | # The diagnosis changed in icc 8.0: | |
3758 | # icc: Command line remark: option '-MP' not supported | |
3759 | if (grep 'ignoring option' conftest.err || | |
3760 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
3761 | am_cv_CC_dependencies_compiler_type=$depmode | |
3762 | break | |
3763 | fi | |
3764 | fi | |
3765 | done | |
3766 | ||
3767 | cd .. | |
3768 | rm -rf conftest.dir | |
3769 | else | |
3770 | am_cv_CC_dependencies_compiler_type=none | |
3771 | fi | |
3772 | ||
3773 | fi | |
3774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
3775 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
3776 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
3777 | ||
3778 | if | |
3779 | test "x$enable_dependency_tracking" != xno \ | |
3780 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
3781 | am__fastdepCC_TRUE= | |
3782 | am__fastdepCC_FALSE='#' | |
3783 | else | |
3784 | am__fastdepCC_TRUE='#' | |
3785 | am__fastdepCC_FALSE= | |
3786 | fi | |
3787 | ||
3788 | ||
3789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 | |
3790 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
3791 | if ${ac_cv_path_SED+:} false; then : | |
3792 | $as_echo_n "(cached) " >&6 | |
3793 | else | |
3794 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ | |
3795 | for ac_i in 1 2 3 4 5 6 7; do | |
3796 | ac_script="$ac_script$as_nl$ac_script" | |
3797 | done | |
3798 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
3799 | { ac_script=; unset ac_script;} | |
3800 | if test -z "$SED"; then | |
3801 | ac_path_SED_found=false | |
3802 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3803 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3804 | for as_dir in $PATH | |
3805 | do | |
3806 | IFS=$as_save_IFS | |
3807 | test -z "$as_dir" && as_dir=. | |
3808 | for ac_prog in sed gsed; do | |
3809 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3810 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" | |
3811 | as_fn_executable_p "$ac_path_SED" || continue | |
3812 | # Check for GNU ac_path_SED and select it if it is found. | |
3813 | # Check for GNU $ac_path_SED | |
3814 | case `"$ac_path_SED" --version 2>&1` in | |
3815 | *GNU*) | |
3816 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
3817 | *) | |
3818 | ac_count=0 | |
3819 | $as_echo_n 0123456789 >"conftest.in" | |
3820 | while : | |
3821 | do | |
3822 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3823 | mv "conftest.tmp" "conftest.in" | |
3824 | cp "conftest.in" "conftest.nl" | |
3825 | $as_echo '' >> "conftest.nl" | |
3826 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3827 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3828 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3829 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
3830 | # Best one so far, save it but keep looking for a better one | |
3831 | ac_cv_path_SED="$ac_path_SED" | |
3832 | ac_path_SED_max=$ac_count | |
3833 | fi | |
3834 | # 10*(2^10) chars as input seems more than enough | |
3835 | test $ac_count -gt 10 && break | |
3836 | done | |
3837 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3838 | esac | |
3839 | ||
3840 | $ac_path_SED_found && break 3 | |
3841 | done | |
3842 | done | |
3843 | done | |
3844 | IFS=$as_save_IFS | |
3845 | if test -z "$ac_cv_path_SED"; then | |
3846 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
3847 | fi | |
3848 | else | |
3849 | ac_cv_path_SED=$SED | |
3850 | fi | |
3851 | ||
3852 | fi | |
3853 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 | |
3854 | $as_echo "$ac_cv_path_SED" >&6; } | |
3855 | SED="$ac_cv_path_SED" | |
3856 | rm -f conftest.sed | |
3857 | ||
3858 | ||
3859 | ||
3860 | ac_ext=c | |
3861 | ac_cpp='$CPP $CPPFLAGS' | |
3862 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3863 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3864 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3865 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
3866 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
3867 | # On Suns, sometimes $CPP names a directory. | |
3868 | if test -n "$CPP" && test -d "$CPP"; then | |
3869 | CPP= | |
3870 | fi | |
3871 | if test -z "$CPP"; then | |
3872 | if ${ac_cv_prog_CPP+:} false; then : | |
3873 | $as_echo_n "(cached) " >&6 | |
3874 | else | |
3875 | # Double quotes because CPP needs to be expanded | |
3876 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3877 | do | |
3878 | ac_preproc_ok=false | |
3879 | for ac_c_preproc_warn_flag in '' yes | |
3880 | do | |
3881 | # Use a header file that comes with gcc, so configuring glibc | |
3882 | # with a fresh cross-compiler works. | |
3883 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3884 | # <limits.h> exists even on freestanding compilers. | |
3885 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3886 | # not just through cpp. "Syntax error" is here to catch this case. | |
3887 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3888 | /* end confdefs.h. */ | |
3889 | #ifdef __STDC__ | |
3890 | # include <limits.h> | |
3891 | #else | |
3892 | # include <assert.h> | |
3893 | #endif | |
3894 | Syntax error | |
3895 | _ACEOF | |
3896 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3897 | ||
3898 | else | |
3899 | # Broken: fails on valid input. | |
3900 | continue | |
3901 | fi | |
3902 | rm -f conftest.err conftest.i conftest.$ac_ext | |
3903 | ||
3904 | # OK, works on sane cases. Now check whether nonexistent headers | |
3905 | # can be detected and how. | |
3906 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3907 | /* end confdefs.h. */ | |
3908 | #include <ac_nonexistent.h> | |
3909 | _ACEOF | |
3910 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3911 | # Broken: success on invalid input. | |
3912 | continue | |
3913 | else | |
3914 | # Passes both tests. | |
3915 | ac_preproc_ok=: | |
3916 | break | |
3917 | fi | |
3918 | rm -f conftest.err conftest.i conftest.$ac_ext | |
3919 | ||
3920 | done | |
3921 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3922 | rm -f conftest.i conftest.err conftest.$ac_ext | |
3923 | if $ac_preproc_ok; then : | |
3924 | break | |
3925 | fi | |
3926 | ||
3927 | done | |
3928 | ac_cv_prog_CPP=$CPP | |
3929 | ||
3930 | fi | |
3931 | CPP=$ac_cv_prog_CPP | |
3932 | else | |
3933 | ac_cv_prog_CPP=$CPP | |
3934 | fi | |
3935 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
3936 | $as_echo "$CPP" >&6; } | |
3937 | ac_preproc_ok=false | |
3938 | for ac_c_preproc_warn_flag in '' yes | |
3939 | do | |
3940 | # Use a header file that comes with gcc, so configuring glibc | |
3941 | # with a fresh cross-compiler works. | |
3942 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3943 | # <limits.h> exists even on freestanding compilers. | |
3944 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3945 | # not just through cpp. "Syntax error" is here to catch this case. | |
3946 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3947 | /* end confdefs.h. */ | |
3948 | #ifdef __STDC__ | |
3949 | # include <limits.h> | |
3950 | #else | |
3951 | # include <assert.h> | |
3952 | #endif | |
3953 | Syntax error | |
3954 | _ACEOF | |
3955 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3956 | ||
3957 | else | |
3958 | # Broken: fails on valid input. | |
3959 | continue | |
3960 | fi | |
3961 | rm -f conftest.err conftest.i conftest.$ac_ext | |
3962 | ||
3963 | # OK, works on sane cases. Now check whether nonexistent headers | |
3964 | # can be detected and how. | |
3965 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3966 | /* end confdefs.h. */ | |
3967 | #include <ac_nonexistent.h> | |
3968 | _ACEOF | |
3969 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3970 | # Broken: success on invalid input. | |
3971 | continue | |
3972 | else | |
3973 | # Passes both tests. | |
3974 | ac_preproc_ok=: | |
3975 | break | |
3976 | fi | |
3977 | rm -f conftest.err conftest.i conftest.$ac_ext | |
3978 | ||
3979 | done | |
3980 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3981 | rm -f conftest.i conftest.err conftest.$ac_ext | |
3982 | if $ac_preproc_ok; then : | |
3983 | ||
3984 | else | |
3985 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3986 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3987 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check | |
3988 | See \`config.log' for more details" "$LINENO" 5; } | |
3989 | fi | |
3990 | ||
3991 | ac_ext=c | |
3992 | ac_cpp='$CPP $CPPFLAGS' | |
3993 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3994 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3995 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3996 | ||
3997 | ||
3998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
3999 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
4000 | if ${ac_cv_path_GREP+:} false; then : | |
4001 | $as_echo_n "(cached) " >&6 | |
4002 | else | |
4003 | if test -z "$GREP"; then | |
4004 | ac_path_GREP_found=false | |
4005 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4006 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4007 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4008 | do | |
4009 | IFS=$as_save_IFS | |
4010 | test -z "$as_dir" && as_dir=. | |
4011 | for ac_prog in grep ggrep; do | |
4012 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4013 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
4014 | as_fn_executable_p "$ac_path_GREP" || continue | |
4015 | # Check for GNU ac_path_GREP and select it if it is found. | |
4016 | # Check for GNU $ac_path_GREP | |
4017 | case `"$ac_path_GREP" --version 2>&1` in | |
4018 | *GNU*) | |
4019 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4020 | *) | |
4021 | ac_count=0 | |
4022 | $as_echo_n 0123456789 >"conftest.in" | |
4023 | while : | |
4024 | do | |
4025 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4026 | mv "conftest.tmp" "conftest.in" | |
4027 | cp "conftest.in" "conftest.nl" | |
4028 | $as_echo 'GREP' >> "conftest.nl" | |
4029 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4030 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4031 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4032 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4033 | # Best one so far, save it but keep looking for a better one | |
4034 | ac_cv_path_GREP="$ac_path_GREP" | |
4035 | ac_path_GREP_max=$ac_count | |
4036 | fi | |
4037 | # 10*(2^10) chars as input seems more than enough | |
4038 | test $ac_count -gt 10 && break | |
4039 | done | |
4040 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4041 | esac | |
4042 | ||
4043 | $ac_path_GREP_found && break 3 | |
4044 | done | |
4045 | done | |
4046 | done | |
4047 | IFS=$as_save_IFS | |
4048 | if test -z "$ac_cv_path_GREP"; then | |
4049 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
4050 | fi | |
4051 | else | |
4052 | ac_cv_path_GREP=$GREP | |
4053 | fi | |
4054 | ||
4055 | fi | |
4056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4057 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4058 | GREP="$ac_cv_path_GREP" | |
4059 | ||
4060 | ||
4061 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
4062 | $as_echo_n "checking for egrep... " >&6; } | |
4063 | if ${ac_cv_path_EGREP+:} false; then : | |
4064 | $as_echo_n "(cached) " >&6 | |
4065 | else | |
4066 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
4067 | then ac_cv_path_EGREP="$GREP -E" | |
4068 | else | |
4069 | if test -z "$EGREP"; then | |
4070 | ac_path_EGREP_found=false | |
4071 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4072 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4073 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4074 | do | |
4075 | IFS=$as_save_IFS | |
4076 | test -z "$as_dir" && as_dir=. | |
4077 | for ac_prog in egrep; do | |
4078 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4079 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
4080 | as_fn_executable_p "$ac_path_EGREP" || continue | |
4081 | # Check for GNU ac_path_EGREP and select it if it is found. | |
4082 | # Check for GNU $ac_path_EGREP | |
4083 | case `"$ac_path_EGREP" --version 2>&1` in | |
4084 | *GNU*) | |
4085 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4086 | *) | |
4087 | ac_count=0 | |
4088 | $as_echo_n 0123456789 >"conftest.in" | |
4089 | while : | |
4090 | do | |
4091 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4092 | mv "conftest.tmp" "conftest.in" | |
4093 | cp "conftest.in" "conftest.nl" | |
4094 | $as_echo 'EGREP' >> "conftest.nl" | |
4095 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4096 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4097 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4098 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4099 | # Best one so far, save it but keep looking for a better one | |
4100 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4101 | ac_path_EGREP_max=$ac_count | |
4102 | fi | |
4103 | # 10*(2^10) chars as input seems more than enough | |
4104 | test $ac_count -gt 10 && break | |
4105 | done | |
4106 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4107 | esac | |
4108 | ||
4109 | $ac_path_EGREP_found && break 3 | |
4110 | done | |
4111 | done | |
4112 | done | |
4113 | IFS=$as_save_IFS | |
4114 | if test -z "$ac_cv_path_EGREP"; then | |
4115 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
4116 | fi | |
4117 | else | |
4118 | ac_cv_path_EGREP=$EGREP | |
4119 | fi | |
4120 | ||
4121 | fi | |
4122 | fi | |
4123 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
4124 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4125 | EGREP="$ac_cv_path_EGREP" | |
4126 | ||
4127 | ||
4128 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
4129 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
4130 | if ${ac_cv_header_stdc+:} false; then : | |
4131 | $as_echo_n "(cached) " >&6 | |
4132 | else | |
4133 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4134 | /* end confdefs.h. */ | |
4135 | #include <stdlib.h> | |
4136 | #include <stdarg.h> | |
4137 | #include <string.h> | |
4138 | #include <float.h> | |
4139 | ||
4140 | int | |
4141 | main () | |
4142 | { | |
4143 | ||
4144 | ; | |
4145 | return 0; | |
4146 | } | |
4147 | _ACEOF | |
4148 | if ac_fn_c_try_compile "$LINENO"; then : | |
4149 | ac_cv_header_stdc=yes | |
4150 | else | |
4151 | ac_cv_header_stdc=no | |
4152 | fi | |
4153 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4154 | ||
4155 | if test $ac_cv_header_stdc = yes; then | |
4156 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4157 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4158 | /* end confdefs.h. */ | |
4159 | #include <string.h> | |
4160 | ||
4161 | _ACEOF | |
4162 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4163 | $EGREP "memchr" >/dev/null 2>&1; then : | |
4164 | ||
4165 | else | |
4166 | ac_cv_header_stdc=no | |
4167 | fi | |
4168 | rm -f conftest* | |
4169 | ||
4170 | fi | |
4171 | ||
4172 | if test $ac_cv_header_stdc = yes; then | |
4173 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4174 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4175 | /* end confdefs.h. */ | |
4176 | #include <stdlib.h> | |
4177 | ||
4178 | _ACEOF | |
4179 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4180 | $EGREP "free" >/dev/null 2>&1; then : | |
4181 | ||
4182 | else | |
4183 | ac_cv_header_stdc=no | |
4184 | fi | |
4185 | rm -f conftest* | |
4186 | ||
4187 | fi | |
4188 | ||
4189 | if test $ac_cv_header_stdc = yes; then | |
4190 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4191 | if test "$cross_compiling" = yes; then : | |
4192 | : | |
4193 | else | |
4194 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4195 | /* end confdefs.h. */ | |
4196 | #include <ctype.h> | |
4197 | #include <stdlib.h> | |
4198 | #if ((' ' & 0x0FF) == 0x020) | |
4199 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4200 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4201 | #else | |
4202 | # define ISLOWER(c) \ | |
4203 | (('a' <= (c) && (c) <= 'i') \ | |
4204 | || ('j' <= (c) && (c) <= 'r') \ | |
4205 | || ('s' <= (c) && (c) <= 'z')) | |
4206 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4207 | #endif | |
4208 | ||
4209 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4210 | int | |
4211 | main () | |
4212 | { | |
4213 | int i; | |
4214 | for (i = 0; i < 256; i++) | |
4215 | if (XOR (islower (i), ISLOWER (i)) | |
4216 | || toupper (i) != TOUPPER (i)) | |
4217 | return 2; | |
4218 | return 0; | |
4219 | } | |
4220 | _ACEOF | |
4221 | if ac_fn_c_try_run "$LINENO"; then : | |
4222 | ||
4223 | else | |
4224 | ac_cv_header_stdc=no | |
4225 | fi | |
4226 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
4227 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4228 | fi | |
4229 | ||
4230 | fi | |
4231 | fi | |
4232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
4233 | $as_echo "$ac_cv_header_stdc" >&6; } | |
4234 | if test $ac_cv_header_stdc = yes; then | |
4235 | ||
4236 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
4237 | ||
4238 | fi | |
4239 | ||
4240 | ||
4241 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
4242 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
4243 | inttypes.h stdint.h unistd.h | |
4244 | do : | |
4245 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4246 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4247 | " | |
4248 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
4249 | cat >>confdefs.h <<_ACEOF | |
4250 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4251 | _ACEOF | |
4252 | ||
4253 | fi | |
4254 | ||
4255 | done | |
4256 | ||
4257 | ||
4258 | for ac_header in \ | |
4259 | string.h \ | |
4260 | strings.h \ | |
4261 | errno.h \ | |
4262 | signal.h \ | |
4263 | netdb.h \ | |
4264 | netinet/in.h \ | |
4265 | arpa/inet.h \ | |
4266 | sys/socket.h \ | |
4267 | sys/types.h \ | |
4268 | sys/wait.h \ | |
4269 | unistd.h \ | |
4270 | curses.h \ | |
4271 | ncurses.h \ | |
4272 | ncurses/ncurses.h \ | |
4273 | ncurses/term.h \ | |
4274 | termcap.h \ | |
4275 | ||
4276 | do : | |
4277 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4278 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
4279 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
4280 | cat >>confdefs.h <<_ACEOF | |
4281 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4282 | _ACEOF | |
4283 | ||
4284 | fi | |
4285 | ||
4286 | done | |
4287 | ||
4288 | ||
4289 | if test "$ac_cv_header_curses_h" = "yes"; then | |
4290 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for term.h with curses.h" >&5 | |
4291 | $as_echo_n "checking for term.h with curses.h... " >&6; } | |
4292 | save_LIBS="$LIBS" | |
4293 | LIBS="$save_LIBS -lcurses" | |
4294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4295 | /* end confdefs.h. */ | |
4296 | #include <curses.h> | |
4297 | #include <term.h> | |
4298 | int | |
4299 | main () | |
4300 | { | |
4301 | ||
4302 | ; | |
4303 | return 0; | |
4304 | } | |
4305 | _ACEOF | |
4306 | if ac_fn_c_try_link "$LINENO"; then : | |
4307 | eval "ac_nettoe_curses_term=yes" | |
4308 | else | |
4309 | eval "ac_nettoe_curses_term=no" | |
4310 | fi | |
4311 | rm -f core conftest.err conftest.$ac_objext \ | |
4312 | conftest$ac_exeext conftest.$ac_ext | |
4313 | LIBS="$save_LIBS" | |
4314 | if test "$ac_nettoe_curses_term" = "yes"; then | |
4315 | ||
4316 | $as_echo "#define HAVE_TERM_H 1" >>confdefs.h | |
4317 | ||
4318 | fi | |
4319 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_nettoe_curses_term" >&5 | |
4320 | $as_echo "$ac_nettoe_curses_term" >&6; } | |
4321 | fi | |
4322 | ||
4323 | for ac_func in strcat strcmp strcpy strncasecmp | |
4324 | do : | |
4325 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
4326 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
4327 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
4328 | cat >>confdefs.h <<_ACEOF | |
4329 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
4330 | _ACEOF | |
4331 | ||
4332 | fi | |
4333 | done | |
4334 | ||
4335 | ||
4336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 | |
4337 | $as_echo_n "checking for library containing socket... " >&6; } | |
4338 | if ${ac_cv_search_socket+:} false; then : | |
4339 | $as_echo_n "(cached) " >&6 | |
4340 | else | |
4341 | ac_func_search_save_LIBS=$LIBS | |
4342 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4343 | /* end confdefs.h. */ | |
4344 | ||
4345 | /* Override any GCC internal prototype to avoid an error. | |
4346 | Use char because int might match the return type of a GCC | |
4347 | builtin and then its argument prototype would still apply. */ | |
4348 | #ifdef __cplusplus | |
4349 | extern "C" | |
4350 | #endif | |
4351 | char socket (); | |
4352 | int | |
4353 | main () | |
4354 | { | |
4355 | return socket (); | |
4356 | ; | |
4357 | return 0; | |
4358 | } | |
4359 | _ACEOF | |
4360 | for ac_lib in '' socket; do | |
4361 | if test -z "$ac_lib"; then | |
4362 | ac_res="none required" | |
4363 | else | |
4364 | ac_res=-l$ac_lib | |
4365 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4366 | fi | |
4367 | if ac_fn_c_try_link "$LINENO"; then : | |
4368 | ac_cv_search_socket=$ac_res | |
4369 | fi | |
4370 | rm -f core conftest.err conftest.$ac_objext \ | |
4371 | conftest$ac_exeext | |
4372 | if ${ac_cv_search_socket+:} false; then : | |
4373 | break | |
4374 | fi | |
4375 | done | |
4376 | if ${ac_cv_search_socket+:} false; then : | |
4377 | ||
4378 | else | |
4379 | ac_cv_search_socket=no | |
4380 | fi | |
4381 | rm conftest.$ac_ext | |
4382 | LIBS=$ac_func_search_save_LIBS | |
4383 | fi | |
4384 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 | |
4385 | $as_echo "$ac_cv_search_socket" >&6; } | |
4386 | ac_res=$ac_cv_search_socket | |
4387 | if test "$ac_res" != no; then : | |
4388 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
4389 | ||
4390 | fi | |
4391 | ||
4392 | ||
4393 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setupterm in -ltinfo" >&5 | |
4394 | $as_echo_n "checking for setupterm in -ltinfo... " >&6; } | |
4395 | if ${ac_cv_lib_tinfo_setupterm+:} false; then : | |
4396 | $as_echo_n "(cached) " >&6 | |
4397 | else | |
4398 | ac_check_lib_save_LIBS=$LIBS | |
4399 | LIBS="-ltinfo $LIBS" | |
4400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4401 | /* end confdefs.h. */ | |
4402 | ||
4403 | /* Override any GCC internal prototype to avoid an error. | |
4404 | Use char because int might match the return type of a GCC | |
4405 | builtin and then its argument prototype would still apply. */ | |
4406 | #ifdef __cplusplus | |
4407 | extern "C" | |
4408 | #endif | |
4409 | char setupterm (); | |
4410 | int | |
4411 | main () | |
4412 | { | |
4413 | return setupterm (); | |
4414 | ; | |
4415 | return 0; | |
4416 | } | |
4417 | _ACEOF | |
4418 | if ac_fn_c_try_link "$LINENO"; then : | |
4419 | ac_cv_lib_tinfo_setupterm=yes | |
4420 | else | |
4421 | ac_cv_lib_tinfo_setupterm=no | |
4422 | fi | |
4423 | rm -f core conftest.err conftest.$ac_objext \ | |
4424 | conftest$ac_exeext conftest.$ac_ext | |
4425 | LIBS=$ac_check_lib_save_LIBS | |
4426 | fi | |
4427 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_setupterm" >&5 | |
4428 | $as_echo "$ac_cv_lib_tinfo_setupterm" >&6; } | |
4429 | if test "x$ac_cv_lib_tinfo_setupterm" = xyes; then : | |
4430 | LIBTINFO=-ltinfo | |
4431 | fi | |
4432 | ||
4433 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setupterm in -lncurses" >&5 | |
4434 | $as_echo_n "checking for setupterm in -lncurses... " >&6; } | |
4435 | if ${ac_cv_lib_ncurses_setupterm+:} false; then : | |
4436 | $as_echo_n "(cached) " >&6 | |
4437 | else | |
4438 | ac_check_lib_save_LIBS=$LIBS | |
4439 | LIBS="-lncurses $LIBS" | |
4440 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4441 | /* end confdefs.h. */ | |
4442 | ||
4443 | /* Override any GCC internal prototype to avoid an error. | |
4444 | Use char because int might match the return type of a GCC | |
4445 | builtin and then its argument prototype would still apply. */ | |
4446 | #ifdef __cplusplus | |
4447 | extern "C" | |
4448 | #endif | |
4449 | char setupterm (); | |
4450 | int | |
4451 | main () | |
4452 | { | |
4453 | return setupterm (); | |
4454 | ; | |
4455 | return 0; | |
4456 | } | |
4457 | _ACEOF | |
4458 | if ac_fn_c_try_link "$LINENO"; then : | |
4459 | ac_cv_lib_ncurses_setupterm=yes | |
4460 | else | |
4461 | ac_cv_lib_ncurses_setupterm=no | |
4462 | fi | |
4463 | rm -f core conftest.err conftest.$ac_objext \ | |
4464 | conftest$ac_exeext conftest.$ac_ext | |
4465 | LIBS=$ac_check_lib_save_LIBS | |
4466 | fi | |
4467 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_setupterm" >&5 | |
4468 | $as_echo "$ac_cv_lib_ncurses_setupterm" >&6; } | |
4469 | if test "x$ac_cv_lib_ncurses_setupterm" = xyes; then : | |
4470 | LIBNCURSES=-lncurses | |
4471 | else | |
4472 | ## Dig deeper for ncurses with OpenSolaris. | |
4473 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setupterm and ncurses in /usr/gnu/lib" >&5 | |
4474 | $as_echo_n "checking for setupterm and ncurses in /usr/gnu/lib... " >&6; } | |
4475 | saved_LDFLAGS=$LDFLAGS | |
4476 | saved_LIBS=$LIBS | |
4477 | LDFLAGS="$LDFLAGS -L/usr/gnu/lib" | |
4478 | LIBS="$LIBS -lncurses" | |
4479 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4480 | /* end confdefs.h. */ | |
4481 | ||
4482 | /* Override any GCC internal prototype to avoid an error. | |
4483 | Use char because int might match the return type of a GCC | |
4484 | builtin and then its argument prototype would still apply. */ | |
4485 | #ifdef __cplusplus | |
4486 | extern "C" | |
4487 | #endif | |
4488 | char setupterm (); | |
4489 | int | |
4490 | main () | |
4491 | { | |
4492 | return setupterm (); | |
4493 | ; | |
4494 | return 0; | |
4495 | } | |
4496 | _ACEOF | |
4497 | if ac_fn_c_try_link "$LINENO"; then : | |
4498 | LIBNCURSES=-lncurses | |
4499 | NETTOE_LDADD="$NETTOE_LDADD -L/usr/gnu/lib" | |
4500 | ac_nettoe_usr_gnu_lib_ncurses=yes | |
4501 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4502 | $as_echo "yes" >&6; } | |
4503 | else | |
4504 | ||
4505 | ac_nettoe_usr_gnu_lib_ncurses=no | |
4506 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4507 | $as_echo "no" >&6; } | |
4508 | fi | |
4509 | rm -f core conftest.err conftest.$ac_objext \ | |
4510 | conftest$ac_exeext conftest.$ac_ext | |
4511 | LDFLAGS=$saved_LDFLAGS | |
4512 | LIBS=$saved_LIBS | |
4513 | fi | |
4514 | ||
4515 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setupterm in -lcurses" >&5 | |
4516 | $as_echo_n "checking for setupterm in -lcurses... " >&6; } | |
4517 | if ${ac_cv_lib_curses_setupterm+:} false; then : | |
4518 | $as_echo_n "(cached) " >&6 | |
4519 | else | |
4520 | ac_check_lib_save_LIBS=$LIBS | |
4521 | LIBS="-lcurses $LIBS" | |
4522 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4523 | /* end confdefs.h. */ | |
4524 | ||
4525 | /* Override any GCC internal prototype to avoid an error. | |
4526 | Use char because int might match the return type of a GCC | |
4527 | builtin and then its argument prototype would still apply. */ | |
4528 | #ifdef __cplusplus | |
4529 | extern "C" | |
4530 | #endif | |
4531 | char setupterm (); | |
4532 | int | |
4533 | main () | |
4534 | { | |
4535 | return setupterm (); | |
4536 | ; | |
4537 | return 0; | |
4538 | } | |
4539 | _ACEOF | |
4540 | if ac_fn_c_try_link "$LINENO"; then : | |
4541 | ac_cv_lib_curses_setupterm=yes | |
4542 | else | |
4543 | ac_cv_lib_curses_setupterm=no | |
4544 | fi | |
4545 | rm -f core conftest.err conftest.$ac_objext \ | |
4546 | conftest$ac_exeext conftest.$ac_ext | |
4547 | LIBS=$ac_check_lib_save_LIBS | |
4548 | fi | |
4549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_setupterm" >&5 | |
4550 | $as_echo "$ac_cv_lib_curses_setupterm" >&6; } | |
4551 | if test "x$ac_cv_lib_curses_setupterm" = xyes; then : | |
4552 | LIBCURSES=-lcurses | |
4553 | fi | |
4554 | ||
4555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 | |
4556 | $as_echo_n "checking for tgetent in -ltermcap... " >&6; } | |
4557 | if ${ac_cv_lib_termcap_tgetent+:} false; then : | |
4558 | $as_echo_n "(cached) " >&6 | |
4559 | else | |
4560 | ac_check_lib_save_LIBS=$LIBS | |
4561 | LIBS="-ltermcap $LIBS" | |
4562 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4563 | /* end confdefs.h. */ | |
4564 | ||
4565 | /* Override any GCC internal prototype to avoid an error. | |
4566 | Use char because int might match the return type of a GCC | |
4567 | builtin and then its argument prototype would still apply. */ | |
4568 | #ifdef __cplusplus | |
4569 | extern "C" | |
4570 | #endif | |
4571 | char tgetent (); | |
4572 | int | |
4573 | main () | |
4574 | { | |
4575 | return tgetent (); | |
4576 | ; | |
4577 | return 0; | |
4578 | } | |
4579 | _ACEOF | |
4580 | if ac_fn_c_try_link "$LINENO"; then : | |
4581 | ac_cv_lib_termcap_tgetent=yes | |
4582 | else | |
4583 | ac_cv_lib_termcap_tgetent=no | |
4584 | fi | |
4585 | rm -f core conftest.err conftest.$ac_objext \ | |
4586 | conftest$ac_exeext conftest.$ac_ext | |
4587 | LIBS=$ac_check_lib_save_LIBS | |
4588 | fi | |
4589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 | |
4590 | $as_echo "$ac_cv_lib_termcap_tgetent" >&6; } | |
4591 | if test "x$ac_cv_lib_termcap_tgetent" = xyes; then : | |
4592 | LIBTERMCAP=-ltermcap | |
4593 | fi | |
4594 | ||
4595 | ||
4596 | ||
4597 | ||
4598 | ||
4599 | ||
4600 | ||
4601 | if test "$with_terminfo" = "no" ; then | |
4602 | NETTOE_LDADD= | |
4603 | else | |
4604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for best terminal capability library" >&5 | |
4605 | $as_echo_n "checking for best terminal capability library... " >&6; } | |
4606 | if test "$ac_cv_lib_tinfo_setupterm" = "yes" \ | |
4607 | && test "$ac_cv_header_ncurses_h" = "yes" ; then | |
4608 | ||
4609 | $as_echo "#define HAVE_SETUPTERM 1" >>confdefs.h | |
4610 | ||
4611 | ||
4612 | $as_echo "#define USE_NCURSES 1" >>confdefs.h | |
4613 | ||
4614 | NETTOE_LDADD="${NETTOE_LDADD} ${LIBTINFO}" | |
4615 | with_terminfo=yes | |
4616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBTINFO}" >&5 | |
4617 | $as_echo "${LIBTINFO}" >&6; } | |
4618 | elif ( test "$ac_cv_lib_ncurses_setupterm" = "yes" \ | |
4619 | || test "x$ac_nettoe_usr_gnu_lib_ncurses" = x"yes" ) \ | |
4620 | && ( test "$ac_cv_header_ncurses_h" = "yes" \ | |
4621 | || test "$ac_cv_header_ncurses_ncurses_h" = "yes" ); then | |
4622 | ||
4623 | $as_echo "#define HAVE_SETUPTERM 1" >>confdefs.h | |
4624 | ||
4625 | ||
4626 | $as_echo "#define USE_NCURSES 1" >>confdefs.h | |
4627 | ||
4628 | NETTOE_LDADD="${NETTOE_LDADD} ${LIBNCURSES}" | |
4629 | with_terminfo=yes | |
4630 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBNCURSES" >&5 | |
4631 | $as_echo "$LIBNCURSES" >&6; } | |
4632 | elif test "$ac_cv_lib_curses_setupterm" = "yes" \ | |
4633 | && test "$ac_cv_header_curses_h" = "yes" ; then | |
4634 | ||
4635 | $as_echo "#define HAVE_SETUPTERM 1" >>confdefs.h | |
4636 | ||
4637 | ||
4638 | $as_echo "#define USE_CURSES 1" >>confdefs.h | |
4639 | ||
4640 | NETTOE_LDADD="${NETTOE_LDADD} ${LIBCURSES}" | |
4641 | with_terminfo=yes | |
4642 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBCURSES" >&5 | |
4643 | $as_echo "$LIBCURSES" >&6; } | |
4644 | elif test "$ac_cv_lib_termcap_tgetent" = "yes" \ | |
4645 | && test "$ac_cv_header_termcap_h" = "yes" ; then | |
4646 | ||
4647 | $as_echo "#define HAVE_TGETENT 1" >>confdefs.h | |
4648 | ||
4649 | ||
4650 | $as_echo "#define USE_TERMCAP 1" >>confdefs.h | |
4651 | ||
4652 | NETTOE_LDADD="${NETTOE_LDADD} ${LIBTERMCAP}" | |
4653 | with_terminfo=yes | |
4654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBTERMCAP" >&5 | |
4655 | $as_echo "$LIBTERMCAP" >&6; } | |
4656 | else | |
4657 | with_terminfo=no | |
4658 | NETTOE_LDADD= | |
4659 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 | |
4660 | $as_echo "none" >&6; } | |
4661 | fi | |
4662 | ||
4663 | if test "$ac_cv_lib_ncurses_setupterm" = "yes" \ | |
4664 | || test "$ac_cv_lib_curses_setupterm" = "yes" \ | |
4665 | || test "$ac_cv_lib_tinfo_setupterm" = "yes" ; then | |
4666 | ||
4667 | $as_echo "#define USE_TERMINFO 1" >>confdefs.h | |
4668 | ||
4669 | fi | |
4670 | fi | |
4671 | ||
4672 | # Parse selected listening port. | |
4673 | if test "$with_port" != "yes" && test "$with_port" != "no"; then | |
4674 | test -n "$NETTOE_PORT" || NETTOE_PORT=$with_port | |
4675 | fi | |
4676 | ||
4677 | test -n "$NETTOE_PORT" || NETTOE_PORT=7501 | |
4678 | ||
4679 | ||
4680 | ||
4681 | test -n "$applicationsdir" || applicationsdir='${datadir}/applications' | |
4682 | test -n "$iconsdir" || iconsdir='${datadir}/icons' | |
4683 | test -n "$menudir" || menudir='${datadir}/menu' | |
4684 | test -n "$pixmapsdir" || pixmapsdir='${datadir}/pixmaps' | |
4685 | ||
4686 | ||
4687 | ||
4688 | ||
4689 | ||
4690 | ||
4691 | ac_config_files="$ac_config_files Makefile docs/Makefile src/Makefile test/Makefile desktop/Makefile" | |
4692 | ||
4693 | ||
4694 | cat >confcache <<\_ACEOF | |
4695 | # This file is a shell script that caches the results of configure | |
4696 | # tests run on this system so they can be shared between configure | |
4697 | # scripts and configure runs, see configure's option --config-cache. | |
4698 | # It is not useful on other systems. If it contains results you don't | |
4699 | # want to keep, you may remove or edit it. | |
4700 | # | |
4701 | # config.status only pays attention to the cache file if you give it | |
4702 | # the --recheck option to rerun configure. | |
4703 | # | |
4704 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
4705 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
4706 | # following values. | |
4707 | ||
4708 | _ACEOF | |
4709 | ||
4710 | # The following way of writing the cache mishandles newlines in values, | |
4711 | # but we know of no workaround that is simple, portable, and efficient. | |
4712 | # So, we kill variables containing newlines. | |
4713 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
4714 | # and sets the high bit in the cache file unless we assign to the vars. | |
4715 | ( | |
4716 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
4717 | eval ac_val=\$$ac_var | |
4718 | case $ac_val in #( | |
4719 | *${as_nl}*) | |
4720 | case $ac_var in #( | |
4721 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
4722 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
4723 | esac | |
4724 | case $ac_var in #( | |
4725 | _ | IFS | as_nl) ;; #( | |
4726 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
4727 | *) { eval $ac_var=; unset $ac_var;} ;; | |
4728 | esac ;; | |
4729 | esac | |
4730 | done | |
4731 | ||
4732 | (set) 2>&1 | | |
4733 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | |
4734 | *${as_nl}ac_space=\ *) | |
4735 | # `set' does not quote correctly, so add quotes: double-quote | |
4736 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
4737 | sed -n \ | |
4738 | "s/'/'\\\\''/g; | |
4739 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
4740 | ;; #( | |
4741 | *) | |
4742 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
4743 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
4744 | ;; | |
4745 | esac | | |
4746 | sort | |
4747 | ) | | |
4748 | sed ' | |
4749 | /^ac_cv_env_/b end | |
4750 | t clear | |
4751 | :clear | |
4752 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
4753 | t end | |
4754 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
4755 | :end' >>confcache | |
4756 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
4757 | if test -w "$cache_file"; then | |
4758 | if test "x$cache_file" != "x/dev/null"; then | |
4759 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
4760 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
4761 | if test ! -f "$cache_file" || test -h "$cache_file"; then | |
4762 | cat confcache >"$cache_file" | |
4763 | else | |
4764 | case $cache_file in #( | |
4765 | */* | ?:*) | |
4766 | mv -f confcache "$cache_file"$$ && | |
4767 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
4768 | *) | |
4769 | mv -f confcache "$cache_file" ;; | |
4770 | esac | |
4771 | fi | |
4772 | fi | |
4773 | else | |
4774 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 | |
4775 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
4776 | fi | |
4777 | fi | |
4778 | rm -f confcache | |
4779 | ||
4780 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
4781 | # Let make expand exec_prefix. | |
4782 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4783 | ||
4784 | DEFS=-DHAVE_CONFIG_H | |
4785 | ||
4786 | ac_libobjs= | |
4787 | ac_ltlibobjs= | |
4788 | U= | |
4789 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
4790 | # 1. Remove the extension, and $U if already installed. | |
4791 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' | |
4792 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
4793 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
4794 | # will be set to the directory where LIBOBJS objects are built. | |
4795 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
4796 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
4797 | done | |
4798 | LIBOBJS=$ac_libobjs | |
4799 | ||
4800 | LTLIBOBJS=$ac_ltlibobjs | |
4801 | ||
4802 | ||
4803 | if test -n "$EXEEXT"; then | |
4804 | am__EXEEXT_TRUE= | |
4805 | am__EXEEXT_FALSE='#' | |
4806 | else | |
4807 | am__EXEEXT_TRUE='#' | |
4808 | am__EXEEXT_FALSE= | |
4809 | fi | |
4810 | ||
4811 | if test -z "${ENABLE_DESKTOP_TRUE}" && test -z "${ENABLE_DESKTOP_FALSE}"; then | |
4812 | as_fn_error $? "conditional \"ENABLE_DESKTOP\" was never defined. | |
4813 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
4814 | fi | |
4815 | if test -z "${ENABLE_MENU_TRUE}" && test -z "${ENABLE_MENU_FALSE}"; then | |
4816 | as_fn_error $? "conditional \"ENABLE_MENU\" was never defined. | |
4817 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
4818 | fi | |
4819 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then | |
4820 | as_fn_error $? "conditional \"AMDEP\" was never defined. | |
4821 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
4822 | fi | |
4823 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
4824 | as_fn_error $? "conditional \"am__fastdepCC\" was never defined. | |
4825 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
4826 | fi | |
4827 | ||
4828 | : "${CONFIG_STATUS=./config.status}" | |
4829 | ac_write_fail=0 | |
4830 | ac_clean_files_save=$ac_clean_files | |
4831 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
4832 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 | |
4833 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
4834 | as_write_fail=0 | |
4835 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
4836 | #! $SHELL | |
4837 | # Generated by $as_me. | |
4838 | # Run this file to recreate the current configuration. | |
4839 | # Compiler output produced by configure, useful for debugging | |
4840 | # configure, is in config.log if it exists. | |
4841 | ||
4842 | debug=false | |
4843 | ac_cs_recheck=false | |
4844 | ac_cs_silent=false | |
4845 | ||
4846 | SHELL=\${CONFIG_SHELL-$SHELL} | |
4847 | export SHELL | |
4848 | _ASEOF | |
4849 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
4850 | ## -------------------- ## | |
4851 | ## M4sh Initialization. ## | |
4852 | ## -------------------- ## | |
4853 | ||
4854 | # Be more Bourne compatible | |
4855 | DUALCASE=1; export DUALCASE # for MKS sh | |
4856 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
4857 | emulate sh | |
4858 | NULLCMD=: | |
4859 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
4860 | # is contrary to our usage. Disable this feature. | |
4861 | alias -g '${1+"$@"}'='"$@"' | |
4862 | setopt NO_GLOB_SUBST | |
4863 | else | |
4864 | case `(set -o) 2>/dev/null` in #( | |
4865 | *posix*) : | |
4866 | set -o posix ;; #( | |
4867 | *) : | |
4868 | ;; | |
4869 | esac | |
4870 | fi | |
4871 | ||
4872 | ||
4873 | as_nl=' | |
4874 | ' | |
4875 | export as_nl | |
4876 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
4877 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
4878 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
4879 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
4880 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
4881 | # but without wasting forks for bash or zsh. | |
4882 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
4883 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
4884 | as_echo='print -r --' | |
4885 | as_echo_n='print -rn --' | |
4886 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
4887 | as_echo='printf %s\n' | |
4888 | as_echo_n='printf %s' | |
4889 | else | |
4890 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
4891 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
4892 | as_echo_n='/usr/ucb/echo -n' | |
4893 | else | |
4894 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
4895 | as_echo_n_body='eval | |
4896 | arg=$1; | |
4897 | case $arg in #( | |
4898 | *"$as_nl"*) | |
4899 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
4900 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
4901 | esac; | |
4902 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
4903 | ' | |
4904 | export as_echo_n_body | |
4905 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
4906 | fi | |
4907 | export as_echo_body | |
4908 | as_echo='sh -c $as_echo_body as_echo' | |
4909 | fi | |
4910 | ||
4911 | # The user is always right. | |
4912 | if test "${PATH_SEPARATOR+set}" != set; then | |
4913 | PATH_SEPARATOR=: | |
4914 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
4915 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
4916 | PATH_SEPARATOR=';' | |
4917 | } | |
4918 | fi | |
4919 | ||
4920 | ||
4921 | # IFS | |
4922 | # We need space, tab and new line, in precisely that order. Quoting is | |
4923 | # there to prevent editors from complaining about space-tab. | |
4924 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
4925 | # splitting by setting IFS to empty value.) | |
4926 | IFS=" "" $as_nl" | |
4927 | ||
4928 | # Find who we are. Look in the path if we contain no directory separator. | |
4929 | as_myself= | |
4930 | case $0 in #(( | |
4931 | *[\\/]* ) as_myself=$0 ;; | |
4932 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4933 | for as_dir in $PATH | |
4934 | do | |
4935 | IFS=$as_save_IFS | |
4936 | test -z "$as_dir" && as_dir=. | |
4937 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
4938 | done | |
4939 | IFS=$as_save_IFS | |
4940 | ||
4941 | ;; | |
4942 | esac | |
4943 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
4944 | # in which case we are not to be found in the path. | |
4945 | if test "x$as_myself" = x; then | |
4946 | as_myself=$0 | |
4947 | fi | |
4948 | if test ! -f "$as_myself"; then | |
4949 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
4950 | exit 1 | |
4951 | fi | |
4952 | ||
4953 | # Unset variables that we do not need and which cause bugs (e.g. in | |
4954 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
4955 | # suppresses any "Segmentation fault" message there. '((' could | |
4956 | # trigger a bug in pdksh 5.2.14. | |
4957 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
4958 | do eval test x\${$as_var+set} = xset \ | |
4959 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
4960 | done | |
4961 | PS1='$ ' | |
4962 | PS2='> ' | |
4963 | PS4='+ ' | |
4964 | ||
4965 | # NLS nuisances. | |
4966 | LC_ALL=C | |
4967 | export LC_ALL | |
4968 | LANGUAGE=C | |
4969 | export LANGUAGE | |
4970 | ||
4971 | # CDPATH. | |
4972 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
4973 | ||
4974 | ||
4975 | # as_fn_error STATUS ERROR [LINENO LOG_FD] | |
4976 | # ---------------------------------------- | |
4977 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
4978 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
4979 | # script with STATUS, using 1 if that was 0. | |
4980 | as_fn_error () | |
4981 | { | |
4982 | as_status=$1; test $as_status -eq 0 && as_status=1 | |
4983 | if test "$4"; then | |
4984 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
4985 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
4986 | fi | |
4987 | $as_echo "$as_me: error: $2" >&2 | |
4988 | as_fn_exit $as_status | |
4989 | } # as_fn_error | |
4990 | ||
4991 | ||
4992 | # as_fn_set_status STATUS | |
4993 | # ----------------------- | |
4994 | # Set $? to STATUS, without forking. | |
4995 | as_fn_set_status () | |
4996 | { | |
4997 | return $1 | |
4998 | } # as_fn_set_status | |
4999 | ||
5000 | # as_fn_exit STATUS | |
5001 | # ----------------- | |
5002 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
5003 | as_fn_exit () | |
5004 | { | |
5005 | set +e | |
5006 | as_fn_set_status $1 | |
5007 | exit $1 | |
5008 | } # as_fn_exit | |
5009 | ||
5010 | # as_fn_unset VAR | |
5011 | # --------------- | |
5012 | # Portably unset VAR. | |
5013 | as_fn_unset () | |
5014 | { | |
5015 | { eval $1=; unset $1;} | |
5016 | } | |
5017 | as_unset=as_fn_unset | |
5018 | # as_fn_append VAR VALUE | |
5019 | # ---------------------- | |
5020 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
5021 | # advantage of any shell optimizations that allow amortized linear growth over | |
5022 | # repeated appends, instead of the typical quadratic growth present in naive | |
5023 | # implementations. | |
5024 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
5025 | eval 'as_fn_append () | |
5026 | { | |
5027 | eval $1+=\$2 | |
5028 | }' | |
5029 | else | |
5030 | as_fn_append () | |
5031 | { | |
5032 | eval $1=\$$1\$2 | |
5033 | } | |
5034 | fi # as_fn_append | |
5035 | ||
5036 | # as_fn_arith ARG... | |
5037 | # ------------------ | |
5038 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
5039 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
5040 | # must be portable across $(()) and expr. | |
5041 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
5042 | eval 'as_fn_arith () | |
5043 | { | |
5044 | as_val=$(( $* )) | |
5045 | }' | |
5046 | else | |
5047 | as_fn_arith () | |
5048 | { | |
5049 | as_val=`expr "$@" || test $? -eq 1` | |
5050 | } | |
5051 | fi # as_fn_arith | |
5052 | ||
5053 | ||
5054 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
5055 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
5056 | as_expr=expr | |
5057 | else | |
5058 | as_expr=false | |
5059 | fi | |
5060 | ||
5061 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
5062 | as_basename=basename | |
5063 | else | |
5064 | as_basename=false | |
5065 | fi | |
5066 | ||
5067 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
5068 | as_dirname=dirname | |
5069 | else | |
5070 | as_dirname=false | |
5071 | fi | |
5072 | ||
5073 | as_me=`$as_basename -- "$0" || | |
5074 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
5075 | X"$0" : 'X\(//\)$' \| \ | |
5076 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
5077 | $as_echo X/"$0" | | |
5078 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
5079 | s//\1/ | |
5080 | q | |
5081 | } | |
5082 | /^X\/\(\/\/\)$/{ | |
5083 | s//\1/ | |
5084 | q | |
5085 | } | |
5086 | /^X\/\(\/\).*/{ | |
5087 | s//\1/ | |
5088 | q | |
5089 | } | |
5090 | s/.*/./; q'` | |
5091 | ||
5092 | # Avoid depending upon Character Ranges. | |
5093 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
5094 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
5095 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
5096 | as_cr_digits='0123456789' | |
5097 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
5098 | ||
5099 | ECHO_C= ECHO_N= ECHO_T= | |
5100 | case `echo -n x` in #((((( | |
5101 | -n*) | |
5102 | case `echo 'xy\c'` in | |
5103 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
5104 | xy) ECHO_C='\c';; | |
5105 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
5106 | ECHO_T=' ';; | |
5107 | esac;; | |
5108 | *) | |
5109 | ECHO_N='-n';; | |
5110 | esac | |
5111 | ||
5112 | rm -f conf$$ conf$$.exe conf$$.file | |
5113 | if test -d conf$$.dir; then | |
5114 | rm -f conf$$.dir/conf$$.file | |
5115 | else | |
5116 | rm -f conf$$.dir | |
5117 | mkdir conf$$.dir 2>/dev/null | |
5118 | fi | |
5119 | if (echo >conf$$.file) 2>/dev/null; then | |
5120 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
5121 | as_ln_s='ln -s' | |
5122 | # ... but there are two gotchas: | |
5123 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
5124 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
5125 | # In both cases, we have to default to `cp -pR'. | |
5126 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
5127 | as_ln_s='cp -pR' | |
5128 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
5129 | as_ln_s=ln | |
5130 | else | |
5131 | as_ln_s='cp -pR' | |
5132 | fi | |
5133 | else | |
5134 | as_ln_s='cp -pR' | |
5135 | fi | |
5136 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
5137 | rmdir conf$$.dir 2>/dev/null | |
5138 | ||
5139 | ||
5140 | # as_fn_mkdir_p | |
5141 | # ------------- | |
5142 | # Create "$as_dir" as a directory, including parents if necessary. | |
5143 | as_fn_mkdir_p () | |
5144 | { | |
5145 | ||
5146 | case $as_dir in #( | |
5147 | -*) as_dir=./$as_dir;; | |
5148 | esac | |
5149 | test -d "$as_dir" || eval $as_mkdir_p || { | |
5150 | as_dirs= | |
5151 | while :; do | |
5152 | case $as_dir in #( | |
5153 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
5154 | *) as_qdir=$as_dir;; | |
5155 | esac | |
5156 | as_dirs="'$as_qdir' $as_dirs" | |
5157 | as_dir=`$as_dirname -- "$as_dir" || | |
5158 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
5159 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
5160 | X"$as_dir" : 'X\(//\)$' \| \ | |
5161 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
5162 | $as_echo X"$as_dir" | | |
5163 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
5164 | s//\1/ | |
5165 | q | |
5166 | } | |
5167 | /^X\(\/\/\)[^/].*/{ | |
5168 | s//\1/ | |
5169 | q | |
5170 | } | |
5171 | /^X\(\/\/\)$/{ | |
5172 | s//\1/ | |
5173 | q | |
5174 | } | |
5175 | /^X\(\/\).*/{ | |
5176 | s//\1/ | |
5177 | q | |
5178 | } | |
5179 | s/.*/./; q'` | |
5180 | test -d "$as_dir" && break | |
5181 | done | |
5182 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
5183 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" | |
5184 | ||
5185 | ||
5186 | } # as_fn_mkdir_p | |
5187 | if mkdir -p . 2>/dev/null; then | |
5188 | as_mkdir_p='mkdir -p "$as_dir"' | |
5189 | else | |
5190 | test -d ./-p && rmdir ./-p | |
5191 | as_mkdir_p=false | |
5192 | fi | |
5193 | ||
5194 | ||
5195 | # as_fn_executable_p FILE | |
5196 | # ----------------------- | |
5197 | # Test if FILE is an executable regular file. | |
5198 | as_fn_executable_p () | |
5199 | { | |
5200 | test -f "$1" && test -x "$1" | |
5201 | } # as_fn_executable_p | |
5202 | as_test_x='test -x' | |
5203 | as_executable_p=as_fn_executable_p | |
5204 | ||
5205 | # Sed expression to map a string onto a valid CPP name. | |
5206 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
5207 | ||
5208 | # Sed expression to map a string onto a valid variable name. | |
5209 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
5210 | ||
5211 | ||
5212 | exec 6>&1 | |
5213 | ## ----------------------------------- ## | |
5214 | ## Main body of $CONFIG_STATUS script. ## | |
5215 | ## ----------------------------------- ## | |
5216 | _ASEOF | |
5217 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
5218 | ||
5219 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
5220 | # Save the log message, to keep $0 and so on meaningful, and to | |
5221 | # report actual input values of CONFIG_FILES etc. instead of their | |
5222 | # values after options handling. | |
5223 | ac_log=" | |
5224 | This file was extended by nettoe $as_me 1.5.1, which was | |
5225 | generated by GNU Autoconf 2.69. Invocation command line was | |
5226 | ||
5227 | CONFIG_FILES = $CONFIG_FILES | |
5228 | CONFIG_HEADERS = $CONFIG_HEADERS | |
5229 | CONFIG_LINKS = $CONFIG_LINKS | |
5230 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
5231 | $ $0 $@ | |
5232 | ||
5233 | on `(hostname || uname -n) 2>/dev/null | sed 1q` | |
5234 | " | |
5235 | ||
5236 | _ACEOF | |
5237 | ||
5238 | case $ac_config_files in *" | |
5239 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
5240 | esac | |
5241 | ||
5242 | case $ac_config_headers in *" | |
5243 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
5244 | esac | |
5245 | ||
5246 | ||
5247 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
5248 | # Files that config.status was made for. | |
5249 | config_files="$ac_config_files" | |
5250 | config_headers="$ac_config_headers" | |
5251 | config_commands="$ac_config_commands" | |
5252 | ||
5253 | _ACEOF | |
5254 | ||
5255 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
5256 | ac_cs_usage="\ | |
5257 | \`$as_me' instantiates files and other configuration actions | |
5258 | from templates according to the current configuration. Unless the files | |
5259 | and actions are specified as TAGs, all are instantiated by default. | |
5260 | ||
5261 | Usage: $0 [OPTION]... [TAG]... | |
5262 | ||
5263 | -h, --help print this help, then exit | |
5264 | -V, --version print version number and configuration settings, then exit | |
5265 | --config print configuration, then exit | |
5266 | -q, --quiet, --silent | |
5267 | do not print progress messages | |
5268 | -d, --debug don't remove temporary files | |
5269 | --recheck update $as_me by reconfiguring in the same conditions | |
5270 | --file=FILE[:TEMPLATE] | |
5271 | instantiate the configuration file FILE | |
5272 | --header=FILE[:TEMPLATE] | |
5273 | instantiate the configuration header FILE | |
5274 | ||
5275 | Configuration files: | |
5276 | $config_files | |
5277 | ||
5278 | Configuration headers: | |
5279 | $config_headers | |
5280 | ||
5281 | Configuration commands: | |
5282 | $config_commands | |
5283 | ||
5284 | Report bugs to <meand@users.sourceforge.net>." | |
5285 | ||
5286 | _ACEOF | |
5287 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
5288 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | |
5289 | ac_cs_version="\\ | |
5290 | nettoe config.status 1.5.1 | |
5291 | configured by $0, generated by GNU Autoconf 2.69, | |
5292 | with options \\"\$ac_cs_config\\" | |
5293 | ||
5294 | Copyright (C) 2012 Free Software Foundation, Inc. | |
5295 | This config.status script is free software; the Free Software Foundation | |
5296 | gives unlimited permission to copy, distribute and modify it." | |
5297 | ||
5298 | ac_pwd='$ac_pwd' | |
5299 | srcdir='$srcdir' | |
5300 | INSTALL='$INSTALL' | |
5301 | MKDIR_P='$MKDIR_P' | |
5302 | AWK='$AWK' | |
5303 | test -n "\$AWK" || AWK=awk | |
5304 | _ACEOF | |
5305 | ||
5306 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
5307 | # The default lists apply if the user does not specify any file. | |
5308 | ac_need_defaults=: | |
5309 | while test $# != 0 | |
5310 | do | |
5311 | case $1 in | |
5312 | --*=?*) | |
5313 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
5314 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
5315 | ac_shift=: | |
5316 | ;; | |
5317 | --*=) | |
5318 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
5319 | ac_optarg= | |
5320 | ac_shift=: | |
5321 | ;; | |
5322 | *) | |
5323 | ac_option=$1 | |
5324 | ac_optarg=$2 | |
5325 | ac_shift=shift | |
5326 | ;; | |
5327 | esac | |
5328 | ||
5329 | case $ac_option in | |
5330 | # Handling of the options. | |
5331 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
5332 | ac_cs_recheck=: ;; | |
5333 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) | |
5334 | $as_echo "$ac_cs_version"; exit ;; | |
5335 | --config | --confi | --conf | --con | --co | --c ) | |
5336 | $as_echo "$ac_cs_config"; exit ;; | |
5337 | --debug | --debu | --deb | --de | --d | -d ) | |
5338 | debug=: ;; | |
5339 | --file | --fil | --fi | --f ) | |
5340 | $ac_shift | |
5341 | case $ac_optarg in | |
5342 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
5343 | '') as_fn_error $? "missing file argument" ;; | |
5344 | esac | |
5345 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
5346 | ac_need_defaults=false;; | |
5347 | --header | --heade | --head | --hea ) | |
5348 | $ac_shift | |
5349 | case $ac_optarg in | |
5350 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
5351 | esac | |
5352 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
5353 | ac_need_defaults=false;; | |
5354 | --he | --h) | |
5355 | # Conflict between --help and --header | |
5356 | as_fn_error $? "ambiguous option: \`$1' | |
5357 | Try \`$0 --help' for more information.";; | |
5358 | --help | --hel | -h ) | |
5359 | $as_echo "$ac_cs_usage"; exit ;; | |
5360 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
5361 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
5362 | ac_cs_silent=: ;; | |
5363 | ||
5364 | # This is an error. | |
5365 | -*) as_fn_error $? "unrecognized option: \`$1' | |
5366 | Try \`$0 --help' for more information." ;; | |
5367 | ||
5368 | *) as_fn_append ac_config_targets " $1" | |
5369 | ac_need_defaults=false ;; | |
5370 | ||
5371 | esac | |
5372 | shift | |
5373 | done | |
5374 | ||
5375 | ac_configure_extra_args= | |
5376 | ||
5377 | if $ac_cs_silent; then | |
5378 | exec 6>/dev/null | |
5379 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
5380 | fi | |
5381 | ||
5382 | _ACEOF | |
5383 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
5384 | if \$ac_cs_recheck; then | |
5385 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
5386 | shift | |
5387 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
5388 | CONFIG_SHELL='$SHELL' | |
5389 | export CONFIG_SHELL | |
5390 | exec "\$@" | |
5391 | fi | |
5392 | ||
5393 | _ACEOF | |
5394 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
5395 | exec 5>>config.log | |
5396 | { | |
5397 | echo | |
5398 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
5399 | ## Running $as_me. ## | |
5400 | _ASBOX | |
5401 | $as_echo "$ac_log" | |
5402 | } >&5 | |
5403 | ||
5404 | _ACEOF | |
5405 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
5406 | # | |
5407 | # INIT-COMMANDS | |
5408 | # | |
5409 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" | |
5410 | ||
5411 | _ACEOF | |
5412 | ||
5413 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
5414 | ||
5415 | # Handling of arguments. | |
5416 | for ac_config_target in $ac_config_targets | |
5417 | do | |
5418 | case $ac_config_target in | |
5419 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; | |
5420 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; | |
5421 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
5422 | "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; | |
5423 | "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; | |
5424 | "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; | |
5425 | "desktop/Makefile") CONFIG_FILES="$CONFIG_FILES desktop/Makefile" ;; | |
5426 | ||
5427 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
5428 | esac | |
5429 | done | |
5430 | ||
5431 | ||
5432 | # If the user did not use the arguments to specify the items to instantiate, | |
5433 | # then the envvar interface is used. Set only those that are not. | |
5434 | # We use the long form for the default assignment because of an extremely | |
5435 | # bizarre bug on SunOS 4.1.3. | |
5436 | if $ac_need_defaults; then | |
5437 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
5438 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
5439 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
5440 | fi | |
5441 | ||
5442 | # Have a temporary directory for convenience. Make it in the build tree | |
5443 | # simply because there is no reason against having it here, and in addition, | |
5444 | # creating and moving files from /tmp can sometimes cause problems. | |
5445 | # Hook for its removal unless debugging. | |
5446 | # Note that there is a small window in which the directory will not be cleaned: | |
5447 | # after its creation but before its name has been assigned to `$tmp'. | |
5448 | $debug || | |
5449 | { | |
5450 | tmp= ac_tmp= | |
5451 | trap 'exit_status=$? | |
5452 | : "${ac_tmp:=$tmp}" | |
5453 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
5454 | ' 0 | |
5455 | trap 'as_fn_exit 1' 1 2 13 15 | |
5456 | } | |
5457 | # Create a (secure) tmp directory for tmp files. | |
5458 | ||
5459 | { | |
5460 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
5461 | test -d "$tmp" | |
5462 | } || | |
5463 | { | |
5464 | tmp=./conf$$-$RANDOM | |
5465 | (umask 077 && mkdir "$tmp") | |
5466 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 | |
5467 | ac_tmp=$tmp | |
5468 | ||
5469 | # Set up the scripts for CONFIG_FILES section. | |
5470 | # No need to generate them if there are no CONFIG_FILES. | |
5471 | # This happens for instance with `./config.status config.h'. | |
5472 | if test -n "$CONFIG_FILES"; then | |
5473 | ||
5474 | ||
5475 | ac_cr=`echo X | tr X '\015'` | |
5476 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
5477 | # But we know of no other shell where ac_cr would be empty at this | |
5478 | # point, so we can use a bashism as a fallback. | |
5479 | if test "x$ac_cr" = x; then | |
5480 | eval ac_cr=\$\'\\r\' | |
5481 | fi | |
5482 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
5483 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
5484 | ac_cs_awk_cr='\\r' | |
5485 | else | |
5486 | ac_cs_awk_cr=$ac_cr | |
5487 | fi | |
5488 | ||
5489 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && | |
5490 | _ACEOF | |
5491 | ||
5492 | ||
5493 | { | |
5494 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
5495 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
5496 | echo "_ACEOF" | |
5497 | } >conf$$subs.sh || | |
5498 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 | |
5499 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
5500 | ac_delim='%!_!# ' | |
5501 | for ac_last_try in false false false false false :; do | |
5502 | . ./conf$$subs.sh || | |
5503 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 | |
5504 | ||
5505 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
5506 | if test $ac_delim_n = $ac_delim_num; then | |
5507 | break | |
5508 | elif $ac_last_try; then | |
5509 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 | |
5510 | else | |
5511 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
5512 | fi | |
5513 | done | |
5514 | rm -f conf$$subs.sh | |
5515 | ||
5516 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
5517 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && | |
5518 | _ACEOF | |
5519 | sed -n ' | |
5520 | h | |
5521 | s/^/S["/; s/!.*/"]=/ | |
5522 | p | |
5523 | g | |
5524 | s/^[^!]*!// | |
5525 | :repl | |
5526 | t repl | |
5527 | s/'"$ac_delim"'$// | |
5528 | t delim | |
5529 | :nl | |
5530 | h | |
5531 | s/\(.\{148\}\)..*/\1/ | |
5532 | t more1 | |
5533 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
5534 | p | |
5535 | n | |
5536 | b repl | |
5537 | :more1 | |
5538 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
5539 | p | |
5540 | g | |
5541 | s/.\{148\}// | |
5542 | t nl | |
5543 | :delim | |
5544 | h | |
5545 | s/\(.\{148\}\)..*/\1/ | |
5546 | t more2 | |
5547 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
5548 | p | |
5549 | b | |
5550 | :more2 | |
5551 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
5552 | p | |
5553 | g | |
5554 | s/.\{148\}// | |
5555 | t delim | |
5556 | ' <conf$$subs.awk | sed ' | |
5557 | /^[^""]/{ | |
5558 | N | |
5559 | s/\n// | |
5560 | } | |
5561 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
5562 | rm -f conf$$subs.awk | |
5563 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
5564 | _ACAWK | |
5565 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && | |
5566 | for (key in S) S_is_set[key] = 1 | |
5567 | FS = "" | |
5568 | ||
5569 | } | |
5570 | { | |
5571 | line = $ 0 | |
5572 | nfields = split(line, field, "@") | |
5573 | substed = 0 | |
5574 | len = length(field[1]) | |
5575 | for (i = 2; i < nfields; i++) { | |
5576 | key = field[i] | |
5577 | keylen = length(key) | |
5578 | if (S_is_set[key]) { | |
5579 | value = S[key] | |
5580 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
5581 | len += length(value) + length(field[++i]) | |
5582 | substed = 1 | |
5583 | } else | |
5584 | len += 1 + keylen | |
5585 | } | |
5586 | ||
5587 | print line | |
5588 | } | |
5589 | ||
5590 | _ACAWK | |
5591 | _ACEOF | |
5592 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
5593 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
5594 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
5595 | else | |
5596 | cat | |
5597 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ | |
5598 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
5599 | _ACEOF | |
5600 | ||
5601 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), | |
5602 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
5603 | # trailing colons and then remove the whole line if VPATH becomes empty | |
5604 | # (actually we leave an empty line to preserve line numbers). | |
5605 | if test "x$srcdir" = x.; then | |
5606 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ | |
5607 | h | |
5608 | s/// | |
5609 | s/^/:/ | |
5610 | s/[ ]*$/:/ | |
5611 | s/:\$(srcdir):/:/g | |
5612 | s/:\${srcdir}:/:/g | |
5613 | s/:@srcdir@:/:/g | |
5614 | s/^:*// | |
5615 | s/:*$// | |
5616 | x | |
5617 | s/\(=[ ]*\).*/\1/ | |
5618 | G | |
5619 | s/\n// | |
5620 | s/^[^=]*=[ ]*$// | |
5621 | }' | |
5622 | fi | |
5623 | ||
5624 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
5625 | fi # test -n "$CONFIG_FILES" | |
5626 | ||
5627 | # Set up the scripts for CONFIG_HEADERS section. | |
5628 | # No need to generate them if there are no CONFIG_HEADERS. | |
5629 | # This happens for instance with `./config.status Makefile'. | |
5630 | if test -n "$CONFIG_HEADERS"; then | |
5631 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || | |
5632 | BEGIN { | |
5633 | _ACEOF | |
5634 | ||
5635 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
5636 | # here-document in config.status, that substitutes the proper values into | |
5637 | # config.h.in to produce config.h. | |
5638 | ||
5639 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
5640 | # handling of long lines. | |
5641 | ac_delim='%!_!# ' | |
5642 | for ac_last_try in false false :; do | |
5643 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` | |
5644 | if test -z "$ac_tt"; then | |
5645 | break | |
5646 | elif $ac_last_try; then | |
5647 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
5648 | else | |
5649 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
5650 | fi | |
5651 | done | |
5652 | ||
5653 | # For the awk script, D is an array of macro values keyed by name, | |
5654 | # likewise P contains macro parameters if any. Preserve backslash | |
5655 | # newline sequences. | |
5656 | ||
5657 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
5658 | sed -n ' | |
5659 | s/.\{148\}/&'"$ac_delim"'/g | |
5660 | t rset | |
5661 | :rset | |
5662 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
5663 | t def | |
5664 | d | |
5665 | :def | |
5666 | s/\\$// | |
5667 | t bsnl | |
5668 | s/["\\]/\\&/g | |
5669 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
5670 | D["\1"]=" \3"/p | |
5671 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
5672 | d | |
5673 | :bsnl | |
5674 | s/["\\]/\\&/g | |
5675 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
5676 | D["\1"]=" \3\\\\\\n"\\/p | |
5677 | t cont | |
5678 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
5679 | t cont | |
5680 | d | |
5681 | :cont | |
5682 | n | |
5683 | s/.\{148\}/&'"$ac_delim"'/g | |
5684 | t clear | |
5685 | :clear | |
5686 | s/\\$// | |
5687 | t bsnlc | |
5688 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
5689 | d | |
5690 | :bsnlc | |
5691 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
5692 | b cont | |
5693 | ' <confdefs.h | sed ' | |
5694 | s/'"$ac_delim"'/"\\\ | |
5695 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
5696 | ||
5697 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
5698 | for (key in D) D_is_set[key] = 1 | |
5699 | FS = "" | |
5700 | } | |
5701 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
5702 | line = \$ 0 | |
5703 | split(line, arg, " ") | |
5704 | if (arg[1] == "#") { | |
5705 | defundef = arg[2] | |
5706 | mac1 = arg[3] | |
5707 | } else { | |
5708 | defundef = substr(arg[1], 2) | |
5709 | mac1 = arg[2] | |
5710 | } | |
5711 | split(mac1, mac2, "(") #) | |
5712 | macro = mac2[1] | |
5713 | prefix = substr(line, 1, index(line, defundef) - 1) | |
5714 | if (D_is_set[macro]) { | |
5715 | # Preserve the white space surrounding the "#". | |
5716 | print prefix "define", macro P[macro] D[macro] | |
5717 | next | |
5718 | } else { | |
5719 | # Replace #undef with comments. This is necessary, for example, | |
5720 | # in the case of _POSIX_SOURCE, which is predefined and required | |
5721 | # on some systems where configure will not decide to define it. | |
5722 | if (defundef == "undef") { | |
5723 | print "/*", prefix defundef, macro, "*/" | |
5724 | next | |
5725 | } | |
5726 | } | |
5727 | } | |
5728 | { print } | |
5729 | _ACAWK | |
5730 | _ACEOF | |
5731 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
5732 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 | |
5733 | fi # test -n "$CONFIG_HEADERS" | |
5734 | ||
5735 | ||
5736 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
5737 | shift | |
5738 | for ac_tag | |
5739 | do | |
5740 | case $ac_tag in | |
5741 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
5742 | esac | |
5743 | case $ac_mode$ac_tag in | |
5744 | :[FHL]*:*);; | |
5745 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
5746 | :[FH]-) ac_tag=-:-;; | |
5747 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
5748 | esac | |
5749 | ac_save_IFS=$IFS | |
5750 | IFS=: | |
5751 | set x $ac_tag | |
5752 | IFS=$ac_save_IFS | |
5753 | shift | |
5754 | ac_file=$1 | |
5755 | shift | |
5756 | ||
5757 | case $ac_mode in | |
5758 | :L) ac_source=$1;; | |
5759 | :[FH]) | |
5760 | ac_file_inputs= | |
5761 | for ac_f | |
5762 | do | |
5763 | case $ac_f in | |
5764 | -) ac_f="$ac_tmp/stdin";; | |
5765 | *) # Look for the file first in the build tree, then in the source tree | |
5766 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
5767 | # because $ac_f cannot contain `:'. | |
5768 | test -f "$ac_f" || | |
5769 | case $ac_f in | |
5770 | [\\/$]*) false;; | |
5771 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
5772 | esac || | |
5773 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
5774 | esac | |
5775 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
5776 | as_fn_append ac_file_inputs " '$ac_f'" | |
5777 | done | |
5778 | ||
5779 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
5780 | # use $as_me), people would be surprised to read: | |
5781 | # /* config.h. Generated by config.status. */ | |
5782 | configure_input='Generated from '` | |
5783 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
5784 | `' by configure.' | |
5785 | if test x"$ac_file" != x-; then | |
5786 | configure_input="$ac_file. $configure_input" | |
5787 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
5788 | $as_echo "$as_me: creating $ac_file" >&6;} | |
5789 | fi | |
5790 | # Neutralize special characters interpreted by sed in replacement strings. | |
5791 | case $configure_input in #( | |
5792 | *\&* | *\|* | *\\* ) | |
5793 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
5794 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
5795 | *) ac_sed_conf_input=$configure_input;; | |
5796 | esac | |
5797 | ||
5798 | case $ac_tag in | |
5799 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ | |
5800 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
5801 | esac | |
5802 | ;; | |
5803 | esac | |
5804 | ||
5805 | ac_dir=`$as_dirname -- "$ac_file" || | |
5806 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
5807 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
5808 | X"$ac_file" : 'X\(//\)$' \| \ | |
5809 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || | |
5810 | $as_echo X"$ac_file" | | |
5811 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
5812 | s//\1/ | |
5813 | q | |
5814 | } | |
5815 | /^X\(\/\/\)[^/].*/{ | |
5816 | s//\1/ | |
5817 | q | |
5818 | } | |
5819 | /^X\(\/\/\)$/{ | |
5820 | s//\1/ | |
5821 | q | |
5822 | } | |
5823 | /^X\(\/\).*/{ | |
5824 | s//\1/ | |
5825 | q | |
5826 | } | |
5827 | s/.*/./; q'` | |
5828 | as_dir="$ac_dir"; as_fn_mkdir_p | |
5829 | ac_builddir=. | |
5830 | ||
5831 | case "$ac_dir" in | |
5832 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
5833 | *) | |
5834 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
5835 | # A ".." for each directory in $ac_dir_suffix. | |
5836 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
5837 | case $ac_top_builddir_sub in | |
5838 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
5839 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
5840 | esac ;; | |
5841 | esac | |
5842 | ac_abs_top_builddir=$ac_pwd | |
5843 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
5844 | # for backward compatibility: | |
5845 | ac_top_builddir=$ac_top_build_prefix | |
5846 | ||
5847 | case $srcdir in | |
5848 | .) # We are building in place. | |
5849 | ac_srcdir=. | |
5850 | ac_top_srcdir=$ac_top_builddir_sub | |
5851 | ac_abs_top_srcdir=$ac_pwd ;; | |
5852 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
5853 | ac_srcdir=$srcdir$ac_dir_suffix; | |
5854 | ac_top_srcdir=$srcdir | |
5855 | ac_abs_top_srcdir=$srcdir ;; | |
5856 | *) # Relative name. | |
5857 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
5858 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
5859 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
5860 | esac | |
5861 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
5862 | ||
5863 | ||
5864 | case $ac_mode in | |
5865 | :F) | |
5866 | # | |
5867 | # CONFIG_FILE | |
5868 | # | |
5869 | ||
5870 | case $INSTALL in | |
5871 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
5872 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; | |
5873 | esac | |
5874 | ac_MKDIR_P=$MKDIR_P | |
5875 | case $MKDIR_P in | |
5876 | [\\/$]* | ?:[\\/]* ) ;; | |
5877 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
5878 | esac | |
5879 | _ACEOF | |
5880 | ||
5881 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
5882 | # If the template does not know about datarootdir, expand it. | |
5883 | # FIXME: This hack should be removed a few years after 2.60. | |
5884 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
5885 | ac_sed_dataroot=' | |
5886 | /datarootdir/ { | |
5887 | p | |
5888 | q | |
5889 | } | |
5890 | /@datadir@/p | |
5891 | /@docdir@/p | |
5892 | /@infodir@/p | |
5893 | /@localedir@/p | |
5894 | /@mandir@/p' | |
5895 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
5896 | *datarootdir*) ac_datarootdir_seen=yes;; | |
5897 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
5898 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
5899 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
5900 | _ACEOF | |
5901 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
5902 | ac_datarootdir_hack=' | |
5903 | s&@datadir@&$datadir&g | |
5904 | s&@docdir@&$docdir&g | |
5905 | s&@infodir@&$infodir&g | |
5906 | s&@localedir@&$localedir&g | |
5907 | s&@mandir@&$mandir&g | |
5908 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
5909 | esac | |
5910 | _ACEOF | |
5911 | ||
5912 | # Neutralize VPATH when `$srcdir' = `.'. | |
5913 | # Shell code in configure.ac might set extrasub. | |
5914 | # FIXME: do we really want to maintain this feature? | |
5915 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
5916 | ac_sed_extra="$ac_vpsub | |
5917 | $extrasub | |
5918 | _ACEOF | |
5919 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
5920 | :t | |
5921 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
5922 | s|@configure_input@|$ac_sed_conf_input|;t t | |
5923 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
5924 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
5925 | s&@srcdir@&$ac_srcdir&;t t | |
5926 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
5927 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
5928 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
5929 | s&@builddir@&$ac_builddir&;t t | |
5930 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
5931 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
5932 | s&@INSTALL@&$ac_INSTALL&;t t | |
5933 | s&@MKDIR_P@&$ac_MKDIR_P&;t t | |
5934 | $ac_datarootdir_hack | |
5935 | " | |
5936 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ | |
5937 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
5938 | ||
5939 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
5940 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && | |
5941 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
5942 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
5943 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
5944 | which seems to be undefined. Please make sure it is defined" >&5 | |
5945 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
5946 | which seems to be undefined. Please make sure it is defined" >&2;} | |
5947 | ||
5948 | rm -f "$ac_tmp/stdin" | |
5949 | case $ac_file in | |
5950 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; | |
5951 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
5952 | esac \ | |
5953 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
5954 | ;; | |
5955 | :H) | |
5956 | # | |
5957 | # CONFIG_HEADER | |
5958 | # | |
5959 | if test x"$ac_file" != x-; then | |
5960 | { | |
5961 | $as_echo "/* $configure_input */" \ | |
5962 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" | |
5963 | } >"$ac_tmp/config.h" \ | |
5964 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
5965 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
5966 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
5967 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
5968 | else | |
5969 | rm -f "$ac_file" | |
5970 | mv "$ac_tmp/config.h" "$ac_file" \ | |
5971 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
5972 | fi | |
5973 | else | |
5974 | $as_echo "/* $configure_input */" \ | |
5975 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ | |
5976 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
5977 | fi | |
5978 | # Compute "$ac_file"'s index in $config_headers. | |
5979 | _am_arg="$ac_file" | |
5980 | _am_stamp_count=1 | |
5981 | for _am_header in $config_headers :; do | |
5982 | case $_am_header in | |
5983 | $_am_arg | $_am_arg:* ) | |
5984 | break ;; | |
5985 | * ) | |
5986 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
5987 | esac | |
5988 | done | |
5989 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || | |
5990 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
5991 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
5992 | X"$_am_arg" : 'X\(//\)$' \| \ | |
5993 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
5994 | $as_echo X"$_am_arg" | | |
5995 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
5996 | s//\1/ | |
5997 | q | |
5998 | } | |
5999 | /^X\(\/\/\)[^/].*/{ | |
6000 | s//\1/ | |
6001 | q | |
6002 | } | |
6003 | /^X\(\/\/\)$/{ | |
6004 | s//\1/ | |
6005 | q | |
6006 | } | |
6007 | /^X\(\/\).*/{ | |
6008 | s//\1/ | |
6009 | q | |
6010 | } | |
6011 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
6012 | ;; | |
6013 | ||
6014 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
6015 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
6016 | ;; | |
6017 | esac | |
6018 | ||
6019 | ||
6020 | case $ac_file$ac_mode in | |
6021 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { | |
6022 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
6023 | # are listed without --file. Let's play safe and only enable the eval | |
6024 | # if we detect the quoting. | |
6025 | case $CONFIG_FILES in | |
6026 | *\'*) eval set x "$CONFIG_FILES" ;; | |
6027 | *) set x $CONFIG_FILES ;; | |
6028 | esac | |
6029 | shift | |
6030 | for mf | |
6031 | do | |
6032 | # Strip MF so we end up with the name of the file. | |
6033 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
6034 | # Check whether this is an Automake generated Makefile or not. | |
6035 | # We used to match only the files named `Makefile.in', but | |
6036 | # some people rename them; so instead we look at the file content. | |
6037 | # Grep'ing the first line is not enough: some people post-process | |
6038 | # each Makefile.in and add a new line on top of each file to say so. | |
6039 | # Grep'ing the whole file is not good either: AIX grep has a line | |
6040 | # limit of 2048, but all sed's we know have understand at least 4000. | |
6041 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
6042 | dirpart=`$as_dirname -- "$mf" || | |
6043 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
6044 | X"$mf" : 'X\(//\)[^/]' \| \ | |
6045 | X"$mf" : 'X\(//\)$' \| \ | |
6046 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || | |
6047 | $as_echo X"$mf" | | |
6048 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
6049 | s//\1/ | |
6050 | q | |
6051 | } | |
6052 | /^X\(\/\/\)[^/].*/{ | |
6053 | s//\1/ | |
6054 | q | |
6055 | } | |
6056 | /^X\(\/\/\)$/{ | |
6057 | s//\1/ | |
6058 | q | |
6059 | } | |
6060 | /^X\(\/\).*/{ | |
6061 | s//\1/ | |
6062 | q | |
6063 | } | |
6064 | s/.*/./; q'` | |
6065 | else | |
6066 | continue | |
6067 | fi | |
6068 | # Extract the definition of DEPDIR, am__include, and am__quote | |
6069 | # from the Makefile without running `make'. | |
6070 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
6071 | test -z "$DEPDIR" && continue | |
6072 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
6073 | test -z "am__include" && continue | |
6074 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
6075 | # When using ansi2knr, U may be empty or an underscore; expand it | |
6076 | U=`sed -n 's/^U = //p' < "$mf"` | |
6077 | # Find all dependency output files, they are included files with | |
6078 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
6079 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
6080 | # expansion. | |
6081 | for file in `sed -n " | |
6082 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
6083 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
6084 | # Make sure the directory exists. | |
6085 | test -f "$dirpart/$file" && continue | |
6086 | fdir=`$as_dirname -- "$file" || | |
6087 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
6088 | X"$file" : 'X\(//\)[^/]' \| \ | |
6089 | X"$file" : 'X\(//\)$' \| \ | |
6090 | X"$file" : 'X\(/\)' \| . 2>/dev/null || | |
6091 | $as_echo X"$file" | | |
6092 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
6093 | s//\1/ | |
6094 | q | |
6095 | } | |
6096 | /^X\(\/\/\)[^/].*/{ | |
6097 | s//\1/ | |
6098 | q | |
6099 | } | |
6100 | /^X\(\/\/\)$/{ | |
6101 | s//\1/ | |
6102 | q | |
6103 | } | |
6104 | /^X\(\/\).*/{ | |
6105 | s//\1/ | |
6106 | q | |
6107 | } | |
6108 | s/.*/./; q'` | |
6109 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
6110 | # echo "creating $dirpart/$file" | |
6111 | echo '# dummy' > "$dirpart/$file" | |
6112 | done | |
6113 | done | |
6114 | } | |
6115 | ;; | |
6116 | ||
6117 | esac | |
6118 | done # for ac_tag | |
6119 | ||
6120 | ||
6121 | as_fn_exit 0 | |
6122 | _ACEOF | |
6123 | ac_clean_files=$ac_clean_files_save | |
6124 | ||
6125 | test $ac_write_fail = 0 || | |
6126 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
6127 | ||
6128 | ||
6129 | # configure is writing to config.log, and then calls config.status. | |
6130 | # config.status does its own redirection, appending to config.log. | |
6131 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
6132 | # by configure, so config.status won't be able to write to it; its | |
6133 | # output is simply discarded. So we exec the FD to /dev/null, | |
6134 | # effectively closing config.log, so it can be properly (re)opened and | |
6135 | # appended to by config.status. When coming back to configure, we | |
6136 | # need to make the FD available again. | |
6137 | if test "$no_create" != yes; then | |
6138 | ac_cs_success=: | |
6139 | ac_config_status_args= | |
6140 | test "$silent" = yes && | |
6141 | ac_config_status_args="$ac_config_status_args --quiet" | |
6142 | exec 5>/dev/null | |
6143 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
6144 | exec 5>>config.log | |
6145 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
6146 | # would make configure fail if this is the last instruction. | |
6147 | $ac_cs_success || as_fn_exit 1 | |
6148 | fi | |
6149 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
6150 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
6151 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
6152 | fi | |
6153 | ||
6154 | ||
6155 | echo ${bindir} | $GREP '\$' >/dev/null 2>&1 && bindir=`eval echo ${bindir}` | |
6156 | echo ${bindir} | $GREP '\$' >/dev/null 2>&1 && bindir=`eval echo ${bindir}` | |
6157 | ||
6158 | echo ${mandir} | $GREP '\$' >/dev/null 2>&1 && mandir=`eval echo ${mandir}` | |
6159 | echo ${mandir} | $GREP '\$' >/dev/null 2>&1 && mandir=`eval echo ${mandir}` | |
6160 | ||
6161 | echo ${datadir} | $GREP '\$' >/dev/null 2>&1 && datadir=`eval echo ${datadir}` | |
6162 | echo ${datadir} | $GREP '\$' >/dev/null 2>&1 && datadir=`eval echo ${datadir}` | |
6163 | ||
6164 | echo ${applicationsdir} | $GREP '\$' >/dev/null 2>&1 && applicationsdir=`eval echo ${applicationsdir}` | |
6165 | echo ${iconsdir} | $GREP '\$' >/dev/null 2>&1 && iconsdir=`eval echo ${iconsdir}` | |
6166 | echo ${pixmapsdir} | $GREP '\$' >/dev/null 2>&1 && pixmapsdir=`eval echo ${pixmapsdir}` | |
6167 | echo ${menudir} | $GREP '\$' >/dev/null 2>&1 && menudir=`eval echo ${menudir}` | |
6168 | ||
6169 | ## Summary of configuration results. | |
6170 | ## | |
6171 | cat <<EOT | |
6172 | ||
6173 | ${PACKAGE_NAME}, version ${PACKAGE_VERSION}: | |
6174 | ||
6175 | Prefix: ${prefix} | |
6176 | Bindir: ${bindir} | |
6177 | Mandir: ${mandir} | |
6178 | EOT | |
6179 | ||
6180 | if test x"$enable_desktop" = xyes; then | |
6181 | cat <<EOT | |
6182 | ||
6183 | Desktop file: ${applicationsdir}/nettoe.desktop | |
6184 | Icons: ${iconsdir}/hicolor/... | |
6185 | Pixmap: ${pixmapsdir}/nettoe.xpm | |
6186 | EOT | |
6187 | if test x"$enable_menu" = xyes; then | |
6188 | cat <<EOT | |
6189 | Menu file: ${menudir}/nettoe.menu | |
6190 | EOT | |
6191 | fi | |
6192 | fi | |
6193 | ||
6194 | cat <<EOT | |
6195 | ||
6196 | TCP port: ${NETTOE_PORT} | |
6197 | Curses: ${with_terminfo} | |
6198 | ||
6199 | Compiling: ${CC} ${CPPFLAGS} ${CFLAGS} | |
6200 | Linking: ${NETTOE_LDADD} | |
6201 | ||
6202 | Build: ${build} | |
6203 | Host: ${host} | |
6204 | ||
6205 | EOT |
0 | dnl configure.in file for nettoe | |
1 | dnl Initiated by Gabriele Giorgetti <g.gabriele@europe.com> | |
2 | dnl Continued by Mats Erik Andersson <meand@users.sourceforge.net> | |
3 | ||
4 | dnl To be processed by autoconf. | |
5 | ||
6 | AC_INIT([nettoe], [1.5.1], [meand@users.sourceforge.net]) | |
7 | AC_PREREQ(2.59) | |
8 | AC_REVISION([in CVS, $Revision: 1.15 $]) | |
9 | ||
10 | AC_CONFIG_SRCDIR([src/nettoe.c]) | |
11 | AC_CONFIG_AUX_DIR([build-aux]) | |
12 | AC_CONFIG_HEADERS(config.h) | |
13 | AC_CANONICAL_HOST | |
14 | ||
15 | AM_INIT_AUTOMAKE([1.9 -Wall -Werror no-define]) | |
16 | ||
17 | AC_DEFINE([PACKAGE_RELEASE_DATE], | |
18 | ["March 21th, 2014"], [Date of source release.]) | |
19 | ||
20 | dnl Decide on using terminfo | |
21 | AC_ARG_WITH([terminfo], | |
22 | [AS_HELP_STRING([--without-terminfo], | |
23 | [do not use terminfo/termcap])]) | |
24 | ||
25 | dnl Choice of server's TCP port. | |
26 | AC_ARG_WITH([port], | |
27 | [AS_HELP_STRING([--with-port=NUM], | |
28 | [numeric TCP port of server (defaults to 7501)])], | |
29 | [], [with_port=7501]) | |
30 | ||
31 | dnl Supporting files for desktop. | |
32 | AC_ARG_ENABLE([desktop], | |
33 | [AS_HELP_STRING([--enable-desktop], | |
34 | [install icons and desktop description])]) | |
35 | AC_ARG_ENABLE([menu], | |
36 | [AS_HELP_STRING([--enable-menu], | |
37 | [install menu file on desktop systems])]) | |
38 | ||
39 | AM_CONDITIONAL([ENABLE_DESKTOP], [test "$enable_desktop" = yes]) | |
40 | AM_CONDITIONAL([ENABLE_MENU], [test "$enable_menu" = yes]) | |
41 | ||
42 | AC_PROG_CC | |
43 | AC_PROG_SED | |
44 | ||
45 | dnl Check for standard C headers | |
46 | AC_HEADER_STDC | |
47 | ||
48 | dnl Check for extra required headers | |
49 | AC_CHECK_HEADERS( \ | |
50 | string.h \ | |
51 | strings.h \ | |
52 | errno.h \ | |
53 | signal.h \ | |
54 | netdb.h \ | |
55 | netinet/in.h \ | |
56 | arpa/inet.h \ | |
57 | sys/socket.h \ | |
58 | sys/types.h \ | |
59 | sys/wait.h \ | |
60 | unistd.h \ | |
61 | curses.h \ | |
62 | ncurses.h \ | |
63 | ncurses/ncurses.h \ | |
64 | ncurses/term.h \ | |
65 | termcap.h \ | |
66 | ) | |
67 | ||
68 | dnl OpenSolaris complains if <term.h> is not | |
69 | dnl included together with <curses.h>. This | |
70 | dnl works around that issue. | |
71 | if test "$ac_cv_header_curses_h" = "yes"; then | |
72 | AC_MSG_CHECKING(for term.h with curses.h) | |
73 | save_LIBS="$LIBS" | |
74 | LIBS="$save_LIBS -lcurses" | |
75 | AC_TRY_LINK([#include <curses.h> | |
76 | #include <term.h>], , | |
77 | [eval "ac_nettoe_curses_term=yes"], | |
78 | [eval "ac_nettoe_curses_term=no"]) | |
79 | LIBS="$save_LIBS" | |
80 | if test "$ac_nettoe_curses_term" = "yes"; then | |
81 | AC_DEFINE(HAVE_TERM_H, 1, | |
82 | [Define to 1 if you have <term.h>]) | |
83 | fi | |
84 | AC_MSG_RESULT($ac_nettoe_curses_term) | |
85 | fi | |
86 | ||
87 | dnl Check for library functions | |
88 | AC_CHECK_FUNCS(strcat strcmp strcpy strncasecmp) | |
89 | ||
90 | dnl Network library for Solaris | |
91 | AC_SEARCH_LIBS([socket],[socket]) | |
92 | ||
93 | dnl Supported terminal capability libraries. | |
94 | dnl They are checked in this order later on. | |
95 | AC_CHECK_LIB([tinfo], [setupterm], [LIBTINFO=-ltinfo]) | |
96 | AC_CHECK_LIB([ncurses], [setupterm], [LIBNCURSES=-lncurses], | |
97 | [## Dig deeper for ncurses with OpenSolaris. | |
98 | AC_MSG_CHECKING([for setupterm and ncurses in /usr/gnu/lib]) | |
99 | saved_LDFLAGS=$LDFLAGS | |
100 | saved_LIBS=$LIBS | |
101 | LDFLAGS="$LDFLAGS -L/usr/gnu/lib" | |
102 | LIBS="$LIBS -lncurses" | |
103 | dnl AC_CHECK_LIB([ncurses], [setupterm], [LIBNCURSES=-lncurses]) | |
104 | AC_LINK_IFELSE([AC_LANG_CALL([], [setupterm])], | |
105 | [LIBNCURSES=-lncurses | |
106 | NETTOE_LDADD="$NETTOE_LDADD -L/usr/gnu/lib" | |
107 | ac_nettoe_usr_gnu_lib_ncurses=yes | |
108 | AC_MSG_RESULT([yes])], | |
109 | [ | |
110 | ac_nettoe_usr_gnu_lib_ncurses=no | |
111 | AC_MSG_RESULT([no])]) | |
112 | LDFLAGS=$saved_LDFLAGS | |
113 | LIBS=$saved_LIBS]dnl | |
114 | ) | |
115 | AC_CHECK_LIB([curses], [setupterm], [LIBCURSES=-lcurses]) | |
116 | AC_CHECK_LIB([termcap], [tgetent], [LIBTERMCAP=-ltermcap]) | |
117 | AC_SUBST(LIBTINFO) | |
118 | AC_SUBST(LIBNCURSES) | |
119 | AC_SUBST(LIBCURSES) | |
120 | AC_SUBST(LIBTERMCAP) | |
121 | AC_SUBST(NETTOE_LDADD) | |
122 | ||
123 | dnl Use setupterm() and tgetent() as markers | |
124 | dnl for choosing between libtinfo, libncurses, | |
125 | dnl libcurses, and libtermcap. | |
126 | if test "$with_terminfo" = "no" ; then | |
127 | NETTOE_LDADD= | |
128 | else | |
129 | AC_MSG_CHECKING([for best terminal capability library]) | |
130 | if test "$ac_cv_lib_tinfo_setupterm" = "yes" \ | |
131 | && test "$ac_cv_header_ncurses_h" = "yes" ; then | |
132 | AC_DEFINE(HAVE_SETUPTERM, 1, | |
133 | [Use setupterm() for terminal setup]) | |
134 | AC_DEFINE(USE_NCURSES, 1, | |
135 | [Use ncurses for terminal capabilities]) | |
136 | NETTOE_LDADD="${NETTOE_LDADD} ${LIBTINFO}" | |
137 | with_terminfo=yes | |
138 | AC_MSG_RESULT(${LIBTINFO}) | |
139 | elif ( test "$ac_cv_lib_ncurses_setupterm" = "yes" \ | |
140 | || test "x$ac_nettoe_usr_gnu_lib_ncurses" = x"yes" ) \ | |
141 | && ( test "$ac_cv_header_ncurses_h" = "yes" \ | |
142 | || test "$ac_cv_header_ncurses_ncurses_h" = "yes" ); then | |
143 | AC_DEFINE(HAVE_SETUPTERM, 1, | |
144 | [Use setupterm() for terminal setup]) | |
145 | AC_DEFINE(USE_NCURSES, 1, | |
146 | [Use ncurses for terminal capabilities]) | |
147 | NETTOE_LDADD="${NETTOE_LDADD} ${LIBNCURSES}" | |
148 | with_terminfo=yes | |
149 | AC_MSG_RESULT($LIBNCURSES) | |
150 | elif test "$ac_cv_lib_curses_setupterm" = "yes" \ | |
151 | && test "$ac_cv_header_curses_h" = "yes" ; then | |
152 | AC_DEFINE(HAVE_SETUPTERM, 1, | |
153 | [Use setupterm() for terminal setup]) | |
154 | AC_DEFINE(USE_CURSES, 1, | |
155 | [Use curses for terminal capabilities]) | |
156 | NETTOE_LDADD="${NETTOE_LDADD} ${LIBCURSES}" | |
157 | with_terminfo=yes | |
158 | AC_MSG_RESULT($LIBCURSES) | |
159 | elif test "$ac_cv_lib_termcap_tgetent" = "yes" \ | |
160 | && test "$ac_cv_header_termcap_h" = "yes" ; then | |
161 | AC_DEFINE(HAVE_TGETENT, 1, | |
162 | [Use tgetent() for terminal setup]) | |
163 | AC_DEFINE(USE_TERMCAP, 1, | |
164 | [Use termcap for terminal capabilities]) | |
165 | NETTOE_LDADD="${NETTOE_LDADD} ${LIBTERMCAP}" | |
166 | with_terminfo=yes | |
167 | AC_MSG_RESULT($LIBTERMCAP) | |
168 | else | |
169 | with_terminfo=no | |
170 | NETTOE_LDADD= | |
171 | AC_MSG_RESULT(none) | |
172 | fi | |
173 | ||
174 | if test "$ac_cv_lib_ncurses_setupterm" = "yes" \ | |
175 | || test "$ac_cv_lib_curses_setupterm" = "yes" \ | |
176 | || test "$ac_cv_lib_tinfo_setupterm" = "yes" ; then | |
177 | AC_DEFINE(USE_TERMINFO, 1, [Use terminfo for terminal capabilities]) | |
178 | fi | |
179 | fi | |
180 | ||
181 | # Parse selected listening port. | |
182 | if test "$with_port" != "yes" && test "$with_port" != "no"; then | |
183 | test -n "$NETTOE_PORT" || NETTOE_PORT=$with_port | |
184 | fi | |
185 | ||
186 | test -n "$NETTOE_PORT" || NETTOE_PORT=7501 | |
187 | ||
188 | AC_ARG_VAR([NETTOE_PORT], [numeric TCP port of server]) | |
189 | ||
190 | test -n "$applicationsdir" || applicationsdir='${datadir}/applications' | |
191 | test -n "$iconsdir" || iconsdir='${datadir}/icons' | |
192 | test -n "$menudir" || menudir='${datadir}/menu' | |
193 | test -n "$pixmapsdir" || pixmapsdir='${datadir}/pixmaps' | |
194 | ||
195 | AC_ARG_VAR([applicationsdir], [program descriptions [$(datadir)/applications]]) | |
196 | AC_ARG_VAR([iconsdir], [base directory for icons [$(datadir)/icons]]) | |
197 | AC_ARG_VAR([menudir], [location of menu descriptions [$(datadir)/menu]]) | |
198 | AC_ARG_VAR([pixmapsdir], [location of pixmaps [$(datadir)/pixmaps]]) | |
199 | ||
200 | AC_CONFIG_FILES([Makefile docs/Makefile src/Makefile test/Makefile | |
201 | desktop/Makefile]) | |
202 | ||
203 | AC_OUTPUT | |
204 | ||
205 | dnl ${prefix} is embedded two levels into the string values. | |
206 | echo ${bindir} | $GREP '\$' >/dev/null 2>&1 && bindir=`eval echo ${bindir}` | |
207 | echo ${bindir} | $GREP '\$' >/dev/null 2>&1 && bindir=`eval echo ${bindir}` | |
208 | ||
209 | echo ${mandir} | $GREP '\$' >/dev/null 2>&1 && mandir=`eval echo ${mandir}` | |
210 | echo ${mandir} | $GREP '\$' >/dev/null 2>&1 && mandir=`eval echo ${mandir}` | |
211 | ||
212 | echo ${datadir} | $GREP '\$' >/dev/null 2>&1 && datadir=`eval echo ${datadir}` | |
213 | echo ${datadir} | $GREP '\$' >/dev/null 2>&1 && datadir=`eval echo ${datadir}` | |
214 | ||
215 | echo ${applicationsdir} | $GREP '\$' >/dev/null 2>&1 && applicationsdir=`eval echo ${applicationsdir}` | |
216 | echo ${iconsdir} | $GREP '\$' >/dev/null 2>&1 && iconsdir=`eval echo ${iconsdir}` | |
217 | echo ${pixmapsdir} | $GREP '\$' >/dev/null 2>&1 && pixmapsdir=`eval echo ${pixmapsdir}` | |
218 | echo ${menudir} | $GREP '\$' >/dev/null 2>&1 && menudir=`eval echo ${menudir}` | |
219 | ||
220 | ## Summary of configuration results. | |
221 | ## | |
222 | cat <<EOT | |
223 | ||
224 | ${PACKAGE_NAME}, version ${PACKAGE_VERSION}: | |
225 | ||
226 | Prefix: ${prefix} | |
227 | Bindir: ${bindir} | |
228 | Mandir: ${mandir} | |
229 | EOT | |
230 | ||
231 | if test x"$enable_desktop" = xyes; then | |
232 | cat <<EOT | |
233 | ||
234 | Desktop file: ${applicationsdir}/nettoe.desktop | |
235 | Icons: ${iconsdir}/hicolor/... | |
236 | Pixmap: ${pixmapsdir}/nettoe.xpm | |
237 | EOT | |
238 | if test x"$enable_menu" = xyes; then | |
239 | cat <<EOT | |
240 | Menu file: ${menudir}/nettoe.menu | |
241 | EOT | |
242 | fi | |
243 | fi | |
244 | ||
245 | cat <<EOT | |
246 | ||
247 | TCP port: ${NETTOE_PORT} | |
248 | Curses: ${with_terminfo} | |
249 | ||
250 | Compiling: ${CC} ${CPPFLAGS} ${CFLAGS} | |
251 | Linking: ${NETTOE_LDADD} | |
252 | ||
253 | Build: ${build} | |
254 | Host: ${host} | |
255 | ||
256 | EOT |
0 | # Makefile.am file for nettoe | |
1 | # Maintained by Mats Erik Andersson <meand@users.sourceforge.net> | |
2 | ||
3 | # This file is processed by automake. | |
4 | ||
5 | EXTRA_DIST = ocross.xpm ocross_skew.xpm \ | |
6 | ocross_left.xpm ocross_right.xpm \ | |
7 | ocross_bottom.xpm ocross_top.xpm \ | |
8 | ocross16.png ocross32.png \ | |
9 | ocross_skew16.png ocross_skew32.png \ | |
10 | nettoe.desktop.in nettoe.menu.in | |
11 | ||
12 | DESKTOP = nettoe.desktop | |
13 | ICON = ocross_skew | |
14 | MENU = nettoe.menu | |
15 | ||
16 | BUILT_SOURCES = | |
17 | ||
18 | if ENABLE_DESKTOP | |
19 | BUILT_SOURCES += $(DESKTOP) | |
20 | if ENABLE_MENU | |
21 | BUILT_SOURCES += $(MENU) | |
22 | endif | |
23 | endif | |
24 | ||
25 | applicationsdir = @applicationsdir@ | |
26 | hicolordir = @iconsdir@/hicolor | |
27 | menudir = @menudir@ | |
28 | pixmapsdir = @pixmapsdir@ | |
29 | ||
30 | rewrite = 's|[@]bindir[@]|$(bindir)|; s|[@]pixmapsdir[@]|$(pixmapsdir)|' | |
31 | ||
32 | $(DESKTOP): Makefile $(DESKTOP).in | |
33 | $(SED) -e $(rewrite) $(srcdir)/$@.in > $@ | |
34 | ||
35 | $(MENU): Makefile $(MENU).in | |
36 | $(SED) -e $(rewrite) $(srcdir)/$@.in > $@ | |
37 | ||
38 | if ENABLE_DESKTOP | |
39 | applications_DATA = $(DESKTOP) | |
40 | ||
41 | if ENABLE_MENU | |
42 | menu_DATA = $(MENU) | |
43 | endif | |
44 | ||
45 | install-data-hook: | |
46 | test -d "$(DESTDIR)$(pixmapsdir)" || \ | |
47 | $(mkdir_p) "$(DESTDIR)$(pixmapsdir)" | |
48 | $(INSTALL_DATA) $(srcdir)/$(ICON).xpm "$(DESTDIR)$(pixmapsdir)"/nettoe.xpm | |
49 | test -d "$(DESTDIR)$(hicolordir)"/16x16/apps || \ | |
50 | $(mkdir_p) "$(DESTDIR)$(hicolordir)"/16x16/apps | |
51 | test -d "$(DESTDIR)$(hicolordir)"/32x32/apps || \ | |
52 | $(mkdir_p) "$(DESTDIR)$(hicolordir)"/32x32/apps | |
53 | test -s $(srcdir)/"$(ICON)16.png" && \ | |
54 | $(INSTALL_DATA) $(srcdir)/"$(ICON)16.png" "$(DESTDIR)$(hicolordir)"/16x16/apps/nettoe.png | |
55 | test -s $(srcdir)/"$(ICON)32.png" && \ | |
56 | $(INSTALL_DATA) $(srcdir)/"$(ICON)32.png" "$(DESTDIR)$(hicolordir)"/32x32/apps/nettoe.png | |
57 | ||
58 | uninstall-hook: | |
59 | rm "$(DESTDIR)$(pixmapsdir)"/nettoe.xpm \ | |
60 | "$(DESTDIR)$(hicolordir)"/16x16/apps/nettoe.png \ | |
61 | "$(DESTDIR)$(hicolordir)"/32x32/apps/nettoe.png | |
62 | endif | |
63 | ||
64 | CLEANFILES = $(DESKTOP) $(MENU) |
0 | # Makefile.in generated by automake 1.11.6 from Makefile.am. | |
1 | # @configure_input@ | |
2 | ||
3 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | |
4 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software | |
5 | # Foundation, Inc. | |
6 | # This Makefile.in is free software; the Free Software Foundation | |
7 | # gives unlimited permission to copy and/or distribute it, | |
8 | # with or without modifications, as long as this notice is preserved. | |
9 | ||
10 | # This program is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
13 | # PARTICULAR PURPOSE. | |
14 | ||
15 | @SET_MAKE@ | |
16 | ||
17 | # Makefile.am file for nettoe | |
18 | # Maintained by Mats Erik Andersson <meand@users.sourceforge.net> | |
19 | ||
20 | # This file is processed by automake. | |
21 | ||
22 | VPATH = @srcdir@ | |
23 | am__make_dryrun = \ | |
24 | { \ | |
25 | am__dry=no; \ | |
26 | case $$MAKEFLAGS in \ | |
27 | *\\[\ \ ]*) \ | |
28 | echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | |
29 | | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ | |
30 | *) \ | |
31 | for am__flg in $$MAKEFLAGS; do \ | |
32 | case $$am__flg in \ | |
33 | *=*|--*) ;; \ | |
34 | *n*) am__dry=yes; break;; \ | |
35 | esac; \ | |
36 | done;; \ | |
37 | esac; \ | |
38 | test $$am__dry = yes; \ | |
39 | } | |
40 | pkgdatadir = $(datadir)/@PACKAGE@ | |
41 | pkgincludedir = $(includedir)/@PACKAGE@ | |
42 | pkglibdir = $(libdir)/@PACKAGE@ | |
43 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | |
44 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | |
45 | install_sh_DATA = $(install_sh) -c -m 644 | |
46 | install_sh_PROGRAM = $(install_sh) -c | |
47 | install_sh_SCRIPT = $(install_sh) -c | |
48 | INSTALL_HEADER = $(INSTALL_DATA) | |
49 | transform = $(program_transform_name) | |
50 | NORMAL_INSTALL = : | |
51 | PRE_INSTALL = : | |
52 | POST_INSTALL = : | |
53 | NORMAL_UNINSTALL = : | |
54 | PRE_UNINSTALL = : | |
55 | POST_UNINSTALL = : | |
56 | build_triplet = @build@ | |
57 | host_triplet = @host@ | |
58 | @ENABLE_DESKTOP_TRUE@am__append_1 = $(DESKTOP) | |
59 | @ENABLE_DESKTOP_TRUE@@ENABLE_MENU_TRUE@am__append_2 = $(MENU) | |
60 | subdir = desktop | |
61 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | |
62 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
63 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac | |
64 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | |
65 | $(ACLOCAL_M4) | |
66 | mkinstalldirs = $(install_sh) -d | |
67 | CONFIG_HEADER = $(top_builddir)/config.h | |
68 | CONFIG_CLEAN_FILES = | |
69 | CONFIG_CLEAN_VPATH_FILES = | |
70 | SOURCES = | |
71 | DIST_SOURCES = | |
72 | am__can_run_installinfo = \ | |
73 | case $$AM_UPDATE_INFO_DIR in \ | |
74 | n|no|NO) false;; \ | |
75 | *) (install-info --version) >/dev/null 2>&1;; \ | |
76 | esac | |
77 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | |
78 | am__vpath_adj = case $$p in \ | |
79 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | |
80 | *) f=$$p;; \ | |
81 | esac; | |
82 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; | |
83 | am__install_max = 40 | |
84 | am__nobase_strip_setup = \ | |
85 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` | |
86 | am__nobase_strip = \ | |
87 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" | |
88 | am__nobase_list = $(am__nobase_strip_setup); \ | |
89 | for p in $$list; do echo "$$p $$p"; done | \ | |
90 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ | |
91 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ | |
92 | if (++n[$$2] == $(am__install_max)) \ | |
93 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ | |
94 | END { for (dir in files) print dir, files[dir] }' | |
95 | am__base_list = \ | |
96 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ | |
97 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | |
98 | am__uninstall_files_from_dir = { \ | |
99 | test -z "$$files" \ | |
100 | || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ | |
101 | || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ | |
102 | $(am__cd) "$$dir" && rm -f $$files; }; \ | |
103 | } | |
104 | am__installdirs = "$(DESTDIR)$(applicationsdir)" \ | |
105 | "$(DESTDIR)$(menudir)" | |
106 | DATA = $(applications_DATA) $(menu_DATA) | |
107 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | |
108 | ACLOCAL = @ACLOCAL@ | |
109 | AMTAR = @AMTAR@ | |
110 | AUTOCONF = @AUTOCONF@ | |
111 | AUTOHEADER = @AUTOHEADER@ | |
112 | AUTOMAKE = @AUTOMAKE@ | |
113 | AWK = @AWK@ | |
114 | CC = @CC@ | |
115 | CCDEPMODE = @CCDEPMODE@ | |
116 | CFLAGS = @CFLAGS@ | |
117 | CPP = @CPP@ | |
118 | CPPFLAGS = @CPPFLAGS@ | |
119 | CYGPATH_W = @CYGPATH_W@ | |
120 | DEFS = @DEFS@ | |
121 | DEPDIR = @DEPDIR@ | |
122 | ECHO_C = @ECHO_C@ | |
123 | ECHO_N = @ECHO_N@ | |
124 | ECHO_T = @ECHO_T@ | |
125 | EGREP = @EGREP@ | |
126 | EXEEXT = @EXEEXT@ | |
127 | GREP = @GREP@ | |
128 | INSTALL = @INSTALL@ | |
129 | INSTALL_DATA = @INSTALL_DATA@ | |
130 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
131 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | |
132 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | |
133 | LDFLAGS = @LDFLAGS@ | |
134 | LIBCURSES = @LIBCURSES@ | |
135 | LIBNCURSES = @LIBNCURSES@ | |
136 | LIBOBJS = @LIBOBJS@ | |
137 | LIBS = @LIBS@ | |
138 | LIBTERMCAP = @LIBTERMCAP@ | |
139 | LIBTINFO = @LIBTINFO@ | |
140 | LTLIBOBJS = @LTLIBOBJS@ | |
141 | MAKEINFO = @MAKEINFO@ | |
142 | MKDIR_P = @MKDIR_P@ | |
143 | NETTOE_LDADD = @NETTOE_LDADD@ | |
144 | NETTOE_PORT = @NETTOE_PORT@ | |
145 | OBJEXT = @OBJEXT@ | |
146 | PACKAGE = @PACKAGE@ | |
147 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | |
148 | PACKAGE_NAME = @PACKAGE_NAME@ | |
149 | PACKAGE_STRING = @PACKAGE_STRING@ | |
150 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | |
151 | PACKAGE_URL = @PACKAGE_URL@ | |
152 | PACKAGE_VERSION = @PACKAGE_VERSION@ | |
153 | PATH_SEPARATOR = @PATH_SEPARATOR@ | |
154 | SED = @SED@ | |
155 | SET_MAKE = @SET_MAKE@ | |
156 | SHELL = @SHELL@ | |
157 | STRIP = @STRIP@ | |
158 | VERSION = @VERSION@ | |
159 | abs_builddir = @abs_builddir@ | |
160 | abs_srcdir = @abs_srcdir@ | |
161 | abs_top_builddir = @abs_top_builddir@ | |
162 | abs_top_srcdir = @abs_top_srcdir@ | |
163 | ac_ct_CC = @ac_ct_CC@ | |
164 | am__include = @am__include@ | |
165 | am__leading_dot = @am__leading_dot@ | |
166 | am__quote = @am__quote@ | |
167 | am__tar = @am__tar@ | |
168 | am__untar = @am__untar@ | |
169 | applicationsdir = @applicationsdir@ | |
170 | bindir = @bindir@ | |
171 | build = @build@ | |
172 | build_alias = @build_alias@ | |
173 | build_cpu = @build_cpu@ | |
174 | build_os = @build_os@ | |
175 | build_vendor = @build_vendor@ | |
176 | builddir = @builddir@ | |
177 | datadir = @datadir@ | |
178 | datarootdir = @datarootdir@ | |
179 | docdir = @docdir@ | |
180 | dvidir = @dvidir@ | |
181 | exec_prefix = @exec_prefix@ | |
182 | host = @host@ | |
183 | host_alias = @host_alias@ | |
184 | host_cpu = @host_cpu@ | |
185 | host_os = @host_os@ | |
186 | host_vendor = @host_vendor@ | |
187 | htmldir = @htmldir@ | |
188 | iconsdir = @iconsdir@ | |
189 | includedir = @includedir@ | |
190 | infodir = @infodir@ | |
191 | install_sh = @install_sh@ | |
192 | libdir = @libdir@ | |
193 | libexecdir = @libexecdir@ | |
194 | localedir = @localedir@ | |
195 | localstatedir = @localstatedir@ | |
196 | mandir = @mandir@ | |
197 | menudir = @menudir@ | |
198 | mkdir_p = @mkdir_p@ | |
199 | oldincludedir = @oldincludedir@ | |
200 | pdfdir = @pdfdir@ | |
201 | pixmapsdir = @pixmapsdir@ | |
202 | prefix = @prefix@ | |
203 | program_transform_name = @program_transform_name@ | |
204 | psdir = @psdir@ | |
205 | sbindir = @sbindir@ | |
206 | sharedstatedir = @sharedstatedir@ | |
207 | srcdir = @srcdir@ | |
208 | sysconfdir = @sysconfdir@ | |
209 | target_alias = @target_alias@ | |
210 | top_build_prefix = @top_build_prefix@ | |
211 | top_builddir = @top_builddir@ | |
212 | top_srcdir = @top_srcdir@ | |
213 | EXTRA_DIST = ocross.xpm ocross_skew.xpm \ | |
214 | ocross_left.xpm ocross_right.xpm \ | |
215 | ocross_bottom.xpm ocross_top.xpm \ | |
216 | ocross16.png ocross32.png \ | |
217 | ocross_skew16.png ocross_skew32.png \ | |
218 | nettoe.desktop.in nettoe.menu.in | |
219 | ||
220 | DESKTOP = nettoe.desktop | |
221 | ICON = ocross_skew | |
222 | MENU = nettoe.menu | |
223 | BUILT_SOURCES = $(am__append_1) $(am__append_2) | |
224 | hicolordir = @iconsdir@/hicolor | |
225 | rewrite = 's|[@]bindir[@]|$(bindir)|; s|[@]pixmapsdir[@]|$(pixmapsdir)|' | |
226 | @ENABLE_DESKTOP_TRUE@applications_DATA = $(DESKTOP) | |
227 | @ENABLE_DESKTOP_TRUE@@ENABLE_MENU_TRUE@menu_DATA = $(MENU) | |
228 | CLEANFILES = $(DESKTOP) $(MENU) | |
229 | all: $(BUILT_SOURCES) | |
230 | $(MAKE) $(AM_MAKEFLAGS) all-am | |
231 | ||
232 | .SUFFIXES: | |
233 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | |
234 | @for dep in $?; do \ | |
235 | case '$(am__configure_deps)' in \ | |
236 | *$$dep*) \ | |
237 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | |
238 | && { if test -f $@; then exit 0; else break; fi; }; \ | |
239 | exit 1;; \ | |
240 | esac; \ | |
241 | done; \ | |
242 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu desktop/Makefile'; \ | |
243 | $(am__cd) $(top_srcdir) && \ | |
244 | $(AUTOMAKE) --gnu desktop/Makefile | |
245 | .PRECIOUS: Makefile | |
246 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |
247 | @case '$?' in \ | |
248 | *config.status*) \ | |
249 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | |
250 | *) \ | |
251 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | |
252 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | |
253 | esac; | |
254 | ||
255 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | |
256 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | |
257 | ||
258 | $(top_srcdir)/configure: $(am__configure_deps) | |
259 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | |
260 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | |
261 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | |
262 | $(am__aclocal_m4_deps): | |
263 | install-applicationsDATA: $(applications_DATA) | |
264 | @$(NORMAL_INSTALL) | |
265 | @list='$(applications_DATA)'; test -n "$(applicationsdir)" || list=; \ | |
266 | if test -n "$$list"; then \ | |
267 | echo " $(MKDIR_P) '$(DESTDIR)$(applicationsdir)'"; \ | |
268 | $(MKDIR_P) "$(DESTDIR)$(applicationsdir)" || exit 1; \ | |
269 | fi; \ | |
270 | for p in $$list; do \ | |
271 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | |
272 | echo "$$d$$p"; \ | |
273 | done | $(am__base_list) | \ | |
274 | while read files; do \ | |
275 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(applicationsdir)'"; \ | |
276 | $(INSTALL_DATA) $$files "$(DESTDIR)$(applicationsdir)" || exit $$?; \ | |
277 | done | |
278 | ||
279 | uninstall-applicationsDATA: | |
280 | @$(NORMAL_UNINSTALL) | |
281 | @list='$(applications_DATA)'; test -n "$(applicationsdir)" || list=; \ | |
282 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ | |
283 | dir='$(DESTDIR)$(applicationsdir)'; $(am__uninstall_files_from_dir) | |
284 | install-menuDATA: $(menu_DATA) | |
285 | @$(NORMAL_INSTALL) | |
286 | @list='$(menu_DATA)'; test -n "$(menudir)" || list=; \ | |
287 | if test -n "$$list"; then \ | |
288 | echo " $(MKDIR_P) '$(DESTDIR)$(menudir)'"; \ | |
289 | $(MKDIR_P) "$(DESTDIR)$(menudir)" || exit 1; \ | |
290 | fi; \ | |
291 | for p in $$list; do \ | |
292 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | |
293 | echo "$$d$$p"; \ | |
294 | done | $(am__base_list) | \ | |
295 | while read files; do \ | |
296 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(menudir)'"; \ | |
297 | $(INSTALL_DATA) $$files "$(DESTDIR)$(menudir)" || exit $$?; \ | |
298 | done | |
299 | ||
300 | uninstall-menuDATA: | |
301 | @$(NORMAL_UNINSTALL) | |
302 | @list='$(menu_DATA)'; test -n "$(menudir)" || list=; \ | |
303 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ | |
304 | dir='$(DESTDIR)$(menudir)'; $(am__uninstall_files_from_dir) | |
305 | tags: TAGS | |
306 | TAGS: | |
307 | ||
308 | ctags: CTAGS | |
309 | CTAGS: | |
310 | ||
311 | ||
312 | distdir: $(DISTFILES) | |
313 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
314 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
315 | list='$(DISTFILES)'; \ | |
316 | dist_files=`for file in $$list; do echo $$file; done | \ | |
317 | sed -e "s|^$$srcdirstrip/||;t" \ | |
318 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | |
319 | case $$dist_files in \ | |
320 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | |
321 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | |
322 | sort -u` ;; \ | |
323 | esac; \ | |
324 | for file in $$dist_files; do \ | |
325 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | |
326 | if test -d $$d/$$file; then \ | |
327 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | |
328 | if test -d "$(distdir)/$$file"; then \ | |
329 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
330 | fi; \ | |
331 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | |
332 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | |
333 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
334 | fi; \ | |
335 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | |
336 | else \ | |
337 | test -f "$(distdir)/$$file" \ | |
338 | || cp -p $$d/$$file "$(distdir)/$$file" \ | |
339 | || exit 1; \ | |
340 | fi; \ | |
341 | done | |
342 | check-am: all-am | |
343 | check: $(BUILT_SOURCES) | |
344 | $(MAKE) $(AM_MAKEFLAGS) check-am | |
345 | all-am: Makefile $(DATA) | |
346 | installdirs: | |
347 | for dir in "$(DESTDIR)$(applicationsdir)" "$(DESTDIR)$(menudir)"; do \ | |
348 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | |
349 | done | |
350 | install: $(BUILT_SOURCES) | |
351 | $(MAKE) $(AM_MAKEFLAGS) install-am | |
352 | install-exec: install-exec-am | |
353 | install-data: install-data-am | |
354 | uninstall: uninstall-am | |
355 | ||
356 | install-am: all-am | |
357 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | |
358 | ||
359 | installcheck: installcheck-am | |
360 | install-strip: | |
361 | if test -z '$(STRIP)'; then \ | |
362 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
363 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
364 | install; \ | |
365 | else \ | |
366 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
367 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
368 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ | |
369 | fi | |
370 | mostlyclean-generic: | |
371 | ||
372 | clean-generic: | |
373 | -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) | |
374 | ||
375 | distclean-generic: | |
376 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | |
377 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | |
378 | ||
379 | maintainer-clean-generic: | |
380 | @echo "This command is intended for maintainers to use" | |
381 | @echo "it deletes files that may require special tools to rebuild." | |
382 | -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) | |
383 | @ENABLE_DESKTOP_FALSE@install-data-hook: | |
384 | @ENABLE_DESKTOP_FALSE@uninstall-hook: | |
385 | clean: clean-am | |
386 | ||
387 | clean-am: clean-generic mostlyclean-am | |
388 | ||
389 | distclean: distclean-am | |
390 | -rm -f Makefile | |
391 | distclean-am: clean-am distclean-generic | |
392 | ||
393 | dvi: dvi-am | |
394 | ||
395 | dvi-am: | |
396 | ||
397 | html: html-am | |
398 | ||
399 | html-am: | |
400 | ||
401 | info: info-am | |
402 | ||
403 | info-am: | |
404 | ||
405 | install-data-am: install-applicationsDATA install-menuDATA | |
406 | @$(NORMAL_INSTALL) | |
407 | $(MAKE) $(AM_MAKEFLAGS) install-data-hook | |
408 | install-dvi: install-dvi-am | |
409 | ||
410 | install-dvi-am: | |
411 | ||
412 | install-exec-am: | |
413 | ||
414 | install-html: install-html-am | |
415 | ||
416 | install-html-am: | |
417 | ||
418 | install-info: install-info-am | |
419 | ||
420 | install-info-am: | |
421 | ||
422 | install-man: | |
423 | ||
424 | install-pdf: install-pdf-am | |
425 | ||
426 | install-pdf-am: | |
427 | ||
428 | install-ps: install-ps-am | |
429 | ||
430 | install-ps-am: | |
431 | ||
432 | installcheck-am: | |
433 | ||
434 | maintainer-clean: maintainer-clean-am | |
435 | -rm -f Makefile | |
436 | maintainer-clean-am: distclean-am maintainer-clean-generic | |
437 | ||
438 | mostlyclean: mostlyclean-am | |
439 | ||
440 | mostlyclean-am: mostlyclean-generic | |
441 | ||
442 | pdf: pdf-am | |
443 | ||
444 | pdf-am: | |
445 | ||
446 | ps: ps-am | |
447 | ||
448 | ps-am: | |
449 | ||
450 | uninstall-am: uninstall-applicationsDATA uninstall-menuDATA | |
451 | @$(NORMAL_INSTALL) | |
452 | $(MAKE) $(AM_MAKEFLAGS) uninstall-hook | |
453 | .MAKE: all check install install-am install-data-am install-strip \ | |
454 | uninstall-am | |
455 | ||
456 | .PHONY: all all-am check check-am clean clean-generic distclean \ | |
457 | distclean-generic distdir dvi dvi-am html html-am info info-am \ | |
458 | install install-am install-applicationsDATA install-data \ | |
459 | install-data-am install-data-hook install-dvi install-dvi-am \ | |
460 | install-exec install-exec-am install-html install-html-am \ | |
461 | install-info install-info-am install-man install-menuDATA \ | |
462 | install-pdf install-pdf-am install-ps install-ps-am \ | |
463 | install-strip installcheck installcheck-am installdirs \ | |
464 | maintainer-clean maintainer-clean-generic mostlyclean \ | |
465 | mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ | |
466 | uninstall-applicationsDATA uninstall-hook uninstall-menuDATA | |
467 | ||
468 | ||
469 | $(DESKTOP): Makefile $(DESKTOP).in | |
470 | $(SED) -e $(rewrite) $(srcdir)/$@.in > $@ | |
471 | ||
472 | $(MENU): Makefile $(MENU).in | |
473 | $(SED) -e $(rewrite) $(srcdir)/$@.in > $@ | |
474 | ||
475 | @ENABLE_DESKTOP_TRUE@install-data-hook: | |
476 | @ENABLE_DESKTOP_TRUE@ test -d "$(DESTDIR)$(pixmapsdir)" || \ | |
477 | @ENABLE_DESKTOP_TRUE@ $(mkdir_p) "$(DESTDIR)$(pixmapsdir)" | |
478 | @ENABLE_DESKTOP_TRUE@ $(INSTALL_DATA) $(srcdir)/$(ICON).xpm "$(DESTDIR)$(pixmapsdir)"/nettoe.xpm | |
479 | @ENABLE_DESKTOP_TRUE@ test -d "$(DESTDIR)$(hicolordir)"/16x16/apps || \ | |
480 | @ENABLE_DESKTOP_TRUE@ $(mkdir_p) "$(DESTDIR)$(hicolordir)"/16x16/apps | |
481 | @ENABLE_DESKTOP_TRUE@ test -d "$(DESTDIR)$(hicolordir)"/32x32/apps || \ | |
482 | @ENABLE_DESKTOP_TRUE@ $(mkdir_p) "$(DESTDIR)$(hicolordir)"/32x32/apps | |
483 | @ENABLE_DESKTOP_TRUE@ test -s $(srcdir)/"$(ICON)16.png" && \ | |
484 | @ENABLE_DESKTOP_TRUE@ $(INSTALL_DATA) $(srcdir)/"$(ICON)16.png" "$(DESTDIR)$(hicolordir)"/16x16/apps/nettoe.png | |
485 | @ENABLE_DESKTOP_TRUE@ test -s $(srcdir)/"$(ICON)32.png" && \ | |
486 | @ENABLE_DESKTOP_TRUE@ $(INSTALL_DATA) $(srcdir)/"$(ICON)32.png" "$(DESTDIR)$(hicolordir)"/32x32/apps/nettoe.png | |
487 | ||
488 | @ENABLE_DESKTOP_TRUE@uninstall-hook: | |
489 | @ENABLE_DESKTOP_TRUE@ rm "$(DESTDIR)$(pixmapsdir)"/nettoe.xpm \ | |
490 | @ENABLE_DESKTOP_TRUE@ "$(DESTDIR)$(hicolordir)"/16x16/apps/nettoe.png \ | |
491 | @ENABLE_DESKTOP_TRUE@ "$(DESTDIR)$(hicolordir)"/32x32/apps/nettoe.png | |
492 | ||
493 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | |
494 | # Otherwise a system limit (for SysV at least) may be exceeded. | |
495 | .NOEXPORT: |
0 | [Desktop Entry] | |
1 | Name=netToe | |
2 | Comment=Play a game of Tic Tac Toe. | |
3 | Icon=nettoe | |
4 | ||
5 | Type=Application | |
6 | Terminal=true | |
7 | TryExec=nettoe | |
8 | Exec=@bindir@/nettoe | |
9 | ||
10 | Categories=Game;LogicGame; | |
11 | Keywords=tic;tac;toe;text;terminal;logic;multiplayer; |
0 | ?package(local.nettoe):needs="text" section="Games/Board"\ | |
1 | title="netToe"\ | |
2 | longtitle="Play a game of Tic Tac Toe."\ | |
3 | command="@bindir@/nettoe"\ | |
4 | icon="@pixmapsdir@/nettoe.xpm" |
0 | /* XPM */ | |
1 | static char *kryss[] = { | |
2 | /* columns rows colors chars-per-pixel */ | |
3 | "32 32 5 1 ", | |
4 | ". c none", | |
5 | "B c red", | |
6 | "C c blue", | |
7 | "D c darkred", | |
8 | "E c darkblue", | |
9 | /* pixels */ | |
10 | "................................", | |
11 | "..............EEEE.........D....", | |
12 | ".....D.....EEECCCCEEE.....DBD...", | |
13 | "....DBD..EECCCCCCCCCCEE..DBBBD..", | |
14 | "...DBBBDECCCCCCCCCCCCCCEDBBBBBD.", | |
15 | "..DBBBBECCCCCCCCCCCCCCCDBBBBBD..", | |
16 | "...DBBECCCCCCCEEEECCCCDBBBBBD...", | |
17 | "....DECCCCCCEE....EECDBBBBBD....", | |
18 | "....ECCCCCCE........DBBBBBDE....", | |
19 | "...ECCCCCCEBD......DBBBBBDCCE...", | |
20 | "...ECCCCCEBBBD....DBBBBBDCCCE...", | |
21 | "..ECCCCCEBBBBBD..DBBBBBDCCCCCE..", | |
22 | "..ECCCCE.DBBBBBDDBBBBBD.ECCCCE..", | |
23 | "..ECCCCE..DBBBBBBBBBBD..ECCCCE..", | |
24 | ".ECCCCE....DBBBBBBBBD....ECCCCE.", | |
25 | ".ECCCCE.....DBBBBBBD.....ECCCCE.", | |
26 | ".ECCCCE.....DBBBBBBD.....ECCCCE.", | |
27 | ".ECCCCE....DBBBBBBBBD....ECCCCE.", | |
28 | "..ECCCCE..DBBBBBBBBBBD..ECCCCE..", | |
29 | "..ECCCCE.DBBBBBDDBBBBBD.ECCCCE..", | |
30 | "..ECCCCCDBBBBBD..DBBBBBECCCCCE..", | |
31 | "...ECCCDBBBBBD....DBBBECCCCCE...", | |
32 | "...ECCDBBBBBD......DBECCCCCCE...", | |
33 | "....EDBBBBBD........ECCCCCCE....", | |
34 | "....DBBBBBDCEE....EECCCCCCED....", | |
35 | "...DBBBBBDCCCCEEEECCCCCCCEBBD...", | |
36 | "..DBBBBBDCCCCCCCCCCCCCCCEBBBBD..", | |
37 | ".DBBBBBDECCCCCCCCCCCCCCEDBBBD...", | |
38 | "..DBBBD..EECCCCCCCCCCEE..DBD....", | |
39 | "...DBD.....EEECCCCEEE.....D.....", | |
40 | "....D.........EEEE..............", | |
41 | "................................", | |
42 | }; |
Binary diff not shown
Binary diff not shown
0 | /* XPM */ | |
1 | static char *kryss[] = { | |
2 | /* columns rows colors chars-per-pixel */ | |
3 | "32 32 5 1 ", | |
4 | ". c none", | |
5 | "B c red", | |
6 | "C c blue", | |
7 | "D c darkred", | |
8 | "E c darkblue", | |
9 | /* pixels */ | |
10 | "................................", | |
11 | "..............EEEE..............", | |
12 | ".....D.....EEECCCCEEE.....D.....", | |
13 | "....DBD..EECCCCCCCCCCEE..DBD....", | |
14 | "...DBBBDECCCCCCCCCCCCCCEDBBBD...", | |
15 | "..DBBBBECCCCCCCCCCCCCCCCEBBBBD..", | |
16 | "...DBBECCCCCCCEEEECCCCCCCEBBD...", | |
17 | "....DECCCCCCEE....EECCCCCCED....", | |
18 | "....ECCCCCCE........ECCCCCCE....", | |
19 | "...ECCCCCCEBD......DBECCCCCCE...", | |
20 | "...ECCCCCEBBBD....DBBBECCCCCE...", | |
21 | "..ECCCCCEBBBBBD..DBBBBBECCCCCE..", | |
22 | "..ECCCCE.DBBBBBDDBBBBBD.ECCCCE..", | |
23 | "..ECCCCE..DBBBBBBBBBBD..ECCCCE..", | |
24 | ".ECCCCE....DBBBBBBBBD....ECCCCE.", | |
25 | ".ECCCCE.....DBBBBBBD.....ECCCCE.", | |
26 | ".ECCCCE.....DBBBBBBD.....ECCCCE.", | |
27 | ".ECCCCE....DBBBBBBBBD....ECCCCE.", | |
28 | "..ECCCCE..DBBBBBBBBBBD..ECCCCE..", | |
29 | "..ECCCCE.DBBBBBDDBBBBBD.ECCCCE..", | |
30 | "..ECCCCCDBBBBBD..DBBBBBDCCCCCE..", | |
31 | "...ECCCDBBBBBD....DBBBBBDCCCE...", | |
32 | "...ECCDBBBBBD......DBBBBBDCCE...", | |
33 | "....EDBBBBBD........DBBBBBDE....", | |
34 | "....DBBBBBDCEE....EECDBBBBBD....", | |
35 | "...DBBBBBDCCCCEEEECCCCDBBBBBD...", | |
36 | "..DBBBBBDCCCCCCCCCCCCCCDBBBBBD..", | |
37 | ".DBBBBBDECCCCCCCCCCCCCCEDBBBBBD.", | |
38 | "..DBBBD..EECCCCCCCCCCEE..DBBBD..", | |
39 | "...DBD.....EEECCCCEEE.....DBD...", | |
40 | "....D.........EEEE.........D....", | |
41 | "................................", | |
42 | }; |
0 | /* XPM */ | |
1 | static char *kryss[] = { | |
2 | /* columns rows colors chars-per-pixel */ | |
3 | "32 32 5 1 ", | |
4 | ". c none", | |
5 | "B c red", | |
6 | "C c blue", | |
7 | "D c darkred", | |
8 | "E c darkblue", | |
9 | /* pixels */ | |
10 | "................................", | |
11 | "....D.........EEEE.........D....", | |
12 | "...DBD.....EEECCCCEEE.....DBD...", | |
13 | "..DBBBD..EECCCCCCCCCCEE..DBBBD..", | |
14 | ".DBBBBBDECCCCCCCCCCCCCCEDBBBBBD.", | |
15 | "..DBBBBBDCCCCCCCCCCCCCCCEBBBBD..", | |
16 | "...DBBBBBDCCCCEEEECCCCCCCEBBD...", | |
17 | "....DBBBBBDCEE....EECCCCCCED....", | |
18 | "....EDBBBBBD........ECCCCCCE....", | |
19 | "...ECCDBBBBBD......DBECCCCCCE...", | |
20 | "...ECCCDBBBBBD....DBBBECCCCCE...", | |
21 | "..ECCCCCDBBBBBD..DBBBBBECCCCCE..", | |
22 | "..ECCCCE.DBBBBBDDBBBBBD.ECCCCE..", | |
23 | "..ECCCCE..DBBBBBBBBBBD..ECCCCE..", | |
24 | ".ECCCCE....DBBBBBBBBD....ECCCCE.", | |
25 | ".ECCCCE.....DBBBBBBD.....ECCCCE.", | |
26 | ".ECCCCE.....DBBBBBBD.....ECCCCE.", | |
27 | ".ECCCCE....DBBBBBBBBD....ECCCCE.", | |
28 | "..ECCCCE..DBBBBBBBBBBD..ECCCCE..", | |
29 | "..ECCCCE.DBBBBBDDBBBBBD.ECCCCE..", | |
30 | "..ECCCCCDBBBBBD..DBBBBBECCCCCE..", | |
31 | "...ECCCDBBBBBD....DBBBECCCCCE...", | |
32 | "...ECCDBBBBBD......DBECCCCCCE...", | |
33 | "....EDBBBBBD........ECCCCCCE....", | |
34 | "....DBBBBBDCEE....EECCCCCCED....", | |
35 | "...DBBBBBDCCCCEEEECCCCCCCEBBD...", | |
36 | "..DBBBBBDCCCCCCCCCCCCCCCEBBBBD..", | |
37 | ".DBBBBBDECCCCCCCCCCCCCCEDBBBD...", | |
38 | "..DBBBD..EECCCCCCCCCCEE..DBD....", | |
39 | "...DBD.....EEECCCCEEE.....D.....", | |
40 | "....D.........EEEE..............", | |
41 | "................................", | |
42 | }; |
0 | /* XPM */ | |
1 | static char *kryss[] = { | |
2 | /* columns rows colors chars-per-pixel */ | |
3 | "32 32 5 1 ", | |
4 | ". c none", | |
5 | "B c red", | |
6 | "C c blue", | |
7 | "D c darkred", | |
8 | "E c darkblue", | |
9 | /* pixels */ | |
10 | "................................", | |
11 | "..............EEEE.........D....", | |
12 | ".....D.....EEECCCCEEE.....DBD...", | |
13 | "....DBD..EECCCCCCCCCCEE..DBBBD..", | |
14 | "...DBBBDECCCCCCCCCCCCCCEDBBBBBD.", | |
15 | "..DBBBBECCCCCCCCCCCCCCCDBBBBBD..", | |
16 | "...DBBECCCCCCCEEEECCCCDBBBBBD...", | |
17 | "....DECCCCCCEE....EECDBBBBBD....", | |
18 | "....ECCCCCCE........DBBBBBDE....", | |
19 | "...ECCCCCCEBD......DBBBBBDCCE...", | |
20 | "...ECCCCCEBBBD....DBBBBBDCCCE...", | |
21 | "..ECCCCCEBBBBBD..DBBBBBDCCCCCE..", | |
22 | "..ECCCCE.DBBBBBDDBBBBBD.ECCCCE..", | |
23 | "..ECCCCE..DBBBBBBBBBBD..ECCCCE..", | |
24 | ".ECCCCE....DBBBBBBBBD....ECCCCE.", | |
25 | ".ECCCCE.....DBBBBBBD.....ECCCCE.", | |
26 | ".ECCCCE.....DBBBBBBD.....ECCCCE.", | |
27 | ".ECCCCE....DBBBBBBBBD....ECCCCE.", | |
28 | "..ECCCCE..DBBBBBBBBBBD..ECCCCE..", | |
29 | "..ECCCCE.DBBBBBDDBBBBBD.ECCCCE..", | |
30 | "..ECCCCCEBBBBBD..DBBBBBDCCCCCE..", | |
31 | "...ECCCCCEBBBD....DBBBBBDCCCE...", | |
32 | "...ECCCCCCEBD......DBBBBBDCCE...", | |
33 | "....ECCCCCCE........DBBBBBDE....", | |
34 | "....DECCCCCCEE....EECDBBBBBD....", | |
35 | "...DBBECCCCCCCEEEECCCCDBBBBBD...", | |
36 | "..DBBBBECCCCCCCCCCCCCCCDBBBBBD..", | |
37 | "...DBBBDECCCCCCCCCCCCCCEDBBBBBD.", | |
38 | "....DBD..EECCCCCCCCCCEE..DBBBD..", | |
39 | ".....D.....EEECCCCEEE.....DBD...", | |
40 | "..............EEEE.........D....", | |
41 | "................................", | |
42 | }; |
0 | /* XPM */ | |
1 | static char *kryss[] = { | |
2 | /* columns rows colors chars-per-pixel */ | |
3 | "32 32 5 1 ", | |
4 | ". c none", | |
5 | "B c red", | |
6 | "C c blue", | |
7 | "D c darkred", | |
8 | "E c darkblue", | |
9 | /* pixels */ | |
10 | ".............EEEE...............", | |
11 | "..........EEECCCCEEE............", | |
12 | ".....D..EECCCCCCCCCCEE......D...", | |
13 | "....DBDECCCCCCCCCCCCCCE....DBD..", | |
14 | "...DBBECCCCCCCCCCCCCCCCE..DBBBD.", | |
15 | "..DBBECCCCCCCEEEECCCCCCCEDBBBBBD", | |
16 | "...DECCCCCCEE....EECCCCCDBBBBBD.", | |
17 | "...ECCCCCCE........ECCCDBBBBBD..", | |
18 | "..ECCCCCCEBD........ECDBBBBBD...", | |
19 | "..ECCCCCEBBBD........DBBBBBD....", | |
20 | ".ECCCCCEBBBBBD......DBBBBBDCE...", | |
21 | ".ECCCCE.DBBBBBD....DBBBBBDCCE...", | |
22 | ".ECCCCE..DBBBBBD..DBBBBBDCCCE...", | |
23 | "ECCCCE....DBBBBBDDBBBBBDECCCCE..", | |
24 | "ECCCCE.....DBBBBBBBBBBD.ECCCCE..", | |
25 | "ECCCCE......DBBBBBBBBD..ECCCCE..", | |
26 | "ECCCCE.......DBBBBBBD...ECCCCE..", | |
27 | ".ECCCCE......DBBBBBBD..ECCCCE...", | |
28 | ".ECCCCE.....DBBBBBBBBD.ECCCCE...", | |
29 | ".ECCCCCE...DBBBBBBBBBBDCCCCCE...", | |
30 | "..ECCCCCE.DBBBBBDDBBBBBDCCCE....", | |
31 | "..ECCCCCCEBBBBBD..DBBBBBDCCE....", | |
32 | "...ECCCCCCEBBBD....DBBBBBDE.....", | |
33 | "....ECCCCCCEED...EECDBBBBBD.....", | |
34 | ".....ECCCCCCCEEEECCCCDBBBBBD....", | |
35 | ".....DECCCCCCCCCCCCCCCDBBBBBD...", | |
36 | "....DBBECCCCCCCCCCCCCCEDBBBBBD..", | |
37 | "...DBBBBEECCCCCCCCCCEE..DBBBBBD.", | |
38 | "..DBBBBBD.EEECCCCEEE.....DBBBBBD", | |
39 | "...DBBBD.....EEEE.........DBBBD.", | |
40 | "....DBD....................DBD..", | |
41 | ".....D......................D...", | |
42 | }; |
Binary diff not shown
Binary diff not shown
0 | /* XPM */ | |
1 | static char *kryss[] = { | |
2 | /* columns rows colors chars-per-pixel */ | |
3 | "32 32 5 1 ", | |
4 | ". c none", | |
5 | "B c red", | |
6 | "C c blue", | |
7 | "D c darkred", | |
8 | "E c darkblue", | |
9 | /* pixels */ | |
10 | "................................", | |
11 | "....D.........EEEE.........D....", | |
12 | "...DBD.....EEECCCCEEE.....DBD...", | |
13 | "..DBBBD..EECCCCCCCCCCEE..DBBBD..", | |
14 | ".DBBBBBDECCCCCCCCCCCCCCEDBBBBBD.", | |
15 | "..DBBBBBDCCCCCCCCCCCCCCDBBBBBD..", | |
16 | "...DBBBBBDCCCCEEEECCCCDBBBBBD...", | |
17 | "....DBBBBBDCEE....EECDBBBBBD....", | |
18 | "....EDBBBBBD........DBBBBBDE....", | |
19 | "...ECCDBBBBBD......DBBBBBDCCE...", | |
20 | "...ECCCDBBBBBD....DBBBBBDCCCE...", | |
21 | "..ECCCCCDBBBBBD..DBBBBBDCCCCCE..", | |
22 | "..ECCCCE.DBBBBBDDBBBBBD.ECCCCE..", | |
23 | "..ECCCCE..DBBBBBBBBBBD..ECCCCE..", | |
24 | ".ECCCCE....DBBBBBBBBD....ECCCCE.", | |
25 | ".ECCCCE.....DBBBBBBD.....ECCCCE.", | |
26 | ".ECCCCE.....DBBBBBBD.....ECCCCE.", | |
27 | ".ECCCCE....DBBBBBBBBD....ECCCCE.", | |
28 | "..ECCCCE..DBBBBBBBBBBD..ECCCCE..", | |
29 | "..ECCCCE.DBBBBBDDBBBBBD.ECCCCE..", | |
30 | "..ECCCCCEBBBBBD..DBBBBBECCCCCE..", | |
31 | "...ECCCDCEBBBD....DBBBECCCCCE...", | |
32 | "...ECCCCCCEBD......DBECCCCCCE...", | |
33 | "....ECCCCCCE........ECCCCCCE....", | |
34 | "....DECCCCCCEE....EECCCCCCED....", | |
35 | "...DBBECCCCCCCEEEECCCCCCCEBBD...", | |
36 | "..DBBBBECCCCCCCCCCCCCCCCEBBBBD..", | |
37 | "...DBBBDECCCCCCCCCCCCCCEDBBBD...", | |
38 | "....DBD..EECCCCCCCCCCEE..DBD....", | |
39 | ".....D.....EEECCCCEEE.....D.....", | |
40 | "..............EEEE..............", | |
41 | "................................", | |
42 | }; |
0 | # Makefile.am file for nettoe | |
1 | # Edited by Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
2 | ||
3 | # This file is processed by automake | |
4 | ||
5 | # No subdirs | |
6 | # SUBDIRS = | |
7 | ||
8 | ||
9 | man_MANS = \ | |
10 | nettoe.6 | |
11 | ||
12 | ||
13 | EXTRA_DIST = $(man_MANS) | |
14 | ||
15 |
0 | # Makefile.in generated by automake 1.11.6 from Makefile.am. | |
1 | # @configure_input@ | |
2 | ||
3 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | |
4 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software | |
5 | # Foundation, Inc. | |
6 | # This Makefile.in is free software; the Free Software Foundation | |
7 | # gives unlimited permission to copy and/or distribute it, | |
8 | # with or without modifications, as long as this notice is preserved. | |
9 | ||
10 | # This program is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
13 | # PARTICULAR PURPOSE. | |
14 | ||
15 | @SET_MAKE@ | |
16 | ||
17 | # Makefile.am file for nettoe | |
18 | # Edited by Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
19 | ||
20 | # This file is processed by automake | |
21 | ||
22 | # No subdirs | |
23 | # SUBDIRS = | |
24 | VPATH = @srcdir@ | |
25 | am__make_dryrun = \ | |
26 | { \ | |
27 | am__dry=no; \ | |
28 | case $$MAKEFLAGS in \ | |
29 | *\\[\ \ ]*) \ | |
30 | echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | |
31 | | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ | |
32 | *) \ | |
33 | for am__flg in $$MAKEFLAGS; do \ | |
34 | case $$am__flg in \ | |
35 | *=*|--*) ;; \ | |
36 | *n*) am__dry=yes; break;; \ | |
37 | esac; \ | |
38 | done;; \ | |
39 | esac; \ | |
40 | test $$am__dry = yes; \ | |
41 | } | |
42 | pkgdatadir = $(datadir)/@PACKAGE@ | |
43 | pkgincludedir = $(includedir)/@PACKAGE@ | |
44 | pkglibdir = $(libdir)/@PACKAGE@ | |
45 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | |
46 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | |
47 | install_sh_DATA = $(install_sh) -c -m 644 | |
48 | install_sh_PROGRAM = $(install_sh) -c | |
49 | install_sh_SCRIPT = $(install_sh) -c | |
50 | INSTALL_HEADER = $(INSTALL_DATA) | |
51 | transform = $(program_transform_name) | |
52 | NORMAL_INSTALL = : | |
53 | PRE_INSTALL = : | |
54 | POST_INSTALL = : | |
55 | NORMAL_UNINSTALL = : | |
56 | PRE_UNINSTALL = : | |
57 | POST_UNINSTALL = : | |
58 | build_triplet = @build@ | |
59 | host_triplet = @host@ | |
60 | subdir = docs | |
61 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | |
62 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
63 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac | |
64 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | |
65 | $(ACLOCAL_M4) | |
66 | mkinstalldirs = $(install_sh) -d | |
67 | CONFIG_HEADER = $(top_builddir)/config.h | |
68 | CONFIG_CLEAN_FILES = | |
69 | CONFIG_CLEAN_VPATH_FILES = | |
70 | SOURCES = | |
71 | DIST_SOURCES = | |
72 | am__can_run_installinfo = \ | |
73 | case $$AM_UPDATE_INFO_DIR in \ | |
74 | n|no|NO) false;; \ | |
75 | *) (install-info --version) >/dev/null 2>&1;; \ | |
76 | esac | |
77 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | |
78 | am__vpath_adj = case $$p in \ | |
79 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | |
80 | *) f=$$p;; \ | |
81 | esac; | |
82 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; | |
83 | am__install_max = 40 | |
84 | am__nobase_strip_setup = \ | |
85 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` | |
86 | am__nobase_strip = \ | |
87 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" | |
88 | am__nobase_list = $(am__nobase_strip_setup); \ | |
89 | for p in $$list; do echo "$$p $$p"; done | \ | |
90 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ | |
91 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ | |
92 | if (++n[$$2] == $(am__install_max)) \ | |
93 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ | |
94 | END { for (dir in files) print dir, files[dir] }' | |
95 | am__base_list = \ | |
96 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ | |
97 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | |
98 | am__uninstall_files_from_dir = { \ | |
99 | test -z "$$files" \ | |
100 | || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ | |
101 | || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ | |
102 | $(am__cd) "$$dir" && rm -f $$files; }; \ | |
103 | } | |
104 | man6dir = $(mandir)/man6 | |
105 | am__installdirs = "$(DESTDIR)$(man6dir)" | |
106 | NROFF = nroff | |
107 | MANS = $(man_MANS) | |
108 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | |
109 | ACLOCAL = @ACLOCAL@ | |
110 | AMTAR = @AMTAR@ | |
111 | AUTOCONF = @AUTOCONF@ | |
112 | AUTOHEADER = @AUTOHEADER@ | |
113 | AUTOMAKE = @AUTOMAKE@ | |
114 | AWK = @AWK@ | |
115 | CC = @CC@ | |
116 | CCDEPMODE = @CCDEPMODE@ | |
117 | CFLAGS = @CFLAGS@ | |
118 | CPP = @CPP@ | |
119 | CPPFLAGS = @CPPFLAGS@ | |
120 | CYGPATH_W = @CYGPATH_W@ | |
121 | DEFS = @DEFS@ | |
122 | DEPDIR = @DEPDIR@ | |
123 | ECHO_C = @ECHO_C@ | |
124 | ECHO_N = @ECHO_N@ | |
125 | ECHO_T = @ECHO_T@ | |
126 | EGREP = @EGREP@ | |
127 | EXEEXT = @EXEEXT@ | |
128 | GREP = @GREP@ | |
129 | INSTALL = @INSTALL@ | |
130 | INSTALL_DATA = @INSTALL_DATA@ | |
131 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
132 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | |
133 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | |
134 | LDFLAGS = @LDFLAGS@ | |
135 | LIBCURSES = @LIBCURSES@ | |
136 | LIBNCURSES = @LIBNCURSES@ | |
137 | LIBOBJS = @LIBOBJS@ | |
138 | LIBS = @LIBS@ | |
139 | LIBTERMCAP = @LIBTERMCAP@ | |
140 | LIBTINFO = @LIBTINFO@ | |
141 | LTLIBOBJS = @LTLIBOBJS@ | |
142 | MAKEINFO = @MAKEINFO@ | |
143 | MKDIR_P = @MKDIR_P@ | |
144 | NETTOE_LDADD = @NETTOE_LDADD@ | |
145 | NETTOE_PORT = @NETTOE_PORT@ | |
146 | OBJEXT = @OBJEXT@ | |
147 | PACKAGE = @PACKAGE@ | |
148 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | |
149 | PACKAGE_NAME = @PACKAGE_NAME@ | |
150 | PACKAGE_STRING = @PACKAGE_STRING@ | |
151 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | |
152 | PACKAGE_URL = @PACKAGE_URL@ | |
153 | PACKAGE_VERSION = @PACKAGE_VERSION@ | |
154 | PATH_SEPARATOR = @PATH_SEPARATOR@ | |
155 | SED = @SED@ | |
156 | SET_MAKE = @SET_MAKE@ | |
157 | SHELL = @SHELL@ | |
158 | STRIP = @STRIP@ | |
159 | VERSION = @VERSION@ | |
160 | abs_builddir = @abs_builddir@ | |
161 | abs_srcdir = @abs_srcdir@ | |
162 | abs_top_builddir = @abs_top_builddir@ | |
163 | abs_top_srcdir = @abs_top_srcdir@ | |
164 | ac_ct_CC = @ac_ct_CC@ | |
165 | am__include = @am__include@ | |
166 | am__leading_dot = @am__leading_dot@ | |
167 | am__quote = @am__quote@ | |
168 | am__tar = @am__tar@ | |
169 | am__untar = @am__untar@ | |
170 | applicationsdir = @applicationsdir@ | |
171 | bindir = @bindir@ | |
172 | build = @build@ | |
173 | build_alias = @build_alias@ | |
174 | build_cpu = @build_cpu@ | |
175 | build_os = @build_os@ | |
176 | build_vendor = @build_vendor@ | |
177 | builddir = @builddir@ | |
178 | datadir = @datadir@ | |
179 | datarootdir = @datarootdir@ | |
180 | docdir = @docdir@ | |
181 | dvidir = @dvidir@ | |
182 | exec_prefix = @exec_prefix@ | |
183 | host = @host@ | |
184 | host_alias = @host_alias@ | |
185 | host_cpu = @host_cpu@ | |
186 | host_os = @host_os@ | |
187 | host_vendor = @host_vendor@ | |
188 | htmldir = @htmldir@ | |
189 | iconsdir = @iconsdir@ | |
190 | includedir = @includedir@ | |
191 | infodir = @infodir@ | |
192 | install_sh = @install_sh@ | |
193 | libdir = @libdir@ | |
194 | libexecdir = @libexecdir@ | |
195 | localedir = @localedir@ | |
196 | localstatedir = @localstatedir@ | |
197 | mandir = @mandir@ | |
198 | menudir = @menudir@ | |
199 | mkdir_p = @mkdir_p@ | |
200 | oldincludedir = @oldincludedir@ | |
201 | pdfdir = @pdfdir@ | |
202 | pixmapsdir = @pixmapsdir@ | |
203 | prefix = @prefix@ | |
204 | program_transform_name = @program_transform_name@ | |
205 | psdir = @psdir@ | |
206 | sbindir = @sbindir@ | |
207 | sharedstatedir = @sharedstatedir@ | |
208 | srcdir = @srcdir@ | |
209 | sysconfdir = @sysconfdir@ | |
210 | target_alias = @target_alias@ | |
211 | top_build_prefix = @top_build_prefix@ | |
212 | top_builddir = @top_builddir@ | |
213 | top_srcdir = @top_srcdir@ | |
214 | man_MANS = \ | |
215 | nettoe.6 | |
216 | ||
217 | EXTRA_DIST = $(man_MANS) | |
218 | all: all-am | |
219 | ||
220 | .SUFFIXES: | |
221 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | |
222 | @for dep in $?; do \ | |
223 | case '$(am__configure_deps)' in \ | |
224 | *$$dep*) \ | |
225 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | |
226 | && { if test -f $@; then exit 0; else break; fi; }; \ | |
227 | exit 1;; \ | |
228 | esac; \ | |
229 | done; \ | |
230 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ | |
231 | $(am__cd) $(top_srcdir) && \ | |
232 | $(AUTOMAKE) --gnu docs/Makefile | |
233 | .PRECIOUS: Makefile | |
234 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |
235 | @case '$?' in \ | |
236 | *config.status*) \ | |
237 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | |
238 | *) \ | |
239 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | |
240 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | |
241 | esac; | |
242 | ||
243 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | |
244 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | |
245 | ||
246 | $(top_srcdir)/configure: $(am__configure_deps) | |
247 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | |
248 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | |
249 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | |
250 | $(am__aclocal_m4_deps): | |
251 | install-man6: $(man_MANS) | |
252 | @$(NORMAL_INSTALL) | |
253 | @list1=''; \ | |
254 | list2='$(man_MANS)'; \ | |
255 | test -n "$(man6dir)" \ | |
256 | && test -n "`echo $$list1$$list2`" \ | |
257 | || exit 0; \ | |
258 | echo " $(MKDIR_P) '$(DESTDIR)$(man6dir)'"; \ | |
259 | $(MKDIR_P) "$(DESTDIR)$(man6dir)" || exit 1; \ | |
260 | { for i in $$list1; do echo "$$i"; done; \ | |
261 | if test -n "$$list2"; then \ | |
262 | for i in $$list2; do echo "$$i"; done \ | |
263 | | sed -n '/\.6[a-z]*$$/p'; \ | |
264 | fi; \ | |
265 | } | while read p; do \ | |
266 | if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ | |
267 | echo "$$d$$p"; echo "$$p"; \ | |
268 | done | \ | |
269 | sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^6][0-9a-z]*$$,6,;x' \ | |
270 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ | |
271 | sed 'N;N;s,\n, ,g' | { \ | |
272 | list=; while read file base inst; do \ | |
273 | if test "$$base" = "$$inst"; then list="$$list $$file"; else \ | |
274 | echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man6dir)/$$inst'"; \ | |
275 | $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man6dir)/$$inst" || exit $$?; \ | |
276 | fi; \ | |
277 | done; \ | |
278 | for i in $$list; do echo "$$i"; done | $(am__base_list) | \ | |
279 | while read files; do \ | |
280 | test -z "$$files" || { \ | |
281 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man6dir)'"; \ | |
282 | $(INSTALL_DATA) $$files "$(DESTDIR)$(man6dir)" || exit $$?; }; \ | |
283 | done; } | |
284 | ||
285 | uninstall-man6: | |
286 | @$(NORMAL_UNINSTALL) | |
287 | @list=''; test -n "$(man6dir)" || exit 0; \ | |
288 | files=`{ for i in $$list; do echo "$$i"; done; \ | |
289 | l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ | |
290 | sed -n '/\.6[a-z]*$$/p'; \ | |
291 | } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^6][0-9a-z]*$$,6,;x' \ | |
292 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ | |
293 | dir='$(DESTDIR)$(man6dir)'; $(am__uninstall_files_from_dir) | |
294 | tags: TAGS | |
295 | TAGS: | |
296 | ||
297 | ctags: CTAGS | |
298 | CTAGS: | |
299 | ||
300 | ||
301 | distdir: $(DISTFILES) | |
302 | @list='$(MANS)'; if test -n "$$list"; then \ | |
303 | list=`for p in $$list; do \ | |
304 | if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ | |
305 | if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ | |
306 | if test -n "$$list" && \ | |
307 | grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ | |
308 | echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ | |
309 | grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ | |
310 | echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ | |
311 | echo " typically \`make maintainer-clean' will remove them" >&2; \ | |
312 | exit 1; \ | |
313 | else :; fi; \ | |
314 | else :; fi | |
315 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
316 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
317 | list='$(DISTFILES)'; \ | |
318 | dist_files=`for file in $$list; do echo $$file; done | \ | |
319 | sed -e "s|^$$srcdirstrip/||;t" \ | |
320 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | |
321 | case $$dist_files in \ | |
322 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | |
323 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | |
324 | sort -u` ;; \ | |
325 | esac; \ | |
326 | for file in $$dist_files; do \ | |
327 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | |
328 | if test -d $$d/$$file; then \ | |
329 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | |
330 | if test -d "$(distdir)/$$file"; then \ | |
331 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
332 | fi; \ | |
333 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | |
334 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | |
335 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
336 | fi; \ | |
337 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | |
338 | else \ | |
339 | test -f "$(distdir)/$$file" \ | |
340 | || cp -p $$d/$$file "$(distdir)/$$file" \ | |
341 | || exit 1; \ | |
342 | fi; \ | |
343 | done | |
344 | check-am: all-am | |
345 | check: check-am | |
346 | all-am: Makefile $(MANS) | |
347 | installdirs: | |
348 | for dir in "$(DESTDIR)$(man6dir)"; do \ | |
349 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | |
350 | done | |
351 | install: install-am | |
352 | install-exec: install-exec-am | |
353 | install-data: install-data-am | |
354 | uninstall: uninstall-am | |
355 | ||
356 | install-am: all-am | |
357 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | |
358 | ||
359 | installcheck: installcheck-am | |
360 | install-strip: | |
361 | if test -z '$(STRIP)'; then \ | |
362 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
363 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
364 | install; \ | |
365 | else \ | |
366 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
367 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
368 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ | |
369 | fi | |
370 | mostlyclean-generic: | |
371 | ||
372 | clean-generic: | |
373 | ||
374 | distclean-generic: | |
375 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | |
376 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | |
377 | ||
378 | maintainer-clean-generic: | |
379 | @echo "This command is intended for maintainers to use" | |
380 | @echo "it deletes files that may require special tools to rebuild." | |
381 | clean: clean-am | |
382 | ||
383 | clean-am: clean-generic mostlyclean-am | |
384 | ||
385 | distclean: distclean-am | |
386 | -rm -f Makefile | |
387 | distclean-am: clean-am distclean-generic | |
388 | ||
389 | dvi: dvi-am | |
390 | ||
391 | dvi-am: | |
392 | ||
393 | html: html-am | |
394 | ||
395 | html-am: | |
396 | ||
397 | info: info-am | |
398 | ||
399 | info-am: | |
400 | ||
401 | install-data-am: install-man | |
402 | ||
403 | install-dvi: install-dvi-am | |
404 | ||
405 | install-dvi-am: | |
406 | ||
407 | install-exec-am: | |
408 | ||
409 | install-html: install-html-am | |
410 | ||
411 | install-html-am: | |
412 | ||
413 | install-info: install-info-am | |
414 | ||
415 | install-info-am: | |
416 | ||
417 | install-man: install-man6 | |
418 | ||
419 | install-pdf: install-pdf-am | |
420 | ||
421 | install-pdf-am: | |
422 | ||
423 | install-ps: install-ps-am | |
424 | ||
425 | install-ps-am: | |
426 | ||
427 | installcheck-am: | |
428 | ||
429 | maintainer-clean: maintainer-clean-am | |
430 | -rm -f Makefile | |
431 | maintainer-clean-am: distclean-am maintainer-clean-generic | |
432 | ||
433 | mostlyclean: mostlyclean-am | |
434 | ||
435 | mostlyclean-am: mostlyclean-generic | |
436 | ||
437 | pdf: pdf-am | |
438 | ||
439 | pdf-am: | |
440 | ||
441 | ps: ps-am | |
442 | ||
443 | ps-am: | |
444 | ||
445 | uninstall-am: uninstall-man | |
446 | ||
447 | uninstall-man: uninstall-man6 | |
448 | ||
449 | .MAKE: install-am install-strip | |
450 | ||
451 | .PHONY: all all-am check check-am clean clean-generic distclean \ | |
452 | distclean-generic distdir dvi dvi-am html html-am info info-am \ | |
453 | install install-am install-data install-data-am install-dvi \ | |
454 | install-dvi-am install-exec install-exec-am install-html \ | |
455 | install-html-am install-info install-info-am install-man \ | |
456 | install-man6 install-pdf install-pdf-am install-ps \ | |
457 | install-ps-am install-strip installcheck installcheck-am \ | |
458 | installdirs maintainer-clean maintainer-clean-generic \ | |
459 | mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ | |
460 | uninstall-am uninstall-man uninstall-man6 | |
461 | ||
462 | ||
463 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | |
464 | # Otherwise a system limit (for SysV at least) may be exceeded. | |
465 | .NOEXPORT: |
0 | .\" nettoe man page | |
1 | .\" Process this file with: groff -man -Tascii | |
2 | .\" man page originally written by Andras Bali <bali@debian.org> | |
3 | .\" for the Debian GNU/Linux system. | |
4 | .\" Rewritten by Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
5 | .\" to be included in the nettoe 1.1.0 (July 22, 2001) | |
6 | .\" Expanded by Mats Erik Andersson in later versions. | |
7 | . | |
8 | .TH NETTOE 6 "March 21, 2014" "netToe 1.5.1" | |
9 | .SH NAME | |
10 | nettoe \- Networked version of Tic Tac Toe for the console. | |
11 | .SH SYNOPSIS | |
12 | .B nettoe | |
13 | [\fIOPTIONS\fP] | |
14 | .SH DESCRIPTION | |
15 | .B netToe | |
16 | is a console-based version of the classic game "Tic Tac Toe". | |
17 | It is playable against computer AI, against a player on the same machine, | |
18 | or against another player over the network. | |
19 | .SH OPTIONS | |
20 | .TP | |
21 | \fB\-4\fP, \fB\-\-ipv4\fP | |
22 | only IPv4 networking | |
23 | .TP | |
24 | \fB\-6\fP, \fB\-\-ipv6\fP | |
25 | only IPv6 networking | |
26 | .TP | |
27 | \fB\-nc\fP, \fB\-\-no-colors\fP | |
28 | disable colors | |
29 | .TP | |
30 | \fB\-nb\fP, \fB\-\-no-beep\fP | |
31 | disable beeps | |
32 | .TP | |
33 | \fB\-h\fP, \fB\-\-help\fP | |
34 | display usage hints, then exit | |
35 | .TP | |
36 | \fB\-v\fP, \fB\-\-version\fP | |
37 | output version information, then exit | |
38 | .PP | |
39 | .SH "HOW TO PLAY VIA NETWORK" | |
40 | First decide who will host the game: you or your opponent. | |
41 | The hosting player must next do the following. | |
42 | . | |
43 | .IP * 4 | |
44 | Start \fBnettoe\fP. | |
45 | .IP * | |
46 | Pick the third option (Two players over network) of the \fIMain Menu\fP. | |
47 | .IP * | |
48 | Choose the first option (Host the Game) at the \fINetwork Game Menu\fP. | |
49 | .IP * | |
50 | Type name, or nickname. | |
51 | .IP * | |
52 | Communicate the IP address to the other player. | |
53 | Hostnames work, if registered. | |
54 | We hope you know how to get your own IP address. | |
55 | .IP * | |
56 | Wait for the other player to connect to your host. | |
57 | . | |
58 | .PP | |
59 | Now the other player, the one connecting to the game server, must: | |
60 | . | |
61 | .IP o 4 | |
62 | Start \fBnettoe\fP. | |
63 | .IP o | |
64 | Pick the third option (Two players over network) of the \fIMain Menu\fP. | |
65 | .IP o | |
66 | Use the second option (Connect to a host) at the \fINetwork Game Menu\fP. | |
67 | .IP o | |
68 | Type name, or nickname. | |
69 | .IP o | |
70 | Type the IP address of the server host, or its hostname. | |
71 | Examples include \fI192.168.0.5\fP and \fI::1\fP, | |
72 | or \fIfenrir.foe.org\fP and \fIlocalhost\fP. | |
73 | .IP o | |
74 | Wait for the game to start. | |
75 | . | |
76 | .PP | |
77 | Enjoy yourselves. If you have any problem, just let us know. | |
78 | . | |
79 | .SH "NETWORK PORTS" | |
80 | .B netToe | |
81 | uses TCP port \fB7501\fP as listening port of the server engine, | |
82 | unless configured otherwise during build time. | |
83 | Use "nettoe -v" to display the configured port. | |
84 | .PP | |
85 | That port must therefore be usable as destination port over the network. | |
86 | Otherwise remote games would not be possible. | |
87 | For a local game this is of course mostly irrelevant, | |
88 | but filtering firewalls might intercept connections in general. | |
89 | . | |
90 | .SH "USING THE AI MODES" | |
91 | .B netToe | |
92 | offers a mode of play where the computer acts as opponent with | |
93 | some limited built-in abilities to simulate dynamic decisions. | |
94 | Three levels of AI strength are made available: | |
95 | . | |
96 | .IP * 4 | |
97 | The weaker level first checks a small set of blocking moves, | |
98 | then some winning moves, and falls back to simple moves in | |
99 | a fixed priority order. | |
100 | Since neither set is adaptive, the computer is easily fooled. | |
101 | . | |
102 | .IP * | |
103 | The normal level uses slightly larger sets of moves at each step, | |
104 | but is most importantly playing more aggressively than the | |
105 | weaker level does. | |
106 | It happens in the sense that initial checks are for winning moves, | |
107 | only later falling back to blocking moves. | |
108 | This avoids some obvious counterfeit strategy by a human player. | |
109 | . | |
110 | .IP * | |
111 | The better of the three levels is implemented differently. | |
112 | Its first action is to scan a complete set of winning moves. | |
113 | That leading nowhere, it scans through all possible blocking moves, | |
114 | and finally falls back to an ordered list of simple moves. | |
115 | Since not even this level of play is using a look-ahead search, | |
116 | a human player can set up traps, but finding those already | |
117 | demands a fair amount of insight into the game! | |
118 | .PP | |
119 | There are plans for a further level using a look-ahead search | |
120 | of depth two. | |
121 | This would improve the usefulness of \fBnetToe\fP as an | |
122 | educational tool. | |
123 | A further level, which is learning from past plays | |
124 | within each session, could also be an interesting enhancement. | |
125 | . | |
126 | .SH AVAILABILITY | |
127 | The latest version of this program can be found at | |
128 | .LP | |
129 | .RS 4 | |
130 | http://nettoe.sourceforge.net/ | |
131 | .RE | |
132 | . | |
133 | .SH BUGS | |
134 | Report bugs to <meand@users.sourceforge.net>. | |
135 | For a list of known bugs, | |
136 | see the BUGS file in the netToe source package. | |
137 | . | |
138 | .SH AUTHOR | |
139 | .B netToe | |
140 | is written by Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
141 | and by Mats Erik Andersson <meand@users.sourceforge.net>. | |
142 | . | |
143 | .PP | |
144 | This manual page was initially written by Andras Bali <bali@debian.org>, | |
145 | for the Debian GNU/Linux system, and was later rewritten by | |
146 | Gabriele Giorgetti | |
147 | to be distributed in the \fBnetToe\fP source package. | |
148 | . | |
149 | .SH COPYRIGHT | |
150 | Copyright \(co 2000,2001 Gabriele Giorgetti, | |
151 | .RS 10 | |
152 | \(co 2001 Andras Bali, | |
153 | .br | |
154 | \(co 2012,2013,2014 Mats Erik Andersson. | |
155 | .RE | |
156 | .LP | |
157 | This is free software; see the source for copying conditions. | |
158 | There is NO warranty; not even for MERCHANTABILITY or FITNESS | |
159 | FOR A PARTICULAR PURPOSE. |
0 | This text explains the message protocol used by netToe | |
1 | in case the network game mode is used. | |
2 | ||
3 | 1. Initiation: each side writes the name of the player, | |
4 | containing a character string of exactly 32 bytes length: | |
5 | ||
6 | Server: char name[32]. | |
7 | Client: char name[32]. | |
8 | ||
9 | 2. The server tosses a coin in order to choose who plays first. | |
10 | The name of this starting player is transmitted to the client: | |
11 | ||
12 | Server: char name[32]. | |
13 | Client: - | |
14 | ||
15 | 3. The server sends a single character, either '1' or '2', encoding | |
16 | the starting side. The server identifies '1' as himself, and '2' | |
17 | as the client. | |
18 | ||
19 | Server: char. | |
20 | Client: - | |
21 | ||
22 | 4. Transmission of board after a player's move. The server side uses | |
23 | the marker 'X' and the client side uses 'O'. This fourth step is | |
24 | repeated as many times as is needed until a game ends. | |
25 | ||
26 | a. Transmit "y" as char str[2], including ending null. | |
27 | This start signal is common to all information exchanges | |
28 | once the initial steps 1 -- 3 have been completed. | |
29 | ||
30 | b. Transmit the full board. This makes for nine bytes, | |
31 | as char str[9], sent in the order indicated by the | |
32 | following board: | |
33 | ||
34 | 0 | 1 | 2 | |
35 | ----------- | |
36 | 3 | 4 | 5 | |
37 | ----------- | |
38 | 6 | 7 | 9 | |
39 | ||
40 | c. Send identifying stop signal, telling which party was the | |
41 | origin of the just transmitted board: | |
42 | Server: "S", meaning char str[2] with null. | |
43 | Client: "C", likewise. | |
44 | ||
45 | The other party must recognize for this stop signal before | |
46 | proceeding the game exchange. | |
47 | ||
48 | When a winner has been found, or a draw has occurred, a negotiation | |
49 | for continued gaming commences. | |
50 | ||
51 | 5. The player using the server gets to decide if he wants to continue | |
52 | or not. | |
53 | ||
54 | a. The server sends "y" as char str[2], including final null. | |
55 | b. The server sends "n" or "y" as char str[2], depending on | |
56 | whether the first player says "no" or "yes". | |
57 | ||
58 | 6. In the case where 5b. transmits "n", the game is discontinued. | |
59 | Otherwise, the client side performs the corresponding transaction: | |
60 | ||
61 | a. The client sends "y" in the form of char str[2]. | |
62 | b. The client sends either "n" or "y" as char str[2], depending | |
63 | on the player's decision to continue, or not. | |
64 | ||
65 | 7. In the case where 6b. resulted in "y", the transaction scheme | |
66 | continues at step 3. | |
67 | ||
68 | ||
69 | Observe that there is a two character string "y\0" used as an initial | |
70 | transmission hook in most situations, and that an ending hook "S\0", | |
71 | or "C\0", is used to identify which part is sending the board with | |
72 | current playing positions. | |
73 |
0 | # Makefile.am file for nettoe | |
1 | # Edited by Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
2 | # Continued by Mats Erik Andersson | |
3 | ||
4 | # This file is processed by automake | |
5 | ||
6 | DEFS = -DNETTOE_PORT=$(NETTOE_PORT) @DEFS@ | |
7 | ||
8 | bin_PROGRAMS = nettoe | |
9 | ||
10 | nettoe_SOURCES = \ | |
11 | ai.c board.c board.h \ | |
12 | nettoe.c game.h \ | |
13 | matrices.c matrices.h \ | |
14 | terminal.c terminal.h \ | |
15 | misc.c misc.h \ | |
16 | network.c network.h | |
17 | ||
18 | nettoe_LDADD = $(NETTOE_LDADD) |
0 | # Makefile.in generated by automake 1.11.6 from Makefile.am. | |
1 | # @configure_input@ | |
2 | ||
3 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | |
4 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software | |
5 | # Foundation, Inc. | |
6 | # This Makefile.in is free software; the Free Software Foundation | |
7 | # gives unlimited permission to copy and/or distribute it, | |
8 | # with or without modifications, as long as this notice is preserved. | |
9 | ||
10 | # This program is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
13 | # PARTICULAR PURPOSE. | |
14 | ||
15 | @SET_MAKE@ | |
16 | ||
17 | # Makefile.am file for nettoe | |
18 | # Edited by Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
19 | # Continued by Mats Erik Andersson | |
20 | ||
21 | # This file is processed by automake | |
22 | ||
23 | VPATH = @srcdir@ | |
24 | am__make_dryrun = \ | |
25 | { \ | |
26 | am__dry=no; \ | |
27 | case $$MAKEFLAGS in \ | |
28 | *\\[\ \ ]*) \ | |
29 | echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | |
30 | | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ | |
31 | *) \ | |
32 | for am__flg in $$MAKEFLAGS; do \ | |
33 | case $$am__flg in \ | |
34 | *=*|--*) ;; \ | |
35 | *n*) am__dry=yes; break;; \ | |
36 | esac; \ | |
37 | done;; \ | |
38 | esac; \ | |
39 | test $$am__dry = yes; \ | |
40 | } | |
41 | pkgdatadir = $(datadir)/@PACKAGE@ | |
42 | pkgincludedir = $(includedir)/@PACKAGE@ | |
43 | pkglibdir = $(libdir)/@PACKAGE@ | |
44 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | |
45 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | |
46 | install_sh_DATA = $(install_sh) -c -m 644 | |
47 | install_sh_PROGRAM = $(install_sh) -c | |
48 | install_sh_SCRIPT = $(install_sh) -c | |
49 | INSTALL_HEADER = $(INSTALL_DATA) | |
50 | transform = $(program_transform_name) | |
51 | NORMAL_INSTALL = : | |
52 | PRE_INSTALL = : | |
53 | POST_INSTALL = : | |
54 | NORMAL_UNINSTALL = : | |
55 | PRE_UNINSTALL = : | |
56 | POST_UNINSTALL = : | |
57 | build_triplet = @build@ | |
58 | host_triplet = @host@ | |
59 | bin_PROGRAMS = nettoe$(EXEEXT) | |
60 | subdir = src | |
61 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | |
62 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
63 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac | |
64 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | |
65 | $(ACLOCAL_M4) | |
66 | mkinstalldirs = $(install_sh) -d | |
67 | CONFIG_HEADER = $(top_builddir)/config.h | |
68 | CONFIG_CLEAN_FILES = | |
69 | CONFIG_CLEAN_VPATH_FILES = | |
70 | am__installdirs = "$(DESTDIR)$(bindir)" | |
71 | PROGRAMS = $(bin_PROGRAMS) | |
72 | am_nettoe_OBJECTS = ai.$(OBJEXT) board.$(OBJEXT) nettoe.$(OBJEXT) \ | |
73 | matrices.$(OBJEXT) terminal.$(OBJEXT) misc.$(OBJEXT) \ | |
74 | network.$(OBJEXT) | |
75 | nettoe_OBJECTS = $(am_nettoe_OBJECTS) | |
76 | am__DEPENDENCIES_1 = | |
77 | nettoe_DEPENDENCIES = $(am__DEPENDENCIES_1) | |
78 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) | |
79 | depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp | |
80 | am__depfiles_maybe = depfiles | |
81 | am__mv = mv -f | |
82 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | |
83 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | |
84 | CCLD = $(CC) | |
85 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ | |
86 | SOURCES = $(nettoe_SOURCES) | |
87 | DIST_SOURCES = $(nettoe_SOURCES) | |
88 | am__can_run_installinfo = \ | |
89 | case $$AM_UPDATE_INFO_DIR in \ | |
90 | n|no|NO) false;; \ | |
91 | *) (install-info --version) >/dev/null 2>&1;; \ | |
92 | esac | |
93 | ETAGS = etags | |
94 | CTAGS = ctags | |
95 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | |
96 | ACLOCAL = @ACLOCAL@ | |
97 | AMTAR = @AMTAR@ | |
98 | AUTOCONF = @AUTOCONF@ | |
99 | AUTOHEADER = @AUTOHEADER@ | |
100 | AUTOMAKE = @AUTOMAKE@ | |
101 | AWK = @AWK@ | |
102 | CC = @CC@ | |
103 | CCDEPMODE = @CCDEPMODE@ | |
104 | CFLAGS = @CFLAGS@ | |
105 | CPP = @CPP@ | |
106 | CPPFLAGS = @CPPFLAGS@ | |
107 | CYGPATH_W = @CYGPATH_W@ | |
108 | DEFS = -DNETTOE_PORT=$(NETTOE_PORT) @DEFS@ | |
109 | DEPDIR = @DEPDIR@ | |
110 | ECHO_C = @ECHO_C@ | |
111 | ECHO_N = @ECHO_N@ | |
112 | ECHO_T = @ECHO_T@ | |
113 | EGREP = @EGREP@ | |
114 | EXEEXT = @EXEEXT@ | |
115 | GREP = @GREP@ | |
116 | INSTALL = @INSTALL@ | |
117 | INSTALL_DATA = @INSTALL_DATA@ | |
118 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
119 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | |
120 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | |
121 | LDFLAGS = @LDFLAGS@ | |
122 | LIBCURSES = @LIBCURSES@ | |
123 | LIBNCURSES = @LIBNCURSES@ | |
124 | LIBOBJS = @LIBOBJS@ | |
125 | LIBS = @LIBS@ | |
126 | LIBTERMCAP = @LIBTERMCAP@ | |
127 | LIBTINFO = @LIBTINFO@ | |
128 | LTLIBOBJS = @LTLIBOBJS@ | |
129 | MAKEINFO = @MAKEINFO@ | |
130 | MKDIR_P = @MKDIR_P@ | |
131 | NETTOE_LDADD = @NETTOE_LDADD@ | |
132 | NETTOE_PORT = @NETTOE_PORT@ | |
133 | OBJEXT = @OBJEXT@ | |
134 | PACKAGE = @PACKAGE@ | |
135 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | |
136 | PACKAGE_NAME = @PACKAGE_NAME@ | |
137 | PACKAGE_STRING = @PACKAGE_STRING@ | |
138 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | |
139 | PACKAGE_URL = @PACKAGE_URL@ | |
140 | PACKAGE_VERSION = @PACKAGE_VERSION@ | |
141 | PATH_SEPARATOR = @PATH_SEPARATOR@ | |
142 | SED = @SED@ | |
143 | SET_MAKE = @SET_MAKE@ | |
144 | SHELL = @SHELL@ | |
145 | STRIP = @STRIP@ | |
146 | VERSION = @VERSION@ | |
147 | abs_builddir = @abs_builddir@ | |
148 | abs_srcdir = @abs_srcdir@ | |
149 | abs_top_builddir = @abs_top_builddir@ | |
150 | abs_top_srcdir = @abs_top_srcdir@ | |
151 | ac_ct_CC = @ac_ct_CC@ | |
152 | am__include = @am__include@ | |
153 | am__leading_dot = @am__leading_dot@ | |
154 | am__quote = @am__quote@ | |
155 | am__tar = @am__tar@ | |
156 | am__untar = @am__untar@ | |
157 | applicationsdir = @applicationsdir@ | |
158 | bindir = @bindir@ | |
159 | build = @build@ | |
160 | build_alias = @build_alias@ | |
161 | build_cpu = @build_cpu@ | |
162 | build_os = @build_os@ | |
163 | build_vendor = @build_vendor@ | |
164 | builddir = @builddir@ | |
165 | datadir = @datadir@ | |
166 | datarootdir = @datarootdir@ | |
167 | docdir = @docdir@ | |
168 | dvidir = @dvidir@ | |
169 | exec_prefix = @exec_prefix@ | |
170 | host = @host@ | |
171 | host_alias = @host_alias@ | |
172 | host_cpu = @host_cpu@ | |
173 | host_os = @host_os@ | |
174 | host_vendor = @host_vendor@ | |
175 | htmldir = @htmldir@ | |
176 | iconsdir = @iconsdir@ | |
177 | includedir = @includedir@ | |
178 | infodir = @infodir@ | |
179 | install_sh = @install_sh@ | |
180 | libdir = @libdir@ | |
181 | libexecdir = @libexecdir@ | |
182 | localedir = @localedir@ | |
183 | localstatedir = @localstatedir@ | |
184 | mandir = @mandir@ | |
185 | menudir = @menudir@ | |
186 | mkdir_p = @mkdir_p@ | |
187 | oldincludedir = @oldincludedir@ | |
188 | pdfdir = @pdfdir@ | |
189 | pixmapsdir = @pixmapsdir@ | |
190 | prefix = @prefix@ | |
191 | program_transform_name = @program_transform_name@ | |
192 | psdir = @psdir@ | |
193 | sbindir = @sbindir@ | |
194 | sharedstatedir = @sharedstatedir@ | |
195 | srcdir = @srcdir@ | |
196 | sysconfdir = @sysconfdir@ | |
197 | target_alias = @target_alias@ | |
198 | top_build_prefix = @top_build_prefix@ | |
199 | top_builddir = @top_builddir@ | |
200 | top_srcdir = @top_srcdir@ | |
201 | nettoe_SOURCES = \ | |
202 | ai.c board.c board.h \ | |
203 | nettoe.c game.h \ | |
204 | matrices.c matrices.h \ | |
205 | terminal.c terminal.h \ | |
206 | misc.c misc.h \ | |
207 | network.c network.h | |
208 | ||
209 | nettoe_LDADD = $(NETTOE_LDADD) | |
210 | all: all-am | |
211 | ||
212 | .SUFFIXES: | |
213 | .SUFFIXES: .c .o .obj | |
214 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | |
215 | @for dep in $?; do \ | |
216 | case '$(am__configure_deps)' in \ | |
217 | *$$dep*) \ | |
218 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | |
219 | && { if test -f $@; then exit 0; else break; fi; }; \ | |
220 | exit 1;; \ | |
221 | esac; \ | |
222 | done; \ | |
223 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ | |
224 | $(am__cd) $(top_srcdir) && \ | |
225 | $(AUTOMAKE) --gnu src/Makefile | |
226 | .PRECIOUS: Makefile | |
227 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |
228 | @case '$?' in \ | |
229 | *config.status*) \ | |
230 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | |
231 | *) \ | |
232 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | |
233 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | |
234 | esac; | |
235 | ||
236 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | |
237 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | |
238 | ||
239 | $(top_srcdir)/configure: $(am__configure_deps) | |
240 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | |
241 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | |
242 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | |
243 | $(am__aclocal_m4_deps): | |
244 | install-binPROGRAMS: $(bin_PROGRAMS) | |
245 | @$(NORMAL_INSTALL) | |
246 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ | |
247 | if test -n "$$list"; then \ | |
248 | echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ | |
249 | $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ | |
250 | fi; \ | |
251 | for p in $$list; do echo "$$p $$p"; done | \ | |
252 | sed 's/$(EXEEXT)$$//' | \ | |
253 | while read p p1; do if test -f $$p; \ | |
254 | then echo "$$p"; echo "$$p"; else :; fi; \ | |
255 | done | \ | |
256 | sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ | |
257 | -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ | |
258 | sed 'N;N;N;s,\n, ,g' | \ | |
259 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ | |
260 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ | |
261 | if ($$2 == $$4) files[d] = files[d] " " $$1; \ | |
262 | else { print "f", $$3 "/" $$4, $$1; } } \ | |
263 | END { for (d in files) print "f", d, files[d] }' | \ | |
264 | while read type dir files; do \ | |
265 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ | |
266 | test -z "$$files" || { \ | |
267 | echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ | |
268 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ | |
269 | } \ | |
270 | ; done | |
271 | ||
272 | uninstall-binPROGRAMS: | |
273 | @$(NORMAL_UNINSTALL) | |
274 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ | |
275 | files=`for p in $$list; do echo "$$p"; done | \ | |
276 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ | |
277 | -e 's/$$/$(EXEEXT)/' `; \ | |
278 | test -n "$$list" || exit 0; \ | |
279 | echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ | |
280 | cd "$(DESTDIR)$(bindir)" && rm -f $$files | |
281 | ||
282 | clean-binPROGRAMS: | |
283 | -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) | |
284 | nettoe$(EXEEXT): $(nettoe_OBJECTS) $(nettoe_DEPENDENCIES) $(EXTRA_nettoe_DEPENDENCIES) | |
285 | @rm -f nettoe$(EXEEXT) | |
286 | $(LINK) $(nettoe_OBJECTS) $(nettoe_LDADD) $(LIBS) | |
287 | ||
288 | mostlyclean-compile: | |
289 | -rm -f *.$(OBJEXT) | |
290 | ||
291 | distclean-compile: | |
292 | -rm -f *.tab.c | |
293 | ||
294 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ai.Po@am__quote@ | |
295 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/board.Po@am__quote@ | |
296 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrices.Po@am__quote@ | |
297 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ | |
298 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nettoe.Po@am__quote@ | |
299 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network.Po@am__quote@ | |
300 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terminal.Po@am__quote@ | |
301 | ||
302 | .c.o: | |
303 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | |
304 | @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
305 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | |
306 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
307 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | |
308 | ||
309 | .c.obj: | |
310 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | |
311 | @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
312 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | |
313 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
314 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | |
315 | ||
316 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | |
317 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | |
318 | unique=`for i in $$list; do \ | |
319 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | |
320 | done | \ | |
321 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | |
322 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | |
323 | mkid -fID $$unique | |
324 | tags: TAGS | |
325 | ||
326 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | |
327 | $(TAGS_FILES) $(LISP) | |
328 | set x; \ | |
329 | here=`pwd`; \ | |
330 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | |
331 | unique=`for i in $$list; do \ | |
332 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | |
333 | done | \ | |
334 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | |
335 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | |
336 | shift; \ | |
337 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | |
338 | test -n "$$unique" || unique=$$empty_fix; \ | |
339 | if test $$# -gt 0; then \ | |
340 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | |
341 | "$$@" $$unique; \ | |
342 | else \ | |
343 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | |
344 | $$unique; \ | |
345 | fi; \ | |
346 | fi | |
347 | ctags: CTAGS | |
348 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | |
349 | $(TAGS_FILES) $(LISP) | |
350 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | |
351 | unique=`for i in $$list; do \ | |
352 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | |
353 | done | \ | |
354 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | |
355 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | |
356 | test -z "$(CTAGS_ARGS)$$unique" \ | |
357 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | |
358 | $$unique | |
359 | ||
360 | GTAGS: | |
361 | here=`$(am__cd) $(top_builddir) && pwd` \ | |
362 | && $(am__cd) $(top_srcdir) \ | |
363 | && gtags -i $(GTAGS_ARGS) "$$here" | |
364 | ||
365 | distclean-tags: | |
366 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | |
367 | ||
368 | distdir: $(DISTFILES) | |
369 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
370 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
371 | list='$(DISTFILES)'; \ | |
372 | dist_files=`for file in $$list; do echo $$file; done | \ | |
373 | sed -e "s|^$$srcdirstrip/||;t" \ | |
374 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | |
375 | case $$dist_files in \ | |
376 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | |
377 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | |
378 | sort -u` ;; \ | |
379 | esac; \ | |
380 | for file in $$dist_files; do \ | |
381 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | |
382 | if test -d $$d/$$file; then \ | |
383 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | |
384 | if test -d "$(distdir)/$$file"; then \ | |
385 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
386 | fi; \ | |
387 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | |
388 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | |
389 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
390 | fi; \ | |
391 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | |
392 | else \ | |
393 | test -f "$(distdir)/$$file" \ | |
394 | || cp -p $$d/$$file "$(distdir)/$$file" \ | |
395 | || exit 1; \ | |
396 | fi; \ | |
397 | done | |
398 | check-am: all-am | |
399 | check: check-am | |
400 | all-am: Makefile $(PROGRAMS) | |
401 | installdirs: | |
402 | for dir in "$(DESTDIR)$(bindir)"; do \ | |
403 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | |
404 | done | |
405 | install: install-am | |
406 | install-exec: install-exec-am | |
407 | install-data: install-data-am | |
408 | uninstall: uninstall-am | |
409 | ||
410 | install-am: all-am | |
411 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | |
412 | ||
413 | installcheck: installcheck-am | |
414 | install-strip: | |
415 | if test -z '$(STRIP)'; then \ | |
416 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
417 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
418 | install; \ | |
419 | else \ | |
420 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
421 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
422 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ | |
423 | fi | |
424 | mostlyclean-generic: | |
425 | ||
426 | clean-generic: | |
427 | ||
428 | distclean-generic: | |
429 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | |
430 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | |
431 | ||
432 | maintainer-clean-generic: | |
433 | @echo "This command is intended for maintainers to use" | |
434 | @echo "it deletes files that may require special tools to rebuild." | |
435 | clean: clean-am | |
436 | ||
437 | clean-am: clean-binPROGRAMS clean-generic mostlyclean-am | |
438 | ||
439 | distclean: distclean-am | |
440 | -rm -rf ./$(DEPDIR) | |
441 | -rm -f Makefile | |
442 | distclean-am: clean-am distclean-compile distclean-generic \ | |
443 | distclean-tags | |
444 | ||
445 | dvi: dvi-am | |
446 | ||
447 | dvi-am: | |
448 | ||
449 | html: html-am | |
450 | ||
451 | html-am: | |
452 | ||
453 | info: info-am | |
454 | ||
455 | info-am: | |
456 | ||
457 | install-data-am: | |
458 | ||
459 | install-dvi: install-dvi-am | |
460 | ||
461 | install-dvi-am: | |
462 | ||
463 | install-exec-am: install-binPROGRAMS | |
464 | ||
465 | install-html: install-html-am | |
466 | ||
467 | install-html-am: | |
468 | ||
469 | install-info: install-info-am | |
470 | ||
471 | install-info-am: | |
472 | ||
473 | install-man: | |
474 | ||
475 | install-pdf: install-pdf-am | |
476 | ||
477 | install-pdf-am: | |
478 | ||
479 | install-ps: install-ps-am | |
480 | ||
481 | install-ps-am: | |
482 | ||
483 | installcheck-am: | |
484 | ||
485 | maintainer-clean: maintainer-clean-am | |
486 | -rm -rf ./$(DEPDIR) | |
487 | -rm -f Makefile | |
488 | maintainer-clean-am: distclean-am maintainer-clean-generic | |
489 | ||
490 | mostlyclean: mostlyclean-am | |
491 | ||
492 | mostlyclean-am: mostlyclean-compile mostlyclean-generic | |
493 | ||
494 | pdf: pdf-am | |
495 | ||
496 | pdf-am: | |
497 | ||
498 | ps: ps-am | |
499 | ||
500 | ps-am: | |
501 | ||
502 | uninstall-am: uninstall-binPROGRAMS | |
503 | ||
504 | .MAKE: install-am install-strip | |
505 | ||
506 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ | |
507 | clean-generic ctags distclean distclean-compile \ | |
508 | distclean-generic distclean-tags distdir dvi dvi-am html \ | |
509 | html-am info info-am install install-am install-binPROGRAMS \ | |
510 | install-data install-data-am install-dvi install-dvi-am \ | |
511 | install-exec install-exec-am install-html install-html-am \ | |
512 | install-info install-info-am install-man install-pdf \ | |
513 | install-pdf-am install-ps install-ps-am install-strip \ | |
514 | installcheck installcheck-am installdirs maintainer-clean \ | |
515 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | |
516 | mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ | |
517 | uninstall-am uninstall-binPROGRAMS | |
518 | ||
519 | ||
520 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | |
521 | # Otherwise a system limit (for SysV at least) may be exceeded. | |
522 | .NOEXPORT: |
0 | /* netToe Version 1.5.1 | |
1 | * | |
2 | * Copyright 2013, 2014 Mats Erik Andersson <meand@users.sourceforge.net> | |
3 | * | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify | |
6 | * it under the terms of the GNU General Public License as published by | |
7 | * the Free Software Foundation; either version 2 of the License, or | |
8 | * (at your option) any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with this program; if not, write to the Free Software | |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | */ | |
19 | ||
20 | #ifdef HAVE_CONFIG_H | |
21 | # include <config.h> | |
22 | #endif | |
23 | ||
24 | #include <stdlib.h> | |
25 | #include <unistd.h> | |
26 | ||
27 | #define BOARD_CALCULATIONS | |
28 | #include "board.h" | |
29 | ||
30 | /* A vector of all &C11, &C12, etcetera, ordered | |
31 | * in some way to reflect a strategic decision. | |
32 | * Used by AI to locate an unused field. | |
33 | */ | |
34 | static char ** pawnlist_old[] = | |
35 | { &C22, &C31, &C12, &C33, &C23, &C21, &C13, &C11, &C32, NULL }; | |
36 | ||
37 | /* Description of threat used by AI to decide on moves. */ | |
38 | struct probes { | |
39 | char pawn; /* Probe only this kind of marker. */ | |
40 | char ** first; /* Two taken fields. */ | |
41 | char ** second; | |
42 | char ** open; /* One field open for play. */ | |
43 | }; | |
44 | ||
45 | static struct probes probelist_weak[] = { | |
46 | { 'X', &C11, &C12, &C13 }, /* Protect first row. */ | |
47 | { 'X', &C33, &C32, &C31 }, /* Protect third row. */ | |
48 | { 'X', &C11, &C21, &C31 }, /* Protect first column. */ | |
49 | { 'X', &C13, &C23, &C33 }, /* Protect third column. */ | |
50 | { 'X', &C13, &C22, &C31 }, /* Protect second diagonal. */ | |
51 | { 'X', &C21, &C22, &C23 }, /* Protect second row. */ | |
52 | { 'X', &C23, &C22, &C21 }, /* Protect second row. */ | |
53 | { 'X', &C11, &C13, &C12 }, /* Protect first row. */ | |
54 | { 'O', &C31, &C22, &C13 }, /* Attack second diagonal, win at corner. */ | |
55 | { 'O', &C33, &C22, &C11 }, /* Attack first diagonal, win at corner. */ | |
56 | { 'O', &C32, &C22, &C12 }, /* Attack second column, win at edge. */ | |
57 | { 'O', &C12, &C22, &C32 }, /* Attack second column, win at edge. */ | |
58 | { 0, NULL, NULL, NULL }, | |
59 | }; | |
60 | ||
61 | static struct probes probelist_standard[] = { | |
62 | { 'O', &C11, &C22, &C33 }, /* Attack first diagonal, win at corner. */ | |
63 | { 'O', &C31, &C33, &C32 }, /* Attack third row, win at edge. */ | |
64 | { 'O', &C23, &C22, &C21 }, /* Attack second row, win at edge. */ | |
65 | { 'O', &C12, &C22, &C32 }, /* Attack second column, win at edge. */ | |
66 | { 'O', &C13, &C22, &C31 }, /* Attack second diagonal, win at corner. */ | |
67 | { 'O', &C31, &C22, &C13 }, /* Attack second diagonal, win at corner. */ | |
68 | { 'O', &C33, &C22, &C11 }, /* Attack first diagonal, win at corner. */ | |
69 | { 'O', &C32, &C22, &C12 }, /* Attack second column, win at edge. */ | |
70 | { 'X', &C11, &C12, &C13 }, /* Protect first row. */ | |
71 | { 'X', &C33, &C32, &C31 }, /* Protect third row. */ | |
72 | { 'X', &C11, &C21, &C31 }, /* Protect first column. */ | |
73 | { 'X', &C13, &C23, &C33 }, /* Protect third column. */ | |
74 | { 'X', &C13, &C22, &C31 }, /* Protect second diagonal. */ | |
75 | { 'X', &C21, &C22, &C23 }, /* Protect second row. */ | |
76 | { 'X', &C23, &C22, &C21 }, /* Protect second row. */ | |
77 | { 'X', &C11, &C13, &C12 }, /* Protect first row. */ | |
78 | { 'X', &C12, &C22, &C32 }, /* Protect second column. */ | |
79 | { 'X', &C32, &C22, &C12 }, /* Protect second column. */ | |
80 | { 0, NULL, NULL, NULL }, | |
81 | }; | |
82 | ||
83 | /* The argument is a fixed, ordered vector of all &C11, &C12, etcetera. | |
84 | * It represents a particular strategy for finding empty fields. | |
85 | * A NULL at the end is a guard, detected by claim_empty_field(). | |
86 | */ | |
87 | static void claim_empty_field (char **plist[]) | |
88 | { | |
89 | char ***p; | |
90 | ||
91 | for (p = plist; *p; p++) | |
92 | if (***p == ' ') | |
93 | { | |
94 | ***p = 'O'; | |
95 | return; | |
96 | } | |
97 | } | |
98 | ||
99 | static int play_block_or_win (char marker, int first, int last) | |
100 | { | |
101 | int n; | |
102 | int marker_count = 0, blank_count = 0; | |
103 | ||
104 | for ( n=first; n<=last; n += (last - first)/2 ) | |
105 | { | |
106 | if ( *board[n] == ' ') | |
107 | { | |
108 | blank_count++; | |
109 | } | |
110 | else if ( *board[n] == marker ) | |
111 | { | |
112 | marker_count++; | |
113 | } | |
114 | } | |
115 | ||
116 | if ( blank_count == 1 && marker_count == 2 ) | |
117 | { | |
118 | int play_this_pos; | |
119 | ||
120 | /* Is winning line or a serious threat. */ | |
121 | if ( *board[first] == ' ' ) | |
122 | { | |
123 | play_this_pos = first; | |
124 | } | |
125 | else if ( *board[last] == ' ' ) | |
126 | { | |
127 | play_this_pos = last; | |
128 | } | |
129 | else | |
130 | { | |
131 | play_this_pos = (first + last)/2; | |
132 | } | |
133 | ||
134 | *board[play_this_pos] = 'O'; | |
135 | ||
136 | /* Report a performed play. */ | |
137 | return 1; | |
138 | } | |
139 | ||
140 | /* Nothing done. */ | |
141 | return 0; | |
142 | } | |
143 | ||
144 | static int probe_for_fields (struct probes probelist[]) | |
145 | { | |
146 | struct probes *p; | |
147 | ||
148 | for (p = probelist; p->pawn; p++) | |
149 | { | |
150 | struct probes probe = *p; | |
151 | ||
152 | if ( (**probe.first == probe.pawn) | |
153 | && (**probe.second == probe.pawn) | |
154 | && (**probe.open == ' ') ) | |
155 | { | |
156 | **probe.open = 'O'; | |
157 | return 1; | |
158 | } | |
159 | } | |
160 | ||
161 | /* No action. */ | |
162 | return 0; | |
163 | } | |
164 | ||
165 | static void get_cpu_normal_move (void) | |
166 | { | |
167 | sleep ( 1 ); | |
168 | ||
169 | if (probe_for_fields (probelist_weak)) | |
170 | return; | |
171 | ||
172 | /* Find any unoccupied position. */ | |
173 | claim_empty_field (pawnlist_old); | |
174 | } | |
175 | ||
176 | static void get_cpu_hard_move (void) | |
177 | { | |
178 | sleep ( 1 ); | |
179 | ||
180 | if (probe_for_fields (probelist_standard)) | |
181 | return; | |
182 | ||
183 | /* Find any unoccupied position. */ | |
184 | claim_empty_field (pawnlist_old); | |
185 | } | |
186 | ||
187 | static void get_cpu_harder_move (void) | |
188 | { | |
189 | int n; | |
190 | ||
191 | sleep ( 1 ); | |
192 | ||
193 | /* Locate any winning move. */ | |
194 | for (n = 0; n < 8; n++) | |
195 | { | |
196 | if ( play_block_or_win('O', | |
197 | winning_line[n].first, winning_line[n].last) ) | |
198 | return; | |
199 | } | |
200 | ||
201 | /* Locate any threat. */ | |
202 | for (n = 0; n < 8; n++) | |
203 | { | |
204 | if ( play_block_or_win('X', | |
205 | winning_line[n].first, winning_line[n].last) ) | |
206 | return; | |
207 | } | |
208 | ||
209 | /* Find any unoccupied position. */ | |
210 | claim_empty_field (pawnlist_old); | |
211 | } | |
212 | ||
213 | void get_cpu_move (int level) | |
214 | { | |
215 | switch (level) | |
216 | { | |
217 | case 1: | |
218 | get_cpu_normal_move (); | |
219 | break; | |
220 | case 2: | |
221 | get_cpu_hard_move (); | |
222 | break; | |
223 | case 3: | |
224 | default: | |
225 | get_cpu_harder_move (); | |
226 | break; | |
227 | } | |
228 | } | |
229 |
0 | /* netToe Version 1.5.1 | |
1 | * | |
2 | * Copyright 2013, 2014 Mats Erik Andersson <meand@users.sourceforge.net> | |
3 | * | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify | |
6 | * it under the terms of the GNU General Public License as published by | |
7 | * the Free Software Foundation; either version 2 of the License, or | |
8 | * (at your option) any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with this program; if not, write to the Free Software | |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | */ | |
19 | ||
20 | #ifdef HAVE_CONFIG_H | |
21 | # include <config.h> | |
22 | #endif | |
23 | ||
24 | #include <stdlib.h> | |
25 | #ifdef HAVE_STRING_H | |
26 | # include <string.h> | |
27 | #endif | |
28 | #ifdef HAVE_STRINGS_H | |
29 | # include <strings.h> /* strncasecmp */ | |
30 | #endif | |
31 | ||
32 | #define NO_EXTERNALS | |
33 | #include "board.h" | |
34 | ||
35 | char c11, c12, c13; | |
36 | char c21, c22, c23; | |
37 | char c31, c32, c33; | |
38 | ||
39 | char *C11, *C12, *C13; | |
40 | char *C21, *C22, *C23; | |
41 | char *C31, *C32, *C33; | |
42 | ||
43 | /* Board vector for unified calculations. */ | |
44 | char * board[9]; | |
45 | ||
46 | /* The eight possible winning lines expressed as indices. | |
47 | * | |
48 | * These give the first and last positions, the middle | |
49 | * position is directly retreived as the mean of those. | |
50 | * | |
51 | * A graphical translation is easy: | |
52 | * | |
53 | * 0 | 1 | 2 | |
54 | * --------- | |
55 | * 3 | 4 | 5 <====> board[ 0 1 2 3 4 5 6 7 8 ] | |
56 | * --------- | |
57 | * 6 | 7 | 8 | |
58 | * | |
59 | * */ | |
60 | struct endpoints winning_line[8] = | |
61 | { | |
62 | { 0, 2 }, { 3, 5 }, { 6, 8 }, /* horizontals */ | |
63 | { 0, 6 }, { 1, 7 }, { 2, 8 }, /* verticals */ | |
64 | { 0, 8 }, { 2, 6 } /* diagonals */ | |
65 | }; | |
66 | ||
67 | static void switch_char_pointers(char ** a, char ** b) { | |
68 | char * tmp = *a; | |
69 | ||
70 | *a = *b; | |
71 | *b = tmp; | |
72 | } | |
73 | ||
74 | /* Transform board position to array index. | |
75 | * Here 1 <= row,col <= 3. | |
76 | */ | |
77 | static int pos_to_ind(char row, char col) | |
78 | { | |
79 | return 3 * (row - 1) + (col - 1); | |
80 | } | |
81 | ||
82 | void init_matrix (void) | |
83 | { | |
84 | c11 = ' ', c12 = ' ', c13 = ' '; | |
85 | c21 = ' ', c22 = ' ', c23 = ' '; | |
86 | c31 = ' ', c32 = ' ', c33 = ' '; | |
87 | C11 = &c11, C12 = &c12, C13 = &c13; | |
88 | C21 = &c21, C22 = &c22, C23 = &c23; | |
89 | C31 = &c31, C32 = &c32, C33 = &c33; | |
90 | ||
91 | /* Randomize internal board view. | |
92 | * An initial srandom(time(0)) was applied | |
93 | * in misc.c. | |
94 | */ | |
95 | if ( random() % 2 ) { | |
96 | /* Vertical mirroring. */ | |
97 | switch_char_pointers(&C11, &C31); | |
98 | switch_char_pointers(&C12, &C32); | |
99 | switch_char_pointers(&C13, &C33); | |
100 | } | |
101 | if ( random() % 2 ) { | |
102 | /* Horizontal mirroring. */ | |
103 | switch_char_pointers(&C11, &C13); | |
104 | switch_char_pointers(&C21, &C23); | |
105 | switch_char_pointers(&C31, &C33); | |
106 | } | |
107 | if ( random() % 2 ) { | |
108 | /* Diagonal mirroring. */ | |
109 | switch_char_pointers(&C11, &C33); | |
110 | switch_char_pointers(&C12, &C23); | |
111 | switch_char_pointers(&C21, &C32); | |
112 | } | |
113 | ||
114 | /* Set up the board array. Used in AI-mode 3. */ | |
115 | board[pos_to_ind(1,1)] = C11; | |
116 | board[pos_to_ind(1,2)] = C12; | |
117 | board[pos_to_ind(1,3)] = C13; | |
118 | board[pos_to_ind(2,1)] = C21; | |
119 | board[pos_to_ind(2,2)] = C22; | |
120 | board[pos_to_ind(2,3)] = C23; | |
121 | board[pos_to_ind(3,1)] = C31; | |
122 | board[pos_to_ind(3,2)] = C32; | |
123 | board[pos_to_ind(3,3)] = C33; | |
124 | } | |
125 | ||
126 | int game_check (void) | |
127 | { | |
128 | int n; | |
129 | ||
130 | for (n = 0; n < 8; n++) | |
131 | { | |
132 | struct endpoints line = winning_line[n]; | |
133 | ||
134 | if ( *board[line.first] == *board[line.last] | |
135 | && *board[line.first] == *board[(line.first + line.last) / 2] ) | |
136 | { | |
137 | /* Disregard empty lines. */ | |
138 | if (*board[line.first] != 'X' && *board[line.first] != 'O') | |
139 | continue; | |
140 | ||
141 | /* Identical pawns in a winning line! */ | |
142 | return ((*board[line.first] == 'X') ? GAME_IS_X_WIN | |
143 | : GAME_IS_O_WIN); | |
144 | } | |
145 | } | |
146 | ||
147 | /* Is the board exhausted? */ | |
148 | if ( (c11 != ' ') && (c12 != ' ') && (c13 != ' ') | |
149 | && (c21 != ' ') && (c22 != ' ') && (c23 != ' ') | |
150 | && (c31 != ' ') && (c32 != ' ') & (c33 != ' ') ) | |
151 | { | |
152 | return GAME_IS_DRAW; | |
153 | } | |
154 | ||
155 | return GAME_IS_ALIVE; | |
156 | } | |
157 | ||
158 | struct good_move { | |
159 | char * string; | |
160 | char * position; | |
161 | } good_moves[] = { | |
162 | { "a1", &c11 }, | |
163 | { "a2", &c12 }, | |
164 | { "a3", &c13 }, | |
165 | { "b1", &c21 }, | |
166 | { "b2", &c22 }, | |
167 | { "b3", &c23 }, | |
168 | { "c1", &c31 }, | |
169 | { "c2", &c32 }, | |
170 | { "c3", &c33 }, | |
171 | #ifndef HAVE_STRNCASECMP | |
172 | { "A1", &c11 }, | |
173 | { "A2", &c12 }, | |
174 | { "A3", &c13 }, | |
175 | { "B1", &c21 }, | |
176 | { "B2", &c22 }, | |
177 | { "B3", &c23 }, | |
178 | { "C1", &c31 }, | |
179 | { "C2", &c32 }, | |
180 | { "C3", &c33 }, | |
181 | #endif /* !HAVE_STRNCASECMP */ | |
182 | { NULL, NULL }, | |
183 | }; | |
184 | ||
185 | int attempt_move (const char *move, char pawn) | |
186 | { | |
187 | struct good_move *p; | |
188 | ||
189 | for (p = good_moves; p->string && p->position; p++) | |
190 | { | |
191 | #ifdef HAVE_STRNCASECMP | |
192 | if (!strncasecmp (move, p->string, strlen (p->string))) | |
193 | #else /* !HAVE_STRNCASECMP */ | |
194 | if (!strncmp (move, p->string, strlen (p->string))) | |
195 | #endif | |
196 | { | |
197 | if (*p->position == ' ') | |
198 | { | |
199 | *p->position = pawn; | |
200 | return VALID_MOVE; | |
201 | } | |
202 | } | |
203 | } | |
204 | ||
205 | return INVALID_MOVE; | |
206 | } |
0 | /* netToe Version 1.5.1 | |
1 | * | |
2 | * Copyright 2013, 2014 Mats Erik Andersson <meand@users.sourceforge.net> | |
3 | * | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify | |
6 | * it under the terms of the GNU General Public License as published by | |
7 | * the Free Software Foundation; either version 2 of the License, or | |
8 | * (at your option) any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with this program; if not, write to the Free Software | |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | */ | |
19 | ||
20 | #ifndef _BOARD_H | |
21 | # define _BOARD_H | |
22 | ||
23 | #define GAME_IS_ALIVE 0 | |
24 | #define GAME_IS_X_WIN 1 | |
25 | #define GAME_IS_O_WIN 2 | |
26 | #define GAME_IS_DRAW 3 | |
27 | ||
28 | #define INVALID_MOVE 0 | |
29 | #define VALID_MOVE 1 | |
30 | ||
31 | struct endpoints { | |
32 | int first, last; | |
33 | }; | |
34 | ||
35 | # ifndef NO_EXTERNALS | |
36 | extern char c11, c12, c13; | |
37 | extern char c21, c22, c23; | |
38 | extern char c31, c32, c33; | |
39 | ||
40 | # ifdef BOARD_CALCULATIONS | |
41 | extern char *C11, *C12, *C13; | |
42 | extern char *C21, *C22, *C23; | |
43 | extern char *C31, *C32, *C33; | |
44 | ||
45 | extern char * board[9]; | |
46 | ||
47 | extern struct endpoints winning_line[8]; | |
48 | # endif /* BOARD_CALCULATIONS */ | |
49 | # endif /* !NO_EXTERNALS */ | |
50 | ||
51 | void init_matrix (void); | |
52 | int game_check (void); | |
53 | int attempt_move (const char *, char); | |
54 | #endif /* _BOARD_H */ |
0 | /* netToe Version 1.5.1 | |
1 | * | |
2 | * Copyright 2000,2001 Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
3 | * 2009-2014 Mats Erik Andersson <meand@users.sourceforge.net> | |
4 | * | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation; either version 2 of the License, or | |
9 | * (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write to the Free Software | |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | */ | |
20 | ||
21 | #define HOMEPAGE "http://nettoe.sourceforge.net/" | |
22 | #define AUTHOR_EMAIL "<ggdev@users.sourceforge.net>" | |
23 | #define AUTHOR2_EMAIL "<meand@users.sourceforge.net>" | |
24 | ||
25 | #ifndef RELEASE_DATE | |
26 | # ifdef PACKAGE_RELEASE_DATE | |
27 | # define RELEASE_DATE PACKAGE_RELEASE_DATE | |
28 | # else | |
29 | # define RELEASE_DATE "unknown" | |
30 | # endif | |
31 | #endif | |
32 | ||
33 | #ifndef SERVER_PORT_NUMBER | |
34 | # ifdef NETTOE_PORT | |
35 | # define SERVER_PORT_NUMBER NETTOE_PORT | |
36 | # else | |
37 | # define SERVER_PORT_NUMBER 7501 | |
38 | # endif | |
39 | #endif | |
40 | ||
41 | #define MAXDATASIZE 50 | |
42 | ||
43 | #define MAX_PNAME_LEN 32 /* this define max chars for the player names*/ | |
44 | ||
45 | int NO_BEEP; | |
46 | ||
47 | int NO_COLORS; | |
48 | ||
49 | int addrfamily; |
0 | /* netToe Version 1.2.0 | |
1 | * Release date: 30 December 2009 | |
2 | * Copyright 2000,2001 Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
3 | * | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify | |
6 | * it under the terms of the GNU General Public License as published by | |
7 | * the Free Software Foundation; either version 2 of the License, or | |
8 | * (at your option) any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with this program; if not, write to the Free Software | |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | */ | |
19 | ||
20 | #include <stdio.h> | |
21 | ||
22 | #include "matrices.h" | |
23 | ||
24 | ||
25 | /* functions set not used yet in nettoe */ | |
26 | ||
27 | void nettoe_init_matrix_3x3 (MATRIX_3x3 matrix) | |
28 | { | |
29 | int c, r; | |
30 | ||
31 | for (r = 0; r < 3; r++) | |
32 | { | |
33 | for (c = 0; c < 3; c++) | |
34 | { | |
35 | matrix[c][r] = MATRIX_BLANK; | |
36 | } | |
37 | } | |
38 | } | |
39 | ||
40 | ||
41 | int nettoe_set_matrix_3x3 (MATRIX_3x3 matrix, int c, int r, int value) | |
42 | { | |
43 | if (matrix[c][r] != MATRIX_BLANK) | |
44 | return 1; | |
45 | ||
46 | matrix[c][r] = value; | |
47 | ||
48 | return 0; | |
49 | } | |
50 | ||
51 | ||
52 | void nettoe_print_matrix_3x3 (MATRIX_3x3 matrix) | |
53 | { | |
54 | int c, r; | |
55 | ||
56 | for (r = 0; r < 3; r++) | |
57 | { | |
58 | for (c = 0; c < 3; c++) | |
59 | { | |
60 | printf("%d ", matrix[c][r]); | |
61 | } | |
62 | printf("\n"); | |
63 | } | |
64 | } | |
65 | ||
66 | ||
67 | /* | |
68 | int nettoe_send_matrix_3x3 (MATRIX_3x3 matrix, int socket ) | |
69 | { | |
70 | ||
71 | ||
72 | } | |
73 | ||
74 | int nettoe_recive_matrix_3x3 (MATRIX_3x3 matrix, int socket ) | |
75 | { | |
76 | ||
77 | ||
78 | } | |
79 | */ |
0 | /* netToe Version 1.2.0 | |
1 | * Release date: 30 December 2009 | |
2 | * Copyright 2000,2001 Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
3 | * | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify | |
6 | * it under the terms of the GNU General Public License as published by | |
7 | * the Free Software Foundation; either version 2 of the License, or | |
8 | * (at your option) any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with this program; if not, write to the Free Software | |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | */ | |
19 | ||
20 | /* functions set not used yet in nettoe */ | |
21 | ||
22 | typedef int MATRIX_3x3[3][3]; | |
23 | ||
24 | enum { MATRIX_BLANK, MATRIX_O, MATRIX_X }; | |
25 | ||
26 | void nettoe_init_matrix_3x3 (MATRIX_3x3 matrix); | |
27 | void nettoe_print_matrix_3x3 (MATRIX_3x3 matrix); | |
28 | ||
29 | /* | |
30 | int nettoe_send_matrix_3x3 (MATRIX_3x3 matrix, int socket); | |
31 | int nettoe_recive_matrix_3x3 (MATRIX_3x3 matrix, int socket); | |
32 | */ |
0 | /* netToe Version 1.5.1 | |
1 | * | |
2 | * Copyright 2000,2001 Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
3 | * 2009-2014 Mats Erik Andersson <meand@users.sourceforge.net> | |
4 | * | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation; either version 2 of the License, or | |
9 | * (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write to the Free Software | |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | */ | |
20 | ||
21 | #ifdef HAVE_CONFIG_H | |
22 | # include <config.h> | |
23 | #endif | |
24 | ||
25 | #include <stdio.h> | |
26 | #include <stdlib.h> | |
27 | #include <unistd.h> | |
28 | #include <string.h> | |
29 | #include <time.h> | |
30 | ||
31 | /* Macros AF_* for address families. */ | |
32 | #ifdef HAVE_SYS_TYPES_H | |
33 | # include <sys/types.h> | |
34 | #endif | |
35 | #ifdef HAVE_SYS_SOCKET_H | |
36 | # include <sys/socket.h> | |
37 | #endif | |
38 | #ifdef HAVE_NETINET_IN_H | |
39 | # include <netinet/in.h> | |
40 | #endif | |
41 | ||
42 | #include "game.h" | |
43 | #include "misc.h" | |
44 | #include "terminal.h" | |
45 | ||
46 | int who_start_first(void) | |
47 | { | |
48 | long generated_number; | |
49 | ||
50 | generated_number = 1 + (random() % 10); | |
51 | ||
52 | if ( (generated_number == 2) || (generated_number == 4) | |
53 | || (generated_number == 6) || (generated_number == 8) | |
54 | || (generated_number == 10) ) | |
55 | { | |
56 | return 1; | |
57 | } | |
58 | ||
59 | return 2; | |
60 | } /* who_start_first(void) */ | |
61 | ||
62 | void get_player_pname(char * str, size_t maxlen) | |
63 | { | |
64 | char buffer[1024], *pek; | |
65 | size_t n = 0; | |
66 | ||
67 | str[0] ='\0'; | |
68 | if ( maxlen <= 1 ) | |
69 | return; | |
70 | ||
71 | if (!fgets(buffer, sizeof(buffer), stdin)) | |
72 | buffer[0] = '\0'; | |
73 | ||
74 | pek = buffer; | |
75 | ||
76 | /* Skip initial white space. */ | |
77 | while ( *pek == ' ' || *pek == '\t' || *pek == '\r' ) | |
78 | ++pek; | |
79 | ||
80 | while ( *pek && (n + 1 < maxlen) && (n + 1 < sizeof(buffer)) ) | |
81 | { | |
82 | if ( *pek == '\n' ) | |
83 | break; | |
84 | ||
85 | /* Promote LF and TAB to simple space. */ | |
86 | if ( *pek == '\r' || *pek == '\t' ) | |
87 | *pek = ' '; | |
88 | ||
89 | /* Avoid duplicate white space. */ | |
90 | if ( (n > 0) && (str[n - 1] == ' ') && (*pek == ' ') ) | |
91 | { | |
92 | ++pek; | |
93 | continue; | |
94 | } | |
95 | ||
96 | str[n++] = *(pek++); | |
97 | } | |
98 | ||
99 | /* Skip trailing white space. */ | |
100 | while ( (n > 0) && (str[n - 1] == ' ') ) | |
101 | --n; | |
102 | ||
103 | /* Safe guard for empty name. */ | |
104 | if ( n == 0 ) | |
105 | strcpy(str, "Anon"); | |
106 | else | |
107 | str[n] = '\0'; | |
108 | } /* get_player_pname(char *, size_t) */ | |
109 | ||
110 | int check_pname(const char *pname, size_t maxlen) | |
111 | { | |
112 | if ( pname == NULL ) | |
113 | return 1; | |
114 | ||
115 | if ( (strlen(pname)) > maxlen ) | |
116 | return 1; | |
117 | ||
118 | return 0; | |
119 | } /* check_pname(const char *, size_t) */ | |
120 | ||
121 | void print_infos_screen (void) | |
122 | { | |
123 | nettoe_term_reset_color(); | |
124 | printf(" netToe is a Tic Tac Toe-like game for Linux and UNIX. \n"); | |
125 | printf(" It is possible to play it against the computer, another \n"); | |
126 | printf(" player on the same PC, or against another player over \n"); | |
127 | printf(" a network (Internet, and everything using TCP/IP). \n"); | |
128 | printf(" To play it over a network you must first set up a server.\n"); | |
129 | printf(" This is done in the network game options menu, selecting \n"); | |
130 | printf(" \"Host the game\". Then the (remote) second player must \n"); | |
131 | printf(" connect to the server by typing its IP address, or name. \n"); | |
132 | printf(" That should be enough for you to have some leisure. \n"); | |
133 | printf(" For a detailed guide on HOW TO PLAY, and for other info, \n"); | |
134 | printf(" do read the manual page "); | |
135 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
136 | printf("nettoe"); | |
137 | nettoe_term_reset_color(); | |
138 | printf("(6).\n\n"); | |
139 | ||
140 | printf(" netToe %s (%s)\n", PACKAGE_VERSION, PACKAGE_RELEASE_DATE); | |
141 | printf(" Copyright 2000,2001 Gabriele Giorgetti\n"); | |
142 | printf(" 2009-2014 Mats Erik Andersson\n"); | |
143 | printf(" %s\n", HOMEPAGE); | |
144 | printf("\n Press"); | |
145 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
146 | printf(" enter"); | |
147 | nettoe_term_reset_color(); | |
148 | printf(" to go back to the main menu. "); | |
149 | ||
150 | fflush (stdin); | |
151 | getchar (); | |
152 | ||
153 | nettoe_term_set_default_color(); | |
154 | } /* print_infos_screen(void) */ | |
155 | ||
156 | void parse_cmd_args(int argc, char *argv[]) | |
157 | { | |
158 | int i; | |
159 | ||
160 | /* Any address family will do. */ | |
161 | addrfamily = AF_UNSPEC; | |
162 | ||
163 | if ( argc < 2 ) | |
164 | return; | |
165 | ||
166 | for (i = 1; i <= argc - 1; i++) | |
167 | { | |
168 | if ( (!strcmp(argv[i], "-h")) || (!strcmp(argv[i], "--help")) ) | |
169 | { | |
170 | fprintf(stdout, "netToe %s the enhanced, and networked, " | |
171 | "Tic Tac Toe game.\n", PACKAGE_VERSION); | |
172 | fprintf(stdout, "\n"); | |
173 | fprintf(stdout, "Usage: nettoe [OPTIONS]\n"); | |
174 | fprintf(stdout, "\n"); | |
175 | fprintf(stdout, "-4, --ipv4 only IPv4 networking\n"); | |
176 | fprintf(stdout, "-6, --ipv6 only IPv6 networking\n"); | |
177 | fprintf(stdout, "-nb, --no-beep disable beeps\n"); | |
178 | fprintf(stdout, "-nc, --no-colors disable colors\n"); | |
179 | fprintf(stdout, "-h, --help display this help," | |
180 | " then exit\n"); | |
181 | fprintf(stdout, "-v, --version output version information," | |
182 | " then exit\n"); | |
183 | fprintf(stdout, "\n"); | |
184 | fprintf(stdout, "The netToe project can be found at: \n"); | |
185 | fprintf(stdout, " %s\n", HOMEPAGE); | |
186 | fprintf(stdout, "\n"); | |
187 | fprintf(stdout, "Please send any bug reports, or comments to:\n"); | |
188 | fprintf(stdout, " %s\n", AUTHOR2_EMAIL); | |
189 | ||
190 | exit(EXIT_SUCCESS); | |
191 | } | |
192 | else if ( (!strcmp(argv[i], "-v")) | |
193 | || (!strcmp(argv[i], "--version")) ) | |
194 | { | |
195 | fprintf(stdout, "netToe %s (%s)", | |
196 | PACKAGE_VERSION, RELEASE_DATE); | |
197 | #if USE_TERMINFO | |
198 | fprintf(stdout, " with terminfo support"); | |
199 | #elif USE_TERMCAP | |
200 | fprintf(stdout, " with termcap support"); | |
201 | #endif | |
202 | fprintf(stdout, ", at TCP port %d.", SERVER_PORT_NUMBER); | |
203 | fprintf(stdout, "\n\n"); | |
204 | fprintf(stdout, "Written by Gabriele Giorgetti %s\n", | |
205 | AUTHOR_EMAIL); | |
206 | fprintf(stdout, "Copyright 2000,2001 Gabriele Giorgetti\n"); | |
207 | fprintf(stdout, " 2009-2014 Mats Erik Andersson\n"); | |
208 | fprintf(stdout, "\n"); | |
209 | fprintf(stdout, "This software is released under GNU GPL 2.\n"); | |
210 | ||
211 | exit(EXIT_SUCCESS); | |
212 | } | |
213 | else if ( (!strcmp(argv[i], "-4")) | |
214 | || (!strcmp(argv[i], "--ipv4")) ) | |
215 | { | |
216 | addrfamily = AF_INET; | |
217 | continue; | |
218 | } | |
219 | else if ( (!strcmp(argv[i], "-6")) | |
220 | || (!strcmp(argv[i], "--ipv6")) ) | |
221 | { | |
222 | addrfamily = AF_INET6; | |
223 | continue; | |
224 | } | |
225 | else if ( (!strcmp(argv[i], "-nb")) | |
226 | || (!strcmp(argv[i], "--no-beep")) ) | |
227 | { | |
228 | NO_BEEP = 1; | |
229 | continue; | |
230 | } | |
231 | else if ( (!strcmp(argv[i], "-nc")) | |
232 | || (!strcmp(argv[i], "--no-colors")) ) | |
233 | { | |
234 | NO_COLORS = 1; | |
235 | continue; | |
236 | } else { | |
237 | fprintf(stdout, "%s: unrecognized option `%s'\n", | |
238 | argv[0], argv[i]); | |
239 | fprintf(stdout, "Try `%s --help' for more information.\n", | |
240 | argv[0]); | |
241 | ||
242 | exit (EXIT_SUCCESS); | |
243 | } | |
244 | } | |
245 | ||
246 | return; | |
247 | } /* parse_cmd_args(int, char *[]) */ | |
248 | ||
249 | /* | |
250 | * vim: sw=4 ts=4 | |
251 | */ |
0 | /* netToe Version 1.5.1 | |
1 | * | |
2 | * Copyright 2000,2001 Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
3 | * 2009-2014 Mats Erik Andersson <meand@users.sourceforge.net> | |
4 | * | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation; either version 2 of the License, or | |
9 | * (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write to the Free Software | |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | */ | |
20 | ||
21 | #ifndef _MISC_H | |
22 | # define _MISC_H 1 | |
23 | ||
24 | void parse_cmd_args(int argc, char *argv[]); | |
25 | ||
26 | void get_player_pname(char * str, size_t maxlen); | |
27 | int check_pname(const char *pname, size_t maxlen); | |
28 | ||
29 | int who_start_first(void); | |
30 | void print_infos_screen(void); | |
31 | ||
32 | #endif /* !_MISC_H */ |
0 | /* netToe Version 1.5.1 | |
1 | * | |
2 | * Copyright 2000,2001 Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
3 | * 2009-2014 Mats Erik Andersson <meand@users.sourceforge.net> | |
4 | * | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation; either version 2 of the License, or | |
9 | * (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write to the Free Software | |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | */ | |
20 | ||
21 | #ifdef HAVE_CONFIG_H | |
22 | # include <config.h> | |
23 | #endif | |
24 | ||
25 | #include <stdio.h> | |
26 | #include <string.h> | |
27 | #include <errno.h> | |
28 | #include <unistd.h> | |
29 | #include <stdlib.h> | |
30 | #include <sys/types.h> | |
31 | #include <sys/socket.h> | |
32 | #include <netinet/in.h> | |
33 | #include <arpa/inet.h> | |
34 | #include <sys/wait.h> | |
35 | #include <netdb.h> | |
36 | #include <signal.h> | |
37 | #include <time.h> | |
38 | ||
39 | #include "terminal.h" | |
40 | /* New Code for the nettoe board matrix, not used yet. | |
41 | * #include "matrices.h" | |
42 | */ | |
43 | #include "misc.h" | |
44 | #include "network.h" | |
45 | #include "game.h" | |
46 | #include "board.h" | |
47 | ||
48 | /* Has network partner reported EOF? */ | |
49 | int has_given_eof = 0; | |
50 | ||
51 | enum { | |
52 | I_AM_SERVER = 0, | |
53 | I_AM_CLIENT = 1, | |
54 | }; | |
55 | ||
56 | #define ASK_SERVER I_AM_CLIENT | |
57 | #define ASK_CLIENT I_AM_SERVER | |
58 | ||
59 | static char player1_name[MAX_PNAME_LEN]; | |
60 | static char player2_name[MAX_PNAME_LEN]; | |
61 | ||
62 | static int game_mode = 0; | |
63 | static int who_starts = 0; | |
64 | static int computer_AI = 0; | |
65 | static int winner = GAME_IS_ALIVE; | |
66 | ||
67 | static int player1_status = 0; | |
68 | static int player2_status = 0; | |
69 | static int computer_status = 0; | |
70 | ||
71 | static int sock = -1; | |
72 | ||
73 | static void main_menu (void); | |
74 | static void cpu_AI_menu (void); | |
75 | static void network_menu (void); | |
76 | ||
77 | void print_header (int type); | |
78 | static void init_one_player_game (void); | |
79 | static void init_two_player_game (void); | |
80 | static void do_one_player_game (void); | |
81 | static void do_two_player_game (void); | |
82 | static void show_game (void); | |
83 | static void show_drawed_game (void); | |
84 | static void show_waiting_for_move (const char *name); | |
85 | static void get_player1_move (void); | |
86 | static void get_player2_move (void); | |
87 | extern void get_cpu_move (int); | |
88 | ||
89 | static void server_start (void); | |
90 | static void client_start (void); | |
91 | static void init_server_network_game (void); | |
92 | static void init_client_network_game (void); | |
93 | ||
94 | static void recv_matrix (int fd); | |
95 | static void send_matrix (int fd); | |
96 | ||
97 | static void quit_game (void); | |
98 | ||
99 | /* Reset colour at interrupts SIGINT, SIGKILL, SIGTERM. | |
100 | * Use ECMA-48 character code. */ | |
101 | static void reset_color (int sig) | |
102 | { | |
103 | (void) sig; /* Unused variable, silence warning. */ | |
104 | printf ("%c[0m\n", 0x1B); | |
105 | exit (EXIT_SUCCESS); | |
106 | } | |
107 | ||
108 | int main (int argc, char *argv[]) | |
109 | { | |
110 | ||
111 | NO_BEEP = 0; /* beeps are enabled by default */ | |
112 | /* --no-beep disable beeps */ | |
113 | NO_COLORS = 0; /* colors are enabled by default */ | |
114 | /* --no-colors disable colors */ | |
115 | ||
116 | parse_cmd_args(argc, argv); | |
117 | ||
118 | /* Remove any elevated access. */ | |
119 | setegid(getgid()); | |
120 | setgid(getgid()); | |
121 | seteuid(getuid()); | |
122 | setuid(getuid()); | |
123 | ||
124 | srandom(time(0)); | |
125 | ||
126 | #if USE_TERMINFO || USE_TERMCAP | |
127 | setup_terminfo(); | |
128 | #endif | |
129 | ||
130 | /* Reset colour at normal exit. */ | |
131 | atexit(nettoe_term_set_default_color); | |
132 | /* And at abnormal exits. */ | |
133 | signal(SIGINT, reset_color); | |
134 | signal(SIGKILL, reset_color); | |
135 | signal(SIGTERM, reset_color); | |
136 | ||
137 | while (1) | |
138 | main_menu (); | |
139 | ||
140 | quit_game (); | |
141 | ||
142 | return EXIT_SUCCESS; | |
143 | } | |
144 | ||
145 | #define SINGLE_DASHED_LINE \ | |
146 | "+-----------------------------------------------------------+\n" | |
147 | #define BROKEN_DASHED_LINE \ | |
148 | "+--------------------------+--------------------------------+\n" | |
149 | #define SPACES_AND_BARS \ | |
150 | " | | | | | \n" | |
151 | #define BLOCKERS_AND_BARS \ | |
152 | " ---|---|--- | ----|----|---- \n" | |
153 | ||
154 | #define YOU_WIN \ | |
155 | "\n You win !\n" | |
156 | #define COMPUTER_WINS \ | |
157 | "\n Computer wins !\n" | |
158 | #define IS_A_DRAW \ | |
159 | "\n This is a draw !\n" | |
160 | #define COMPUTER_CONSIDERS \ | |
161 | "\n Computer is considering its move ...\n" | |
162 | #define WAITING_FOR_NAMED \ | |
163 | "\n Waiting for %s to choose whether to play again, or not ...\n" | |
164 | #define WANT_TO_PLAY \ | |
165 | "\n Do you want to play again ? [y/n]: " | |
166 | #define UNKNOWN_ANSWER \ | |
167 | " Unknown answer. I suppose you want to play again.\n" | |
168 | ||
169 | void print_header (int type) | |
170 | { | |
171 | nettoe_term_clear (); | |
172 | ||
173 | nettoe_term_reset_color(); | |
174 | printf (SINGLE_DASHED_LINE); | |
175 | printf ("|"); | |
176 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
177 | printf (" netToe %-5.5s ", PACKAGE_VERSION); | |
178 | nettoe_term_reset_color(); | |
179 | printf ("|-XOX-OXO-OOO-XXX-|"); | |
180 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
181 | printf (" The Net Tic Tac Toe Game "); | |
182 | nettoe_term_reset_color(); | |
183 | printf ("|\n"); | |
184 | ||
185 | if (type == 0) | |
186 | printf (SINGLE_DASHED_LINE); | |
187 | else | |
188 | printf (BROKEN_DASHED_LINE); | |
189 | ||
190 | nettoe_term_set_default_color(); | |
191 | } | |
192 | ||
193 | static void main_menu (void) | |
194 | { | |
195 | int selection = 0; | |
196 | char answer[20]; | |
197 | ||
198 | /* Make sure this is an interactive session. | |
199 | * Otherwise, quit silently. | |
200 | */ | |
201 | if (!isatty (STDIN_FILENO)) | |
202 | exit (EXIT_FAILURE); | |
203 | ||
204 | print_header (0); | |
205 | nettoe_term_reset_color(); | |
206 | printf ("\n [ "); | |
207 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
208 | printf ("Main Menu"); | |
209 | nettoe_term_reset_color(); | |
210 | printf (" ]\n\n"); | |
211 | ||
212 | /* Player vs CPU */ | |
213 | printf (" ("); | |
214 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
215 | printf ("1"); | |
216 | nettoe_term_reset_color(); | |
217 | printf (") Player vs "); | |
218 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
219 | printf ("C"); | |
220 | nettoe_term_reset_color(); | |
221 | printf ("PU\n"); | |
222 | ||
223 | /* Player vs Player */ | |
224 | printf (" ("); | |
225 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
226 | printf ("2"); | |
227 | nettoe_term_reset_color(); | |
228 | printf (") Player vs "); | |
229 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
230 | printf ("P"); | |
231 | nettoe_term_reset_color(); | |
232 | printf ("layer\n"); | |
233 | ||
234 | /* Two players over network */ | |
235 | printf (" ("); | |
236 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
237 | printf ("3"); | |
238 | nettoe_term_reset_color(); | |
239 | printf (") Two players over "); | |
240 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
241 | putchar ('n'); | |
242 | nettoe_term_reset_color(); | |
243 | printf ("etwork\n"); | |
244 | ||
245 | /* Info */ | |
246 | puts (""); | |
247 | printf (" ("); | |
248 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
249 | printf ("4"); | |
250 | nettoe_term_reset_color(); | |
251 | printf (") "); | |
252 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
253 | putchar ('I'); | |
254 | nettoe_term_reset_color(); | |
255 | printf ("nfo\n"); | |
256 | ||
257 | /* Quit */ | |
258 | printf (" ("); | |
259 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
260 | printf ("q"); | |
261 | nettoe_term_reset_color(); | |
262 | printf (") "); | |
263 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
264 | putchar ('Q'); | |
265 | nettoe_term_reset_color(); | |
266 | printf ("uit\n"); | |
267 | ||
268 | while ( selection == 0 ) | |
269 | { | |
270 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
271 | printf ("\n Choose an action: "); | |
272 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
273 | ||
274 | fflush (stdin); | |
275 | if (!fgets (answer, sizeof(answer), stdin)) | |
276 | exit(EXIT_FAILURE); | |
277 | ||
278 | if ( sscanf (answer, " %d", &selection) == 0 ) | |
279 | { | |
280 | char *p = answer; | |
281 | ||
282 | while (*p == ' ') | |
283 | ++p; | |
284 | switch (*p) | |
285 | { | |
286 | case 'c': | |
287 | case 'C': selection = 1; | |
288 | break; | |
289 | case 'p': | |
290 | case 'P': selection = 2; | |
291 | break; | |
292 | case 'n': | |
293 | case 'N': selection = 3; | |
294 | break; | |
295 | case 'i': | |
296 | case 'I': selection = 4; | |
297 | break; | |
298 | case 'q': | |
299 | case 'Q': selection = 5; | |
300 | break; | |
301 | default: selection = 0; | |
302 | } | |
303 | } | |
304 | ||
305 | if ( (selection < 1) || (selection > 5) ) | |
306 | { | |
307 | selection = 0; | |
308 | } | |
309 | } | |
310 | nettoe_term_set_default_color (); | |
311 | ||
312 | /* Reset scores every time a new main mode has been selected. */ | |
313 | player1_status = 0; | |
314 | player2_status = 0; | |
315 | computer_status = 0; | |
316 | has_given_eof = 0; | |
317 | ||
318 | if (selection == 1) | |
319 | { | |
320 | cpu_AI_menu (); | |
321 | ||
322 | if (computer_AI) | |
323 | init_one_player_game (); | |
324 | } | |
325 | else if (selection == 2) | |
326 | { | |
327 | init_two_player_game (); | |
328 | } | |
329 | else if (selection == 3) | |
330 | { | |
331 | network_menu (); | |
332 | } | |
333 | else if (selection == 4) | |
334 | { | |
335 | print_header (0); | |
336 | print_infos_screen (); | |
337 | } | |
338 | else if (selection == 5) | |
339 | { | |
340 | quit_game (); | |
341 | } | |
342 | else | |
343 | { | |
344 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
345 | printf ("\n Error:"); | |
346 | nettoe_term_reset_color(); | |
347 | printf (" Incorrect choice.\n"); | |
348 | nettoe_term_set_default_color (); | |
349 | quit_game (); | |
350 | } | |
351 | } | |
352 | ||
353 | static void cpu_AI_menu (void) | |
354 | { | |
355 | int selection = 0; | |
356 | char answer[20]; | |
357 | ||
358 | computer_AI = 0; /* Unset level. */ | |
359 | print_header (0); | |
360 | ||
361 | nettoe_term_reset_color(); | |
362 | printf ("\n [ "); | |
363 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
364 | printf ("Level of difficulty"); | |
365 | nettoe_term_reset_color(); | |
366 | printf (" ]\n\n"); | |
367 | ||
368 | printf (" ("); | |
369 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
370 | printf ("1"); | |
371 | nettoe_term_reset_color(); | |
372 | printf (") "); | |
373 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
374 | putchar ('W'); | |
375 | nettoe_term_reset_color(); | |
376 | printf ("eak \n"); | |
377 | ||
378 | printf (" ("); | |
379 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
380 | printf ("2"); | |
381 | nettoe_term_reset_color(); | |
382 | printf (") "); | |
383 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
384 | putchar ('N'); | |
385 | nettoe_term_reset_color(); | |
386 | printf ("ormal\n"); | |
387 | ||
388 | printf (" ("); | |
389 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
390 | printf ("3"); | |
391 | nettoe_term_reset_color(); | |
392 | printf (") "); | |
393 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
394 | putchar ('B'); | |
395 | nettoe_term_reset_color(); | |
396 | printf ("etter\n"); | |
397 | ||
398 | puts (""); | |
399 | printf (" ("); | |
400 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
401 | printf ("q"); | |
402 | nettoe_term_reset_color(); | |
403 | printf (") "); | |
404 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
405 | putchar ('R'); | |
406 | nettoe_term_reset_color(); | |
407 | printf ("eturn to "); | |
408 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
409 | putchar ('m'); | |
410 | nettoe_term_reset_color(); | |
411 | printf ("ain menu\n"); | |
412 | ||
413 | while ( selection == 0 ) | |
414 | { | |
415 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
416 | printf ("\n Choice: "); | |
417 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
418 | ||
419 | fflush (stdin); | |
420 | if (!fgets (answer, sizeof(answer), stdin)) | |
421 | exit(EXIT_FAILURE); | |
422 | ||
423 | if ( sscanf (answer, "%d", &selection) == 0 ) | |
424 | { | |
425 | char *p = answer; | |
426 | ||
427 | while (*p == ' ') | |
428 | ++p; | |
429 | switch (*p) | |
430 | { | |
431 | case 'w': | |
432 | case 'W': selection = 1; | |
433 | break; | |
434 | case 'n': | |
435 | case 'N': selection = 2; | |
436 | break; | |
437 | case 'b': | |
438 | case 'B': selection = 3; | |
439 | break; | |
440 | case 'm': | |
441 | case 'M': | |
442 | case 'q': | |
443 | case 'Q': | |
444 | case 'r': | |
445 | case 'R': selection = 4; | |
446 | break; | |
447 | default: selection = 0; | |
448 | } | |
449 | } | |
450 | ||
451 | if ( (selection < 1) || (selection > 4) ) | |
452 | { | |
453 | selection = 0; | |
454 | } | |
455 | } | |
456 | ||
457 | nettoe_term_set_default_color (); | |
458 | ||
459 | if (selection == 1) | |
460 | { | |
461 | computer_AI = 1; | |
462 | } | |
463 | else if (selection == 2) | |
464 | { | |
465 | computer_AI = 2; | |
466 | } | |
467 | else if (selection == 3) | |
468 | { | |
469 | computer_AI = 3; | |
470 | } | |
471 | /* Return to main menu, leaving level unset. */ | |
472 | } | |
473 | ||
474 | static void network_menu (void) | |
475 | { | |
476 | int selection = 0; | |
477 | char answer[MAX_PNAME_LEN]; | |
478 | ||
479 | print_header (0); | |
480 | nettoe_term_reset_color(); | |
481 | printf ("\n [ "); | |
482 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
483 | printf ("Network game options"); | |
484 | nettoe_term_reset_color(); | |
485 | printf (" ]\n\n"); | |
486 | ||
487 | printf (" ("); | |
488 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
489 | printf ("1"); | |
490 | nettoe_term_reset_color(); | |
491 | printf (") "); | |
492 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
493 | putchar ('H'); | |
494 | nettoe_term_reset_color(); | |
495 | printf ("ost the game\n"); | |
496 | ||
497 | printf (" ("); | |
498 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
499 | printf ("2"); | |
500 | nettoe_term_reset_color(); | |
501 | printf (") "); | |
502 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
503 | putchar ('C'); | |
504 | nettoe_term_reset_color(); | |
505 | printf ("onnect to host\n"); | |
506 | ||
507 | puts (""); | |
508 | printf (" ("); | |
509 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
510 | printf ("q"); | |
511 | nettoe_term_reset_color(); | |
512 | printf (") "); | |
513 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
514 | putchar ('B'); | |
515 | nettoe_term_reset_color(); | |
516 | printf ("ack to "); | |
517 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
518 | putchar ('m'); | |
519 | nettoe_term_reset_color(); | |
520 | printf ("ain menu\n"); | |
521 | ||
522 | while ( selection == 0 ) | |
523 | { | |
524 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
525 | printf ("\n Choose an action: "); | |
526 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
527 | ||
528 | fflush (stdin); | |
529 | if (!fgets (answer, sizeof(answer), stdin)) | |
530 | exit(EXIT_FAILURE); | |
531 | ||
532 | if ( sscanf (answer, "%d", &selection) == 0 ) | |
533 | { | |
534 | char *p = answer; | |
535 | ||
536 | while (*p == ' ') | |
537 | ++p; | |
538 | switch (*p) | |
539 | { | |
540 | case 'h': | |
541 | case 'H': selection = 1; | |
542 | break; | |
543 | case 'c': | |
544 | case 'C': selection = 2; | |
545 | break; | |
546 | case 'b': | |
547 | case 'B': | |
548 | case 'm': | |
549 | case 'M': | |
550 | case 'q': | |
551 | case 'Q': selection = 3; | |
552 | break; | |
553 | default: selection = 0; | |
554 | } | |
555 | } | |
556 | ||
557 | if ( (selection < 1) || (selection > 3) ) | |
558 | { | |
559 | selection = 0; | |
560 | } | |
561 | } | |
562 | ||
563 | nettoe_term_reset_color (); | |
564 | ||
565 | if (selection == 1) | |
566 | { | |
567 | signal(SIGPIPE, SIG_IGN); | |
568 | server_start (); | |
569 | } | |
570 | else if (selection == 2) | |
571 | { | |
572 | signal(SIGPIPE, SIG_IGN); | |
573 | client_start (); | |
574 | } | |
575 | ||
576 | /* Third choice returns to main menu. */ | |
577 | ||
578 | if ( has_given_eof ) | |
579 | { | |
580 | printf("\n\n Your opponent has resigned the game by cutting connections !\n"); | |
581 | printf (" (A carrage return continues. )\b\b\b"); | |
582 | fflush (stdin); | |
583 | getchar(); | |
584 | return; | |
585 | } | |
586 | } | |
587 | ||
588 | static void init_one_player_game (void) | |
589 | { | |
590 | who_starts = who_start_first (); | |
591 | ||
592 | nettoe_term_reset_color(); | |
593 | printf ("\n Please state your name: "); | |
594 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
595 | get_player_pname(player1_name, MAX_PNAME_LEN); | |
596 | ||
597 | nettoe_term_set_default_color (); | |
598 | ||
599 | while ((check_pname(player1_name, MAX_PNAME_LEN)) != 0) | |
600 | { | |
601 | printf (" Error: name cannot be more than %d chars long.\n", | |
602 | MAX_PNAME_LEN); | |
603 | printf ("\n Please state your name: "); | |
604 | get_player_pname(player1_name, MAX_PNAME_LEN); | |
605 | } | |
606 | ||
607 | nettoe_term_reset_color(); | |
608 | printf ("\n Who will start first ? "); | |
609 | sleep ( 1 ); | |
610 | ||
611 | if (who_starts == 1) | |
612 | printf ("You will begin ! "); | |
613 | else | |
614 | printf ("Computer will begin ! "); | |
615 | ||
616 | nettoe_term_set_default_color (); | |
617 | fflush (stdout); | |
618 | sleep ( 3 ); | |
619 | ||
620 | do_one_player_game (); | |
621 | } | |
622 | ||
623 | static void init_two_player_game (void) | |
624 | { | |
625 | who_starts = who_start_first (); | |
626 | ||
627 | nettoe_term_reset_color(); | |
628 | printf ("\n Player 1, please type your name: "); | |
629 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
630 | get_player_pname(player1_name, MAX_PNAME_LEN); | |
631 | nettoe_term_reset_color (); | |
632 | ||
633 | while ((check_pname(player1_name, MAX_PNAME_LEN)) != 0) | |
634 | { | |
635 | printf (" Error: name cannot be more than %d chars long.\n", | |
636 | MAX_PNAME_LEN); | |
637 | printf ("\n Player 1, please type your name: "); | |
638 | get_player_pname(player1_name, MAX_PNAME_LEN); | |
639 | } | |
640 | ||
641 | printf ("\n Player 2, please type your name: "); | |
642 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
643 | get_player_pname(player2_name, MAX_PNAME_LEN); | |
644 | nettoe_term_reset_color (); | |
645 | ||
646 | while ((check_pname(player2_name, MAX_PNAME_LEN)) != 0) | |
647 | { | |
648 | printf (" Error: name cannot be more than %d chars long.\n", | |
649 | MAX_PNAME_LEN); | |
650 | printf ("\n Player 2, please type your name: "); | |
651 | get_player_pname(player2_name, MAX_PNAME_LEN); | |
652 | } | |
653 | ||
654 | nettoe_term_reset_color(); | |
655 | printf ("\n Who will start first ? "); | |
656 | sleep ( 1 ); | |
657 | ||
658 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
659 | printf ("%s", (who_starts == 1) ? player1_name : player2_name); | |
660 | nettoe_term_reset_color(); | |
661 | printf (" will begin ! "); | |
662 | nettoe_term_set_default_color (); | |
663 | fflush (stdout); | |
664 | sleep ( 3 ); | |
665 | ||
666 | do_two_player_game (); | |
667 | } | |
668 | ||
669 | static void do_one_player_game (void) | |
670 | { | |
671 | char y_n[12]; | |
672 | winner = GAME_IS_ALIVE; | |
673 | game_mode = 1; | |
674 | init_matrix (); | |
675 | ||
676 | do | |
677 | { | |
678 | if (who_starts == 1) | |
679 | { | |
680 | show_game (); | |
681 | get_player1_move (); | |
682 | } | |
683 | else | |
684 | { | |
685 | printf (COMPUTER_CONSIDERS); | |
686 | get_cpu_move (computer_AI); | |
687 | } | |
688 | ||
689 | winner = game_check (); | |
690 | if ( winner != GAME_IS_ALIVE ) | |
691 | break; | |
692 | ||
693 | if (who_starts == 1) | |
694 | { | |
695 | printf (COMPUTER_CONSIDERS); | |
696 | get_cpu_move (computer_AI); | |
697 | } | |
698 | else | |
699 | { | |
700 | show_game (); | |
701 | get_player1_move (); | |
702 | } | |
703 | ||
704 | winner = game_check (); | |
705 | if ( winner != GAME_IS_ALIVE) | |
706 | break; | |
707 | } | |
708 | while (winner == GAME_IS_ALIVE); | |
709 | ||
710 | /* Switch roles of players for next round. | |
711 | * An easy arithmetic trick. | |
712 | */ | |
713 | who_starts = (1 + 2) - who_starts; | |
714 | ||
715 | if (winner == GAME_IS_X_WIN) | |
716 | { | |
717 | player1_status++; | |
718 | show_game (); | |
719 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
720 | printf (YOU_WIN); | |
721 | } | |
722 | else if (winner == GAME_IS_O_WIN) | |
723 | { | |
724 | computer_status++; | |
725 | show_game (); | |
726 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
727 | printf (COMPUTER_WINS); | |
728 | } | |
729 | else /* Draw */ | |
730 | show_drawed_game (); | |
731 | ||
732 | nettoe_term_set_default_color (); | |
733 | nettoe_term_reset_color(); | |
734 | printf (WANT_TO_PLAY); | |
735 | if (scanf ("%11s", y_n) != 1) | |
736 | y_n[0] = 'n', y_n[1] = '\0'; | |
737 | getchar(); | |
738 | nettoe_term_set_default_color (); | |
739 | ||
740 | if ( *y_n == 'y' || *y_n == 'Y' ) | |
741 | do_one_player_game (); | |
742 | else if ( *y_n == 'n' || *y_n == 'N' ) | |
743 | return; | |
744 | else | |
745 | { | |
746 | nettoe_term_reset_color(); | |
747 | printf (UNKNOWN_ANSWER); | |
748 | nettoe_term_set_default_color (); | |
749 | sleep ( 2 ); | |
750 | do_one_player_game (); | |
751 | } | |
752 | } | |
753 | ||
754 | static void do_two_player_game (void) | |
755 | { | |
756 | char y_n[12]; | |
757 | winner = GAME_IS_ALIVE; | |
758 | game_mode = 2; | |
759 | init_matrix (); | |
760 | ||
761 | do | |
762 | { | |
763 | show_game (); | |
764 | ||
765 | if (who_starts == 1) | |
766 | get_player1_move (); | |
767 | else | |
768 | get_player2_move (); | |
769 | ||
770 | winner = game_check (); | |
771 | if ( winner != GAME_IS_ALIVE ) | |
772 | break; | |
773 | ||
774 | show_game (); | |
775 | ||
776 | if (who_starts == 1) | |
777 | get_player2_move (); | |
778 | else | |
779 | get_player1_move (); | |
780 | ||
781 | winner = game_check (); | |
782 | if ( winner != GAME_IS_ALIVE ) | |
783 | break; | |
784 | } | |
785 | while (winner == GAME_IS_ALIVE); | |
786 | ||
787 | /* Switch roles of players for next round. | |
788 | * An easy arithmetic trick. | |
789 | */ | |
790 | who_starts = (1 + 2) - who_starts; | |
791 | ||
792 | if (winner == GAME_IS_X_WIN || winner == GAME_IS_O_WIN) | |
793 | { | |
794 | if (winner == GAME_IS_X_WIN) | |
795 | player1_status++; | |
796 | else | |
797 | player2_status++; | |
798 | ||
799 | show_game (); | |
800 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
801 | ||
802 | printf ("\n %s", (winner == GAME_IS_X_WIN) ? player1_name | |
803 | : player2_name); | |
804 | nettoe_term_reset_color(); | |
805 | printf (" wins !\n"); | |
806 | } | |
807 | else /* Draw */ | |
808 | show_drawed_game (); | |
809 | ||
810 | printf (WANT_TO_PLAY); | |
811 | if (scanf ("%11s", y_n) != 1) | |
812 | y_n[0] = 'n', y_n[1] = '\0'; | |
813 | getchar(); | |
814 | ||
815 | if ( *y_n == 'y' || *y_n == 'Y' ) | |
816 | do_two_player_game (); | |
817 | else if ( *y_n == 'n' || *y_n == 'N' ) | |
818 | return; | |
819 | else | |
820 | { | |
821 | printf (UNKNOWN_ANSWER); | |
822 | sleep ( 2 ); | |
823 | do_two_player_game (); | |
824 | } | |
825 | } | |
826 | ||
827 | static void show_board_section (char p1, char p2, char p3, | |
828 | char *n1, char *n2, char *n3) | |
829 | { | |
830 | printf (" %c | %c | %c |", p1, p2, p3); | |
831 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
832 | printf (" %.2s", n1); | |
833 | nettoe_term_reset_color(); | |
834 | printf (" |"); | |
835 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
836 | printf (" %.2s", n2); | |
837 | nettoe_term_reset_color(); | |
838 | printf (" |"); | |
839 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
840 | printf (" %.2s \n", n3); | |
841 | nettoe_term_reset_color(); | |
842 | } | |
843 | ||
844 | static void show_game (void) | |
845 | { | |
846 | print_header (1); | |
847 | ||
848 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
849 | printf (" Current game"); | |
850 | nettoe_term_reset_color(); | |
851 | printf (" | "); | |
852 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
853 | printf ("Coordinate matrix\n"); | |
854 | nettoe_term_reset_color(); | |
855 | ||
856 | printf (SPACES_AND_BARS); | |
857 | show_board_section (c11, c12, c13, "a1", "a2", "a3"); | |
858 | printf (BLOCKERS_AND_BARS); | |
859 | show_board_section (c21, c22, c23, "b1", "b2", "b3"); | |
860 | printf (BLOCKERS_AND_BARS); | |
861 | show_board_section (c31, c32, c33, "c1", "c2", "c3"); | |
862 | printf (SPACES_AND_BARS); | |
863 | nettoe_term_set_default_color(); | |
864 | ||
865 | nettoe_term_reset_color(); | |
866 | printf (BROKEN_DASHED_LINE); | |
867 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
868 | printf (" Score:"); | |
869 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
870 | printf (" %s", player1_name); | |
871 | nettoe_term_reset_color(); | |
872 | printf (" %d,", player1_status); | |
873 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
874 | printf (" %s", (game_mode <= 1) ? "Computer" : player2_name); | |
875 | nettoe_term_reset_color(); | |
876 | printf (" %d.\n", (game_mode <= 1) ? computer_status : player2_status); | |
877 | printf (SINGLE_DASHED_LINE); | |
878 | nettoe_term_set_default_color(); | |
879 | } | |
880 | ||
881 | static void show_drawed_game () | |
882 | { | |
883 | show_game (); | |
884 | printf (IS_A_DRAW); | |
885 | } | |
886 | ||
887 | static void show_waiting_for_move (const char *name) | |
888 | { | |
889 | show_game (); | |
890 | printf("\n Waiting for "); | |
891 | nettoe_term_set_color(COLOR_BLUE, ATTRIB_BRIGHT); | |
892 | printf("%s", name); | |
893 | nettoe_term_reset_color(); | |
894 | printf(" to move ... "); | |
895 | fflush(stdout); | |
896 | } | |
897 | ||
898 | static void get_player_move (const char *name, char pawn) | |
899 | { | |
900 | char move[4]; | |
901 | ||
902 | nettoe_beep (); | |
903 | ||
904 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
905 | printf("\n %s", name); | |
906 | nettoe_term_reset_color(); | |
907 | printf(", playing %c, it is your turn: ", pawn); | |
908 | ||
909 | while (1) | |
910 | { | |
911 | if (scanf ("%3s", move) != 1) | |
912 | move[0] = '\0'; | |
913 | ||
914 | if (attempt_move (move, pawn) == VALID_MOVE) | |
915 | break; | |
916 | ||
917 | fflush(stdin); | |
918 | printf(" Invalid move. Try again: "); | |
919 | } /* while(1) */ | |
920 | } | |
921 | ||
922 | static void get_player1_move (void) | |
923 | { | |
924 | get_player_move (player1_name, 'X'); | |
925 | } | |
926 | ||
927 | static void get_player2_move (void) | |
928 | { | |
929 | get_player_move (player2_name, 'O'); | |
930 | } | |
931 | ||
932 | static void server_start (void) | |
933 | { | |
934 | char local_ip_address[INET6_ADDRSTRLEN]; | |
935 | char peer_ip_address[INET6_ADDRSTRLEN]; | |
936 | ||
937 | print_header (0); | |
938 | ||
939 | nettoe_term_reset_color(); | |
940 | printf ("\n [ "); | |
941 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
942 | printf ("Host the game"); | |
943 | nettoe_term_reset_color(); | |
944 | printf (" ]\n\n"); | |
945 | ||
946 | printf (" Player name: "); | |
947 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
948 | get_player_pname(player1_name, MAX_PNAME_LEN); | |
949 | nettoe_term_reset_color(); | |
950 | local_ip_address[0] = '\0'; | |
951 | give_local_IP (local_ip_address, sizeof(local_ip_address)); | |
952 | ||
953 | printf ("\n You should now tell your IP address to any interested\n"); | |
954 | printf (" competitor. There might be more than one address, but\n"); | |
955 | printf (" \"%s\" should do.\n", local_ip_address); | |
956 | printf ("\n Connected players:\n"); | |
957 | printf (" ------------------\n"); | |
958 | printf (" -"); | |
959 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
960 | printf (" %s", player1_name); | |
961 | nettoe_term_reset_color(); | |
962 | printf (" ("); | |
963 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
964 | printf ("you"); | |
965 | nettoe_term_reset_color(); | |
966 | printf (")\n"); | |
967 | ||
968 | sock = establish_listening_socket (SERVER_PORT_NUMBER, peer_ip_address, | |
969 | sizeof(peer_ip_address)); | |
970 | ||
971 | if (sock < 0) | |
972 | { | |
973 | printf (" (A carrage return continues. )\b\b\b"); | |
974 | fflush (stdin); | |
975 | getchar(); | |
976 | return; | |
977 | } | |
978 | ||
979 | write_to_socket (sock, player1_name, sizeof(player1_name)); | |
980 | ||
981 | sleep ( 2 ); | |
982 | ||
983 | read_from_socket (sock, player2_name, sizeof(player2_name)); | |
984 | nettoe_term_reset_color(); | |
985 | printf (" -"); | |
986 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
987 | printf (" %s", player2_name); | |
988 | nettoe_term_reset_color(); | |
989 | printf (" ("); | |
990 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
991 | printf ("your opponent"); | |
992 | nettoe_term_reset_color(); | |
993 | printf (")\n"); | |
994 | ||
995 | printf ("\n Two players are present. Let us play !\n"); | |
996 | sleep ( 3 ); | |
997 | ||
998 | printf ("\n Who will start first ? "); | |
999 | ||
1000 | who_starts = who_start_first (); | |
1001 | ||
1002 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
1003 | ||
1004 | if (who_starts == 1) | |
1005 | { | |
1006 | printf ("%s", player1_name); | |
1007 | write_to_socket (sock, player1_name, sizeof(player1_name)); | |
1008 | } | |
1009 | else | |
1010 | { | |
1011 | printf ("%s", player2_name); | |
1012 | write_to_socket (sock, player2_name, sizeof(player2_name)); | |
1013 | } | |
1014 | ||
1015 | nettoe_term_reset_color(); | |
1016 | printf (" will begin !\n"); | |
1017 | printf ("\n Starting game ... "); | |
1018 | fflush (stdout); | |
1019 | ||
1020 | nettoe_term_set_default_color (); | |
1021 | ||
1022 | sleep ( 2 ); | |
1023 | ||
1024 | if ( ! has_given_eof ) | |
1025 | init_server_network_game (); | |
1026 | ||
1027 | return; | |
1028 | } | |
1029 | ||
1030 | static void client_start (void) | |
1031 | { | |
1032 | char buf[MAXDATASIZE]; | |
1033 | char host_ip_number[INET6_ADDRSTRLEN + 1]; | |
1034 | ||
1035 | print_header (0); | |
1036 | ||
1037 | nettoe_term_reset_color(); | |
1038 | printf ("\n [ "); | |
1039 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
1040 | printf ("Connect to host"); | |
1041 | nettoe_term_reset_color(); | |
1042 | printf (" ]\n\n"); | |
1043 | printf (" Player name: "); | |
1044 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
1045 | get_player_pname(player2_name, MAX_PNAME_LEN); | |
1046 | nettoe_term_reset_color(); | |
1047 | printf ("\n Host to connect to (IP or hostname): "); | |
1048 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
1049 | if (scanf (" %46s", host_ip_number) != 1) | |
1050 | host_ip_number[0] = '\0'; | |
1051 | nettoe_term_reset_color(); | |
1052 | printf ("\n Connecting ... "); | |
1053 | ||
1054 | sock = connect_to_socket (host_ip_number, SERVER_PORT_NUMBER); | |
1055 | ||
1056 | if (sock < 0) | |
1057 | { | |
1058 | printf (" (A carrage return continues. )\b\b\b"); | |
1059 | fflush (stdin); | |
1060 | getchar(); | |
1061 | return; | |
1062 | } | |
1063 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
1064 | printf ("connected !\n\n"); | |
1065 | nettoe_term_reset_color(); | |
1066 | printf (" The players are:\n\n"); | |
1067 | read_from_socket (sock, player1_name, sizeof(player1_name)); | |
1068 | ||
1069 | printf (" -"); | |
1070 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
1071 | printf (" %s", player1_name); | |
1072 | nettoe_term_reset_color(); | |
1073 | printf (" ("); | |
1074 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
1075 | printf ("your opponent"); | |
1076 | nettoe_term_reset_color(); | |
1077 | printf (")\n"); | |
1078 | ||
1079 | printf (" -"); | |
1080 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
1081 | printf (" %s", player2_name); | |
1082 | nettoe_term_reset_color(); | |
1083 | printf (" ("); | |
1084 | nettoe_term_set_color (COLOR_RED, ATTRIB_BRIGHT); | |
1085 | printf ("you"); | |
1086 | nettoe_term_reset_color(); | |
1087 | printf (")\n"); | |
1088 | ||
1089 | write_to_socket (sock, player2_name, sizeof(player2_name)); | |
1090 | ||
1091 | printf ("\n Two players are present. Let us play !\n"); | |
1092 | sleep ( 3 ); | |
1093 | ||
1094 | printf ("\n Who will start first ? "); | |
1095 | ||
1096 | if ( ! has_given_eof ) | |
1097 | { | |
1098 | read_from_socket (sock, buf, MAX_PNAME_LEN); | |
1099 | ||
1100 | if ( has_given_eof ) | |
1101 | return; | |
1102 | ||
1103 | nettoe_term_set_color (COLOR_BLUE, ATTRIB_BRIGHT); | |
1104 | printf ("%s", buf); | |
1105 | nettoe_term_reset_color(); | |
1106 | printf (" will begin !\n"); | |
1107 | printf ("\n Starting game ... "); | |
1108 | fflush (stdout); | |
1109 | nettoe_term_set_default_color (); | |
1110 | sleep ( 3 ); | |
1111 | ||
1112 | init_client_network_game (); | |
1113 | } | |
1114 | } | |
1115 | ||
1116 | static void recv_remote_play (int sd, int dir, const char *name) | |
1117 | { | |
1118 | char buf[MAXDATASIZE]; | |
1119 | ||
1120 | show_waiting_for_move (name); | |
1121 | ||
1122 | buf[0] = 'n'; | |
1123 | while ( strncmp (buf, "y", 2) && ! has_given_eof ) | |
1124 | read_from_socket (sd, buf, 2); | |
1125 | ||
1126 | recv_matrix (sd); | |
1127 | ||
1128 | buf[0] = 'n'; | |
1129 | while ( strncmp (buf, (dir == ASK_SERVER) ? "S" : "C", 2) | |
1130 | && ! has_given_eof ) | |
1131 | read_from_socket (sd, buf, 2); | |
1132 | } | |
1133 | ||
1134 | static void send_local_play (int sd, int dir) | |
1135 | { | |
1136 | show_game (); | |
1137 | if (dir == I_AM_SERVER) | |
1138 | get_player1_move (); | |
1139 | else | |
1140 | get_player2_move (); | |
1141 | write_to_socket (sd, "y", 2); | |
1142 | send_matrix (sd); | |
1143 | write_to_socket (sd, (dir == I_AM_SERVER) ? "S" : "C", 2); | |
1144 | } | |
1145 | ||
1146 | static void init_server_network_game (void) | |
1147 | { | |
1148 | char y_n[12]; | |
1149 | char yes_no[2]; | |
1150 | char buf[MAXDATASIZE]; | |
1151 | ||
1152 | /* Player 1 is local player. */ | |
1153 | ||
1154 | game_mode = 3; | |
1155 | ||
1156 | init_matrix (); | |
1157 | ||
1158 | write_to_socket (sock, (who_starts == 1) ? "1" : "2", 1); | |
1159 | ||
1160 | do | |
1161 | { | |
1162 | if (who_starts == 1) | |
1163 | send_local_play (sock, I_AM_SERVER); | |
1164 | else | |
1165 | { | |
1166 | recv_remote_play (sock, ASK_CLIENT, player2_name); | |
1167 | ||
1168 | if ( has_given_eof ) | |
1169 | break; | |
1170 | } | |
1171 | ||
1172 | winner = game_check (); | |
1173 | if ( winner != GAME_IS_ALIVE ) | |
1174 | break; | |
1175 | ||
1176 | if (who_starts == 1) | |
1177 | { | |
1178 | recv_remote_play (sock, ASK_CLIENT, player2_name); | |
1179 | ||
1180 | if ( has_given_eof ) | |
1181 | break; | |
1182 | } | |
1183 | else | |
1184 | send_local_play (sock, I_AM_SERVER); | |
1185 | ||
1186 | winner = game_check (); | |
1187 | if ( winner != GAME_IS_ALIVE ) | |
1188 | break; | |
1189 | } | |
1190 | while (winner == GAME_IS_ALIVE && ! has_given_eof); | |
1191 | ||
1192 | /* Switch roles of players for next round. | |
1193 | * An easy arithmetic trick. | |
1194 | */ | |
1195 | who_starts = (1 + 2) - who_starts; | |
1196 | ||
1197 | if (winner == GAME_IS_X_WIN) | |
1198 | { | |
1199 | player1_status++; | |
1200 | show_game (); | |
1201 | printf (YOU_WIN); | |
1202 | } | |
1203 | else if (winner == GAME_IS_O_WIN) | |
1204 | { | |
1205 | player2_status++; | |
1206 | show_game (); | |
1207 | nettoe_term_set_color(COLOR_BLUE, ATTRIB_BRIGHT); | |
1208 | printf("\n %s", player2_name); | |
1209 | nettoe_term_reset_color(); | |
1210 | printf (" wins !\n"); | |
1211 | } | |
1212 | else if (winner == GAME_IS_DRAW) /* Draw */ | |
1213 | show_drawed_game (); | |
1214 | else /* EOF */ | |
1215 | return; | |
1216 | ||
1217 | winner = GAME_IS_ALIVE; | |
1218 | ||
1219 | nettoe_beep(); | |
1220 | printf (WANT_TO_PLAY); | |
1221 | if (scanf ("%11s", y_n) != 1) | |
1222 | y_n[0] = 'n', y_n[1] = '\0'; | |
1223 | getchar(); | |
1224 | ||
1225 | if ( *y_n == 'n' || *y_n == 'N' ) | |
1226 | { | |
1227 | write_to_socket (sock, "y", 2); | |
1228 | write_to_socket (sock, "n", 2); | |
1229 | sleep ( 3 ); | |
1230 | close (sock); | |
1231 | } | |
1232 | else | |
1233 | { | |
1234 | if ( *y_n != 'y' && *y_n != 'Y' ) | |
1235 | { | |
1236 | printf (UNKNOWN_ANSWER); | |
1237 | sleep ( 2 ); | |
1238 | } | |
1239 | write_to_socket (sock, "y", 2); | |
1240 | write_to_socket (sock, "y", 2); | |
1241 | printf (WAITING_FOR_NAMED, player2_name); | |
1242 | ||
1243 | buf[0] = 'n'; | |
1244 | while ( strncmp (buf, "y", 2) && ! has_given_eof ) | |
1245 | read_from_socket (sock, buf, 2); | |
1246 | ||
1247 | read_from_socket (sock, yes_no, 2); | |
1248 | ||
1249 | if (!has_given_eof | |
1250 | && (!strncmp (yes_no, "y", 2) || !strncmp (yes_no, "Y", 2))) | |
1251 | { | |
1252 | printf ("\n %s wants to play again.\n", player2_name); | |
1253 | printf (" Starting ... "); | |
1254 | fflush (stdout); | |
1255 | sleep ( 4 ); | |
1256 | init_server_network_game (); | |
1257 | } | |
1258 | } | |
1259 | } | |
1260 | ||
1261 | static void init_client_network_game (void) | |
1262 | { | |
1263 | char y_n[12]; | |
1264 | char yes_no[2]; | |
1265 | char buf[MAXDATASIZE]; | |
1266 | ||
1267 | /* Player 2 is local player. */ | |
1268 | ||
1269 | game_mode = 3; | |
1270 | init_matrix (); | |
1271 | ||
1272 | read_from_socket (sock, buf, 1); | |
1273 | ||
1274 | who_starts = strncmp (buf, "1", 1) ? 2 : 1; | |
1275 | ||
1276 | do | |
1277 | { | |
1278 | /* Player 2 is local player. */ | |
1279 | if (who_starts == 1) | |
1280 | { | |
1281 | recv_remote_play (sock, ASK_SERVER, player1_name); | |
1282 | ||
1283 | if ( has_given_eof ) | |
1284 | break; | |
1285 | } | |
1286 | else | |
1287 | send_local_play (sock, I_AM_CLIENT); | |
1288 | ||
1289 | winner = game_check (); | |
1290 | if ( winner != GAME_IS_ALIVE ) | |
1291 | break; | |
1292 | ||
1293 | if (who_starts == 1) | |
1294 | send_local_play (sock, I_AM_CLIENT); | |
1295 | else | |
1296 | { | |
1297 | recv_remote_play (sock, ASK_SERVER, player1_name); | |
1298 | ||
1299 | if ( has_given_eof ) | |
1300 | break; | |
1301 | } | |
1302 | ||
1303 | winner = game_check (); | |
1304 | if ( winner != GAME_IS_ALIVE ) | |
1305 | break; | |
1306 | } | |
1307 | while (winner == GAME_IS_ALIVE && ! has_given_eof); | |
1308 | ||
1309 | /* Switch roles of players for next round. | |
1310 | * An easy arithmetic trick. | |
1311 | */ | |
1312 | who_starts = (1 + 2) - who_starts; | |
1313 | ||
1314 | if (winner == GAME_IS_X_WIN) | |
1315 | { | |
1316 | player1_status++; | |
1317 | show_game (); | |
1318 | nettoe_term_set_color(COLOR_BLUE, ATTRIB_BRIGHT); | |
1319 | printf("\n %s", player1_name); | |
1320 | nettoe_term_reset_color(); | |
1321 | printf (" wins !\n"); | |
1322 | } | |
1323 | else if (winner == GAME_IS_O_WIN) | |
1324 | { | |
1325 | player2_status++; | |
1326 | show_game (); | |
1327 | printf (YOU_WIN); | |
1328 | } | |
1329 | else if (winner == GAME_IS_DRAW) /* Draw */ | |
1330 | show_drawed_game (); | |
1331 | else /* EOF */ | |
1332 | return; | |
1333 | ||
1334 | winner = GAME_IS_ALIVE; | |
1335 | printf (WAITING_FOR_NAMED, player1_name); | |
1336 | ||
1337 | buf[0] = 'n'; | |
1338 | while ( strncmp (buf, "y", 2) && ! has_given_eof ) | |
1339 | read_from_socket (sock, buf, 2); | |
1340 | ||
1341 | read_from_socket (sock, yes_no, 2); | |
1342 | ||
1343 | if (has_given_eof) | |
1344 | return; | |
1345 | ||
1346 | if (!strncmp (yes_no, "y", 2) || !strncmp (yes_no, "Y", 2)) | |
1347 | { | |
1348 | printf ("\n %s wants to play again. What about you ?\n", player1_name); | |
1349 | nettoe_beep(); | |
1350 | printf (WANT_TO_PLAY); | |
1351 | if (scanf ("%11s", y_n) != 1) | |
1352 | y_n[0] = 'n', y_n[1] = '\0'; | |
1353 | getchar(); | |
1354 | ||
1355 | if ( *y_n == 'n' || *y_n == 'N' ) | |
1356 | { | |
1357 | write_to_socket (sock, "y", 2); | |
1358 | write_to_socket (sock, "n", 2); | |
1359 | printf ("Ending session ...\n"); | |
1360 | close (sock); | |
1361 | } | |
1362 | else | |
1363 | { | |
1364 | if ( *y_n != 'y' && *y_n != 'Y' ) | |
1365 | { | |
1366 | printf (UNKNOWN_ANSWER); | |
1367 | sleep ( 2 ); | |
1368 | } | |
1369 | write_to_socket (sock, "y", 2); | |
1370 | write_to_socket (sock, "y", 2); | |
1371 | printf (" Starting ... "); | |
1372 | fflush (stdout); | |
1373 | sleep ( 4 ); | |
1374 | init_client_network_game (); | |
1375 | } | |
1376 | } | |
1377 | else | |
1378 | { | |
1379 | printf ("\n %s doesn't want to play again. Sorry.\n", player1_name); | |
1380 | sleep ( 3 ); | |
1381 | close (sock); | |
1382 | return; | |
1383 | } | |
1384 | } | |
1385 | ||
1386 | static void send_matrix (int fd ) | |
1387 | { | |
1388 | write_to_socket (fd, &c11, 1); | |
1389 | write_to_socket (fd, &c12, 1); | |
1390 | write_to_socket (fd, &c13, 1); | |
1391 | write_to_socket (fd, &c21, 1); | |
1392 | write_to_socket (fd, &c22, 1); | |
1393 | write_to_socket (fd, &c23, 1); | |
1394 | write_to_socket (fd, &c31, 1); | |
1395 | write_to_socket (fd, &c32, 1); | |
1396 | write_to_socket (fd, &c33, 1); | |
1397 | } | |
1398 | ||
1399 | static void recv_matrix ( int fd ) | |
1400 | { | |
1401 | read_from_socket (fd, &c11, 1); | |
1402 | read_from_socket (fd, &c12, 1); | |
1403 | read_from_socket (fd, &c13, 1); | |
1404 | read_from_socket (fd, &c21, 1); | |
1405 | read_from_socket (fd, &c22, 1); | |
1406 | read_from_socket (fd, &c23, 1); | |
1407 | read_from_socket (fd, &c31, 1); | |
1408 | read_from_socket (fd, &c32, 1); | |
1409 | read_from_socket (fd, &c33, 1); | |
1410 | } | |
1411 | ||
1412 | static void quit_game (void) | |
1413 | { | |
1414 | nettoe_term_reset_color(); | |
1415 | ||
1416 | printf("\n Goodbye !\n\n"); | |
1417 | ||
1418 | printf("netToe Copyright 2000,2001 Gabriele Giorgetti\n"); | |
1419 | printf(" Copyright 2009-2014 Mats Erik Andersson\n"); | |
1420 | printf("netToe project homepage: %s\n\n", HOMEPAGE); | |
1421 | ||
1422 | close (sock); | |
1423 | ||
1424 | exit (EXIT_SUCCESS); | |
1425 | } |
0 | /* netToe Version 1.5.1 | |
1 | * | |
2 | * Copyright 2000,2001 Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
3 | * 2009-2014 Mats Erik Andersson <meand@users.sourceforge.net> | |
4 | * | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation; either version 2 of the License, or | |
9 | * (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write to the Free Software | |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | */ | |
20 | ||
21 | #ifdef HAVE_CONFIG_H | |
22 | # include <config.h> | |
23 | #endif | |
24 | ||
25 | #include <stdio.h> | |
26 | #include <string.h> | |
27 | #include <errno.h> | |
28 | #include <unistd.h> | |
29 | #include <stdlib.h> | |
30 | #include <sys/types.h> | |
31 | #include <sys/socket.h> | |
32 | #include <netinet/in.h> | |
33 | #include <arpa/inet.h> | |
34 | #include <sys/wait.h> | |
35 | #include <netdb.h> | |
36 | ||
37 | #include "network.h" | |
38 | ||
39 | /* Has network partner reported EOF? */ | |
40 | extern int has_given_eof; | |
41 | ||
42 | /* Choice of INET address family. */ | |
43 | extern int addrfamily; | |
44 | ||
45 | ||
46 | int establish_listening_socket(unsigned short port_number, char *peer_ip_address, int len) | |
47 | { | |
48 | int sockfd, new_fd; | |
49 | int reuse = 1; | |
50 | socklen_t sin_size; | |
51 | int BACKLOG = 2; | |
52 | struct sockaddr_storage their_addr; | |
53 | struct addrinfo hints, *ai, *aiptr; | |
54 | char portstr[10]; | |
55 | int status; | |
56 | ||
57 | memset(&hints, 0, sizeof(hints)); | |
58 | hints.ai_family = addrfamily; | |
59 | hints.ai_socktype = SOCK_STREAM; | |
60 | hints.ai_flags = AI_PASSIVE; | |
61 | #ifdef AI_ADDRCONFIG | |
62 | hints.ai_flags |= AI_ADDRCONFIG; | |
63 | #endif | |
64 | ||
65 | sprintf(portstr, "%u", port_number); | |
66 | ||
67 | if ( (status = getaddrinfo(NULL, portstr, &hints, &aiptr)) != 0 ) { | |
68 | perror("getaddrinfo"); | |
69 | fprintf(stderr, "Address failure. Quitting...\n\n"); | |
70 | return -1; | |
71 | } | |
72 | ||
73 | /* Prefer IPv6 over IPv4. */ | |
74 | ai = aiptr; | |
75 | while (ai->ai_next && (ai->ai_family == AF_INET)) | |
76 | ai = ai->ai_next; | |
77 | ||
78 | if ( (sockfd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)) | |
79 | == -1 ) | |
80 | { | |
81 | perror("socket"); | |
82 | fprintf(stderr, "Peer error: (socket). Quitting...\n\n"); | |
83 | exit(EXIT_FAILURE); | |
84 | } | |
85 | ||
86 | /* avoid "Address already in use" errors when restarting */ | |
87 | if ( setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, | |
88 | (void *) &reuse, sizeof (reuse)) == -1 ) | |
89 | { | |
90 | perror("SO_REUSEADDR"); | |
91 | fprintf(stderr, "Peer error: (SO_REUSEADDR). Quitting...\n\n"); | |
92 | exit(EXIT_FAILURE); | |
93 | } | |
94 | ||
95 | /* | |
96 | * When an unspecified family was asked for, and an IPv6 | |
97 | * result address resulted, the attempt a dual stacked | |
98 | * listening socket. Otherwise a lock down to a single | |
99 | * address family is sought. | |
100 | */ | |
101 | if (addrfamily == AF_UNSPEC && ai->ai_family == AF_INET6) | |
102 | { | |
103 | int data = 0; | |
104 | setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, | |
105 | &data, sizeof(data)); | |
106 | } | |
107 | else if (ai->ai_family == AF_INET6) | |
108 | { | |
109 | int data = 1; | |
110 | setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, | |
111 | &data, sizeof(data)); | |
112 | } | |
113 | ||
114 | if ( bind(sockfd, ai->ai_addr, ai->ai_addrlen) == -1) | |
115 | { | |
116 | printf("\n Network error: Address is in use,"); | |
117 | printf("or permission was insufficient.\n\n"); | |
118 | close(sockfd); | |
119 | return -1; | |
120 | } | |
121 | ||
122 | freeaddrinfo(aiptr); | |
123 | ||
124 | if ( listen(sockfd, BACKLOG) == -1 ) | |
125 | { | |
126 | perror("listen"); | |
127 | fprintf(stderr, "Peer error: (bind: address already in use or " | |
128 | "permission is denied).\nQuitting...\n\n"); | |
129 | close(sockfd); | |
130 | return -1; | |
131 | } | |
132 | ||
133 | sin_size = sizeof(their_addr); | |
134 | ||
135 | if ( (new_fd = accept(sockfd, (struct sockaddr *) &their_addr, | |
136 | &sin_size)) == -1) | |
137 | { | |
138 | perror("accept"); | |
139 | fprintf(stderr, "Peer error: (accept). continuing:\n\n"); | |
140 | } | |
141 | ||
142 | close(sockfd); | |
143 | ||
144 | memset(peer_ip_address, 0, len); | |
145 | ||
146 | getnameinfo((struct sockaddr *) &their_addr, sin_size, | |
147 | peer_ip_address, len, | |
148 | NULL, 0, NI_NUMERICHOST); | |
149 | ||
150 | return new_fd; | |
151 | } /* establish_listening_socket(unsigned short, char *, int) */ | |
152 | ||
153 | ||
154 | int connect_to_socket(char *host_ip_number, unsigned short port_number) | |
155 | { | |
156 | int sockfd = -1, status; | |
157 | char portstr[20]; | |
158 | struct addrinfo hints, *ai, *aiptr; | |
159 | ||
160 | //printf("\n Calling %s.\n\n", host_ip_number); | |
161 | ||
162 | memset(&hints, 0, sizeof(hints)); | |
163 | hints.ai_family = addrfamily; | |
164 | hints.ai_socktype = SOCK_STREAM; | |
165 | #ifdef AI_ADDRCONFIG | |
166 | hints.ai_flags = AI_ADDRCONFIG; | |
167 | #endif | |
168 | ||
169 | sprintf(portstr, "%u", port_number); | |
170 | ||
171 | if ( (status = getaddrinfo(host_ip_number, portstr, &hints, &ai)) ) | |
172 | { | |
173 | /* Failed host lookup. */ | |
174 | printf("failed\n\n"); | |
175 | printf(" Incorrect IP address, or failing host name.\n"); | |
176 | printf(" Try again with a usable destination!\n\n"); | |
177 | return -1; | |
178 | } | |
179 | ||
180 | for ( aiptr = ai; aiptr; aiptr = aiptr->ai_next) | |
181 | { | |
182 | if ((sockfd = socket (aiptr->ai_family, SOCK_STREAM, 0)) == -1) | |
183 | continue; | |
184 | ||
185 | if ( connect(sockfd, aiptr->ai_addr, aiptr->ai_addrlen) == 0 ) | |
186 | break; | |
187 | ||
188 | close(sockfd); | |
189 | sockfd = -1; | |
190 | } /* for "aiptr" */ | |
191 | ||
192 | freeaddrinfo(ai); | |
193 | ||
194 | if ( aiptr == NULL ) | |
195 | { | |
196 | printf("failed\n\n"); | |
197 | printf(" No game found at: %s\n\n", host_ip_number); | |
198 | printf(" Try again if the host was typed correctly.\n"); | |
199 | printf(" Maybe the host is not ready yet.\n\n"); | |
200 | return -1; | |
201 | } | |
202 | ||
203 | return sockfd; | |
204 | } /* connect_to_socket(char *, unsigned short) */ | |
205 | ||
206 | ||
207 | int read_from_socket(int connected_socket, char *buffer, int bytes) | |
208 | { | |
209 | int bytescount; | |
210 | int bytesread; | |
211 | ||
212 | bytescount = 0; | |
213 | bytesread = 0; | |
214 | ||
215 | while (bytescount < bytes) | |
216 | { | |
217 | if ( (bytesread = read(connected_socket, buffer, bytes-bytescount)) | |
218 | > 0 ) | |
219 | { | |
220 | bytescount += bytesread; | |
221 | buffer += bytesread; | |
222 | continue; | |
223 | } | |
224 | else if (bytesread < 0) | |
225 | return -1; | |
226 | ||
227 | /* EOF from other end. */ | |
228 | has_given_eof = 1; | |
229 | break; | |
230 | } | |
231 | ||
232 | return bytescount; | |
233 | } /* read_from_socket( int, char *, int) */ | |
234 | ||
235 | ||
236 | int write_to_socket(int connected_socket, char *buffer, int bytes) | |
237 | { | |
238 | int bytescount; | |
239 | int byteswritten; | |
240 | ||
241 | bytescount = 0; | |
242 | byteswritten = 0; | |
243 | ||
244 | while (bytescount < bytes) | |
245 | { | |
246 | if ( (byteswritten = write(connected_socket, buffer, | |
247 | bytes - bytescount)) | |
248 | > 0) | |
249 | { | |
250 | bytescount += byteswritten; | |
251 | buffer += byteswritten; | |
252 | } | |
253 | else if ( (byteswritten == 0) && (errno == EPIPE) ) | |
254 | { | |
255 | has_given_eof = 1; | |
256 | break; | |
257 | } | |
258 | else if (byteswritten < 0) | |
259 | return -1; | |
260 | } | |
261 | ||
262 | return bytescount; | |
263 | } /* write_to_socket(int, char *, int) */ | |
264 | ||
265 | ||
266 | void give_local_IP(char *local_ip_address, int len) | |
267 | { | |
268 | char hostname[100]; | |
269 | struct addrinfo hints, *ai; | |
270 | int status; | |
271 | ||
272 | gethostname(hostname, sizeof(hostname)); | |
273 | ||
274 | local_ip_address[0] = '\0'; | |
275 | ||
276 | memset(&hints, 0, sizeof(hints)); | |
277 | hints.ai_family = addrfamily; | |
278 | hints.ai_socktype = SOCK_STREAM; | |
279 | #ifdef AI_ADDRCONFIG | |
280 | hints.ai_flags = AI_ADDRCONFIG; | |
281 | #endif | |
282 | ||
283 | if ( (status = getaddrinfo(hostname, NULL, &hints, &ai)) ) { | |
284 | printf("Address lookup failed: %s\n", gai_strerror(status)); | |
285 | } else { | |
286 | getnameinfo(ai->ai_addr, ai->ai_addrlen, | |
287 | local_ip_address, len, | |
288 | NULL, 0, NI_NUMERICHOST); | |
289 | } | |
290 | } /* give_local_IP(char *) */ | |
291 | ||
292 | ||
293 | /* NOT USED */ | |
294 | /* ================================== | |
295 | const char *give_local_hostname( void ) | |
296 | { | |
297 | char hostname[100]; | |
298 | struct hostent *h; | |
299 | ||
300 | gethostname ( hostname, 100); | |
301 | ||
302 | if ((h=gethostbyname(hostname)) == NULL) { | |
303 | herror("gethostbyname"); | |
304 | } | |
305 | strcpy(hostname, h->h_name ); | |
306 | return ( hostname ); | |
307 | } | |
308 | */ |
0 | /* netToe Version 1.5.1 | |
1 | * | |
2 | * Copyright 2000,2001 Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
3 | * 2009-2014 Mats Erik Andersson <meand@users.sourceforge.net> | |
4 | * | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation; either version 2 of the License, or | |
9 | * (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write to the Free Software | |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | */ | |
20 | ||
21 | #ifndef _NETWORK_H | |
22 | # define _NETWORK_H 1 | |
23 | ||
24 | extern int establish_listening_socket ( unsigned short port_number, char *peer_ip_address, int bytes); | |
25 | extern int connect_to_socket ( char *host_ip_number, unsigned short port_number ); | |
26 | extern int write_to_socket ( int connected_socket, char *buffer, int bytes ); | |
27 | extern int read_from_socket ( int connected_socket, char *buffer, int bytes ); | |
28 | ||
29 | extern void give_local_IP ( char * local_ip_address, int bytes ); | |
30 | ||
31 | /* extern const char *give_local_hostname ( void ); */ /* NOT USED */ | |
32 | ||
33 | #endif /* _NETWORK_H */ |
0 | /* netToe Version 1.5.1 | |
1 | * | |
2 | * Copyright 2000,2001 Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
3 | * 2009-2014 Mats Erik Andersson <meand@users.sourceforge.net> | |
4 | * | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation; either version 2 of the License, or | |
9 | * (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write to the Free Software | |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | */ | |
20 | ||
21 | #ifdef HAVE_CONFIG_H | |
22 | # include <config.h> | |
23 | #endif | |
24 | ||
25 | #include <stdio.h> | |
26 | #include <stdlib.h> | |
27 | ||
28 | #if defined USE_TERMINFO || defined USE_TERMCAP | |
29 | # if (defined HAVE_NCURSES_H || defined HAVE_NCURSES_NCURSES_H) \ | |
30 | && (defined USE_TINFO || defined USE_NCURSES) | |
31 | # if defined HAVE_NCURSES_NCURSES_H | |
32 | # include <ncurses/ncurses.h> | |
33 | # else | |
34 | # include <ncurses.h> | |
35 | # endif | |
36 | # endif /* NCURSES */ | |
37 | # if defined HAVE_CURSES_H && defined USE_CURSES | |
38 | # include <curses.h> | |
39 | # endif /* CURSES */ | |
40 | # if defined HAVE_NCURSES_TERM_H && USE_NCURSES | |
41 | # include <ncurses/term.h> | |
42 | # elif defined HAVE_TERM_H && !USE_TERMCAP | |
43 | # include <term.h> | |
44 | # elif defined HAVE_TERMCAP_H && USE_TERMCAP | |
45 | # include <termcap.h> | |
46 | # endif /* TERM || TERMCAP */ | |
47 | ||
48 | # if !HAVE_PUTP | |
49 | # define putp(x) tputs((x), 1, putchar) | |
50 | # endif | |
51 | #endif /* Terminal capabilities. */ | |
52 | ||
53 | #include "terminal.h" | |
54 | #include "game.h" | |
55 | ||
56 | #if defined USE_TERMINFO || defined USE_TERMCAP | |
57 | static char *clear_str = NULL; | |
58 | static char *bell_str = NULL; | |
59 | static char *bold_str = NULL; | |
60 | static char *rmso_str = NULL; | |
61 | static char *smso_str = NULL; | |
62 | static char *sgr0_str = NULL; | |
63 | static char *setab_str = NULL; | |
64 | static char *setaf_str = NULL; | |
65 | ||
66 | static int using_terminfo = 0; | |
67 | ||
68 | void setup_terminfo (void) | |
69 | { | |
70 | # if HAVE_SETUPTERM | |
71 | int err; | |
72 | ||
73 | /* Error can be ignored, since we fall back | |
74 | * to ECMA/ANSI character sequences. Catching | |
75 | * errors in ERR is needed to avoid error output. */ | |
76 | if (setupterm(NULL, fileno(stdout), &err) == OK) | |
77 | using_terminfo = 1; | |
78 | # elif HAVE_TGETENT | |
79 | static char buf[1024]; | |
80 | char *p = buf, *sp; | |
81 | ||
82 | if ((sp = getenv("TERM")) == NULL) | |
83 | sp = "vt100"; /* Hoping for the best. */ | |
84 | ||
85 | /* Error can be ignored, since we fall back | |
86 | * to ECMA/ANSI character sequences. */ | |
87 | if (tgetent(buf, sp) == 1) | |
88 | using_terminfo = 1; | |
89 | # endif /* !HAVE_SETUPTERM && HAVE_TGETENT */ | |
90 | ||
91 | # if USE_TERMINFO | |
92 | if (using_terminfo) | |
93 | { | |
94 | clear_str = tigetstr("clear"); | |
95 | bell_str = tigetstr("bel"); | |
96 | bold_str = tigetstr("bold"); | |
97 | rmso_str = tigetstr("rmso"); | |
98 | smso_str = tigetstr("smso"); | |
99 | sgr0_str = tigetstr("sgr0"); | |
100 | setab_str = tigetstr("setab"); | |
101 | setaf_str = tigetstr("setaf"); | |
102 | } | |
103 | # elif USE_TERMCAP | |
104 | if (using_terminfo) | |
105 | { | |
106 | clear_str = tgetstr("cl", &p); | |
107 | bell_str = tgetstr("bl", &p); | |
108 | bold_str = tgetstr("md", &p); | |
109 | rmso_str = tgetstr("se", &p); | |
110 | smso_str = tgetstr("so", &p); | |
111 | sgr0_str = tgetstr("me", &p); | |
112 | setab_str = tgetstr("AB", &p); | |
113 | setaf_str = tgetstr("AF", &p); | |
114 | } | |
115 | # endif /* USE_TERMCAP */ | |
116 | } | |
117 | #endif /* Terminal capabilities. */ | |
118 | ||
119 | ||
120 | void nettoe_term_clear (void) | |
121 | { | |
122 | #if USE_TERMINFO || USE_TERMCAP | |
123 | if (clear_str) | |
124 | putp(clear_str); | |
125 | else | |
126 | #endif | |
127 | { | |
128 | if (system("clear 2>/dev/null")) | |
129 | fprintf(stderr, "Terminal access failed.\n"); | |
130 | } | |
131 | } | |
132 | ||
133 | ||
134 | /* same as nettoe_term_reset_color ( void ) */ | |
135 | void nettoe_term_set_default_color (void) | |
136 | { | |
137 | if (NO_COLORS == 1) | |
138 | return; | |
139 | ||
140 | #if USE_TERMINFO || USE_TERMCAP | |
141 | if (setaf_str) | |
142 | { | |
143 | /* Based on ECMA-48. */ | |
144 | # if USE_TERMINFO | |
145 | putp(tparm(setaf_str, COLOR_DEFAULT)); | |
146 | ||
147 | if (setab_str) | |
148 | putp(tparm(setab_str, COLOR_DEFAULT)); | |
149 | # else /* USE_TERMCAP */ | |
150 | printf(setaf_str, COLOR_DEFAULT); | |
151 | ||
152 | if (setab_str) | |
153 | printf(setab_str, COLOR_DEFAULT); | |
154 | # endif /* USE_TERMCAP */ | |
155 | ||
156 | return; | |
157 | } | |
158 | #endif /* USE_TERMINFO || USE_TERMCAP */ | |
159 | /* nettoe_term_set_color (COLOR_WHITE, ATTRIB_RESET); */ | |
160 | ||
161 | return; | |
162 | } | |
163 | ||
164 | ||
165 | void nettoe_term_reset_color ( void ) | |
166 | { | |
167 | if (NO_COLORS == 1) | |
168 | return; | |
169 | ||
170 | #if USE_TERMINFO || USE_TERMCAP | |
171 | if (sgr0_str) | |
172 | putp(sgr0_str); | |
173 | else if (rmso_str) | |
174 | putp(rmso_str); | |
175 | else | |
176 | #endif /* USE_TERMINFO || USE_TERMCAP */ | |
177 | printf("%c[0m", 0x1B); | |
178 | ||
179 | return; | |
180 | } | |
181 | ||
182 | ||
183 | void nettoe_term_set_color (int fg, int attrib) | |
184 | { | |
185 | char cmd_str[13]; | |
186 | ||
187 | if (NO_COLORS == 1 ) | |
188 | return; | |
189 | ||
190 | if ( fg != COLOR_WHITE) | |
191 | { | |
192 | /* cmd_str is the control command to the terminal */ | |
193 | sprintf(cmd_str, "%c[%d;%dm", 0x1B, attrib, fg + 30); | |
194 | } | |
195 | else | |
196 | { | |
197 | /* Text colour COLOR_WHITE is left for the terminal to decide. */ | |
198 | sprintf(cmd_str, "%c[%dm", 0x1B, attrib); | |
199 | } | |
200 | ||
201 | #if USE_TERMINFO || USE_TERMCAP | |
202 | if (setaf_str && (fg != COLOR_WHITE)) | |
203 | { | |
204 | if (bold_str) | |
205 | putp(bold_str); | |
206 | # if USE_TERMINFO | |
207 | putp(tparm(setaf_str, fg)); | |
208 | # else /* USE_TERMCAP */ | |
209 | printf(setaf_str, fg); | |
210 | # endif /* USE_TERMCAP */ | |
211 | } | |
212 | else | |
213 | #endif /* USE_TERMINFO || USE_TERMCAP */ | |
214 | printf("%s", cmd_str); | |
215 | ||
216 | return; | |
217 | } | |
218 | ||
219 | void nettoe_beep (void) | |
220 | { | |
221 | if ( NO_BEEP == 1 ) | |
222 | return; | |
223 | ||
224 | #if USE_TERMINFO || USE_TERMCAP | |
225 | if (bell_str) | |
226 | putp(bell_str); | |
227 | else | |
228 | #endif /* USE_TERMINFO || USE_TERMCAP */ | |
229 | printf("\a"); | |
230 | } /* beep(void) */ |
0 | /* netToe Version 1.5.1 | |
1 | * | |
2 | * Copyright 2000,2001 Gabriele Giorgetti <ggdev@users.sourceforge.net> | |
3 | * 2011-2014 Mats Erik Andersson <meand@users.sourceforge.net> | |
4 | * | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation; either version 2 of the License, or | |
9 | * (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write to the Free Software | |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | */ | |
20 | ||
21 | #ifndef _TERMINAL_H | |
22 | # define _TERMINAL_H 1 | |
23 | ||
24 | #ifdef HAVE_CONFIG_H | |
25 | # include <config.h> | |
26 | #endif | |
27 | ||
28 | #ifndef COLOR_BLACK | |
29 | enum { | |
30 | COLOR_BLACK, COLOR_RED, COLOR_GREEN, | |
31 | COLOR_YELLOW, COLOR_BLUE, COLOR_MAGENTA, | |
32 | COLOR_CYAN, COLOR_WHITE, COLOR_DEFAULT = 9 | |
33 | }; | |
34 | #endif /* ECMA-48 colour definitions. */ | |
35 | ||
36 | #ifndef COLOR_DEFAULT | |
37 | # define COLOR_DEFAULT 9 | |
38 | #endif | |
39 | ||
40 | enum { | |
41 | ATTRIB_RESET = 0, ATTRIB_BRIGHT, ATTRIB_DIM, ATTRIB_UNDERLINE = 4, | |
42 | ATTRIB_BLINK, ATTRIB_REVERSE = 7, ATTRIB_HIDDEN | |
43 | }; | |
44 | ||
45 | #if defined USE_TERMINFO || defined USE_TERMCAP | |
46 | void setup_terminfo(void); | |
47 | #endif | |
48 | ||
49 | void nettoe_term_clear (void); | |
50 | void nettoe_term_set_color (int fg, int attrib); | |
51 | void nettoe_term_set_default_color (void); | |
52 | void nettoe_term_reset_color (void); | |
53 | ||
54 | void nettoe_beep(void); | |
55 | ||
56 | #endif /* !_TERMINAL_H */ |
0 | # Makefile.am file for nettoe | |
1 | # Maintained by Mats Erik Andersson <meand@users.sourceforge.net> | |
2 | ||
3 | # This file is processed by automake. | |
4 | ||
5 | check_PROGRAMS = terminfo | |
6 | ||
7 | terminfo_SOURCES = terminfo.c | |
8 | ||
9 | terminfo_LDADD = $(NETTOE_LDADD) | |
10 | ||
11 | TESTS = $(check_PROGRAMS) |
0 | # Makefile.in generated by automake 1.11.6 from Makefile.am. | |
1 | # @configure_input@ | |
2 | ||
3 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | |
4 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software | |
5 | # Foundation, Inc. | |
6 | # This Makefile.in is free software; the Free Software Foundation | |
7 | # gives unlimited permission to copy and/or distribute it, | |
8 | # with or without modifications, as long as this notice is preserved. | |
9 | ||
10 | # This program is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
13 | # PARTICULAR PURPOSE. | |
14 | ||
15 | @SET_MAKE@ | |
16 | ||
17 | # Makefile.am file for nettoe | |
18 | # Maintained by Mats Erik Andersson <meand@users.sourceforge.net> | |
19 | ||
20 | # This file is processed by automake. | |
21 | VPATH = @srcdir@ | |
22 | am__make_dryrun = \ | |
23 | { \ | |
24 | am__dry=no; \ | |
25 | case $$MAKEFLAGS in \ | |
26 | *\\[\ \ ]*) \ | |
27 | echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | |
28 | | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ | |
29 | *) \ | |
30 | for am__flg in $$MAKEFLAGS; do \ | |
31 | case $$am__flg in \ | |
32 | *=*|--*) ;; \ | |
33 | *n*) am__dry=yes; break;; \ | |
34 | esac; \ | |
35 | done;; \ | |
36 | esac; \ | |
37 | test $$am__dry = yes; \ | |
38 | } | |
39 | pkgdatadir = $(datadir)/@PACKAGE@ | |
40 | pkgincludedir = $(includedir)/@PACKAGE@ | |
41 | pkglibdir = $(libdir)/@PACKAGE@ | |
42 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | |
43 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | |
44 | install_sh_DATA = $(install_sh) -c -m 644 | |
45 | install_sh_PROGRAM = $(install_sh) -c | |
46 | install_sh_SCRIPT = $(install_sh) -c | |
47 | INSTALL_HEADER = $(INSTALL_DATA) | |
48 | transform = $(program_transform_name) | |
49 | NORMAL_INSTALL = : | |
50 | PRE_INSTALL = : | |
51 | POST_INSTALL = : | |
52 | NORMAL_UNINSTALL = : | |
53 | PRE_UNINSTALL = : | |
54 | POST_UNINSTALL = : | |
55 | build_triplet = @build@ | |
56 | host_triplet = @host@ | |
57 | check_PROGRAMS = terminfo$(EXEEXT) | |
58 | subdir = test | |
59 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | |
60 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
61 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac | |
62 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | |
63 | $(ACLOCAL_M4) | |
64 | mkinstalldirs = $(install_sh) -d | |
65 | CONFIG_HEADER = $(top_builddir)/config.h | |
66 | CONFIG_CLEAN_FILES = | |
67 | CONFIG_CLEAN_VPATH_FILES = | |
68 | am_terminfo_OBJECTS = terminfo.$(OBJEXT) | |
69 | terminfo_OBJECTS = $(am_terminfo_OBJECTS) | |
70 | am__DEPENDENCIES_1 = | |
71 | terminfo_DEPENDENCIES = $(am__DEPENDENCIES_1) | |
72 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) | |
73 | depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp | |
74 | am__depfiles_maybe = depfiles | |
75 | am__mv = mv -f | |
76 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | |
77 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | |
78 | CCLD = $(CC) | |
79 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ | |
80 | SOURCES = $(terminfo_SOURCES) | |
81 | DIST_SOURCES = $(terminfo_SOURCES) | |
82 | am__can_run_installinfo = \ | |
83 | case $$AM_UPDATE_INFO_DIR in \ | |
84 | n|no|NO) false;; \ | |
85 | *) (install-info --version) >/dev/null 2>&1;; \ | |
86 | esac | |
87 | ETAGS = etags | |
88 | CTAGS = ctags | |
89 | am__tty_colors = \ | |
90 | red=; grn=; lgn=; blu=; std= | |
91 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | |
92 | ACLOCAL = @ACLOCAL@ | |
93 | AMTAR = @AMTAR@ | |
94 | AUTOCONF = @AUTOCONF@ | |
95 | AUTOHEADER = @AUTOHEADER@ | |
96 | AUTOMAKE = @AUTOMAKE@ | |
97 | AWK = @AWK@ | |
98 | CC = @CC@ | |
99 | CCDEPMODE = @CCDEPMODE@ | |
100 | CFLAGS = @CFLAGS@ | |
101 | CPP = @CPP@ | |
102 | CPPFLAGS = @CPPFLAGS@ | |
103 | CYGPATH_W = @CYGPATH_W@ | |
104 | DEFS = @DEFS@ | |
105 | DEPDIR = @DEPDIR@ | |
106 | ECHO_C = @ECHO_C@ | |
107 | ECHO_N = @ECHO_N@ | |
108 | ECHO_T = @ECHO_T@ | |
109 | EGREP = @EGREP@ | |
110 | EXEEXT = @EXEEXT@ | |
111 | GREP = @GREP@ | |
112 | INSTALL = @INSTALL@ | |
113 | INSTALL_DATA = @INSTALL_DATA@ | |
114 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
115 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | |
116 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | |
117 | LDFLAGS = @LDFLAGS@ | |
118 | LIBCURSES = @LIBCURSES@ | |
119 | LIBNCURSES = @LIBNCURSES@ | |
120 | LIBOBJS = @LIBOBJS@ | |
121 | LIBS = @LIBS@ | |
122 | LIBTERMCAP = @LIBTERMCAP@ | |
123 | LIBTINFO = @LIBTINFO@ | |
124 | LTLIBOBJS = @LTLIBOBJS@ | |
125 | MAKEINFO = @MAKEINFO@ | |
126 | MKDIR_P = @MKDIR_P@ | |
127 | NETTOE_LDADD = @NETTOE_LDADD@ | |
128 | NETTOE_PORT = @NETTOE_PORT@ | |
129 | OBJEXT = @OBJEXT@ | |
130 | PACKAGE = @PACKAGE@ | |
131 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | |
132 | PACKAGE_NAME = @PACKAGE_NAME@ | |
133 | PACKAGE_STRING = @PACKAGE_STRING@ | |
134 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | |
135 | PACKAGE_URL = @PACKAGE_URL@ | |
136 | PACKAGE_VERSION = @PACKAGE_VERSION@ | |
137 | PATH_SEPARATOR = @PATH_SEPARATOR@ | |
138 | SED = @SED@ | |
139 | SET_MAKE = @SET_MAKE@ | |
140 | SHELL = @SHELL@ | |
141 | STRIP = @STRIP@ | |
142 | VERSION = @VERSION@ | |
143 | abs_builddir = @abs_builddir@ | |
144 | abs_srcdir = @abs_srcdir@ | |
145 | abs_top_builddir = @abs_top_builddir@ | |
146 | abs_top_srcdir = @abs_top_srcdir@ | |
147 | ac_ct_CC = @ac_ct_CC@ | |
148 | am__include = @am__include@ | |
149 | am__leading_dot = @am__leading_dot@ | |
150 | am__quote = @am__quote@ | |
151 | am__tar = @am__tar@ | |
152 | am__untar = @am__untar@ | |
153 | applicationsdir = @applicationsdir@ | |
154 | bindir = @bindir@ | |
155 | build = @build@ | |
156 | build_alias = @build_alias@ | |
157 | build_cpu = @build_cpu@ | |
158 | build_os = @build_os@ | |
159 | build_vendor = @build_vendor@ | |
160 | builddir = @builddir@ | |
161 | datadir = @datadir@ | |
162 | datarootdir = @datarootdir@ | |
163 | docdir = @docdir@ | |
164 | dvidir = @dvidir@ | |
165 | exec_prefix = @exec_prefix@ | |
166 | host = @host@ | |
167 | host_alias = @host_alias@ | |
168 | host_cpu = @host_cpu@ | |
169 | host_os = @host_os@ | |
170 | host_vendor = @host_vendor@ | |
171 | htmldir = @htmldir@ | |
172 | iconsdir = @iconsdir@ | |
173 | includedir = @includedir@ | |
174 | infodir = @infodir@ | |
175 | install_sh = @install_sh@ | |
176 | libdir = @libdir@ | |
177 | libexecdir = @libexecdir@ | |
178 | localedir = @localedir@ | |
179 | localstatedir = @localstatedir@ | |
180 | mandir = @mandir@ | |
181 | menudir = @menudir@ | |
182 | mkdir_p = @mkdir_p@ | |
183 | oldincludedir = @oldincludedir@ | |
184 | pdfdir = @pdfdir@ | |
185 | pixmapsdir = @pixmapsdir@ | |
186 | prefix = @prefix@ | |
187 | program_transform_name = @program_transform_name@ | |
188 | psdir = @psdir@ | |
189 | sbindir = @sbindir@ | |
190 | sharedstatedir = @sharedstatedir@ | |
191 | srcdir = @srcdir@ | |
192 | sysconfdir = @sysconfdir@ | |
193 | target_alias = @target_alias@ | |
194 | top_build_prefix = @top_build_prefix@ | |
195 | top_builddir = @top_builddir@ | |
196 | top_srcdir = @top_srcdir@ | |
197 | terminfo_SOURCES = terminfo.c | |
198 | terminfo_LDADD = $(NETTOE_LDADD) | |
199 | TESTS = $(check_PROGRAMS) | |
200 | all: all-am | |
201 | ||
202 | .SUFFIXES: | |
203 | .SUFFIXES: .c .o .obj | |
204 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | |
205 | @for dep in $?; do \ | |
206 | case '$(am__configure_deps)' in \ | |
207 | *$$dep*) \ | |
208 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | |
209 | && { if test -f $@; then exit 0; else break; fi; }; \ | |
210 | exit 1;; \ | |
211 | esac; \ | |
212 | done; \ | |
213 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ | |
214 | $(am__cd) $(top_srcdir) && \ | |
215 | $(AUTOMAKE) --gnu test/Makefile | |
216 | .PRECIOUS: Makefile | |
217 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |
218 | @case '$?' in \ | |
219 | *config.status*) \ | |
220 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | |
221 | *) \ | |
222 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | |
223 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | |
224 | esac; | |
225 | ||
226 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | |
227 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | |
228 | ||
229 | $(top_srcdir)/configure: $(am__configure_deps) | |
230 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | |
231 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | |
232 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | |
233 | $(am__aclocal_m4_deps): | |
234 | ||
235 | clean-checkPROGRAMS: | |
236 | -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) | |
237 | terminfo$(EXEEXT): $(terminfo_OBJECTS) $(terminfo_DEPENDENCIES) $(EXTRA_terminfo_DEPENDENCIES) | |
238 | @rm -f terminfo$(EXEEXT) | |
239 | $(LINK) $(terminfo_OBJECTS) $(terminfo_LDADD) $(LIBS) | |
240 | ||
241 | mostlyclean-compile: | |
242 | -rm -f *.$(OBJEXT) | |
243 | ||
244 | distclean-compile: | |
245 | -rm -f *.tab.c | |
246 | ||
247 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terminfo.Po@am__quote@ | |
248 | ||
249 | .c.o: | |
250 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | |
251 | @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
252 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | |
253 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
254 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | |
255 | ||
256 | .c.obj: | |
257 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | |
258 | @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
259 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | |
260 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
261 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | |
262 | ||
263 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | |
264 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | |
265 | unique=`for i in $$list; do \ | |
266 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | |
267 | done | \ | |
268 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | |
269 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | |
270 | mkid -fID $$unique | |
271 | tags: TAGS | |
272 | ||
273 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | |
274 | $(TAGS_FILES) $(LISP) | |
275 | set x; \ | |
276 | here=`pwd`; \ | |
277 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | |
278 | unique=`for i in $$list; do \ | |
279 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | |
280 | done | \ | |
281 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | |
282 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | |
283 | shift; \ | |
284 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | |
285 | test -n "$$unique" || unique=$$empty_fix; \ | |
286 | if test $$# -gt 0; then \ | |
287 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | |
288 | "$$@" $$unique; \ | |
289 | else \ | |
290 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | |
291 | $$unique; \ | |
292 | fi; \ | |
293 | fi | |
294 | ctags: CTAGS | |
295 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | |
296 | $(TAGS_FILES) $(LISP) | |
297 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | |
298 | unique=`for i in $$list; do \ | |
299 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | |
300 | done | \ | |
301 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | |
302 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | |
303 | test -z "$(CTAGS_ARGS)$$unique" \ | |
304 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | |
305 | $$unique | |
306 | ||
307 | GTAGS: | |
308 | here=`$(am__cd) $(top_builddir) && pwd` \ | |
309 | && $(am__cd) $(top_srcdir) \ | |
310 | && gtags -i $(GTAGS_ARGS) "$$here" | |
311 | ||
312 | distclean-tags: | |
313 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | |
314 | ||
315 | check-TESTS: $(TESTS) | |
316 | @failed=0; all=0; xfail=0; xpass=0; skip=0; \ | |
317 | srcdir=$(srcdir); export srcdir; \ | |
318 | list=' $(TESTS) '; \ | |
319 | $(am__tty_colors); \ | |
320 | if test -n "$$list"; then \ | |
321 | for tst in $$list; do \ | |
322 | if test -f ./$$tst; then dir=./; \ | |
323 | elif test -f $$tst; then dir=; \ | |
324 | else dir="$(srcdir)/"; fi; \ | |
325 | if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ | |
326 | all=`expr $$all + 1`; \ | |
327 | case " $(XFAIL_TESTS) " in \ | |
328 | *[\ \ ]$$tst[\ \ ]*) \ | |
329 | xpass=`expr $$xpass + 1`; \ | |
330 | failed=`expr $$failed + 1`; \ | |
331 | col=$$red; res=XPASS; \ | |
332 | ;; \ | |
333 | *) \ | |
334 | col=$$grn; res=PASS; \ | |
335 | ;; \ | |
336 | esac; \ | |
337 | elif test $$? -ne 77; then \ | |
338 | all=`expr $$all + 1`; \ | |
339 | case " $(XFAIL_TESTS) " in \ | |
340 | *[\ \ ]$$tst[\ \ ]*) \ | |
341 | xfail=`expr $$xfail + 1`; \ | |
342 | col=$$lgn; res=XFAIL; \ | |
343 | ;; \ | |
344 | *) \ | |
345 | failed=`expr $$failed + 1`; \ | |
346 | col=$$red; res=FAIL; \ | |
347 | ;; \ | |
348 | esac; \ | |
349 | else \ | |
350 | skip=`expr $$skip + 1`; \ | |
351 | col=$$blu; res=SKIP; \ | |
352 | fi; \ | |
353 | echo "$${col}$$res$${std}: $$tst"; \ | |
354 | done; \ | |
355 | if test "$$all" -eq 1; then \ | |
356 | tests="test"; \ | |
357 | All=""; \ | |
358 | else \ | |
359 | tests="tests"; \ | |
360 | All="All "; \ | |
361 | fi; \ | |
362 | if test "$$failed" -eq 0; then \ | |
363 | if test "$$xfail" -eq 0; then \ | |
364 | banner="$$All$$all $$tests passed"; \ | |
365 | else \ | |
366 | if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ | |
367 | banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ | |
368 | fi; \ | |
369 | else \ | |
370 | if test "$$xpass" -eq 0; then \ | |
371 | banner="$$failed of $$all $$tests failed"; \ | |
372 | else \ | |
373 | if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ | |
374 | banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ | |
375 | fi; \ | |
376 | fi; \ | |
377 | dashes="$$banner"; \ | |
378 | skipped=""; \ | |
379 | if test "$$skip" -ne 0; then \ | |
380 | if test "$$skip" -eq 1; then \ | |
381 | skipped="($$skip test was not run)"; \ | |
382 | else \ | |
383 | skipped="($$skip tests were not run)"; \ | |
384 | fi; \ | |
385 | test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ | |
386 | dashes="$$skipped"; \ | |
387 | fi; \ | |
388 | report=""; \ | |
389 | if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ | |
390 | report="Please report to $(PACKAGE_BUGREPORT)"; \ | |
391 | test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ | |
392 | dashes="$$report"; \ | |
393 | fi; \ | |
394 | dashes=`echo "$$dashes" | sed s/./=/g`; \ | |
395 | if test "$$failed" -eq 0; then \ | |
396 | col="$$grn"; \ | |
397 | else \ | |
398 | col="$$red"; \ | |
399 | fi; \ | |
400 | echo "$${col}$$dashes$${std}"; \ | |
401 | echo "$${col}$$banner$${std}"; \ | |
402 | test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ | |
403 | test -z "$$report" || echo "$${col}$$report$${std}"; \ | |
404 | echo "$${col}$$dashes$${std}"; \ | |
405 | test "$$failed" -eq 0; \ | |
406 | else :; fi | |
407 | ||
408 | distdir: $(DISTFILES) | |
409 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
410 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
411 | list='$(DISTFILES)'; \ | |
412 | dist_files=`for file in $$list; do echo $$file; done | \ | |
413 | sed -e "s|^$$srcdirstrip/||;t" \ | |
414 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | |
415 | case $$dist_files in \ | |
416 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | |
417 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | |
418 | sort -u` ;; \ | |
419 | esac; \ | |
420 | for file in $$dist_files; do \ | |
421 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | |
422 | if test -d $$d/$$file; then \ | |
423 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | |
424 | if test -d "$(distdir)/$$file"; then \ | |
425 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
426 | fi; \ | |
427 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | |
428 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | |
429 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
430 | fi; \ | |
431 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | |
432 | else \ | |
433 | test -f "$(distdir)/$$file" \ | |
434 | || cp -p $$d/$$file "$(distdir)/$$file" \ | |
435 | || exit 1; \ | |
436 | fi; \ | |
437 | done | |
438 | check-am: all-am | |
439 | $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) | |
440 | $(MAKE) $(AM_MAKEFLAGS) check-TESTS | |
441 | check: check-am | |
442 | all-am: Makefile | |
443 | installdirs: | |
444 | install: install-am | |
445 | install-exec: install-exec-am | |
446 | install-data: install-data-am | |
447 | uninstall: uninstall-am | |
448 | ||
449 | install-am: all-am | |
450 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | |
451 | ||
452 | installcheck: installcheck-am | |
453 | install-strip: | |
454 | if test -z '$(STRIP)'; then \ | |
455 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
456 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
457 | install; \ | |
458 | else \ | |
459 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
460 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
461 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ | |
462 | fi | |
463 | mostlyclean-generic: | |
464 | ||
465 | clean-generic: | |
466 | ||
467 | distclean-generic: | |
468 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | |
469 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | |
470 | ||
471 | maintainer-clean-generic: | |
472 | @echo "This command is intended for maintainers to use" | |
473 | @echo "it deletes files that may require special tools to rebuild." | |
474 | clean: clean-am | |
475 | ||
476 | clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am | |
477 | ||
478 | distclean: distclean-am | |
479 | -rm -rf ./$(DEPDIR) | |
480 | -rm -f Makefile | |
481 | distclean-am: clean-am distclean-compile distclean-generic \ | |
482 | distclean-tags | |
483 | ||
484 | dvi: dvi-am | |
485 | ||
486 | dvi-am: | |
487 | ||
488 | html: html-am | |
489 | ||
490 | html-am: | |
491 | ||
492 | info: info-am | |
493 | ||
494 | info-am: | |
495 | ||
496 | install-data-am: | |
497 | ||
498 | install-dvi: install-dvi-am | |
499 | ||
500 | install-dvi-am: | |
501 | ||
502 | install-exec-am: | |
503 | ||
504 | install-html: install-html-am | |
505 | ||
506 | install-html-am: | |
507 | ||
508 | install-info: install-info-am | |
509 | ||
510 | install-info-am: | |
511 | ||
512 | install-man: | |
513 | ||
514 | install-pdf: install-pdf-am | |
515 | ||
516 | install-pdf-am: | |
517 | ||
518 | install-ps: install-ps-am | |
519 | ||
520 | install-ps-am: | |
521 | ||
522 | installcheck-am: | |
523 | ||
524 | maintainer-clean: maintainer-clean-am | |
525 | -rm -rf ./$(DEPDIR) | |
526 | -rm -f Makefile | |
527 | maintainer-clean-am: distclean-am maintainer-clean-generic | |
528 | ||
529 | mostlyclean: mostlyclean-am | |
530 | ||
531 | mostlyclean-am: mostlyclean-compile mostlyclean-generic | |
532 | ||
533 | pdf: pdf-am | |
534 | ||
535 | pdf-am: | |
536 | ||
537 | ps: ps-am | |
538 | ||
539 | ps-am: | |
540 | ||
541 | uninstall-am: | |
542 | ||
543 | .MAKE: check-am install-am install-strip | |
544 | ||
545 | .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ | |
546 | clean-checkPROGRAMS clean-generic ctags distclean \ | |
547 | distclean-compile distclean-generic distclean-tags distdir dvi \ | |
548 | dvi-am html html-am info info-am install install-am \ | |
549 | install-data install-data-am install-dvi install-dvi-am \ | |
550 | install-exec install-exec-am install-html install-html-am \ | |
551 | install-info install-info-am install-man install-pdf \ | |
552 | install-pdf-am install-ps install-ps-am install-strip \ | |
553 | installcheck installcheck-am installdirs maintainer-clean \ | |
554 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | |
555 | mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ | |
556 | uninstall-am | |
557 | ||
558 | ||
559 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | |
560 | # Otherwise a system limit (for SysV at least) may be exceeded. | |
561 | .NOEXPORT: |
0 | /* netToe Version 1.5.1 | |
1 | * | |
2 | * Copyright 2011, 2012, 2013, 2014 Mats Erik Andersson | |
3 | * <meand@users.sourceforge.net> | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify | |
6 | * it under the terms of the GNU General Public License as published by | |
7 | * the Free Software Foundation; either version 2 of the License, or | |
8 | * (at your option) any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with this program; if not, write to the Free Software | |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | */ | |
19 | ||
20 | #ifdef HAVE_CONFIG_H | |
21 | # include <config.h> | |
22 | #endif | |
23 | ||
24 | #include <stdio.h> | |
25 | #include <stdlib.h> | |
26 | ||
27 | #if defined USE_TERMINFO || defined USE_TERMCAP | |
28 | # if (defined HAVE_NCURSES_H || defined HAVE_NCURSES_NCURSES_H) \ | |
29 | && (defined USE_TINFO || defined USE_NCURSES) | |
30 | # if defined HAVE_NCURSES_NCURSES_H | |
31 | # include <ncurses/ncurses.h> | |
32 | # else | |
33 | # include <ncurses.h> | |
34 | # endif | |
35 | # endif | |
36 | # if defined HAVE_CURSES_H && defined USE_CURSES | |
37 | # include <curses.h> | |
38 | # endif | |
39 | # if defined HAVE_NCURSES_TERM_H && USE_NCURSES | |
40 | # include <ncurses/term.h> | |
41 | # elif defined HAVE_TERM_H && !USE_TERMCAP | |
42 | # include <term.h> | |
43 | # elif defined HAVE_TERMCAP_H && USE_TERMCAP | |
44 | # include <termcap.h> | |
45 | # endif | |
46 | ||
47 | # if !HAVE_PUTP | |
48 | # define putp(x) tputs((x), 1, putchar) | |
49 | # endif | |
50 | ||
51 | const char *clear_str = NULL; | |
52 | const char *bell_str = NULL; | |
53 | const char *bold_str = NULL; | |
54 | const char *rmso_str = NULL; | |
55 | const char *smso_str = NULL; | |
56 | const char *sgr0_str = NULL; | |
57 | const char *setab_str = NULL; | |
58 | const char *setaf_str = NULL; | |
59 | #endif /* Use terminal capabilities */ | |
60 | ||
61 | int main(void) | |
62 | { | |
63 | #if defined USE_TERMINFO || defined USE_TERMCAP | |
64 | char *sp; | |
65 | # if HAVE_SETUPTERM || HAVE_TGETENT | |
66 | int err; | |
67 | # endif /* HAVE_SETUPTERM || HAVE_TGETENT */ | |
68 | # if HAVE_TGETENT | |
69 | static char buf[1024]; | |
70 | char *p = buf; | |
71 | # endif /* HAVE_TGETENT */ | |
72 | ||
73 | if ((sp = getenv("TERM")) == NULL) { | |
74 | sp = "dumb"; | |
75 | printf("No environment value set for TERM!\n" | |
76 | "Using \"%s\" instead.\n", sp); | |
77 | } | |
78 | ||
79 | # if HAVE_SETUPTERM | |
80 | if (setupterm(sp, fileno(stdout), &err) == ERR) { | |
81 | switch (err) { | |
82 | case 1: puts("Hardcopy terminal!"); | |
83 | return EXIT_SUCCESS; | |
84 | break; | |
85 | case 0: printf("Terminal \"%s\" not found.\n", sp); | |
86 | return EXIT_SUCCESS; | |
87 | break; | |
88 | default: puts("No terminfo database accessible."); | |
89 | return EXIT_SUCCESS; | |
90 | break; | |
91 | } | |
92 | } | |
93 | # elif HAVE_TGETENT | |
94 | err = tgetent(buf, sp); | |
95 | switch (err) { | |
96 | case 1: /* Success */ | |
97 | break; | |
98 | case 0: printf("Terminal \"%s\" not found.\n", sp); | |
99 | return EXIT_SUCCESS; | |
100 | break; | |
101 | default: puts("No terminfo database accessible."); | |
102 | return EXIT_SUCCESS; | |
103 | break; | |
104 | } | |
105 | # endif /* !HAVE_SETUPTERM && HAVE_TGETENT */ | |
106 | ||
107 | printf("Terminal: TERM = %s.\n", sp); | |
108 | ||
109 | # if HAVE_SETUPTERM | |
110 | clear_str = tigetstr("clear"); | |
111 | bell_str = tigetstr("bel"); | |
112 | bold_str = tigetstr("bold"); | |
113 | rmso_str = tigetstr("rmso"); | |
114 | smso_str = tigetstr("smso"); | |
115 | sgr0_str = tigetstr("sgr0"); | |
116 | setab_str = tigetstr("setab"); | |
117 | setaf_str = tigetstr("setaf"); | |
118 | # elif HAVE_TGETENT | |
119 | clear_str = tgetstr("cl", &p); | |
120 | bell_str = tgetstr("bl", &p); | |
121 | bold_str = tgetstr("md", &p); | |
122 | rmso_str = tgetstr("se", &p); | |
123 | smso_str = tgetstr("so", &p); | |
124 | sgr0_str = tgetstr("me", &p); | |
125 | setab_str = tgetstr("AB", &p); | |
126 | setaf_str = tgetstr("AF", &p); | |
127 | # endif /* HAVE_TGETENT */ | |
128 | printf("clear: %s\n", clear_str ? "yes" : "no, using ANSI"); | |
129 | printf("bell: %s\n", bell_str ? "yes" : "no, using ANSI"); | |
130 | printf("bold: %s\n", bold_str ? "yes" : "no, using ANSI"); | |
131 | printf("rmso: %s\n", rmso_str ? "yes" : "no, using ANSI"); | |
132 | printf("smso: %s\n", smso_str ? "yes" : "no, using ANSI"); | |
133 | printf("sgr0: %s\n", sgr0_str ? "yes" : "no, using ANSI"); | |
134 | printf("setab: %s\n", setab_str ? "yes" : "no, using ANSI"); | |
135 | printf("setaf: %s\n", setaf_str ? "yes" : "no, using ANSI"); | |
136 | ||
137 | return 0; | |
138 | #else /* No terminal capabilities. */ | |
139 | printf("No terminal capabilities are in use.\n"); | |
140 | ||
141 | return 0; | |
142 | #endif | |
143 | } | |
144 |